Notch filter design in Matlab
#notch filter #notch filter design #matlab Problem: An input sin signal is composed of 50 Hz and 100 Hz signals. 50 Hz is an interference signal. A 50 Hz notch filter must be designed with a sampling frequency of 400 Hz. Welcome to this video, I will introduce how to design a notch filter in the matlab, and use the designed notch filter to test an example case. According to this question, we should design the notch filter first. Then use the notch filter to work on the input signal to filter the 50Hz part. Finally, just keep the signal with the frequency 100Hz. Since fs = 400; CT_notch _freq = 50; DT_notch_freq = 2*pi* CT_notch _freq/fs; According to the DT_notch_freq, we could get the zeros and poles in the z-plane to design the notch filter. %In the z-plane, zeros = exp(±j*DT_notch_freq), poles = r*exp(±j*DT_notch_freq) %r is the radius of the IIR poles - if set to zero, filter reduces to FIR filter the range of r is from 0 to1 After we get the notchzeros and notchpoles from the roots value notchzeros and notchpoles, we could use poly to get the coefficients from roots, after we get the transformation function, we could use freqz_m function to get the Relative magnitude in dB, absolute magnitude, Phase response, Group delay After we get these parameters, then we could plot the transformation function. freqz_m function for downlanding: https://github.com/SonienTaegi/matlab/blob/master/DSP/freqz_m.m
Download
0 formatsNo download links available.