0% found this document useful (0 votes)
253 views

EE-391 Manual 02

This document describes experiments on analyzing the transient response of resistor-inductor (R-L) and resistor-capacitor (R-C) circuits using MATLAB simulation and hardware. It provides the theoretical background, circuit diagrams, MATLAB simulink models, simulation outputs and procedures for hardware implementation. The objectives are to determine the transient response of R-L and R-C networks and verify the theoretical predictions experimentally. Simulations and hardware results for both cases are presented and analyzed to understand the transient behavior.

Uploaded by

Deb Kumar Sarkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
253 views

EE-391 Manual 02

This document describes experiments on analyzing the transient response of resistor-inductor (R-L) and resistor-capacitor (R-C) circuits using MATLAB simulation and hardware. It provides the theoretical background, circuit diagrams, MATLAB simulink models, simulation outputs and procedures for hardware implementation. The objectives are to determine the transient response of R-L and R-C networks and verify the theoretical predictions experimentally. Simulations and hardware results for both cases are presented and analyzed to understand the transient behavior.

Uploaded by

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

ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Laboratory Manual
of
ELECTRIC CIRCUIT THEORY
LABORATORY
(Code:- EE-391)

Electrical Engineering Department


Dr. Sudhir Chandra Sur Degree Engineering
College
Dum Dum, Kolkata

1|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

List of Experiments Offered

Exp. No. Name of the experiment Pg. No.

EE-391/1 Transient response of R-L and R-C network: simulation 3


with Simulation /Hardware
EE-391/2 Transient response of R-L-C series and parallel circuit: 9
Simulation with Simulation/ Hardware

EE-391/3 Determination of Impedance (Z) and Admittance (Y) 15


parameter of two port network: Simulation /
Hardware.
EE-391/4 Frequency response of LP and HP filters: Simulation / 21
Hardware.

EE-391/5 Frequency response of BP and BR filters: Simulation 27


/Hardware.
EE-391/6 Generation of Periodic, Exponential, Sinusoidal, Damped 34
Sinusoidal, Step, Impulse, Ramp signal using MATLAB
in both discrete and analog form.
EE-391/7 Determination of Laplace transform and Inverse Laplace 41
transform using MATLAB.

EE-391/8 Amplitude and Phase spectrum analysis of different 47


signals using MATLAB.

EE-391/9 Verification of Network theorem 51

EE-391/10 Characteristics of Series & Parallel Resonant circuits 55

EE-391/11 Representation of Poles and Zeros in s-plane, 64


determination of partial fraction expansion in s-domain
and cascade connection of second-order systems using
MATLAB

2|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Experiment No: EE-391/1


TITLE :- Transient response of R-L and R-C network: Simulation/ Hardware.

OBJECTIVE:- To determine the transient response of R-L and R-C network.

THEORY:
Transient response of R-L network:
A LR Series Circuit consists basically of an inductor of inductance L connected in series with a resistor of
resistance R. The resistance R is the DC resistive value of the wire turns or loops that goes into making up the
inductors coil. Consider the LR series circuit in fig 3.1.
The LR series circuit is connected across a constant voltage source, (the battery) and a switch. Assume that
the switch, S is open until it is closed at a time t = 0, and then remains permanently closed producing a “step
response” type voltage input. The current, i begins to flow through the circuit but does not rise rapidly to its
maximum value of Imax as determined by the ratio of V / R (Ohms Law).
This limiting factor is due to the presence of the self-induced emf within the inductor as a result of the growth
of magnetic flux, (Lenz’s Law). After a time the voltage source neutralizes the effect of the self-induced emf,
the current flow becomes constant and the induced current and field are reduced to zero.
We can use Kirchhoff’s Voltage Law, (KVL) to define the individual voltage drops that exist around the
circuit and then hopefully use it to give us an expression for the flow of current.

Kirchhoff’s voltage law (KVL) gives us:


V ( t ) −(V ¿ ¿ R+V L )=0 ¿ (1.1)

The voltage drop across the resistor, R is IR (Ohms Law).


V R=I × R (1.2)

The voltage drop across the inductor, L is by now our familiar expression Ldi/dt
di
V L=L (1.3)
dt

Then the final expression for the individual voltage drops around the LR series circuit can be given as:
di
V ( t ) =I × R+ L (1.4)
dt

We can see that the voltage drop across the resistor depends upon the current, i, while the voltage drop across
the inductor depends upon the rate of change of the current, di/dt. When the current is equal to zero, ( i = 0 ) at
time t = 0 the above expression, which is also a first order differential equation, can be rewritten to give the

3|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
value of the current at any instant of time as:

Expression for the Current in an LR Series Circuit:

−Rt
V
I ( t )= ( 1−e L
) (1.5)
R

Where,
V is in Volts
R is in Ohms
L is in Henry’s
t is in Seconds
e is the base of the Natural Logarithm = 2.71828
The Time Constant, ( τ ) of the LR series circuit is given as L/R and in which V/R represents the final steady
state current value after five time constant values. Once the current reaches this maximum steady state value
at 5τ, the inductance of the coil has reduced to zero acting more like a short circuit and effectively removing it
from the circuit.
Therefore, the current flowing through the coil is limited only by the resistive element in ohms of the coils
windings. A graphical representation of the current growth representing the voltage/time characteristics of the
circuit can be presented as shown in fig. 3.2.

Transient Curves for an LR Series Circuit:

Fig. 1.2 Transient Curves for an LR Series Circuit

The time required for the current flowing in the LR series circuit to reach its maximum steady state value is
equivalent to about 5 time constants or 5τ. This time constant τ, is measured by τ = L/R, in seconds, were R is
the value of the resistor in ohms and L is the value of the inductor in Henry’s. This then forms the basis of an
RL charging circuit were 5τ can also be thought of as “5 x L/R” or the transient time of the circuit.

4|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Transient response of R-C network:


Applying Kirchhoff's laws in fig 3.3, it can be shown that the charging voltage V C (t) across the capacitor is
given by:

(
V C ( t ) =V 1−e
( −tRC )) for t ≥0 (1.6)

where, V is the applied source voltage to the circuit at time t = 0. The product RC is the time constant. The
response curve is increasing and is shown in fig. 1.4.

Fig. 3.4. Capacitor charging for Series RC circuit to a step input with time axis normalized by t

The discharge voltage for the capacitor is given by:


−t

V C ( t ) =V O
( RC )
( e ) for t ≥ 0 (1.7)

where, Vo is the initial voltage stored in capacitor at t = 0. The product RC is often referred to the so called
time constant, τ. The response curve is a decaying exponential as shown in fig. 1.5.

Fig. 1.5. Capacitor Discharging for Series RC circuit

5|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

CIRCUIT DIAGRAM:

Fig. 1.1 RL Series Circuit

Fig. 1.3 RC Series Circuit

MATLAB SIMULINK MODEL:

Fig. 1.6 RL Series Circuit in MATLAB Simulink

6|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 1.7 RC Series Circuit in MATLAB simulink

SIMULATION OUTPUT:
Values of resistance=10 ohm; inductance=0.1 H; capacitance= 0.001F; input voltage amplitude=100V;
frequency=10Hz. The output for both the cases of the Scope 4 in the Simulink models are shown below in fig.
1.8 & 1.9:

Fig. 1.8. Output of the Scope 4 in the Simulink model of fig. 1.6 for RL network
7|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 1.9. Output of the Scope 4 in the Simulink model of fig. 1.7 for RC network

HARDWARE PROCEDURE:
a) Connect the circuit according to fig. 3.1 & 3.3 & switch ‘ON’ the Supply.
b) Feed square wave from function generator to the I/P terminal of the circuit
c) Connect the CRO to the O/P terminal & note down the O/P wave.
d) Draw the I/P & O/P wave on the graph paper.

APPRATUS TABLE:
S. NO EQUIPMENT NAME QUANTITY RANGE/RATING MANUFACTURER

