Lyapunov Nonlinear Control GUI

This GUI can simulate and regulate a nonlinear dynamic system.
Updated 9 Aug 2016

To run the program, navigate to the root folder in MATLAB and type 'launch' at the command line. The default simulation controls seven motors with different inertia, friction, and back-emf parameters.
It's a powerful control algorithm for linear and nonlinear systems where a model is known. For best performance, run it with a small timestep and a very negative controller aggressiveness.

Background: Zelenak & Pryor, 2015, "Stabilization of Nonlinear Systems by Switched Lyapunov Function"

Cite As

Andy Zelenak (2024). Lyapunov Nonlinear Control GUI (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
















Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes

Adding reference.
Optional low-pass filter on the control effort.

Deleted the adaptation option (never finished it) and changed the V2 calculation. Performance is better now.
Changed the unit on aggressiveness to dB.

Added two tuning parameters that help with difficult systems such as integrators. Also eliminated vectorizing for the dynamic equations because it was confusing for new users (albeit faster).
Went back to vectorized equations because the slightly-easier-to-use format wasn't worth the performance loss. Also, a more impressive example.

Updating description- File Exchange overwrote it when I switched to GitHub.

Changed hosting to GitHub so others can contribute.

Added a reference to the ROS implementation.

Updated GUI dialog boxes and allowed a more flexible array of saturation limits.

Fixed an initial condition error that was revealed by the previous update and added a more impressive default example.

Updated the picture

Added another plot that is useful for visualizing higher-order problems (up to 7th order).

Simplified the code to improve processing time by ~5%. Working on the C++ version for ROS now.

Removed dependency on the image processing toolbox and updated to R2014b.

Fixed plotting bug for 1st order systems.

Minor changes to plotting and a more impressive example.

Fixed an error where it was basically plotting the results I expected. Derp. Sorry if that confused anybody.

The controller can now track a user-defined, time-varying function. The default example tracks a unit circle with a 2nd-order system.

Big change this week! The user can specify any setpoint and the software will regulate the system to that setpoint.

Changed to a different Alternative Lyapunov Function and fixed a vector dimension mismatch for >1 inputs.

Removed some directories from the search path because they will be automatically added by my code.

Updated the description to include launch directions.

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.