You are on page 1of 27

Simulation Lab-II Laboratory Manual

DEPARTMENT OF ELECTRICAL ENGINEERING

SIMULATION LAB-II MANUAL

1|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

Program: Electrical Engineering

Lab Manual

Course Name: SIMULATION LAB-II


Course Code: EEL502

Class: T.E
Prepared By: Mr. Deepak Kumar Choudhary
Designation: Assistant Professor

2|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

Sl. LIST OF EXPERIMENTS Page NO.


No

1 Algorithm for Basic operation on signal. 6-11

2 Algorithm for Linear and Circular Convolution. 11-13


Algorithm for step, impulse and frequency
3 14-16
Response in Digital system.

4 Simulation of Fault Analysis.


16-20
Simulation of 1- 1-phase full wave Rectifier with
5 21-23
R-L Load.
Simulation of 1-phase full wave Controlled
6 24-26
Rectifier with R-L Load.

3|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

GUIDELINES FOR LABORATORY NOTEBOOK

The laboratory notebook is a record of all work about the experiment. This record should be sufficiently
complete so that you or anyone else of similar technical background can duplicate the experiment and
data by simply following your laboratory notebook. Record everything directly into the notebook during
the experiment. Do not use scratch paper for recording data. Do not trust your memory to fill in the details
at a later time.

Organization in your notebook is important. Descriptive headings should be used to separate and identify
the various parts of the experiment. Record data in chronological order. A neat, organized, and complete
record of an experiment is just as important as the experimental work.

1. Heading:

The experiment identification (number) should be at the top of each page. Your name and date
should be at the top of the first page of each day's experimental work.

2. Object:

A brief but complete statement of what you intend to find out or verify in the experiment should
be at the beginning of each experiment

3. Diagram:

A circuit diagram should be drawn and labeled so that the actual experiment circuitry can be
easily duplicated at any time in the future. Be especially careful to record all circuit changes made
during the experiment.

4. Equipment List:

4|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

List those items of equipment which have a direct effect on the accuracy of the data. It may be
necessary later to locate specific items of equipment for rechecks if discrepancies develop in the
results.

5. Procedure:
In general, lengthy explanations of procedures are unnecessary. Be brief. Short commentaries
alongside the corresponding data may be used. Keep in mind the fact that the experiment must be
reproducible from the information given in your notebook.

6. Data:

Think carefully about what data is required and prepare suitable data tables. Record instrument
readings directly. Do not use calculated results in place of direct data; however, calculated results may
be recorded in the same table as the direct data. Data tables should be identified and each data column
labeled and headed by the proper units of measure.

7. Calculations:

Not always necessary but equations and sample calculations are often given to illustrate the
treatment of the experimental data in obtaining the results.

8. Graphs:

Graphs are used to present large amounts of data in a concise visual form. Data to be presented
in graphical form should be plotted in the laboratory so that any questionable data points can be checked
while the experiment is still set up. The grid lines in the notebook can be used for most graphs. If special
graph paper is required, affix the graph permanently into the notebook. Give all graphs a short descriptive
title. Label and scale the axes. Use units of measure. Label each curve if more than one on a graph.
9. Results:

The results should be presented in a form that makes the interpretation easy. Large amounts of
numerical results are generally presented in graphical form. Tables are generally used for small amounts
of results. Theoretical and experimental results should be on the same graph or arrange in the same table
in a way for easy correlation of these results.
5|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

10. Conclusion:

This is your interpretation of the results of the experiment as an engineer. Be brief and specific.
Give reasons for important discrepancies.

TROUBLESHOOTING HINTS
1. Be sure that the power is turned ON.
2. Be sure the ground connections are common.
3. Be sure the circuit you build is identical to your circuit diagram (Do a node-by-node check)
4. Be sure that the supply voltages are correct
5. Be sure that the equipment is set up correctly and you are measuring the correct parameters
6. If steps I through 5 are correct then you probably have used a component with the wrong Value or
one that doesn’t work. It is also possible that the equipment does not work (although this is not
probable) or the protoboard you are using may have some unwanted paths between nodes. To find
your problem you must trace through the voltages in your circuit node by node and compare the signal
you expect to have. Then if they are different use your engineering judgment to decide what is causing
the different or ask your lab assistant.

6|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

EXPERIMENT NO: 01

Algorithm for Basic operation on signal.


Aim of the Expt: Write a program to perform the operations on signals and sequences such
as addition, subtraction, multiplication, shifting, and reversing a signal.

Apparatus: MATLAB SOFTWARE

Theory:
Signal Addition:
Addition of two signals is nothing but the addition of their corresponding amplitudes. This
can be best explained by using the following example:

As seen from the diagram above,


-10 < t < -3 amplitude of z(t) = x1(t) + x2(t) = 0 + 2 = 2
7|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