RESULT/CONCLUSIONS:
Transient response of RL circuit has been studied and the results obtained are shown on the graph.

QUESTIONS:
1. Define steady state and transient state.
2. What is time constant of series R-L circuit?
3. What is the time required for the current flowing in the RC series circuit to reach its maximum steady
state value?

8|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Experiment No: EE-391/2


TITLE :- Transient response of R-L-C series and parallel circuit: Simulation with
Simulation/ Hardware

OBJECTIVE:- To determine the transient response of R-L-C series and parallel circuit: Simulation with
Simulation/ Hardware

THEORY:
Series RLC circuit:
The circuit shown on fig. 2.1 is called the series RLC circuit. We will analyze this circuit in order to
determine its transient characteristics once the switch S is closed.
The equation that describes the response of the system is obtained by applying KVL around the mesh

V R +V L +V C =V S (2.1)

The current flowing in the circuit is


d VC
i=C (2.2)
dt

And thus the voltages V R and V L are given by

dV C
V R=iR=RC (2.3)
dt

di d2 V C
V L=L =LC 2
(2.4)
dt dt

Substituting Equations (2.3) and (2.4) into Equation (2.1) we obtain

d2V C R d V C 1 1
+ + V C= V (2.5)
dt 2
L dt LC LC S

The solution to equation (2.5) is the linear combination of the homogeneous and the particular solution
V C =V Cp +V Ch
The particular solution is

9|Page
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
V Cp =V S (2.6)

And the homogeneous solution satisfies the equation


d 2 V Ch R d V Ch 1 1
2
+ + V Ch= VS (2.7)
dt L dt LC LC

Parallel RLC Circuit:


The RLC circuit shown on fig. 2.2 is called the parallel RLC circuit. By applying KCL at the indicated node
we obtain
I s=i R +i L +i C (2.8)
The voltage across the elements is given by
d iL
v=L (2.9)
dt
And the currents i R and i Care
v L d iL
iR = = (2.10)
R R dt

dv d2 i L
i C =C =LC 2 (2.11)
dt dt

Combining Equations (2.8), (2.10), and (2.11) we obtain

d 2 iL 1 d iL 1 1
2
+ + i L= I (2.12)
d t RC dt LC LC s

The solution to equation (2.12) is a superposition of the particular and the homogeneous solutions.
i L (t)=i Lp (t)+i Lh (t) (2.13)
The particular solution is
i Lp ( t )=I s (2.14)

The homogeneous solution satisfies the equation

d 2 i Lh 1 d i Lh 1
+ + i Lh =0 (2.15)
d t 2 RC dt LC

10 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

CIRCUIT DIAGRAM:

Fig. 2.1 R-L-C series circuit

Fig. 2.2 R-L-C parallel circuit

MATLAB SIMULINK MODEL:

Fig. 2.3 RLC Series Circuit in MATLAB Simulink

11 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 2.4 RLC Parallel Circuit in MATLAB Simulink

SIMULATION OUTPUT:
Values of resistance=10 ohm; inductance=0.05H; capacitance=0.0001F for series and 0.1F for parallel (with
0.1 ohm of series resistance); input voltage amplitude=100V; frequency=10Hz. The output for both the cases
of the Scope 3 in the Simulink models are shown below in fig. 2.5 & 2.6:

12 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 2.5. Output of the Scope 3 in the Simulink model of fig. 2.3 for RL network

Fig. 2.6. Output of the Scope 3 in the Simulink model of fig. 2.4 for RL network

13 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
HARDWARE PROCEDURE:
a)Connect the circuit according to fig. 2.1 & 2.2 & switch ‘ON’ the Supply.
b)Feed square wave from function generator to the I/P terminal of the circuit
c)Connect the CRO to the O/P terminal & note down the O/P wave.
d)Draw the I/P & O/P wave on the graph paper.

APPRATUS TABLE:
S. NO EQUIPMENT NAME QUANTITY RANGE/RATING MANUFACTURER

RESULT/CONCLUSIONS:
Transient response of RL circuit has been studied and the results obtained are shown on the graph.

QUESTIONS:
1. What are the particular and the homogeneous solutions of RLC series circuit?
2. Derive the equation of current in R-L-C circuit.

14 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Experiment No: EE-391/3


TITLE :- Determination of Impedance (Z) and Admittance (Y) parameter of two port
network: Simulation/Hardware.

OBJECTIVE:- To determine the Impedance (Z) and Admittance (Y) parameter of two port network:
Simulation/Hardware.

THEORY:
In Z parameters of a two-port , the input & output voltages V 1 & V2 can be expressed in terms of input & output
currents I1 & I 2. Out of four variables ( i.e V1 ,V2 , I1 , I2 )
V1& V2 are dependent variables whereas I1 & I2 are independent variables .Thus ,
V1 = Z11I1+ Z12 I2 (3.1)

V2 = Z21I1 + Z22 I2 (3.2)

Here Z11 & Z22 are the input & output driving point impedances while Z12 & Z21 are the reverse &
forward transfer impedances.
Z-parameters are obtained by making either terminals 11’ open circuited or terminals 22’ open circuited.
V
∴ Z 11 = 1 , when I 2=0(3.3)
I1
is called the input impedance or driving point impedance with output open circuited.
V2
∴ Z 21= , when I 2=0 (3.4)
I1
is called the forward transfer impedance with output open circuited.
V
∴ Z 12= 1 , when I 1=0 (3.5)
I2
is called the reverse transfer impedance with output open circuited.
V2
∴ Z 22= , when I 1=0 (3.6)
I2
is called the output impedance with input open circuited.

In Y parameters of a two -port , the input & output currents I 1 & I2 can be expressed in terms of input &
output voltages V1 & V2 . Out of four variables (i.e I1 , I2 , V1 , V2) I1 & I 2 are dependent variables
whereas V1 & V2 are independent variables.

I1 = Y11V1 + Y12V2 (3.7)

I2 = Y21V1 + Y22V2 (3.8)

15 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Here Y11 & Y22 are the input & output driving point admittances while Y12 & Y21 are the reverse &
forward transfer admittances.

Y-parameters are obtained by making either terminals 11’ short circuited or terminals 22’ short circuited.
I
∴ Y 11= 1 , when V 2=0(3.9)
V1
is called the input admittance or driving point admittance with output short circuited.
I2
∴ Y 21= , whenV 2=0 (3.10)
V1
is called the forward transfer admittance with output short circuited.
I
∴ Y 12= 1 , whenV 1=0 (3.11)
V2
is called the reverse transfer admittance with input short circuited.
I
∴ Y 22= 2 , whenV 1=0 (3.12)
V2
is called the output admittance with input short circuited.

CIRCUIT DIAGRAM:

Fig. 3.1 Circuit diagram of a two-port network

MATLAB SIMULINK MODEL:

16 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 3.2 Simulink model of a two-port network

PROCEDURE FOR SIMULINK MODEL:


Z-parameters:
Step 1: Finding Z11

Fig. 3.3 Simulink model for finding Z11

Step 2: Finding Z21

17 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 3.4 Simulink model for finding Z21


Step 3: Finding Z12

Fig. 3.5 Simulink model for finding Z12

Step 4: Finding Z22

Fig. 3.6 Simulink model for finding Z22

Y-parameters:

18 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Step 1: Finding Y 11

Fig. 3.7 Simulink model for finding Y 11

Step 2: Finding Y 21

Fig. 3.8 Simulink model for finding Y 21

Step 3: Finding Y 12

Fig. 3.9 Simulink model for finding Y 12

Step 4: Finding Y 22

19 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 3.10 Simulink model for finding Y 22

OBSERVATION TABLE:
PARAMETRS V1 I1 V2 I2 MEASURED CALCULATED ERROR
RESISTANCE RESISTANCEVALUE
VALUE

Z11

Z12

Z21

Z22

Y11

Y12

Y21

Y22

