Slingshot

PI Speed Loop Overshoot Debug

Symptom

Set to 9,000,000 mRPM, the shaft spins up past 12,000,000. After a 40 ms hang it runs on to nearly twice the setpoint. The figure lists drive registers. The Datasheet tab has the rest.

Measured speed of this program with the setpoint at 9,000,000 mRPM: it climbs to 12.6M during spin-up, drops to 0 during the 40 ms hang, then runs up to 17.8M and sags to 5.5M before it settles

Circuit

Block diagram: U1, an STM32F4, drives M1, the motor drive, which turns the shaft of a DC motor against a load; USART1 transmit runs to a serial console; below, the drive's registers at base 0x50061000 with offset, access and units, and the setpoint mailbox in SRAM

Pass condition

The drive's speed log is graded. Hidden runs vary setpoint, load and hang, with a lower peak where nothing hangs. This run:

peak at most 11,200,000 mRPM (setpoint + 2.2M) settled within 300,000 of the setpoint from 320 ms, 130 ms after the shaft frees end within 60,000 of the setpoint FAULT stall during the hang, never overcurrent

A passing program on the same run: it spins up toward the 9,000,000 mRPM setpoint without passing it, drops to 0 in the hang, peaks under the 11.2M ceiling, and is back within 0.3M of the setpoint before 320 ms

Notes

The supervisor sets the setpoint. Over the loop's 450 ms the load varies, at times past what the drive can carry, and no register reports it.

Related challenges

Loading the interactive arena.