100% found this document useful (1 vote)
68 views33 pages

Laboratory Manual: Siddhartha

This document is a laboratory manual for a basic electrical simulation lab course. It contains an index listing 10 experiments to be conducted in the course over two cycles. The experiments include basic matrix operations in MATLAB, generating different discrete and continuous time signals in MATLAB, applying network theorems to electrical circuits, waveform synthesis using Laplace transforms, analyzing zeros and poles, studying transient responses of RLC circuits, and working with Fourier transforms. The manual is for a third year electrical engineering course at Siddhartha Institute of Engineering and Technology.

Uploaded by

RupaVikram
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
100% found this document useful (1 vote)
68 views33 pages

Laboratory Manual: Siddhartha

This document is a laboratory manual for a basic electrical simulation lab course. It contains an index listing 10 experiments to be conducted in the course over two cycles. The experiments include basic matrix operations in MATLAB, generating different discrete and continuous time signals in MATLAB, applying network theorems to electrical circuits, waveform synthesis using Laplace transforms, analyzing zeros and poles, studying transient responses of RLC circuits, and working with Fourier transforms. The manual is for a third year electrical engineering course at Siddhartha Institute of Engineering and Technology.

Uploaded by

RupaVikram
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 33

LABORATORY MANUAL

BASIC ELECTRICAL SIMULATION LAB


B-Tech. EEE - III Year. I Sem

DEPARTMENT
OF
ELECTRICAL AND ELECTRONICS ENGINEERING

SIDDHARTHA
INSTITUTE OF ENGINEERING &TECHNOLOGY
IBRAHIMPATNAM - R.R. DIST. 501 506

***********

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
SIDDHARTHA INSTITUTE OF ENGINEERING & TECHNOLOGY
IBRAHIMPATNAM - R.R. DIST. 501 506.

DEPARTMENT: ELECTRICAL & ELECTRONICS ENGINEERING

BASIC ELECTRICAL SIMULATION LAB

INDEX

S.NO NAME OF THE EXPERIMENT

CYCLE-I

1 1. BASIC OPERATIONS ON MATRICES

2(a) GENERATION OF DISCRETE SIGNALS

2(b) GENERATION OF CONTINUOUS SIGNALS

3 OPERATIONS ON SIGNALS AND SEQUENCES

4(a) MESH ANALYSIS IN RECIPROCITY CIRCUIT

4(b) NODAL ANALYSIS IN SUPERPOSITION CIRCUIT

5 2. APPLICATION OF NETWORK THEOREM TO ELECTRICAL NETWORK

3. CYCLE-II

6 4. WAVEFORM SYNTHESIS USING LAPLACE TRANSFORM

7(a) ZEROS AND POLES IN S-PLANE

7(b) ZEROS AND POLES IN Z-PLANE

8 TRANSIENT RESPONSE OF RLC CIRCUIT WITH SINUSOIDAL INPUT

9 EVEN AND ODD PART OF A SIGNAL

10(a) FOURIER TRANSFORMS AND INVERSE FOURIER TRANSFORMS

10(b) MAGNITUDE AND PHASE SPECTRUM OF FOURIER TRANSFORMS

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
1. BASIC OPERATIONS ON MATRICES

AIM: -
To write a MATLAB program for some basic operations on matrices such as addition,
subtraction, multiplication.

SOFTWARE REQURIED:-

Personal Computer with MATLAB R2006b (7.3 Version) software

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program mentioned below
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

PROGRAM:-
clc;
close all;
clear all;
a= [a1 a2 a3; a4 a5 a6; a7 a8 a9];
b= [b1 b2 b3; b4 b5 b6; b7 b8 b9];
disp('The matrix a= ');a
disp('The matrix b= ');b
% to find sum of a and b
c=a+b;
disp('The sum of a and b is ');c
% to find difference of a and b
d=a-b;
disp('The difference of a and b is ');d
%to find multiplication of a and b
e=a*b;
disp('The product of a and b is ');e
% to find element-by-element multiplication

Continued…………….1

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
OUTPUT:-

The matrix a=

a1 a2 a3
a4 a5 a6
a7 a8 a9

The matrix b=

b1 b2 b3
b4 b5 b6
b7 b8 b9

The sum of a and b is c=

c1 c2 c3
c4 c5 c6
c7 c8 c9

The difference of a and b is d =

d1 d2 d3
d4 d5 d6
d7 d8 d9

