Chapter12-Network Synthesis

Ex2-pg12.2

In [1]:
# Network Synthesis : example 12.2 : (pg 12.2)
import numpy
p1 = numpy.array([1,0,5,0,4])
p2 = numpy.array([1,0,3,0])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
[q3,r3]=numpy.polydiv(r1,r2);
print "\nEven part of P(s) = (s^4)+(5s^3)+4"
print "\nOdd part of P(s) = (s^3)+(3s)"
print "\nQ(s)= m(s)/n(s)"
# values of quotients in continued fraction expansion
print (q);
print (q1);
print (q2);
print (q3);
print "Since all the quotient terms are positive, P(s) is hurwitz";
Even part of P(s) = (s^4)+(5s^3)+4

Odd part of P(s) = (s^3)+(3s)

Q(s)= m(s)/n(s)
[ 1.  0.]
[ 0.5  0. ]
[ 2.  0.]
[ 0.25  0.  ]
Since all the quotient terms are positive, P(s) is hurwitz

Ex3-pg12.2

In [2]:
#Network Synthesis : example 12.3 : (pg 12.2 & 12.3)
import numpy
p1=numpy.array([1,0,5,0])     
p2=numpy.array([4,0,2])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
print("\nEven part of P(s) = ((4*s^2)+(2))");
print("\nOdd part of P(s) = ((s^3)+(5*(s)))");
print("\nQ(s)= n(s)/m(s)");
# values of quotients in continued fraction expansion
print(q);
print(q1);
print(q2);
print("\nSince all the quotient terms are positive, P(s) is hurwitz");
Even part of P(s) = ((4*s^2)+(2))

Odd part of P(s) = ((s^3)+(5*(s)))

Q(s)= n(s)/m(s)
[ 0.25  0.  ]
[ 0.88888889  0.        ]
[ 2.25  0.  ]

Since all the quotient terms are positive, P(s) is hurwitz

Ex4-pg12.3

In [3]:
## Network Synthesis : example 12.4 : (pg 12.3)
import numpy
p1=numpy.array([1,0,3,0,12])
p2=numpy.array([1,0,2,0])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
[q3,r3]=numpy.polydiv(r1,r2);
print("\nEven part of P(s) = ((s^4)+(3*(s)^2)+12)");
print("\nOdd part of P(s) = ((s^3)+(2*s))");
print("\nQ(s)= m(s)/n(s)");
## values of quotients in continued fraction expansion
print(q);
print(q1);
print(q2);
print(q3);
print("\nSince two quotient terms are negative, P(s) is  not hurwitz");
Even part of P(s) = ((s^4)+(3*(s)^2)+12)

Odd part of P(s) = ((s^3)+(2*s))

Q(s)= m(s)/n(s)
[ 1.  0.]
[ 1.  0.]
[-0.1 -0. ]
[-0.83333333  0.        ]

Since two quotient terms are negative, P(s) is  not hurwitz

Ex5-pg12.3

In [4]:
## Network Synthesis : example 12.5 : (pg 12.3 & 12.4)
import numpy
p1=numpy.array([1,0,2,0,2])
p2=numpy.array([1,0,3,0])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
[q3,r3]=numpy.polydiv(r1,r2);
print("\nEven part of P(s) = ((s^4)+(2*(s)^2)+2)");
print("\nOdd part of P(s) = (s^3)+(3s)");
print("\nQ(s)= m(s)/n(s)");
## values of quotients in continued fraction expansion
print(q);
print(q1);
print(q2);
print(q3);
print("\nSince two terms are negative, P(s) is  not hurwitz");
Even part of P(s) = ((s^4)+(2*(s)^2)+2)

Odd part of P(s) = (s^3)+(3s)

Q(s)= m(s)/n(s)
[ 1.  0.]
[-1. -0.]
[-0.2  0. ]
[ 2.5  0. ]

Since two terms are negative, P(s) is  not hurwitz

Ex6-pg12.4

In [5]:
## Network Synthesis : example 12.6 : (pg 12.4)
import numpy
p1=numpy.array([2,0,6,0,1])
p2=numpy.array([5,0,3,0])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
[q3,r3]=numpy.polydiv(r1,r2);
print("\nEven part of P(s) = ((2*s^4)+(6*(s)^2)+1)");
print("\nOdd part of P(s) = ((5*s^3)+(3*s))");
print("\nQ(s)= m(s)/n(s)");
## values of quotients in continued fraction expansion
print(q);
print(q1);
print(q2);
print(q3);
print("\nSince all the quotient terms are positive, P(s) is hurwitz");
Even part of P(s) = ((2*s^4)+(6*(s)^2)+1)

Odd part of P(s) = ((5*s^3)+(3*s))

Q(s)= m(s)/n(s)
[ 0.4  0. ]
[ 1.04166667  0.        ]
[ 2.45106383  0.        ]
[ 1.95833333  0.        ]