CALCULATION:
RESULT/CONCLUSIONS:
The impedance and admittance parameters are determined using MATLAB.

QUESTIONS:
1. How to calculate Y-parameters from Z-parameters?
2. What are ABCD parameters?

Experiment No: EE-391/4


20 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

TITLE :- Frequency response of LP and HP filters: Simulation / Hardware.

OBJECTIVE:- To determine the Frequency response of LP and HP filters: Simulation / Hardware.

THEORY:
Low Pass Filter:
A low-pass filter (LPF) is a filter that passes signals with a frequency lower than a certain cutoff frequency
and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the
filter depends on the filter design. The filter is sometimes called a high-cut filter, or treble-cut filter in audio
applications. A low-pass filter is the complement of a high-pass filter.

Low-pass filters exist in many different forms, including electronic circuits such as a hiss filter used in audio,
anti-aliasing filters for conditioning signals prior to analog-to-digital conversion, digital filters for smoothing
sets of data, acoustic barriers, blurring of images, and so on. The moving average operation used in fields
such as finance is a particular kind of low-pass filter, and can be analyzed with the same signal processing
techniques as are used for other low-pass filters. Low-pass filters provide a smoother form of a signal,
removing the short-term fluctuations and leaving the longer-term trend.

Filter designers will often use the low-pass form as a prototype filter. That is, a filter with unity bandwidth
and impedance. The desired filter is obtained from the prototype by scaling for the desired bandwidth and
impedance and transforming into the desired bandform (that is low-pass, high-pass, band-pass or band-stop).

Fig. 4.1 Low-pass Filter

In low pass filter, input voltage Vin is given at the non-inverting terminal of an OP-AMP through R-C
network. That is why it is all R-C network filter. The equivalent resistance R 1 & Rf (where R1=Rf) is
connected to the non-inverting terminal, where Rf is called feedback resistance of the low pass filter.

21 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Applying KCL at node 1,
V 1−0 V 1 −V 0
+ =0
R1 Rf
Rf
¿ , V 0=V 1 1+ ( ) R1
(4.1)

Applying KCL at node 2,


V 2−V i V 2−0
+ =0
R 1
CS
V2 V2 Vi
¿, + =
R 1 R
CS
1+ RCs V i
¿,V2 ( R
=
R )
¿ , V i=V 2 ( 1+ RCs ) (4.2)
From the characteristics of an OP-AMP we know that the input resistance of an OP-AMP is infinite. So, the
current flowing through the OP-AMP=0, so we can write V 1−V 2 =0.
∴ V 1−V 2=0
From (4.2), V i=V 2 ( 1+ RCS )
∴ Overall gain of the low-pass filter is,
Rf R
1+1+ f
VO R1 R1
= =
V i 1+ RCs 1+ j 2 πfRC
1
For R-C network, cut-off frequency f C =
2 πRC
VO AF
∴ =
Vi f
1+ j
fC

Rf
where, A F =1+ =¿ feedback gain of the low-pass filter.
R1
VO
∴ Magnitude of is,
Vi
VO AF
| |
Vi
=
f 2
= A cl=¿
overall closed loop gain of the low-pass filter.
√ 1+
( )
fC

22 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

High Pass Filter:


A high-pass filter (HPF) is an electronic filter that passes signals with a frequency higher than a certain cutoff
frequency and attenuates signals with frequencies lower than the cutoff frequency. The amount of attenuation
for each frequency depends on the filter design. A high-pass filter is usually modeled as a linear time-
invariant system. It is sometimes called a low-cut filter or bass-cut filter. High-pass filters have many uses,
such as blocking DC from circuitry sensitive to non-zero average voltages or radio frequency devices. They
can also be

used in conjunction with a low-pass filter to produce a bandpass filter.


The simple first-order electronic high-pass filter shown in fig. 4.1 is implemented by placing an input voltage
across the series combination of a capacitor and a resistor and using the voltage across the resistor as an
output. The product of the resistance and capacitance (R×C) is the time constant (τ); it is inversely
proportional to the cutoff frequency fc, that is,
1 1
f c= = (4.1)
2 πτ 2 RC
where fc is in hertz, τ is in seconds, R is in Ohms, and C is in Farads.
Fig. 4.2 shows an active electronic implementation of a first-order high-pass filter using an operational
amplifier. In this case, the filter has a passband gain of -R2/R1 and has a cutoff frequency of
1 1
f c= = (4.1)
2 πτ 2 R 1C
Because this filter is active, it may have non-unity passband gain. That is, high-frequency signals are inverted
and amplified by R2/R1.

Fig. 4.2 High-pass Filter


For R-C network, i.e. high pass filter,

23 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
f
AF ×
VO fC
| |
Vi
=
f 2

√ 1+
( )
fC

MATLAB CODE:

Low-pass filter:
%low-pass filter
clear
clc

f=0:1:10^6;
r1=10000;
rf=10000;
r=15900;
c=0.01*10^-6;
af=(1+rf/r1);
fc=1/(2*pi*r*c);
a=f/fc;
acl_lp=af./sqrt(1+(a.*a));
semilogx(acl_lp)
grid on
xlabel('Frequency')
ylabel('Gain')
title('Frequency response of Low Pass filters')

%Design a lowpass FIR filter for data sampled at 48 kHz. The passband-edge frequency is 8 kHz. The
passband ripple is 0.01 dB and the stopband attenuation is 80 dB. Constrain the filter order to 120.
N = 120;
Fs = 48e3;
Fp = 8e3;
Ap = 0.01;
Ast = 80;

%Obtain the maximum deviation for the passband and stopband ripples in linear units.
24 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Rp = (10^(Ap/20) - 1)/(10^(Ap/20) + 1);
Rst = 10^(-Ast/20);

%Design the filter using firceqrip and view the magnitude frequency response.
NUM = firceqrip(N,Fp/(Fs/2),[Rp Rst],'passedge');
fvtool(NUM,'Fs',Fs)

%The resulting stopband-edge frequency is about 9.64 kHz.

Output:

Fig. 4.3 Frequency response Low-pass Filter

High-pass filter:
%high-pass filter
clear
clc
f=0:1:10^6;
r1=10000;
rf=10000;
r=15900;
c=0.01*10^-6;
af=(1+rf/r1);
fc=1/(2*pi*r*c);
a=f/fc;

25 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
acl_hp=(af.*a)./sqrt(1+(a.*a));
semilogx(acl_hp)
grid on
xlabel('Frequency')
ylabel('Gain')
title('Frequency response of High Pass filters')

Output:

Fig. 4.4 Frequency response High-pass Filter

CONCLUSION:

QUESTIONS:
1. What is a high-pass filter?
2. What is the overall gain of a low-pass filter?
3. What is the function of a capacitor in a low-pass filter?

26 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Experiment No: EE-391/5


TITLE :- Frequency response of BP and BR filters: Simulation / Hardware.

OBJECTIVE:- To determine the Frequency response of BP and BR filters: Simulation / Hardware.

THEORY:

Band Pass filter:


A band-pass filter or BPF, is a device that passes frequencies within a certain range and rejects (attenuates)
frequencies outside that range. Unlike the low pass filter which only pass signals of a low frequency range or
the high pass filter which pass signals of a higher frequency range, a Band Pass Filters passes signals within a
certain “band” or “spread” of frequencies without distorting the input signal or introducing extra noise. This
band of frequencies can be any width and is commonly known as the filters Bandwidth. Bandwidth is
commonly defined as the frequency range that exists between two specified frequency cut-off points (ƒ c), that
are 3dB below the maximum centre or resonant peak while attenuating or weakening the others outside of
these two points.

Then for widely spread frequencies, we can simply define the term “bandwidth”, BW as being the difference
between the lower cut-off frequency (ƒcLOWER) and the higher cut-off frequency (ƒcHIGHER) points. In other
words, BW = ƒH – ƒL. Clearly for a pass band filter to function correctly, the cut-off frequency of the low pass
filter must be higher than the cut-off frequency for the high pass filter.

