100% found this document useful (1 vote)
1K views

Cyber Exploration Laboratory 2.1

The document contains the work for a prelab and lab assignment on polynomial and transfer function calculations. In the prelab, various polynomials are calculated by hand and using MATLAB. Transfer functions are also derived and expressed in different forms such as factored and polynomial. In the lab, MATLAB is used to calculate the polynomials and transfer functions, and expressions are derived for combinations of the original transfer functions G1(s) and G2(s).
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views

Cyber Exploration Laboratory 2.1

The document contains the work for a prelab and lab assignment on polynomial and transfer function calculations. In the prelab, various polynomials are calculated by hand and using MATLAB. Transfer functions are also derived and expressed in different forms such as factored and polynomial. In the lab, MATLAB is used to calculate the polynomials and transfer functions, and expressions are derived for combinations of the original transfer functions G1(s) and G2(s).
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Cyber Exploration Laboratory 2.

1
Jemuel Vince S. Delfin
School of Electrical, Electronics and Computer Engineering
Mapua University, Intramuros, Manila
[email protected]
Prelab:

1. Calculate the following by hand or with a calculator:


a. The roots of P1 = s6 + 7s5 + 2s4 + 9s3 + 10s2 + 12s + 15
Answer:
−6.8731+0.0000 i0.7632+1.0822i0.7632−1.0822 i−1.0000+0.0000 i
−0.3266+1.0667 i−0.3266−1.0667 i

b. The roots of P2 = s6 + 9s5 + 8s4 + 9s3 + 12s2 + 15s + 20


Answer:
−8.1330+0.0000 i0.6996+ 0.9880i0.6996−0.9880 i−1.2183+0.0000 i
−0.5240+1.0501 i−0.5240−1.0501i

c. P3 = P1 + P2; P4 = P1 – P2; P5 = P1P2


Answer:
P3=2 s6 +16 s5 +10 s 4 +18 s3 +22 s 2+ 27 s +35
P4 =−2 s 5−6 s4 −2 s 2−3 s−5
P5=s 6+ 63 s5 +16 s 4 +81 s 3+ 120 s2 +180 s+300

2. Calculate by hand or with a calculator the polynomial


P6 = (s + 7)(s + 8)(s + 3)(s + 5)(s + 9)(s + 10)
Answer:
P6=s 6+ 42 s 5+ 718 s 4 +6372 s 3+ 30817 s 2+76530 s+75600

3. Calculate by hand or with a calculator the following transfer function:


20( s+ 2)(s+3)(s+6)( s+ 8)
a. G 1 ( s)= , represented as a numerator polynomial divided by a
s (s +7)( s+9)( s+10)( s+15)
denominator polynomial.
Answer:
20 s 4 +380 s 3+ 2480 s 2+6480 s+5760
G1 s = 5
( )
s + 41 s 4 +613 s 3 +3975 s 2+ 9450 s

s 4 +17 s3 +99 s2 +223 s +140


b. G 2 ( s )= , expressed as factors in the numerator
s 5+ 32 s4 + 363 s 3+2092 s2 +5052 s+ 4320
divided by factors in the denominator, similar to the form of G 1 (s) in Prelab 3a.
Answer:
( s+1)(s+ 4)(s +5)(s +7)
G 2 ( s )=
( s+16.79)(s−(−5.56+5.17 i))( s – (−5.56−5.17i))( s – (−2.05+ 0.52i))( s – (−2.05−0.52i))

c. G 3 ( s )=G 1 ( s )+G 2 ( s ) ; G 4 ( s )=G 1 ( s )−G 2 ( s ) ; G 5 ( s )=G 1 ( s ) G 2 ( s ), expressed as factors


divided by factors and expressed as polynomials divided by polynomials.
Answer:
 Expressed in factored form
