Professional Documents
Culture Documents
3. ECC305 Signals and Networks Lab
3. ECC305 Signals and Networks Lab
3. ECC305 Signals and Networks Lab
For
Apparatus Required:
Statement:
18
Superposition theorem states that in a linear bilateral network containing more than one source, the current
flowing through the branch is the algebraic sum of the current flowing through that branch when sources are
considered one at a time and replacing other sources by their respective internal resistances.
Precautions:
1. Voltage control knob should be kept at minimum position
2. Current control knob of RPS should be kept at maximum position
Procedure:
1. Give the connections as per the diagram.
2. Set a particular voltage value using RPS1 and RPS2 & note down the ammeter reading
3. Set the same voltage in circuit I using RPS1 alone and short circuit the terminals and note the ammeter
reading.
4. Set the same voltage in RPS2 alone as in circuit I and note down the ammeter reading.
5. Verify superposition theorem.
Observation Table:
Theoretical Table:
Practical Table:
Figure 2 10V 0V
Figure 3 0V 10V
Model Calculations:
Question:
20
1. Differentiate between Kirchhoff’s First law and Kirchhoff’s Second law?
2. State and define Ohm’s Law?
3. Could you measure Voltage in series?
4. Could you measure current in parallel?
Apparatus Required:
21
Statement:
Thevenin’s Theorem states that “Any linear circuit containing several voltages and resistances can be replaced by
just one single voltage in series with a single resistance connected across the load“. In other words, it is possible to
simplify any electrical circuit, no matter how complex, to an equivalent two-terminal circuit with just a single
constant voltage source in series with a resistance (or impedance) connected to a load as shown below.
Thevenin’s Theorem is especially useful in the circuit analysis of power or battery systems and other interconnected
resistive circuits where it will have an effect on the adjoining part of the circuit.
While calculating the RTH all sources are replaced by their internal impedance.
The basic steps for solving a circuit using Thevenin’s Theorem is as follows:
Remove the load resistor RL or component concerned.
Find RTH by shorting all voltage sources or by open circuiting all the current sources.
Find VTH by the usual circuit analysis methods.
Find the current flowing through the load resistor RL.
Procedure:
1. Give the connections as per the diagram.
2. Set the particular voltage value and note down all the readings.
3. Connect the circuit as Figure-2 and 3 to obtain the Thevenin’s voltage and Thevenin’s resistance.
4. Connect the equivalent Thevenin’s circuit as shown in FIgure-4.
5. Verify Thevenin’s theorem from Figure 1 and 4.
22
Experiment No-3: Study of Norton’s theorem
Apparatus Required:
Statement:
23
Norton’s theorem states that “Any linear circuit containing several energy sources and resistances can be replaced
by a single Constant Current generator(IN) in parallel with a Single Resistor(RN).
While calculating the RN all sources are replaced by their internal impedance.
Procedure:
To understand it, implement the following example.
Consider a circuit as,
Figure-1
To find the Nortons equivalent of the above circuit we firstly have to remove the centre 40Ω load resistor and short
out the terminals A and B to give us the following circuit.
24
Figure-2
When the terminals A and B are shorted together the two resistors are connected in parallel across their two
respective voltage sources and the currents flowing through each resistor as well as the total short circuit current can
now be calculated as:
If we short-out the two voltage sources and open circuit terminals A and B, the two resistors are now effectively
connected together in parallel. The value of the internal resistor Rs is found by calculating the total resistance at the
terminals A and B giving us the following circuit.
Figure-3
25
Figure-4
Procedure:
2. First, connect the connections as per Figure-1 and note down the voltage and current across terminals A-B.
3. Connect the circuits as per Figure-2 and Figure-3 and note down the short ciucuit current and equivalent
resistance from it.
4. Finally, connect the circuit as per Figure-4 and note down the current and voltage across RL.
Create a table to compare the load voltage and current of Figure-1 and Figure-4.
Apparatus Required:
Statement:
Z-parameters (also known as impedance parameters or open-circuit parameters) are properties used in electrical
engineering to describe the electrical behavior of linear electrical networks. These Z-parameters are used in
Z-matrixes (impedance matrixes) to calculate the incoming and outgoing voltages and currents of a network.
26
Figure-1
Computation of z-parameter,
We know that,
V1 = Z11 I1 + Z12 I2
V2 = Z21 I1 + Z22 I2
Case1: Assume output port open i.e. I2 =0, voltage across impedance Z3 will be equal to V2.
V2 = Z3I1
Z3 = V2 / I1
Z21 = Z3 ……(3)
Also under the condition of output port open, applying Kirchoff’s Loop Law in loop 1,
V1 = I1Z1 + V2
27
Z11 = Z1 + Z21
= Z1 + Z3 [from (3)]
Case2: Assume input port open i.e. I1 =0, voltage across impedance Z3 will be equal to V1.
V1 = Z3I2
Z3 = V1 / I2
Z12 = Z3 ……(4)
V2 = I2Z2 + V1
Z22 = Z2 + Z12
= Z2 + Z3 [from (4)]
Hence,
Procedure:
2. Measure the open circuit voltages V1 and V2 and accordingly obtain Z11, Z22, Z12 , Z21.
28
3. With the help of these z-parameters create and equivalent circuit as
Apparatus Required:
29
Theory:
Hybrid parameters (also known as h parameters) are known as ‘hybrid’ parameters as they use Z
parameters, Y parameters, voltage ratio, and current ratios to represent the relationship between voltage
and current in a two port network. H-parameters are useful in describing the input-output
characteristics of circuits where it is hard to measure Z or Y parameters (such as in a transistor).
H parameters encapsulate all the important linear characteristics of the circuit, so they are very useful
for simulation purposes. The relationship between voltages and current in h parameters can be
represented as:
Let us short circuit the output port of a two port network as shown below,
Now, ratio of input voltage to input current, at short circuited output port is:
This is referred to as the short circuit input impedance. Now, the ratio of the output current to input
current at the short-circuited output port is:
30
This is called short-circuit current gain of the network. Now, let us open circuit the port 1. At that
condition, there will be no input current (I1=0) but open circuit voltage V1 appears across the port 1, as
shown below:
Now:
This is referred as reverse voltage gain because, this is the ratio of input voltage to the output voltage of
the network, but voltage gain is defined as the ratio of output voltage to the input voltage of a network.
Now:
31
Equation (i) can be represented as a circuit based on Kirchhoff Voltage Law:
Procedure:
32
Experiment No.-6 : Generation of basic discrete time signals.
Aim: To generate basic digital signals like Sinusoidal signal, unit impulse, unit step, unit ramp
signal, Exponential signal, etc.
Theory:
Let us see how the basic signals can be represented in Discrete Time Domain.
33
(b) Unit Step Signal
The figure above shows the graphical representation of a discrete step function.
(c ) Unit Ramp Function
A discrete unit ramp function can be defined as −
34
The figure given above shows the graphical representation of a discrete ramp signal.
Discrete unit parabolic function is denoted as pnn and can be defined as;
The figure given above shows the graphical representation of a parabolic sequence.
(e ) Sinusoidal Signal
All continuous-time signals are periodic. The discrete-time sinusoidal sequences may or may not be periodic.
They depend on the value of ω. For a discrete time signal to be periodic, the angular frequency ω must be a
rational multiple of 2π.
35
A discrete sinusoidal signal is shown in the figure above.
Discrete form of a sinusoidal signal can be represented in the format −
Here A,ω and φ have their usual meaning and n is the integer. Time period of the discrete sinusoidal signal is
given by −
MATLAB Code:
% Impulse, Ramp, Unit step, Quad, Square wave
%All in one
clc
close all
clear all
n=-1:.01:1;
%x2=[zeros(1,5),ones(1,26)];
%stem(n2,x2);
unitstep= n>=0;
ramp=n.*unitstep,
impulse= n==0;
quad = n.^2.*unitstep;
sqwave = 0.81*square(4*pi*t);
hold on
plot(n,unitstep,'r');
plot(n,ramp),
plot(n,impulse,'k')
36
plot(n,quad,'b*')
plot(t,sqwave);
xlabel('time');
ylabel('Amplitude');
legend('unitstep','ramp','impulse','quad');
title('Unit Ramp Impulse parabolic square ');
%EXPONENTIAL SIGNAL
a=input('Enter the value of a:');
t3=-10:1:20;
x3=exp(-1*a*t3);
subplot(2,3,3);
plot(t3,x3);
xlabel('time');
ylabel('Amplitude');
title('Exponential signal');
%SINUSOIDAL SIGNAL
A=input('Enter the amplitude:');
f=input('Enter the frequency:');
t5=-1:.01:1;
x5=A*sin(2*pi*f*t5);
%subplot(2,3,5);
plot(t5,x5)
xlabel('Time');
ylabel('Amplitude');
title('Sinusoidal signal');
37
%RANDOM SIGNAL
t6=-10:1:20; x6=rand(1,31);
%subplot(2,3,6);
plot(t6,x6);
xlabel('time');
ylabel('Amplitude');
title('Random signal');
38
Experiment No.-7: Simulation of Basic Operations on Signals
Aim: Simulation of basic operations such as addition, subtraction, shifting and folding on discrete time signals
Signal Multiplication:
This is a sample-by-sample multiplication (or “dot” multiplication) given by
39
MATLAB Code:
%ADDITION:
x=input(„ENTER THE FIRST SEQUENCE:‟);
subplot(3,1,1); stem(x); title('X');
y=input(„ENTER THE SECOND SEQUENCE:‟);
subplot(3,1,2); stem(y); title('Y'); z=x+y;
disp(z) subplot(3,1,3); stem(z); title('Z=X+Y');
%OUTPUT:
ENTER THE FIRST SEQUENCE:[2 3 1 4 5]
ENTER THE SECOND SEQUENCE:[1 -1 0 1 -1]
3 2 1 5 4
40
%EXPECTED GRAPH:
41
%SUBTRACTION
clc; clear all; close all; n1=-2:1;
x=input('ENTER THE FIRST SEQUENCE:'); n2=0:3;
y=input('ENTER THE SECOND SEQUENCE:');
subplot(3,1,1);
stem(n1,x); xlabel ('time')
ylabel ('amplitude') title('FIRST SEQUENCE') ; axis([-4 4 -5 5]);
subplot(3,1,2);
stem(n2,y); xlabel ('time')
ylabel ('amplitude') title('SECOND SEQUENCE'); axis([-4 4 -5 5]);
n3 =min (min(n1) ,min( n2 ) ) : max ( max ( n1 ) , max ( n2 ) ); % finding the duration of output signal
s1 =zeros(1,length (n3) ); s2 =s1;
s1 (find ( ( n3>=min( n1 ) ) & ( n3 <=max ( n1 ) )==1 ) )=x;
% signal x with the duration of output signal 'sub'
s2 (find ( ( n3>=min ( n2 ) ) & ( n3 <=max ( n2 ))==1) )=y;
% signal y with the duration of output signal 'sub' sub=s1 - s2; % subtraction
disp('subtracted sequence') disp(sub)
subplot(3,1,3) stem(n3,sub) xlabel ('time') ylabel ('amplitude')
OUTPUT:
ENTER THE FIRST SEQUENCE:[2 4 6 8]
ENTER THE SECOND SEQUENCE:[1 3 5 7]
subtracted sequence
2 4 5 5 -5 -7
42
EXPECTED GRAPH:
43
MULTIPLICATION
PROGRAM:
clc; clear all; close all; n1=-2:1;
x=input('ENTER THE FIRST SEQUENCE:'); n2=0:3;
y=input('ENTER THE SECOND SEQUENCE:');
subplot(3,1,1);
stem(n1,x); xlabel ('time')
ylabel ('amplitude') title('FIRST SEQUENCE') ; axis([-4 4 -5 5]);
subplot(3,1,2);
stem(n2,y); xlabel ('time')
ylabel ('amplitude') title('SECOND SEQUENCE'); axis([-4 4 -5 5]);
n3 =min (min(n1) ,min( n2 ) ) : max ( max ( n1 ) , max ( n2 ) ); % finding the duration of output signal (out)
EXPECTED GRAPH:
44
45
SHIFTING
PROGRAM:
clc; clear all; close all;
n1=input('Enter the amount to be delayed'); n2=input('Enter the amount to be
advanced'); n=-2:2;
x=input('ENTER THE SEQUENCE');
subplot(3,1,1);
stem(n,x); title('Signal x(n)'); m=n+n1;
y=x; subplot(3,1,2);
stem(m,y);
title('Delayed signal x(n-n1)'); t=n-n2;
z=x; subplot(3,1,3);
stem(t,z);
title('Advanced signal x(n+n2)');
OUTPUT:
Enter the amount to be delayed 3 Enter the amount to be advanced4 ENTER THE
SEQUENCE[1 2 3 4 5]
EXPECTED GRAPH:
46
FOLDING or REVERSING:
PROGRAM:
clc; clear all; close all; n=-1:2;
x=input('ENTER THE SEQUENCE');
subplot(2,1,1) stem(n,x);
axis([-3 3 -5 5]);
title('Signal x(n)'); c=fliplr(x); y=fliplr(-n);
disp('FOLDED SEQUENCE')
disp(c) subplot(2,1,2);
stem(y,c);axis([-3 3 -5 5]);
title('Reversed Signal x(-n)') ;
OUTPUT:
ENTER THE SEQUENCE[1 -1 2 -3] FOLDED SEQUENCE
-3 2 -1 1
EXPECTED GRAPH
Result: Thus the different operations on sequences were verified using MATLAB.
47
Experiment No.-8: Study of Linear Convolution
Theory:
Convolution is a formal mathematical operation, just as multiplication, addition, and
integration. Addition takes two numbers and produces a third number, while
convolution takes two signals and produces a third signal. Convolution is used in the
mathematics of many fields, such as probability and statistics. In linear systems,
convolution is used to describe the relationship between three signals of interest: the
input signal, the impulse response, and the output signal.
If the input and impulse response of a system are x[n] and h[n] respectively, the
convolution is given by the expression,
x[n] * h[n] = ε x[k] h[n-k]
where k ranges between -∞ and ∞
If,
x(n) is an M- point sequence
h(n) is an N – point sequence
then, y(n) is a (M+N-1) – point sequence.
In this equation, x(k), h(n-k) and y(n) represent the input to and output from the
system at time n. Here we could see that one of the inputs is shifted in time by a value
every time it is multiplied with the other input signal. Linear Convolution is quite
often used as a method of implementing filters of various types.
MATLAB Code:
clc;
clear all;
close all;
x=input('enter the 1st sequence');
h=input('enter the 2nd sequence');
y=conv(x,h);
figure;
subplot(3,1,1);
stem(x);
48
ylabel('Amplitude ');
xlabel('(a) n ');
title('first sequence');
subplot(3,1,2);
stem(h);
ylabel('Amplitude --.');
xlabel('(b) n --.');
title('Second sequence');
subplot(3,1,3);
stem(y);
ylabel('Amplitude --.');
xlabel('(c) n --.');
title('Convoluted sequence');
Output:
enter the 1st sequence [1 2]
enter the 2nd sequence [1 2 4]
The resultant signal is
Y= 1 4 8 8
EXPECTED GRAPHS:
49
Result: Thus the Linear convolution was performed using MATLAB.
Question:
1. Define linear convolution
2. What is the formula for calculating length of output sequence?
3. What are the applications of convolution?
50
Experiment No.- 9: Study of Circular Convolution
Aim: To simulate the circular convolution on MATLAB
Theory-Convolution is operated between two signals and includes the following operations.
Folding. Shifting. Multiplication. Addition
Convolution sum is useful to obtain the response of discrete LTI system with input
x(n) and impulse response h(n).
DFT does not support linear convolution, because of x(n) and h(n) are of different duration.
DFT supports only circular convolution, because of x(n) and h(n) are equal duration.
Circular convoluted sequence y(n) between x(n) and h(n) with equal duration N is defined as
Aim 2: Write a program in MATLAB to compute the response of a discrete LTI system with
input sequence x(n) and impulse response h(n) by using Circular convolution. Check your
result for the sequences x(n) = [1,2,3,4] and h(n) = [1,2].
MATLAB Code:
clc;
clear all;
close all;
x=input('enter the 1st sequence');
h=input('enter the 2nd sequence');
N1=length(x);
N2=length(h);
N= max(N1,N2);
51
x=[x zeros(1,N-N1)];
h=[h zeros(1,N-N2)];
for m=1:N
y(m)=0;
for n=1:N
i=m-n+1;
if(i<=0)
i=N+i;
end
y(m)=y(m)+x(n)*h(i);
end
end
disp('first sequence');
x
disp('second sequence');
h
n=0:N-1;
subplot(3,1,1);
stem(x);
title('first sequence');
ylabel('signal');
xlabel('time');
subplot(3,1,2);
stem(h);
title('second sequence');
ylabel('signal');
xlabel('time');
subplot(3,1,3);
stem(y);
52
title('convolved sequence');
ylabel('signal');
xlabel('time');
Output
Input first sequence [1 2 3 4]
Input second sequence [1 2 3 4]
first sequence
x=
1 2 3 4
second sequence
h=
1 2 3 4
convolved sequence
y=
26 28 26 20
53
Result: Thus the Circular convolution was performed using MATLAB.
Question:
1. Define circular convolution.
2. What is difference between linear and circular convolution.
3. For which type of signals circular convolution are used.
54