The “ideal” Band Pass Filter can also be used to isolate or filter out certain frequencies that lie within a
particular band of frequencies, for example, noise cancellation. Band pass filters are known generally as
second-order filters, (two-pole) because they have “two” reactive component, the capacitors, within their
circuit design. One capacitor in the low pass circuit and another capacitor in the high pass circuit.

Fig. 5.1 Band Pass Filter Circuit

27 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 5.2 Frequency Response of a 2nd Order Band Pass Filter

The upper and lower cut-off frequency points for a band pass filter can be found using the same formula as
that for both the low and high pass filters.
1
f c= Hz (5.1)
2 πRC
Then clearly, the width of the pass band of the filter can be controlled by the positioning of the two cut-off
frequency points of the two filters.

Band Rejection filter:

A Band- rejection filter or band-stop filter is a filter that passes most frequencies unaltered, but attenuates
those in a specific range to very low levels. It is the opposite of a band-pass filter. A notch filter is a band-stop
filter with a narrow stopband (high Q factor).

If this stop band is very narrow and highly attenuated over a few hertz, then the band stop filter is more
commonly referred to as a notch filter, as its frequency response shows that of a deep notch with high
selectivity (a steep-side curve) rather than a flattened wider band. Also, just like the band pass filter, the band
stop (band reject or notch) filter is a second-order (two-pole) filter having two cut-off frequencies, commonly
known as the -3dB or half-power points producing a wide stop band bandwidth between these two -3dB
points.

Then the function of a band stop filter is too pass all those frequencies from zero (DC) up to its first (lower)
cut-off frequency point ƒL, and pass all those frequencies above its second (upper) cut-off frequency ƒ H, but
block or reject all those frequencies in-between. Then the filters bandwidth, BW is defined as: (ƒH – ƒL).

So for a wide-band band stop filter, the filters actual stop band lies between its lower and upper -3dB points as
it attenuates, or rejects any frequency between these two cut-off frequencies.

28 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 5.3 Band Pass Filter Circuit

Fig. 5.4 Frequency Response of a 2nd Order Band Pass Filter

MATLAB CODE:

Band-pass filter:
clear
clc

%Filter a discrete-time signal with a bandpass filter. The signal is a sum of three discrete-time sinusoids, π/8,
π/2, and 3π/4 rad/sample.
n = 0:159;
29 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
x = cos(pi/8*n)+cos(pi/2*n)+sin(3*pi/4*n);

%Design an FIR equiripple bandpass filter to remove the lowest and highest discrete-time sinusoids. View the
frequency response of the filter.
d = fdesign.bandpass('Fst1,Fp1,Fp2,Fst2,Ast1,Ap,Ast2', ...
1/4,3/8,5/8,6/8,60,1,60);
Hd = design(d,'equiripple');

%Apply the filter to the discrete-time signal. Plot the original and filtered signals in the frequency domain.
y = filter(Hd,x);
freq = 0:(2*pi)/length(x):pi;
xdft = fft(x);
ydft = fft(y);

plot(freq/pi,abs(xdft(1:length(x)/2+1)))
hold on
plot(freq/pi,abs(ydft(1:length(x)/2+1)))
hold off
xlabel('Normalized Frequency (\times\pi rad/sample)')
legend('Original Signal','Bandpass Signal')

%Design a constrained-band FIR equiripple filter of order 100 with a passband of [1, 1.4] kHz. Both stopband
attenuation values are constrained to 60 dB. The sample rate is 10 kHz.
d = fdesign.bandpass('N,Fst1,Fp1,Fp2,Fst2,C',100,800,1e3,1.4e3,1.6e3,1e4);
d.Stopband1Constrained = true;
d.Astop1 = 60;
d.Stopband2Constrained = true;
d.Astop2 = 60;

Hd = design(d,'equiripple');
fvtool(Hd)

30 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Output:

Fig. 5.5 Magnitude response of the Band Pass Filter

Fig. 5.6 Frequency response of the Band Pass Filter

Band-rejection filter:

clear
clc

%Design an FIR equiripple filter and view its magnitude response


d = fdesign.bandstop('Fp1,Fst1,Fst2,Fp2,Ap1,Ast,Ap2', ...
2/8,3/8,5/8,6/8,1,60,1);
Hd = design(d,'equiripple');

fvtool(Hd)

31 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
n = 0:99;
x = cos(pi/5*n)+sin(pi/2*n)+cos(4*pi/5*n);
y = filter(Hd,x);

%Plot the original and filtered signals in the frequency domain.


xdft = fft(x);
ydft = fft(y);
freq = 0:(2*pi)/length(x):pi;

plot(freq/pi,abs(xdft(1:length(x)/2+1)))
hold on
plot(freq/pi,abs(ydft(1:length(y)/2+1)),'r','linewidth',2)
hold off
xlabel('Normalized Frequency (\times\pi rad/sample)')
ylabel('Magnitude')
legend('Original Signal','Bandstop Signal')

Output:

Fig. 5.7 Magnitude response of the Band Rejection Filter

32 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 5.8 Frequency response of the Band Rejection Filter

COLCLUSION:

QUESTIONS:
1. What is a band-pass filter?

2. How can you design a band-pass filter?

3. Define band-stop filter.

33 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Experiment No: EE-391/6

TITLE :- Generation of Periodic, Exponential, Sinusoidal, Damped Sinusoidal, Step,


Impulse, Ramp signal using MATLAB.
OBJECTIVE:- To generation of Periodic, Exponential, Sinusoidal, Damped Sinusoidal, Step, Impulse,
Ramp signal using MATLAB in both discrete and analog form.
THEORY:
Periodic waveform: A periodic waveform is one which repeats the exact same shape again and again. It does
not change, so both its shape and its harmonic content stay the same for the waveform's whole duration.
Examples: sinusoidal wave, cosine wave, square wave, etc.

Exponential function: An exponential function is a function of the form f(x)¿ b x , in which the argument x
occurs as an exponent. A function of the form f(x)¿ b x+c , where c is a constant, is also considered an
exponential function and can be rewritten as f(x)¿ ab x , witha=bc .

Fig. 6.1 Exponential wave

Sinusoidal wave: A sine wave or sinusoid is a mathematical curve that describes a smooth periodic
oscillation. A sine wave is a continuous wave. It is named after the function sine, of which it is the graph. It
occurs often in pure and applied mathematics, as well as physics, engineering, signal processing and many
other fields. Its most basic form as a function of time (t) is:
y(t) = A sin( ¿ ωt+ φ)¿
where,
A = the amplitude, the peak deviation of the function from zero.
f = the ordinary frequency, the number of oscillations (cycles) that occur each second of time.
ω=2 πf , the angular frequency, the rate of change of the function argument in units of radians per second.
φ=¿the phase, specifies (in radians) where in its cycle the oscillation is at t = 0.

34 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Damped Sinusoidal: Sine waves describe many oscillating phenomena. When the wave is damped, each
successive peak decreases as time goes on.
A true sine wave starting at time = 0 begins at the origin (amplitude = 0). The term "damped sine wave"

describes all such damped waveforms, whatever their initial phase value.
The most common form of damping, and that usually assumed, is exponential damping, in which the outer
envelope of the successive peaks is an exponential decay curve.
The general equation for an exponentially damped sinusoid may be represented as:
y(t) = A.e−λ t . sin( ¿ ωt+ φ)¿
where,
λ= attenuation factor

Fig. 6.2 Damped sine wave

Step signal: The unit step (Heavyside) function models the behavior of a switch (off/on). The unit step
function can describe sudden changes in current or voltage in a circuit. The unit step function looks like, well,
a step. Practical step functions occur daily, like each time you turn mobile devices, stereos, and lights on and
off.
Here’s the general definition of the unit step function:

