cancel
Showing results for 
Search instead for 
Did you mean: 

X-NUCLEO-IHM03A1: Motor stall problem in voltage mode control

Jacky_flex
Associate II

I am using powerSTEP01 to drive a stepper motor with the specs as follows:

0693W00000APRXMQA5.pngThe motor stalls at 1190 step/s due to resonance as suggested in application note:

https://www.st.com/resource/en/application_note/dm00061093-voltage-mode-control-operation-and-parameter-optimization-stmicroelectronics.pdf

I have observed the 'A+' and 'A-' output on oscilloscope and this is what I have observed:

0693W00000APRQLQA5.png zoomed in

0693W00000APRQkQAP.png

In another test run, I have driven the motor using a pulse input type motor driver. The motor is running smoothly at all speed and the resonance problem is not encountered. The driven output from the pulse input type motor driver is as follows:

0693W00000APRT0QAP.pngzoomed in

0693W00000APRTeQAP.pngComparing the driven output from powerSTEP01 and the pulse input type driver, a notable difference is that the 'A+' and 'A-' driven from the pulse input type driver coincide each other (as circled in red), while the 'A+' and 'A-' from powerSTEP01 are totally separated. So I am thinking that this might be the pulse input type driver's countering measure for the resonance problem (please help clarify if I'm wrong).

So my question is: Is there any setting that we can configure for powerSTEP01 such that we can obtain waveform which is similar to that from the pulse input type driver?

1 ACCEPTED SOLUTION

Accepted Solutions
Enrico Poli
ST Employee

Dear @Jacky_flex​,

the different behavior you observed depends on how the voltage mode driving operates.

In voltage mode driving a sinusoidal voltage is directly applied to the motor windings using the PWM modulation: positive half-period of the sinewave is performed applying the PWM on the A+ (B+) side while A- (B-) side is kept shorted to ground. Vice versa for the negative half-period.

In a standard peak control driving, both the sides of the power stage are used for controlling the current according to the reference value. For this reason you observes commutation on both A+ and A-.

An advanced version of the peak current control is also available in the POWERSTEP01.

You just need to set the CM_VM bit in STEP_MODE register accordingly.

Please refer to the AN4158 for further details on ST's Advanced Current Control algorithm.

View solution in original post

4 REPLIES 4
Enrico Poli
ST Employee

Dear @Jacky_flex​,

the different behavior you observed depends on how the voltage mode driving operates.

In voltage mode driving a sinusoidal voltage is directly applied to the motor windings using the PWM modulation: positive half-period of the sinewave is performed applying the PWM on the A+ (B+) side while A- (B-) side is kept shorted to ground. Vice versa for the negative half-period.

In a standard peak control driving, both the sides of the power stage are used for controlling the current according to the reference value. For this reason you observes commutation on both A+ and A-.

An advanced version of the peak current control is also available in the POWERSTEP01.

You just need to set the CM_VM bit in STEP_MODE register accordingly.

Please refer to the AN4158 for further details on ST's Advanced Current Control algorithm.

Dear @Enrico Poli​ ,

Thank you for the kind response and sorry for my late reply. I have taken some time working on the current control mode as per suggested. The current mode settings are configured as follows:

BSP_MotorControl_CmdSetParam(0, POWERSTEP01_CONFIG, (uint16_t)POWERSTEP01_CONF_PARAM_CLOCK_SETTING_DEVICE_0 |

                        (uint16_t)POWERSTEP01_CONF_PARAM_SW_MODE_DEVICE_0    |

                        (uint16_t)POWERSTEP01_CONF_PARAM_TQ_REG_DEVICE_0    |

                        (uint16_t)POWERSTEP01_CONF_PARAM_OC_SD_DEVICE_0     |

                        (uint16_t)POWERSTEP01_CONF_PARAM_UVLOVAL_DEVICE_0    |

                        (uint16_t)POWERSTEP01_CONF_PARAM_VCCVAL_DEVICE_0    |

                        (uint16_t)POWERSTEP01_CONFIG_TSW_028us    | // TWS = 28 us

                        (uint16_t)POWERSTEP01_CONFIG_PRED_ENABLE); // Predictive current control  

BSP_MotorControl_SetAnalogValue(0, POWERSTEP01_TVAL_HOLD, 50); // TVAL_HOLD = 50

BSP_MotorControl_SetAnalogValue(0, POWERSTEP01_TVAL_RUN, 150); // TVAL_RUN = 150

BSP_MotorControl_SetAnalogValue(0, POWERSTEP01_TVAL_ACC, 150); // TVAL_ACC = 150

BSP_MotorControl_SetAnalogValue(0, POWERSTEP01_TVAL_DEC, 150); // TVAL_DEC = 150

BSP_MotorControl_CmdSetParam(0,POWERSTEP01_T_FAST,POWERSTEP01_FAST_STEP_10us| // FAST_STEP = 10 us

  POWERSTEP01_TOFF_FAST_4us); // TOFF_FAST = 4 us

BSP_MotorControl_SetAnalogValue(0, POWERSTEP01_TON_MIN, 2); // TON_MIN = 2 us

BSP_MotorControl_SetAnalogValue(0, POWERSTEP01_TOFF_MIN, 5); // TOFF_MIN = 5 us

I run the motor at 1200 step/s and the motor is running smoothly without resonance. This is the waveform that I've obtained:

0693W00000BaTUBQA3.jpgzoomed in

0693W00000BaTULQA3.jpgCommutation is observed on both A+ and A-, but it seems that the output pulses has varying PWM frequencies due to a mixture of slow and fast decays.

On the other hand, the driven output from pulse input type driver from my 1st post has a constant PWM frequency and the duty cycle is increasing/decreasing steadily, which resembles the trend of a sinusoidal voltage.

0693W00000APRTeQAP.png 

Does this implies that the pulse input type driver is using a driving method which is similar to the voltage mode control in powerSTEP01?

Or it is possible for the current mode control parameters to be well adjusted such that the driven output follows the trend of a sinusoidal voltage as in the voltage mode?

Dear @Jacky_flex​,

It is difficult to say what the driving algorithm of the other driver is.

Fore sure is something different from both the voltage mode and current mode of the POWERSTEP01, maybe a fixed frequency current control.

The current control of POWERSTEP01 shows variable switching frequency because the algorithm is based on a fixed OFF time approach.

Dear @Enrico Poli​, 

Your feedback has been very helpful, thank you so much for the enlightening.