0% found this document useful (0 votes)
287 views3 pages

PID Control Design in MATLAB

This document describes an experiment to design P, D, I, PI, PD and PID controllers for a rotational system using MATLAB and Simulink. It provides the system transfer function and equations for PID control. It includes the MATLAB code used, instructions for implementing different controller types in MATLAB and Simulink, and a table to record response results for comparison.

Uploaded by

Bhimsen Shrestha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
287 views3 pages

PID Control Design in MATLAB

This document describes an experiment to design P, D, I, PI, PD and PID controllers for a rotational system using MATLAB and Simulink. It provides the system transfer function and equations for PID control. It includes the MATLAB code used, instructions for implementing different controller types in MATLAB and Simulink, and a table to record response results for comparison.

Uploaded by

Bhimsen Shrestha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

You might also like