Simulation
Simulation
Simulation
AIM:
Write a program that promts the user to enter the time and plot this feed of an object as a
function of time using the formula v=g*t.
PROGRAM:
clear all
a=input('enter value of time =');
t=[0:0.01:a];
v=9.8*t;
plot(t,v)
xlabel t,ylabel v
OUTPUT:
80
70
60
50
40
30
20
10
4
t
EXPERIMENT 2
AIM:
Write a program to generate sinusoidal waveform of magnitude 230v rms and a f=50 hz
atleast 8 cycles and plot it.
PROGRAM:
clear all
v=230*(1.414);
t=[0:1e-4:0.16];
f=50;
V=v*sin(2*(3.14)*f*t);
plot(t,V)
xlabel t,ylabel V
OUTPUT:
400
300
200
100
-100
-200
-300
-400
0
0.02
0.04
0.06
0.08
t
0.1
EXPERIMENT 3
0.12
0.14
0.16
AIM :
Write a program to generate a 3 phase sinusoidal waveform of 230v rms and f=50 hz for
atleast 8 cycles and plot it.
PROGRAM :
clear all
v=230*(1.414);
t=[0:1e-4:0.16];
f=50;
R=v*sin(2*(3.14)*f*t);
Y=v*sin((2*(pi)*f*t)-((2*pi)/3));
B=v*sin((2*(pi)*f*t)+((2*pi)/3));
plot(t,R,t,Y,t,B)
OUTPUT :
400
300
200
100
-1 0 0
-2 0 0
-3 0 0
-4 0 0
0
0 . 02
0 .04
0 .0 6
0 .0 8
EXPERIMENT 4
0 .1
0 .1 2
0 .1 4
0 .1 6
AIM :
Write a program to generate a 3 separate sinusoidal waveform of phase magnitude of 230v
rms and current for resistive load of 2.5 ohm having a f=50 hz for aleast 8 cycles and plot it.
PROGRAM :
clear all
v=230*(1.414);
t=[0:1e-4:0.16];
f=50;
r=22.5;
R=v*sin(2*(3.14)*f*t);
Y=v*sin((2*(pi)*f*t)-((2*pi)/3));
B=v*sin((2*(pi)*f*t)+((2*pi)/3));
plot(t,R,t,Y,t,B)
Ir=R/r;
Iy=Y/r;
Ib=B/r;
subplot(3,1,1);plot(t,R,t,Ir)
subplot(3,1,2);plot(t,Y,t,Iy)
subplot(3,1,3);plot(t,B,t,Ib)
OUTPUT:
400
200
0
-200
-400
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
400
200
0
-200
-400
400
200
0
-200
-400
EXPERIMENT 5
AIM :
Write a program for second order system given below; plot the step response using
MATLAB.
T(s) =
150
2
s +17s+150.
PROGRAM :
clear all
num = [150];
den = [1 17 150];
sys = tf(num,den)
step(sys)
OUTPUT :
400
200
0
-2 0 0
-4 0 0
0
0 .0 2
0 .0 4
0.0 6
0.0 8
0 .1
0 .1 2
0.1 4
0 .1 6
0 .0 2
0 .0 4
0.0 6
0.0 8
0 .1
0 .1 2
0.1 4
0 .1 6
400
200
0
-2 0 0
-4 0 0
0
S te p R e s p o n s e
1 .5
Amplitude
0 .5
0 .1
0 .2
0 .3
0 .4
T im e ( s e c )
EXPERIMENT 6
0 .5
0 .6
0 .7
AIM :
Write a program for second order system given below; plot the step response using
MATLAB.
T(s) =
0.045
2
s +0.025s+0.045
PROGRAM :
clear all
num = [0.045];
den = [1 0.025 0.045];
sys = tf(num,den)
step(sys)
OUTPUT:
4 0 0
2 0 0
0
-2 0 0
-4 0 0
0
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0 .1 4
0 .1 6
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0 .1 4
0 .1 6
4 0 0
2 0 0
0
-2 0 0
-4 0 0
0
S te p R e s p o n s e
2
Am p litu d e
1 .5
1
0 .5
0
5 0
1 0 0
1 50
2 0 0
2 50
T im e ( s e c )
EXPERIMENT 7
3 0 0
3 5 0
40 0
4 50
AIM :
Write a program to plot the root locus or the system given below.
T(s) = 3s2+s+2
s3+7s2+14s+8
PROGRAM :
clear all
num = [3 1 2];
den = [1 7 14 8];
sys = tf(num,den)
rlocus(sys)
OUTPUT:
400
200
0
-2 0 0
-4 0 0
0
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0.14
0 .1 6
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0.14
0 .1 6
400
200
0
-2 0 0
-4 0 0
0
Root Locus
1
Imaginary Axis
0 .5
0
- 0 .5
-1
-7
-6
-5
-4
-3
R e a l A x is
EXPERIMENT 8
AIM:
-2
-1
OUTPUT :
4 0 0
2 0 0
0
-2 0 0
-4 0 0
0
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0 .1 4
0 .1 6
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0 .1 4
0 .1 6
4 0 0
2 0 0
0
-2 0 0
-4 0 0
0
B o d e D ia g r a m
G m = In f d B ( a t In f r a d / s e c ) ,
P m = 1 3 7 d e g ( a t 5 .9 1 r a d /s e c )
P h as e (de g )
M a gn itu de (d B )
1 0 0
0
-1 0 0
0
-9 0
-1 8 0
-1
1 0
1 0
1 0
F re q u e n c y
1 0
( r a d /s e c )
EXPERIMENT 9
1 0
AIM :
Write a program to plot Nyquist plot.
T(s) =
50
s2+3s+2
PROGRAM :
clear all
num = [50];
den = [1 3 2];
sys = tf(num,den)
nyquist(sys)
4 0 0
2 0 0
0
-2 0 0
-4 0 0
0
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0 .1 4
0 .1 6
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0 .1 4
0 .1 6
4 0 0
2 0 0
0
-2 0 0
-4 0 0
0
N y q u is t D ia g r a m
2 0
Im a g in a ry A x is
1 0
0
-1 0
-2 0
-5
1 0
R e a l A x is
EXPERIMENT 10
AIM :
1 5
2 0
2 5
OUTPUT :
4 0 0
2 0 0
0
-2 0 0
-4 0 0
0
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0 .1 4
0 .1 6
0 .0 2
0 .0 4
0 .0 6
0 .0 8
0 .1
0 .1 2
0 .1 4
0 .1 6
4 0 0
2 0 0
0
-2 0 0
-4 0 0
0
R o o t L o c u s
2 0
Im a g in a r y A x is
1 0
0
- 1 0
- 2 0
- 1 8
- 1 6
- 1 4
- 1 2
- 1 0
- 8
R e a l A x is
- 6
- 4
- 2
UNIVERSITY INSTITUTE OF
TECHNOLOGY
RAJIV GANDHI TECHNICAL UNIVERSITY
BHOPAL(MP)
(Department of Electrical and Electronics)
2011-2012
PRACTICAL FILE
SELF STUDY
SUBMITTED TO
SUBMITTED BY
RUPESH UIKEY
EX 7th SEM
0101EX071047
UNIVERSITY INSTITUTE OF
TECHNOLOGY
RAJIV GANDHI TECHNICAL UNIVERSITY
BHOPAL(MP)
(Department of Electrical and Electronics)
2011-2012
PRACTICAL FILE
SIMULATION
SUBMITTED TO
SUBMITTED BY
MAYANK PAREEK
EX 7th SEM
0101EX081029