0% found this document useful (0 votes)
38 views18 pages

Simulink

The document describes simulating a mass-spring-damper system in Simulink. It involves adding two integrators, two gain blocks, and a summer block to the model. Initial conditions are set by setting the position integrator to 1, representing an initial displacement from equilibrium. Running the simulation shows the position starting at 1 and velocity starting at 0 as expected.

Uploaded by

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

Simulink

The document describes simulating a mass-spring-damper system in Simulink. It involves adding two integrators, two gain blocks, and a summer block to the model. Initial conditions are set by setting the position integrator to 1, representing an initial displacement from equilibrium. Running the simulation shows the position starting at 1 and velocity starting at 0 as expected.

Uploaded by

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

 

MASS SPRING DAMPER EXAMPLE

K E Y W O R D S :T H E O R Y OF CONTROL, MATLAB SIMULINK

First of all, we will simulate a mass-spring-damper system.

We assume that there is no force involved. Lets get started. Open a new Simulink file. Our
system involves two integrators (from acceleration to velocity and from velocity to position).
In the Simulink window, click on Continuous.
In the right hand side you can see the integrator. Click on it and drag the block inside the
window just opened. Repeat this operation as, we need two integrators. By now, your window
should look like below:
To model our system we need two more gain blocks and one sumator block. We can find
these two blocks in the Math section.
Right click on the first Gain block. Choose Format->Rotate Block. As this operation will
rotate the block with 90 degrees (clockwise), you have to do it once more time.
Do the same for the second Gain block. Add a scope from Sinks and connect the blocks with
lines.
If you take a look on the block diagram you have just constructed, it is easy to see that it
represents the relationship:

where, the first gain represents the c/m term and the second one represents the term k/m.

INITIAL CONDITIONS

K E Y W O R D S :T H E O R Y OF CONTROL, MATLAB SIMULINK


Now, we do have our model in Simulink. It is easy to imagine that the mass will not move
because there is no force acting on it. With no force motion is possible if the initial conditions
are not zero. As the equation of motion is a second order differential equation, there are two
initial conditions. Right click on the second integrator. Choose "Block Parameters".

In the pop-up window set "initial condition" to "1".


This will set the initial position of the masss to 1. Basically, it is exactly the same as the mass
will be forced to stay in this position by an external force. The force vanished at moment zero.
Add another scope, to visualize the velocity (the output of the first integrator).
The next step is tu run the simulation and visualize the results.

RUN SIMULATION

K E Y W O R D S :T H E O R Y OF CONTROL, MATLAB SIMULINK

Now, we do have our model in Simulink. All we need to do is to press the "Run" button
or
Run the simulation. To see the results, double click on the two scopes. The results can be seen
below:
It can be seen that the initial value for position is 1 while the initial value for velocity is 0.
 

RUN SIMULATION

K E Y W O R D S :T H E O R Y OF CONTROL, MATLAB SIMULINK

Now, we do have our model in Simulink. All we need to do is to press the "Run" button

or
Run the simulation. To see the results, double click on the two scopes. The results can be seen
below:
It can be seen that the initial value for position is 1 while the initial value for velocity is 0.
 

SIMULINK TUTORIAL 3

K E Y W O R D S :T H E O R Y OF CONTROL, MATLAB SIMULINK

In this tutorial, we shall describe the most common blocks from Simulink.

Next

You might also like