0% found this document useful (0 votes)
918 views21 pages

Matlab 1

This document describes an electrical engineering laboratory experiment on using MATLAB to manipulate polynomials and transfer functions. It provides objectives, required software, examples of calculating polynomial roots and multiplying polynomials by hand, and examples of representing transfer functions as polynomials or factors over polynomials.

Uploaded by

Karumon Utsumi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
918 views21 pages

Matlab 1

This document describes an electrical engineering laboratory experiment on using MATLAB to manipulate polynomials and transfer functions. It provides objectives, required software, examples of calculating polynomial roots and multiplying polynomials by hand, and examples of representing transfer functions as polynomials or factors over polynomials.

Uploaded by

Karumon Utsumi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 21

Mindanao State University

MSU-Main, Marawi City


Department of Electrical Engineering

EEE 160 LABORATORY


EXPERIMENT NO.1

Submitted to:
Engr. Johaimen M. Omar

Submitted by:
Rauda Nano Antol

May 12, 2023


EEE 160 LABORATORY EXPERIMENT NO.1

1.1 OBJECTIVES
To learn to use MATLAB to (1) generate polynomials, (2) manipulate polynomials, (3) generate transfer
functions, (4) manipulate transfer functions, and (5) perform partial-fraction expansions.

1.2 MINIMUM REQUIRED SOFTWARE PACKAGES


MATLAB

1.3 PRELAB
1. Calculate the following by hand or with a calculator:
a. The roots of 𝑃1 = 𝑠6 + 7𝑠5 + 2𝑠4 + 9𝑠3 + 10𝑠2 + 12𝑠 + 15
b. The roots of 𝑃2 = 𝑠6 + 9𝑠5 + 8𝑠4 + 9𝑠3 + 12𝑠2 + 15𝑠 + 20
c. 𝑃3 = 𝑃1 + 𝑃2 ; 𝑃4 = 𝑃1 − 𝑃2 ; 𝑃5 = 𝑃1 𝑃2

Solution 1a:
Irrational and complex roots must be expected. Since higher order polynomials are involved, the better
way to find roots with a calculator is the Newton’s method by which selecting random real or complex
numbers and then iterating until each exact root is extracted. Although this is a trial-and-error method, it
is more effective and faster than other manual methods. The Newton’s method is given by
𝑃 (𝑠𝑛 )
𝑠𝑛 = 𝑠𝑛+1 −
𝑃 (𝑠𝑛 )
Knowing that
𝑃1 = 𝑠6 + 7𝑠5 + 2𝑠4 + 9𝑠3 + 10𝑠2 + 12𝑠 + 15 and
𝑃1 = 6𝑠5 + 35𝑠4 + 8𝑠3 + 27𝑠2 + 20𝑠 + 12
With the calculator, use ANS as iteration and compute
ANS6 + 7(ANS5 ) + 2(ANS4 ) + 9(ANS3 ) + 10(ANS2 ) + 12(ANS) + 15
𝑠 = ANS −
6(ANS5 ) + 35(ANS4 ) + 8(ANS3 ) + 27(ANS2 ) + 20(ANS) + 12
For 1st root, select ANS = −6, For 2nd root, select ANS = −1,
𝑠 = −9.1597 𝑠 = −1
𝑠 = −8.1416 𝑠 = −1
𝑠 = −7.4278 ⋮
𝑠 = −7.0236 𝑠 = −1
𝑠 = −6.8876
𝑠 = −6.8733
𝑠 = −6.8731
𝑠 = −6.8731

𝑠 = −6.8731
For 3rd and 4th roots, select ANS = −1 ± 𝑗, For 5th and 6th roots, select ANS = 1 ± 𝑗,
𝑠 = −0.7015 ± 𝑗0.7913 𝑠 = 0.8126 ± 𝑗1.0110
𝑠 = −0.2717 ± 𝑗0.6783 𝑠 = 0.7532 ± 𝑗1.0718
𝑠 = −0.3984 ± 𝑗1.5237 𝑠 = 0.7634 ± 𝑗1.0826
𝑠 = −0.3390 ± 𝑗1.2694 𝑠 = 0.7632 ± 𝑗1.0822
𝑠 = −0.3185 ± 𝑗1.1181 𝑠 = 0.7632 ± 𝑗1.0822
𝑠 = −0.3242 ± 𝑗1.0700 𝑠⋮
𝑠 = −0.3266 ± 𝑗1.0667 𝑠 = 0.7632 ± 𝑗1.0822
𝑠 = −0.3266 ± 𝑗1.0667

𝑠 = −0.3266 ± 𝑗1.0667
Thus, the roots are
𝑠 = −6.8731
𝑠 = −1
𝑠 = −0.3266 − 𝑗1.0667
𝑠 = −0.3266 + 𝑗1.0667
𝑠 = 0.7632 − 𝑗1.0822
𝑠 = 0.7632 + 𝑗1.0822

