Linear Quadratic Regulators
Version 1.1.0 (5.29 KB) by
Daniel K. Mills
Perform optimal control of a continuous-time linear plant, time-varying or static, with or without reference tracking using LQR
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 LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