The product of a and b is e =

e1 e2 e3
e4 e5 e6
e7 e8 e9

RESULT:-
Finding addition, subtraction, multiplication using MATLAB are successfully
completed

********************

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
2(a) GENERATION OF DISCRETE SIGNALS
AIM: -
To write a “MATLAB” Program to generate discrete time signals like unit impulse,
Unit step, Unit ramp, exponential signal and sinusoidal signals.

SOFTWARE REQURIED :-

Personal Computer with MATLAB R2006b (7.3 Version) software

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program mentioned below
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

PROGRAM:-
clc;
clear all;
close all;
n=-10:1:10;
L=length(n);
for i=1:L
if n(i)==0
x1(i)=1;
else
x1(i)=0;
end;
if n(i)>=0
x2(i)=1;
x3(i)=n(i);
else
x2(i)=0;
x3(i)=0;
end;
end;

% to generate exponential sequence


a=0.85;
x4=an;

% to generate sinusoidal sequence


f=0.1;
x5=sin(2*𝜋*f*n);
figure;
subplot(3,2,1);

Continued…………….1

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
stem(n,x1);
xlabel('time n ---->');
ylabel('amplitude---->');
title('Unit step signal');

subplot(3,2,2);
stem(n,x2);
xlabel('time n ---->');
ylabel('amplitude---->');
title('Unit impluse signal');

subplot(3,2,3);
stem(n,x3);
xlabel('time n ---->');
ylabel('amplitude---->');
title('Unit ramp signal');

subplot(3,2,4);
stem(n,x4);
xlabel('time n ---->');
ylabel('amplitude---->');
title('exponential signal');

subplot(3,2,[5,6]);
stem(n,x5);
xlabel('time n ---->');
ylabel('amplitude---->');
title('sinusoidal signal');

Continued…………….2

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
OUTPUT:-

RESULT:-

Thus the Generation of discrete time signals likes unit impulse, unit step, Unit ramp,
exponential signal and sinusoidal signals are successfully completed.

********************

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
2(b) GENERATION OF CONTINUOUS SIGNALS

AIM: -
To write a “MATLAB” Program and generate continuous time signals like unit step,
sawtooth, triangular, Sinusoidal, ramp, and sinc function.

SOFTWARE REQURIED :-

Personal Computer with MATLAB R2006b (7.3 Version) software.

PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program as mentioned below
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

PROGRAM:-

clc;
clear all;
close all;
t=-10:0.01:10;
L=length(t);
for i=1:L
%to generate unit Step and ramp function
if t(i)<0
x1(i)=0;
x2(i)=0;
else
x1(i)=1;
x2(i)=t(i);
end;
end;

%to generate sinusoidal function


f=0.1;
x3=sin(2*𝜋*f*t);

%to generate Triangular and Sawtooth waveforms


x4=sawtooth(t,0.5);
x5=sawtooth(t);

%to generate sinc function


x6=sinc(t);

Continued…………….1

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
figure;
subplot(2,3,1);
plot(t,x1);
xlabel('t--->');
ylabel('amp--->');
title('unit step');

subplot(2,3,2);
plot(t,x2);
xlabel('t--->');
ylabel('amp--->');
title('unit ramp');

subplot(2,3,3);
plot(t,x3);
xlabel('t--->');
ylabel('amp--->');
title('sinusoidal');

subplot(2,3,4);
plot(t,x4);
xlabel('t--->');
ylabel('amp--->');
title('triangular');

subplot(2,3,5);
plot(t,x5);
xlabel('t--->');
ylabel('amp--->');
title('sawtooth');

subplot(2,3,6);
plot(t,x6);
xlabel('t--->');
ylabel('amp--->');
title('sinc function');

Continued…………….2

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
OUTPUT:-

RESULT:-

Thus the Generation of continuous time signals like unit step, sawtooth, triangular,
sinusoidal, ramp and sinc functions are successfully completed.

********************

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
3. OPERATIONS ON SIGNALS AND SEQUENCES
AIM: -
To perform various operations on signals such as addition, multiplication, scaling,
shifting and folding, computation of energy and average power using MATLAB program.

SOFTWARE REQURIED:-

Personal Computer with MATLAB R2006b (7.3 Version) software


.
PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program as mentioned below
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

PROGRAM:-