Solution 1b:
Knowing that
𝑃2 = 𝑠6 + 9𝑠5 + 8𝑠4 + 9𝑠3 + 12𝑠2 + 15𝑠 + 20 and
𝑃2 = 6𝑠5 + 45𝑠4 + 32𝑠3 + 27𝑠2 + 24𝑠 + 15
With the calculator, compute
ANS6 + 9(ANS5 ) + 8(ANS4 ) + 9(ANS3 ) + 12(ANS2 ) + 15(ANS) + 20
𝑠 = ANS −
6(ANS5 ) + 45(ANS4 ) + 32(ANS3 ) + 27(ANS2 ) + 24(ANS) + 15
For 1st root, select ANS = −8, For 2nd root, select ANS = −1,
𝑠 = −8.1453 𝑠 = −1.3200
𝑠 = −8.1331 𝑠 = −1.2323
𝑠 = −8.1330 𝑠 = −1.2186
𝑠 = −8.1330 𝑠 = −1.2183
⋮ 𝑠 = −1.2183
𝑠 = −8.1330 ⋮
𝑠 = −1.2183
For 3rd and 4th roots, select ANS = −1 ± 𝑗, For 5th and 6th roots, select ANS = 1 ± 𝑗,
𝑠 = −0.7168 ± 𝑗0.8399 𝑠 = 0.8009 ± 𝑗0.9542
𝑠 = −0.3863 ± 𝑗0.9486 𝑠 = 0.7081 ± 𝑗0.9716
𝑠 = −0.5789 ± 𝑗1.0392 𝑠 = 0.6990 ± 𝑗0.9878
𝑠 = −0.5239 ± 𝑗1.0450 𝑠 = 0.6996 ± 𝑗0.9880
𝑠 = −0.5240 ± 𝑗1.0501 𝑠 = 0.6996 ± 𝑗0.9880
𝑠 = −0.5240 ± 𝑗1.0501 ⋮
⋮ 𝑠 = 0.6996 ± 𝑗0.9880
𝑠 = −0.5240 ± 𝑗1.0501 −
Thus, the roots are
𝑠 = −8.1330
𝑠 = −1.2183
𝑠 = −0.5240 − 𝑗1.0501
𝑠 = −0.5240 + 𝑗1.0501
𝑠 = 0.6996 − 𝑗0.9880
𝑠 = 0.6996 + 𝑗0.9880

Solution 1c:
𝑃 3 = 𝑃1 + 𝑃 2
𝑃3 = 𝑠6 + 7𝑠5 + 2𝑠4 + 9𝑠3 + 10𝑠2 + 12𝑠 + 15 + 𝑠6 + 9𝑠5 + 8𝑠4 + 9𝑠3 + 12𝑠2 + 15𝑠 + 20
𝑃3 = 2𝑠6 + 16𝑠5 + 10𝑠4 + 18𝑠3 + 22𝑠2 + 27𝑠 + 35

𝑃 4 = 𝑃1 − 𝑃 2
𝑃4 = 𝑠6 + 7𝑠5 + 2𝑠4 + 9𝑠3 + 10𝑠2 + 12𝑠 + 15 − 𝑠6 + 9𝑠5 + 8𝑠4 + 9𝑠3 + 12𝑠2 + 15𝑠 + 20
𝑃4 = −2𝑠5 − 6𝑠4 − 2𝑠2 − 3𝑠 − 5

Multiplying two factors with such higher order polynomial can be done by Pascal triangle to neaten the
solution.
𝑃5 = 𝑃1 𝑃2
𝑃5 = 𝑠6 + 7𝑠5 + 2𝑠4 + 9𝑠3 + 10𝑠2 + 12𝑠 + 15 𝑠6 + 9𝑠5 + 8𝑠4 + 9𝑠3 + 12𝑠2 + 15𝑠 + 20
𝑃5 = 𝑠12 + (9 + 7)𝑠11 + (8 + 63 + 2)𝑠10 + (9 + 56 + 18 + 9)𝑠9 + (12 + 63 + 16 + 81)𝑠8 + (15 + 84
+ 18 + 72 + 90 + 12)𝑠7 + (20 + 105 + 24 + 81 + 80 + 108 + 15)𝑠6 + (140 + 30
+ 108 + 90 + 96 + 135)𝑠5 + (40 + 135 + 120 + 108 + 120)𝑠4 + (180 + 150 + 144
+ 135)𝑠3 + (200 + 180 + 180)𝑠2 + (240 + 225)𝑠 + 300
𝑃5 = 𝑠12 + 16𝑠11 + 73𝑠10 + 92𝑠9 + 182𝑠8 + 291𝑠7 + 433𝑠6 + 599𝑠5 + 523𝑠4 + 609𝑠3 + 560𝑠2 + 465𝑠
+ 300

2. Calculate by hand or with a calculator the polynomial


𝑃6 = (𝑠 + 7)(𝑠 + 8)(𝑠 + 3)(𝑠 + 5)(𝑠 + 9)(𝑠 + 10)
Solution 2:
𝑃6 = (𝑠 + 7)(𝑠 + 8)(𝑠 + 3)(𝑠 + 5)(𝑠 + 9)(𝑠 + 10)
𝑃6 = (𝑠2 + 15𝑠 + 56)(𝑠2 + 8𝑠 + 15)(𝑠2 + 19𝑠 + 90)
𝑃6 = (𝑠4 + 23𝑠3 + 191𝑠2 + 673𝑠 + 840)(𝑠2 + 19𝑠 + 90)
𝑃6 = 𝑠6 + 42𝑠5 + 718𝑠4 + 6372𝑠3 + 30 817𝑠2 + 76 530𝑠 + 75 600

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