u ( t )= 0 , t< 0
{ 1,t ≥0

35 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Fig. 6.3 Step signal

So this step function is equal to 0 when time t is negative and is equal to 1 when time t is 0 or positive.
Alternatively, you can say there’s a jump in the function value at time t = 0.

Impulse signal: In signal processing, the impulse response, or impulse response function (IRF), of a dynamic
system is its output when presented with a brief input signal, called an impulse. More generally, an impulse
response is the reaction of any dynamic system in response to some external change.

δ ( t )= 0 , t=0
{ 1 ,t ≠ 0

Fig. 6.4 Impulse signal

Ramp signal: The ramp function is a unary real function, whose graph is shaped like a ramp. It can be
expressed by numerous definitions, for example "0 for negative inputs, output equals input for non-negative
inputs". The term "ramp" can also be used for other functions obtained by scaling and shifting, and the
function in this article is the unit ramp function (slope 1, starting at 0).

r ( t )= t ,t ≥0
{ 0 ,t <0

Fig. 6.5 Ramp signal

36 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
SOFTWARE USED: MATLAB

MATLAB CODE:
Periodic wave:

% Square wave
x=0:0.01:100;
y=square(x);
plot(x,y)
axis([0 100 0 2])
xlabel('Time')
ylabel('Amplitude')
title(‘Square wave')

Output:

Fig. 6.6 Output of the periodic wave program code

Exponential wave:

% exponential wave
x=0:0.01:5;
y=exp(x);
plot(x,y)
xlabel('Time')
ylabel('Amplitude')
title(‘Exponential wave')
grid on

Output:

37 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 6.7 Output of the exponential wave program code

Sine wave:

% sine wave
x=0:pi/100:2*pi;
y=sin(x);
plot(x,y)
xlabel('Time')
ylabel('Amplitude')
title(‘Sine wave')
grid on

Output:

Fig. 6.8 Output of the sine wave program code

38 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Damped sine wave:

% damped sine wave


t=0:0.01:10;
a=input('Enter the amplitude=');
f=input('Enter the frequency=');
at=input('Enter the attenuation factor=');
y=(a*sin(2*pi*f*t)).*exp(-at*t);
plot(t,y)
xlabel('Time')
ylabel('Amplitude')
title('Damped sine wave')
grid on

Output:
Enter the amplitude=10
Enter the frequency=5
Enter the attenuation factor=2

Fig. 6.9 Output of the damped sine wave program code

Step signal:

% step signal
t = -1:0.01:1;
unitstep = t>=0;
plot(t,unitstep)
axis([-1 1 0 2])

Output:

39 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 6.10 Output of the step signal program code

Impulse signal:

% impulse signal
t = -1:0.01:1;
impulse = t==0;
plot(t,impulse)

Output:

Fig. 6.11 Output of the exponential signal program code

Ramp signal:

% ramp signal
t = -1:0.01:1;
unitstep = t>=0;
ramp = t.*unitstep;
plot(t,ramp)

Output:

40 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 6.12 Output of the ramp signal program code

To plot the graph in discrete form just add the following line at the end:

stem(y)

QUESTIONS:
1. What is periodic wave form?
2. What is attenuation factor?
3. What is the difference between sine and cosine waveform?

Experiment No: EE-391/7


41 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

TITLE :- Determination of Laplace Transform, different time domain functions, and


Inverse Laplace Transformation using MATLAB.
OBJECTIVE:- To determine the Laplace Transform, different time domain functions, and Inverse
Laplace
Transformation using MATLAB.

THEORY:
Let f(t) be a given function which is defined for all positive values of t, if
F(s) = e-st f(t) dt
exists, then F(s) is called Laplace transform of f(t) and is denoted by
L{f(t)} = F(s) = e-st f(t) dt
The inverse transform, or inverse of L{f(t)} or F(s), is
f(t) = L-1{F(s)}
where s is real or complex value.

[Example 1]
L{1} = ; L{ eat } =
L{ cos t } = e-st cos t dt
=
=
(Note that s  0, otherwise e-st | diverges
t=
L{ sin t } = e-st sin t dt (integration by parts)
= + e-st cos t dt
= e-st cos t dt
= L{ cos t } =
Note that
L{ cos t } = e-st cos t dt (integration by parts)
= - e-st sin t dt
=  L{ sin t }
 L{ sin t } = L{ cos t } =  L{ sin t }
 L{ sin t } =
L{ tn } = tn e-st dt ( let t = z/s, dt = dz/s )
-z n -z
= e = z e dz
= ( Recall (x) = e-t tx-1 dt )
If n = 1, 2, 3, . . . (n+1) = n!

[Example 2] y'' + 2 y' + 5 y= f(t), y(0) = y'(0) = 0


where f(t) = u(t)  2 u(t) + 2 u(t2)  2 u(t3) + . . .
[Solution]
The Laplace transform of the square wave f(t) is
L{ f(t) } = (derived previously)
 2 -
s +2s +5 =
- -

or -
=
Now
= =

42 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

1 1  s  1  1 2 
  
5  s  s  1  22 2  s  1  22 
2 2

=
and = (1  e-s) (1  e-s + e-2s  e-3s + . . . )
= 1  2 e-s + 2 e-2s  2 e-3s + . . . (derived previously)
 -
=
The inverse Laplace transform of - can be calculated in the following way:
 1  1  s  1  1 2  
 L1    
   
2 2
 5  s s  1  2 2
2 s  1  2 2
 
L-1  
1 1  1 
 1  g  t    1  e  t  cos 2t  sin 2t  
5 5  2 
L-1
= u(tk)
But g(tk) = e-(t-k) ( cos 2(tk) + sin 2(tk) )
  1 
 e k  e  t  cos 2t  sin 2t  
= ek g(t)   2 
 y(t) =  u(t)
+ u(t2) - u(t3)
+ ……
=

=
 2e3u(t3) + . . .) )

MATLAB CODE:

Laplace Transform:

Example 1: f(t)=e−5 t
Program:
Syms t s
ft=exp(-5*t)
fs=laplace(ft)

Output:
fs=1/(s+5)

Example 2: f(t)=e 3 t
Program:
Syms t s
ft=exp(3*t)
fs=laplace(ft)

Output:
fs=1/(s-3)

43 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Example 3: f(t)=sin2t
Program:
Syms t s
ft=sin(2*t)
fs=laplace(ft)

output:
fs=2/(s2+4)

Example 4: f(t)=cos5t
Program:
Syms t s
ft=cos(5*t)
fs=laplace(ft)

Output:
fs=s/(s2+25)

Example 5: f(t)=t 6
Program:
Syms t s
ft=t^6
fs=laplace(ft)

output:
fs=720/ s7

Example 6: f(t)=t 2 sin6t


Program:
Syms t s
ft=t^2*sin(6*t)
fs=laplace(ft)

output:
fs=36*(s^2-12)/(s^2+36)^3

Example 7: f(t)=e 3 t sin2t


Program:
Syms t s
ft=exp(3*t)*sin(2*t)
fs=laplace(ft)

output:
fs=2/(s^2-6*s+13)

Example 8: f(t)=e−3 t cos7t


Program:
Syms t s
ft=exp(-3*t)*cos(7*t)
fs=laplace(ft)

output:
44 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
fs=(s+3)/(s^2+6*s+58)

Example 9: f(t)=e−2 t sin4t


Program:
Syms t s
ft=exp(-2*t)*sin(4*t)
fs=laplace(ft)

output:
fs=4/(s^2+4*s+20)

Example 10: f(t)=e 7 t cos2t


Program:
Syms t s
ft=exp(7*t)*cos(2*t)
fs=laplace(ft)

output:
fs=(s-7)/(s^2-14*s+53)

Inverse Laplace Transform:

Example 1: f(s)=s+1/s(s+2)(s+3)
Program:
Syms t s
fs=(s+1)/(s^3+5*s^2+6*s)
ft=ilaplace(fs)

output:
ft=-2/3*exp(-3*t)+1/2*exp(-2*t)+1/6

Example 2: f(s)=3/¿ ¿+8s+25)


Program:
Syms t s
fs=3/( s^2+8*s+25)
ft=ilaplace(fs)

output:
ft=exp(-4*t)*sin(3*t)

Example 3: f(s)=s/¿ ¿+a 2 ¿


Program:
Syms a t s
fs=s/(s^2+a^2)
ft=ilaplace(fs)

output:
ft=cos(a*t)
45 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Example 4: f(s)=1/s+a
Program:
Syms a t s
fs=1/(s+a)
ft=ilaplace(fs)

output:
ft=exp(-a*t)

a 2s
Example 5: f(s)= +
a +s ( 25 a2+ s 2)
2 2

Program:
syms x a t s
f1=a/(a^2 + s^2) + (2*s)/(25*a^2 + s^2)
F1=ilaplace(f1)

output:
2*cos(5*a*t) + sin(a*t)

QUESTIONS:

1. Solve the problems manually and verify with the results from MATLAB.

Experiment No: EE-391/8


46 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

TITLE :- Amplitude and Phase spectrum analysis of different signals using MATLAB.
OBJECTIVE:- To analyze the amplitude and phase spectrum of different signals using MATLAB

THEORY:
We have seen that the frequency response function T ( jω) of a system characterizes the amplitude and phase
of the output signal relative to that of the input signal for purely harmonic (sine or cosine) inputs. We also
know from linear system theory that if the input to the system is a sum of sines and cosines, we can calculate
the steady-state response of each sine and cosine separately and sum up the results to give the total response
of the system. Hence if the input is:

A0 k=10
x ( t )= + ∑ B k sin ⁡(ω k t ¿−θk ) ¿ (8.1)
2 k=1
then the steady state output is:
k=10
A0
y (t)= T ¿ j 0 ¿+ ∑ Bk |T ( jω k )|sin ⁡( ωk t ¿−θ k )+∠T ( j ωk ) ¿ (8.2)
2 k=1

Note that the constant term, a term of zero frequency, is found from multiplying the constant term in the
input by the frequency response function evaluated at ω = 0 rad/s. So having a sum of sines and cosines
representation of an input signal, we can easily predict the steady state response of the system to that input.
The problem is how to put our signal in that sum of sines and cosines form. For a periodic signal, one that
repeats exactly every, say, T seconds, there is a decomposition that we can use, called a Fourier Series
decomposition, to put the signal in this form. If the signals are not periodic we can extend the Fourier Series
approach and do another type of spectral decomposition of a signal called a Fourier Transform. In this
chapter much of the emphasis is on Fourier Series because an understanding of the Fourier Series
decomposition of a signal is important if you wish to go on and study other spectral techniques. This Fourier
theory is used extensively in industry for the analysis of signals. Spectrum analyzers that automatically
calculate many of the functions we discuss here are readily available from hardware and software companies.
See for example, the advertisements in the IEEE Signal Processing Magazine. Spectral analysis is popular
because examination of the frequency content in a signal is often useful when trying to understand what
physical components are contributing to a signal. Physical quantities, such as machine rotation rates,
structural resonances and effects of material treatments, often have an easily recognizable effect on the
frequency representation of the signal. The blade passage rate of rotors and fans in helicopters and
turbomachinery will show up as a series of peaks in the spectrum at multiples of the blade passage
frequency. Resonance phenomena, that can be related to natural frequencies of plates, beams and shells or of
acoustical spaces in machines, will show up as elevated regions in the spectrum. Damping material in an
acoustic space will give rise to a high frequency roll off in the spectrum, and a broadening of resonance
phenomena.

To plot the Fourier series coefficients the Ak and Bk has to be combined into an amplitude and phase form. In
effect, we use another representation of the Fourier Series to generate an amplitude and phase. Since a sine
wave can be expressed as a cosine wave with a phase shift (or vice versa). It is possible to express the
Fourier series expansion in the form shown below:

47 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
A0 k=10
x ( t )= + ∑ M cos ⁡(kω1 t ¿−θ k )¿ (8.3)
2 k=1 k
Bk
where, M k = √ A2k + B2k and θk =acrtan ( )
Ak

The relationship between the Ak and Bk and the M k and θk can be derived by expanding the cosine with the phase
shift, using trigonometrical identities, and comparing the result to the kth term in the sine and cosine form of the
Fourier Series.
M k cos ( kω 1 t ) cos ( θk ) + M k sin ( kω 1 t ) cos ( θ k )= A k cos ( kω1 t ) + B k sin ( kω1 t ) (8.4)

From this it can be seen that:


Ak =M k cos ( θk ) ∧B k =M k sin ( θ k ) (8.5)

Hence, the results shown above.


An equivalent expansion in terms of only sine waves can also be made.
A0 ∞
x ( t )= +∑ M k sin ⁡(ω k t ¿ +Ψ k ) ¿ (8.6)
2 k=1
Bk
where, M k = √ A2k + B2k and Ψ k =acrtan ( )
Ak
So to plot the amplitude and phase spectra, we plot M k versus ω k =kω 1 (amplitude spectrum), and we plot θk
versus ω k (phase spectrum).

MATLAB CODE:
clear
clc
dt = 1/100; % sampling rate
et = 4; % end of the interval
t = 0:dt:et;% sampling range
y = 3*sin(4*2*pi*t) + 5*sin(2*2*pi*t); % sample the signal
subplot(2,1,1); % first of two plots
plot(t,y);
grid on % plot with grid
axis([0 et -8 8]); % adjust scaling
xlabel('Time (s)'); % time expressed in seconds
ylabel('Amplitude'); % amplitude as function of time
Y = fft(y); % compute Fourier transform

48 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
n = size(y,2)/2; % 2nd half are complex conjugates
amp_spec = abs(Y)/n; % absolute value and normalize
subplot(2,1,2); % second of two plots
freq = (0:79)/(2*n*dt); % abscissa viewing window

plot(freq,amp_spec(1:80));

grid on % plot amplitude spectrum


xlabel('Frequency (Hz)'); % 1 Herz = number of cycles/second
ylabel('Amplitude'); % amplitude as function of frequency

y = 3*sin(4*2*pi*t) + 5*sin(2*2*pi*t); % sample the signal


subplot(2,2,1); % first of two plots
plot(t,y);
grid on % plot with grid
axis([0 et -8 8]); % adjust scaling
xlabel('Time (s)'); % time expressed in seconds
ylabel('Amplitude'); % amplitude as function of time
phaseY = unwrap(angle(Y));

Output:

Fig. 8.1 Output of amplitude and phase spectrum

COLCLUSION:
49 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

QUESTIONS:
1. Which of the following is an “even” function of t?
a) t 2
b) t 2−4 t
c) sin ⁡(2t )+ 3t
d) t 3+ 6 (Ans. a)

