Challenge

Project - Position control of mass spring damper system

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.

Take

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

The reference signal is shown in the following figure.

Transfer function of mass spring damper system

% parameter of the spring-mass-damper system
m = 3.6;
k = 400;
C = 100;
% eqivalent wn
wn = 6.2832; % sqrt (k/m)
fn = 1.0; % wn / (2*pi)
% design parameter
zeta = 0.9; %underdamped
% 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];
%ploe placement design
T = place (A,B,p);
Kp = T(1);
Kd = T(2);
Ki = 1150;
%transfer function
s = tf('s');
sys = 1/(m*s^2+C*s+k);

Matlab program for finding controller gains are shown below:

SIMULATION:

Block used:Pulse generator,sum,integrator,derivative,Transfer function and scope

  • Blocks are connected as shown here we substract the output signal from reference signal and we got error signal we gave the error signal to a PID controller to improve the output value

Procedure:

Pulse generator output set as given in the question shown below which is used as input signal

Result:

to solve the transfer function of a mass spring damper system

scope

case:1

Kp=-1.5348e-13 Ki=650 Kd=-31.6948

case:2

Kp=-1.5348e-13 Ki=750 Kd=-31.6948

case:3

Kp=-1.5348e-13 Ki=800 Kd=-31.6948

case:4

Kp=-1.5348e-13 Ki=1150 Kd= -31.6948

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=-1.5348e-13 Ki=1150 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.