Skip to content
Snippets Groups Projects
Commit 1669fce6 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

Merge branch 'master' into HPR-148

parents dcc750d4 87fdde83
Branches
No related tags found
1 merge request!380restructured rdma_packetiser_assemble_header and created
Pipeline #70465 passed with warnings
...@@ -99,6 +99,8 @@ Message ...@@ -99,6 +99,8 @@ Message
5) Planning topics Transient detection 5) Planning topics Transient detection
https://support.astron.nl/confluence/display/SBe/SDP+Transient+detection+planning+estimate
- Comparison with LOFAR1 [1, 5] - Comparison with LOFAR1 [1, 5]
. IIR filter with programmable coefficients to implement: . IIR filter with programmable coefficients to implement:
- HPF (> 30MHz), BPF - HPF (> 30MHz), BPF
...@@ -114,7 +116,16 @@ Message ...@@ -114,7 +116,16 @@ Message
. binning for LI, because 10000 triggers / flash, so only trigger strongest per bin (= time slot) . binning for LI, because 10000 triggers / flash, so only trigger strongest per bin (= time slot)
- Comparison cosmic ray and lightning [1, 2] - Comparison cosmic ray and lightning [1, 2]
. Check that LI binning is transparant to CR . Check that LI binning is transparant to CR
. Format of detection message . Format of detection message [5]
- The ID of the triggered channel.
- The time of the trigger with sample time accuracy. E.g. the sample number of the first
sample above the threshold.
- A value representing the width of the pulse. E.g. the number of samples between the first
sample and the last above the threshold. If the width is large (e.g. more than 255 samples)
only the fact that this is a wide pulse is needed.
- Desirable but not required is a value representing the height of the pulse. This could the
value of the largest sample, or the sum over all samples in the pulse, or whatever is easier
to implement.
- Requirements, MVP - Requirements, MVP
. number of signal inputs per FPGA (max 12 single pol) . number of signal inputs per FPGA (max 12 single pol)
. one polarization per antenne ? . one polarization per antenne ?
......
applications/lofar2/images/resources_lofar2_unb2c_sdp_station_full_21_oct_2023.png

783 KiB

