EE3512 - C and I Lab Manual-Student
EE3512 - C and I Lab Manual-Student
ENGINEERING
Branch :
Batch : 2022 - 2026
Department in the
INSTITUTE MISSION
To promote quality education & technical skills to meet the industry requirements
To incorporate team work, leadership skills & lifelong learning
To facilitate career development & higher education assistance
To encourage innovative ideas for research & development and entrepreneurship for societal
needs
To inculcate ethical responsibility & human values
1. Graduates of the program will have successful technical and professional career.
2. Graduates of the program will reveal life-long learning to enhance technical skills and
Managerial skills.
3. Graduates of the program will undertake societal responsibilities with ethical practice.
1. Ability to design and solve problems in the field of Electrical & Electronics Engineering by
applying the knowledge acquired from Circuit & Field theory, Control theory, Electric Power
Systems, Analog and Digital Electronics & other allied topics.
2. Ability to understand the recent technological developments in Electrical & Electronics
Engineering and develop products/software to cater the societal & Industrial needs.
VELAMMAL INSTITUTE OF TECHNOLOGY, CHENNAI- 601204
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
Subject Code : EE3512 Class : III Year / V Semester
Subject : Control and Instrumentation Laboratory
Faculty : Ms.G.Selvamathi Academic Year : 2024-2025 (Odd)
Course Objectives
The student should be made to:
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
Course Outcomes:
Students will be able to
CO1 To model and analyze simple physical systems and simulate the performance
Apply (K3)
in analog and digital platform
CO2 To design and implement simple controllers in standard forms Analyze(K4)
CO3 To design compensators based on time and frequency domain specifications Analyze(K4)
CO4 To design a complete closed control loop and evaluate its performance for
Analyze(K4)
simple physical systems
CO5 To analyze the stability of a physical system in both continuous and discrete
Apply(K3)
domains
CO6 To analyze the stability of the transfer function using Nyquist stability
analysis Apply(K3)
CO-PO Mapping
PO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO
K-level K3 K4 K5 K5 K6 K4 K2 K3 K3 K2 K3 K3
CO1 K3 3 3 3 3 3 - - 1.5 - - - 2
CO2 K4 3 3 3 3 3 - - 1.5 - - - 2
CO3 K4 3 3 3 3 3 - - 1.5 - - - 2
CO4 K4 3 3 3 3 3 - - 1.5 - - - 2
CO5 K3 3 3 3 3 3 - - 1.5 - - - 2
CO6 K3 3 3 3 3 3 - - 1.5 - - - 2
Before - -
3 3 3 3 3 1.5 - - - 2
CBS
BE3273
After - -
3 3 3 3 3 1.5 - - - 2
CBS
CO – PSO Mapping
CO PSO1 PSO2
CO1 2 2
CO2 2 2
CO3 2 2 3 Strong Contribution
CO4 2 2 2 Moderate Contribution
CO5 2 2 1 Weak Contribution
CO6 2 2
BE3273 2 2
LIST OF EXPERIMENTS:
CYCLE - 1
CYCLE - 2
INDEX
DATE:-
AIM:
COMPONENTS REQUIRED:
PROCEDURE:
Simulink is a simulation and model-based design environment for dynamic and embedded systems, which
are integrated with MATLAB. Simulink was developed by a computer software company MathWorks. It
is a data flow graphical programming language tool for modelling, simulating and analysing multi-
domain dynamic systems. It is basically a graphical block diagramming tool with a customisable set of
block libraries. Furthermore, it allows you to incorporate MATLAB algorithms into models as well as
export the simulation results into MATLAB for further analysis.
Simulink supports the following:
System-level design.
Simulation.
Automatic code generation.
Testing and verification of embedded systems.
To get started with Simulink, click on MATLAB icon and open as shown below:
Double click chirp signal and change the initial frequency from 0.1 to 0.05 and click on Ok button.
The other blocks are kept as the default values. Now, click on run to see the output inscope as shown
below
RESULT:
Date:-
APPARATUS REQUIRED:
CIRCUIT DIAGRAM:
dVin
V0ut = −R F C = −250 V
dt
ω = 2πf
PROCEDURE:
RESULT:
Ex. No.:- 2(a)
Date:-
COMPONENTS REQUIRED:
d2 y 2𝑑𝑦
+ + 5𝑦 = 10
dt 2 𝑑𝑦
y ′′ + 2y ′ + 5y = 10
By re-arranging,
y ′′ = 10 − 2y ′ − 5y
PROCEDURE:
RESULT:
Ex. No.:- 2(b)
Date:-
AIM:
COMPONENTS REQUIRED:
1 x2
x&
g k l
2
x& sin( x1 ) x2 u
l ml ml 2
PROCEDURE:
4. Right click on the simulink model page model properties callbacks InitFcn*
(enter the data) l=0.5; m=0.1; g=9.80; k=25e-3; x0=[pi/4;0]; u=1e-3;
7. Select the integrator initial condition x0(1) ------------ > for both integrators
8. Right click on the simulink model page model configuration parameters Refine
factor =10
RESULT:
Ex. No.:- 3
Date:-
AIM:
To simulate the real time differential equation using MATLAB simulink.
COMPONENTS REQUIRED:
PROCEDURE:
RESULT:
Ex. No.:- 4(a)
Date:-
AIM:
To simulate the mathematical modeling and simulation of mechanical systems using
MATLAB simulation.
COMPONENTS REQUIRED:
PROCEDURE:
MECHANICAL MODEL:
MATLAB PROGRAM:
num=[10]
G=tf(num,den)
stepplot(G)
OUTPUT:
THEORETICAL CALCULATION:
RESULT:
Ex. No:- 4(b)
Date:-
AIM:
To simulate the mathematical modeling and simulation of electrical systems using
MATLAB simulation.
COMPONENTS REQUIRED:
PROCEDURE:
ELECTRICAL MODEL:
MATLAB PROGRAM:
num=[1]
den=[0.36 2.1 1]
G=tf(num,den)
stepplot(G)
OUTPUT:
THEORETICAL CALCULATION:
RESULT:
Ex. No:- 5
Date:-
AIM:
To write the MATLAB program for system identification through process reaction curve
(Ziegler-Nichols method for tuning PID controller).
COMPONENTS REQUIRED:
PROCEDURE:
% ziegler-nichols method
s=tf('s');
sys=1/[(s+10)*(s+20)];
figure(1);
step(sys);
L=0.01;
K=5e-3;
T=0.22-L;
Kp=1.2*(T/L);
Ki=Kp/(2*L);
Kd=Kp*0.5*L;
PID_contoller=pid(Kp,Ki,Kd)
opensys=series(PID_contoller,sys);
closesys=feedback(opensys,1);
figure(2);
step(closesys)
OUTPUT:
Process Reaction Curve (PRC)
Opensys
Closesys
RESULT:
Ex. No.:-6(a)
Date:
AIM:
To design a system for the stability analysis using pole zero maps method in MATLAB
simulation.
COMPONENTS REQUIRED:
PROCEDURE:
% Plot the pole-zero configuration in s-plane for the given transfer function
ltiview(G)
OUTPUT:
RESULT:
Expt. No.:-6(b)
Date :
AIM:
To design a system for the stability analysis using Routh Hurwitz criterion method in
MATLAB simulation.
COMPONENTS REQUIRED:
PROCEDURE:
clear all;
clc;
equation=[1 8 18 16 5]
l=length(equation);
m=mod(l,2);
if m==0
a=rand(1,(l/2));
b=rand(1,(l/2));
for i=1:(l/2)
a(i)=equation((2*i)-1);
b(i)=equation(2*i);
end
a=rand(1,((l+1)/2));
b=[rand(1,((l-1)/2)),0];
for i=1:((l+1)/2)
a(i)=e1((2*i)-1);
b(i)=e1(2*i);
end
end
l1=length(a);
c=zeros(l,l1);
c(1,:)=a;
c(2,:)=b;
for m=3:l
for n=1:l1-1
end
end
disp(c)
if c(:,1)>0
disp('System is Stable')
else
disp('System is Unstable')
end
OUTPUT:
RESULT:
Expt. No.:- 7
Date:-
AIM:
To write a MATLAB program and to draw the root locus for the open loop systems
given.
COMPONENTS REQUIRED:
PROCEDURE:
% Root Locus : The open loop transfer function of a unity feedback system
num=[1];
den=[1 3 2 0];
Gs=tf(num,den)
rlocus(num,den);
grid on;
OUTPUT:
RESULT:
Ex. No.:- 8
Date:-
BODE PLOT BASED ANALYSIS IN SIMULATION
AIM:
To write a MATLAB program and to draw the bode plot for the open loop systems is
given by G(S)=1/S(S2+2S+3)
COMPONENTS REQUIRED:
PROCEDURE:
%Find (i)Gain Margin (ii) Phase Margin (iii) Gain Cross over Frequency
%Frequency (vii)Bandwidth
num=[1];
den=[1 2 3 0];
sys=tf(num,den)
w=logspace(-1,3,100);
Gain_Margin_dB=20*log10(Gm)
Phase_Margin=Pm
Gaincrossover_Frequency=Wcp
Phasecrossover_Frequency=Wcg
[Mp i]=max(M)
Resonant_PeakdB=20*log10(Mp)
bode(sys)
grid on;
OUTPUT:
RESULT:
Expt. No.:- 9(a)
Date:-
DESIGN OF LAG COMPENSATORS
AIM:
To write a MATLAB program for lag compensator and to draw the bode plot for the for
the unity feedback transfer function G(s) = K/s(s+1)(s+4)
COMPONENTS REQUIRED:
PROCEDURE:
% Design a Lag compensator for a TF that has Phase Margin ≥40 % b. The steady
state error for ramp input ≤ 0.2. Assume K=20
num=[20]
den=[1 5 4 0]
G=tf(num,den)
figure(1);
bode(G)
grid on;
[Gm,Pm,Wcg,Wcp]=margin(num,den);
Gmdb=20*log10(Gm);
W=logspace(-1,1,100);
[mag,ph]=bode(G,W);
ph=reshape(ph,100,1);
mag=reshape(mag,100,1);
PM=-180+40+5
Wg=interp1(ph,W,PM);
beta=interp1(ph,mag,PM);
tau=8/Wg;
Gc=D*G
figure(2);
bode(Gc)
grid on;
[Gm1,Pm1,Wcg1,Wcp1]=margin(Gc)
OUTPUT:
RESULT:
Ex. No.:- 9(b)
Date:-
DESIGN OF LEAD COMPENSATORS
AIM:
To write a MATLAB program for lead compensator and to draw the bode plot for the for
the unity feedback transfer function G(s) = K/s(s+2)
COMPONENTS REQUIRED:
PROCEDURE:
% a. Phase Margin>_ 20
% b. The steady state error for ramp input is less than or equal to 0.33.
% Assume K=5
num=[5]
den=[1 2 0]
G=tf(num,den)
figure(1);
bode(G)
grid on;
[Gm,Pm,Wcg,Wcp]=margin(num,den)
GmdB=20*log10(Gm);
w=logspace(-1,100,100);
[mag1,phase1]=bode(G,w);
PM=20-Pm+5
alpha=(1-sin(PM/180))/(1+sin(PM/180))
Gm=-20*log10(1/sqrt(alpha))
mag=20*log10(mag1);
magdB=reshape(mag,100,1);
Wm=interp1(magdB,w,(-20)*log10(1/sqrt(alpha)))
tau=1/(Wm*sqrt(alpha))
Gc=D*G
figure(2);
bode(Gc)
grid on;
[Gm1,Pm1,Wcg1,Wcp1]=margin(Gc)
OUTPUT:
RESULT:
Ex. No.:- 10(a)
Date:-
DESIGN OF PID CONTROLLERS USING PROGRAM
AIM:
To write a MATLAB program for PID controllers.
COMPONENTS REQUIRED:
PROCEDURE:
num=[1]
den=[1 10 20]
G=tf(num,den)
step(G)
MATLAB PROGRAM:
% Proportional Controller
Kp=300
num=[Kp]
den=[1 10 20+Kp]
t=0:0.01:2;
G=tf(num,den)
step(G,t)
OUTPUT FOR STEP RESPONSE:
Kp=300;
Kd=10;
num=[Kd Kp]
t=0:0.01:2;
G=tf(num,den)
step(G)
grid;
MATLAB PROGRAM:
Kpi=30;
Ki=70;
num=[Kpi Ki]
t=0:0.01:2;
G=tf(num,den)
step(G,t)
grid;
OUTPUT FOR PROPORTIONAL DERIVATIVE CONTROLLER:
Kp=350;
Kd=50;
Ki=300;
num=[Kd Kp Ki]
t=0:0.01:2;
G=tf(num,den)
step(G,t)
grid;
OUTPUT:
RESULT:
.
Ex. No.:- 10(b)
Date:-
DESIGN OF PID CONTROLLERS USING SIMULINK MODEL
AIM:
To design PID controllers using MATLAB simulink model.
COMPONENTS REQUIRED:
PROCEDURE:
For P Controller, P = 3
Date:-
DISCRETIZATION OF CONTINUOUS SYSTEM AND EFFECT OF SAMPLING
AIM:
To write a MATLAB program for discretization of continuous system and effect of
sampling
COMPONENTS REQUIRED:
PROCEDURE:
A = [-1 1; -1 -1];
B = [0; 1];
C = [1 0];
D = 0;
figure;
subplot(2, 1, 1);
plot(t_ct, y_ct, 'b-', 'LineWidth', 1.5);
xlabel('Time (s)');
ylabel('Output y(t)');
grid on;
subplot(2, 1, 2);
xlabel('Time (s)');
ylabel('Output y[n]');
grid on;
RESULT:
Ex. No.:- 12
Date:-
TEST OF CONTROLLABILITY AND OBSERVABILITY IN SIMULATION
AIM:
To write a MATLAB program to test the Controllability and Observability for the given
matrix.
COMPONENTS REQUIRED:
PROCEDURE:
% x* = Ax + Bu
% y = Cx + Du
clear all
A=[0 0 1; -2 -3 0; 0 2 -3]
B=[0; 2; 0]
C=[1 0 0]
D=0
Q=[B,A*B,(A^2)*B]
t1=transpose(C);
t2=transpose(A);
T=[t1,t2*t1,((t2)^2)*t1]
if rank(Q)==3
disp('Controllable')
else
disp('Not controllable')
end
if rank(T)==3
disp('Observable')
else
disp('Not Observable')
end
OUTPUT:
RESULT:
Ex. No.:- 13
Date:-
STATE FEEDBACK AND STATE OBSERVER DESIGN
AIM:
To write a MATLAB program for state feedback and state observer of a close loop
system
COMPONENTS REQUIRED:
PROCEDURE:
A = [-1 0; 1 -2];
B = [1; 0];
C = [0 1];
A_cl = A - B*K;
B_cl = B;
C_cl = C;
D_cl = 0;
figure;
subplot(2, 1, 1);
plot(t_cl, y_cl);
xlabel('Time');
ylabel('Output y(t)');
grid on;
subplot(2, 1, 2);
xlabel('Time');
ylabel('State x(t)');
legend('x1', 'x2');
grid on;
OUTPUT FOR STATE FEEDBACK:
MATLAB PROGRAM:
A = [-1 0; 1 -2];
B = [1; 0];
C = [0 1];
A_obs = A - L*C;
B_obs = B;
D_obs = 0;
figure;
subplot(2, 1, 1);
plot(t_obs, y_obs);
xlabel('Time');
ylabel('Output y(t)');
grid on;
subplot(2, 1, 2);
xlabel('Time');
ylabel('State x(t)');
legend('x1', 'x2');
grid on;
OUTPUT FOR STATE OBSERVER:
RESULT:
Ex. No.:- 14
Date:-
MINI PROJECT 1:
AIM:
To write a MATLAB program for closed loop control systems including sensor and
actuator dynamics
COMPONENTS REQUIRED:
PROCEDURE:
M = 1; % Mass
K = 5; % Spring constant
Kp = 100;
Ki = 10;
Kd = 20;
T = feedback(C*G, G_a);
figure;
plot(t, r, 'k--', 'LineWidth', 1.5); % Desired position
hold on;
xlabel('Time (s)');
ylabel('Position');
grid on;
OUTPUT:
RESULT:
Ex. No.:- 15(a)
Date:-
MINI PROJECT 2:
AIM:
To study the operation of DC servomotor position control with PI controller using dc
positioncontrol trainer module (PEC01)
APPARATUS REQUIRED:
1. PEC 01 Module
2. Motor set up
3. Patch Chords
PRECAUTIONS:
1. Check whether power ON/OFF Switch is in OFF Condition
2. Check whether 230 V DC ON/OFF Switch is in OFF Condition
CONNECTION PROCEDURE:
1. Connect the terminal P1 to P6
2. Connect the motor actual position terminal P2 to P7
3. Connect the terminal P8 to P10 and P9 to P11
4. Connect the terminal P12 to P14 and P13 to P15
5. Dc output of P24 and P25 is connected to the input of PMDC motor
EXPERIMENTAL PROCEDURE
TABULATION:
RESULT:
Ex. No.:- 15(b)
Date:-
MINI PROJECT 2:
APPARATUS REQUIRED:
1. PEC 02 Module
2. Motor set up
3. Patch Chords
BLOCK DIAGRAM
PRECAUTIONS:
1. Check whether power ON/OFF Switch is in OFF Condition
2. Check whether 230 V AC ON/OFF Switch is in OFF Condition
CONNECTION PROCEDURE:
1. Connect terminal P7 (Pulse input -1) to P3 ( pulse output) and P10 (Pulse
input -2) to P4 ( Pulse output)
2. Connect gate terminal P8 to P19 and P11 to P21
3. Connect MT (1) terminal P9 to P20 and MT (2) terminal P12 to P22
4. Connect terminals P23 to P24, P25 to P26 and P27 to P28
5. Connect terminal P15 to P17 and P16 to P18
6. Connect terminal P1 (SP input ) to P13 (SP output) and connect terminal
P2 (PV input) to P14 (PV output)
7. Connect servomotor to P31 by using serial cable
8. Connect the main winding of motor to 230 V AC supply through a PC
Power Chord
EXPERIMENTAL PROCEDURE
TABULATION
RESULT:
CONTENT BEYOND SYLLABUS
NYQUIST BASED ANALYSIS IN SIMULATION
AIM:
To write a MATLAB program and to draw the nyquist for the given open loop systems.
COMPONENTS REQUIRED:
PROCEDURE:
clear all
clc
s=tf('s');
Gs=240/(s*(s+2)*(s+10))
nyquist (Gs,'k');
grid;
OUTPUT:
RESULT: