Project - Position control of mass spring damper system
Ans: -
%nominal parameters of the spring mass system
m = 3.6; %mass of the spring mass system
k = 400; %stiffness constant of the spring mass system
c = 100;
%To find the value of wn
wn =sqrt(k/m);
%To find the value of zeta
zeta = c/(2*sqrt(m*k));
%Desired poles
p1 = -zeta*wn+wn*sqrt(zeta^2-1);
p2 = -zeta*wn-wn*sqrt(zeta^2-1);
P = [p1;p2];
%A and B matrices
A = [0 1; -k/m -c/m];
B = [0 ; 1/m];
%Pole placement design
K = place(A,B,P);
By running above matlab script Kp & Kd value found as 0 & -0.1279 respectively. At the starting Ki value kept 0 and below is the result of graph.

From the graph it can be easily seen that the position of force on mass not even following the reference given input. After this Ki value increases about to 500 and below is the output of graph.

From the above graph it can be seen that the position of force on mass is following the reference input signal in a very better manner but in this graph rise time is little bit more so again I increases the value of Ki about to 1200 and the final output graph is shown below.

Conclusion:-
- From the above graph it can be seen that all the parameters are within the limits i.e. settling time, undershoot, overshoot & rise time also decreases.
- From my side when I kept value of Ki as 1200 position of mass spring damper system is well controlled & following the reference input.
Please find attached .m and .mdl file below.