clc,
close all;
clear all;
t=0:0.001:1;
L=length(t);
f1=1;
f2=3;
x1=sin(2*pi*f1*t);
x2=sin(2*pi*f2*t);

figure;
subplot(3,2,1);
plot(t,x1,'b',t,x2,'r');
title('the signals x1(t) and x2(t)');

x3=x1+x2;
subplot(3,2,2);
plot(t,x3);
title('the sum of x1(t) and x2(t)');

x4=x1.*x2;
subplot(3,2,3);
plot(t,x4);
title('the multiplication of x1(t) and x2(t)');

Continued……………1

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
t=-1:0.001:0;
x5=sin(2*𝜋*f1*(-t));
x6=sin(2*𝜋*f2*(-t));
subplot(3,2,4);
plot(t,x5,'b',t,x6,'r');
title('the folding of x1(t)and x2(t)');

x7=[zeros(1,200),x2(1:(L-200))];
subplot(3,2,5);
plot(t,x7);
title('the shifting of x1(t)and x2(t)');

x8=x22;
subplot(3,2,6);
plot(t,x8);
title('the squaring of x1(t)and x2(t)');

OUTPUT:-

RESULT:-

Thus the MATLAB Program for some operations on signals is completed successfully.

******************** 2

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
4(a) MESH ANALYSIS IN THE RECIPROCITY CIRCUIT
AIM:-
To verify the Reciprocity Theorem with DC Input and find the current using
P Spice software.

Apparatus required:-
Personal Computer with MATLAB R2006b (7.3 Version) software

Given Circuit (General):-

The above circuit converting in to P-Spice circuit

PROCEDURE:-

1. Start the personal Computer and Open the Text Editor which is on the desktop.
2. for the above given circuit decide the node points for each component and also put a
dummy voltage source for the sake of measuring the current at nodes if necessary.
3. Write the program for the above ckt as given below
4. Save the file as .cir and close the file
5. Open the PSPICE AD, which is on the desk top and open the same file which is saved
by a name earlier in the Text editor.
6. You observe a dialog “Simulation completed successfully”
7. Open the file menu and Click the Examine output.
8. You observe the following output results whatever the requirements needed.
Continued……………1

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
Writing the Program for the above circuit:-
*RECIPROCITY THEOREM
VS 1 0 DC 10V
VX 1 2 DC 0V
R1 2 3 1.1K
R2 3 4 2.2K
R3 3 0 3.3K
VY 4 0 DC 0V
.OP
.END

OUTPUT:-
*RECIPROCITY THEOREM

**** CIRCUIT DESCRIPTION

VS 1 0 DC 10V
VX 1 2 DC 0V
R1 2 3 1.1K
R2 3 4 2.2K
R3 3 0 3.3K
VY 4 0 DC 0V
.OP

*RECIPROCITY THEOREM
**** SMALL SIGNAL BIAS SOLUTION TEMPERATURE = 27.000 DEG C

NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE

( 1) 10.0000 ( 2) 10.0000 ( 3) 5.4545 ( 4) 0.0000

VOLTAGE SOURCE CURRENTS


NAME CURRENT

VS -4.132E-03
VX 4.132E-03
VY 2.479E-03………………………………………………..Verified

*RECIPROCITY THEOREM

**** OPERATING POINT INFORMATION TEMPERATURE = 27.000 DEG C

JOB CONCLUDED

TOTAL JOB TIME 0.00

RESULT:-

Thus the Reciprocity Theorem is verified using P Spice software

********************

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
4(b) NODAL ANALYSIS IN THE SUPER POSITION THEOREM CIRCUIT

AIM:-
To verify the Superposition Theorem with DC Input and find the Current [IT]
Using P Spice software.

Apparatus required:-

Personal Computer with MATLAB R2006b (7.3 Version) software

Given Circuit (General):-

The above circuit converting in to P-Spice circuit

PROCEDURE:-

1. Start the personal Computer and Open the Text Editor which is on the desktop.
2. For the above given circuit decide the node points for each component and also put a
dummy voltage source for the sake of measuring the current at nodes if necessary.
3. Write the program for the above ckt as given below
4. Save the file as .cir and close the file
5. Open the PSPICE AD, which is on the desk top and open the same file which is saved
by a name earlier in the Text editor.
6. You observe a dialog “Simulation completed successfully”
7. Open the file menu and Click the Examine output.
8. You observe the following output results whatever the requirements needed.
Continued……………1

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
Writing the Program for the above circuit:-
*SUPERPOSITION THEOREM
V1 1 0 DC 10V
VX 1 2 DC 0V
R1 2 3 1.1K
R2 3 5 2.2K
R3 3 4 3.3K
VY 4 0 DC 0V
VZ 5 6 DC 0V
V2 6 0 DC 15V
.OP
.END