20(𝑠 + 2)(𝑠 + 3)(𝑠 + 6)(𝑠 + 8)
a. 𝐺1 (𝑠) = ,
𝑠(𝑠 + 7)(𝑠 + 9)(𝑠 + 10)(𝑠 + 15)
represented as a numerator polynomial divided by a denominator polynomial.
𝑠4 + 17𝑠3 + 99𝑠2 + 223𝑠 + 140
b. 𝐺2 (𝑠) = ,
𝑠5 + 32𝑠4 + 363𝑠3 + 2092𝑠2 + 5052𝑠 + 4320
expressed as factors in the numerator divided by factors in the denominator, similar to the form of
𝐺1 (𝑠) in Prelab 3a.
c. 𝐺3 (𝑠) = 𝐺1 (𝑠) + 𝐺2 (𝑠); 𝐺4 (𝑠) = 𝐺1 (𝑠) − 𝐺2 (𝑠); 𝐺5 (𝑠) = 𝐺1 (𝑠)𝐺2 (𝑠)
expressed as factors divided by factors and expressed as polynomials divided by polynomials.

Solution 3a:
20(𝑠 + 2)(𝑠 + 3)(𝑠 + 6)(𝑠 + 8)
𝐺1 (𝑠) =
𝑠(𝑠 + 7)(𝑠 + 9)(𝑠 + 10)(𝑠 + 15)
20(𝑠2 + 5𝑠 + 6)(𝑠2 + 14𝑠 + 48)
𝐺1 (𝑠) = 2
𝑠(𝑠 + 16𝑠 + 63)(𝑠2 + 25𝑠 + 150)
20(𝑠4 + 19𝑠3 + 124𝑠2 + 324𝑠 + 288)
𝐺1 (𝑠) = 4
𝑠(𝑠 + 41𝑠3 + 613𝑠2 + 3975𝑠 + 9450)
20𝑠4 + 380𝑠3 + 2480𝑠2 + 6480𝑠 + 5760
𝐺1 (𝑠) = 5
𝑠 + 41𝑠4 + 613𝑠3 + 3975𝑠2 + 9450𝑠

Solution 3b:
𝑠4 + 17𝑠3 + 99𝑠2 + 223𝑠 + 140
𝐺2 (𝑠) =
𝑠5 + 32𝑠4 + 363𝑠3 + 2092𝑠2 + 5052𝑠 + 4320
Let us distinguish the numerator n and denominator d for factoring.
For numerator, the remainder theorem can be tested where the remainder must be zero. Recall the rational
root theorem where the factors of constant term can be possible to get the roots. Knowing that factors of
±140 are ±1, ±2, ±4, ±5, ±7, ±10, ±14, ±20, ±28, ±35 and ±70. With the calculator, compute
𝑅 = ANS4 + 17(ANS3 ) + 99(ANS2 ) + 223(ANS) + 140
For the roots 𝑠 = {−7, −5, −4, −1}, all 𝑅 = 0.

For denominator, the Newton’s method is used. Knowing that


𝑑 = 𝑠5 + 32𝑠4 + 363𝑠3 + 2092𝑠2 + 5052𝑠 + 4320 and
𝑑 = 5𝑠4 + 128𝑠3 + 1089𝑠2 + 4184𝑠 + 5052
With the calculator, compute
𝑠5 + 32(ANS4 ) + 363(ANS3 ) + 2092(ANS2 ) + 5052(ANS) + 4320
𝑠 = ANS −
5(ANS4 ) + 128(ANS3 ) + 1089(ANS2 ) + 4184(ANS) + 5052
For 1st root, select ANS = −15, For 2nd and 3th roots, select ANS = −5 ± 5𝑗,
𝑠 = −19.1151 𝑠 = −5.6475 ± 𝑗5.0273
𝑠 = −17.6338 𝑠 = −5.5475 ± 𝑗5.1681
𝑠 = −16.9425 𝑠 = −5.5591 ± 𝑗5.1668
𝑠 = −16.7917 𝑠 = −5.5591 ± 𝑗5.1669
𝑠 = −16.7851 ⋮
𝑠 = −16.7851 𝑠 = −5.5591 ± 𝑗5.1669

𝑠 = −16.7851
For 4th and 5th roots, select ANS = −5 ± 𝑗,
𝑠 = −3.0002 ± 𝑗0.4706
𝑠 = −2.3234 ± 𝑗0.2385
𝑠 = −1.8610 ± 𝑗0.3955
𝑠 = −2.0771 ± 𝑗0.4706
𝑠 = −2.0456 ± 𝑗0.5247
𝑠 = −2.0483 ± 𝑗0.5221
𝑠 = −2.0483 ± 𝑗0.5221

𝑠 = −2.0483 ± 𝑗0.5221
The factors are simplified not to show complex numbers.
(𝑠 + 1)(𝑠 + 4)(𝑠 + 5)(𝑠 + 7)
𝐺2 (𝑠) =
(𝑠 + 16.7851)(𝑠 + 2.0483 + 𝑗0.5221)(𝑠 + 2.0483 − 𝑗0.5221)
(𝑠 + 5.5591 + 𝑗5.1669)(𝑠 + 5.5591 − 𝑗5.1669)