-3 < t < 3 amplitude of z(t) = x1(t) + x2(t) = 1 + 2 = 3


3 < t < 10 amplitude of z(t) = x1(t) + x2(t) = 0 + 2 = 2
Signal Subtraction:

Subtraction of two signals is nothing but subtraction of their corresponding amplitudes.


This can be best explained by the following example:

As seen from the diagram above,


-10 < t < -3 amplitude of z (t) = x1(t) - x2(t) = 0 - 2 = -2
-3 < t < 3 amplitude of z (t) = x1(t) - x2(t) = 1 - 2 = -1
3 < t < 10 amplitude of z (t) = x1(t) + x2(t) = 0 - 2 = -2
Signal Multiplication:

Multiplication of two signals is nothing but multiplication of their corresponding amplitudes.


This can be best explained by the following example:

8|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

As seen from the diagram above,


-10 < t < -3 amplitude of z (t) = x1(t) ×x2(t) = 0 ×2 = 0
-3 < t < 3 amplitude of z (t) = x1(t) ×x2(t) = 1 ×2 = 2
3 < t < 10 amplitude of z (t) = x1(t) × x2(t) = 0 × 2 = 0
Signal shifting:
Time Shifting
x(t ±± t0) is time shifted version of the signal x(t).
x (t + t0) →→ negative shift
x (t - t0) →→ positive shift

9|Page
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

Signal Reversal:
Time Reversal
x(-t) is the time reversal of the signal x(t).

SIMULATION ALGORITHIM:

Signal Addition:
x=[1 2 3 4];
subplot(3,1,1);
stem(x);
title('X');
y=[1 1 1 1];
subplot(3,1,2);
stem(y);
title('Y');
z=x+y;
subplot(3,1,3);
stem(z);
title('Z=X+Y');

Signal Subtraction:
x=[1 2 3 4];

10 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

subplot(3,1,1);
stem(x);
title('X');
y=[1 1 1 1];
subplot(3,1,2);
stem(y);
title('Y');
z=x-y;
subplot(3,1,3);
stem(z);
title('Z=X-Y');

Signal multiplication:
n1=-2:1;
x=[1 2 3 4];
subplot(3,1,1);
stem(n1,x);
title('X') ;
axis([-4 4 -5 5]);
n2=0:3;
y=[1 1 1 1];
subplot(3,1,2);
stem(n2,y);
title('Y');
axis([-4 4 -5 5]);
n3 =min (min(n1) ,min( n2 ) ) : max ( max ( n1 ) , max ( n2 ) ); % finding the
duration of output signal (out)
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 'mul'
s2 (find ( ( n3>=min ( n2 ) ) & ( n3 <=max ( n2 ))==1) )=y;
% signal y with the duration of output signal 'mul'
mul=s1 .* s2; % multiplication
subplot(3,1,3)
stem(n3,mul)
title('Z=X*Y');
axis([-4 4 -5 5]);

Signal shifting:
n1=input('Enter the amount to be delayed');
n2=input('Enter the amount to be advanced');
n=-2:2;
x=[-2 3 0 1 5];
subplot(3,1,1);
11 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

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)');

Signal Reversal:
n=-1:2;
x=[3 -1 0 -4];
subplot(2,1,1)
stem(n,x);
axis([-3 3 -5 5]);
title('Signal x(n)');
c=fliplr(x);
y=fliplr(-n);
subplot(2,1,2);
stem(y,c);
axis([-3 3 -5 5]);
title('Reversed Signal x(-n)') ;

SIMULATION RESULT:

Signal Addition:

Signal Subtraction:

Signal multiplication:

Signal shifting:

Signal Reversal:
Conclusion:
Hence we have studied simulation of the basic operation of signal.

12 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

EXPERIMENT NO: 02

Algorithm for Linear and Circular Convolution.


AIM OF THE EXPT: Write a program to perform the operations of Linear and Circular
Convolution.
APPARATUS: MATLAB SOFTWARE

THEORY:

Linear and circular convolution are fundamentally different operations. However, there are conditions
under which linear and circular convolution are equivalent. Establishing this equivalence has important
implications. For two vectors, x and y, the circular convolution is equal to the inverse discrete Fourier
transform (DFT) of the product of the vectors' DFTs. Knowing the conditions under which linear and
circular convolutions are equivalent allows you to use the DFT to efficiently compute linear
convolutions.
The linear convolution of an N-point vector, x, and an L-point vector, y, has length N + L - 1.
For the circular convolution of x and y to be equivalent, you must pad the vectors with zeros to length
at least N + L - 1 before you take the DFT. After you invert the product of the DFTs, retain only the
first N + L - 1 elements.

