Skip to main content
emobility.academy
M.TechControl designAdvanced About 8 weeksMATLAB & Simulink

LQR Control of an Active Suspension for an Electric Car

Model a quarter-car active suspension for an electric car, with an in-wheel motor mass case, and design an LQR controller that trades ride comfort against road holding and travel. It is compared with passive and skyhook suspensions on standard road profiles.

Tools: MATLAB · Simulink · Control System Toolbox

LQR Control of an Active Suspension for an Electric Car: Students working on simulation software in the DIYguru computer lab
Representative photo from DIYguru's EV lab, not of this specific project.

The problem

EVs carry heavy battery packs and some designs add in-wheel motors, which raise unsprung mass and worsen ride and road holding. Active suspension can compensate, but its design involves conflicting goals: low body acceleration for comfort, low tyre load variation for grip and limited suspension travel. LQR expresses these goals as weights and gives an optimal trade-off, making it ideal for an M.Tech study.

Objectives

  • Build a quarter-car model with sprung and unsprung masses, suspension and tyre stiffness and an actuator force.
  • Generate ISO-style random road profiles and bump inputs.
  • Design an LQR controller and study the effect of weighting on comfort, road holding and travel.
  • Compare with passive and skyhook suspensions, with and without in-wheel motor mass.
  • Add an observer or Kalman filter for practical state estimation and check actuator limits.

What you need

Tools and toolboxes

  • MATLAB — Road profile generation, weighting sweeps, frequency analysis and plotting.
  • Control System Toolbox — ss, lqr, kalman or lqe, bode and sigma for frequency responses.
  • Simulink — Time-domain simulation with actuator saturation and bandwidth, and data logging.

Software

  • MATLAB R2023b or later
  • Simulink
  • Example quarter-car parameters

Extra parts and data

None beyond the software above.

Key concepts

Quarter-car model
Two masses, the body corner (sprung) and wheel assembly (unsprung), connected by a spring, damper and actuator, with the tyre as a spring to the road. It captures the main ride and road-holding modes.
LQR
Linear-quadratic regulator: finds the state feedback that minimises the integral of x'Qx + u'Ru. Q penalises states such as body acceleration and travel; R penalises actuator effort.
Ride comfort and road holding
Comfort is measured by body vertical acceleration, often frequency-weighted; road holding by dynamic tyre load or tyre deflection. Improving one usually worsens the other.
Skyhook damping
A reference strategy where damping force is proportional to absolute body velocity, as if the body were hung from a damper in the sky. It is a common benchmark for active and semi-active systems.

