Data synchronization and time-keeping Thorbjrn Jrger Lehrstuhl fr - - PowerPoint PPT Presentation
Data synchronization and time-keeping Thorbjrn Jrger Lehrstuhl fr - - PowerPoint PPT Presentation
Data synchronization and time-keeping Thorbjrn Jrger Lehrstuhl fr Systemtheorie Institut fr Mikrosystemtechnik - IMTEK Albert-Ludwigs-Universitt Freiburg Groundstation - 2 - 7. September 2016 Group Retreat 2016 Botanischer
- 2 -
Groundstation
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 3 -
Flight Controller
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 4 -
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
ARM FC GS
tN tN tN is a synchronous timing pulse tN
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 5 -
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
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 6 -
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
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 7 -
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. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 8 -
Result: Nicely timed measurements
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
380000 381000 382000 383000
- 2,00E+009
- 1,50E+009
- 1,00E+009
- 5,00E+008
0,00E+000 5,00E+008 1,00E+009
Number of ticks Package number
8 10 12 14 16 18 20 22
PPS counter
- 9 -
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
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 10 -
Thor likes his hammer, so let’s look for an easy and “swift”, but effective solution
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 11 -
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
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 12 -
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)
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 13 -
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
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 14 -
Methods of “Forced Synchronization”
Resampling method: FIR filter with Hamming window
- Much better suppression of side-lobes
- Higher computational cost
- Possible overkill
Discussion
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 15 -
Delay overview
tAS, tAoA, tLAS, tIMU small, constant tSPI, tUART significant, jitter through interrupts tRS485 biggest contribution
ARM FC GS IMUs Airspeed AoA IMU GPS IMU
SPI I²C I²C SPI UART
GPS
UART
TAS
SPI
RS485 (Cable) RS485 (Cable)
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 16 -
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
FC Airspeed AoA IMU GPS
UART SPI I²C I²C
LAS
SPI UART Ethernet (Cable)
BB
SPI
GS
SSH
IMU
SPI
Past:
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger
- 17 -
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
FC Airspeed AoA IMU GPS
UART SPI I²C I²C RS485 (Tether)
GS
SSH
LAS
SPI
IMUs
Present:
- 7. September 2016
Group Retreat 2016 – Botanischer Garten – Thorbjörn Jörger