Project - Position control of mass spring damper system
1. 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
Answer:-
Here I used zeta = 0.5 as an under-damped condition
Values of Kp & Kd obtained from the place command
and we have to give Ki value manually
clear all
clc
%% Nominal parameters of spring-mass-damper system
m=3.6; % Mass in kg
k=400; % Spring stiffness in N/m
c=100; % in Ns/m
%% Frequencies
wn=sqrt(k/m); % we know wn^2=k/m
fn=wn/2*pi; % we know wn=2*pi*fn
%% Design parameters
zeta=0.5; % under-damped condition
%% Ploe placement
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=K(1);
Kd=K(2);
Ki=1020;
The Simulink model obtains the transfer function of a mass spring damper system and uses a PID controller to adjust the force on mass so that its position follows a reference signal. is below

Obtained the transfer function of a mass spring damper system and used it in the model. And used a PID controller to adjust the force on mass so that its position follows a reference signal.
