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.

LAUNCHXL-F280049C: With BOOSTXL-DRV8320RS -Lab 06 Current Controller Tuning

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: BOOSTXL-DRV8320RS

Hi,

I am using LAUNCHXL-F280049C with BOOSTXL-DRV8320RS to implement and test InstaSPIN FOC. I have few doubts regarding the InstaSPIN-FOC Lab Guide.

  1.  For PMSM motors, does InstaSPIN-FOC identifies motor intertia like InstaSPIN-MOTION?
  2.  In the InstaSPIN-FOC Lab guide, in the Lab 06 for Kp and Ki tuning for current controller.
    • For the Ki gain calculation:
      • Based on the equation mentioned in the lab guide, it is required to calculate Ki gain per unit base.
      • This calculation is similar to the calculation in the code in the function setupControllers(void) in "Labs.h" file which sets the controller and results similar results.
    • For the Kp gain calculation:
      • Lab guide suggests to calculate and use Kp gain per unit base as well.
      • However, in the function setupControllers(void) in "Labs.h" file, the code doesn't use per unit calculation as mentioned in the Lab.

Could you please explain this discrepancy between the Lab guide and the Lab Code? Am I missing something here in the calculation?

Best,

Amit

  • 1.InstaSPIN-FOC doesn't support inertia identification.

    2. Not need to be PU format in MotorControlSDK, just use the equations at the end of this section, Ki = (R/L)*Ti, Kp=Ls*2*PI()/Ti. Sorry for confusing you, we will correct this, thanks.  

  • Hi Yanming Luo,

    Thanks for clearing up the confusion. There is some discrepancies in the InstaSPIN-FOC Lab guide and User's Guide in the Speed Controller Tuning. 

    In the Lab 07, it is mentioned that "InstaSPIN uses a series PI loop for the current controllers and a parallel PI loop for the speed controller." However, InstaSPIN-FOC User's Guide mentioned that "it uses series PI loop for both the Speed and Current controller. "

    Could you provide me best references of these equations of controller (Speed and Current) gain calculation? Which is consistent with the code provided in the MotorControl SDK for LAUNCHXL-F280049C and BOOSTXL-DRV8320RS.

    Best,

    Amit

  • Hi Amit,

    " For PMSM motors, does InstaSPIN-FOC identifies motor inertia like InstaSPIN-MOTION?"

    "If you like your motors inertia you can keep your motors inertia."

    Yet that did not work out so well as our motor inertia had large co pay premium, SDK PI did not expect. Humor of the past US election put aside, it seems some issues exist in that part of user.c too.

    So if you add a custom motors parameter (kgm2 inertia) into user.h it likely will be ignored or incorrectly managed. Keep this in mind as we saw this effect PI control in lab 5 motor ID. Seemingly the SDK needs more changes to make it better user friendly.  

  • Hi Gl,

    Thank you so much for the information. Would you mind sharing some more insight if you had it (PI controller) working? That would be greatly appreciated. 

    There are many areas where one can encounter discrepancies between the code and SDK (InstaSPIN-FOC Users Guide). Seems like the code has been updated but the related documentation hasn't been updated that often. 

    Best,

    Amit

  • Hi Yanming,

    I am comparing InstaSPIN-FOC User's guide (Chapter 11) with the example code to make sense of the concepts in the guide and actual implementation of it in the code.

    From the equations that you mentioned , only Ki seems to be the same equations in the code and in the guide and it kind of make sense that you have to digitize PI values based on the sampling rate (Ti).

    However, the Kp equation you mentioned is totally different form the code and user's guide. You can see in the above image, that Kp_iq equation matches the concept in user's guide.

    Could you clarify this? Even if we want to digitize this value, it needs to be multiplied by sampling rate (Ti) as in Ki value. Is it correct or I am missing something here?

    Best,

    Amit

  • Amit Mathukiya said:
    Would you mind sharing some more insight if you had it (PI controller) working?

    Not at all with the lower speed inertia (kgm2) values. The PI was crashing speed during motor deceleration but did accelerate without issue. The 2 should infer rotor mass squared. It seems the default (else) kgm2 value (user.c) and PI works much better than a manual entry below (//) found in (user.h), if kgm2 mass is somewhat high and actual slope of inertia is low. Small motors often have high inertia accelerate slopes and small kgm2 value.    

    //#define USER_MOTOR_INERTIA_Kgm2 

  • Combine this thread into the below one, and close this thread since both have a similar topic you posted. Thanks!

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/883736