I-Glied
Inhalt
I-Glied¶
Diagramme in Control¶
import control
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
s = control.TransferFunction.s
Vi = 10
Gs = Vi/s
Gs
\[\frac{10}{s}\]
def check_proper_tf(Gs):
"""check if transferfunction is proper"""
return len(Gs.num[0][0]) <= len(Gs.den[0][0])
check_proper_tf(Gs)
True
# step response
(tout, yout) = control.step_response(Gs)
plt.plot(tout,yout)
plt.title("Sprung Antwort")
plt.ylabel("y")
plt.xlabel("t (s)")
Text(0.5, 0, 't (s)')
# bode diagram
(mag, phase_rad, w) = control.bode_plot(Gs)
# nyquist plot
res_nyquist = control.nyquist_plot(Gs)
# pole zero map
poles, zeros = control.pzmap(Gs, plot=True)