(𝑠 + 1)(𝑠 + 4)(𝑠 + 5)(𝑠 + 7)


𝐺2 (𝑠) =
(𝑠 + 16.7851)(𝑠2 + 4.0966𝑠 + 4.4681)(𝑠2 + 11.1182𝑠 + 57.6004)

Solution 3c:
Polynomial form of 𝐺3 (𝑠):
𝐺3 (𝑠) = 𝐺1 (𝑠) + 𝐺2 (𝑠)

20𝑠4 + 380𝑠3 + 2480𝑠2 + 6480𝑠 + 5760 𝑠4 + 17𝑠3 + 99𝑠2 + 223𝑠 + 140


𝐺3 (𝑠) = +
𝑠5 + 41𝑠4 + 613𝑠3 + 3975𝑠2 + 9450𝑠 𝑠5 + 32𝑠4 + 363𝑠3 + 2092𝑠2 + 5052𝑠 + 4320

20𝑠4 + 380𝑠3 + 2480𝑠2 + 6480𝑠 + 5760 𝑠5 + 32𝑠4 + 363𝑠3 + 2092𝑠2 + 5052𝑠 + 4320
+ 𝑠4 + 17𝑠3 + 99𝑠2 + 223𝑠 + 140 𝑠5 + 41𝑠4 + 613𝑠3 + 3975𝑠2 + 9450𝑠
𝐺3 (𝑠) =
𝑠5 + 41𝑠4 + 613𝑠3 + 3975𝑠2 + 9450𝑠 𝑠5 + 32𝑠4 + 363𝑠3 + 2092𝑠2 + 5052𝑠 + 4320

⎡ 20𝑠9 + 1020𝑠8 + 21 900𝑠7 + 265 620𝑠6 + 2 009 360𝑠5 + 9 730 880𝑠4 ⎤


⎢ + 29 817 600𝑠3 + 55 500 480𝑠2 + 57 093 120𝑠 + 24 883 200 ⎥
⎢+ 𝑠9 + 58𝑠8 + 1409𝑠7 + 18 678𝑠6 + 146 995𝑠5 + 696614𝑠4 + 1 907 795𝑠3 ⎥
⎣ + 2 663 850𝑠2 + 1 323 000𝑠 ⎦
𝐺3 (𝑠) =
10 9 8 7 6 5
𝑠 + 73𝑠 + 2288𝑠 + 40 566𝑠 + 449 993𝑠 + 3 239 173𝑠 + 15 020 046𝑠 4
+ 42 499 260𝑠3 + 64 913 400𝑠2 + 40 824 000𝑠

21𝑠9 + 1078𝑠8 + 23 309𝑠7 + 284 298𝑠6 + 2 156 355𝑠5 + 10 427 494𝑠4


+ 31 725 395𝑠3 + 58 164 330𝑠2 + 58 416 120𝑠 + 24 883 200
𝐺3 (𝑠) =
𝑠10 + 73𝑠9 + 2288𝑠8 + 40 566𝑠7 + 449 993𝑠6 + 3 239 173𝑠5 + 15 020 046𝑠4
+ 42 499 260𝑠3 + 64 913 400𝑠2 + 40 824 000𝑠

Factored form of 𝐺3 (𝑠):


Whereas LCD is used in the denominator, Newton’s method is used in the numerator. With the calculator,
compute
21(ANS9 ) + 1078(ANS8 ) + 23 309(ANS7 ) + 284 298(ANS6 ) + 2 156 355(ANS5 )
+ 10 427 494(ANS4 ) + 31 725 395(ANS3 ) + 58 164 330(ANS2 )
+ 58 416 120(ANS) + 24 883 200
𝑠 = ANS −
189(ANS ) + 8624(ANS ) + 163 163(ANS6 ) + 1 705 788(ANS5 ) + 10 781 775(ANS4 )
8 7
+ 41 709 976(ANS3 ) + 95 176 185(ANS2 ) + 116 328 660(ANS) + 58 416 120
For 1st root, select ANS = −20, For 2nd root, select ANS = −10,
𝑠 = −18.7701 𝑠 = −9.2383
𝑠 = −17.8117 𝑠 = −8.6641
𝑠 = −17.1594 𝑠 = −8.2725
𝑠 = −16.8370 𝑠 = −8.0645
𝑠 = −16.7613 𝑠 = −8.0040
𝑠 = −16.7575 𝑠 = −7.9993
𝑠 = −16.7575 𝑠 = −7.9992
⋮ 𝑠 = −7.9992
𝑠 = −16.7575 ⋮
𝑠 = −7.9992
For 3rd root, select ANS = −6, For 4th and 5th roots, select ANS = −6 ± 𝑗5,
𝑠 = −6.0029 𝑠 = −5.6775 ± 𝑗5.0658
𝑠 = −6.0029 𝑠 = −5.7412 ± 𝑗5.1691
⋮ 𝑠 = −5.7307 ± 𝑗5.1602
𝑠 = −6.0029 𝑠 = −5.7305 ± 𝑗5.1602
𝑠 = −5.7305 ± 𝑗5.1602

