diff --git a/applications/lofar2/model/pfb_bunton_annotated/Gen_filter12.m b/applications/lofar2/model/pfb_bunton_annotated/Gen_filter12.m index 50b22e3bd5a22032d5d45a5e4baab6def8b8795a..2175d731c649db549c0ea98113ec6a2122e19b54 100644 --- a/applications/lofar2/model/pfb_bunton_annotated/Gen_filter12.m +++ b/applications/lofar2/model/pfb_bunton_annotated/Gen_filter12.m @@ -103,4 +103,4 @@ title ('Response of fircls1 filter c and interpolated cl') grid clT = cl'; -save('cl.txt', 'clT', '-ascii', '-double') +save('cl.dat', 'clT', '-ascii', '-double') diff --git a/applications/lofar2/model/readme_rtdsp_fir.txt b/applications/lofar2/model/readme_rtdsp_fir.txt new file mode 100644 index 0000000000000000000000000000000000000000..e2178313eff026b2d52c3350381bc92d03340c34 --- /dev/null +++ b/applications/lofar2/model/readme_rtdsp_fir.txt @@ -0,0 +1,32 @@ +Author: Eric Kooistra, nov 2023 + +* Practise DSP [1]. + +* Try to reproduce LOFAR subband filter FIR coefficients using scipy instead + of MATLAB. + The pfs_coeff_final.m from the Filter Task Force (FTF) in 2005 use fircls1 + with r_pass and r_stop to define the ripple. In addition it post applies a + Kaiser window with beta = 1 to make the filter attenuation a bit more deep + near the transition. The pfir_coeff.m from Apertif also uses fircls1. + Both use fircls1 with N = 1024 FIR coefficients and then Fourier + interpolation to achieve Ncoefs = 1024 * 16 FIR coefficients. Both scripts + can not exactly reproduce the actual LOFAR1 coefficients, therefore these + are loaded from a file Coeffs16384Kaiser-quant.dat + +* Try low pass filter design methods using windowed sync, firls, remez [2] + The windowed sync method, firls leased squares method and remez method all + yield comparable results, but firls and remez perform slightly better near + the transition band. The firls and remez functions from scipy.signal use + transition bandwidth and weights between pass and stop band to influence + the transition region and ripple. For remez the ripple is constant in the + pass band and stop band, for firls the ripple is largest near the band + transition. + +* It is possible to design a good FIR filter using Python scipy. Possibly with + some extra help of a filter design and analysis (FDA) tool like pyfda [3]. + +[1] https://git.astron.nl/rtsd/rtdsp/-/blob/main/doc/dsp_study_erko.txt, + summary of DSP books +[2] python package rtdsp and Jupyter notebooks, for radio telescope DSP + investigations in Python at https://git.astron.nl/rtsd/rtdsp +[3] pyfda, dsp, at https://github.com/chipmuenk