2. A “periodic function” is given by a function which


a) has a period T = 2π

b) satisfies f (t + T) = f (t)
c) satisfies f (t + T) = − f (t)
d) has a period T = π (Ans. b)

50 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Experiment No: EE-391/9

TITLE :- Verification of Network Theorems


OBJECTIVE:- To verify the Network Theorems using MATLAB

THEORY:
Thevenin’s Theorem:
The Thevenin’s theorem, basically gives the equivalent voltage source corresponding to an active network.
If a linear, active, bilateral network is considered across one of its ports, then it can be replaced by an
equivalent voltage source (Thevenin’s voltage source) and an equivalent series impedance (Thevenin’s
impedance).

Since the two sides are identical, they must be true for all conditions. Thus if we compare the voltage across
the port in each case under open circuit conditions, and measure the input impedance of the network with the
sources removed (voltage sources short-circuited and current sources open-circuited), then
Ethevenin = Voc , and Zthevenin = Zin

Norton’s Theorem:
Norton’s Theorem is the dual of Thevenin’s theorem, and states that any linear, active, bilateral network,
considered across one of its ports, can be replaced by an equivalent current source (Norton’s current source)
and an equivalent shunt admittance (Norton’s Admittance).

Since the two sides are identical, they must be true for all conditions. Thus if we compare the current through
the port in each case under short circuit conditions, and measure the input admittance of the network with the
sources removed (voltage sources short-circuited and current sources open-circuited), then
INorton = Isc , and YNorton = Yin

