Other Parts Discussed in Thread: DRV8353, MOTORWARE
Hello,
Sometimes, after a power cycle, as soon as the FOC is started and the SpinTAC Velocity Control block is regulating at 0 speed, one or more motors automatically start spinning at full speed and cannot be controlled anymore. The only way to stop the motor is to disable the FOC. "Automatically" means that the motor starts spinning even if the speed setpoint fed into the function CTRL_setSpd_ref_krpm is null.
We are running out of ideas now and we need your help to avoid having this uncontrollable behavior that is not acceptable.
Our system is composed by:
- 6 PMSM motors (3 motors are Kollmorgen BLM4AA, 3 motors are Kollmorgen BLM2AA). Each motor is driven by its own C2000 on a separate PCB and driven using a DRV8353S.
- Absolute encoders (iC-Haus MU150 + PVL) mounted on each motor and connected to the C2000 using SPI and to the C2000 QEP peripheral using ABZ signals.
- TI FOC control with SpinTAC Velocity Control and SpinTAC Position Converter for position control. We directly feed the velocity controller with speed setpoints.
Here is the process that is done the first time the system is powered on in order to align the motor with the encoder:
- FOC controller is started with Rs Recalculation (EST_setFlag_enableRsRecalc set to true).
- During Rs Recalculation, the QEP POSCNT is reset continuously to 0:
if (EST_State_Rs == EST_getState(m_ctrlHandle->estHandle)) { HAL_resetQepPosnCounts(m_halHandle); } - Once the Rs Recalculation is done, the SpinTAC Velocity Control is enabled and starts to control the system in position using QEP peripheral (steady position).
- At the end of the Rs Recalculation, the absolute encoder singleturn position is aligned with the QEP POSCNT (using SPI commands).
- At this point, the absolute encoder should be aligned to a mechanical 0 position.
Here is the normal process after each power cycle (once the encoder are aligned with the motors):
- Singleturn position of the absolute encoder is read and converted into a QEP POSCNT format (0..4095 in our case).
- The QEP POSCNT register is set to the value of the singleturn position of the absolute encoder.
- FOC controller is started without Rs Recalculation.
- At this point, the SpinTAC Velocity Control is enabled and starts to control the system in position using QEP peripheral (steady position).
Uncontrollable issues have been seen in both first time process and normal process as soon as the position control is enabled.
To already answer potential questions on your side:
- This uncontrolled full-speed issue can occur as soon as a speed different from 0 is set. In other words, it can occur at low speeds.
- This issue also occurs sometimes when the ST Velocity controller is regulating in position with 0 speed setpoint.
- There are no errors reported by the FOC controller nor the ST Velocity and ST Position Converter controllers.
- The motor can only be stopped by disabling the FOC controller. A speed setpoint of 0 using function CTRL_setSpd_ref_krpm does not stop the motor which continues spinning at full-speed.
- This issue was also seen after motor alignment. The current used during alignment (RES_EST_CURRENT) is already more than 10% of the motor rated current.
- This issue occurs on different motors and is thus not dependent on particular motors parameters. Motors parameters have been set using InstaSPIN identification process.
- There is normally no ADC ISR overrun despite the fact that, sometimes, an ISR is delayed due to high-priority UART communication as shown below (PWM freq. = 18kHz, ISR execution = 6kHz, FOC controller execution = 6kHz, ST velocity + position controller execution = 1kHz) - GPIO set low at the beginning of the ISR and set high at the end of the ISR:
Could you please help us on this subject?
I have attached our user.h file. Please note that this file is shared among the two motors types this is why we have replaced MOTOR_ definitions with our own definitions (motor parameters are loaded at startup based on an address).
This post has been created based on my previous question:
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/900637
Thank you in advance.
Regards,
Johann