TMS320F28379S: FCL lib can add low pass filter? FCL lib can tune kp, ki parameters?

Part Number: TMS320F28379S

Hi ti experts,

i am now using tms320f28379s to develop motor control.

Now i need try to use FCL to increase current loop bandwidth and i look into some documents provided by ti. 

i have some quesitons:

1. i see that users only need provide motor related parameters, such as Ld, Lq, Rs..., and target bandwidth, then FCL lib will auto calculate control paremeters kp, ki to meet the requirement, is my understanding right?

2. if user wants to fine tune control parameters kp, ki of FCL by themselves, is it available?

3. if user wants to add some filters, such as low-pass or notch filter into FCL to reduce high frequency noise, is it available?

Looking forward to your reply.

Feng

  • 1. yes

    2. the code given by us is open and the user is free to edit according to their choice.

    3. same answer as 2.

  • How to implement item3?

  • where can i add filter into FCL? is there any sample code for reference?

  • another question: if use wccD/wddQ to give FCL an target bandwitth, then FCL will auto calculate kp, ki, right? if yes, then how can i adjust kp, ki by user themselves? Are these two method conflicted? i am not understand this.pls help.

  • The code is open, so you can tweak it to your choice so that they dont conflict. You can rewrite it to either accept direct values of Kp, Ki or calculate them based on some equation, however you want to experiment.

    You wanted to know if user could add some filters, and I said yes. I have no recommendation on where to add. 

    There are many types of filters, you may want to do some google search on implementation methods. In this example, we have used first order low pass filter for offset calibration in current feedback channel. Pls review that code.

  • i mean add filter to Id, Iq close loop calculation in FCL lib, where can i add?

    i checked the source code, the FCL lib only use FCL_PI_Ctrl function to calculate Id/Iq close loop. and it looks like a black box to user, but i need the pid output of Id/Iq,  so where to add filter to Id/Iq? add filter before FCL_PI_Ctrl() function?

    the original code is attaced for reference

    for not FCL motor control, user can add any filter after PI_MACRO() calculation. pls see below: 

  • pi_id is a struct variable. there is a member called Out which will store the output of PI controller. You may see that pi_id.Out is used subsequent to this line of code. PI_MACRO is a C macro that will substitute a chunk of code where it is called. You can find PI_MACRO implementation in the source code. Hover the mouse over PI_MACRO and press F3 to see the box open.

  • i know the PI_MACRO, actually for normally current loop, implemented by user(Not using FCL), i can add filter after PI_MARCO.

    however, my question is : if using FCL, it is a black box to user for the current loop control, user can not add filter after PI controller.

  • so where to add filter to PI controller if using FCL.

  • I guess there is a misunderstanding here. The latest SDK has the source code of PI controller for current loop, so you have the option to edit it, and access the variables of PI controller structure. pi_id.Out is the output of PI controller and you can connect this output as input to your custom filter.