Data synchronization and time-keeping Thorbjörn Jörger Lehrstuhl für Systemtheorie Institut für Mikrosystemtechnik - IMTEK Albert-Ludwigs-Universität Freiburg
Groundstation - 2 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Flight Controller - 3 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Clock synchronization Reference pulse which occurs simultaneous in all systems 1PPS signal of GPS is the natural choice for outdoor experiments no information exchange between systems necessary Absolute and jump-free GPS time reference is also available Small jitter (15-50 ns) with cheap equipment, < 1 ns with better equipment Indoor Environment usually has to low signal strength t N t N t N GS FC ARM t N is a synchronous timing pulse - 4 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Time keeping Each measurement gets a timestamp in a unified time frame Need for synchronous clocks Flight Controller: Self designed timing framework 1PPS pulse for synchronization Intervals between pulses measured with precise quartz oscillator Absolute deviation below 10 µs - 5 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Time keeping Each measurement gets a timestamp in a unified time frame Need for synchronous clocks Groundstation: Synchronized with UTC via GPS Less than 1 µs deviation from true time Essentially a Stratum 1 time server Automatic synchronization on startup < 2 min GS references ticks and PPS pulses to UTC Keeps track of all quartz oscillators in the system - 6 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Time keeping GPS devices – Furuno GT-87 / GF-8701: Lock on GPS, GLONASS, Galileo, QZSS, SBAS Precise PPS generation < 15 ns For PPS generation, only one satellite necessary Sensitive enough for indoor operation (-161 dBm) After startup and lock-on, separate devices generate PPS pulses with less than 100 ns difference Deviation gets smaller over time, as clock disciplination progresses When lock is lost, drifts with 1µs/100s (hold-over) - 7 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Result: Nicely timed measurements 22 1,00E+009 20 5,00E+008 18 Number of ticks 0,00E+000 PPS counter 16 -5,00E+008 14 12 -1,00E+009 10 -1,50E+009 8 -2,00E+009 380000 381000 382000 383000 Package number - 8 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Synchronous control system Measurements taken at a fixed frequency All clocks in the system need to be synchronous Synchronization method: Measurements need to be triggered externally Not all sensors support this Difficult to implement and maintain Manual calibration Change one thing Repeat previous step - 9 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Thor likes his hammer, so let’s look for an easy and “swift”, but effective solution - 10 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Methods of “Forced Synchronization” Resampling method: Just ignore the problem Simply take the latest available value Easiness: Brutality: Effectiveness: ? (Should work well, if the signal is slowly changing) Introduces discretization noise and potential systematic errors Resampling method: Ignore the problem a little less Same as above, but increase the sampling rate Easiness: Brutality: Effectiveness: ? (Linearly reduces the time since last measurement) That is what we do/did but lets try a more subtle approach - 11 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Methods of “Forced Synchronization” Resampling method: Linear approximation Take the last two values and approximate the current value Easiness: Effectiveness: ? (Should work well, if the signal is slowly changing) - 12 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Methods of “Forced Synchronization” Resampling method: Moving average aka. FIR filter The N last samples are averaged with a windowing function Higher sampling rates are beneficial Necessary for fulfilling Nyquist criterion and to prevent aliasing Reduces Gaussian noise Introduces delay Discontinuity of rectangular windowing function introduces side- lobes to the signal spectrum Rectangular window not optimal - 13 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Methods of “Forced Synchronization” Resampling method: FIR filter with Hamming window Much better suppression of side-lobes Higher computational cost Possible overkill Discussion - 14 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Delay overview t SPI , t UART significant, jitter Airspeed AoA TAS through interrupts I²C SPI I²C RS485 RS485 SPI GS FC ARM IMUs IMU (Cable) (Cable) UART UART SPI IMU GPS GPS t RS485 biggest contribution t AS , t AoA , t LAS , t IMU small, constant - 15 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Sensor fusion It is desirable to have all sensors fused at one point Time keeping and synchronisation much easier Easier to maintain Fast and low jitter connection to controller More time for NMPC calculations in each time step Past: IMU Airspeed AoA I²C SPI I²C SPI SSH Ethernet SPI GS BB FC IMU (Cable) UART UART SPI LAS GPS - 16 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Sensor fusion It is desirable to have all sensors fused at one point Time keeping and synchronisation much easier Easier to maintain Fast and low jitter connection to controller More time for NMPC calculations in each time step Present: Airspeed AoA I²C I²C SSH RS485 SPI GS FC IMUs IMU (Tether) UART SPI LAS GPS - 17 - 7. September 2016 Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
Recommend
More recommend