FixTheRobot Explore Robotics / Guidance, Navigation and Control / M3 / M3-L2

This lab works on phones, but writing code is much easier on a laptop.

Guidance, Navigation and Control · Classical Feedback Control · M3-L2 · Intermediate

When the Gimbal Saturates

Bench log · Hopper on the test range

11:45. During a test, the operator typed a pitch command of 1 rad instead of 0.1. The gimbal went to its limit and stayed there for two seconds; when the angle finally reached the command, Hopper kept rotating and overshot it by almost half a radian.

You will see why, compare two ways of stopping it, and write the controller update that goes into the 50 Hz flight code.

Your task

    Simulation
    solution.pyLoading Python…
    Ctrl+Enter runs
    What Python can I use?

    Plain Python 3 with the standard library and the course library gnckit (import gnckit as g: transfer functions and margins, state space and LQR, the Hopper model, quaternions, a convex solver). NumPy is not available in the browser. Your code runs in a background worker: an endless loop is stopped after a few seconds and the page stays usable. It runs in your browser and is never sent anywhere.

    Hints

    What this lab teaches

    Stage 1 shows integrator windup: the integral term keeps accumulating while the gimbal is at its limit and has to be unwound afterwards. Clamping helps a little; back-calculation, which feeds the excess of the wanted command over the delivered one into the integrator, removes the overshoot. Stage 2 implements the update and checks that it does not change the behaviour of a small command.

    Grading flies hidden commands and integral gains in a 50 Hz loop with the gimbal limits, and compares the overshoot, the settling time and the unchanged small-step behaviour.

    Theory for this lab

    Classical Feedback Control labs

    1. M3-L1: Rescue the Phase Margin
    2. M3-L2: When the Gimbal Saturates: this lab.

    Educational simplification: one axis, the reference PD gains of module 3 and an integral gain of 0.2 to 0.4. Real systems also limit the command rate and use a gain schedule; the windup mechanism is the same.

    Get the next lab

    Get notified when new robotics labs are released. One email per new lab, nothing else.