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-F28027: Motorwar lab code gets into "limbo" stage

Part Number: LAUNCHXL-F28027
Other Parts Discussed in Thread: MOTORWARE, , BOOSTXL-DRV8305EVM

Hi,

background: over the years I've used LAUNCHXL-F28027 + BOOSTXL-DRV8305EVM with Motorware Instaspin-foc labs (various versions) with number of different motors and they've all exhibited the same issue.

For number of reasons I've not had the impetus to find the root cause but now I need to.

At the moment I'm working with proj_lab03a.

The motor runs just fine but if accelerate/decelare too quickly then I hear that something goes wrong with the

PWM as a new audible hissing sound is produced by the motor windings and the motor speed no

longer reaches the set speed although the motor does keep running and I can still see all the variables etc with the debugger.

Nothing sort of complete software res-start restores normal operation.

I have

  gMotorVars.MaxAccel_krpmps = _IQ(4.0)

and when I change

  gMotorVars.SpeedRef_krpm = _IQ(1) => _IQ(4)

sometimes (!) the system goes into this limbo mode, depending on the motor mechanical loading.

Looking at the variables I see nothing that would give a clue what is going on.

So I'm looking for ideas and experience from other users of Motorware.

Not sure if this even the right forum as I expect this ia Motorware software related question.

Oh, ah, one more thing: over the years I've had a number of boards where I've seen the issue so not likely a hardware problem.

