Challenge

Project - Position control of mass spring damper system

POSITION CONTROL OF SPRING MASS DAMPER SYSTEM

Aim:

To build the position control of mass spring Damper System with the Help of the transfer Function and adjust the force applied to the mass with the help of the PID Controller.

Given Data:

  • " m " = 3.6 kg
  • " k " = 400 N/m
  • " c " = 100 Ns/m

Procedure:

Force Equation for Spring Damper Mass System is,

f(x) = m*x_dotdot + c*x_dot +k*x --------> (1)

where,

' m ' is the mass of the Body

' k ' is the Spring stiffness constant

' c ' is the Damping Constant.

Apply Laplace transform on both sides of equation (1)

F(S) = m*s² *X(s) + c*s*X(S) + k*X(S)

where,

F(S) is the transfer function of the f(x)

X(S) is the transfer function of the x(t)

F(S) = X(S) [ m*s² + c*s + k ]

X(S)/F(S) = 1/ [ m*s² + c*s + k ] ----->(2)

equation (2) is the transfer function of the spring mass damper system.

We know state matrix and Input matrix for the spring mass damper system are

A = [ 0 1; -k/m -c/m ]; A is the state matrix

B = [ 0 ; 1/m ] ; B is the Input matrix

zeta = 0.5; (under damped condition)

"wn" = sqrt (k/m) = 10.5409;

To finout the poles the following formula is used

P1 = -zeta * wn + wn *sqrt (zeta^2-1);

P2 = -zeta * wn - wn *sqrt (zeta^2-1);

P = [ P1; P2 ];

Find propotional gain and derivative gains using the place command.

K = place (A,B,P);

where,

" A " is the state matrix of the Spring Mass Damper System.

" B " is the Input matrix of the Spring Mass Damper System.

" P " is the poles of the system

" K(1) " is the propotional Gain

" K(2) " is the derivative Gain

MATLAB Script:

% initial conditions Position control of mass spring damper system
m = 3.6; % kg
k = 400; % N/m
c = 100; % Ns/m
% Pole placement design
fn = 1.0; % 1Hz natural frequency design
wn = 2*pi*fn; % Natural frequency in rad/s
% 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]; % B is the 1 ovear mass value
% Design values
zeta = 0.5; % for an under-damped behavior
% Desied poles value
p1 = -zeta*wn+wn*sqrt(zeta^2-1);
p2 = -zeta*wn-wn*sqrt(zeta^2-1);
P= [p1 p2];
% place comment is the Kp and Kd value
K = place (A,B,P);
Kp = K(1);
Kd = K(2);
Ki = 1375; % Integral gain
% End

MATLAB Script:

Blocks used:

Pulse Generator Block :

Pulse Generator Block used To give reference signal to the mass Spring Damper System.

Sum Block :

Sum Block used To add the Simulink Signals.

Gain Block:

Gain Block is used to muliply the signal with a constant gain value.

Integrator Block:

Integrator Block is Used to Integrate Input signal to it to get the required output of the signal.

Derivative Block:

Derivative Block is used to Differentiate the input signal with respect to time.

Scope Block:

Scope Block is Used to plot the required signal with respect to time.

Transfer function Block:

Transfer function mostly used in control systems and signals and systems. This is a guide to Transfer Functions in Matlab.

Simulink Model:

  • Create a clock block and to workplace block.
  • Create pulse generator block for reference input signal.
  • Create the sum block to connect the two or more blocks.
  • Create the gain blocks as like Proportional block, Integral block, Derivative block.
  • Add sum block to connect gain blocks.
  • Connect the scope through transfer function block.

Result:

From the simulink model we get the Scope,

Simulink Model with PID Controller :

  • In this model all the integrator, derivative and proportional gains blocks and replace these blocks with the Only single PID controller Block.
  • After adding the PID controller block from the Simulink library double click on it and select the tunning option. The PID Block automatically tune the Proportional, Integral and Derivative gains with optimum stability of system.
  • After running the system The scope results are shown Below.

Result:

Conclusion:

Transfer function for the position control of spring mass Damper system is derived and PID gains are obtained from the " place " command with the Given Data. Simulink Model for the position control of Mass spring damper system is builded and results are obtained to get the stability.

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.