You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to test this project in practice but in my country the noise from the power line is 60 Hz and I have difficulties to modify your code from 50 to 60 Hz. Can you point me to any information that can help me to recalculate this filter.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Looking at the code, we can calculate the coefficients of the notch filter for power lines at 60Hz, assuming a sampling frequency of 500Hz (from arduino.ino).
H(z) = (z-1)/(z-a) where a is within 0-1, the closer a is to 1 the tighter the notch.
to normalize DC unity we multiply H(z) by (1+a)/2
our wn is fo/fc = (60/500)2pi = 0.75398
rotating poles and zeros of z and plugging into H(z)
with a = 0.99 (close to 1 as we want a tight notch since we only want to get rid of 60Hz)
and wn = 0.75398
H(z) = ((1+a)/2) ((z^2) - 2zcos(wn) +1)/ ( (z^2) - 2azcos(wn) + (a^2))
H(z) = (0.995 - 1.999z^(-1) + 0.995z^(-2) ) / (1- 1.979z^(-1) + 0.9801z^(-2))
Solving the coefficients using inverse z transform
Hello,
I'm trying to test this project in practice but in my country the noise from the power line is 60 Hz and I have difficulties to modify your code from 50 to 60 Hz. Can you point me to any information that can help me to recalculate this filter.
Thanks in advance!
The text was updated successfully, but these errors were encountered: