Project - Position control of mass spring damper system
ANSWERS;--------
objective:-
1." Signal Generator''
2.'' Pulse generator''
Exercise 1 :
with signal generator:
the parameters settings are :
waveform: square
time: use simulation time
Amplitude: 1
frequency: 0.1 hertz,
we have to create the model by connecting this signal with the workspace & scope blocks :gh
Accordingly model was created as below;-


We know the general equation for mass spring damper system s given by;-
x_dot = Ax + Bu
So the state representation of our spring mass system can be given by
x1_dot = x2 ------------------(1)
x2_dot = -(k/m) + (1/m)u ---------------(2)
We are using PID controller. So it has three gains Kp,Kd and Ki
So u = [Kp(x_ref – x1) – Kdx2 + Ki inte(x_ref – x1)]
Then the equation (2) becomes
x2_dot = -(k/m) + (1/m) [Kp(x_ref – x1) – Kdx2 + Ki inte(x_ref – x1)] ---------(3)
We have to design the model for equation(3)
Where
Kp – is proportional gain
Kd – is integral gain
Ki – is integral gain
m – is mass of the spring mass system
k – is a stiffness or spring constant
x2_dot – is accelaration
x1_dot = x2 – is a velocity
x1 – is displacement

The input to the model is given by the following MATLAB script
Script codes:.m.file
%c=2*zeta*wn
MODEL;-

Ki=1000;



Ki=1200;

Ki=1300;

Ki=1400;-

Ki=1500;-

Conclusion: based on the patterns we may conclude that the value of ki=1400 is optimal.

------------------------------------------------------------------------------end----------------------------------------------------------------------------------