To download a pdf of this article follow the link Reusing models for different types of analysis
In this 4th article in the series “Getting more from simulation” we will explore how component orientated physical modelling supports the extensive reuse of models to perform different analyses.
In earlier articles in this series we discussed how traditional modelling approaches developed around the use of block diagrams and programming languages were only able to represent one interpretation of a model for one type of analysis. If alternative representations are required using these approaches then the model developer has to start again and redevelop the model for that purpose.
In contrast, Dymola allows you to create a model once and then reuse it in many different situations and to carry out different types of analysis.
In the model diagram below, we see an electric motor driving a load inertia via a gearbox that is operating in closed loop control to follow a set speed-time profile. In this case an idealised voltage source is used to power the electrical circuit and the voltage is determined by the PID controller. This model will enable us to calibrate the control system to achieve the desired response from the system. This causes Dymola to solve the equations to generate a forward dynamic model, i.e. the mechanical system responds as torque is applied to it.
Suppose we want to approach the problem from a different perspective and we want to explore how the motor power requirement is affected by changes in the compliance of the mechanical system. Using the model shown above this would be a time consuming process as the control system would need to be recalibrated for each change being considered.
Using Dymola we can explore these design changes by removing the control system from the model and using a special component that inverts the model equations. Adding this block as shown below causes the output speed of the load inertia to follow the speed-time profile set in the smoothRamp and it calculates the voltage required to achieve this. This causes Dymola to solve the equations in a different way and generates an inverse dynamic model, i.e. it calculates the torque required to follow a specified speed-time profile.
The physical model is reused without modification, all we have done is disconnect the existing control system model and add two new components to the model to actuate it in a different way.
Using this approach we can quickly evaluate the effect on the motor power requirement due to changes in the stiffness and damping characteristics of the gearbox. In fact, we could use this approach to look at the effect of changing any parameter within the physical model on the power requirement.
We can also use this approach to learn and understand what our control system must do to achieve the target system response and design an appropriate algorithm.
To use this approach using traditional block diagram modelling tools or normally programming languages would require the model developer to completely rewrite the physical model from first principles. This process is not only time consuming and error prone but it would also leave the engineer with two models to maintain and update each time the system is updated.
Through this series of 4 articles we have explored how using a component orientated physical modelling approach can accelerate the model development process and deliver improvements in efficiency through model reuse.
If you would like to learn more about Dymola visit our website.