This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TIDM-02008: Notch filter usage

Part Number: TIDM-02008

Dear Champs,

I am asking this for our customer.

About the following notch filter used in the codes,

1) What does that mean by 0.25f and 0.00001f here?

2) Do we have any doc/appnote/description to mentioned about about the usage of notch filter?

 

Wayne Huang

  • Hi Wayne,

    It is a second order notch filter. Below is Matlab code that you can check.

    C1 and C2 are damping for numerator and denominator.

    I am not aware of any docs for this.

    % Notch Filter Partamters

    NotchFreq=120;

    wn = 2*3.1429*NotchFreq;

    c1=0.25;

    c2=0.00005;

     

    %Inverter Frequency

    Fs=10000;

    % sampling period

    Ts = 1/Fs;  

     

    s = tf('s');

     

    Hnf=(s^2+2*c2*wn*s+wn^2)/(s^2+2*c1*wn*s+wn^2)

    Best,

    John

  • Dear John,

    What is the band stop frequency range of TI notch filter when setting 60Hz?

    Wayne Huang

  • It depends on your damping coefficient. Are you keeping the same values?

  • Dear John,

    Yes, would you please explain band stop frequency range based on the same damping coefficients you use above in TIDM-02008?

    Wayne Huang

  • The bode plot is shown below. I can't find a way to upload a high quality image. You can draw your own by running the matlab code provided in my first answer..

    At a notch filter frequency (120 hz) the magnitude of band stop filter is c2/c1 and therefore it is 2e-4. and this corresponds to -73.9794 dB, which matches with the bode plot.

    The bandwidth of a notch filter is -3dB point near the notch frequency and it is around 60 Hz for this design. The lower c2/c1 ratio gives you the lower bandwidth.

    if you want to calculate the bandwidth mathematically, solve the equation when the magnitude of band stop filter is equal to 0.707 |H(s)|=0.707 (0.707 = - 3dB)

  • Dear John,

    Thank you for your information.

    Some more questions:

    1) In TIDM-02008, the above filter seems for 60 Hz AC only. What about other AC frequency input like 50 HZ. How do we deal with it? How do we check AC input frequency? Do we check it only in the initialization or also on the runtime ISR/background codes?

    2) The user's spec is AC input range 47Hz to 63 Hz, which may be input from the grid or from a UPS. Therefore, the user needs to deal with the AC input range all. Do you have any suggestion here? Do you suggest that they have different sets of coefficients for different AC input frequency? Do you suggest that they check AC input frequency and change this notch filter in the initialization or during runtime ISR/background?

    Any comment will be highly appreciated.

    Wayne Huang

  • Wayne,

    1.The notch filter frequency depends on the ac line frequency.

                        if(TTPLPFC_sine_mains.acFreq > 55)
                        {
                            TTPLPFC_sine_mains.acFreq = 60;
                            TTPLPFC_ac_period_sec = (float32_t) (1/TTPLPFC_sine_mains.acFreq);
                        }
                        else
                        {
                            TTPLPFC_sine_mains.acFreq = 50;
                            TTPLPFC_ac_period_sec = (float32_t) (1/TTPLPFC_sine_mains.acFreq);
                        }

    If the line frequency is lower than 55 Hz, the code set the line frequency as 50 Hz. If it is higher than 55 Hz, it is set to 60 Hz and there are notch filters for both 50 Hz and 60 Hz (TTPLPFC_notch_50Hz, TTPLPFC_notch_60Hz). Check the code in ttplpfc.c.

    2. TIDM-02008 is a reference design that operates at 50 Hz or 60 Hz. If the line frequency varies all the time, the customer should modify SPLL code to accommodate this. However, I'm, not sure whether TIDM-02008 based solution is an appropriate for variable ac freq because it is very sensitive to zero crossing detection which relies on SPLL.

    The notch filter coefficients can be updates in ISR or they can design a notch filter that has a wider bandwidth so that it covers all the ranges (rejects freq components from 94 Hz to 126 Hz).

    Best.

    John