How to use this calculator
Balance state error against actuator effort for a one-state continuous linear plant.
- Enter Open-loop rate a (1/s), Actuator coefficient b (state/input/s), State cost q, Input cost r, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Scalar continuous optimal regulator explained
This scalar continuous-time LQR solves the algebraic Riccati equation for x′ = ax + bu with quadratic state and control costs. The feedback gain defines u = −Kx; the reported pole and cost describe the closed-loop model.
Inputs, symbols, and units
a— Open-loop rate a (1/s)- State coefficient in x′=a x+b u.
b— Actuator coefficient b (state/input/s)- Nonzero input effectiveness.
q— State cost q- Positive coefficient of x squared in the cost.
r— Input cost r- Positive coefficient of u squared in the cost.
x— Initial state- State used to report the minimized cost.
Formula and method
0=2aP−b²P²/r+q; K=bP/r; u=−Kx; Jmin=P x₀².
Use the stabilizing nonnegative Riccati solution. Cost weights must be expressed with consistent state and input units before comparing designs.
A worked scenario
Open-loop rate a (1/s) = 0.8; Actuator coefficient b (state/input/s) = 1.2; State cost q = 3; Input cost r = 0.7; Initial state = 2.
- Optimal feedback gain: 2.841559 input/state
- Closed-loop pole: -2.609871 1/s
- Minimum infinite-horizon cost: 6.630305 cost
An unstable rate 0.8/s with input effectiveness 1.2 uses state cost 3 and input cost 0.7; evaluate the optimal cost from state 2.
Assumptions and edge cases
Unconstrained full-state feedback, no delay, one state and positive weights. Real actuator saturation changes the optimum.
Reading the outputs
Gain specifies the negative-feedback law; the closed-loop pole must be negative; minimum cost includes the whole future trajectory.
Frequently asked questions
What happens when input cost rises?
Control effort is penalized more strongly, generally reducing aggressive feedback.
Can b be negative?
Yes; the gain sign then follows the actuator sign.
Is the minimum cost a physical energy?
Only if your chosen weights make that interpretation appropriate.
How do I use the Scalar continuous optimal regulator calculator?
Enter Open-loop rate a (1/s), Actuator coefficient b (state/input/s), State cost q, Input cost r, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Scalar continuous optimal regulator?
Open-loop rate a (1/s) = 0.8; Actuator coefficient b (state/input/s) = 1.2; State cost q = 3; Input cost r = 0.7; Initial state = 2. Optimal feedback gain: 2.841559 input/state Closed-loop pole: -2.609871 1/s Minimum infinite-horizon cost: 6.630305 cost An unstable rate 0.8/s with input effectiveness 1.2 uses state cost 3 and input cost 0.7; evaluate the optimal cost from state 2.
Background or definition reference: MathWorks LQR defining equations.
Read our calculation methodology.