TMS320F28388D: SPLL_3Ph_SRF loop Coefficients calculations

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hi Team,

Iam using TMS320F28388D for my application. In this Iam Using the SPLL_3ph_SRF fuction in which i trying to find the loop coefficients for my apllications. but Iam not able to find the Correct calculation procedure for the same. Please guide me to find them

for reference: loop coefficients iam taking about are,

 TINV_spll_3ph_2.lpf_coeff.b0 = 166.9469f; // SPLL filter parameter based on SPLL guide
 TINV_spll_3ph_2.lpf_coeff.b1 = -166.25305f; // SPLL filter parameter based on SPLL guide
 
Thanks in advance,
Nikileshwar Vamanaguntla
  • Hi Nikileshwar,

    The SPLL_3Ph_SRF module in C2000Ware uses a loop filter with two coefficients b0 and b1 stored in the SPLL_3PH_SRF_LPF_COEFF structure [1]. The loop filter implements a discrete PI controller as:

    ylf[0] = ylf[1] + (b0 * v_q[0]) + (b1 * v_q)

    This is a first-order IIR filter (bilinear/Tustin-discretized PI controller) operating on the q-axis voltage error signal (v_q).

    How to Calculate b0 and b1

    The documentation does not explicitly provide the derivation formulas, but based on the standard discrete PI structure used here, the coefficients map to a continuous-time PI controller as follows:

    Coefficient
    Formula
    b0
    Kp + Ki·(Ts/2)
    b1
    -Kp + Ki·(Ts/2)

    Where:

    • Kp = proportional gain
    • Ki = integral gain
    • Ts = sampling period (1 / ISR frequency)

    Designing Kp and Ki from PLL Specifications

    For a standard second-order PLL model:

    Parameter
    Formula
    Kp
    2 · ζ · ωn
    Ki
    ωn²

    Where:

    • ζ (zeta) = damping ratio (typically 0.707 for critically damped response)
    • ωn = natural frequency of the PLL (in rad/s)

    The natural frequency ωn is chosen based on your desired settling time or bandwidth:

    • ωn ≈ 4 / (ζ · t_settle) for 2% settling criterion
    • Typical values for 50/60 Hz grid: ωn = 2π·(20 to 50) rad/s for a bandwidth of ~20–50 Hz

    You can refer this document for more information.
    C2000 Digital Control Library

    Regards,
    Harisyam

  • Hi Harisyam, 

    I hope you are doing good.

    Thanks for your response.

    That was helpful. Also I have a doubt in the saturation of the loop filter. why it is limited to 200. Based on what factors it is taken.

    And also would like to know what could be the range for setting time and error band like any thumb rule or is there any calculation for that too?

    Kindly please guide me through this also.

    Please find the attached image.

    Thanks in advance,

    Regards,

    Nikileshwar V

  • Hi Nikileshwar,

    This variable is the deviation from normal frequency. The operating frequency is calculated as:

        spll_obj->fo = spll_obj->fn + spll_obj->ylf[0];
     
    Therefore spll_obj->ylf[0] is expected to be small value and that is why it is saturated.

    Can you tell me which version of the library file is being used?

    In the version v1.03.00.00, this saturation function is not there.

    More information can be found here: https://software-dl.ti.com/C2000/c2000_apps_public_sw/c2000ware_sdk/digitalpowersdk/5_03_00_00/html_guide/group__SPLL__3PH__DDSRF.html 

    Regards,
    Harisyam