Research Robots Applications Industries Technology Contact
← Back to Technology
Robotics Core

Linear Quadratic Regulator (LQR)

Unlock the standard for optimal control in autonomous navigation. LQR provides the mathematical backbone for AGVs to balance precision path-following with energy efficiency, ensuring smooth operations in complex warehouse environments.

Linear Quadratic Regulator (LQR) AGV

Core Concepts

State-Space Model

LQR relies on a linear mathematical representation of the robot's physics (x_dot = Ax + Bu). This model predicts how the AGV responds to motor commands.

The Cost Function

A quadratic function that calculates a "penalty" score. It mathematically weighs the importance of staying on the path versus the energy cost of moving actuators.

Q and R Matrices

The tuning knobs of LQR. Matrix 'Q' penalizes state errors (being off-path), while Matrix 'R' penalizes control effort (using too much battery/voltage).

Optimal Gain (K)

The magic number. LQR calculates a Gain Matrix 'K' that, when multiplied by the error, produces the theoretically perfect control signal to minimize cost.

Full State Feedback

LQR typically assumes you know everything about the robot's current status—position, velocity, angle, and angular rate—at every moment in time.

Riccati Equation

The Algebraic Riccati Equation (ARE) is the complex calculation solved offline to determine the optimal K matrix, ensuring system stability.

How It Works

LQR operates on a feedback loop principle. Unlike basic PID controllers which look at individual errors in isolation, LQR looks at the system as a whole (MIMO - Multiple Input, Multiple Output). It starts by reading the current state of the AGV from sensors like LiDAR and encoders.

The algorithm compares this current state against the desired target state (the path). It then calculates the control inputs—such as wheel velocities—by multiplying the "error" by the pre-calculated Gain Matrix (K).

The beauty of LQR lies in the trade-off. By tuning the Q matrix, you tell the robot to prioritize accuracy. By tuning the R matrix, you tell it to prioritize saving energy or moving smoothly. The result is a mathematically optimized trajectory that minimizes "cost" over time.

Technical Diagram

Real-World Applications

High-Speed Path Tracking

Used in AMR (Autonomous Mobile Robots) sorters in logistics centers. LQR allows robots to maintain high speeds while tightly adhering to curved paths without overshooting, maximizing throughput.

Forklift Load Stabilization

Essential for automated forklifts. LQR controllers can account for the dynamics of a heavy, lifted load, adjusting acceleration to prevent tipping or dangerous load sway during transport.

Self-Balancing Robots

Two-wheeled delivery robots rely heavily on LQR. The controller constantly adjusts wheel torque to keep the center of gravity balanced while moving forward, reacting faster than a human operator could.

Drone Formation Flight

In aerial warehousing or inventory scanning, LQR helps multi-rotor drones maintain stable hovering and precise formation spacing relative to each other, despite air turbulence.

Frequently Asked Questions

What is the main advantage of LQR over a standard PID controller?

While PID handles Single-Input Single-Output (SISO) systems well, LQR excels in Multi-Input Multi-Output (MIMO) systems. LQR inherently understands the coupling between different states (e.g., how turning affects speed) and optimizes them simultaneously, whereas PID requires separate tuning for each loop.

How do I choose the values for Q and R matrices?

This is often done via Bryson's Rule or iterative tuning. Generally, increasing values in the diagonal of the Q matrix makes the system react faster to errors (tighter tracking), while increasing R values makes the control action more conservative (saving energy and reducing actuator wear).

Does LQR work for non-linear robots like differential drive AGVs?

LQR is strictly for linear systems. However, for non-linear robots like AGVs, we use "Linearization" around an operating point (usually the target trajectory). This allows LQR to work effectively as long as the robot doesn't deviate too drastically from the linearized state.

What is the computational cost of running LQR on an embedded system?

The runtime cost is very low. The heavy lifting—solving the Riccati equation—is usually done offline to generate the Gain Matrix (K). During operation, the robot simply performs matrix multiplication, which is computationally cheap and suitable for microcontrollers.

Can LQR handle physical constraints like maximum speed?

Not natively. Standard LQR assumes infinite actuator power is available. If the controller demands a voltage higher than the battery can provide, performance suffers (saturation). For systems with strict hard constraints, Model Predictive Control (MPC) is often a better, albeit more expensive, choice.

What happens if my system model is inaccurate?

LQR is model-based, so significant discrepancies between the mathematical model and the physical robot can lead to poor performance or instability. Integral action (LQI) can be added to help compensate for steady-state errors caused by model mismatches.

What is LQG (Linear Quadratic Gaussian)?

LQG is the combination of LQR and a Kalman Filter. Since LQR assumes you have perfect knowledge of all states, and real sensors are noisy or incomplete, the Kalman Filter estimates the true state, which is then fed into the LQR controller.

Why is it called "Quadratic"?

It refers to the Cost Function. Errors are squared (quadratic). This is important because it penalizes large errors much more heavily than small errors, ensuring the controller works aggressively to eliminate dangerous deviations.

Is LQR suitable for dynamic obstacle avoidance?

Generally, no. LQR is a path-tracking controller, not a path planner. Obstacle avoidance usually happens at a higher level (local planner) which generates a new trajectory that the LQR controller then attempts to follow.

How does LQR contribute to battery life in AGVs?

By tuning the R matrix (control effort penalty), engineers can force the robot to accelerate and decelerate more gently. This reduces peak current draw from the motors, extending shift times and overall battery lifespan.

What sensors are required to implement LQR?

Ideally, you need sensors that provide the full state vector. For a mobile robot, this typically includes wheel encoders (velocity), IMUs (orientation/acceleration), and often LiDAR or cameras for absolute positioning.

Can I update the LQR gain matrix in real-time?

Yes, this is called Gain Scheduling. You can calculate different K matrices for different speeds or load weights offline, and swap them dynamically as the robot's operating conditions change.

Ready to implement Linear Quadratic Regulator (LQR) in your fleet?

Explore Our Robots