Metadata-Version: 2.1
Name: focont
Version: 0.1
Summary: Fixed order controller design tool
Home-page: https://github.com/dmrokan/focont
Author: Okan Demir
Author-email: demir@ee.bilkent.edu.tr
License: UNKNOWN
Description: # Focont
        
        **Static output feedback and fixed order controller design package for Python**
        
        ## Static output feedback (SOF)
        
        The SOF is the simplest feedback controller structure. It basically feedbacks
        the system output to the system input after multiplying a constant gain matrix.
        
        This package can calculate a stabilizing SOF gain which also optimizes the ![H2](/doc/h2.gif)
        norm of the closed loop system.
        
        However, this algorithm works under sufficient conditions. If the problem
        parameters (listed below) is not appropriate, the algorithm fails and
        prints an error message.
        
        (See the article, https://journals.sagepub.com/doi/abs/10.1177/0142331220943071 ,
        and the PhD thesis, http://hdl.handle.net/11693/54900 , for detailed
        information and analysis)
        
        The algorithm is purposedly developed for discrete time systems, but it also works
        for continuous time systems when the SOF is calculated for the zero-order hold
        discretized version with a sufficiently large sampling frequency.
        
        System definition can be provided by a JSON or MATLAB mat file. The required
        entries in the file are:
        
        * **A**: (2d array) System matrix
        * **B**: (2d array) Input matrix
        * **C**: (2d array) Output matrix,
        
        where `(A, B)` is stabilizable and `(C, A)` is observable (it is recommended
        to solve for the observable part of the system if `(C, A)` is detectable).
        
        If you want to adjust const function weights, these should also be provided:
        
        * **Q**: (2d array) Cost function weight for the state variables (similar to LQR problem)
        * **R**: (2d array) Cost function weight for the system input.
        
        If (A, B, C) defines a continuous time system, these should also be provided:
        
        * **type**: (string) 'C' (which means continuous, 'D' means discrete)
        * **Ts**: (number) Sampling period
        
        ## Fixed order controller
        
        Furthermore, the algorithm can be used to calculate fixed-order controllers.
        This need additional entries in the described JSON or mat file;
        
        * **structure**: (string) 'FO' (meaning fixed-order or 'SOF' for SOF controller)
        * **controller\_order**: (integer) The order of controller (by default it is chosen as the number of inputs)
        
        ## Installation
        
        Create and activate a virtual environment (this step is not required but recommended).
        Then,
        ```
        pip install -r requirements.txt
        ```
        or
        ```
        pip install numpy scipy
        ```
        Finally,
        ```
        pip install .
        ```
        
        ## Example
        
        ```python
        from focont import foc, system
        
        pdata = system.load(json_or_mat_filename)
        foc.solve(pdata)
        foc.print_results(pdata)
        ```
        
        You can find json and mat file examples in the `/tests` directory.
        
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
