Nonlinear Algebraic Approximation in Control systems
Project description
Nonlinear Algebraic Approximation of Control Systems
A Python implementation of an algorithm for construction homogeneous approximations of nonlinear control systems. For description of the algorithm refer to ...
Installation
You can install the package using pip
pip install happy-control
How to use
The main part of the package is implemented in a single class called ControlSystem. This class describes a control system and its methods implement the algorithm of approximation of a given system.
from happy_control.approximation_tools import ControlSystem
Given a system you can initialize it the following way:
system = ControlSystem(a, b)
where a and b are corresponding vectors.
Note: the vectors must be composed out of sympy symbols or numbers. For example, consider a system:
Then the implementation using the package would be as follows:
import sympy as sym
from happy_control.approximation_tools import ControlSystem
x1, t = sym.symbols('x_{1} t')
a = sym.Matrix([0, -sym.Rational(1, 2)*x1**2 - 4*t*x1 - 3*t**2*x1, -x1**2 - 2*t*x1 - 3*t**2*x1])
b = sym.Matrix([-1, 0, 0])
system = ControlSystem(a, b)
Then you have 2 options: you can either approximate this system using nonlinear power moments series or using Fliess series
# to approximate using nonlinear power moments algebra
system.calc_approx_system()
# to approximate using Fliess algebra
system.calc_approx_system(fliess=True)
To generate the pdf file you need to do as follows:
# to generate pdf for systems which were appoximated using Fliess series
# add additional argument fliess=True
system.generate_pdf()
This will produce a pdf file named 'output.pdf' in your current working directory with all the necessary information of the system and its approximation.
To customize filename and directory where the file will be saved use additional parameters
# generate pdf in custom directory and custom filename (filename does
# not need to include .pdf extension, it will be added automatically, so just provide the name)
system.generate_pdf(path="path_to_directory", filename="custom_filename")
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
File details
Details for the file happy_control-0.1.1.tar.gz
.
File metadata
- Download URL: happy_control-0.1.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 747f6efe0ee2a145535b4f1f570f278d344437f2598fd8d018779c9ed9b28d1d |
|
MD5 | a2ff0a5c58ad7a3b0fa9cc0d954519da |
|
BLAKE2b-256 | 4384f2ba749fc18cf64ef3f5a8b5c01b396da39eada294f1ea782731ad702d10 |
File details
Details for the file happy_control-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: happy_control-0.1.1-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6439153e3e5b501903e925c6846a0ae6ac089297e144c388968c7ae4572c471f |
|
MD5 | c7c47faad8270475624867702ea5890e |
|
BLAKE2b-256 | 9333293169db0a52607ee48dcc364ce284135c76864c8be45e1b529a03b808bd |