cancel
Showing results for 
Search instead for 
Did you mean: 

HSO recommended hardware setup

RTirapegui
Associate II

Hi,

While reading the "HSO Startup Guide" included in the release notes of Motor Workbench 6.3.2, I came across a recommendation regarding the filtering of voltage:

RTirapegui_0-1732923108675.png

 

This raised the following question: considering that the only development kit offered by ST to test the HSO algorithm consists of the B-G473E-ZEST1S + STEVAL-LVLP01 + B-MOTOR-PMSMA1, where the B-MOTOR-PMSMA1 is based on the R57BLB50L2 motor with 2 pole pairs and supports a maximum speed of 5000 RPM (i.e., 167 Hz of electrical frequency), the suggested phase voltage filter cutoff frequency of 500 Hz seems appropriate.

However, if I were to test the algorithm using the B-G473E-ZEST1S in combination with a custom-designed power board to control a PMSM with 2 pole pairs capable of reaching 90 kRPM (i.e., 3 kHz of electrical frequency), should I maintain the 500 Hz filtering for the phase voltages, or would it need to be adjusted accordingly?

In other words, does the HSO algorithm use phase voltages to calculate the angle independently of the motor speed, or does it rely on phase currents after a certain frequency range?

Additionally, regarding the phase currents, could I use more restrictive filters? For instance, could a cutoff frequency of 16 kHz be used instead of the recommended 300 kHz?

Thanks!

3 REPLIES 3
Gael A
ST Employee

Hello,

Concerning the currents sensing, the 300 kHz filtering is there to get rid of really high dynamics spikes happening while switching and that does not depend on your motor's behaviour, so keeping that out of your sampling is its main objective. I guess you could use a lower filter frequency, but 16 kHz is too low in my opinion and will not improve the behaviour. Avoid getting under 100 kHz.

Concerning the phase voltages sensing, you would like a high filter cross-over frequency to allow a good emf estimation even during high dynamic changes in torque / speed. However, you would also like to avoid aliasing as much as possible, which can be achieved with a lower cross-over frequency. We generally want a cross-over frequency staying roughly below 10% of your sampling frequency, which happens 4 times per PWM period thanks to oversampling. All in all : Frc < 0.1 * 4 * Fpwm

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hello Gael,

Thank you very much for your quick response. I want to ask you one more thing: when changing the Frc of the phase voltage filters following the guidelines you provided, is it necessary to change any parameters in the firmware besides the one defined by VOLTAGE_FILTER_POLE_RPS?

For example, do I need to adjust SPEED_POLE_RPS or any of the parameters in the Hso_params_M1 structure?

I notice, for example, that in the original configuration, Filter_adapt_fmax_Hz = 500.0f from Hso_params_M1, which coincides with the recommended Frc in the "HSO Startup Guide" (500Hz). I'm not sure if this is a coincidence or if it should match the filters' Frc.

Thank you very much!

Hello RTirapegui,

Changing the RC filter time constant will only require you to change the VOLTAGE_FILTER_POLE_RPS. This is done because the same filter is applied digitally to other parts of the system, and alignement between the digital and analog filters is key.

SPEED_POLE_RPS can be reduced if you want a stiffer speed control and thus needs a higher Kp speed gain. On the contrary, you can increase it for low inertia, high torque machines if you realise high speed control is not achieved.

The adaptive filtering does not need to be changed either. In practice we put the max value around one twentieth of the current sampling frequency. It has nothing to do with the voltage sensing.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.