Skip to main content
emobility.academy
PhDControl designResearch About 16 weeksMATLAB & Simulink

Robust H-Infinity Control of an EV Drivetrain with Backlash

Design a robust H-infinity controller for an EV drivetrain with shaft compliance, backlash and uncertain vehicle mass, using mixed-sensitivity and structured synthesis. Margins are certified with mu analysis and compared with PI and LQG on tip-in and tip-out.

Tools: MATLAB · Robust Control Toolbox

Robust H-Infinity Control of an EV Drivetrain with Backlash: Students working on simulation software in the DIYguru computer lab
Representative photo from DIYguru's EV lab, not of this specific project.

The problem

Drivetrain shuffle and backlash clunk are key drivability issues in EVs because motor torque changes so quickly. The drivetrain parameters vary with vehicle load, gear wear and temperature, and backlash is a strong non-linearity. Controllers tuned for one condition can oscillate or clunk in another. Robust control provides guaranteed margins across a defined uncertainty set, which is the core of this research.

Objectives

  • Build a drivetrain model with motor inertia, shaft compliance, backlash, tyre and vehicle mass.
  • Define parametric and dynamic uncertainty with ureal and ultidyn.
  • Design H-infinity mixed-sensitivity and structured (hinfstruct or systune) controllers.
  • Certify robust stability and performance with mu analysis.
  • Compare with PI and LQG on non-linear tip-in and tip-out simulations with backlash.

What you need

Tools and toolboxes

  • MATLAB — Scripts for model building, synthesis and analysis.
  • Robust Control Toolbox — ureal and ultidyn uncertainty, mixsyn and hinfsyn synthesis, musyn, robstab and robgain analysis, and systune or hinfstruct for fixed-structure controllers.
  • Control System Toolbox — Linear models, LQG baseline with lqg, frequency and time responses.
  • Simulink — Non-linear drivetrain with backlash dead zone and torque limits for verification.

Software

  • MATLAB R2023b or later
  • Simulink
  • Example drivetrain parameters and, if available, measured shuffle data

Extra parts and data

None beyond the software above.

Key concepts

Mixed-sensitivity design
Shapes the sensitivity S, complementary sensitivity T and control sensitivity KS with weighting functions so the closed loop rejects disturbances at low frequency, attenuates noise at high frequency and limits control effort.
H-infinity norm
The peak gain of a system over all frequencies. Minimising the weighted H-infinity norm bounds the worst-case amplification of disturbances to errors.
Structured singular value (mu)
A measure of how much structured uncertainty a loop can tolerate before losing stability or performance. Robust stability holds if mu is below one across frequency for the defined uncertainty.
Backlash
Play in the gears, so torque transmission stops while the gap is crossed and resumes with an impact. It causes clunk on torque reversal and is a non-linearity outside linear robust design.

