cancel
Showing results for 
Search instead for 
Did you mean: 

Shunt resistor value differency between Motor Control Workbench/source code and user manual.

EDokm
Associate III

     I'm trying to control a PMSM motor using Nucleo-G474RE and STEVAL-IHM023V3 motor control boards and Motor Control WorkBench (Version 6.2.1).

     I have noticed that the values of shunt resistors (R55, R68, and R101) are given as 150 mOhm in User Manual UM1823 (pages 13, 14, 15) while 100 mOhm in source code (power_stage_parameter.h, line 46) and Motor Control Workbench software. I have visually inspected the STEVAL-IHM023V3 motor control board and seen that shunt resistors' values are 150 mOhm.

     The PMSM motor is rotating normally when I create, compile and run the source code via Motor Control WorkBench (for default 100 mOhm shunt resistor value in the Motor Control Workbench).

     But when i changed the RSHUNT value at the power_stage_parameter.h, line 46 to 150 mOhm, PMSM motor started to rotate abnormally.

     Can someone explain to me the value differency between the source code and the user manual for the shunt resistors R55, R68 and R101? Am i missing a point?

 

 

EDokm_1-1715950876274.png

 

EDokm_0-1715950818285.png

 

EDokm_2-1715951039716.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Gael A
ST Employee

Hello EDokm,

Apart from the RSHUNT value in power_stage_parameter.h, making such a modification will have an impact on other constants in the code, such as th PID and observers gains. This is probably why control is not attained that way. I suggest to either modify Rshunt via WorkBench and re-generate your project, or directly modify the .json file of the STM32-IHM023 board (located in C:\...\MC_SDK_6.2.1\Utilities\PC_Software\STMCWB\assets\hardware\board\power) so this issue won't happen again for each and every future generated project. The value to modify is "shuntResistor".

In any case, thank you for your problem report, we will test the configuration on our end and update the board description accordingly.

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

Hope this will help,
Gaël A.

View solution in original post

4 REPLIES 4
Gael A
ST Employee

Hello EDokm,

Apart from the RSHUNT value in power_stage_parameter.h, making such a modification will have an impact on other constants in the code, such as th PID and observers gains. This is probably why control is not attained that way. I suggest to either modify Rshunt via WorkBench and re-generate your project, or directly modify the .json file of the STM32-IHM023 board (located in C:\...\MC_SDK_6.2.1\Utilities\PC_Software\STMCWB\assets\hardware\board\power) so this issue won't happen again for each and every future generated project. The value to modify is "shuntResistor".

In any case, thank you for your problem report, we will test the configuration on our end and update the board description accordingly.

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

Hope this will help,
Gaël A.

I have changed the shuntResistor value from 100 mOhm to 150 mOhm in STEVAL-IHM023V3.json file (at lines 51 and 72). And then i have generated the project and source code. This change had no effect. The value of RSHUNT did not change and is still 0.1 in file power_stage_parameter.h, line 46.

 

PMSM is working normally unless changing the RSHUNT value (0.1) in power_stage_parameter.h, line 46 manually to 0.15 to be honest.

 

Gael A
ST Employee

Hello EDokm,

This is a strange behavior. Have you restarted the WorkBench tool before re-generating your project ? Are you sure that you modified the STEVAL-IHM023V3.json file in the same MCSDK version that you are using ?

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

Hope this will help,
Gaël A.

I have missed this point. I have done as you stated. First I have modified the STEVAL-IHM023V3.json file and then I have started the WorkBench tool. This time, the value of RSHUNT changed to 0.15 in file power_stage_parameter.h, line 46. Thanks.