gym-electric-motor icon indicating copy to clipboard operation
gym-electric-motor copied to clipboard

Phase voltage accuracy for PMSM motors

Open jmailloux opened this issue 1 year ago • 4 comments

Hello,

Not sure how important model accuracy is to you, but I believe the phase voltages being calculated for PMSM motors is incorrect. One relatively easy way to see this is to calculate output power of the motor (torque * omega), and then calculate input power to the motor (3 * vrms * irms). The input power is less than the output power. isup*usup is more reasonable. It is higher than the output power.

jmailloux avatar Aug 08 '23 20:08 jmailloux

Hey Jerry,

3 * V_rms * I_rms is the apparent input power of the drive and not only the active input power. The latter would be equal to the sum of the motor (ohmic) losses + the the mechanical output power in steady state (note: we do not model inverter losses or other losses except for the ohmic losses within the motor). And of course you can calculate the active input power via i_dc*u_dc but again, that would be identical to the mechanical output power plus motor losses in steady state.

We have also cross-checked our code and did not found any error in the power balance during a quick simulation. We would therefore ask you to post a minimal example, so that we can understand where you think the power balance of the simulation does not add up.

wallscheid avatar Aug 09 '23 11:08 wallscheid

Hi Jerry, attached you can find our minimal example for the calculation. Please keep in mind that the additional losses in the motor during transients (d i /d t ≠ 0) are not calculated in this example.

test_power.zip

bhk11 avatar Aug 09 '23 11:08 bhk11

Hi. Thanks for getting back to me so fast. I couldn't run your example because I am having trouble installing gem-control. Here is my example. I calculated power (called it motor_input_power) the same way you did (using Vd, Vq, Id, Iq), and that looks reasonable. So I don't understand why apparent_power would be less than that. I believe the current numbers are accurate because Kt is in line with what I expect. Ke is not so I suspect either ua, ub, uc are incorrect, or they aren't what I think they are (I assume they are phase to neutral voltages). power_example.py.zip

jmailloux avatar Aug 09 '23 15:08 jmailloux

Hi Jerry I looked through your code. We usually use the DC-link voltage as nominal value for our drive system to give a short hint to your comment in the code. With this voltage, I get also the values which, I expect in the phase voltages. For example: If I apply the action np.array([-1,1,1]) to the gem environment, I receive the phase voltages shown in tab. I. of https://ieeexplore.ieee.org/document/10214121 . So, the phase voltages are measured between phase and 0 V potential of the inverter not the neutral point of the machine.

bhk11 avatar Aug 10 '23 13:08 bhk11

As there is no further response to this topic, I am closing the issue.

bhk11 avatar Apr 16 '24 07:04 bhk11