@@ -284,9 +284,12 @@ point in time when the entire expected signal has been received.
284
284
![ graph] ( ./correlate.jpg )
285
285
286
286
As a simulation ` correlate.py ` is probably unrealistic from an engineering
287
- perspective as sampling is at exactly the Nyquist rate. I have an application
288
- for correlation but have not yet tested it with real hardware. I suspect one
289
- of two solutions may be necessary, both involving sampling at N* Nyquist.
287
+ perspective as sampling is at exactly the Nyquist rate. I have not yet tested
288
+ correlation with real hardware but I can envisage issues if the timing of the
289
+ received signal is such that state changes in the expected signal happen to
290
+ occur close to the sample time. To avoid uncertainty caused by signal timing
291
+ jitter it is likely that sampling needs t be done at N* Nyquist. Two solutions
292
+ to processing the signal suggest themselves.
290
293
291
294
The discussion below assumes 2* Nyquist.
292
295
@@ -300,5 +303,14 @@ The other is to first run a decimation filter to reduce the rate to Nyquist. A
300
303
decimation filter will introduce a time delay. However if this is applied to
301
304
both channels the relative phase will be unaffected.
302
305
306
+ In terms of performance, if sampling at Nyquist takes time T the first approach
307
+ will take 2T. The second will take T + Tf where Tf is the time to do the FIR
308
+ filtering. Tf will be less than T if the number of filter coefficients is less
309
+ than the number of samples in the expected signal.
310
+
311
+ If sampling at N* Nyquist where N > 2 decimation is likely to win out. Even if
312
+ the number of filter coefficients increases, a decimation filter is fast
313
+ because it only computes a subset of the results.
314
+
303
315
If anyone tries this before I do, please raise an issue describing your
304
316
approach and I will amend this doc.
0 commit comments