Project - Position control of mass spring damper system
ANSWER:
MATLAB CODE
clear all;
% initial conditions Position control of mass spring damper system
m = 3.6; % kg
k = 400; % N/m
c = 100; % Ns/m
wn = sqrt(k/m) % Natural frequency in rad/s
f = wn/(2*pi) % Natural frequency in hertz
% A & B matrix value
A = [0 1; -k/m -c/m]; % A is using matrix of c ans k dived value of mass
B = [0; 1/m];
% Design values
zeta = 1.001; % for an near critically damped behavior
% poles value
p1 = -zeta*wn+wn*sqrt(zeta^2-1);
p2 = -zeta*wn-wn*sqrt(zeta^2-1);
p= [p1;p2];
K = place(A,B,p); % pole placement design
Kp = K(1);
Kd = K(2);
%Ki value can find entering ddiffrent range i was tried from 50 to 1000
%Here i used Ki=750

MATLAB PLOT CODE
figure(1);
subplot(111);plot(out.t,out.p,'b-');hold;grid;
plot(out.t,out.x1,'m--');

BLOCK USED TO DESIGN MODEL
1-Clock
2-Pulse generator
3-Sum block
4-Integrater block
5-Derivative Block
6-Transfer function
7-To workspace
8-Gain block


CONFIGURATION PARAMETER

MODEL

RESPONSE in Scope



AT zeta = 0.0; For an undamped system

AT zeta = 0.5; For an underdamped system

RESPONSE in PLOT
AT zeta = 1.5; For overdamped system

SUMMARY:
Obtained the transfer function of a mass spring damper system and used it in the model. Added a PID controller to adjust the force on mass so that its position follows a reference signal which can seen in above plots
Tried at Multiple zeta value like undamped system(0.0),under damped system(0.5)0,critical damped system(1.001) and over damped system(1.5)