Challenge

Project - Position control of mass spring damper system

Solution of Question-

We have to design a PID controller using simulink which control the mass spring damper system in any direction.

Simulink model-

Simulink model blocks-

Pulse Genrator- This block is used for generating a pulse of magnitude 1 with the time period of 10

Transfer Function- This block is used for define the mass, stiffness constant and damping constant

Kp(Proportional gain),Kd(Derivative gain) & Ki(Integral gain) are simply gain block.

For Controlling the PID-

Command Windows Command-

matlab Program-

Nominal parameters of the Spring-mass system
m = 3.6; % mass of the spring-mass system in Kg
k = 400; % Stiffness constant of spring mass system in N/m
c = 100; % Damping constant of spring mass system in Ns/m
Equivalent Wn
fn = 1.0; % Wn/(2*pi) Hz
Wn = 2*pi*fn; % Natural frequency
Design parameters-
zeta = 0.5; % Underdamed system design
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 and Kd gains are obtained from an earlier design using the place command
  • Add Ki manually with gain and integrator block and tune different values of Ki and check the impact of it on results.
Kp = 15391; Kd = 138; Ki =0;
Kp = 15391; Kd = 138; Ki = 10000;
Kp = 15391; Kd = 138; Ki = 1000;

As when the Ki is zero the output has a lag. As the Ki is 1000 the output will track the input.

A PID controller is designed through simulink to adjust the force on mass so that its position follows a reference signal to using matlab and simulink wave from plot.

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.