Challenge

Project - Position control of mass spring damper system

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

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

Given parameter-

m=3.6

k=400

c=100

Explain-

`mx2dot+cx1dot+kx=F`

now, convert it into s domain or frequency domain

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

finally we arrange the eq to get the transfer function

here x(S)=position

F(S)-external force applied

``m=mass

k=spring constant

c=damping cofficient

so we get the transfer function eq-

`X(s) /F(S)= 1/(ms^2+cs+k)`

`or underdamped system zeta=<1`

so we take zeta=0.707

CODE-

These are the included script file

%nominal parameter
m=3.6;
k=400;
c=100;
%equivalent wn
wn=sqrt(k/m);
fn=1.0;
%design parameter
zeta=0.707; % for under damped system
% 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=K(1);
kd=K(2);
ki=0;
s=tf('s');
sys=1/(m*s^2+c*s+k);

wn=10.54(calucated value)

Poles-

P =

-7.4524 + 7.4547i
-7.4524 - 7.4547i

kd=-46.34

kp=0

ki=0

first of we have to take pulse generatorfor the give ref signal

now ,take a sum block add the kp and ki with the integrater,dv/dt withkd,and add it to the the transfer function block and connect to the scope,output should subtract to the sum block(feedback signal),now the model is

now the scope out put

now we have adujust or tuned the kp ,ki ,kd to get the stable control

kp=40

kd=400

ki=1

now we get the

again we have to tunned

kp=80

ki=800

kd=1

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.