A package for analysis and design of Control Systems in python.
Project description
controlplus
A package for analysis and design of Control Systems in python by Dr. Ahsen Tahir.
Installation
$ pip install controlplus
Usage
from controlplus.controlplus import find_rlocus, compensated_pole_from_ts, zero_compensator_tf, draw_overlay_rlocus
import control import matplotlib.pyplot as plt
Forward path transfer function:
s = control.TransferFunction.s; G = 1 / (s * (s + 4) * (s + 6))
Consider second order approximation:
damp_ratio = 0.504
Draw root locus with overlaying damping ratio lines with intersecting points/poles:
plt.figure(figsize=(8,6)); draw_overlay_rlocus(G, damp_ratio); plt.show()
Desired settling time:
new_ts = 1.11
Find compensator pole for PD controller:
desired = compensated_pole_from_ts(new_ts, damp_ratio)
Get polynomial for zero compensator:
Gc = zero_compensator_tf(desired, G)
Final transfer function:
final_G = Gc * G
Find poles and respective gains for intersection of damping ratio line and root locus:
find_rlocus(G, damp_ratio)
Draw root locus with overlaying damping ratio lines with intersecting points/poles:
plt.figure(figsize=(8,6)); draw_overlay_rlocus(final_G, damp_ratio); plt.show()
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
controlplus
was created by Dr. Ahsen Tahir. It is licensed under the terms of the GNU General Public License v3.0 license.
Credits
controlplus
was created with cookiecutter
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for controlplus-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b227ca8bcb107bb33b921d20bba2a176ec84febdab041cf5e0b70836ec8f37e9 |
|
MD5 | 9e825bc9d12837bb3143347f0d3f67ce |
|
BLAKE2b-256 | fffd67d95081f93fb3a0dc554908469d0887ccad7280a26f6a226b5a7392fd4c |