Linear Quadratic Regulators

Perform optimal control of a continuous-time linear plant, time-varying or static, with or without reference tracking using LQR

You are now following this Submission

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://www.mathworks.com/matlabcentral/fileexchange/125480-linear-quadratic-regulators), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0

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

1.0.0