Project - Position control of mass spring damper system
Question :
Solution:
To create the tracking response of the model we have to calculate the parameters for the PID controller.
k=400; % spring constant
c=100; % damping co efficient
m=3.6; % weight
We know that
wn=sqrt(k/m);
Assume the zeta as under damped system
zeta=0.99;
We know the state space equation for the spring mass damper system.
A=[0 1;-k/m -c/m];
B=[0 1/m];
We have to calculate the poles of the system by the following equations
p1=-zeta*wn+wn^2*sqrt(zeta^2-1);
p2=-zeta*wn-wn^2*sqrt(zeta^2-1);
p1=-10.4355 +15.6742i
p2=-10.4355 -15.6742i
P=[p1 p2];
We have to calculate the Kp & kd gains to implement the controller,
K=place(A,B,P);
kp=876.844;
kd=-24.8643;
Now we have to vary the Ki value based on the tracking performance of the controller.
initially set up with the ki as zero and get the below response over tracking,

Now increase the ki value to improve the tracking performance.
after some trials the below value provides the good tracking of the system.
ki=3550;
Thus the tracking of the system is good.
Here with the model image is attached.

The final PID controller gain values are
kp=876.4844 , Kd=-24.8643 , ki = 3550.