21(s +16.76)(s +7.999)(s +6.003)(s 2+ 6.079 s+ 9.498)(s 2+3.033 s+2.607)(s2 +11.46 s+
G 3 ( s )=
s (s +7)( s+9)( s+10)( s+15)(s+16.79)( s2 +4.097 s+ 4.468)(s 2+ 11.12 s+ 57.6)

19( s+16.81)(s+8.001)(s +5.997)(s +3.252)(s +1.496)(s 2+ 4.335 s +6.018)(s 2 +10.74 s


G 4 ( s )=
s (s +7)(s +9)( s+10)( s+15)(s+16.79)(s 2 +4.097 s+ 4.468)( s 2+11.12 s+57.6)

20(s+2)( s+3)(s+ 4)(s+5)(s +6)(s+7)(s+8)( s+1)


G 5 ( s )=
s (s +7)( s+9)(s+10)( s+15)( s+16.79)(s 2 +4.097 s+ 4.468)( s 2+ 11.12 s+57.6)

 Expressed in polynomial form


21 s9 +1078 s8 +23309 s 7 +284298 s 6 +2.16e06 s 5 +1.04e07 s 4 +3.17e07 3+5.82e07 s 2+5.84
G 3 ( s )=
s 10+ 73 s 9+2288 s8 + 40566 s 7 +449993 s 6 +3.24e06 s5 +1.50e07 4 +4.25e07 s3 +6.49e07

19 s 9 +962 s 8 +20491 s7 +246942 s6 +1.86e06 s5 +9.03e06 s 4 +2.79e073 +5.28e07 s 2 +5.58e


G 4 ( s )=
s10 +73 s 9 +2288 s 8 +40566 s7 + 449993 s 6+ 3.24e06 s 5+1.50e07 4 + 4.25e07 s 3+ 6.49e07 s

20 s8 +720 s 7 +10920 s 6 +90720 s 5 +448980 s 4 +1.35e06 3+ 2.36e06 s 2+ 2.19e06 s+ 80


G 5 ( s )=
s 10+73 s9 +2288 s8 + 40566 s 7+ 449993 s 6 +3.24e06 s 5 +1.50e074 + 4.25e07 s3 +6.49e07 s2 +

4. Calculate by hand or with a calculator the partial-fraction expansion of the following transfer
functions:
5(s+2)
a. G 6 ( s)=
s ( s2 +8 s+15)
Answer:
2 5 3
G 6 ( s )= + −
3 s 6(s+3) 2( s+5)

5( s+2)
b. G 7 ( s)=
s (s2 +6 s+9)
Answer:
10 10 5
G 7 ( s )= − +
9 s 9(s +3) 3 ¿ ¿
5(s+2)
c. G 8 ( s)=
s ( s2 +6 s+34)
Answer:
55−5 s 5
G 8 ( s )= +
17( s +6 s+34) 17 s
2
Lab:

1. Use MATLAB to find P3, P4, and P5 in Prelab 1.


Commands used:

>> P3 = P1 + P2
>> P4 = P1 - P2
>> P5 = P1 .* P2

Matlab Output:

P3 =
2 16 10 18 22 27 35
P4 =
0 -2 -6 0 -2 -3 -5
P5 =
1 63 16 81 120 180 300

2. Use only one MATLAB command to find P6 in Prelab 2.


Commands used:

>> P6 = conv([1 7],conv([1 8],conv([1 3],conv([1 5],conv([1 9],[1 10])))))

Matlab Output:
P6 =
1 42 718 6372 30817 76530 75600

3. Use only two MATLAB commands to find G 1(s) in Prelab 3a represented as a polynomial
divided by a polynomial.
Commands used:

>> A = 20*conv([1 2],conv([1 3], conv([1 6],[1 8])));


>> G1P = tf(A,conv([1 0], conv([1 7],conv([1 9],conv([1 10],[1 15])))))

Matlab Output:

G1 =
20 s^4 + 380 s^3 + 2480 s^2 + 6480 s + 5760
-------------------------------------------
s^5 + 41 s^4 + 613 s^3 + 3975 s^2 + 9450 s
Continuous-time transfer function.
4. Use only two MATLAB commands to find G2(s) expressed as factors in the numerator divided by
factors in the denominator.
Commands used:

>> P = [-16.7851+0.0000i -5.5591+5.1669i -5.5591-5.1669i -2.0483+0.5221i


-2.0483-0.5221i];
>> G2 = zpk([-1 -4 -5 -7], P, [1])

Matlab Output:

G2 =
(s+1) (s+4) (s+5) (s+7)
------------------------------------------------------
(s+16.79) (s^2 + 4.097s + 4.468) (s^2 + 11.12s + 57.6)
Continuous-time zero/pole/gain model.

5. Using various combinations of G1(s) and G2(s), find G3(s), G4(s), and G5(s). Various combinations
imply mixing and matching G1(s) and G2(s) expressed as factors and polynomials. For example,
in finding G3(s), G1(s) can be expressed in factored form and G 2(s) can be expressed in
polynomial form. Another combination is G 1(s) and G2(s) both expressed as polynomials. Still
another combination is G1(s) and G2(s) both expressed in factored form.
Commands used:
 Expressed in factored form
>> G1F = zpk([-2 -3 -6 -8],[0 -7 -9 -10 -15], [20]);
>> G2F = zpk([-1 -4 -5 -7],[-16.7851+0.0000i -5.5591+5.1669i
-5.5591-5.1669i -2.0483+0.5221i -2.0483-0.5221i], [1]);

>> G3F = G1F + G2F


>> G4F = G1F - G2F
>> G5F = G1F .* G2F

 Expressed in polynomial form


>> G1P = tf(20*conv([1 2],conv([1 3], conv([1 6],[1 8]))),conv([1
0], conv([1 7],conv([1 9],conv([1 10],[1 15])))));
>> G2P = tf([1 17 99 223 140],[1 32 363 2092 5052 4320]);

>> G3P = G1P + G2P


>> G4P = G1P - G2P
>> G5P = G1P .* G2P

 Mixing and Matching G1(s) and G2(s) expressed as factors and polynomials
>> G3FP = G1F + G2P
>> G4FP = G1F - G2P
>> G5FP = G1F .* G2P
Matlab Output:
 Expressed in factored form
G3F =
21 (s+16.76) (s+7.999) (s+6.003) (s^2 + 6.079s + 9.498) (s^2 +
3.033s + 2.607) (s^2 + 11.46s + 59.47)
-------------------------------------------------------------------
s (s+7) (s+9) (s+10) (s+15) (s+16.79) (s^2 + 4.097s + 4.468) (s^2
+ 11.12s + 57.6)
Continuous-time zero/pole/gain model.

G4F =
19 (s+16.81) (s+8.001) (s+5.997) (s+3.252) (s+1.496) (s^2 + 4.335s
+ 6.018) (s^2 + 10.74s + 55.47)
--------------------------------------------------------------------
s (s+7) (s+9) (s+10) (s+15) (s+16.79) (s^2 + 4.097s + 4.468) (s^2
+ 11.12s + 57.6)
Continuous-time zero/pole/gain model.

G5F =
20 (s+2) (s+3) (s+4) (s+5) (s+6) (s+7) (s+8) (s+1)
--------------------------------------------------------------------
s (s+7) (s+9) (s+10) (s+15) (s+16.79) (s^2 + 4.097s + 4.468) (s^2
+ 11.12s + 57.6)
Continuous-time zero/pole/gain model.

 Expressed in polynomial form


G3P =
21 s^9 + 1078 s^8 + 23309 s^7 + 284298 s^6 + 2.156e06 s^5 +
1.043e07 s^4 + 3.173e07 s^3 + 5.816e07 s^2 + 5.842e07 s + 2.488e07
-------------------------------------------------------------------
s^10 + 73 s^9 + 2288 s^8 + 40566 s^7 + 449993 s^6 + 3.239e06
s^5 + 1.502e07 s^4 + 4.25e07 s^3 + 6.491e07 s^2 + 4.082e07 s
Continuous-time transfer function.

G4P =
19 s^9 + 962 s^8 + 20491 s^7 + 246942 s^6 + 1.862e06 s^5 +
9.034e06 s^4 + 2.791e07 s^3 + 5.284e07 s^2 + 5.577e07 s + 2.488e07
--------------------------------------------------------------------
s^10 + 73 s^9 + 2288 s^8 + 40566 s^7 + 449993 s^6 + 3.239e06 s^5
+ 1.502e07 s^4 + 4.25e07 s^3 + 6.491e07 s^2 + 4.082e07 s
Continuous-time transfer function.
G5P =
20 s^8 + 720 s^7 + 10920 s^6 + 90720 s^5 + 448980 s^4 + 1.346e06
s^3 + 2.362e06 s^2 + 2.192e06 s + 806400
--------------------------------------------------------------------
s^10 + 73 s^9 + 2288 s^8 + 40566 s^7 + 449993 s^6 + 3.239e06 s^5 +
1.502e07 s^4 + 4.25e07 s^3 + 6.491e07 s^2 + 4.082e07 s
Continuous-time transfer function.

 Mixing and Matching G1(s) and G2(s) expressed as factors and polynomials
G3FP =
21 (s+16.76) (s+7.999) (s+6.003) (s^2 + 6.079s + 9.499) (s^2 +
3.033s + 2.607) (s^2 + 11.46s + 59.47)
-------------------------------------------------------------------
s (s+7) (s+9) (s+10) (s+15) (s+16.79) (s^2 + 4.097s + 4.468)
(s^2 + 11.12s + 57.6)
Continuous-time zero/pole/gain model.

G4FP =
19 (s+16.81) (s+8.001) (s+5.997) (s+3.252) (s+1.496) (s^2 +
4.335s + 6.018) (s^2 + 10.74s + 55.47)
-------------------------------------------------------------------
s (s+7) (s+9) (s+10) (s+15) (s+16.79) (s^2 + 4.097s + 4.468)
(s^2 + 11.12s + 57.6)
Continuous-time zero/pole/gain model.

G5FP =
20 (s+2) (s+3) (s+4) (s+5) (s+6) (s+7) (s+8) (s+1)
-------------------------------------------------------------------
s (s+7) (s+9) (s+10) (s+15) (s+16.79) (s^2 + 4.097s + 4.468) (s^2
+ 11.12s + 57.6)
Continuous-time zero/pole/gain model.

6. Use MATLAB to evaluate the partial fraction expansions shown in Prelab 4.


Commands used:
a. >> A = conv([5],[1 2]);
>> B = conv([1 0],[1 8 15]);
>> [r p k] = residue(A,B)

b. >> A = conv([5],[1 2]);


>> B = conv([1 0],[1 6 9]);
>> [r p k] = residue(A,B)
c. >> A = conv([5],[1 2]);
>> B = conv([1 0],[1 6 34]);
>> [r p k] = residue(A,B)

Matlab Output:
a. r =
-1.5000
0.8333
0.6667
p =
-5
-3
0
k =
[]

b. r =
-1.1111
1.6667
1.1111
p =
-3
-3
0
k =
[]

c. r =
-0.1471 - 0.4118i
-0.1471 + 0.4118i
0.2941 + 0.0000i
p =
-3.0000 + 5.0000i
-3.0000 - 5.0000i
0.0000 + 0.0000i
k =
[]

You might also like