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
The system that is being analyzed is show in the following diagram
In the above, is to be taken as each of the following
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.
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
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
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 ,
Hence now can be written as
But and , hence the above becomes
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.
There are 3 diﬀerent which we are asked to consider
For each of the above, we ﬁnd and then add it to found above in (5) to obtain (1).
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
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
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
must be zero since only when and we assume that this is not the case here. Hence
And the general solution becomes
In simulink, we will directly solve the system from the original formulation
The simulink block diagram will be as follows for the unit step input
For an initial run with parameters I get this warning below
And this is the output for and for the unit step response
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
And the output for and is as follows
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
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
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.