OUT PUT:-
**** CIRCUIT DESCRIPTION

*SUPERPOSITION THEOREM
V1 1 0 DC 10V
VX 1 2 DC 0V
R1 2 3 1.1K
R2 3 5 2.2K
R3 3 4 3.3K
VY 4 0 DC 0V
VZ 5 6 DC 0V
V2 6 0 DC 15V
.OP
.END
**** SMALL SIGNAL BIAS SOLUTION TEMPERATURE = 27.000 DEG C

NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE

( 1) 10.0000 ( 2) 10.0000 ( 3) 9.5455 ( 4) 0.0000

( 5) 15.0000 ( 6) 15.0000

VOLTAGE SOURCE CURRENTS


NAME CURRENT
V1 -4.132E-04
VX 4.132E-04
VY 2.893E-03………………………………………………..Verified
VZ -2.479E-03
V2 -2.479E-03
TOTAL POWER DISSIPATION 4.13E-02 WATTS

**** OPERATING POINT INFORMATION TEMPERATURE = 27.000 DEG C

JOB CONCLUDED
TOTAL JOB TIME 0.00

RESULT:-

Thus the Super position Theorem is verified using P Spice software

********************
2

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
5. APPLICATION OF NETWORK THEOREM TO ELECTRICAL
NETWORK
AIM:-
To determine the Thevenin’s equivalent Voltage using P Spice software.

Apparatus required:-

Personal Computer with MATLAB R2006b (7.3 Version) software

Given Circuit:-

Procedure:-

1. Start the personal Computer and Open the Text Editor which is on the desktop.
2. For the above given circuit decide the node points for each component and also put a
dummy voltage source for the sake of measuring the current at nodes if necessary.
3. Write the program for the above ckt as given below
4. Save the file as .cir and close the file
5. Open the PSPICE AD, which is on the desk top and open the same file which is saved
by a name earlier in the Text editor.
6. You observe a dialog “Simulation completed successfully”
7. Open the file and Click the Examine out put.
8. You can observe the following output results as required.

Continued……………1

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
Program for the above circuit :-

*A DC CIRCUIT FOR DETERMINING THEVENIN'S EQUIVALENT


VIN 1 0 DC 10V
IS 4 3 DC 2A
VX 4 5 DC 0V
R1 1 2 5
R2 2 3 10
R3 2 0 20
R4 3 4 40
R5 5 0 10
.TF V (2,4) VIN
.END

OUTPUT:-
CIRCUIT DESCRIPTION

*A DC CIRCUIT FOR DETERMINING THEVENIN'S EQUIVALENT


VIN 1 0 DC 10V
IS 4 3 DC 2A
VX 4 5 DC 0V
R1 1 2 5
R2 2 3 10
R3 2 0 20
R4 3 4 40
R5 5 0 10
.TF V (2,4) VIN

**** SMALL SIGNAL BIAS SOLUTION TEMPERATURE = 27.000 DEG C

NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE

( 1) 10.0000 ( 2) 12.5000 ( 3) 23.7500 ( 4) -11.2500

( 5) -11.2500

VOLTAGE SOURCE CURRENTS


NAME CURRENT

VIN 5.000E-01
VX -1.125E+00

TOTAL POWER DISSIPATION -5.00E+00 WATTS

**** SMALL-SIGNAL CHARACTERISTICS


V(2,4)/VIN = 6.250E-01
INPUT RESISTANCE AT VIN = 2.000E+01
OUTPUT RESISTANCE AT V (2,4) = 1.094E+01

JOB CONCLUDED. TOTAL JOB TIME .03

RESULT:-
Thevenin’s equivalent Voltage using P Spice software is determined.

********************

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
6.LAPLACE TRANSFORM

AIM: -.
To write a MATLAB program and to plot the waveform synthesis using Laplace
transforms. .

SOFTWARE REQURIED :-

Personal Computer with MATLAB R2006b (7.3 Version) software

