home
PDF
(a)
project_step.mdl
(b)
project_sin.mdl
(c)
project_impulse.mdl
(d)
project.mdl

Using Simulink to analyze 2 degrees of freedom system

Spring 2009 page compiled on June 29, 2015 at 4:20pm

Abstract

A two degrees of freedom system consisting of two masses connected by springs and subject to 3 diﬀerent type of input forces is analyzed and simulated using Simulink

1 Introduction and Theory

The system that is being analyzed is show in the following diagram

In the above, is to be taken as each of the following

1.
Unit impulse force.
2.
Unit step force.
3.

It is required to ﬁnd and analytically and then to use Matlab's Simulink software for the analysis.

The mathematical model of the system is ﬁrst developed and the equation of motions obtained using Lagrangian formulation then the analytical solution is found by solving the resulting coupled second order diﬀerential equations for and . Next, a simulink model is developed to implement the diﬀerential equations and the output and from Simulink is shown and compared to the output from the analytical solution.

2 Analytical solution

The following is the free body diagram of the above system

Assuming positive is downwards and that , force-balance equations for results in

And force-balance equations for results in

Hence the EQM for the system become

Or in matrix form

The above can be written in matrix form as

Where are 2 by 1 vectors and and are the mass and stiﬀness matrices. The solution to the above is

 (1)

2.1 Finding the homogenous solution

We start by ﬁnding from the following

Now assume and , hence and and and . Substituting the above values in the above system results in

Divide by since not zero (else no solution exist) we obtain

Rewrite the above as

From the last equation above, we see that to obtain a solution we must have

since if we had then no solution will exist. Therefore, taking the determinant and setting it to zero results in

Let , hence the above becomes

Solving for gives

 (3)

For each of the above solutions, we obtain a diﬀerent from equation (2) as follows

For , (2) becomes

From the ﬁrst equation above, we have

Similarly for ,

Let

Hence now can be written as

But and , hence the above becomes

 (5)

Now, given numerical values for we can ﬁnd from (3) above, and next ﬁnd from (4).  Hence (5) contains 4 unknowns, which now can be found from initial conditions (after we ﬁnd the particular solution) which we will now proceed to do.

2.2 Finding particular solutions

There are 3 diﬀerent which we are asked to consider

1.
Unit impulse force.
2.
Unit step force.
3.

For each of the above, we ﬁnd and then add it to found above in (5) to obtain (1).

2.2.1 Finding the particular solution for unit impulse input

Using the standard response for a unit impulse which for a single degree of freedom system is , then we write as

Hence, the general solution becomes

 (6)

2.2.2 Finding the particular solution for unit step input

Since unit step is for , then, using convolution we write

Then, since now we have 2 natural frequencies, we can write as

Hence, the general solution becomes

2.2.3 Finding the particular solution for

In this case, we guess that , and since there is no forcing function being applied directly on then hence

Then and and now we substitute these into the original ODE for which is

We obtain the following

Hence by comparing coeﬃcients, we obtain

or

must be zero since only when and we assume that this is not the case here. Hence

Therefore becomes

And the general solution becomes

 (8)

3 Simulink simulation and block diagrams

In simulink, we will directly solve the system from the original formulation

or

Hence

3.1 Unit step simulink diagram and output

The simulink block diagram will be as follows for the unit step input

For an initial run with parameters I get this warning below

Warning: Using a default value of 0.2 for maximum step size.  The simulation
step size will be equal to or less than this value.  You can disable this
diagnostic by setting 'Automatic solver parameter selection' diagnostic to
'none' in the Diagnostics page of the configuration parameters dialog.

And this is the output for and for the unit step response

3.1.1 Veriﬁcation of result from Simulink by Numerically solving the diﬀerential equations

To verify the above output from Simulink, I solved the same coupled diﬀerential equations for zero initial conditions numerically (using a numerical diﬀerential equation solver) and plotted the solution for and and the result matches that shown above by simulink. Here is the code the plot as a result of this veriﬁcation

4 Unit impulse simulink diagram and output

And the output for and is as follows

4.0.1 Veriﬁcation of result from Simulink by Numerically solving the diﬀerential equations

To verify the above output from Simulink, The same coupled diﬀerential equations were solved numerically for zero initial conditions numerically and the solution plotted for and and the result was found to match that shown above by simulink. Here is the code used to do the veriﬁcation

veriﬁcation

4.1 input simulink diagram and output

The simulink block diagram will be as follows for the input

For an initial run with parameters this is the output for and and showing the input signal at the same time

5 Discussion

A coupled system of two masses and springs was analyzed using Simulink. The simulation was done for one set of parameters (masses and stiﬀness). Simulink made the simulation of this system under diﬀerent loading conditions easy to do. The 2 masses response were recorded using simulink scope and the signals captured on the same plot to make it easy to compare the response of the ﬁrst mass to the second mass.

The analytical analysis was more time consuming than actually making the simulation in simulink. The ability to easily change diﬀerent sources to the system was useful as well as the ability to change the frequency of the input and immediately see the eﬀect on the response.

This was my ﬁrst project using Simulink, and I can see that this tool will be useful to learn more as it allows one to easily analyze engineering problems.