Experiment 10
P, D, I, PI, PD AND PID CONTROL OF A ROTATIONAL SYSTEM
AIM
To design P, D, I, PI, PD and PID controllers for a rotational system using
MATLAB and SIMULINK.
APPARATUS
Software: MATLAB, SIMULINK
THEORY
Rotatinal system transfer function
1
( )=
(. + . + )
For PID controller, output can be expressed as
( )
( )= ( )+ + ( )
Kp, Kd, Ki are proportional, derivative and integral gains.
Transfer function of a controller can be written as
( ) + +
( )= = + . + =
( )
KL University_Mechanical FCS_15ME3115 PID_Rotational System
MATLAB CODE:
clc
clear all
J=10;D=10;K=10;
Kp=1;Ki=0;Kd=0;
t=0:0.02:10;
G=tf([1],[J D K]);
H=[1];
C=pid(Kp,Ki,Kd);
Gc=feedback(G*C,H);
step(G,t);
hold on;
step(Gc,t);
legend('With Out Controller','With Controller')
grid on;
xlabel('Time (Second)');
ylabel('Step Response');
title('Response of the system to step input');
Note 1: If PID undefined use C=tf([Kd Kp Ki],[1 0])
SIMULINK BLOCK DIAGRAM
Note 2:Step time=0, Initial value=0, Final value=1
Use the following parameters for both MATLAB and
SIMULINK files
Case 1: Kp=1 , Ki=0 , Kd=0 (P_COntroller)
Case 2: Kp=0 , Ki=1 , Kd=0 (I_Controller)
Case 3: Kp=0 , Ki=0 , Kd=1 (D_Controller)
Case 4: Kp=0.5 , Ki=0.5 , Kd=0 (PI_COntroller)
Case 5: Kp=0.5 , Ki=0 , Kd=0.5 (PD_COntroller)
Case 6: Kp=0.4 , Ki=0.4 , Kd=0.2 (PID_COntroller)
KL University_Mechanical FCS_15ME3115 PID_Rotational System
Fill the following table from MATLAB
Peak Settling
Rise time Oversho
Case Time time
(tr) ot
(tp) (ts)[<2%]
With out
controller
P-Controller
I-Controller
D-Controller
PI-Controller
PD-Controller
PID-Controller
SIMULINK
Peak Settling
Rise time Oversho
Case Time time
(tr) ot
(tp) (ts)[<2%]
With out
controller
P-Controller
I-Controller
D-Controller
PI-Controller
PD-Controller
PID-Controller
Result
P, D, I, PI, PD and PID controllers for a mechanical system using MATLAB and
SIMULINK has been designed.
KL University_Mechanical FCS_15ME3115 PID_Rotational System