Skip to content

Commit 91301e5

Browse files
committed
FILT.md improve correlation text.
1 parent 65ce022 commit 91301e5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

non_realtime/FILT.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,12 @@ point in time when the entire expected signal has been received.
284284
![graph](./correlate.jpg)
285285

286286
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.
290293

291294
The discussion below assumes 2*Nyquist.
292295

@@ -300,5 +303,14 @@ The other is to first run a decimation filter to reduce the rate to Nyquist. A
300303
decimation filter will introduce a time delay. However if this is applied to
301304
both channels the relative phase will be unaffected.
302305

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+
303315
If anyone tries this before I do, please raise an issue describing your
304316
approach and I will amend this doc.

0 commit comments

Comments
 (0)