cheers Kusti

  • That may be a normal appearance since you set a high acceleration if the inertia or load of the motor is very heavy. You might tune the gains of the speed controller, even tune the current controller to improve the performance, not use unique gains for all running cases.

  • Thansk!

    Yes, but...

    the system does not recover from this state ever. 

    It is not acceptable to prevent this situation by tuning the parameters, suppose some one just give the motor a sudden 'push' by hand and the system enters this state.

    At the very least I need to be able to detect this state in software and then do full reset but I would like to know what it is that actually 'bugles' in this situation.

    wbr Kusti

  • The better way is to tune the controllers if you make sure that the motor parameters have been identified correctly by using lab02b/c and the hardware board worked well. And please check if the adding load is over the rated output power of the motor and the running speed is greater than the rated speed of the motor. Please post some testing waveforms and user.h to help us your questions if possible.

  • Sorry I missed you reply. 

    This phenomenon happens at rather low speeds, and it happens every time I decelerate the speed too fast. 

    Going down in speed 

    .MaxAccel_krpmps = _IQ(3.0)

    is the max I can do without this mode kicking in, accelerating no problem, I'm using

    gMotorVars.MaxAccel_krpmps = _IQ(36.0);

    Here is the user.h parameters

    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm

    #define USER_MOTOR_NUM_POLE_PAIRS       (4)

    #define USER_MOTOR_Rr                   (NULL)

    #define USER_MOTOR_Rs                   (0.171)

    #define USER_MOTOR_Ls_d                 (0.0000934)

    #define USER_MOTOR_Ls_q                 (0.0000934)

    #define USER_MOTOR_RATED_FLUX           (0.0132)

    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)

    #define USER_MOTOR_RES_EST_CURRENT      (1.0)

    #define USER_MOTOR_IND_EST_CURRENT      (-1.0)

    #define USER_MOTOR_MAX_CURRENT          (10.0)

    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)

    #define USER_MOTOR_FREQ_LOW             (10.0)          // Hz - suggested to set to 10% of rated motor frequency

    #define USER_MOTOR_FREQ_HIGH            (100.0)         // Hz - suggested to set to 100% of rated motor frequency

    #define USER_MOTOR_FREQ_MAX             (120.0)         // Hz - suggested to set to 120% of rated motor frequency

    #define USER_MOTOR_VOLT_MIN             (3.0)           // Volt - suggested to set to 15% of rated motor voltage

    #define USER_MOTOR_VOLT_MAX             (18.0)          // Volt - suggested to set to 100% of rated motor voltage

    I will try to attach a video or sound so you can hear the problem.

    My main concern is that I do not know what the problem is.

    Is this hardware, for example when the motor spools down and generates voltage, is that causing the issue. Then we will need to add some hardware to handle that energy.

    Or is this some sort of windup problem in sw, so far I've not seen any of the PIs behaving strangely.

    What I observe in this mode is that the speed feedback seems to make sense and the speed PI tracks at the low rpm but in this mode I can only get to about 25% speed ref after which the speed feedback nor the actual motor no longer tracks the ref and the PI output shoots to max.

    wbr Kusti

  • Here is a short movie where I first adjust the motor speed slowly and then at around 25 sec mark I suddenly command the speed down to about 1krmp and the system goes into limbo and starts whining. The system still accepts input and complies but only upto about 1/4th of the range it should.

    Click here to play this video

  • You have to try a lower acceleration and tune the gains of speed and current controllers, to see what acceleration can be supported by this motor. The estimator is not the issue, please check if the motor phase current is distortion at this state.

  • Hi,

    thanks for the answer, but I don't think that is the problem nor the solution.

    We added circuitry that absorbs the generated energy when we decelerating i.e. basically an over voltage clamp to power supply and the problem went away. 

    So that is the solution as we are going to need that anyway because of the need for fast deceleration.

    Nothing to do with  tuning the parameters.

    However the question remains what is this 'limbo' stage from which the system does not recover except by re-booting?

    I doubt this is software because everything seems to keep working and everything I see with the debugger looks normal.

    wbr Kusti

  • Sorry, we can't open the Yes, the motor will be working as a generator and boost the dc-bus if the deceleration is too high and the inertia of the motor is large. What do you mean 'limbo' stage? Do you have any detailed description of it? Could you please monitor the dc-bus voltage, and capture some current and waveforms that should help us to understand the problem? And please check if the MCU is halted without any output due to the power supply.

  • Hi thanks for the answer. Pitty you can't open the .mov file, it is standard file from iPhone. 

    Anyways, as I explained above, the problems starts when the motor functions as generator and if we do not have over voltage protection on the supply line we get the limbo condition. 

    In the limbo, the switching noise from the motor has some extra audible components very different from normal op and the motorware software only complies to speed ref commands upto about 1/4 of the normal range., 

    As we will have the overvoltage protection in the final product this should no be an issued but would still like to understand what happens in this situation. Can the MU be partially reset so that some initialisation of the PMW or ADC or something is wrong or something...

  • You might try different acceleration for startup and running, use a lower acceleration for a startup, and then set the required acceleration for the running after the speed of the motor up to a setting value.

    And you should use different control gains of the speed and current regulators (PI/PID) for low and high speed, and acceleration.

    Set the minimum output of the speed (PI) regulator to "0" if you just need a unidirectional rotation.

    No, the ADC and PWM shouldn't go into the wrong state. The current/voltage sensing will be not good enough for control if the noise on the board is too high, that will cause the motor loss control.

    Do you have a chance to check the feedback current and voltage, and make sure that the power supplies of the MCU and inverter are clear under this testing state?

  • You might try to use lab02c to identify the motor again, and use the lab05b or lab10a to run the motor. You have to tune the speed PI for such high acceleration accordingly, and make sure if the motor can support such high acceleration.

    Please post  the file of the user.h if you still have further questions.

  • Hi,

    thanks for the answer and continuous support.

    However we seem to go round in circles. The video I posted if you had been able to watch it would have shown the problem.

    This is not a matter of tuning or anything like that. It cannot be and it must no be that if the controller is badly tuned then the system never recovers from this. I mean never, if I stop the motor and start over the system is still not working properly as I try to explain. If it was a tuning problem surely stopping the motor and starting again should make it work again as it does/did before the limbo condition hit. I'm convinced this is hardware issue and I guess that only hardware can solve this, ie we need to strictly limit the PSU voltage when the motor is generating energy.

    My whole point in this thread has been to try to understand what happens and it looks like know one can answer that. I accept that and we will just avoid this condition.

    wbr Kusti

  • It's a real engineering problem, the issue is not from the InstaSPIN estimator algorithm. You have to implement some ways to avoid the overvoltage fault during a very fast deceleration because the motor could be working in a generator mode and boost the dc bus voltage. Or to avoid the overcurrent or speed over-shot if you set a very fast acceleration.

    You might set the minimum output of the speed controller (PI) (torque current) to 0 if the target speed is greater than or equal to 0. Or you have to add some additional methods to limit the boosting voltage, like a hardware braking circuit if possible.