Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

LinearQuadraticControl

Guides

  • ZigangPan`LinearQuadraticControl`

Symbols

  • HinfinityControl
  • HinfinityControlPSM
  • LEQGcontrol
  • LEQGcontrolPSM
  • LEQGcost
  • LQGcontrol
  • LQRcontrol
  • nusmoiaQ
  • twoslicesalgorithm
ZigangPan`LinearQuadraticControl`
LQRcontrol
​
{z,controllergain}=LQRcontrol[system]
accepts a LTI system as input and calculates the LQR optimal state feedback controller for the system with all of the control inputs as control inputs and all the disturbance inputs are ignored; the measurement outputs are ignored and the controlled outputs as the signal whose energy on the interval [0,∞) is the cost function. The returned variable
z
is the solution for the corresponding algebraic Riccati equation, and the returned variable
controllergain
as the optimal state feedback gain matrix.
​
Examples  
(1)
Basic Examples  
(1)
In[1]:=
system1={{x1,x2,x3},{u1,u2,w1,w2,w3},{y1,y2,z1,z2,z3,z4},{{-1,1,-1,0,0,1,-1,1},{-2,0,1,1,-1,0,0,1},{-3,0,-2,1,1,1,1,0},{1,0,0,0,0,1,0,0},{0,0,1,0,0,0,1,0},{1,0,0,0,0,0,0,0},{0,0,1,0,0,0,0,0},{0,0,0,1,2,0,0,0},{0,0,0,2,1,0,0,0}},{1,2},{1,2},{1,2},{3,4,5},{1,2},{3,4,5,6}};systemcheck[system1]
Out[1]=
True
In[2]:=
stablizabilityQ[system1〚4〛〚1;;3,1;;3〛,system1〚4〛〚1;;3,4;;5〛]
Out[2]=
True
In[3]:=
{z,controllergain}=
LQRcontrol
[system1]
Out[3]=
{{{1.80331,0.426048,-0.802849},{0.426048,0.650282,-0.169196},{-0.802849,-0.169196,0.536521}},{{-0.336843,-0.631483,0.109582},{0.515253,0.669082,-0.228809}}}
In[4]:=
HurwitzMatrixQ[system1〚4〛〚1;;3,1;;3〛+system1〚4〛〚1;;3,4;;5〛.controllergain]
Out[4]=
True
In[5]:=
Eigenvalues[system1〚4〛〚1;;3,1;;3〛+system1〚4〛〚1;;3,4;;5〛.controllergain]
Out[5]=
{-3.36285+0.,-0.528469+1.52399,-0.528469-1.52399}
SeeAlso
LQGcontrol
 
▪
LEQGcost
 
▪
LEQGcontrolPSM
 
▪
LEQGcontrol
 
▪
HinfinityControlPSM
 
▪
HinfinityControl
RelatedGuides
▪
ZigangPan`LinearQuadraticControl`
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com