Challenge

Project - Position control of mass spring damper system

REPORT :

% Given parameters of spring mass damper system
m = 3.6; %kg
k = 400; %N/m
c = 100; %Ns/m

we know the transfer function of mass spring damper system

f(t)-cdx/dt-kx(t)=mdx^2/dt^2

Byapplying laplace transform

F(s)-csX(s)-kX(s)=ms^2X(s)

T(s)=1/ ms^2+Cs+k

% Also we know that
wn = sqrt(k/m);
zeta =0.9;
% We know that Transfer function of spring mass damper system is
G = wn^2/s^2+2*zeta*wn+wn^2;
% Finding the poles which makes system stable
A = [0 1;-k/m -c/m];
B = [0;1/m];
p1 = -zeta*wn+wn*sqrt(zeta^2-1);
p2 = -zeta*wn-wn*sqrt(zeta^2-1);
P = [p1;p2];
% From above details we can find controller gain using place commands
% Finding the values of Kp & Kd
K = place(A,B,P);
We find the transfer function of the given sysytem and designed a PID controller for that and build a simulimk model. as shown below image
NOTE : I have attached matlab file which contains the Matlab program for finding controller gains.

The values of Kp & Kd obtained from the using a 'place' command are 0 and -31.6948 respectively so for obtaining a desired output we observe the output waveform for the diffrenat values of the integral gain i.e. Ki

1. Set Ki = 100

As we see in the above image the output waveform does not folllow the Ref. signal.

2. Set Ki = 500

As we see in the above image the output waveform tries to folllow the Ref. signal as we incresres the value of Ki

3. Set Ki = 1000

As we see in the above image the output waveform folllows the Ref. signal

CONCLUSION:

Obtained the transfer function of a mass spring damper system with m = 3.6kg k = 400 N/m c = 100 Ns/m using matlab programming and Created a transferfunction model and added PID controller and adjusted the force on mass so its position follows a reference signal when Kp=0 ; Ki=1000 and Kd= -31.6948

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.