Skip to content

A pack of control system algorithms implemented in C to be used in embedded systems.

License

Notifications You must be signed in to change notification settings

robokamran/ControlSystems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ControlSystems

A pack of control system algorithms implemented in C to be used in embedded systems. In this project, MATLAB is used as simulation platform.

Pull-requests are welcome. If you find such implementations useful, feel free to submit a feature request and I'll try to provide more sample implementations (LQR, LQG, sliding-mode, etc.).

Please make sure that you have the latest version of MinGW installed in MATLAB so you can compile the C codes inside MATLAB.

Header file prototype.h is used as an interface between SIMULINK and C codes.

Model Reference Adaptive Controller (MRAC)

MRAC controller based on MIT rule structure. References and controller topology can be found at:

Fuzzy Gain Scheduled PID Controller (FGS)

This is a classic controller based on the old topology can be found here:

PID Controller

Both FGS and MRAC topologies utilize an internal PID as well. In this project a tuning based on Ziegler–Nichols method is shown. Please pay enough attention to the sampling time and how it should be utilized in the tuning variable Tu.

Active Disturbance Rejection Controller (ADRC)

Both MATLAB and C implementation of the controller are provided here based on the recent publications and most optimized topologies. A multi-order profile generator is needed for this controller. Currently an open-source one is used. I will add optimized multi-order profile generators as well.

Second Order Filters and Lead-Lag

Since high-pass (washout), low-pass, band-pass and band-stop (notch) filters are commonly used in embedded systems, all simple implementations based on second-order transfer functions are provided and the formulation can be found here.

A filtered derivative is commonly used in PIDF structure. Instead of using a two-state differentiation and putting a first-order low-pass, use a native second-order low-pass differentiator.

Also a lead-lag controller/filter is provided based on the common theories.

About

A pack of control system algorithms implemented in C to be used in embedded systems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published