Install Python-Control, a control system design library for python.
Ubuntu14.04(x64) orUbuntu16.04(x64)
Install
Install with the following command.
sudo apt-get install python-pip
sudo apt-get install gfortran
sudo apt-get install libblas-dev libatlas-dev liblapack-dev
pip install control
pip install slycot
Draw a bode plot
emacs test.py chmod +x test.py ./test.py
test.py
#!/usr/bin/env python
from control.matlab import *
from matplotlib import pyplot as plt
def main():
num = [0, 0, 3]
den = [2, 1, 3]
sys = tf(num, den)
bode(sys)
plt.show()
if __name__ == "__main__":
main()
python-control. user manual http://python-control.sourceforge.net/manual/
Recommended Posts