Project - Position control of mass spring damper system
Parameters
m = 3.6; %kg
k = 400; %N/m
c = 100; %Ns/m
MATLAB PROGRAM OF POSITION CONTROL OF SPRING_MASS_DAMPER_SYSTEM
% Position control of Spring Mass Damper System Parameter
m = 3.6; % Kg
k = 400; % N/m
c = 100; % Ns/m
% Pole Placement
fn = 1.0; % 1Hz natural frequency
wn = 2*pi*fn; % Natural Frequency in rad/s
% Matrix Values
A = [0 1 ; -k/m -c/m];
B = [0; 1/m];
zeta = 0.5; % for an under-damped condition [ (firstly zeta value was 0.7;) ]
% Poles Values
p1 = -zeta*wn-wn*sqrt(zeta^2-1);
p2 = -zeta*wn+wn*sqrt(zeta^2-1);
p = [p1;p2];
% Kp and Kd values
K = place(A,B,p);
Kp = K(1);
Kd = K(2);
- Building a Model
- Clock block is used to time input and save it to a variable 'out.time'.
- Using step block with Periods of 3,5,10 sec.
- Using MATLAB function block for programming the Position control of spring mass damper system
- Creating control signal [u/t)] or PId by sum block with the gain blocks having values of proportional gain (Kp), and derivative gain (Kd).
- Using Transfer function for [m k h] and also Scope for graph.
- Three graphs are attached for 3 periods values.