51 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
CIRUIT DIAGRAM:

Fig. 9.1 Circuit diagram to solve the current through the 40Ω resistor

MATLAB SIMULINK MODEL:


Simulink model to solve the problem using Thevenin’s theorem:
Step 1:
To determine the total current through the 40 ohm resistor directly.

Fig. 9.2 Simulink model to determine the total current through 40 ohm resistor
Step 2:
To determine the open circuit voltage Vth.

Fig. 9.3 Simulink model to determine the open circuit voltage Vth

Step 3:
52 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Determine RTh by hand calculation.
Step 4:
To determine the current through 40 ohm resistor from Thevenin’s equivalent circuit.

Fig. 9.4 Simulink model of the Thevenin’s equivalent circuit

Simulink model to solve the problem using Norton’s theorem:


Step 1:
To determine the short circuit Norton’s current INorton.

Fig. 9.5 Simulink model to determine the Norton’s current INorton


Step 2:
To determine the current through 40 ohm resistor from Norton’s equivalent circuit. Here, the AC current
source has frequency 0 Hz and 90 degree of phase.

Fig. 9.6 Simulink model of Norton’s equivalent circuit

RESULT/CONCLUSIONS:
53 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
The Thevenin’s and Norton’s theorems have been verified using MATLAB.

QUESTIONS:
1. What is Kirchhoff’s current law?
2. What is Kirchhoff’s voltage law?
3. What is superposition theorem?
4. Why is a current source connected parallel in a circuit?

Experiment No: EE-391/10


54 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

TITLE :- Characteristics of Series & Parallel Resonant circuits


OBJECTIVE:- To determine the characteristics of Series & Parallel Resonant circuits

THEORY:
Series resonance:
In a series RLC circuit there becomes a frequency point were the inductive reactance of the inductor becomes
equal in value to the capacitive reactance of the capacitor. In other words, XL = XC. The point at which this
occurs is called the Resonant Frequency point, ( ƒr ) of the circuit, and as we are analysing a series RLC
circuit this resonance frequency produces a Series Resonance.

Fig. 10.1 RLC series circuit

Firstly, let us define what we already know about series RLC circuits.
Inductive reactance: X L =2 πfL=ωL
1 1
Capacitive reactance: X C = =
2 πfC ωC
When X L > X C the circuit is inductive
When X L < X C the circuit is capacitive
Total circuit reactance= X T = X L −X C ∨X C − X L
Total circuit impedance= Z=√ R 2+ X 2T =R+ jX

From the above equation for inductive reactance, if either the Frequency or the Inductance is increased the
overall inductive reactance value of the inductor would also increase. As the frequency approaches infinity
the inductors reactance would also increase towards infinity with the circuit element acting like an open
circuit.
However, as the frequency approaches zero or DC, the inductors reactance would decrease to zero, causing
the opposite effect acting like a short circuit. This means then that inductive reactance is “Proportional” to
frequency and is small at low frequencies and high at higher frequencies and this demonstrated in the
following curve:

Inductive Reactance against Frequency:

55 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Fig. 10.2 Graph of Inductive Reactance against Frequency


The graph of inductive reactance against frequency is a straight line linear curve. The inductive reactance
value of an inductor increases linearly as the frequency across it increases. Therefore, inductive reactance is
positive and is directly proportional to frequency ( XL ∝ ƒ )

The same is also true for the capacitive reactance formula above but in reverse. If either the Frequency or the
Capacitance is increased the overall capacitive reactance would decrease. As the frequency approaches
infinity the capacitors reactance would reduce to practically zero causing the circuit element to act like a
perfect conductor of 0Ω.

But as the frequency approaches zero or DC level, the capacitors reactance would rapidly increase up to
infinity causing it to act like a very large resistance, becoming more like an open circuit condition. This
means then that capacitive reactance is “Inversely proportional” to frequency for any given value of
capacitance and this shown below:

Capacitive Reactance against Frequency:

Fig. 10.3 Graph of Capacitive Reactance against Frequency

56 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
The graph of capacitive reactance against frequency is a hyperbolic curve. The Reactance value of a
capacitor has a very high value at low frequencies but quickly decreases as the frequency across it increases.
Therefore, capacitive reactance is negative and is inversely proportional to frequency (XC ∝ ƒ -1).
We can see that the values of these resistances depends upon the frequency of the supply. At a higher
frequency XL is high and at a low frequency XC is high. Then there must be a frequency point were the value
of XL is the same as the value of XC and there is. If we now place the curve for inductive reactance on top of
the curve for capacitive reactance so that both curves are on the same axes, the point of intersection will give
us the series resonance frequency point, ( ƒr or ωr ) as shown below.

Series Resonance Frequency:

Fig. 10.4 Graph of Total Reactance against Frequency

Parallel resonance:
A parallel resonance circuit is influenced by the currents flowing through each parallel branch within the
parallel LC tank circuit. A tank circuit is a parallel combination of L and C that is used in filter networks to
either select or reject AC frequencies. Consider the parallel RLC circuit below.

Fig. 10.5 RLC parallel circuit

57 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Let us define what we already know about parallel RLC circuits.


1 2 2
Admittance, Y = = √G + B
Z
1
Conductance, G=
R
1
Inductive susceptance, BL =
2 πfL
Capacitive susceptance, BC =2 πfC

A parallel circuit containing a resistance, R, an inductance, L and a capacitance, C will produce a parallel
resonance (also called anti-resonance) circuit when the resultant current through the parallel combination is in
phase with the supply voltage. At resonance there will be a large circulating current between the inductor and
the capacitor due to the energy of the oscillations, then parallel circuits produce current resonance.
A parallel resonant circuit stores the circuit energy in the magnetic field of the inductor and the electric field
of the capacitor. This energy is constantly being transferred back and forth between the inductor and the
capacitor which results in zero current and energy being drawn from the supply.
We know from the previous series resonance tutorial that resonance takes place when VL = -VC and this
situation occurs when the two reactances are equal, XL = XC. The admittance of a parallel circuit is given as:
Y =G+ B L + BC
1 1
Y= + + jωC
R jωL
Or
1 1
Y= + + 2 πfC
R 2 πfL

Resonance occurs when XL = XC and the imaginary parts of Y become zero. Then:
X L =X C
1
2 πfL=
2 πfC
1 1
f 2= = 2
2 πL× 2 πC 4 π LC
1
f=
√ 4 π 2 LC
1
∴ f r= Hz
2 π √ LC
Or
1
ω r= rads
√ LC

58 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Impedance in a Parallel Resonance Circuit:

Fig. 10.6 Graph of impedance versus frequency


We now know that at the resonant frequency, ƒr the admittance of the circuit is at its minimum and is equal to
the conductance, G given by 1/R because in a parallel resonance circuit the imaginary part of admittance, i.e.
the susceptance, B is zero because BL = BC as shown.

Susceptance at Resonance:

Fig. 10.6 Graph of susceptance versus frequency


From above, the inductive susceptance, BL is inversely proportional to the frequency as represented by the
hyperbolic curve. The capacitive susceptance, BC is directly proportional to the frequency and is therefore
represented by a straight line. The final curve shows the plot of total susceptance of the parallel resonance
circuit versus the frequency and is the difference between the two susceptance’s.
Then we can see that at the resonant frequency point were it crosses the horizontal axis the total circuit
susceptance is zero. Below the resonant frequency point, the inductive susceptance dominates the circuit
producing a “lagging” power factor, whereas above the resonant frequency point the capacitive susceptance
dominates producing a “leading” power factor.
So at the resonant frequency, ƒr the current drawn from the supply must be “in-phase” with the applied
voltage as effectively there is only the resistance present in the parallel circuit, so the power factor becomes
one or unity, ( θ = 0° ).

