Any Type of Solutions, Assignments, Quizzes & also Semester projects available here. If you want to get upload anything, We can help you, this website is specifically designed to help the students of COMSATS (ciit-atd, ciit-isl, etc) specially new comers, so feel free in contacting us if you want any type of material from us......thanks @facebook: seek2omair@yahoo.com @twitter: seek2omair
Pages
- Home
- 1st Semester
- 2nd Semester
- 3rd Semester
- 4th Semester
- 5th Semester
- 6th Semester
- 7th Semester
- 8th Semester
- Electronics And Electrical Projects
- Engineering Books & Lectures
- Literature Books
- Imran Khan's Fans
- Poetry
- Online Games
- Naats And Hadiths
- Quran & Islamic Information
- Power Generation
- Entrepreneurship
Monday, October 1, 2012
Control LAB 04
LAB# 04 EPE:
Prelab 01
MATLAB Code:
clc
clear all
close all
p1=[1 7 2 9 10
12 15];
r1=roots(p1)
p2=[1 9 8 9 12
15 20];
r2=roots(p2)
p3=p1+p2
p4=p1-p2
p5=conv(p1,p2)
Results:
r1 =
-6.8731
0.7632 + 1.0822i
0.7632 - 1.0822i
-1.0000
-0.3266 + 1.0667i
-0.3266 - 1.0667i
r2 =
-8.1330
0.6996 + 0.9880i
0.6996 - 0.9880i
-1.2183
-0.5240 + 1.0501i
-0.5240 - 1.0501i
p3 =
2 16
10 18 22
27 35
p4 =
0 -2 -6
0 -2 -3
-5
p5 =
1 16
73 92 182
291 433 599
523 609
560 465 300
Prelab 02
MATLAB Code:
r=[-7 -8 -3 -5
-9 -10];
p6=poly(r)
Results:
p6
=
1 42 718 6372 30817 76530 75600
Prelab 03
MATLAB Code:
num=poly([0 -2
-3 -6 -8]);
den=poly([0 -7
-9 -19 -15]);
g1=tf(num,den)
g1=20*g1
% b
num=[0 1 17 99
223 140]
den=[1 32 363
2092 5052 4320]
g2=tf(num,den)
Z=zpk(g2)
% c
g3=parallel(g1,g2)
g4=parallel(g1,-g2)
g5=series(g1,g2)
Results:
Transfer
function:
20
s^5 + 380 s^4 + 2480 s^3 + 6480 s^2 + 5760 s
-----------------------------------------------
s^5 + 50 s^4 + 892 s^3 + 6702 s^2 + 17955 s
Zero/pole/gain:
(s+7) (s+5) (s+4) (s+1)
------------------------------------------------------
(s+16.79)
(s^2 + 4.097s + 4.468) (s^2 + 11.12s + 57.6)
Transfer
function: G1(s)+G2(s)
20 s^10 + 1021 s^9 + 21967 s^8 + 267461 s^7 +
2.036e006 s^6 + 9.962e006 s^5
+ 3.099e007 s^4 + 5.89e007
s^3 + 6.204e007 s^2 + 2.74e007 s
---------------------------------------------------------------------------------
s^10
+ 82 s^9 + 2855 s^8 + 55488 s^7 + 665867 s^6 + 5.13e006 s^5 + 2.526e007 s^4
+ 7.527e007
s^3 + 1.197e008 s^2 + 7.757e007 s
Transfer function: G1(s)-G2(s)
20 s^10 + 1019 s^9 + 21833 s^8 + 263779 s^7 +
1.982e006 s^6 + 9.499e006 s^5
+ 2.864e007 s^4 + 5.21e007
s^3 + 5.215e007 s^2 + 2.237e007 s
---------------------------------------------------------------------------------
s^10
+ 82 s^9 + 2855 s^8 + 55488 s^7 + 665867 s^6 + 5.13e006 s^5 + 2.526e007 s^4
+ 7.527e007
s^3 + 1.197e008 s^2 + 7.757e007 s
Transfer
function: G1(s)*G2(S)
20 s^9 + 720 s^8 + 10920 s^7 + 90720 s^6 +
448980 s^5 + 1.346e006 s^4
+
2.362e006 s^3 + 2.192e006 s^2 + 806400 s
---------------------------------------------------------------------------------
s^10
+ 82 s^9 + 2855 s^8 + 55488 s^7 + 665867 s^6 + 5.13e006 s^5 + 2.526e007 s^4
+ 7.527e007
s^3 + 1.197e008 s^2 + 7.757e007 s
Prelab 04
MATLAB Code:
a1=[0 0 5 10];
b1=[1 8 18 0];
[z,p,k]=residue(a1,b1)
a2=[0 0 5 10];
b2=[1 6 9 0];
[z,p,k]=residue(a2,b2)
a3=[0 0 5 10];
b3=[1 6 34 0];
[z,p,k]=residue(a3,b3)
Results:
z
=
-0.2778 - 0.9821i
-0.2778 + 0.9821i
0.5556
p
=
-4.0000 + 1.4142i
-4.0000 - 1.4142i
0
k
=
[]
z
=
-1.1111
1.6667
1.1111
p
=
-3
-3
0
k
=
[]
z
=
-0.1471 - 0.4118i
-0.1471 + 0.4118i
0.2941
p
=
-3.0000 + 5.0000i
-3.0000 - 5.0000i
0
k
=
[]
Prelab 01
MATLAB Code:
clc
close all
clear all
syms t
f=0.0075-(0.00034*exp(-2.5*t)*cos(22*t))+(0.087*exp(-2.5*t)*sin(22*t))-0.0072*exp(-8*t);
F=laplace(f);
F=simplify(F)
Results:
3 2
- 8 s
+ 394386 s + 3150455 s + 5883000
----------------------------------------
2
50000 s (s + 8) (4 s + 20 s + 1961)
Prelab 02
MATLAB Code:
syms s
F=(2*(s+3)*(s+5)*(s+7))/(s*(s+8)*(s^2+10*s+100));
f=ilaplace(F);
S=simplify(f);
pretty(S)
Results:
/ 1/2 1/2
\
| 1/2
3 sin(5 3 t) |
237 exp(-5 t) | cos(5 3 t) + ------------------ |
5 exp(-8 t)
\ 9 /
----------- +
---------------------------------------------------- + 21/80
112 140
Prelab 03
MATLAB Code:
syms s I1 I2 I3 V1
M=[7+s+1/(5*s)
-(s+2) -5;-(s+2) 4+2*s+1/(3*s) -(s+2);-5 -(s+2) 8+s+1/(4*s)]
I=[I1 I2 I3];
V=[V1 0 0];
delta1=[V1
-(s+2) -5;0 4+2*s+1/(3*s) -(s+2);0 -(s+2) 8+s+1/(4*s)];
delta2=[7+s+1/(5*s)
V1 -5;-(s+2) 0 -(s+2);-5 0 8+s+1/(4*s)];
delta3=[7+s+1/(5*s)
-(s+2) V1;-(s+2) 4+2*s+1/(3*s) 0;-5 -(s+2) 0];
I1=det(delta1)/det(M);
I1=I1/V1;
S=simplify(I1);
pretty(S)
I2=det(delta2)/det(M);
I2=I2/V1;
S=simplify(I2);
pretty(S)
I3=det(delta3)/det(M);
I3=I3/V1;
S=simplify(I3);
pretty(S)
Results:
M =
[ s + 1/(5*s) + 7,
- s - 2, -5]
[ - s - 2, 2*s +
1/(3*s) + 4, - s - 2]
[ -5, - s - 2, s + 1/(4*s) + 8]
I1/V1=
4
3 2
5 s (12 s + 192 s
+ 346 s + 44 s + 1)
---------------------------------------------
5 4 3 2
60 s + 887 s
+ 2142 s + 1331 s + 79 s + 1
I2/V1=
2 3
2
15 s (4 s +
60 s + 105 s + 2)
---------------------------------------------
5 4 3 2
60 s + 887 s
+ 2142 s + 1331 s + 79 s + 1
I3/V1=
2 3
2
20 s (3 s +
42 s + 72 s + 5)
---------------------------------------------
5 4 3 2
60 s + 887 s
+ 2142 s + 1331 s + 79 s + 1
Subscribe to:
Posts (Atom)