Script to evaluate butterworth parameters

Gabriel_Justo
Gabriel_Justo
Altair Employee
edited October 2020 in Community Q&A

Hello everyone,

 

I would like to share with the community a script that allows the user to test different parameters of a filter to see if the filtered signal is good or not.

 

From line 3 to 16 you can edit the parameters to change both the signal and the filter behaviour. After the script finishes it is possible to check the original and the filtered signal, as wall as the FFTs.

 

Highlighted in yellow are the frequencies of the signal and the plots obtained:

<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.083601908f561655e2e58b91074620af.png

 

PS: It's also possible to use filtfilt instead of filter to keep the signal phase
<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.91d8a9920d70d89d2d47c55b81193605.png

 

Unable to find an attachment - read this blog

Tagged:

Answers

  • Gabriel_Justo
    Gabriel_Justo
    Altair Employee
    edited July 2020

    Adding the newer version because the legend was backwards. The script will first use first the low pass filter then the high pass filter

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.3e132a39f704f53bf38861cd3963191c.png

    Unable to find an attachment - read this blog

  • Adriano_Koga
    Adriano_Koga
    Altair Employee
    edited July 2020

    nice! :D/emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' />