**dynamic systems**that are often difficult to model, either because of the number of components, big and numerous equations of movement or transformations and simplifications and other factors…What would you think if you could drastically

**reduce your modeling time doing a co-simulation**? Imagine a situation where you would model your

**control system in 1D**(nothing new so far), and your dynamic model (simple or complex) as a block where your inputs and outputs are

**connected to a multibody software (MBS)**? That’s what I’m going to talk about on my second article.

**Ball & Beam system**is one of the many systems that are usually covered in an engineering degrees (mechanical, control etc). And it’s on top of this (relatively simple) model that I’m going to show

**(either on a simple or in a complex model). For this analysis I used co-simulation with Altair Activate (used to 1D model), Altair MotionView and Altair MotionSolve (used to multibody model, regarding to modeling, solver). For the post-processing I used Altair HyperView and Altair HyperGraph.The starting point of this study is to understand how the Ball & Beam system works. The aim of this analysis is to implement a control system on the gear that could**

__how useful co-simulation of systems is__**stabilize the ball on a desired position**(set point) [1].

**Its position can be changed**by either beam excitation or manually (human action changing ball position). A standard model’s figure with the parameter’s values that were used on this model can be seen as follow [2]:

The multibody simulation approach makes possible to easily build up a spatial model of the dynamics of ball & beam set, analyzing effects of dynamic interactions of the assembly components [3]. Often on dynamic systems to facilitate the resolution or even understanding of results, different coordinate axes are created: inertial and non-inertial, taking into account the formulation you will use, and this in a multibody software it is not different. That is, points, coordinate axes (markers), joints, contact settings, outputs, are some of the points that are **the task of the engineer to determine and adjust**. In this particular analysis, follows some of the settings with the 3D model that I used regarding to the mentioned tasks above (note that the joints are in a exaggerated size, just to facilitate the view):

It is important to note that, this is not the only one way, or the most correct way to model this system, for example some parameters such as contact settings (stiffness, damping, friction) and relative axes that I adopted, can have a different approach. Since the plant, i.e. the dynamic system is modelled in the multibody software, it is necessary to **implement the control in the closed loop 1D model **that will be used to control de ball position in the beam.

Regarding to control systems, in particular, when the mathematical model of the Plant is not known and therefore methods of analytical design cannot be used, **PID controls** prove to be the most useful [4]. In this analysis, a **PD control** was implemented, its utility lies in its general applicability to most control systems. The 1D closed loop model with PD control and the Plant (modeled on multibody software) can be seen as follow:

As mentioned, the focus of this article is on co-simulation itself, so for didactic purposes I calculated a simple PD control through the **analytical method** (using the equations on the picture below [5]) satisfying a 2% overshoot and two-second settling time with no steady state error in the ball displacement direction:

Finally, to show you the implemented control acting on the Ball and Beam system, I have imposed some desired positions on the ball, and as you can see, the co-simulation is really working and the **ball really goes to the desired position without instability**!

It is important to notice that altough there are many control techniques that can be used to obtain the PID’s paremeters, the goal of this study was to demonstrate the co-simulation between MBS and 1D models. Therefore the** study was validated** (with a practical example) showing how powerful and useful is a co-simulation of dynamic systems.

Please feel free to contact me if you have some note about that study or even interest in multidisciplinary systems! On my last article I’ve done a study to Control Aircraft Pitch Angle in Frequency Domain. **Thank you for your attention!**

**References:**

- B. Meenakshipriya, K. Kalpana,Modelling and Control of Ball and Beam System using Coefficient Diagram Method (CDM) based PID controller, IFAC Proceedings Volumes, Volume 47, Issue 1, 2014.
- http://ctms.engin.umich.edu/CTMS/index.php?example=BallBeam§ion=SystemModeling
- G. Reinhart and M. Weissenberger, “Multibody simulation of machine tools as mechatronic systems for optimization of motion dynamics in the design process,”
*1999 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (Cat. No.99TH8399)*, Atlanta, GA, USA, 1999, pp. 605-610, doi: 10.1109/AIM.1999.803237. - Ogata, K. (2010) Modern Control Engineering. 5th Edition, Pearson, Upper Saddle River.
- FERREIRA, Janito. Efeito dos controladores: Efeitos dos Controladores. 01-01 de sep de 2018. 23 p. Notas de Aula. Faculdade de Engenharia Mecânica, Unicamp.

## Have a question or comment?

Post your comment/question on our user forum.