Challenge

Project - Position control of mass spring damper system

Obtain 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.

Take m = 3.6; %kg k = 400; %N/m c = 100; %Ns/m

Ans:

Simulink Model:

MATLAB Code:

fn = 1;

zeta = 0.707;
m = 3.6;%kg
K = 400;%N/m
c = 100;%Ns/m
wn = sqrt(K/m);
p1 = -zeta*wn+wn*sqrt(zeta^2-1);
p2 = -zeta*wn-wn*sqrt(zeta^2-1);
P = [p1;p2];
A = [0 1;-K/m -c/m];
B = [0;1/m];
k = place(A,B,P);
kp = 520.0000;
kd = -10.3425;
ki = 2700;

Reference signal:

Output:

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.