PROCEDURE:-
 Open MATLAB Software
 Open new M-file
 Type the program mentioned below
 Save in current directory
 Run the program
 For the output see command window\ Figure window.

PROGRAM:-
clc;
close all;
syms s;
F =(1/(s2))*(1-exp(-s)-(1/2)*exp(-3*s)+(1/2)*exp(-5*s));
f=ilaplace(F);
pretty(simplify(f))
ezplot(f,[0,5]);
grid;

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
OUTPUT:-

RESULT: -
Thus waveform is plotted by using waveform synthesis

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
Experiment No-7(a)

ZEROS AND POLES IN S- PLANE

AIM: -. To Write a MATLAB program and to draw Pole-Zero map in S-Plane

SOFTWARE REQURIED :
Personal Computer with MATLAB R2006b (7.3 Version) software
.
PROCEDURE:-
 Open MATLAB Software
 Open new M-file
 Type the program
 Save in current directory
 Run the program
 For the output see command window\ Figure window.

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
PROGRAM:-
clc; clear all; close all;
num=input('enter the numerator polynomial vector\n'); % [1 -2 1]
den=input('enter the denominator polynomial vector\n'); % [1 6 11 6]
H=tf(num,den)
[p z]=pzmap(H);
disp('zeros are at ');
disp(z);
disp('poles are at ');
disp(p);
pzmap(H);
if max(real(p))>=0
disp(' All the poles do not lie in the left half of S-plane ');
disp(' the given LTI systen is not a stable system ');
else
disp('All the poles lie in the left half of S-plane ');
disp(' the given LTI systen is a stable system ');
end;

RESULTS: - Thus the MATLAB program to draw pole-zero map in S-plane is successfully
completed.

OUTPUT:-

Enter the numerator polynomial vector


[1 -2 1]
Enter the denominator polynomial vector
[1 6 11 6]

Transfer function:
s^2 - 2 s + 1
----------------------
s^3 + 6 s^2 + 11 s + 6

Zeros are at
1
1

Poles are at
-3.0000
-2.0000
-1.0000

All the poles lie in the left half of S-plane


The given LTI system is a stable system

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
Experiment no-7(b)

ZEROS AND POLES IN Z- PLANE

AIM: -. To Write a MATLAB program and to draw Pole-Zero map in Z-Plane

SOFTWARE REQURIED :-
Personal Computer with MATLAB R2006b (7.3 Version) software

PROCEDURE:-
 Open MATLAB Software
 Open new M-file
 Type the program
 Save in current directory

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
 Run the program
 For the output see command window\ Figure window.

PROGRAM:-

clc; clear all; close all;


num=input('enter the numerator polynomial vector \n'); %[1 0 0]
den=input('enter the denominator polynomial vector \n');%[1 1 0.16]
H=filt(num,den)
z=zero(H);
disp('the zeros are at ');
disp(z);
[r p k]=residuez(num,den);
disp('the poles are at ');
disp(p);
zplane(num,den);
title('Pole-Zero map in the Z-plane');
if max(abs(p))>=1
disp('all the poles do not lie with in the unit circle');
disp('hence the system is not stable');
else
disp('all the poles lie with in the unit circle');
disp('hence the system is stable');
end;

RESULTS: - Thus the MATLAB program to draw pole-zero map in S-plane is successfully
completed.

OUTPUT:-
Enter the numerator polynomial vector
[1 0 0]
Enter the denominator polynomial vector
[1 1 0.16]

Transfer function:
1
--------------------
1 + z^-1 + 0.16 z^-2

The zeros are at


0
0

The poles are at


-0.8000
-0.2000

All the poles lie within the unit circle


Hence the system is stable

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
Experiment no-8

TRANSIENT RESPONSE OF RLC CIRCUIT WITH SINUSOIDAL INPUT

AIM:-
To determine the Transient Response of RLC Circuit with Sinusoidal Input and
find the Voltage & Current using P Spice software.

Apparatus required:-
Personal Computer with MATLAB R2006b (7.3 Version) software

Given Circuit

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
1. Start the personal Computer and Open the Text Editor which is on the desktop.
2. For the above given circuit decide the node points for each component and also put a
dummy voltage source for the sake of measuring the current at nodes if necessary.
3. Write the program for the above ckt as given below
4. Save the file as .cir and close the file
5. Open the PSPICE AD, which is on the desk top and open the same file which is saved
by a name earlier in the Text editor.
6. You observe a dialog “Simulation completed successfully”
7. Open the file menu and Click the Examine out put.
8. You observe the following output results whatever the requirements needed.
9. You also observe the following output as a graph if you click the run probe in file
menu & click the Trace and add the requirements then click OK.
10. Observe the required Graph of Voltage input /output components currents and node
voltages and currents etc.