SIMULATION ALGORITHM:
Linear Convolution:
p=input('Enter the limit for x');
q=input('Enter the limit for y');
x=input('Enter the elements for x');
y=input('Enter the elements for y');
n1=0:p ;
n2=0:q;
subplot(3,1,1);
stem(n1,x);
title('Signal - x(n)');
subplot(3,1,2);
stem(n2,y);
title('Signal - h(n)');

13 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

z=conv(x,y);
t=length(n1)+length(n2)-1;
s=0:t-1;
subplot(3,1,3);
stem(s,z);
title('Output - y(n)');

Circular Convolution:
clc
x=[4,5,6,7]
h=[1,1,1,0]
X=fft(x)
H=fft(h)
Y=X.*H
y=ifft(Y)
disp(y,'circular convolution is =')

SIMULATION RESULT:
Linear Convolution:

Circular Convolution:

CONCLUSION: Hence we have studied operations of Linear and Circular Convolution.


.

14 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

EXPERIMENT NO: 03

Algorithm for step, impulse and frequency Response in Digital system.


AIM OF THE EXPT: Write a program to perform unit impulse and unit step response of a
digital system.

APPARATUS: MATLAB SOFTWARE

THEORY:
The Unit Impulse Sequence:

The unit impulse sequence is “a sequence of discrete samples having unit magnitude at origin and
zero magnitude at all other sample instants”.

Figure 1 depicts the unit of impulse sequence.

In continuous time systems, the impulse function is obtained by differentiating the step function.
Consider δ(t) is an impulse function and u(t) is a step function. Then,

In discrete time systems, write the relation between impulse and step sequences.

Here, δ [n] is impulse sequence and u[n] is unit step sequence.

15 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

The Unit Impulse Sequence:

The unit step sequence can be represented by

SIMULATION ALGORITHIM:
The Unit Impulse signal:
clc;
n=-20:20;
delta_n=n==0;
stem(n,delta_n);
xlabel('Time sample');
ylabel('amplitude');

16 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

or
clc;
n=-20:20;
delta_n=[zeros(1,20) 1 zeros(1,20)];
stem(n,delta_n);
xlabel('Time sample');
ylabel('amplitude');

The Unit step signal:


clc;
n=-20:20;
delta_n=n>=0;
stem(n,delta_n);
xlabel('Time sample');
ylabel('amplitude');

SIMULATION RESULT:

The Unit Impulse signal:

The Unit step signal:

CONCLUSION: Hence we have studied unit impulse and unit step response of a digital system

17 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

EXPERIMENT NO: 04

Simulation of Fault Analysis.


AIM OF THE EXPT: To calculate the value of fault currents for different types of faults, both
symmetric and unsymmetrical.

APPARATUS: MATLAB SOFTWARE

THEORY:

18 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

19 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

Find the L-G fault current at bus-1.

SIMULATION ALGORITHM:

20 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

Simulation Result:

The line-ground fault current is________.

CONCLUSION: Hence we have calculated the value of fault current in case of Line to Ground
fault.

21 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

EXPERIMENT NO: 05

Simulation of 1- phase full wave Rectifier with R-L Load.


AIM OF THE EXPT: To simulate the 1Ø full wave rectifier circuit with RL load and obtain the
corresponding waveforms using MATLAB/SIMULINK.

APPARATUS: MATLAB SOFTWARE

THEORY:
As shown in the given diagram of full wave bridge rectifier it consists of four diodes under the
condition in which four diodes are connected the called bridge circuit So due to this type of circuit
is named bridge rectifier.

22 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

23 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

Simulation Block Diagram:

Waveform:

COCLUSION: Hence we have simulate the 1Ø full rectifier circuit for RL load and obtain
the corresponding waveforms.

24 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

EXPERIMENT NO: 06

Simulation of 1-phase full wave Controlled Rectifier with R-L Load.

AIM OF THE EXPT: To simulate the 1Ø full controlled rectifier circuit for RL load and obtain

the corresponding waveforms using MATLAB/SIMULINK.

APPARATUS: MATLAB SOFTWARE

THEORY:

The phase controlled rectifiers using SCRs are used to obtain controlled dc output voltages from the
fixed ac mains input voltage. The circuit diagram of a fully controlled converter is shown in Figure
2. The output voltage is varied by controlling the firing angle of SCRs. The single phase fully
controlled converter consists of four SCRs. During positive half cycle, SCR1 and SCR 2 are forward
biased. Current flows through the load when SCR1 and SCR2 is triggered into conduction. During
negative half cycle, SCR3 and SCR4 are forward-biased. If the load is resistive, the load voltage and
load current are similar

25 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

Simulation Block Diagram:

Waveform:

26 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET
Simulation Lab-II Laboratory Manual

CONCLUSION: Hence we have simulated the 1Ø fully controlled rectifier circuit for RL load
and obtained the corresponding waveforms.

27 | P a g e
DEPARTMENT OF ELECTRICAL ENGINEERING, ARMIET

You might also like