21EC43-2 Labmanual - Modify
21EC43-2 Labmanual - Modify
Theory
The superposition theorem for electrical circuits states that the total current in any branch of a
bilateral linear circuit equals the algebraic sum of the currents produced by each source acting
separately throughout the circuit.
To ascertain the contribution of each individual source, all of the other sources first must be
"killed" (set to zero) by:
1. Replacing all other voltage sources with a short circuit (thereby eliminating difference of
potential. i.e. V=0)
2. replacing all other current sources with an open circuit (thereby eliminating current. i.e. I=0)
This procedure is followed for each source in turn, and then the resultant currents are added to
determine the true operation of the circuit. The resultant circuit operation is the superposition of
the various voltage and current sources
1
ECE, VDIT, Haliyal
Calculation
To find current with E1 :
Theoretical Practical
I1 With E1 5V
I2 With E2 10V
PROCEDURE
3. Initially set E1 as input voltage from RPS and deactivate E2 by short circuit .
Results:
Thus, the superposition theorem for the given circuit is verified.
2
ECE, VDIT, Haliyal
EXPERIMENT: 02:
Verification of Thevenin’s theorem
Theory
Any linear active network with output terminals C and D can be replaced by a single voltage
source (VTh = VOc) in series with a single impedance (ZTh = Zi).
VTh is the Thevenin’s voltage. It is the voltage between the terminals C and D on open circuit
condition. Hence it is called open circuit voltage denoted by VOc.
ZTh is called Thevenin’s impedance. It is the driving point impedance at the terminals C and
D when all the internal sources are set to zero. In case of DC ZTh is replaced by RTh.
3
ECE, VDIT, Haliyal
Calculation of Vth and Rth
To find Vth :
To find Rth :
PROCEDURE
1. Connect the circuit as per fig
2. Adjust the output voltage of the regulated power supply to an appropriate value (Say 20V).
3. Note down the voltage across the load terminals AB (Voltmeter reading) that gives Vth.
4. Reduce the output voltage of the regulated power supply to 0V and switch-off the supply.
5. Disconnect the circuit and connect as per the fig 2 .
6. Connect the digital multimeter (DMM) across AB terminals and it should be kept in resistance
mode to measure Thevenin’s resistance(RTh).
Results:
1) Thevenin’ voltage Vth = Practical____ in V and Theoretical ______in V
2) Thevenin’s Resistance Rh= Practical____ in Ohm and Theoretical ______in Ohm
Thevenin’s Circuit rigged up and verified theoretical and practical value
4
ECE, VDIT, Haliyal
EXPERIMENT: 03:
Speed torque characteristics of i)AC Servomotor ii) DC Servomotors
CIRCUIT DIAGRAM
Nature of Graph
5
ECE, VDIT, Haliyal
Theory : AC servomotor has best use for low power control applications. Its important
parameters are speed – torque characteristics. An AC servomotor is basically a two phase
induction motor which consist of two stator winding oriented 90* electrically apart. In
feedback application phase A is energised with fixed voltage known as “Reference” and
phase B is energized with variable voltage called “Control voltage”. In this setup AC
servomotor is mounted and mechanically coupled a small PMDC motor loading purpose.
When DC supply is fed to DC motor it runs in reverse direction of servomotor direction to
impose load on servomotor. The resultant torque developed by DC motor to overcome it
increase the current through it which is indicated by panel meter.
Ia = T/ KØ
Therefore V = (KØ)N*Ia + (T/ KØ)*Ra
On solving equation
N = (V/ KØ)- (Ra/ (KØ)^2) *T
for motor speed yields
7
ECE, VDIT, Haliyal
EXPERIMENT: 04:
Determination of time response specification of a second order Under damped System, for different
damping factors.
Circuit Diagram
Theory
An underdamped second-order system is a type of dynamic system that exhibits oscillatory
behaviour in its response. It is characterized by a second-order transfer function with complex
conjugate poles.
In this system, the response initially overshoots the desired value and then settles down to the
steady-state value. The amount of overshoot and the speed of settling are determined by the
damping ratio (ζ) and the natural frequency (ωn) of the system. For an underdamped system, the
damping ratio is less than 1 (0 < ζ < 1), resulting in oscillatory behaviour. To analyze and design
underdamped second-order systems, techniques such as pole-zero analysis, time-domain
analysis, frequency-domain analysis, and controller design methods like PID (Proportional-
Integral-Derivative) control are often employed. By adjusting the damping ratio and natural
frequency, the response of the system can be tailored to meet specific requirements, such as
minimizing overshoot or achieving a faster settling time.
8
ECE, VDIT, Haliyal
Calculation parameters Nature of graph
MATLAB Code
% Given System
zeta = [0.1 0.3 0.5 0.7 0.9];% Undamping ratio <1
wn = 10; %natural frequency
% Display Results
fprintf('Damping Ratio = %.1f\n', zeta(i));
fprintf('Damped Natural Frequency = %.2f rad/s\n', wd);
fprintf('Rise Time = %.2f s\n', tr);
num = wn^2;
den = [1 2*zeta(i)*wn wn^2];
sys = tf(num, den);
y = step(sys, t);
plot(t, y)
hold on
end
9
ECE, VDIT, Haliyal
Step Response of Second-Order Underdamped System for Different Damping Factors
1.8
zeta = 0.1
zeta = 0.3
zeta = 0.5.
1.6 zeta = 0.7
zeta = 0.9
1.4
1.2
1
Amplitude
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Time (s)
Results: Time response specification of a second order Under a damped System, for different damping factors
found and verified
10
ECE, VDIT, Haliyal
EXPERIMENT: 05:
Determination of frequency response of Second order systems
Theory: - The frequency response of a second-order system refers to how the system responds to
different frequencies of input signals. It describes how the output of the system changes in amplitude
and phase in response to varying input frequencies.
A second-order system is characterized by a transfer function that can be represented in the form:
K
H ( s )= 2 2
S +2 ς w n S+ wn
To analyze the frequency response of a second-order system, we typically consider the response to
sinusoidal inputs of varying frequencies. By substituting s with jω (where j represents the imaginary
unit and ω is the angular frequency), The frequency response is often expressed in terms of magnitude
and phase. The magnitude response indicates how the system amplifies or attenuates the input signal at
different frequencies, while the phase response describes the phase shift introduced by the system.
The magnitude response can be calculated as:|H(jω)| = |K / [(-ω^2) + (2ζω_nω) + (ω_n^2)]|
The phase response can be calculated as: ∠H(jω) = atan2(2ζω_nω, (ω_n^2) - ω^2)
11
ECE, VDIT, Haliyal
By evaluating these expressions for different values of ω, we can plot the frequency response of the
second-order system. The plot typically shows the magnitude response on a logarithmic scale (in
decibels) and the phase response in degrees. The frequency response of a second-order system can
reveal important characteristics such as resonant frequencies, bandwidth, and the system's ability to
amplify or attenuate specific frequencies. It is widely used in fields such as control systems, signal
processing, and audio engineering to analyze and design systems that respond appropriately to
different frequencies
MATLAB Code
% Second-Order System Frequency Response Example
% Given System
wn = 10; % Natural Frequency
zeta = 0.5; % Damping Ratio
subplot(212);
semilogx(w, phase2d);
grid on;
title('Phase Response');
xlabel('Frequency (rad/s)');
ylabel('Phase (deg)');
12
ECE, VDIT, Haliyal
Expected Output
Magnitude Response
Magnitude (dB) 0
-10
-20
-30
-40
10-1 100 101 102
Frequency (rad/s)
Phase Response
0
-50
Phase (deg)
-100
-150
-200
10-1 100 101 102
Frequency (rad/s)
13
ECE, VDIT, Haliyal
EXPERIMENT: 06:
Determination of frequency response of a lead lag compensator
Nature of Graph
compensator is a type of controller used in control systems engineering to improve system stability and
transient response. It introduces a phase lead in the frequency response of the system, which increases the
system's phase margin and reduces settling time and overshoot. The lead compensator achieves the phase
lead by introducing a zero in the transfer function of the system. This zero causes a positive phase shift as
the frequency increases, helping the system respond faster to disturbances. The lead compensator is
14
ECE, VDIT, Haliyal
commonly used when fast response and stability are required, such as in motion control
applications or systems with time delays.
The transfer function of lead Compensator is
where
15
ECE, VDIT, Haliyal
MATLAB CODE
Magnitude Response
Magnitude (dB)
%0 Second-Order System Frequency Response Example
-10
% Given System
wn = 10; % Natural Frequency
-20
zeta = 0.5; % Damping Ratio
-30
% Define Transfer Function
num-1 = wn^2;
-40
0
10 = [1 2*zeta*wn10wn^2];
den 101 102
% Calculate
-100 Frequency Response
[mag, phase] = bode(sys, w);
-150
subplot(2,1,2);
semilogx(w, phase2d);
grid on;
title('Phase Response');
xlabel('Frequency (rad/s)');
ylabel('Phase (deg)');
16
ECE, VDIT, Haliyal
EXPERIMENT: 07:
Using Suitable simulation package study of speed control of DC motor using i) Armature control ii) Field control
Objectives: 1. Students should be able to understand speed control of DC Motor using MATLAB
Tools : MATLAB
Circuit Diagram
Nature of Graph
17
ECE, VDIT, Haliyal
Theory: The direct current (DC) motor, whose speed is directly proportional to the supply voltage.
Using this established relationship between the speed and the supply voltage, this investigates the effects
of different loads and inputs on the output response of the armature-controlled direct current motor.
The aim is to establish relationship between the speed of DC motor and the load torque at different
voltages as well as investigating the performance of closed-loop systems when different voltages are
applied to the armature circuit of the motor when a constant voltage is supplied to the field circuit of
the motor. The study was carried out in two stages. The first stage involved mathematical modeling
of the system while the second stage centered on the simulation of an armature controlled direct
current motor using Simulink environment in MATLAB. The performance analysis of the modeled
system shows that usage of feedback enhances the performance of the transient response of the
armature controlled DC motor. In addition, the result obtained shows that at different input voltages, the
speed the DC motor is inversely proportional to the load torque. The performance analysis of the
modeled system shows that usage of feedback enhances the performance of the transient response of the
armature controlled DC motor. In addition, the result obtained shows that at different input voltages,
the speed the DC motor is inversely proportional to the load torque. The steady state response shows
that at different field current speed of the DC motor is directly proportional to the load torque. The
transient response shows that without any feedback the performance of the response can be improved.
Code % Speed Control of DC Motor using Armature Control and Field Control
18
ECE, VDIT, Haliyal
If = 1.5; % filed current If = Phi in Amps Ia = 15; % Max Armature current in Amps
Eb = 1; % Back EMF in Volts v = 220; % Field current If = Phi in Amps
Eb = 1; % Back EMF in Volts
8
5000
7
4000
speed of motor in rpm
6
Speed (RPM)
3000 5
2000 4
3
1000
2
0
1
-1000 0
0 50 100 150 200 250 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Armature volatge in V Filed Current in Amps
19
ECE, VDIT, Haliyal
EXPERIMENT: 08:
Using suitable simulation package, draw Root locus & Bode plot of the given transfer function
Objectives: 1. Students should be able to draw root locus and bode plot using MATLAB
Theory :Root Locus Theory: The stability of a closed loop system is determined from the
location of roots of the closed loop characteristic equation 1+G(s)H(s) = 0. For system to be
stable the roots of the characterstic equation should be located in the L.H.S of the s plane. Any
roots of the characterstic equation satisfies the following two condition:
1) |G(s)H(S)| = 1
2) /_G(S)H(s) = (2k +1)1800 where k = 0,1,2….
The root locus method of analysis is a process of of determining the points in the s plane
satisfying the above two condition. Usually the forward path gain factor K is considered as an
independent variable and the roots of 1+G(s)H(S) = 0 as dependent variables, the roots are
plotted in s plane with K as a variable parameter.
Bode Plot Theory: The Bode plot method gives a graphical procedure for determining the
stability of a control system based on sinusoidal frequency response. The transfer function for
sinusoidal input response can be obtained by substituting jw in place of Laplace operator s.
Therefore the open loop transfer function G(s)H(s) becomes G(jw)H(jw) which can be
expressed in the form of magnitude and phase angle.
Given Transfer function
20
ECE, VDIT, Haliyal
Program:
%--------------------------------------------------------------------------
% Experiment 3 - Bode plot and Root Locus
% By Siddharth Kaul
%--------------------------------------------------------------------------
%
% Find Bode plot and Root Locus of the given Trasnfer Function
%
% Given -------------------------------------------------------------------
s = tf('s');
G1 = 1/s;
G2 = 48/((s^2) + (2.4*s) + 16);
G3 = 1/(s + 20);
G4 = s+1;
% Given Transfer Function -------------------------------------------------
GivenTF = G1*G2*G3*G4;
% Bode Ploting the Trasnfer Function --------------------------------------
subplot(1,2,1);
bode(GivenTF);
grid on;
% Root Locus Plotting -----------------------------------------------------
subplot(1,2,2);
rlocus(GivenTF);
grid on;
% -------------------------------------------------------------------------
% End of Program
Output
21
ECE, VDIT, Haliyal
Result: Root locus and Bode Plot Verified
EXPERIMENT: 09:
Using suitable simulation package, obtain the time response from state model of a system
Objectives: 1. Students should be able to obtain the time response from state model of a system
Theory :
22
ECE, VDIT, Haliyal
From the state equations the state model is
23
ECE, VDIT, Haliyal
title (‘Step Response of open Loop DC position Control System’);
MATLAB PROGRAM
t = 0:0.1:15;
Td = -0.1 * (t>5 & t<10); % load disturbance
u = [ones(size(t)) ; Td]; % w_ref=1 and Td
h = lsimplot(cl_ff,u,t);
title('Setpoint tracking and disturbance rejection')
legend('cl\_ff')
% Annotate plot
line([5,5],[.2,.3]);
line([10,10],[.2,.3]);
text(7.5,.25,{'disturbance','T_d = -0.1Nm'},...
'vertic','middle','horiz','center','color','r');
Expected Output
Result: Using suitable simulation package, obtained the time response from state model of a system
24
ECE, VDIT, Haliyal
EXPERIMENT: 10,11,12:
Implementation of PI, PD Controllers
Implement a PID Controller and hence realize an Error Detector.
Demonstrate the effect of PI, PD and PID controller on the system response.
For the original problem setup and the derivation of the above equations, please refer to the
For a 1-rad/sec step reference, the design criteria are the following.
Now let's design a controller using the methods introduced in the Introduction:
PID Controller Design page. Create a new m-file and type in the following commands.
J = 0.01;
b = 0.1;
K = 0.01;
R = 1;
L = 0.5;
s = tf('s');
P_motor = K/((J*s+b)*(L*s+R)+K^2);
25
ECE, VDIT, Haliyal
Proportional control
Let's first try employing a proportional controller with a gain of 100, that is, C(s) = 100. To
determine the closed-loop transfer function, we use the feedback command. Add the
following code to the end of your m-file.
Kp = 100;
C = pid(Kp);
sys_cl = feedback(C*P_motor,1);
Now let's examine the closed-loop step response. Add the following commands to the end of
your m-file and run it in the command window. You should generate the plot shown below.
You can view some of the system's characteristics by right-clicking on the figure and
choosing Characteristics from the resulting menu. In the figure below, annotations have
specifically been added for Settling Time, Peak Response, and Steady State.
t = 0:0.01:5;
step(sys_cl,t)
grid
title('Step Response with Proportional Control')
From the plot above we see that both the steady-state error and the overshoot are too large.
Recall from the Introduction: PID Controller Design page that increasing the proportional
gain will reduce the steady-state error. However, also recall that increasing often
results in increased overshoot, therefore, it appears that not all of the design requirements
can be met with a simple proportional controller.
PID control
Recall from the Introduction: PID Controller Design page, adding an integral term will
eliminate the steady-state error to a step reference and a derivative term will often reduce the
overshoot. Let's try a PID controller with small and . Modify your m-file so that the
lines defining your control are as follows. Running this new m-file gives you the plot shown
below.
26
ECE, VDIT, Haliyal
Kp = 75;
Ki = 1;
Kd = 1;
C = pid(Kp,Ki,Kd);
sys_cl = feedback(C*P_motor,1);
step(sys_cl,[0:1:200])
title('PID Control with Small Ki and Small Kd')
As expected, the steady-state error is now eliminated much more quickly than before.
However, the large has greatly increased the overshoot. Let's increase in an attempt to
reduce the overshoot. Go back to the m-file and change to 10 as shown in the following.
Rerun your m-file and the plot shown below should be generated.
Kp = 100;
Ki = 200;
Kd = 10;
C = pid(Kp,Ki,Kd);
sys_cl = feedback(C*P_motor,1);
step(sys_cl, 0:0.01:4)
grid
title('PID Control with Large Ki and Large Kd')
As we had hoped, the increased reduced the resulting overshoot. Now we know that if we
use a PID controller with = 100, = 200, and = 10, all of our design requirements will
be satisfied.
Result : PID controller verified
27
ECE, VDIT, Haliyal
Virtual Labs
28
ECE, VDIT, Haliyal
link of experiment : https://asnm-iitkgp.vlabs.ac.in/List%20of%20experiments.html
29
ECE, VDIT, Haliyal
Procedure
1) Keep all the resistance close to their maximum respective values.
2) Close the switch S1 to "aa" and S2 to "cc" positions. Observe the load current (IL) and voltage
(VL) readings. The load resistance
3) Remove the load by opening the switch S2 and read the open circuit voltage (or Thevenin
equivalent voltage) Vth.
4) Next, compute the resistance (RTH) of the network as seen from the load terminals
a) Replace the 220 V source by a short by closing S1 to "bb".
b) Apply 110 V at the output terminals by closing S2 to "dd". Read the voltmeter (V) and
ammeter (I) and get
30
ECE, VDIT, Haliyal
Link: https://asnm-iitkgp.vlabs.ac.in/exp/verification-thevenin-theorem/theory.html
31
ECE, VDIT, Haliyal