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.

CTRL_setMaxAccel_pu() Deceleration

Other Parts Discussed in Thread: TMS320F28027F, MOTORWARE, DRV8301

We’re using the TMS320F28027F with InstaSPIN motor control firmware.  

I’m fairly new to motor control and wondering about deceleration with the CTRL_setMaxAccel_pu() InstaSPIN FOC API function. 

Are there conditions for deceleration to be controlled?  An example deceleration is with gMotorVars.SpeedRef_krpm set to 6krpm and the motor spinning at this speed, and with gMotorVars.MaxAccel_krpmps set to 9krpm/s.  When gMotorVars.SpeedRef_krpm is set close to 0rpm, the motor appears to decelerate briefly at 9krpm/s, but then appears to coast, uncontrolled.  Is this expected?

Please let me know if you’d like more information about my setup.

  • Hi Robert,
    With your initial speed and your deceleration rate, you should completely decelerate in less than one second. Depending on your motor and load mass, you may be dumping a large amount of energy back into the buss capacitor. It sounds like the buss voltage is hitting an overvoltage limit which causes a fault which disables the PWM outputs which causes the motor to then coast. Which power board are you using? Do you see an overvoltage fault light on your board?
    -Dave
  • Hi Dave,

    Thanks for your response.

    We have a custom power board. If you’d like more information about our power board or want other information about our setup please let me know.

    Our new product will be battery powered, and the deceleration case I mentioned had a battery for a power supply so I’d thought that an over-voltage wouldn’t be a problem. I’ll put a scope on the bulk capacitors to check this.

    I was using the CCS debugger during the deceleration and this functioned normally until the motor stopped, so the microcontroller continued to function throughout the deceleration. Our code has a CTRL_isError() check, and if true CTRL_setFlag_enableCtrl() is set to false. Could an over-voltage cause the PWM outputs to be disabled even if the microcontroller continued to function normally?

    My plan is to have the motor decelerate with control enabled, and then from a slow RPM to enable all the low-side FET’s to completely stop the motor. As part of this I might try a staged deceleration to maintain control in order to get to a slow RPM before shorting the motor phases to stop the motor.

    Thanks,
    Robert
  • An overvoltage doesn't really disable PWMs unless you program a fault to do that. In MotorWare we don't have an overvoltage fault that does that. However, devices like the 8301 does have overvoltage protection and could cause something like this.

    So, if you are using a DRV8301, I suggest you monitor voltage and make sure you don't cause an overvoltage, which could disable the PWM outputs of the driver. You can then fine tune your deceleration rate to avoid an overvoltage on an 8301 device.

    Please take a look at the DRV8301 datasheet to see the overvoltage limits of the device.

    -Jorge