* AN RLC CIRCUIT WITH SINUSOIDAL INPUT VOLTAGE


* SIN (V0 VA FREQ) ; SIMPLE SINUSOIDAL SOURCE
VIN 7 0 SIN( 0 10V 5KHZ); SINUSOIDAL INPUT VOLTAGE
R1 7 5 2
L1 5 3 50UH
C1 3 0 10UF
.TRAN 1US 500US
.PLOT TRAN V(3) V(7)
.PROBE
.END
OUTPUT RESULTS:
* AN RLC CIRCUIT WITH SINUSOIDAL INPUT VOLTAGE
**** CIRCUIT DESCRIPTION
******************************************************************************
* SIN (V0 VA FREQ) ; SIMPLE SINUSOIDAL SOURCE
VIN 7 0 SIN( 0 10V 5KHZ); SINUSOIDAL INPUT VOLTAGE
R1 7 5 2

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
L1 5 3 50UH
C1 3 0 10UF
.TRAN 1US 500US
.PLOT TRAN V(3) V(7)
.PROBE

* AN RLC CIRCUIT WITH SINUSOIDAL INPUT VOLTAGE

**** INITIAL TRANSIENT SOLUTION TEMPERATURE = 27.000 DEG C


*****************************************************************************
NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE
( 3) 0.0000 ( 5) 0.0000 ( 7) 0.0000
VOLTAGE SOURCE CURRENTS
NAME CURRENT

VIN 0.000E+00

TOTAL POWER DISSIPATION 0.00E+00 WATTS

* AN RLC CIRCUIT WITH SINUSOIDAL INPUT VOLTAGE

**** TRANSIENT ANALYSIS TEMPERATURE = 27.000 DEG C


******************************************************************************
LEGEND:
*: V(3)
+: V(7)

TIME V(3)
(*)---------- -2.0000E+01 -1.0000E+01 0.0000E+00 1.0000E+01 2.0000E+01
(+)---------- -1.0000E+01 -5.0000E+00 0.0000E+00 5.0000E+00 1.0000E+01
___________________________
4.980E-04 1.020E+01 . . .+ * .
4.990E-04 9.976E+00 . . .+ * .
5.000E-04 9.747E+00 . . + * .
---------------------------

JOB CONCLUDED

TOTAL JOB TIME .08

Experiment No-9

EVEN AND ODD PART OF A SIGNAL


AIM: - To write a MATLAB program and to find the even and odd parts of a signal.

SOFTWARE REQURIED :-

MATLAB R2006 b (7.3 Versions)


.
PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
 Compile and Run the program
 For the output see command window\ Figure window

PROGRAM:-

clc;
clear all;
close all;
t=-5:0.001:5;
A=0.8;
x1=A.^(t);
x2=A.^(-t);
if(x2==x1)
disp('The given signal is even signal');
else
if(x2==(-x1))
disp('The given signal is odd signal');
else
disp('The given signal is neither even nor odd');
end
end
xe=(x1+x2)/2;
xo=(x1-x2)/2;
subplot(2,2,1);
plot(t,x1);
xlabel('t');ylabel('x(t)');title('signal x(t)');
subplot(2,2,2);
plot(t,x2);
xlabel('t');ylabel('x(t)');title('signal x(-t)');
subplot(2,2,3);
plot(t,xe);
xlabel('t');ylabel('x(t)');title('even part signal x(t)');
subplot(2,2,4);
plot(t,xo);
xlabel('t');ylabel('x(t)');title('odd part signal x(t)');

RESULT:-

Thus the MATLAB Program to find even and odd parts of signals
completed successfully.

OUTPUT:-

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
Experiment No-10(a)

FOURIER TRANSFORMS AND INVERSE FOURIER TRANSFORMS

AIM: - To find Fourier transform and inverse Fourier transforms of given functions.

SOFTWARE REQURIED :-

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
Personal Computer with MATLAB R2006b (7.3 Version) software
.
PROCEDURE:-
 . Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

PROGRAM:-
To find Fourier transform

clc; clear all; close all;


