0% found this document useful (0 votes)
11 views14 pages

03 - 2 - Mathematical Modeling Using SimScape - Mechanical

mathematical modeling

Uploaded by

no time
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views14 pages

03 - 2 - Mathematical Modeling Using SimScape - Mechanical

mathematical modeling

Uploaded by

no time
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Experiment Three

Mathematical Modelling
Using SimScape
(Mechanical Systems)

Control Systems Laboratory


Dr. Zaer Abo Hammour

Dr. Zaer Abo Hammour


Control Systems Laboratory
Experiment 3: Mathematical Modelling Using SimScape

1. Translational Mechanical System

In this example, you are going to model a simple mechanical system and observe its behavior under
various conditions. This tutorial illustrates the essential steps to building a physical model and makes
you familiar with using the basic Simscape blocks.
The figure 3.1 shows a simple model of a car suspension. It consists of a spring and damper connected
to a body (represented as a mass), which is agitated by a force. You can vary the model parameters,
such as the stiffness of the spring, the mass of the body, or the force profile, and view the resulting
changes to the velocity and position of the body.

Figure 3.1: A model of Car Suspension


To create an equivalent Simscape diagram, follow these steps:
1. Open the Simulink® Library Browser, as described in Simscape Block Libraries.
2. Create a new model. To do this, from the top menu bar of the Library Browser,
select File > New > Model. The software creates an empty model in memory and displays it in a
new model editor window.
3. Open the Simscape > Foundation Library > Mechanical > Translational Elements library as
shown in figure 3.2.
4. Drag the Mass, Translational Spring, Translational Damper, and two Mechanical Translational
Reference blocks into the model window.
5. Orient the blocks as shown in the figure 3.3. To rotate a block, select it and press Ctrl+R.
6. Connect the Translational Spring, Translational Damper, and Mass blocks to one of the
Mechanical Translational Reference blocks as shown in figure 3.4.

Dr. Zaer Abo-Hammour


Automatic Control Systems 1
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.2: Mechanical Translational Elements, step 3

Figure 3.3: Selected Elements, step 5

Dr. Zaer Abo-Hammour


Automatic Control Systems 2
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.4: Connect the elements to each other, step 6


7. To add the representation of the force acting on the mass, open the Simscape > Foundation
Library > Mechanical > Mechanical Sources library figure 3.5, and add the Ideal Force
Source block to your diagram as figure 3.4.

Figure 3.5: Mechanical Force, step 7

Dr. Zaer Abo-Hammour


Automatic Control Systems 3
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.6: The block diagram after add the Force, step 7
8. Add the sensor to measure speed and position of the mass. Place the Ideal Translational Motion
Sensor block from the Mechanical Sensors library figure 3.7 into your diagram and connect it
as shown in figure 3.8.

Figure 3.7: Mechanical Sensors Library

Dr. Zaer Abo-Hammour


Automatic Control Systems 4
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.8: Block Diagram


9. Now you need to add the sources and scopes. They are found in the regular Simulink libraries.
Open the Simulink > Sources library and copy the Signal Builder block into the model. Then
open the Simulink > Sinks library and copy two Scope blocks. Rename one of the Scope blocks
to Velocity and the other to Position.
10. Every time you connect a Simulink source or scope to a Simscape diagram, you have to use an
appropriate converter block, to convert Simulink signals into physical signals and vice versa. Open
the Simscape > Utilities library figure 3.9 and copy a Simulink-PS Converter block and two PS-
Simulink Converter blocks into the model. Connect the blocks as shown in figure 3.9.
11. Each topologically distinct physical network in a diagram requires exactly one Solver
Configuration block, found in the Simscape > Utilities library figure 3.9. Copy this block into
your model and connect it to the circuit by creating a branching point and connecting it to the only
port of the Solver Configuration block. Your diagram now should look like figure 3.10.

Dr. Zaer Abo-Hammour


Automatic Control Systems 5
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.9: Simscape Utilities Library

Figure 3.1: Block Diagram of System

Dr. Zaer Abo-Hammour


Automatic Control Systems 6
Experiment 3: Mathematical Modelling Using SimScape

 Modifying Initial Settings