𝑠 = −5.7305 ± 𝑗5.1602
For 6th and 7th roots, select ANS = −5 ± 𝑗, For 8th and 9th roots, select ANS = −1 ± 𝑗,
𝑠 = −4.6927 ± 𝑗0.1520 𝑠 = −1.2448 ± 𝑗0.8222
𝑠 = −2.9676 ± 𝑗0.5545 𝑠 = −1.4117 ± 𝑗0.6818
𝑠 = −3.0316 ± 𝑗0.5044 𝑠 = −1.4967 ± 𝑗0.5914
𝑠 = −3.0397 ± 𝑗0.5095 𝑠 = −1.5165 ± 𝑗0.5572
𝑠 = −3.0396 ± 𝑗0.5095 𝑠 = −1.5168 ± 𝑗0.5536
𝑠 = −3.0396 ± 𝑗0.5095 𝑠 = −1.5167 ± 𝑗0.5536
⋮ 𝑠 = −1.5167 ± 𝑗0.5536
𝑠 = −3.0396 ± 𝑗0.5095 ⋮
𝑠 = −1.5167 ± 𝑗0.5536
Because of this “gain” which can be found the coefficient of the leading order of polynomial in the
numerator, that is 21, therefore
21(𝑠 + 16.7575)(𝑠 + 7.9992)(𝑠 + 6.0029)(𝑠 + 5.7305 + 𝑗5.1602)(𝑠 + 5.7305 − 𝑗5.1602)
(𝑠 + 1.5167 + 𝑗0.5536)(𝑠 + 1.5167 − 𝑗0.5536)
(𝑠 + 3.0396 + 𝑗0.5095)(𝑠 + 3.0396 − 𝑗0.5095)
𝐺3 (𝑠) =
𝑠(𝑠 + 7)(𝑠 + 9)(𝑠 + 10)(𝑠 + 15)(𝑠 + 16.7851)(𝑠2 + 4.0966𝑠 + 4.4681)
(𝑠2 + 11.1182𝑠 + 57.6004)

21(𝑠 + 16.7575)(𝑠 + 7.9992)(𝑠 + 6.0029)(𝑠2 + 11.4610𝑠 + 59.4663)


(𝑠2 + 3.0334𝑠 + 2.6069)(𝑠2 + 6.0792𝑠 + 9.4986)
𝐺3 (𝑠) =
𝑠(𝑠 + 7)(𝑠 + 9)(𝑠 + 10)(𝑠 + 15)(𝑠 + 16.7851)(𝑠2 + 4.0966𝑠 + 4.4681)
(𝑠2 + 11.1182𝑠 + 57.6004)

Polynomial form of 𝐺4 (𝑠): Same concept with 𝐺3 (𝑠).


𝐺4 (𝑠) = 𝐺1 (𝑠) − 𝐺2 (𝑠)
⎡ 20𝑠9 + 1020𝑠8 + 21 900𝑠7 + 265 620𝑠6 + 2 009 360𝑠5 + 9 730 880𝑠4 ⎤
⎢ + 29 817 600𝑠3 + 55 500 480𝑠2 + 57 093 120𝑠 + 24 883 200 ⎥
⎢− 𝑠9 + 58𝑠8 + 1409𝑠7 + 18 678𝑠6 + 146 995𝑠5 + 696614𝑠4 + 1 907 795𝑠3 ⎥
⎣ + 2 663 850𝑠2 + 1 323 000𝑠 ⎦
𝐺4 (𝑠) =
10 9 8 7 6 5
𝑠 + 73𝑠 + 2288𝑠 + 40 566𝑠 + 449 993𝑠 + 3 239 173𝑠 + 15 020 046𝑠 4
+ 42 499 260𝑠3 + 64 913 400𝑠2 + 40 824 000𝑠

19𝑠9 + 962𝑠8 + 20 491𝑠7 + 246 942𝑠6 + 1 862 365𝑠5 + 9 034 266𝑠4


+ 27 909 805𝑠3 + 52 836 630𝑠2 + 55 770 120𝑠 + 24 883 200
𝐺4 (𝑠) =
𝑠10 + 73𝑠9 + 2288𝑠8 + 40 566𝑠7 + 449 993𝑠6 + 3 239 173𝑠5 + 15 020 046𝑠4
+ 42 499 260𝑠3 + 64 913 400𝑠2 + 40 824 000𝑠

Factored form of 𝐺4 (𝑠): Whereas LCD is used in the denominator, Newton’s method is used in the
numerator. With the calculator, compute
19(ANS9 ) + 962(ANS8 ) + 20 491(ANS7 ) + 246 942(ANS6 ) + 1 862 365(ANS5 )
+ 9 034 266(ANS4 ) + 27 909 805(ANS3 ) + 52 836 630(ANS2 )
+ 55 770 120(ANS) + 24 883 200
𝑠 = ANS −
171(ANS ) + 7696(ANS7 ) + 143 437(ANS6 ) + 1 481 652(ANS5 ) + 9 311 825(ANS4 )
8
+ 36 137 064(ANS3 ) + 83 729 415(ANS2 ) + 105 673 260(ANS) + 55 770 120