Step-by-step guide

  1. 1

    Define the research problem

    State the questions: can a fixed-structure robust controller achieve shuffle damping and tracking across a defined uncertainty set that a PI or LQG cannot, and how does it behave with backlash, which is outside the linear design? Define the uncertainty: vehicle mass ±25 per cent, shaft stiffness ±30 per cent, damping ±50 per cent and unmodelled high-frequency dynamics. Define drivability metrics: peak and RMS jerk, shuffle decay time and torque response time.

    Checkpoint: A written study plan with research questions, uncertainty set, baselines and metrics.

  2. 2

    Build the drivetrain model

    Build a four-state linear model: motor speed, shaft twist, wheel speed and vehicle speed with tyre longitudinal stiffness, using example parameters similar to a compact EV. In Simulink, build the non-linear version with a backlash dead zone of a small angle on the shaft and motor torque and rate limits. Validate that the linear model matches the non-linear one for small inputs where backlash is not crossed.

    Checkpoint: Linear and non-linear responses agree for small torque steps that keep the shaft loaded.

  3. 3

    Model the uncertainty

    Create ureal objects for mass, stiffness and damping and rebuild the plant as an uncertain state-space model (uss). Add an ultidyn multiplicative uncertainty at the actuator with a weight that grows above about 50 Hz for actuator lag and sensor delay. Sample the uncertain model with usample and plot Bode responses to see the spread of shuffle frequency. Choose the uncertainty ranges from a stated source, such as vehicle mass with and without passengers and cargo, and explain each range in the report.

    Checkpoint: A family of Bode plots showing the shuffle resonance moving across a frequency band as parameters vary.

  4. 4

    Baselines: PI and LQG

    Design a PI speed controller at nominal parameters with a notch or lag to reduce shuffle excitation. Design an LQG controller from motor speed measurement with lqg. Evaluate both with robstab and robgain on the uncertain model, and record worst-case margins and jerk metrics on sampled plants. Tune both baselines with reasonable effort so the comparison is fair. Report their nominal performance as well as robust margins, since a baseline can be good at nominal but poor at worst case.

    Checkpoint: Baseline robust stability margins and a list of uncertainty combinations where baselines perform poorly.

  5. 5

    Choose weighting functions

    Select W1 (on S) with high gain at low frequency for tracking and disturbance rejection, crossing below one around the desired bandwidth; W2 (on KS) to limit control effort at high frequency; W3 (on T) to roll off above the actuator bandwidth and cover the ultidyn uncertainty. Use makeweight to build them. Justify each corner frequency from physical limits. Expect to iterate on the weights a few times.

    Checkpoint: Plots of 1/W1, 1/W2 and 1/W3 that fit together with no obvious conflict at crossover.

  6. 6

    Synthesise H-infinity controllers

    Use mixsyn on the nominal plant with the weights to obtain a full-order controller and record gamma. Then use musyn on the uncertain plant for D–K iteration. Finally use systune or hinfstruct to tune a fixed-structure controller (for example PID plus a second-order filter) against the same weighted objectives, which is easier to implement. Check the order and pole locations of each controller. Simulate each nominal closed loop before moving to the robustness analysis.

    Checkpoint: Gamma near or below one for mixsyn, a musyn result with robust performance margin reported and a fixed-structure controller with performance close to full order.

  7. 7

    Certify robustness

    Run robstab and robgain on each closed loop with the full uncertainty set and plot mu bounds against frequency. Identify the worst-case uncertainty combination with wcgain. Compare robust stability and performance margins for PI, LQG, mixsyn, musyn and the fixed-structure controller. Explain what a margin of, for example, 1.5 means: the loop stays stable for uncertainty up to 1.5 times the defined range. Report the worst-case parameter values for each controller and simulate them.

    Checkpoint: A table of robust stability margin and worst-case performance gain for each controller, with mu plots.

  8. 8

    Discretise and reduce

    Reduce controller order with balred and check the loss in performance. Discretise at 1 ms with c2d using Tustin with prewarping at the shuffle frequency. Recheck margins on the discrete loop. Compute the operation count per step to show implementability on an automotive MCU. Plot the frequency response of the full and reduced controllers together to show where the reduction changes behaviour. Check that the shuffle frequency range is preserved.

    Checkpoint: Reduced, discrete controllers with margins close to the continuous full-order designs.

  9. 9

    Non-linear verification with backlash

    Run tip-in (0 to high torque in 0.1 s) and tip-out manoeuvres, and torque reversals that cross the backlash, on the non-linear Simulink model at nominal and worst-case parameters. Compute peak and RMS jerk, shuffle decay and response time for every controller. Use Monte Carlo over the uncertainty set for statistical comparison. Run at least 100 Monte Carlo samples per controller and report mean and spread of each metric. Use a fixed seed so results can be reproduced.

    Checkpoint: Monte Carlo jerk distributions showing which controllers keep drivability consistent across the uncertainty set, including backlash crossings.

  10. 10

    Backlash-aware extension

    Since backlash is outside the linear design, add a simple backlash-crossing strategy such as a reduced torque rate while the estimated gap is crossed, using a twist estimate, and evaluate with the robust controller. Quantify the reduction in clunk impact compared with the robust controller alone. Keep the strategy simple and clearly separate from the robust controller so its effect can be measured. Report any increase in response time caused by the reduced torque rate.

    Checkpoint: Reduced impact torque peak during backlash crossing compared with the robust controller without the strategy.

  11. 11

    Write the thesis chapter or paper

    Document the model, uncertainty set, weights, synthesis, robustness certificates, discretisation and non-linear results. Release scripts. Discuss the gap between linear guarantees and non-linear behaviour, and compare with published drivetrain control results where possible. State limitations: example parameters, no measured vehicle data unless available. Include all weighting functions, uncertainty ranges and controller orders. Present the results honestly, including any case where a baseline performed better.

    Checkpoint: A chapter with every result reproducible from released scripts and a clear comparison against baselines.

Testing & validation

  • Linear model matches the non-linear model for small loaded inputs.
  • Robust stability margin above one for the robust designs across the uncertainty set.
  • Discrete reduced controllers retain margins.
  • Monte Carlo drivability metrics reported for all controllers on the non-linear model.

Expected results

A robust H-infinity and mu-synthesis drivetrain controller, plus a fixed-structure version, with certified robustness margins and Monte Carlo drivability results that compare against PI and LQG on a non-linear model with backlash.

Research angle for your PhD

Research questions: what drivability can a fixed-structure robust controller guarantee across realistic EV drivetrain uncertainty, how close does it come to full-order mu-synthesis, and how well do linear robustness guarantees carry over to behaviour with backlash? Baselines: PI with notch and LQG. Metrics: robust stability margin, worst-case gain, Monte Carlo peak and RMS jerk, shuffle decay and response time. Validation with measured data from a vehicle or test bench would substantially strengthen the claims. A fixed-structure robust design with certified margins and a backlash-aware extension, compared rigorously with baselines, is the kind of result that suits a journal paper.

Take it further

  • Use linear parameter-varying (LPV) control scheduled on vehicle mass estimate.
  • Add a hybrid controller with explicit backlash modes.
  • Validate with measured shuffle data from a test vehicle.
  • Combine with traction control on low-friction roads.

Viva and review questions

What does mu less than one guarantee?

That the closed loop stays stable (or meets performance) for every combination of uncertainty within the defined set, including the structure of that uncertainty.

Why use a fixed-structure controller as well as full-order mu-synthesis?

Full-order controllers can be high order and hard to implement or explain. A fixed-structure controller tuned to the same objectives is simpler and the comparison shows how much performance it gives up.

Your design is linear; how do you handle backlash?

Backlash is outside the guarantee, so I verified on a non-linear model with Monte Carlo and added a simple crossing strategy, reporting the results separately from the linear certificates.

How did you choose the weighting functions?

From physical limits: W1 from required disturbance rejection and bandwidth, W2 from actuator effort, W3 from actuator bandwidth and unmodelled dynamics. I checked they did not conflict near crossover.

Learn it at DIYguru

These DIYguru courses and programmes teach what this project needs.

Related EV projects

All 100 MATLAB & Simulink EV projects