Challenge

Project - Position control of mass spring damper system

Answer:-

Project Name:- Position control of mass spring damper system

A dynamic model of the mass spring damper using state space approach has been established. A 'pole placement technique' is used to design state feedback gain matrix for the mass spring damper. The values of full state feedback gain matrix are used to control the position of the system.

Project Aim:-

                To design the project of position control of mass spring damper system using matlab simulink model of 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.

 Objective:-

                      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. the matlab model of the pid control and transfer function pulse wavefrome generator.

 

The differential equation representin g the spring mass damper system-

f(t) = m*x_ddot+c*x_dot+k*x

or

f(t) = m*(d^2x/dt^2)+c*(dx/dt)+k*x.............................[equation(1)]

where,

m = mass;

c = damping coefficient;

k = spring constant;

If apply laplace transform in above equations(1) then

F(s) = m*s^2*X(s)+c*s*X(s)+k*X(s)

or

F(s) = (m*s^2+c*s+k)*X(s)

Transfer function-

X(s)/F(s) = 1/(m*s^2+c*s+k)

Given Data-

m = 3.6 kg;

k = 400 N/m;

c = 100 Ns/m;

Simulink Model-

It is created by using Sum, Gain, Transfer function, Integrator, Dervative, Pulse Generator, Workspace, Clock, and Scope blocks etc.

Pulse Generator:-

Pulse Generator is used and these values are apply.

Amplitude = 1;

Period = 5 sec;

Pulse width = 50%;

these values are derived from the reference signal provided in above question.

Transfer Function:- 

The transfer function for a spring mass damper system is 1/(m*s^2+c*s+k).

here,

m = 3.6 kg; (value of the mass)

c  = 100 Ns/M; (damping coefficient)

k = 400 N/m (spring constant)

These values of m, c, and k are given in the denominator as the differential order (high to low), 

where Numerator is 1.

Model Setting:-

In Model setting are given as start time 0.00, stop time 27.50, solver as auto (automatic solver selection), and step time as auto.

MATLAB Program:-

% Intitial condition position control of the mass spring damper system
 
m = 3.6;
k = 400;
c = 100;
 
% A & B Matrices
A = [0 1;-k/m -c/m];
B = [0; 1/m];
 
% Pole Placement Design
wn = sqrt(k/m);
fn = wn/(2*pi);
 
 
% Design value
zeta = 0.5; % Under damped behaviour
 
% required Poles Value
p1 = -zeta*wn+wn*sqrt(zeta^2-1);
p2 = -zeta*wn-wn*sqrt(zeta^2-1);
P = [p1;p2];
 
% 'Place' Command for K(1) and K(2)
K = place(A,B,P)
 
% K(1) = Kp; and K(2) = Kd;
 
MATLAB Script:-
 
 
Note:-
Matlab script we cna determoned the controller gain parameters Kp or K(1) and Kd or K(2), from the location of poles P1 and P2 using 'PLACE' Command in Matlab. The Ki (Iintegral Gain) is tuned manually and Kp, Kd values found from the 'PLACE' Command.

Command Window Comments:-

Response:-

1) When Ki = 0.00-

Note- We can Observe in above graph there is huge steady state error between reference (Yellow) and simulated signal (Blue).

Note:- Now, Gain Ki is set to 500.00 and other parameter keeping same to see the effect non-zero integral gain in above plot, the response we can see the effect of a non zero integral gain (Ki), and the steady stste error b/w set point and actual response starting decreaseing.

III) When Ki = 1000.00-

IV) When Ki = 1500.00-

V) When Ki = 1400.00-

Note:- Now, Gain Ki is set to 1500.00 and other parameter keeping same to see the effect non-zero integral gain in above plot, there is a tremendous improvement in the steady state error reduction with almost doubled integral gain (Ki) with value set 1500.00 as can see plot on the above. and we notice further reduction in the steady state error, but the response started to overshoot and become steady state.

 So, there is a sweet spot b/w 1500.00 and 1400.00 with a response that complies the desired rise time, settling time, overshhot and steady state error.

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.