Sensors, Electronics and Prototyping

Reply To: Latency

#672

Sounds like a fun project! My MS thesis was on quadrotor system ID, state estimation, and control. In fact, the UM7’s predecessor (the UM6) was built specifically for operation on quadcopters.

We actually haven’t characterized the latency on the UM7, but the sensor itself will introduce very little delay between measurements and the angle estimates – probably something on the order of 3 to 5 milliseconds. You’ll get a little more latency from the serial port. At 115200 baud, for example, it takes ~ 1.8 milliseconds to transmit a 23-byte packet (that’s the size of the Euler Angle state packet). So altogether, it’s safe to assume that there is less than 10 milliseconds of delay between motion and a completed serial transmission.

If you are receiving the serial data on an OS like Windows or non-real-time Linux, then the OS can add very large and unpredictable delays even after the hardware receives and buffers the serial data. If you are running on a standard OS, try to minimize the number of processes running other than the control loop.

To improve the performance of your control loop, I’d also turn off transmission of all data that you don’t need – so, maybe leave the health packet turned on at 1 Hz or so, turn everything else off, and crank the Euler Angle transmission rate up to 255 Hz. That’s the fastest automatic broadcast rate supported. The default state broadcast rate is only 20 Hz, and you’ll definitely want something faster than that to control a quadcopter.