...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
# . https://www.w3.org/TR/audio-eq-cookbook/ # . https://www.w3.org/TR/audio-eq-cookbook/
# . https://webaudio.github.io/Audio-EQ-Cookbook/Audio-EQ-Cookbook.txt # . https://webaudio.github.io/Audio-EQ-Cookbook/Audio-EQ-Cookbook.txt
# . Configure the Coefficients for Digital Biquad Filters in TLV320AIC3xxx Family (pdf) # . Configure the Coefficients for Digital Biquad Filters in TLV320AIC3xxx Family (pdf)
# # * [WOLFSOUND] https://thewolfsound.com/
1) Linear Time Invariant (LTI) system [LYONS 1.6] 1) Linear Time Invariant (LTI) system [LYONS 1.6]
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
using Fourier interpolation a filter with less coefs. using Fourier interpolation a filter with less coefs.
by stuffing zeros in the frequency domain [LYONS 13.27, 13.28] by stuffing zeros in the frequency domain [LYONS 13.27, 13.28]
. Linear phase filter types (filter order is Ntaps - 1, fNyquist = fs/2) . Linear phase filter types (filter order is Ntaps - 1, fNyquist = fs/2)
[LYONS 9.4.1]: [LYONS 9.4.1, VAIDYANATHAN 2.4.2]:
Type Ntaps Symmetry H(0) H(fs/2) Type Ntaps Symmetry H(0) H(fs/2)
I Odd Even any any --> LPF, HPF I Odd Even any any --> LPF, HPF
II Even Even any 0 --> LPF II Even Even any 0 --> LPF
...@@ -214,6 +214,13 @@ ...@@ -214,6 +214,13 @@
domain: domain:
y(n) = h(k) * x(n) ==> DFT ==> Y(m) = H(m) X(m) y(n) = h(k) * x(n) ==> DFT ==> Y(m) = H(m) X(m)
For DFT this is circular convolution. With suffcient zero padding N >= len(the
circular convolution can calculate the linear convolution:
N-1
y[n] = sum h(k) x((n - k) % N)
k=0
- Number of FIR coefficients (Ntaps) - Number of FIR coefficients (Ntaps)
. Trade window main-lobe width for window side-lobe levels and in turn filter . Trade window main-lobe width for window side-lobe levels and in turn filter
transition bandwidth and side-lobe levels transition bandwidth and side-lobe levels
...@@ -224,8 +231,8 @@ ...@@ -224,8 +231,8 @@
. Remez = Parks-McClellan [HARRIS 3.3, LYONS 5.6]: . Remez = Parks-McClellan [HARRIS 3.3, LYONS 5.6]:
- yield a Chebychev-type filter - yield a Chebychev-type filter
- Steeper transition than window based, but constant stopband peak levels - Steeper transition than window based, but constant stopband peak levels
- Ntaps = func(fs, fpass, fstop, pb ripple, sb ripple) [HARRIS 3.3, - Nof taps [HARRIS 3.3, LYONS 5.10.5, VAIDYANATHAN 3.2]:
LYONS 5.10.5]: . Ntaps = func(fs, fpass, fstop, pb ripple, sb ripple)
~= fs / df * Atten(dB) / 22, df = abs(fstop - fpass) ~= fs / df * Atten(dB) / 22, df = abs(fstop - fpass)
- Choose transition region specification in order of 4 pi / Ntaps, and not - Choose transition region specification in order of 4 pi / Ntaps, and not
too wide, because then the transition band is not smooth [JOS4 4.5.2]. too wide, because then the transition band is not smooth [JOS4 4.5.2].
...@@ -299,6 +306,22 @@ ...@@ -299,6 +306,22 @@
HXY(w_k) = DFT_k(xy(n)) = 1 / N conj(X(w_k)) Y(w_k) HXY(w_k) = DFT_k(xy(n)) = 1 / N conj(X(w_k)) Y(w_k)
Correlation is a measure of similarity between two function x(k) and y(k),
for different shifts (lag) in time. Autocorrelation can show the periodicity
of a signal, because they it has similarity for some k > 0. To prove that
correlation can be expressed as convolution use a helper function
[WOLFSOUND]:
xh[n] = sum_k x[n + k] h[k], with sum_k for k = -inf to +inf
= sum_k x[-(-n - k)] h[k]
= sum_k x1[-n - k] h[k], with x1[p] = x[-p]
= (x1[n] * h[n])[-n], because convolution equation is [LYONS Eq. 5.6,
JOS4 7.2.4]: y(n) = sum_k x(n - k) h(k) = x(n) * h(k)
= x[-n] * h[n])[-n], again with x[-p] = x1[p], so correlation can be
calculated by convolving the time flipped x and then time flip
the result. Beware correlation is not commutative, so xh[n] !=
hx[n].
- FIR system identification from input-output measurements [JOS1 8.4.5, - FIR system identification from input-output measurements [JOS1 8.4.5,
PROAKIS 12] PROAKIS 12]
...@@ -353,7 +376,8 @@ ...@@ -353,7 +376,8 @@
uses the DFT of the real signal to determine the analytic signal uses the DFT of the real signal to determine the analytic signal
xa = IDFT(DFT(xr) * 2U) = xr + j ht. With xr = d(n - Ntaps // 2), this xa = IDFT(DFT(xr) * 2U) = xr + j ht. With xr = d(n - Ntaps // 2), this
yields ht = imag(xa). yields ht = imag(xa).
. Half band [13.1, 13.37] . Half band [LYONS 13.1, 13.37]
. Multirate Hilbert Transformer [CROCHIERE 6.4]
. An Efficient Analytic Signal Generator [STREAMLINING 38]. Use -45 and +45 . An Efficient Analytic Signal Generator [STREAMLINING 38]. Use -45 and +45
degrees phase rotation of a complex bandpass filter that is 0 for f < 0 degrees phase rotation of a complex bandpass filter that is 0 for f < 0
and has rect window with cosine-taper (~= Tukey window, ~= raised cosine) and has rect window with cosine-taper (~= Tukey window, ~= raised cosine)
...@@ -429,6 +453,8 @@ ...@@ -429,6 +453,8 @@
. scipy.signal.freqz plots frequency response along unit circle . scipy.signal.freqz plots frequency response along unit circle
z = exp(j w) defines ak for k > 1 as negative z = exp(j w) defines ak for k > 1 as negative
. analytic continuation means if H0(z) = H1(z) for z = exp(jw), then
H0(z) = H1(z) for all z [VAIDYANATHAN 2.4.3].
- biquad (= second-order section = sos): - biquad (= second-order section = sos):
...@@ -490,7 +516,70 @@ ...@@ -490,7 +516,70 @@
. For single biquad bandpass alternatively use signal.iirpeak() . For single biquad bandpass alternatively use signal.iirpeak()
For single biquad bandstop alternatively use signal.iirnotch() For single biquad bandstop alternatively use signal.iirnotch()
6) Discrete Fourier Transform (DFT)
6) Allpass filters [VAIDYANATHAN 3.4, STREAMLINING 9, HARRIS 10, JOS3 2.8,
WOLFSOUND]
- H(z) is allpass if |H(exp(jw))| = c for c > 0
--> H(exp(jw)) = c exp(j phi(w))
- Trivial examples: H(z) = 1, H(z) = +-z^(-K) (FIR delay line)
- First-order allpass filter (real coefficient a) [WOLFSOUND, STREAMLINING
9.1]. Note using a = 0 yields delay z^(-1), hence this can be regarded and
used as a generalized delay element. Via a the -pi / 2 phase shift can be
obtained at any normalized frequency.
a + z^(-1) 1 + a z
H(z) = ------------- = --------
1 + a z^(-1) z + a
y[n] = a x[n] + x[n - 1] - a y[n - 1]
The phase shift is 0 at f = 0, -pi at f = fNyquist = fs / 2 and -pi / 2 at
fb the break or center frequency [WOLFSOUND]. The fb follows from the bilear
transform of an analogue all pass filter and is defined via the coeficient a:
a = (tan(pi fb / fs) - 1) / (tan(pi fb / fs) + 1)
- Second-order allpass filter [WOLFSOUND, STREAMLINING 9.1, HARRIS 10.5.1]:
-c + d (1 - c) z^(-1) + z^(-2) 1 + d (1 - c) z - c z^2
H(z) = -------------------------------- = -----------------------
1 + d (1 - c) z^(-1) - c z^(-2) z^2 + d (1 - c) z - c
The phase shift is now -pi at the fb break or center frequency and controlled
by parameter d:
d = -cos(2 pi fb / fs)
The parameter c determines the bandwidth (BW) or steepness of the phase slope
through fb:
c = (tan(pi BW / fs) - 1) / (tan(pi BW / fs) + 1)
Hence fb and BW can be controlled independently via parameters d an c.
- Consider Type I allpass H(z) and Type II allpass H(z^2), so M = 2, and 1st
and 2nd order as building blocks for M-path = two-path recursive allpass
filters [STREAMLINING 9.1].
- Higher order IIR allpass filter, must have transfer function of the form:
H(z) = +-z^(-K) A~(z) / A(z)
where A~ is obtained by reversing the polynomial coefficients of A. This
implies that the poles and zeros occur in (conjugate) reciprocal pairs.
- Allpass decomposition theorem [VAIDYANATHAN 3.6]:
H0(z) = (A0(z) + A1(z)) / 2
If H0(z) and H1(z) are power complementary, so |H0|^2 + |H1|^2 = c^2 for all
w, then:
H1(z) = (A0(z) - A1(z)) / 2
7) Discrete Fourier Transform (DFT)
- The N roots of unity [JOS1 3.12, 5.1, PROAKIS 5.1.3, LYONS 4.3]. Note JOS - The N roots of unity [JOS1 3.12, 5.1, PROAKIS 5.1.3, LYONS 4.3]. Note JOS
uses +j in W_N because inproduct is with conj(W_N), others use -j because uses +j in W_N because inproduct is with conj(W_N), others use -j because
then W_N can be used directly in equation and matrix: then W_N can be used directly in equation and matrix:
...@@ -620,7 +709,7 @@ ...@@ -620,7 +709,7 @@
k=-inf k=-inf
7) Short Term Fourier Transform (STFT) [JOS4 7, 8] 8) Short Term Fourier Transform (STFT) [JOS4 7, 8]
- Purpose of the STFT is to display frequency spectra in time (spectrogram). A - Purpose of the STFT is to display frequency spectra in time (spectrogram). A
window is used on input x, so that non-linear and/or time varying spectral window is used on input x, so that non-linear and/or time varying spectral
modifications can be performed. modifications can be performed.
...@@ -710,7 +799,7 @@ ...@@ -710,7 +799,7 @@
= [x_k * flip(w)](m), with x_k(n) = x(n) exp(-j w_k n) = [x_k * flip(w)](m), with x_k(n) = x(n) exp(-j w_k n)
8) Multirate processing: 9) Multirate processing:
- Linear Time Variant (LTV) process, because it depends on when the - Linear Time Variant (LTV) process, because it depends on when the
downsampling and upsampling start. downsampling and upsampling start.
- Polyphase filtering ensures that only the values that remain are calculated, - Polyphase filtering ensures that only the values that remain are calculated,
...@@ -732,8 +821,12 @@ Upsampling + LPF = interpolation: ...@@ -732,8 +821,12 @@ Upsampling + LPF = interpolation:
need to be calculated and the LPF then needs to compensate for the non-flat need to be calculated and the LPF then needs to compensate for the non-flat
pass band of sin(x)/x [LYONS 10.5.1] pass band of sin(x)/x [LYONS 10.5.1]
Fractional time delay [CROCHIERE 6.3]
- Up sampling M --> LPF --> z^(-L) --> down sampling M yields semi
allpass filter and delay of L / M samples
Appendix 8) Signal operators [JOS1 7.2] Appendix A) Signal operators [JOS1 7.2]
- Operator(x) is element of C^N for all x element of C^N - Operator(x) is element of C^N for all x element of C^N
. assume modulo N indexing for n in x(n), so x(n) = x(n + mN) or periodic . assume modulo N indexing for n in x(n), so x(n) = x(n + mN) or periodic
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment