Linear Quadratic Regulators

Perform optimal control of a continuous-time linear plant, time-varying or static, with or without reference tracking using LQR
191 Downloads
Updated 27 Oct 2023

View License

Use the finite-time Linear Quadratic Regulator paradigm to solve the time-varying linear optimal control program:
such that
where is the state vector at time t and is the state reference.
The file "example.m" provides an example of how to use the LQR functions.
The files "basicLQR.m" and "trackingLQR.m" can generate the optimal LQR input as a function . In "basicLQR.m" there is no reference tracking, and in "trackingLQR.m" the LQR solution optimally tracks the state reference . Note: Optimal tracking does not equate to a constraint
Feedback gains and LQR input functions are implemented using the computationally-efficient MATLAB function.

Cite As

Daniel K. Mills (2026). Linear Quadratic Regulators (https://uk.mathworks.com/matlabcentral/fileexchange/125480-linear-quadratic-regulators), MATLAB Central File Exchange. Retrieved .

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

Linear Quadratic Regulators

Version Published Release Notes
1.1.0

Fixed a dimensionality bug with the MATLAB "griddedInterpolant" arguments.

1.0.0