For 1st root, select ANS = −17, For 2nd root, select ANS = −8,
𝑠 = −16.8330 𝑠 = −8.0008
𝑠 = −16.8140 𝑠 = −8.0008
𝑠 = −16.8138 𝑠⋮
𝑠 = −16.8138 𝑠 = −8.0008
𝑠⋮
𝑠 = −16.8138
For 3rd root, select ANS = −6, For 4th root, select ANS = −3,
𝑠 = −5.9971 𝑠 = −3.3092
𝑠 = −5.9971 𝑠 = −3.2537
𝑠⋮ 𝑠 = −3.2517
𝑠 = −5.9971 𝑠 = −3.2517
𝑠 ⋮
𝑠 = −3.2517
For 5th root, select ANS = −1, For 6th and 7th roots, select ANS = −5 ± 𝑗5,
𝑠 = −1.2545 𝑠 = −5.4680 ± 𝑗4.9810
𝑠 = −1.4182 𝑠 = −5.3160 ± 𝑗5.1735
𝑠 = −1.4853 𝑠 = −5.3680 ± 𝑗5.1588
𝑠 = −1.4953 𝑠 = −5.3690 ± 𝑗5.1617
𝑠 = −1.4955 𝑠 = −5.3690 ± 𝑗5.1617
𝑠 = −1.4955 𝑠⋮
𝑠⋮ 𝑠 = −5.3690 ± 𝑗5.1617
𝑠 = −1.4955
For 8th and 9th roots, select ANS = −2 ± 𝑗2,
𝑠 = −2.1449 ± 𝑗1.6425
𝑠 = −2.2100 ± 𝑗1.3670
𝑠 = −2.2054 ± 𝑗1.1991
𝑠 = −2.1739 ± 𝑗1.1488
𝑠 = −2.1673 ± 𝑗1.1490
𝑠 = −2.1674 ± 𝑗1.1491
𝑠 = −2.1674 ± 𝑗1.1491
𝑠⋮
𝑠 = −2.1674 ± 𝑗1.1491
Because of this “gain” which can be found the coefficient of the leading order of polynomial in the
numerator, that is 19, therefore
19(𝑠 + 16.8138)(𝑠 + 8.0008)(𝑠 + 5.9971)(𝑠 + 3.2517)(𝑠 + 1.4955)
(𝑠 + 2.1674 + 𝑗1.1491)(𝑠 + 2.1674 − 𝑗1.1491)
(𝑠 + 5.3690 + 𝑗5.1617)(𝑠 + 5.3690 − 𝑗5.1617)
𝐺4 (𝑠) =
𝑠(𝑠 + 7)(𝑠 + 9)(𝑠 + 10)(𝑠 + 15)(𝑠 + 16.7851)(𝑠2 + 4.0966𝑠 + 4.4681)
(𝑠2 + 11.1182𝑠 + 57.6004)

19(𝑠 + 16.8138)(𝑠 + 8.0008)(𝑠 + 5.9971)(𝑠 + 3.2517)(𝑠 + 1.4955)


(𝑠2 + 4.3348𝑠 + 6.0181)(𝑠2 + 10.7380𝑠 + 55.4693)
𝐺4 (𝑠) =
𝑠(𝑠 + 7)(𝑠 + 9)(𝑠 + 10)(𝑠 + 15)(𝑠 + 16.7851)(𝑠2 + 4.0966𝑠 + 4.4681)
(𝑠2 + 11.1182𝑠 + 57.6004)

Factored form of 𝐺5 (𝑠):


𝐺5 (𝑠) = 𝐺1 (𝑠)𝐺2 (𝑠)
⎡ ⎤
20(𝑠 + 2)(𝑠 + 3)(𝑠 + 6)(𝑠 + 8) ⎢ (𝑠 + 1)(𝑠 + 4)(𝑠 + 5)(𝑠 + 7) ⎥
𝐺5 (𝑠) = ⎢ ⎥
𝑠(𝑠 + 7)(𝑠 + 9)(𝑠 + 10)(𝑠 + 15) ⎢ (𝑠 + 16.7851)(𝑠2 + 4.0966𝑠 + 4.4681) ⎥
⎣ (𝑠2 + 11.1182𝑠 + 57.6004) ⎦

20(𝑠 + 1)(𝑠 + 2)(𝑠 + 3)(𝑠 + 4)(𝑠 + 5)(𝑠 + 6)(𝑠 + 8)


𝐺5 (𝑠) =
𝑠(𝑠 + 9)(𝑠 + 10)(𝑠 + 15)(𝑠 + 16.7851)(𝑠2 + 4.0966𝑠 + 4.4681)(𝑠2 + 11.1182𝑠 + 57.6004)

Polynomial form of 𝐺5 (𝑠):