After you have put together a block diagram of your model, as described in the previous section, you
need to select a solver and provide the correct values for configuration parameters.
To prepare for simulating the model, follow these steps:
1. Select a Simulink solver. On the top menu bar of the model window, select Simulation > Model
Configuration Parameters. The Configuration Parameters dialog box opens, showing
the Solver node.
Under Solver options, set Solver to ode23t (mod.stiff/Trapezoidal) and Max step size to 0.2.
Also note that Simulation time is specified to be between 0 and 10 seconds. You can adjust this
setting later, if needed.

Figure 3.2: Solver Configuration

Dr. Zaer Abo-Hammour


Automatic Control Systems 7
Experiment 3: Mathematical Modelling Using SimScape

2. Rotational Mechanical System


In this example, you are going to model a mechanical system and observe its behavior under various
conditions. This tutorial illustrates the essential steps to building a physical model and makes you
familiar with using the basic Simscape blocks.
The figure 3.12 shows a rotational mechanical system. It consists of a spring and damper connected to
a body (represented as a inertia), which is agitated by a torque. You can vary the model parameters,
such as the stiffness of the spring, the inertial of the body, or the torque profile, and view the resulting
changes to the angular velocity and angular position of the body.

Figure 3.12 A Rotational Mechanical System


 Modeling of System
To create an equivalent Simscape diagram, follow these steps:
12. Open the Simulink® Library Browser, as described in Simscape Block Libraries.
13. Create a new model. To do this, from the top menu bar of the Library Browser,
select File > New > Model. The software creates an empty model in memory and displays it in a
new model editor window.
14. Open the Simscape > Foundation Library > Mechanical > Rotaional Elements library as
shown in figure 3.13.
15. Drag the Inertial, Rotational Spring, Rotational Damper, and Mechanical Rotaional Reference
blocks into the model window.
16. Orient the blocks as shown in the figure 3.14. To rotate a block, select it and press Ctrl+R.
17. Connect the Translational Spring, Translational Damper, and Mass blocks to one of the
Mechanical Translational Reference blocks as shown in figure 3.15

Dr. Zaer Abo-Hammour


Automatic Control Systems 8
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.3: Mechanical Rotational Elements, step 3

Figure 3.4: Selected Elements, step 5

Dr. Zaer Abo-Hammour


Automatic Control Systems 9
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.5: Connect the elements to each other, step 6


18. To add the representation of the force acting on the mass, open the Simscape > Foundation
Library > Mechanical > Mechanical Sources library figure 3.16, and add the Ideal Torque
Source block to your diagram as figure 3.17.

Figure 3.6: Mechanical Force, step 7

Dr. Zaer Abo-Hammour


Automatic Control Systems 10
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.17: The block diagram after add the Force, step 7
19. Add the sensor to measure angular speed and angular position at ߠଶ ሺ‫ݐ‬ሻ. Place the Ideal Rotaional
Motion Sensor block from the Mechanical Sensors library figure 3.18 into your diagram and
connect it as shown in figure 3.19.

Figure 3.18: Mechanical Sensors Library

Dr. Zaer Abo-Hammour


Automatic Control Systems 11
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.19: Block Diagram


20. Now you need to add the sources and scopes. They are found in the regular Simulink libraries.
Open the Simulink > Sources library and copy the Signal Builder block into the model. Then
open the Simulink > Sinks library and copy two Scope blocks. Rename one of the Scope blocks
to Velocity and the other to Position.
21. Every time you connect a Simulink source or scope to a Simscape diagram, you have to use an
appropriate converter block, to convert Simulink signals into physical signals and vice versa. Open
the Simscape > Utilities library figure 3.20 and copy a Simulink-PS Converter block and two PS-
Simulink Converter blocks into the model. Connect the blocks as shown in figure 3.20.
22. Each topologically distinct physical network in a diagram requires exactly one Solver
Configuration block, found in the Simscape > Utilities library figure 3.21. Copy this block into
your model and connect it to the circuit by creating a branching point and connecting it to the only
port of the Solver Configuration block. Your diagram now should look like figure 3.21.

Figure 3.7: Simscape Utilities Library

Dr. Zaer Abo-Hammour


Automatic Control Systems 12
Experiment 3: Mathematical Modelling Using SimScape

Figure 3.8: Block Diagram of System

Dr. Zaer Abo-Hammour


Automatic Control Systems 13

You might also like