import control
import matplotlib.pyplot as plt
import numpy

#if using termux
import subprocess
import shlex

num = [100,500]  #numerator of transfer function
den = [1,3,4,12,0]  #denominator of transfer function

#Creating a transfer function G = num/den
G = control.tf(num,den) 
w = numpy.logspace(-3,3,5000)
print(G)

control.nyquist(G,w); # nyquist plot
plt.savefig('./figs/ee18btech11025/nyquist.pdf')
plt.savefig('./figs/ee18btech11025/nyquist.eps') #if using termux
subprocess.run(shlex.split("termux-open ./figs/ee18btech11025/nyquist.pdf"))

p, z = control.pzmap(G); #pole-zero plot
print('poles:', p)
print('zeros:', z)
plt.savefig('./figs/ee18btech11025/polezero.pdf')
plt.savefig('./figs/ee18btech11025/polezero.eps') #if using termux

subprocess.run(shlex.split("termux-open ./figs/ee18btech11025/polezero.pdf")) #if using termux

585d6274ab32db13337caa733c4f35e0dc6e1155
<mask token>

<mask token>
print(G)
control.nyquist(G, w)
plt.savefig('./figs/ee18btech11025/nyquist.pdf')
plt.savefig('./figs/ee18btech11025/nyquist.eps')
subprocess.run(shlex.split('termux-open ./figs/ee18btech11025/nyquist.pdf'))
<mask token>
print('poles:', p)
print('zeros:', z)
plt.savefig('./figs/ee18btech11025/polezero.pdf')
plt.savefig('./figs/ee18btech11025/polezero.eps')
subprocess.run(shlex.split('termux-open ./figs/ee18btech11025/polezero.pdf'))

<mask token>
num = [100, 500]
den = [1, 3, 4, 12, 0]
G = control.tf(num, den)
w = numpy.logspace(-3, 3, 5000)
print(G)
control.nyquist(G, w)
plt.savefig('./figs/ee18btech11025/nyquist.pdf')
plt.savefig('./figs/ee18btech11025/nyquist.eps')
subprocess.run(shlex.split('termux-open ./figs/ee18btech11025/nyquist.pdf'))
p, z = control.pzmap(G)
print('poles:', p)
print('zeros:', z)
plt.savefig('./figs/ee18btech11025/polezero.pdf')
plt.savefig('./figs/ee18btech11025/polezero.eps')
subprocess.run(shlex.split('termux-open ./figs/ee18btech11025/polezero.pdf'))

import control
import matplotlib.pyplot as plt
import numpy
import subprocess
import shlex
num = [100, 500]
den = [1, 3, 4, 12, 0]
G = control.tf(num, den)
w = numpy.logspace(-3, 3, 5000)
print(G)
control.nyquist(G, w)
plt.savefig('./figs/ee18btech11025/nyquist.pdf')
plt.savefig('./figs/ee18btech11025/nyquist.eps')
subprocess.run(shlex.split('termux-open ./figs/ee18btech11025/nyquist.pdf'))
p, z = control.pzmap(G)
print('poles:', p)
print('zeros:', z)
plt.savefig('./figs/ee18btech11025/polezero.pdf')
plt.savefig('./figs/ee18btech11025/polezero.eps')
subprocess.run(shlex.split('termux-open ./figs/ee18btech11025/polezero.pdf'))

import control
import matplotlib.pyplot as plt
import numpy

#if using termux
import subprocess
import shlex

num = [100,500]  #numerator of transfer function
den = [1,3,4,12,0]  #denominator of transfer function

#Creating a transfer function G = num/den
G = control.tf(num,den) 
w = numpy.logspace(-3,3,5000)
print(G)

control.nyquist(G,w); # nyquist plot
plt.savefig('./figs/ee18btech11025/nyquist.pdf')
plt.savefig('./figs/ee18btech11025/nyquist.eps') #if using termux
subprocess.run(shlex.split("termux-open ./figs/ee18btech11025/nyquist.pdf"))

p, z = control.pzmap(G); #pole-zero plot
print('poles:', p)
print('zeros:', z)
plt.savefig('./figs/ee18btech11025/polezero.pdf')
plt.savefig('./figs/ee18btech11025/polezero.eps') #if using termux

subprocess.run(shlex.split("termux-open ./figs/ee18btech11025/polezero.pdf")) #if using termux