20(𝑠 + 1)(𝑠 + 2)(𝑠 + 3)(𝑠 + 4)(𝑠 + 5)(𝑠 + 6)(𝑠 + 8)
𝐺5 (𝑠) =
𝑠(𝑠 + 9)(𝑠 + 10)(𝑠 + 15)(𝑠 + 16.7851)(𝑠2 + 4.0966𝑠 + 4.4681)(𝑠2 + 11.1182𝑠 + 57.6004)
(20𝑠 + 20)(𝑠2 + 5𝑠 + 6)(𝑠2 + 9𝑠 + 20)(𝑠2 + 14𝑠 + 48)
𝐺5 (𝑠) =
(𝑠5 + 41𝑠4 + 613𝑠3 + 3975𝑠2 + 9450𝑠)(𝑠5 + 32𝑠4 + 363𝑠3 + 2092𝑠2 + 5052𝑠 + 4320)
(20𝑠3 + 120𝑠2 + 220𝑠 + 120)(𝑠4 + 23𝑠3 + 194𝑠2 + 712𝑠 + 960)
𝐺5 (𝑠) =
𝑠9 + 66𝑠8 + 1826𝑠7 + 27784𝑠6 + 255 505𝑠5 + 1 450 638𝑠4 + 4 865 580𝑠3
+ 8 440 200𝑠2 + 5 832 000𝑠
20𝑠7 + 580𝑠6 + 6860𝑠5 + 42 700𝑠4 + 150 080𝑠3 + 295 120𝑠2 + 296 640𝑠 + 115 200
𝐺5 (𝑠) =
𝑠9 + 66𝑠8 + 1826𝑠7 + 27784𝑠6 + 255 505𝑠5 + 1 450 638𝑠4 + 4 865 580𝑠3
+ 8 440 200𝑠2 + 5 832 000𝑠

4. Calculate by hand or with calculator the partial-fraction expansion of the following transfer functions:
5(𝑠 + 2)
a. 𝐺6 (𝑠) = 2
𝑠(𝑠 + 8𝑠 + 15)
5(𝑠 + 2)
b. 𝐺7 (𝑠) =
𝑠(𝑠2 + 6𝑠 + 9)
5(𝑠 + 2)
c. 𝐺8 (𝑠) = 2
𝑠(𝑠 + 6𝑠 + 34)

Solution 4a:
5(𝑠 + 2) 5(𝑠 + 2) 𝐴 𝐵 𝐶
𝐺6 (𝑠) = = = + +
𝑠(𝑠2 + 8𝑠 + 15) 𝑠(𝑠 + 3)(𝑠 + 5) 𝑠 𝑠 + 3 𝑠 + 5
Solve for the coefficients.
5(𝑠 + 2) 2
𝐴= =
(𝑠 + 3)(𝑠 + 5) 𝑠→0 3
5(𝑠 + 2) 5
𝐵= =
𝑠(𝑠 + 5) 𝑠→−3 6
5(𝑠 + 2) 3
𝐶= =−
𝑠(𝑠 + 3) 𝑠→−5 2
Thus,
2 5 3
𝐺6 (𝑠) = + −
3𝑠 6(𝑠 + 3) 2(𝑠 + 5)

Solution 4b:
5(𝑠 + 2) 5(𝑠 + 2) 𝐴 𝐵 𝐶
𝐺7 (𝑠) = 2
= 2
= + +
𝑠(𝑠 + 6𝑠 + 9) 𝑠(𝑠 + 3) 𝑠 𝑠 + 3 (𝑠 + 3)2
Expand to segregate like terms.
5(𝑠 + 2) = 𝐴(𝑠 + 3)2 + 𝐵𝑠(𝑠 + 3) + 𝐶𝑠
5𝑠 + 10 = 𝐴(𝑠2 + 6𝑠 + 9) + 𝐵𝑠2 + 3𝐵𝑠 + 𝐶𝑠
5𝑠 + 10 = 𝐴𝑠2 + 6𝐴𝑠 + 9𝐴 + 𝐵𝑠2 + 3𝐵𝑠 + 𝐶𝑠
5𝑠 + 10 = (𝐴 + 𝐵)𝑠2 + (6𝐴 + 3𝐵 + 𝐶)𝑠 + 9𝐴
Equate.
(1) 𝐴 + 𝐵 = 0
(2) 6𝐴 + 3𝐵 + 𝐶 = 5
(3) 9𝐴 = 10
Solve for the coefficients.
9𝐴 = 10 𝐴+𝐵 =0 6𝐴 + 3𝐵 + 𝐶 = 5
10 𝐵 = −𝐴 𝐶 = 5 − 6𝐴 − 3𝐵
𝐴= 10
9 10 10
𝐵=− 𝐶 =5−6 −3 −
9 9 9
5
𝐶=
3
Thus,
10 10 5
𝐺7 (𝑠) = − +
9𝑠 9(𝑠 + 3) 3(𝑠 + 3)2
Solution 4c:
5(𝑠 + 2) 𝐴 𝐵𝑠 + 𝐶
𝐺8 (𝑠) = = + 2
𝑠(𝑠2+ 6𝑠 + 34) 𝑠 𝑠 + 6𝑠 + 34
Expand.
5(𝑠 + 2) = 𝐴(𝑠2 + 6𝑠 + 34) + (𝐵𝑠 + 𝐶)𝑠
5𝑠 + 10 = 𝐴𝑠2 + 6𝐴𝑠 + 34𝐴 + 𝐵𝑠2 + 𝐶𝑠
5𝑠 + 10 = (𝐴 + 𝐵)𝑠2 + (6𝐴 + 𝐶)𝑠 + 34𝐴
Equate.
(1) 𝐴 + 𝐵 = 0
(2) 6𝐴 + 𝐶 = 5
(3) 34𝐴 = 10
Solve for the coefficients.
34𝐴 = 10 𝐴+𝐵 =0 6𝐴 + 𝐶 = 5
10 𝐵 = −𝐴 𝐶 = 5 − 6𝐴
𝐴=
34 5 5
5 𝐵=− 𝐶 =5−6
𝐴= 17 17
17 55
𝐶=
17
Thus,
5 − 5 𝑠 + 55
𝐺8 (𝑠) = + 2 17 17

