In [ ]:
from IPython.display import Image
Image(filename='img/bode1.png')
In [ ]:
from IPython.display import Image
Image(filename='img/bode2.png')
In [ ]:
from IPython.display import Image
Image(filename='img/bode3.png')
In [ ]:
from IPython.display import Image
Image(filename='img/bode4.png')
In [ ]:
from IPython.display import Image
Image(filename='img/bode5.png')
In [ ]:
from IPython.display import Image
Image(filename='img/bode6.png')
In [ ]:
from IPython.display import Image
Image(filename='img/bode7.png')
Whit Python:
In [ ]:
import sympy
from sympy import *
sympy.init_printing()
s = Symbol('s')
t = Symbol('t', positive=True)
In [ ]:
G = ((10)*(s+10))/((s)*(s+2)*(s+5))
In [ ]:
G
In [ ]:
G.expand()
In [ ]:
import numpy as np
from scipy import signal
import matplotlib.pyplot as plt
s1 = signal.lti([10, 100], [1, 7, 10])
w, mag, phase = signal.bode(s1, np.arange(0.01, 100.0, 0.01).tolist())
plt.figure(figsize=(15,8))
plt.subplot(2,1,1)
plt.semilogx(w, mag, lw=5) # Bode magnitude plot
plt.ylim([-30, 30])
plt.xlabel('Hz')
plt.ylabel('Magnitude (dB)')
plt.grid(True)
plt.subplot(2,1,2)
plt.semilogx(w, phase, lw=5, label="real bode plot") # Bode phase plot
plt.xlabel('Hz')
plt.ylim([-120, 10])
plt.ylabel('Phase (deg)')
plt.grid(True)
plt.show()
In [ ]: