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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file controlplus-0.2.0.tar.gz.
File metadata
- Download URL: controlplus-0.2.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.5 Linux/5.15.0-53-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52f2dc96c8a8f6e8be7b1c5b7bff3f2e12237e2227d3213eac0791150434d466
|
|
| MD5 |
602583ef521ea1cad05ceb7e183bee7d
|
|
| BLAKE2b-256 |
63708a854ce29e5a8698d8f8d5f37308f13d85c5aa92baeaf6ff449782067cfc
|
File details
Details for the file controlplus-0.2.0-py3-none-any.whl.
File metadata
- Download URL: controlplus-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.5 Linux/5.15.0-53-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b227ca8bcb107bb33b921d20bba2a176ec84febdab041cf5e0b70836ec8f37e9
|
|
| MD5 |
9e825bc9d12837bb3143347f0d3f67ce
|
|
| BLAKE2b-256 |
fffd67d95081f93fb3a0dc554908469d0887ccad7280a26f6a226b5a7392fd4c
|