17𝑠 𝑠 + 6𝑠 + 34
5
5 17
𝑠 − 55
17
𝐺8 (𝑠) = − 2
17𝑠 𝑠 + 6𝑠 + 34

1.4 LAB
1. Use MATLAB to find 𝑃3 , 𝑃4 , and 𝑃5 in Prelab 1.
Program and Response:
(Option 1 – Showing Coefficients)
(Option 2 – Showing Polynomials)

2. Use only one MATLAB command to find 𝑃6 in Prelab 2.


Program and Response:
(Option 1 – Showing Coefficients)

(Option 2 – Showing Polynomials)


3. Use only two MATLAB commands to find 𝐺1 (𝑠) in Prelab 3a represented as a polynomial divided by a
polynomial.
Program and Response:

4. Use only two MATLAB commands to find 𝐺2 (𝑠) expressed as factors in the numerator divided by factors
in the denominator.
Program and Response:

5. Using various combinations of 𝐺1 (𝑠) and 𝐺2 (𝑠), find 𝐺3 (𝑠), 𝐺4 (𝑠), and 𝐺5 (𝑠). Various combinations
implies mixing and matching 𝐺1 (𝑠) and 𝐺2 (𝑠) expressed as factors and polynomials. For example, in
finding 𝐺3 (𝑠), 𝐺1 (𝑠) can be expressed in factored form and 𝐺2 (𝑠) can be expressed in polynomial form.
Another combination is 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed as polynomials. Still another combination is
𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed in factored form.
Program and Response:
Result of 𝐺3 (𝑠) with 𝐺1 (𝑠) expressed in factored form and 𝐺2 (𝑠) expressed in polynomial form
Result of 𝐺3 (𝑠) with 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed in polynomial form
Result of 𝐺3 (𝑠) with 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed in factor form

Result of 𝐺4 (𝑠) with 𝐺1 (𝑠) expressed in factored form and 𝐺2 (𝑠) expressed in polynomial form
Result of 𝐺4 (𝑠) with 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed in polynomial form
Result of 𝐺4 (𝑠) with 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed in factor form

Result of 𝐺5 (𝑠) with 𝐺1 (𝑠) expressed in factored form and 𝐺2 (𝑠) expressed in polynomial form
Result of 𝐺5 (𝑠) with 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed in polynomial form
Result of 𝐺5 (𝑠) with 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed in factor form
6. Use MATLAB to evaluate the partial fraction expansions shown in Prelab 4.
Program and Response:

1.5 POSTLAB
1. Discuss your findings for Lab 5. What can you conclude?
After finding 𝐺3 (𝑠), 𝐺4 (𝑠) and 𝐺5 (𝑠) with 𝐺1 (𝑠) expressed in factored form and 𝐺2 (𝑠) expressed in
polynomial form, the outcome is in factored form. With 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed as polynomial
form, the outcome is in polynomial form. With 𝐺1 (𝑠) and 𝐺2 (𝑠) both expressed as factored form, the
outcome is in factored form.
I conclude that the outcomes may vary on what forms (factored form and polynomial form) are being
programmed in MATLAB which is eventually tolerable, but the outcome chooses rather to be in factored
form when different forms in the program are there. Just in case, I want to change the outcome, let’s say,
from the factored form to the polynomial form, simply use tf(); in contradiction, use zpk(). It is also
important that when simplifying transfer functions, use minreal().

2. Discuss the use of MATLAB to manipulate transfer functions and polynomials. Discuss any
shortcomings in using MATLAB to evaluate partial fraction expansions.
MATLAB is very useful tool to manipulate them. Aside from the programming that looks actual
expressions of transfer functions and polynomials, MATLAB uses commands as simplified version to it.
For example in Lab 2, instead of programming
syms s;
P6 = expand((s+7)*(s+8)*(s+3)*(s+5)*(s+9)*(s+10));

MATLAB alternatively can turn into this


P6 = poly([-7 -8 -3 -5 -9 -10])

Another example, for transfer function instead of this


s = tf('s');
G1 = 20*(s+2)*(s+3)*(s+6)*(s+8)/[s*(s+7)*(s+9)*(s+10)*(s+15)]

We can turn into this


num1 = 20*poly([-2 -3 -6 -8]);
den1 = poly([0 -7 -9 -10 -15]);
G1 = tf(num1,den1)

For this reason, you need to understand the programing language of MATLAB especially we need to
evaluate mathematical expressions that we cannot solve manually in no time.
To evaluate partial fraction expansions, use partfrac() which instantly shows the result similar from
hand calculations. Although there are other ways to evaluate them in MATLAB, I prefer to use
partfrac().

You might also like