Basic Examples (8)
A system that starts at -1:
The state and input weights:
The initial value of the gain:
The total simulations is 30 with a batch consisting of 10 simulations:
Compute the controller:
The gain converges to ~0.1:
The state is regulated to the origin:
The input sequence that was used during the simulation:
Scope (6)
A system with one state and one input:
Compute a controller:
The gain values:
The state is regulated to the origin:
The input sequence that was used during the simulation:
A multi-state system:
Compute a controller:
The gain values:
The states are regulated to the origin:
The input sequence that was used during the simulation:
A multi-state, multi-input system:
Compute a controller:
The gain values:
The states are regulated to the origin:
The input sequence that was used during the simulation:
A state-space model:
Compute a controller:
The gain values:
The states are regulated to the origin:
The input sequence that was used during the simulation:
By default, a SystemsModelControllerData object is returned:
It can be used to obtain various properties:
The value of a specific property:
A list of property values:
The values of all properties as an Association:
As a Dataset:
Get a property directly:
Applications (7)
The model of the U.S Coast Guard cutter Tampa based on sea-trials data that gives the heading in response to rudder angle inputs:
Discretize the model:
The model is marginally stable:
A Q-learning LQ regulator starting with an initial heading of 5°:
The computed gain values:
The heading is regulated back to the origin in about 20 seconds:
The rudder input values:
Properties and Relations (2)
The gain computed by simulation converges to the optimal solution:
The optimal solution computed with knowledge of the system's dynamics:
The above solution is computed using the discrete algebraic Riccati equation:
The gain computed by simulation converges to the optimal solution for a nonlinear system:
The optimal solution computed using the linearized model:
The above solution is computed using the discrete algebraic Riccati equation:
Possible Issues (4)
An unstable system may not converge to the optimal solution:
Adjusting the initial gain causes it to converge to the optimal solution:
The optimal solution:
A system with a disturbance may not converge to the optimal solution:
Adjusting the initial gain may cause it to come close to the optimal solution:
The optimal solution:
The initial gain must be stabilizing:
Otherwise the state values will blow up:
The state values with a stabilizing gain:
The system must be a discrete-time system: