MFAC: Model Free Adaptive Control Toolbox for Python
Abstract
This project aims to provide a simple and fast python package for model-free adaptive control. The package includes compact form dynamic linearization (CFDL), partial form dynamic linearization (PFDL) and full form dynamic linearization (FFDL) model free adaptive control methods for SISO, MISO and MIMO systems.
Installation
Install from PyPI:
pip install MFAC
PyPI currently provides the older version 0.1.17, which does not work on Python 3.11 or newer. Until it is updated, install version 1.0.1 from GitHub:
pip install git+https://github.com/shahind/MFAC.git@v1.0.1
A first control loop:
import numpy as np
from mfac.plants.siso import Model1
from mfac.controllers import CompactFormDynamicLinearization
plant = Model1()
reference = np.ones(501)
CompactFormDynamicLinearization(model=plant, iteration_function=lambda c: None,
reference_output=reference, max_steps=500,
eta=1, mu=1, rho=0.45, labda=1).run()
plant.render()
Features
- CFDL, PFDL and FFDL model-free adaptive controllers with one common interface
- Single-input single-output, multi-input single-output and multivariable systems
- Fast simulation of single loops
- Base classes for your own simulated plants or external processes
- Sample plants, including the SISO, MISO and MIMO examples of chapters 4 and 5 of Hou and Jin's book
- Agent skills for Claude and GPT
How to cite
Shahin Darvishpoor, MFAC: Model Free Adaptive Control Toolbox for Python, GitHub, 2023. https://github.com/shahind/MFAC
@software{darvishpoor_mfac,
author = {Darvishpoor, Shahin},
title = {{MFAC}: Model Free Adaptive Control Toolbox for Python},
publisher = {GitHub},
year = {2023},
url = {https://github.com/shahind/MFAC}
}
References
- Z. Hou and S. Jin, Model Free Adaptive Control: Theory and Applications. CRC Press, 2014.
- S. Darvishpoor, J. Roshanian and M. Tayefi, "A novel concept of VTOL bi-rotor UAV based on moving mass control", Aerospace Science and Technology, vol. 107, 106238, 2020. doi:10.1016/j.ast.2020.106238