Step-by-step guide

  1. 1

    Define parameters and metrics

    Use example values: sprung mass 400 kg, unsprung mass 40 kg (and 60 kg for an in-wheel motor case), suspension stiffness 20 kN/m, damping 1500 N·s/m, tyre stiffness 200 kN/m and actuator limit ±2 kN. Define metrics: RMS body acceleration, RMS dynamic tyre load and RMS and peak suspension travel, with a travel limit of ±80 mm. Note that the parameters are example values for a quarter of a compact car.

    Checkpoint: A parameter script and a metrics definition with formulas.

  2. 2

    Build the model

    Choose states x = [zs − zu, żs, zu − zr, żu] (suspension deflection, body velocity, tyre deflection, wheel velocity) with road velocity as disturbance and actuator force as input. Write A, B and disturbance matrices and build with ss. Check natural frequencies with damp: the body mode should be near 1–1.5 Hz and the wheel hop mode near 10–12 Hz for these values.

    Checkpoint: Two modes at the expected frequencies, and a Bode plot from road to body acceleration showing both peaks.

  3. 3

    Generate road inputs

    Generate a random road profile with a power spectral density following the ISO 8608 form for classes B and C, at a vehicle speed of 60 km/h, by filtering white noise or summing sinusoids. Also create a single bump and a pothole. Save each as a timeseries for From Workspace blocks. Use the same road realisation for every controller so differences come from the controller and not the road. Save the seed with the data.

    Checkpoint: Profile PSD plotted from the generated signal matches the target class line.

  4. 4

    Passive and skyhook baselines

    Simulate the passive suspension on each road and compute the metrics. Implement skyhook as an actuator force −c_sky·żs with a chosen c_sky, and repeat. Repeat both for the heavier unsprung mass to show the in-wheel motor penalty. Tune the skyhook gain so its RMS suspension travel is similar to the passive case, which makes the comfort comparison fair. Report all metrics in one table for both unsprung masses, and keep the table format for the later LQR results.

    Checkpoint: A baseline table showing worse road holding with the heavier wheel and skyhook improving comfort over passive.

  5. 5

    Design LQR

    Form a cost with body acceleration expressed through the state and input (which adds cross terms; use the lqr N argument), suspension travel and tyre deflection terms, and R for actuator force. Start with Bryson's rule: weights of one over the square of the acceptable maximum. Compute K with lqr and check closed-loop eigenvalues. Express body acceleration as a function of states and input so it can be weighted directly. Check that K gives realistic actuator forces within the limit on the class C road.

    Checkpoint: A stable closed loop with body acceleration lower than passive on the class C road at the same RMS travel.

  6. 6

    Weighting study

    Sweep the weights on body acceleration and tyre load across several decades with a script. For each, compute metrics on the random road. Plot comfort against road holding (the trade-off curve) and mark the passive, skyhook and selected LQR points. Repeat for the heavy unsprung mass case. Use a logarithmic grid of weights and store every result. Mark the points where suspension travel exceeds the limit so they can be excluded from the choice.

    Checkpoint: A trade-off curve on which LQR points dominate the passive point, and a chosen design with justification.

  7. 7

    Add a state estimator

    In practice only suspension deflection and body acceleration may be measured. Design a Kalman filter with kalman or lqe using assumed noise levels and road disturbance as process noise. Combine with the LQR gain (LQG). Compare metrics with full-state feedback. Check that the estimator remains stable when the unsprung mass is changed to the in-wheel motor value without retuning, and report the change in performance. Explain which measured signals would be available on a real car.

    Checkpoint: LQG performance close to full-state LQR, with the difference quantified.

  8. 8

    Actuator realism

    In Simulink, add actuator force saturation at ±2 kN and a first-order actuator bandwidth of, for example, 15 Hz. Run the bump and random roads. Check suspension travel against the limit and whether the actuator saturates often. Retune weights if needed so the actuator stays mostly within limits. Plot the actuator force against time to show how often it saturates. Report the RMS and peak force for the chosen design on each road.

    Checkpoint: Metrics with actuator limits, travel within ±80 mm on all roads and saturation time reported.

  9. 9

    Frequency-domain analysis

    Plot transfer functions from road velocity to body acceleration, tyre load and travel for passive, skyhook and LQR. Show where LQR improves comfort (around the body mode) and the limit at wheel hop, where an actuator between body and wheel cannot improve both comfort and road holding together (an invariant point). Use the same frequency range and axes for all plots so they can be compared directly. Mark the body and wheel-hop frequencies on each.

    Checkpoint: Overlaid Bode plots that show improvement near 1 Hz and the invariant behaviour near wheel hop.

  10. 10

    Report

    Present the model, road inputs, baselines, LQR design, weighting study, estimator, actuator limits and frequency analysis. Quantify the in-wheel motor penalty and how much active control recovers. State limitations: a quarter car only, linear springs, ideal actuator power supply and no energy consumption model. Include the full state-space matrices, the chosen weights and the reasoning behind them so the design can be reproduced and checked.

    Checkpoint: A report with trade-off curves and tables regenerated by script.

Testing & validation

  • Mode frequencies match analytical expectations.
  • Generated road PSD matches the target class.
  • LQR dominates passive on the trade-off curve.
  • Travel stays within limits with realistic actuator saturation.

Expected results

An LQR and LQG active suspension design for an EV quarter car with quantified trade-offs, comparison against passive and skyhook baselines, and a measured in-wheel motor penalty and its recovery.

Research angle for your M.Tech thesis

Research questions: how much of the ride and road-holding penalty of in-wheel motors can LQR or LQG active suspension recover within realistic actuator force and bandwidth limits, and what is the trade-off with actuator power? Baselines: passive and skyhook. Metrics: frequency-weighted body acceleration, dynamic tyre load, suspension travel and actuator RMS force or power. Comparing with published quarter-car results at the same parameters gives credibility. A study that includes actuator energy and finds the weightings that balance comfort, grip and energy for in-wheel motor EVs could be publishable.

Take it further

  • Add actuator power consumption and regenerative damping.
  • Extend to a half-car model with pitch, using preview from the front axle.
  • Use H-infinity control for robustness to mass changes.
  • Design a semi-active damper controller and compare with fully active.

Viva and review questions

Why does an in-wheel motor worsen road holding?

It increases unsprung mass, which lowers the wheel-hop frequency and makes tyre load vary more on rough roads, reducing grip.

How did you choose Q and R?

I started with Bryson's rule using acceptable maximum values, then swept the weights and chose a point on the trade-off curve that improves comfort without exceeding travel and actuator limits.

What is the invariant point?

At certain frequencies, an actuator acting between body and wheel cannot change one of the transfer functions, so near wheel hop it cannot improve comfort and road holding together.

Learn it at DIYguru

These DIYguru courses and programmes teach what this project needs.

Related EV projects

All 100 MATLAB & Simulink EV projects