Challenge

Project - Position control of mass spring damper system

Q.1

 the transfer function of a mass spring damper system and use it in the model.

 Add a PID controller to adjust the force on mass so that its position follows a reference signal

use the following blocks is the spring mass damper system model of matlab.

the block,integrator block,clock block,pid controller block, sum block,

workspace block,scope block,pulse genrator block

   here is the inputs which is provide for the spring mass damper system

m = 3.6; %kg

 k = 400; %N/m

 c = 100; %Ns/m

using all the prameters we calculate the value of this

[here is imege which is uplode below ]

%> < >% > < class><!-- [if mso]>
<![endif]-->

m= 3.6; %kg
k= 400; %N/m
c= 100; %Ns/m
<!-- [if mso]>
<![endif]-->
%Pole placements
<!-- [if mso]>
<![endif]-->
fn= 1.0; % 1Hz natural frequency design
wn= 2*pi*fn; % Natural frequency in rad/s
<!-- [if mso]>
<![endif]-->
%matrix is
<!-- [if mso]>
<![endif]-->
A= [0 1; -k/m -c/m];
B= [0; 1/m]; %1 upon m
<!-- [if mso]>
<![endif]-->
zeta= 0.5; %under damped value
<!-- [if mso]>
<![endif]-->
%pole value
<!-- [if mso]>
<![endif]-->
p1= -zeta*wn+wn*sqrt(zeta^2-1);
p2= -zeta*wn-wn*sqrt(zeta^2-1);
p= [p1;p2];
<!-- [if mso]>
<![endif]-->
% place comment is the Kp and Kd value
K= place(A,B,p);
kp=wn^2;
kd=2*zeta*wn;
 

  the model of the spring mass damper system

[here is imege which is uplode below ]

the output wavefprm of this

[here is imege which is uplode below ]

conclusion

to complision of this spring mass damper sytsem a PID controller to track a reference signal in a mass spring damper system. The PID controller was able to track the reference signal very closely, with very little overshoot or oscillation and PID controller is a simple but effective way to control systems. 

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.