Project - Position control of mass spring damper system
%xdot2=-k/m*x1+[kp(xref-x1)+ki int(xref-x1)dt-kdx2]
m =3.6; %mass of spring mass
k = 400; %stiffnes constant of Spring mass
zeta=1.3176;%100/(2 * sqrt(3.6*400))
%Equivalent
fn = 16.5576; %10.5409/2*pi
wn = 10.5409; %sqrt(400/3.6)sec
%pole placement
p1=-zeta*wn+wn*sqrt(zeta^2-1);
p2=-zeta*wn-wn*sqrt(zeta^2-1);
P=[p1;p2]
%% A and B matrix
A=[0 1; -k/m 0];
B=[0;1/m];
%pole placement
p1=-zeta*wn+wn*sqrt(zeta^2-1);
p2=-zeta*wn-wn*sqrt(zeta^2-1);
P=[p1;p2]
%% A and B matrix
A=[0 1; -k/m 0];
B=[0;1/m];
%% pole placement design
K=place(A,B,P);
Kp=-0.0019;
Kd=99.9986;
Objective:
Design a control system to regulate the position of a mass-spring-damper system in response to a reference signal.
System Description:
Consider the second-order differential equation representing the system dynamics:
xdot2=-k/m*x1+[kp(xref-x1)+ki int(xref-x1)dt-kdx2]
Blocks Required:
1 Step Block(xref)
3 Sum Blocks
3 Integrator Blocks
5 Gain Blocks
1 Scope Block (for visualization)
Connection Configuration:
Connect Step Block to the 1st Sum Block (reference signal).
Connect the output of the 1st Sum Block to the input of the 1st Integrator (proportional action).
Connect the output of the 1st Integrator to the KI Gain Block.
Connect the output of the KI Gain Block to the input of the 2nd Sum Block (+).
Connect the output of the 3rd Sum Block to the 1/m Gain Block.
Connect the output of the 1/m Gain Block to the 3rd input of the 3rd Sum Block (-).
Connect the output of the 3rd Sum Block to the input of the 2nd Integrator.
Connect the output of the 2nd Integrator to the input of the 3rd Integrator.
Connect the output of the 3rd Integrator to the Scope Block.
Connect KP Input between the 1st Sum Block and the 1st Integrator.
Connect the output of the 1st Integrator to the input of the 2nd Sum Block (+).
Connect the KD Output to the input of the 2nd Sum Block (-).
Connect KD Input between the 2nd Integrator and the 3rd Integrator.
Connect the output of the k/m Gain Block to the 3rd input of the 3rd Sum Block (-).
Connect the output of the k/m Gain Block to the input of the 3rd Integrator.
Connect the output of the 3rd Integrator to the Scope Block.
Lastly, connect the 1st Sum Block Input (-) between the 3rd Integrator and the Scope Block.
Conclusion:
The designed control system employs pole placement and PID control to regulate the mass-spring-
damper system in response to a reference signal. Simulink simulation results will provide
insights into the system's behavior and performance under the specified control strategy.