syms t s;syms w real;
syms A real;syms o real;syms b float;
f=dirac(t);
F=fourier(f);
disp('the fourier transform of dirac(t) =');
disp(F);
f1=A*heaviside(t);
F1=fourier(f1);
disp('the fourier transform of A =');
disp(F1);
f2=A*exp(-t)*heaviside(t);
F2=fourier(f2);
disp('the fourier transform of exp(-t) =');
disp(F2);
f3=A*t*exp(-b*t)*heaviside(t);
F3=fourier(f3);
disp('the fourier transform of A*t*exp(-b*t)*u(t) =');
disp(F3);
f4=sin(o*t);
F4=fourier(f4);
disp('the fourier transform of sin(o*t) =');
disp(F4);

To find inverse Fourier transforms of Given functions.

F1=A*pi*(dirac(w-o)+dirac(w+o));
f1=ifourier(F1,t);
disp('the inverse fourier transform of A*pi*(dirac(w-o)+dirac(w+o)=');
disp(f1);
F2=A*pi*(dirac(w-o)-dirac(w+o))/i;
f2=ifourier(F2,t);
disp('the inverse fourier transform of A*pi*(dirac(w-o)+dirac(w+o)/i=');

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
disp(f2);
F3=A/(1+i*w);
f3=ifourier(F3,t);
disp('the inverse fourier transform of A/(1+jw)=');
disp(f3);
F4=(3*i*w+14)/((i*w)^2+7*i*w+12);
f4=ifourier(F4,t);
disp('the inverse fourier transform of (3*i*w+14)/((i*w)^2+7*i*w+12)=');
disp(f4);

RESULT: - Thus the MATLAB program to find fourier transform and inverse fourier
transform of given functions successfully completed.

OUTPUT:-
the fourier transform of dirac(t) =1

the fourier transform of A =A*(pi*dirac(w)-i/w)

the fourier transform of exp(-t) =


A/(1+i*w)

the fourier transform of A*t*exp(-b*t)*u(t) =


A/(b+i*w)^2

the fourier transform of sin(o*t) =


i*pi*(dirac(w+o)-dirac(w-o))

the inverse fourier transform of A*pi*(dirac(w-o)+dirac(w+o)=


A*cos(o*t)

the inverse fourier transform of A*pi*(dirac(w-o)+dirac(w+o)/i=


A*sin(o*t)

the inverse fourier transform of A/(1+jw)=


A*exp(-t)*heaviside(t)

the inverse fourier transform of (3*i*w+14)/((i*w)^2+7*i*w+12)=


heaviside(t)*(-2*exp(-4*t)+5*exp(-3*t))

Experiment no-10(b)

MAGNITUDE AND PHASE SPECTRUM OF FOURIER TRANSFORMS

AIM: -. To find Fourier transform of the given signal and to plot its magnitude and phase
spectrum.

SOFTWARE REQURIED :-

Personal Computer with MATLAB R2006b (7.3 Version) software

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
. PROCEDURE:-
 Open MATLAB
 Open new M-file
 Type the program
 Save in current directory
 Compile and Run the program
 For the output see command window\ Figure window

PROGRAM:-

clc; clear all; close all;


syms t s ;
syms w float;
f=3*exp(-t)*heaviside(t); % given function
F=fourier(f); % to find Fourier Transform
disp('the fourier transform of 3*exp(-t)*u(t) =');
disp(F); % to display the result in the command window
w=-2*pi:pi/50:2*pi;
F1=subs(F,w); % substitute w in F function
Fmag=abs(F1); % to find magnitude
Fphas=angle(F1); % to find phase
subplot(2,1,1);
plot(w,Fmag);
xlabel('w ---->');
ylabel('Magnitude --->');
title('Magnitude spectrum');
grid;
subplot(2,1,2);
plot(w,Fphas);
xlabel('w ---->');
ylabel('Phase in radians--->');
title('Phase spectrum');
grid;

RESULT: - Thus the MATLAB program to find fourier transform and ploting magnitude and
Phase spectrums successfully completed.

OUTPUT:-

The fourier transform of 3*exp (-t)*u (t) =


3/(1+i*w)

SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP


DEPT. OF EEE BASIC SIMULATION LAB
SIDDHARTHA INSTITUTE OF ENGINEERING AND TECHNOLOGY, IBP
DEPT. OF EEE BASIC SIMULATION LAB

You might also like