TIDUA05B June 2015 – March 2025
For this test, the high-resolution interpolated angle over one mechanical revolution was calculated within TIDA-00176 connected to the Piccolo F28069M LaunchPad. The sample rate was set to 32 kHz at
80-MHz CPU clock.
The aim of the test is to verify the interpolation algorithm works at maximum input signal frequency of
500 kHz, without missing any incremental count or mismatching the interpolated phase (arc tangent) and the corresponding line count (QEP) for example, due to mismatch of latching the analog samples and the QEP counter. This would translate into a larger error then the quantization noise measured in Section 7.3.1.1.
For that purpose, a 360-degree spin of the encoder has been emulated using the dual signal generator. The test is performed with the dual output signal generator in the following way: The two output signals are coupled in amplitude and frequency, with a 90-degrees phase shift. The two signals are then applied as input at the TIDA-00176 encoder connector J9 A+/A– and B+/B– pins.
The total interpolated angle was stored in the F28069M RAM and read through CCS memory dump.
The calculated high-resolution angle is compared with an ideal phase assuming an encoder with 2000 line counts. Therefore, 2000 signal periods at 500K kHz equal one emulated revolution. The total angular phase ramps at a rate of 360 degrees × 500 kHz/2000 = 90,000deg/s. Table 7-6 provides the timings for
1 µs and for 100 ns, which equals one F28069M CPU clock at 80 MHz.
| IDEAL ANGULAR SPEED | ANGLE CHANGE IN 1 µs | ANGLE CHANGE IN 12.5 (CPU CLOCK) |
|---|---|---|
| 90,000 deg/s | 0.09 | 0.0011 |
A jitter on the signal generator as well as on the processor clock or even a CPU clock jitter of the host processor sampling the analog signal through SPI /CS cannot be avoided. Assuming an ideal ramp (due to a lack of reference) the measured angle will have a corresponding phase lag or lead, which translates into a velocity-dependent angle error.
Figure 7-29 shows the interpolated angle error assuming an ideal ramp (500 kHz, 2000 signal periods per revolution) measured at 32 khz, which yields 128 consecutive samples per revolution.
Figure 7-29 Error of Interpolated Angle Over One Revolution With Encoder Emulation (1 VPP, 500-kHz Input @ 32-kHz Sampling)As previously mentioned, the aim was not to test for accuracy, but to verify that no increment was lost. With a 2000-line count emulation, one incremental line count would correspond 360/2000 = 0.18 degrees. The angle error (difference) to an ideal straight line remains within ±0.001 degree; therefore, interpolation still works well at 500 kHz and no increment is lost.
As can be seen in figure the error is within ±0.0015 degrees. This is due to the CPU clock jitter as well as other jitter like from the signal generator source with the CPU clock jitter determining the minimum accuracy.
The reason for this distribution is due to jitter with the F28069 software to trigger the SPI transfer /CS of one or two CPU clock cycles. Falling edge of /CS latches the analog input. Just a jitter of 12.5 ns translates into a phase difference of around 12.5 ns/2000 ns × 360/2000 degrees ~ 0.0011 degrees. Therefore, the angle difference is actually a speed depended angle error (velocity) lag.