59 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
MATLAB CODE:
Series resonance:
% program for series resonance%
clc;
clear all;
close all;
r=input('Resistance(R) =');
l=input('Inductance(L)=');
c=input('Capacitance(C)=');
v=input('Voltage=');
f=5:75;
xl=2*pi*f*l;
xc=(1./(2*pi*f*c));
x=xl-xc;
z=sqrt((r^2)+(x.^2));
i=v./z;

%plotting the graph%

subplot(2,2,1);
plot(f,xl);
grid;
xlabel('Frequency(Hz)');
ylabel('XL');

subplot(2,2,2);
plot(f,xc);
grid;
xlabel('Frequency(Hz)');
ylabel('XC');

subplot(2,2,3);
plot(f,z);
grid;
xlabel('Frequency(Hz)');

60 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
ylabel('Z');
subplot(2,2,4);
plot(f,i);
grid;
xlabel('frequency(Hz)');
ylabel('I(A)');

Output:
Resistance(R) =5
Inductance(L)=0.00000002
Capacitance(C)=0.000005
Voltage=5

Fig. 10.6 Graph of the output of series resonance

Parallel resonance:
% program for parallel resonance%
clc;
clear all;
close all;
r=input('Resistance(R) =');
l=input('Inductance(L) =');
c=input('Capacitance(C) =');
v=input('Voltage =');
f=5:75;

61 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
xl=2*pi*f*l;
xc=(1./(2*pi*f*c));
x=xl-xc;
bl=1./xl;
bc=1./xc;
b=bl-bc
g=1/r;
y=sqrt((g^2)+(b.^2));
i=v.*y;

%plotting the graph%


subplot(2,2,1);
plot(f,bl);
grid;
xlabel('Frequency(Hz)');
ylabel('BL');

subplot(2,2,2);
plot(f,bc);
grid;
xlabel('Frequency(Hz)');
ylabel('BC');

subplot(2,2,3);
plot(f,y);
grid;
xlabel('Frequency(Hz)');
ylabel('Y');

subplot(2,2,4);
plot(f,i);
grid;
xlabel('Frequency(Hz)');
ylabel('I(A)');

Output:

62 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
Resistance(R) =5
Inductance(L)=0.00000002
Capacitance(C)=0.000005
Voltage=5

Fig. 10.6 Graph of the output of parallel resonance

QUESTIONS:
1. What is resonating frequency?
2. What is the basic difference between series and parallel resonance?
3. What is meant by half power frequency?
4. What is the Q (Quality factor) of a series circuit that resonates at 6 kHz, has equal reactance of 4 kilo-
ohms each, and a resistor value of 50 ohms? (Ans: 80)

Experiment No: EE-391/11


63 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

TITLE :- Representation of Poles and Zeros in s-plane, determination of partial


fraction expansion in s-domain and cascade connection of second-order
systems using MATLAB.
OBJECTIVE:- To represent Poles and Zeros in s-plane, determination of partial fraction expansion in s
domain and cascade connection of second-order systems using MATLAB.

THEORY:
Poles and Zeros in s-plane:
A pole-zero plot shows the location in the complex plane of the poles and zeros of the transfer function of a
dynamic system, such as a controller, compensator, sensor, equalizer, filter, or communications channel. By
convention, the poles of the system are indicated in the plot by an X while the zeros are indicated by a circle
or O.
A pole-zero plot can represent either a continuous-time (CT) or a discrete-time (DT) system. For a CT system,
the plane in which the poles and zeros appear is the s plane of the Laplace transform. In this context, the
parameter s represents the complex angular frequency, which is the domain of the CT transfer function. For a
DT system, the plane is the z plane, where z represents the domain of the Z-transform.
P( s)
H (s)= (11.1)
Q( s)
The two polynomials, P(s) and Q(s), allow us to find the poles and zeros of the Laplace-Transform.

Definition 1: zeros
The value(s) for s where P(s)=0.
The complex frequencies that make the overall gain of the filter transfer function zero.
Definition 2: poles
The value(s) for s where Q(s)=0.
The complex frequencies that make the overall gain of the filter transfer function infinite.

Example 11.1

Below is a simple transfer function with the poles and zeros shown below it.

( s+1)
H (s)= (s−12)( s+34 ) (11.2)

The zeros are: {−1}

The poles are: {12, −34}

Determination of partial fraction expansion in s-domain:

64 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
The residue command finds the partial-fraction expansion of a ratio of two polynomials. The syntax is [ r, p,
k] = residue ( b, a ), where b represents the numerator polynomial, a represent the denominators polynomial, r
represents the coefficients or residues of the partial-fraction expansion, p represents the poles, and k is a
vector describing any terms in powers of ‘s’. If the order of the numerator is less than that of the denominator,
then k is an empty matrix.
[R,P,K] = residue(B,A) finds the residues, poles and direct term of a partial fraction expansion of the ratio of
two polynomials B(s)/A(s). If there are no multiple roots,
B( s) R ( 1) R ( 2) R (n)
= + + …+ + K (s ) (11.3)
A (s) s−P(1) A−P(2) s−P ( n )

Vectors B and A specify the coefficients of the numerator an denominator polynomials in descending powers
of s. The residues are returned in the column vector R, the pole locations in column vector P, and the direct
terms in row vector K. The number of poles is n = length(A)-1 = length(R) = length(P). The direct term
coefficient vector is empty if length(B) < length(A), otherwise length(K) = length(B)-length(A)+1.

Example 11.2
3 s+ 4 3 s+ 4
=
X(s) = ( s+1 )( s+2 )2 s3 + 5 s 2 +8 s +4

−1 2 1
+ +
Solution: X(s) =
s+ 2 ( s +2 )2 s+1

Cascade connection of second-order systems:


In the canonical series cascade form, the transfer function H(z) is written as a product of first-order and
second-order transfer functions:

u(z)
Hi (z )= =H 1 ( z ) . H 2 ( z ) . H 3 ( z ) … H n ( z ) (11.4)
e(z)

This equation yields the canonical series cascade form.

MATLAB CODE:
65 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL

Poles and Zeros in s-plane:


%Example 11.1
clear
clc
H = tf([1 1],[1 22 -408]);
pzmap(H)
grid on

Output:

Fig. 11.1 Poles and zeroes mapped in the s-domain

Partial fraction expansion in s-domain:


%Example 11.2
clear
clc
[r, p, k] = residue ([3, 4], [1, 5, 8, 4])

Output:
r=
- 1.000
2.000
1.000
p=
- 2.0000
66 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
- 2.0000
- 1.0000
k=[ ]

Cascade connection of second-order systems:

clear
clc
H1 = tf(2,[1 3 0])
H2 = tf(3,[2 5 1])
H = H2 * H1

Output:
H1 =
2
---------
s^2 + 3 s

Continuous-time transfer function.

H2 =
3
---------------
2 s^2 + 5 s + 1
Continuous-time transfer function.

H=
6
-----------------------------
2 s^4 + 11 s^3 + 16 s^2 + 3 s

Continuous-time transfer function.

QUESTIONS:
1. What do you mean by poles and zeroes in s-domain?
2. An improper fraction can be reduced to proper fraction by

67 | P a g e
ELECTRIC CIRCUIT THEORY LABORATORY MANUAL
a) Addition
b) Subtraction
c) Multiplication
d) Division (Ans. D)
3. Partial fractions of (x² + 1)/(x³ + 1) will be of the form
a) A/(x-1) - B/(x² - x + 1)
b) A/(x+1) - B/(x² - x + 1)
c) A/(x+1) - bx + c/(x² - x + 1)
d) None of Above (Ans. C)

68 | P a g e

You might also like