Updated 20 Jul 2009
This s-function solves Riccati equations in Simulink without calling the Matlab interpreter, it is FAST and usable with Real Time Workshop.
Specifically, the s-function is a level-2 gateway that calls several FORTRAN routines written by Arnold and Laub in the early eighties and publicly available under the cascade sublibrary of netlib. FORTRAN code is included in the Readme file, along with further instructions on how to compile and link the s-function.
Giampiero Campa, October 2002 and January 2009
Riccardo Bevilacqua & Jason Hall, NPS Spacecraft Robotics Lab, October 2008
Giampiero Campa (2023). LqrSim (https://www.mathworks.com/matlabcentral/fileexchange/2651-lqrsim), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- Control Systems > Control System Toolbox >
- Control Systems > Control System Toolbox > Control System Design and Tuning > State-Space Control Design and Estimation >
- Control Systems > Nonlinear Systems > Nonlinear Control >
- MATLAB > External Language Interfaces > Fortran with MATLAB >
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Fully converted to BSD License
Many thanks to Jason Hall and Riccardo Bevilacqua for your excellent job in enabling native matrices inputs to the block and
This version works with MATLAB 7.6 (R2008a), uses native matrix signals, is re-mexable on every platform, and is better integrated with real time workshop (Thanks Jason & Riccardo).
Recompiled mex files with matlab 7.1 so that everything works fine with newer versions requiring the .mexw32 extension. The .dll files are retained to the benefit users working with versions prior to 7.1, other users may delete them.