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.

SpinTAC Estimate Motor Inertia: Error code 5

Other Parts Discussed in Thread: DRV8301, MOTORWARE

Hi all,

I'm using a TMDSCNCD28069MISO Piccolo F28069M controlCARD with DRV8301. I am following the quick start guide for InstaSPIN-MOTION with the GUI. 

When I try to identify the motor parameters, it works fine up to about 85% where it will reach the status "Rampdown", followed by a jump to 100% and the motor will stop immediately. Is this the right behaviour? However, it does say the motor is identified. The resulting parameters are:

Rs = 0.0442762
Ls_d = 8.79349 e-5
Ls_q = 8.79349 e-5
Flux = 0.0654693

The main problem however, occurs when trying to estimate the motor inertia. When I click the button, the status will go to "Zero Speed", followed by a pause of approximately 10 seconds during which nothing happens (the motor doesn't spin at all). Then I hear a brief "click" from inside of the motor and the status goes to "Not Identified", with the number 5 below it. I have tried several different values for the ramp time etc, but it doesn't change anything.

This was not the initial behaviour though. At first, this function did work properly. I haven't changed anything to the setup or even touched to motor, except for trying to rotate the motor shaft while in the "Tuning" tab (following the instructions in guide), which was impossible.

In the manual I found the problem with code 5 is Invalid velocity loop control signal minimum value, with solution: "Set cfg.OutMin within [-1, 0)".  I have no idea what this means though.

How can this be solved?

Thanks in advance.

  • TVleeschouwers,

    The OutMin variable is set based on the value that you provided for Motor Max Current.  What is the value that you se for this?

    We take that value and divide it by a scaling factor that has been established for the DRV8301 kit.  Since this implementation of InstaSPIN is done in fixed point, we need to use a per unit system.

    I'm expecting that you set a value for Motor Max Current that was larger than 40.

  • TVleeschouwers said:
    Rs = 0.0442762
    Ls_d = 8.79349 e-5
    Ls_q = 8.79349 e-5
    Flux = 0.0654693

    Rs / Ls = 500 Hz

    Flux / 2pi / Ls = 117A

    This suggests a reasonable speed motor with a very high short circuit current, meaning it can pull quite a bit of amperage. What is it rated for?

    The project / .out used with the F2806x InstaSPIN-FOC or -MOTION GUI is what we call "frozen".  It has fixed PWM frequency of 20 KHz, fixed estimator/current loops of 10 KHz, and fixed voltage and current scaling.  It is really just a DEMO that works with "most" motors, but certainly not with all.

    For some motors (and probably yours) you will want to use higher PWM frequency, perhaps higher control frequency if your Rs / Ls is actually higher, and most likely some different voltage/current scaling.

    For this you need to use MotorWare and work through the labs as described in MotorWare.exe under Projects & Labs User's Guide.

    There is also a special project for identifying lower inductance motors (proj_lab02c).  87nH is low, but right on the border of what we consider "low" inductance (anything above 50nH is pretty good).  However, your Ls value might have been identified wrong using the FROZEN GUI.

    The inertia ID is also improved in the MotorWare projects (proj_lab05c) so I recommend at this point just moving to MotorWare and working through the labs.

  • I used 50A for Motor Max Current. Setting this value at 30 results in a successful estimation of motor inertia. However, i still can't control the speed of the motor in the Tuning tab while the SpinTAC Speed Controller is enabled. The motor doesn't spin, even if I change the target speed. On the other hand, when I enable the PI Speed Controller, the motor does follow the target speed.

    Maybe something is wrong with the control card? By the way, LD1 and LD4 on the control card are green, while LD2 and LD3 are red.

  • What was the value of Inertia for your motor?  Did you try increasing the Bandwidth of the SpinTAC Controller on the Tuning tab?

    Often if the Inertia is small it takes a larger Bandwidth to spin the motor well.

  • LineStream - Adam Reynolds said:

    What was the value of Inertia for your motor?  Did you try increasing the Bandwidth of the SpinTAC Controller on the Tuning tab?

    Often if the Inertia is small it takes a larger Bandwidth to spin the motor well.

    I did increase the bandwidth, which did not result in the motor spinning. With PI control enabled the motor did spin though.

    I will check the values later today.

    Also, what is the meaning of LD2 and LD3 being red?

  • How high did you set the Bandwidth?  For a motor with nothing connected to it, the Bandwidth can usually be set to 100 rad/s or higher.  However the GUI does limit the maximum Bandwidth that can be used.

    TVleeschouwers said:
    Also, what is the meaning of LD2 and LD3 being red?

    LD2 and LD3 being red is normal.  They are typically used to indicate that the chip is functioning.