Project - Position control of mass spring damper system
PROCEDURE
1.Insert the required blocks
1. 1-pulse generator
2. 3-gain
3. 2-sum
4. 1-Integrator
5. 1-Derative
6. 1-Transfer function
7. scope
2.connect the circuit INPUT, PID CONTROLLER, TRANSFER FUNCTION, OUTPUT
3.run the program and save the vales to work sace
4.assigne the values of kd, kp from the work space
5.give the value of ki and change the value of ki randomly (0,100, 500, 1000, 1300, 1500, 2000).
6.open the scope and observe the geaphs of ki values.
Matlab function program
clc;
clear all;
% initial values of Position control of mass spring damper system
%from given data
m = 3.6; % m in kg
k = 400; % k in N/m
c = 100; % c in Ns/m
wn = sqrt(k/m) % calculating the wn
fn = wn/(2*pi) % calculating the fn
A = [0 1; -k/m -c/m]; % A matrix value
B = [0; 1/m]; % B matrix value
zeta = 0.5; % for under damping
p1 = -zeta*wn+wn*sqrt(zeta^2-1); %calculating the value of p1
p2 = -zeta*wn-wn*sqrt(zeta^2-1); %calculating the value of p2
p= [p1;p2];
K = place(A,B,p); % pole placements
Kp = K(1)
Kd = K(2)
RESULTS / OBSERVATION
The less value of Ki gives the more studystate error and the high value of Ki gives the more overshoot and under shoot error.
So, by chaging the valuse of ki we can observe the improvement of output responce.
Ki=1380 gives the best results .
NOTE: I DONT HAVE ENOUGH TOOLS FOR DIRECT ACCESS OF PID CONTROLLER.
so i made the PID controller manually.
SIMULINK MODEL

PULSE GENERATOR VALUES

TRANSFER FUNCTION VALUES

OUTPUT
ki=100

ki=500

ki=1000

ki=1380

ki=1500

ki=2000

PID CONTROLLER ERROR
