Ee3512 C&i Lab Manual Reg 2021
Ee3512 C&i Lab Manual Reg 2021
ENGINEERING COLLEGE
VILLUPURAM
(Approved by AICTE, New Delhi & Affiliated to Anna university, Chennai)
Vadakuchipalayam, Kappiyampuliyur post,Villupuram-605601,Tamilnadu.
LAB MANUAL
REGULATION: R-2021
SYLLABUS
EE3512 CONTROL AND INSTRUMENTATION LABORATORY LT P C 0 0 4 2
COURSE OBJECTIVES:
To make the students familiarize with various representations of
systems.
To make the students analyze the stability of linear systems in the
time domain and frequency domain.
To make the students design compensator based on the time and
frequency domain Specifications.
To develop linear models mainly state variable model and transfer
function model
To make the students to design a complete closed loop control system
for the physical
systems.
LIST OF EXPERIMENTS:
1. Analog (op amp based) simulation of linear differential equations.
2. Numerical Simulation of given nonlinear differential equations.
3. Real time simulation of differential equations.
4. Mathematical modeling and simulation of physical systems in at least
two fields. Mechanical Electrical Chemical process
5. System Identification through process reaction curve.
6. Stability analysis using Pole zero maps and Routh Hurwitz Criterion in
simulation platform.
7. Root Locus based analysis in simulation platform.
8. Determination of transfer function of a physical system using
frequency response and Bode’s asymptotes.
9. Design of Lag, lead compensators and evaluation of closed loop
performance.
10. Design of PID controllers and evaluation of closed loop performance.
11. Discretization of continuous system and effect of sampling.
12. Test of controllability and observability in continuous and discrete
domain in simulation platform.
13. State feedback and state observer design and evaluation of closed
loop performance.
14. Mini Project 1: Simulation of complete closed loop control systems
including sensor and actuator dynamics.
15. Mini Project 2: Demonstration of a closed loop system in hardware.
S.NO TITLE
Analog (op amp based) simulation of linear differential equations.
1
Numerical Simulation of given nonlinear differential equations
2
APPARATUS REQUIRED
PROCEDURE
1. To build a SIMULINK model to obtain response of a P, PI, PID Controllers, the following
procedure is followed:
3. From the continuous block in the library drag the transfer function block.
4. From the source block in the library drag the step input.
6. From the math operations block in the library drag the summing point.
7. From the discrete block in the library drag the PID controller.
8. Connect all to form a system and give unity feedback to the system.
9. For changing the parameters of the blocks connected double click the respective block.
Thus the effect of P, PI, PD, and PID controller has been verified by using Matlab.
APPARATUS REQUIRED
PROGRAMME
% Step Response for TF 1/(s^2+10s+20)
num=[1];
den=[1 10 20];
figure(1);
step(num,den)
% Proportional Controller
Kp=600;
num1=[Kp];
den1=[1 10 20+Kp];
t=0:0.01:2;
figure(2);
step(num1,den1,t)
grid;
% Proportional Derivative Controller
Kp=300;
Kd=10;
num2=[Kd Kp];
den2=[1 10+Kd 20+Kp];
t=0:0.01:2;
figure(3);
step(num2,den2,t)
grid;
% Proportional Integral Controller
Kp1=30;
Ki=70;
num3=[Kp1 Ki];
den3=[1 10 20+Kp1 Ki];
t=0:0.01:2;
figure(4);
step(num3,den3,t)
grid;
%Proportional Integral Derivative Controller
Kp2=350;
Kd2=50;
Ki2=300;
num4=[Kd2 Kp2 Ki2];
den4=[1 10+Kd2 20+Kp2 Ki2];
t=0:0.01:2;
figure(5);
step(num4,den4,t)
grid;
OUTPUT
1. % Step Response for TF 1/(s^2+10s+20)
2. % Proportional Controller
3. % Proportional Derivative Controller
Thus the effect of P, PI, PD, and PID controller has been verified by using Matlab coding.
Expt. No: 1 Date:
THEORY
PID controllers are commercially successful and widely used controllers in Industries. For
example, in a typical paper mill there may be about 1500 Controllers and out of these 90% would be
PID controllers. The PID controller consists of proportional controller, integral controller and
derivative controller. Depending upon the application on or more combinations of the controllers are
used.(ex: in a liquid control system where we want zero steady state error, a PI controller can be used
and in a temperature control system where we do not want zero steady state error, a simple P
controller can be used.
The equation of the PID controller in time domain is given by, m(t) = KPe(t) + Ki/Ti ∫ e(t) dt + KdTd
de(t) /dt where KP is a proportional gain Ti is the integral reset time and Td is the derivative time of
the PID controller, m(t) is the output of the controller and e(t) is the error signal given by e(t) = r(t) –
c(t).
TABULATION
Amplitude
S.No Type of Controller Time in sec
Volts
1 P Controller
2 PI Controller
3 PD Controller
4 PID Controller
RESULT
Thus the effect of P, PI, PD, and PID controller has been verified by using trainer kit.
PROGRAM
AIM
To Check the stability analysis of the given system or transfer function using MATLAB
Software.
APPARATUS REQUIRED
PROCEDURE
➢ Open the MATLAB software using a MATLAB icon Open a blank M- File or Simulink file
(File, New, M file) Type the given program in M file
➢ Run the program using debug option or using F5 key
➢ Find the stability of the system in the output graph and compare it with
theoretical value
RESULT
Thus the designs of root locus for the given transfer function using MATLAB Software was
executed.
PROGRAM
0.4 -10 dB
10 dB
0.2
Imaginary Axis
20 dB -20 dB
-0.2
-0.4
-0.6
-0.8
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
Real Axis
OUTPUT:
Wcp = 0
Gain_Margin = 8.0011
Phase Margin = -180
Phase Crossover Frequency = 1.7322
Gain Crossover_Frequency = 0
To Check the stability analysis of the given system or transfer function of Nyquist Plot using
MATLAB Software.
APPARATUS REQUIRED
PROCEDURE
➢ Open the MATLAB software using a MATLAB icon Open a blank M- File or Simulink file
(File, New, M file) Type the given program in M file
➢ Run the program using debug option or using F5 key
➢ Find the stability of the system in the output graph and compare it with
theoretical value
RESULT
Thus the designs of nyquist plot for the given transfer function using MATLAB Software was
executed.
PROGRAM
%Bode Plot for the Transfer Function=10/(s3+8s2+12s)
nu=[10];
de=[1 8 12 0];
sys=tf(nu,de);
bode(sys);
grid on;
Bode Diagram
50
0
Magnitude (dB)
-50
-100
-150
-90
-135
Phase (deg)
-180
-225
-270
-2 -1 0 1 2 3
10 10 10 10 10 10
Frequency (rad/sec)
Expt. No: 2 Date:
AIM
To Design the bode plot for the given system and also determine the gain and phase margin using
MATLAB Software.
APPARATUS REQUIRED
PROCEDURE
➢ Open the MATLAB software using a MATLAB icon Open a blank M- File or Simulink file
(File, New, M file) Type the given program in M file
➢ Run the program using debug option or using F5 key
➢ Find the stability of the system in the output graph and compare it with
theoretical value
RESULT
Thus the design of bode plot for the given system using MATLAB Software was executed.
PROGRAMME
A.OPEN LOOP RESPONSE (FIRST ORDER SYSTEM)
T.F=4/(s+2)
1. Response of system to Step input
n=[4];
d=[1 2];
sys=tf(n,d);
step(sys)
2. Response of system to Impulse input
n=[4];
d=[1 2];
sys=tf(n,d);
step(sys)
impulse(sys)
Simulink Model:
1. Step Input Open Loop –I Order
Step Response
2
1.8
1.6
1.4
1.2
Amplitude 1
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
Time (sec)
APPARATU REQUIRED
1. A PC with MATLAB package.
THEORY
State Variable approach is a more general mathematical representation of a system, which, along
with the output, yields information about the state of the system variables at some predetermined
points along the flow of signals. It is a direct time-domain approach, which provides a basis for
modern control theory and system optimization. SISO (single input single output) linear systems can
be easily defined with transfer function analysis. The transfer function approach can be linked easily
with the state variable approach.
The state model of a linear-time invariant system is given by the following equations:
Ẋ (t) = A X(t) + B U(t) State equation
Y(t) = C X(t) + D U(t) Output equation
Where A = n x n system matrix, B = n x m input matrix,
C= p x n output matrix and
D = p x m transmission matrix,
2. Impulse Input Open Loop –I Order
Impulse Response
4
3.5
2.5
Amplitude
1.5
0.5
0
0 0.5 1 1.5 2 2.5 3
Time (sec)
PROGRAM:
B. Close Loop Response
1. Response of Step input
n=[4];
d=[1 2];
sys=tf(n,d);
sys=feedback(sys,1,-1)
step(sys)
2. Response of Impulse input
n=[4];
d=[1 2];
sys=tf(n,d);
sys=feedback(sys,1,-1)
impulse(sys)
Simulink Model
1. Step Input Close Loop –I Order
Step Response
0.7
0.6
System: sys
Time (sec): 0.192
0.5 Amplitude: 0.456
0.4
Amplitude 0.3
0.2
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
Impulse Response
4
3.5
2.5
Amplitude
1.5
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
Step Response
0.35
0.3
0.25
0.2
Amplitude
0.15
0.1
0.05
0
0 0.5 1 1.5 2 2.5
Time (sec)
Impulse Response
0.45
0.4
0.35
0.3
0.25
Amplitude
0.2
0.15
0.1
0.05
-0.05
0 0.5 1 1.5 2 2.5 3
Time (sec)
n=[4];
d=[1 6 16];
sys=tf(n,d);
sys=feedback(sys,1,-1) ;
impulse(sys)
Simulink Model
1. Step Input Close Loop –II Order
Step Response
0.25
0.2
0.15
Amplitude
0.1
0.05
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8
Time (sec)
0.4
0.35
0.3
0.25
Amplitude
0.2
0.15
0.1
0.05
-0.05
0 0.5 1 1.5 2 2.5
Time (sec)
RESULT
Thus the digital simulation of time response characteristics of a first and second order linear system
with step and impulse inputs were simulated using MATLAB and outputs are observed for respective
inputs.
PROGRAM
i. UNDER DAMPED SECOND ORDER SYSTEM
% Time Domain Specifications
num1=[10];
den1=[1 2 10];
%Transfer Function Form
G=tf(num1,den1)
% Natural frequency and Damping Ratio
[Wn Z P] = damp(G)
Wn=Wn(1);
Z=Z(1);
t=0:0.1:20
%(i) Under Damped System For Step Input
figure(1);
step(num1,den1,t)
title('Under Damped Second Order System Response for Step Input');
grid;
PROCESS SIMULATION
AIM
To check the process simulation result with first order and second Order System with the step input.
APPARATUS REQUIRED
1. PC with MATLAB Software.
SECOND ORDER SYSTEM
The Second order system has the transfer functions (i)Under Damped Second Order System
G(s)=10/(s2+2s+10) (ii) Undamped Second Order system G(s)=10/(s2+10) (iii)Critically Damped
Second Order System G(s)=10/(s2+7.32s+10) (iv)Over Damped Second Order System
G(s)=10/(s2+3s+10) for that apply step input and check the result 4-cases using MATLAB Software
Step Input Open Loop –I Order
Step Response
2
1.8
1.6
1.4
1.2
Amplitude
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
Time (sec)