Project - Position control of mass spring damper system
clc;
clear;
%Nominal paramete of spring mass system
m = 3.6; %mass of spring mass system
k = 400.0; %stiffness constant of spring mass system
c = 100.0; %damping coefficient Ns/m
%Equivalent Wn:
wn=sqrt(k/m);
%Design parametes:
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&B matrices:
A = [0 1;-k/m -c/m];
B = [0;1/m];
%pole placement design:
K=place(A,B,p);
%Kp & Kd design:
Kp=K(1);
Kd=K(2);
Ki=800.0;



integral gain Ki=650.0 gives the scope above mention
there is no overshoot and undershoot but some phase change in reference signal