Mass-Spring-Damper in Simulink and Simscape
AIM-3
Studying the ‘Mass-Spring-Damper in Simulink and Simscape’ model and answering the following objective questions:-
OBJECTIVE-1→→Derive the governing equation for the model
OBJECTIVE-2→→Change the value of mass, damper, and spring for the Simscape model and plot the result. Change the value of Mass x0=2 in the Simulink model and plot the results.
OBJECTIVE-3→→Make the response from Simscape and Simulink as two separate displays.
REQUIREMENTS
MATLAB & SIMULINK softwares
Simulink - is a graphical user interface for modeling and simulation of block schematics. The core of the Matlab is used to compute the simulating results. Simulink is primarily used for modeling dynamic systems. Simulink’s libraries offer a plenty of blocks useful for modeling complex systems. With help of integrating methods, we can simulate the system and analyze it in time.
Simscape – is a library of basic real world mechanics, hydraulics and electronics components. System, built from these blocks, is modeled from view of energy flow. Model works directly with physical parameters, so it approximates good real systems. Simscape generates differential equations from the modeled system that can communicate with other components from Matlab/Simulink after the simulation has been started.
Mass-Spring-Damper in Simulink and Simscape

GOVERNING EQUATION for the below model
Here, from the free body diagram,
m⋅a=∑F=F−kx−cvm⋅a=∑F=F-kx-cv
m⋅a+kx+cv=Fm⋅a+kx+cv=F
Now, when it is in equillibrium condition, F=0,
m⋅a+kx+cv=0m⋅a+kx+cv=0, i.e.
m⋅d2xdt2+kx+b⋅dxdt=0m⋅d2xdt2+kx+b⋅dxdt=0 where a=..x=d2xdt2⇒a=x..=d2xdt2⇒Acceleration(m/s2s2)
v=.x=dxdt⇒v=x.=dxdt⇒Velocity(m/s)
x⇒x⇒Displacement(m)
`m⇒⇒Mass(Kg)
c⇒c⇒Damping Coefficent(Ns/m)
GOVERNING EQUATION FOR SIMULINK MODEL

Here, (−kx−bv)1m=a(-kx-bv)1m=a
−kx−bv=m⋅a-kx-bv=m⋅a
m⋅a+bv+kx=0m⋅a+bv+kx=0
OBJECTIVE-2
Simscape, mass=100kg, damper=5Ns/m, stiffness=200N/m

simulink, mass=100kg, X0=2m

output of simulink and simscape after changing the values-

OBJECTIVE-3→→ Response of simulink an simscape separately

output will be same as the first 2 plots of objective-2


RESULT
Here as the damper value increases and stifness reduces, the disturbances reduces