Since all the quotient terms are positive, P(s) is hurwitz

Ex7-pg12.4

In [6]:
## Network Synthesis : example 12.7 : (pg 12.4 & 12.5)
import numpy
p1=numpy.array([1,0,6,0,8])

p2=numpy.array([7,0,21,0])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
[q3,r3]=numpy.polydiv(r1,r2);
print("\nEven part of P(s) = ((s^4)+(6*(s)^2)+8)");
print("\nOdd part of P(s) = (7*(s^3)+(21*s))");
print("\nQ(s)= m(s)/n(s)");
## values of quotients in continued fraction expansion
print(q);
print(q1);
print(q2);
print(q3);
print("\nSince all the quotient terms are positive, P(s) is hurwitz");
Even part of P(s) = ((s^4)+(6*(s)^2)+8)

Odd part of P(s) = (7*(s^3)+(21*s))

Q(s)= m(s)/n(s)
[ 0.14285714  0.        ]
[ 2.33333333  0.        ]
[ 1.28571429  0.        ]
[ 0.29166667  0.        ]

Since all the quotient terms are positive, P(s) is hurwitz

Ex8-pg12.5

In [7]:
## Network Synthesis : example 12.8 : (pg 12.5)
import numpy
p1=numpy.array([1,0,5,0,10])

p2=numpy.array([5,0,4,0])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
[q3,r3]=numpy.polydiv(r1,r2);
print("\nEven part of P(s) = ((s^4)+(5*(s)^2)+10)");
print("\nOdd part of P(s) = (5*(s^3)+(4*s))");
print("\nQ(s)= m(s)/n(s)");
## values of quotients in continued fraction expansion
print(q);
print(q1);
print(q2);
print(q3);
print("\nSince two terms are negative, P(s) is not hurwitz");
Even part of P(s) = ((s^4)+(5*(s)^2)+10)

Odd part of P(s) = (5*(s^3)+(4*s))

Q(s)= m(s)/n(s)
[ 0.2  0. ]
[ 1.19047619  0.        ]
[-0.5313253 -0.       ]
[-0.79047619  0.        ]

Since two terms are negative, P(s) is not hurwitz

Ex9-pg12.6

In [8]:
## Network Synthesis : example 12.9 : (pg 12.6)
import numpy
p1=numpy.array([1,0,3,0,2,0])
p2=numpy.array([5,0,9,0,2])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
[q3,r3]=numpy.polydiv(r1,r2);
[q4,r4]=numpy.polydiv(r2,r3);
print("\n P(s) = ((s^5)+(3*(s^3))+(2*s))");
print("\n d/ds.P(s)= ((5*(s^4))+9*(s^2)+2)");
print("\nQ(s)=P(s)/d/ds.P(s)");
## values of quotients in continued fraction expansion
print(q);
print(q1);
print(q2);
print(q3);
print(q4);
print("\nSince all the quotient terms are positive, P(s) is hurwitz");
 P(s) = ((s^5)+(3*(s^3))+(2*s))

 d/ds.P(s)= ((5*(s^4))+9*(s^2)+2)

Q(s)=P(s)/d/ds.P(s)
[ 0.2  0. ]
[ 4.16666667  0.        ]
[ 0.51428571  0.        ]
[ 4.08333333  0.        ]
[ 0.28571429  0.        ]

Since all the quotient terms are positive, P(s) is hurwitz

Ex10-pg12.6

In [9]:
## Network Synthesis : example 12.10 : (pg 12.6 & 12.7)
import numpy
p1=numpy.array([1,0,1,0,1,0])
p2=numpy.array([5,0,3,0,1])
[q,r]=numpy.polydiv(p1,p2);
[q1,r1]=numpy.polydiv(p2,r);
[q2,r2]=numpy.polydiv(r,r1);
[q3,r3]=numpy.polydiv(r1,r2);
[q4,r4]=numpy.polydiv(r2,r3);
print("\n P(s) = ((s^5)+((s^3))+(s))");
print("\n d/ds.P(s)= ((5*(s^4))+3*(s^2)+1)");
print("\nQ(s)=P(s)/d/ds.P(s)");
## values of quotients in continued fraction expansion
print(q);
print(q1);
print(q2);
print(q3);
print(q4);
print("\nSince two quotient terms are negative, P(s) is not hurwitz");
 P(s) = ((s^5)+((s^3))+(s))

 d/ds.P(s)= ((5*(s^4))+3*(s^2)+1)

Q(s)=P(s)/d/ds.P(s)
[ 0.2  0. ]
[ 12.5   0. ]
[-0.05714286 -0.        ]
[-8.16666667  0.        ]
[ 0.85714286  0.        ]

Since two quotient terms are negative, P(s) is not hurwitz