iMotion Regenerative Mode Current Regulation Issue

Announcements

From sunburn to sun earn – we’ve got the power! Watch our #poweringgreen videos now.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ZtLiu
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hi, there!

We are currently using EVAL-M3-CM615 + EVAL-M3-102T to eavaluate iMotion on a series of fitness equipments. I've successfully turned this kit (with customized external HV discharge board) to something like a torque mode servo motor. That is, we can make our electric machine to work not just in motor mode, but also in generator/brake mode.  As a general result, in constant speed  iMotion does offter a pretty accurate current/torque control solution for us, and we'd definitely love to use this solution for future development. However we do face some issues while testing under generator mode. (Through out our test, we always set current mode FOC control )

First a few words about generator/brake mode. Under this mode, we still configure only Iq current like in motor mode. However, this time an external force/torque is motoring our electric machine and producing mechanical energy, as the electric machine under test is converting mechanical energy into electric energy, the buck capacitor on the board is charged rapidly. To convert it further into heat, bulk caps are discharged through a customized high voltage discharged board, connecting further to a power resistor. Using only simple comparator hysteresis control, the high voltage of bulk caps is limited and well regulated under a certain limit. Finally electric energy is converted into heat of the power resistor. 

However, we've just discovered a bizzare and series issue occurring only in generator mode, NOT in motor mode.  That is, the motor line current, as an indicator of torque, somehow gets modulated by the acceleration of motor (derivative of motor speed). This is NOT seen in motor mode. 

We perform the following test for further investigation. First we connect a servo motor with our electric machine for accurate control. In motor mode, we simply configure the servo motor to produce a torque less than that of our electric machine, which in turn is configurable through Iq. Now our electric machine is motoring the servo, and the servo motor is braking and converting that energy into heat of power resistor. As a  dynamic test, we can simply vary the servo torque. Since Iq is fixed we can observe that our electric machine accelerates and deaccelerates due to servo load changes.

As the following photo shows CH1(yellow) is VBUS, CH2(blue) is electric machine line current, CH3(purple) servo torque command.) As expected, current regulator is well operated and indepent of load variation. 

Motor Mode.jpg

To turn the above setting into generator mode test , we simply modify the servo motor torque greater than that of our electric machine. However, this time line current of the electric machine is not so well regulated and somehow gets modulated by the acceleration and deacceleration of motor. To be exact,  line current is now envelopped by the external applied torque or derivative of speed. As the following photo shows.

brake Mode.BMP

 

Here are some selected MCEWizard setting parameters ( See attached file for complete MCEWizard setting):

================================================

Motor pwm frequency: 15kHz

Control rate: 2

Control Mode: current control

Rotor Angle: Flux PLL Angle

Motor Rated Current: 3A

Motor Pole: 60

Motor Stator R: 2.8Ohm

Motor Inductance: 11mH (bot Ld and Lq)

Motor Ke: 400V(ln-rms)/krpm

Current Regulator Bandwidth: 600rad/sec (Id step response measured and matches this setting)

DC Bus Compenstation: Enable

================================================

(Note that through the test, PFC is not yet enabled. )

It would be so great if we can have your support and solve this intriguing and perplexing puzzle.

Thanks for reading this post!

 

Zt.

 

Electronic Hedgehog
0 Likes
10 Replies
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @ZtLiu,

Ques: First a few words about generator/brake mode. Under this mode, we still configure only Iq current like in motor mode. However, this time an external force/torque is motoring our electric machine and producing mechanical energy, as the electric machine under test is converting mechanical energy into electric energy, the buck capacitor on the board is charged rapidly. To convert it further into heat, bulk caps are discharged through a customized high voltage discharged board, connecting further to a power resistor. Using only simple comparator hysteresis control, the high voltage of bulk caps is limited and well regulated under a certain limit. Finally electric energy is converted into heat of the power resistor.


Ans:
Could you please confirm if you are having a positive Iq reference? If yes motor will continue to run in motoring mode,
If you want the motor in generating mode you should provide negative Iq reference once the motor reaches a specific positive speed this will help to operate the motor in regenerative mode. In the case of DC Servo motor if you try to run motor above a certain speed the back-emf will overcome DC bus voltage and act as a generator, this will not hold in case of FOC current control here you need to provide negative Iq reference to enter the regenerative region.


Ques: To turn the above setting into generator mode test , we simply modify the servo motor torque greater than that of our electric machine. However, this time line current of the electric machine is not so well regulated and somehow gets modulated by the acceleration and deacceleration of motor. To be exact, line current is now enveloped by the external applied torque or derivative of speed. As the following photo shows.

Ans: This will not happen in Motoring mode as the FOC loop will run to maintain Iq based on reference. In the case of generating mode if Iq is positive and if the external rotor is varying in speed this will affect induced back-emf so motor current will be fluctuating based on speed this is the reason for varying line current with external rotor coupled.

Could you please confirm if you are using a DC servo motor? and Could you please share more details on both the motor( Motor datasheet) which you are trying to run as a generator and motor?

Could you please share the MCE Wizard Configuration .mc2 file?

This will help us to understand the issue better

 

Thanks,

Krupashankar

lock attach
Attachments are accessible only for community members.

Hi @Krupashankar !

Really grateful for your quick reply, further information is given belowed.

<Test Bench Setup>

To make you better understand our test. Here are some photos of the test bench setup. Again, note that the flat, thin, disk-like motor with many poles is THE ONLY motor that we want to run with iMotion FOC both as a genenrator and motor. The industrial servo motor works as a load when our motor runs as a motor, and as a motor as our motor runs as generator, we use the servo motor to mimic/simulate user operation on fitness equipments. 

I am not sure what you mean by DC servo, if you mean brushed motor, we don't have it anywhere in our test and applicaiton. The motor under test and the servo motor are both three phase electric machine.

TestBench Front.jpg

(Test  Bench fron view)

 

TestBenchBack.jpg

(Test Bench back view)

 

TestBenchUp.jpg

(Test Bench top view)

Under Test.jpg

(System under test)

<Spec of our motor >

The motor we choose is still under development, a sketch of spec:

◦ Rated Power: 2.2kW
Rated Torque: 27.2Nm
Rated Speed: 485rpm
Power Input: AC220 input (rectified)
Construction: 30 pole pairs, with hall sensors.(hall sensors not yet used)

For R, L and Back emf constant values, we've measured them and typed into the MCEWizard configuration file.

Here is a photo of disassembly motor 

rotor_stator.jpg

<Spec of servo motor>

The servo motor is simply an off-the-shelf one, 

Shihlin SDE servo motor link 

Short data listed below,  we choose the 1kW one.

SDE Servo Spec.png

Complete Datasheet 

 

<MCE Parameter configutation>

The mc2 file is attached belowed.

Through out the test, IqRef_Ext is always set to 0, and IqRef_Ext is always Positive.

 

<Further Questions and Discussion>

To my surprise, I didn't know that the sign of IqRef_Ext matters. Do you mean that for FOC to work properly,

In motor mode I must ALWAYS set IqRef_Ext as positive!

And coversely always set IqRef_Ext negative in generator mode?

I will conduct anther test to clarify this. 

 This will not happen in Motoring mode as the FOC loop will run to maintain Iq based on reference. In the case of generating mode if Iq is positive and if the external rotor is varying in speed this will affect induced back-emf so motor current will be fluctuating based on speed this is the reason for varying line current with external rotor coupled.


It should be clarified that while I was testing in generator mode (set positive IqReg_Ext), the motor current is still well regulated as long as the speed is constant, whether in low or high speed. However as the speed changes, the motor current gets envelopped by the derivative of speed(dw/dt), NOT speed itself.  Our test of iMotion in the very begining showed that in many different constant speed, motor current is well regulated and almost the same as IqReg_Ext setting. It is the discovery that motor current is not well regulated and modulated by acceleration/deacceleration that leads us to build another test bench to further exam this problem. 

I always thought that the sign of IqReg_Ext relates only to the direction of torque.  However, according to what you've said, positive IqReg_Ext is for motor mode, and negative IqReg_Ext is for generator mode. This seems weired. Does that mean in motor mode, I can't set negative IqRef_Ext? What if I need to control the motor to run in both direction, just both in motor mode? Is there any misunderstanding between us? I don't see any reason why motor current can't be regulated in generator mode. As long as motor current is still sampled and measured, the current PI gian and closed loop should make it regulated, no? Unless there should be some asymmerty between motor and generator mode in the control algorithm implementation, could it be the modulation index?

Your description on DC Servo motor as genetator also seems not very accurate. For in that case the bridge driver works as a boost converter from Vbemf to DC Bus, hence current can flow from motor into DC Bus. While in ordinary motor mode, the bridge driver circuit simply works as step down converter from DC Bus. I always take this veiw point, even in three phase machine. For a generator to work when Vbemf needs to overcome DC Bus is the way how wind power generators work, and the latter are simply ac induction motors. Please correct me if it's incorrect. 

I should remind that in our application, we just need a torque controller. Whether it's in motor mode or generator mode, the torque needs to be as constant/regulated as possible. 

Thanks again for your patience, @Krupashankar . 

Waiting for you reply. 

Zt.

==

Update:

I just performed another test tonight. I switched over two motor lines and set negative IqRef_Ext in order to keep same mechanical structure. The result is, unsurprisingly, as the previsous one. 

Generator_negativeIq2.BMP

 

Generator_negativeIq4.BMP

As previous configuration, CH1(yellow) is DC BUS voltage, Ch2(blue) is one motor line current, CH3(purple) is servo torque command. Again, the motor current is enveloped by the derivative of motor speed. 

Please let me know if you need more information or further test to clarify this issues.

==

 

 

 

 

Electronic Hedgehog
0 Likes
ZtLiu
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

I think it's inspiring to record the motor voltage during the test. Perhaps it would shed some light on this issue.

<Motor Mode waveform>

Here the electric machine works as a motor in constant current mode, and servo motor provides varying load. Following captrues nicely show how current is regulated.

CH1(yellow): Motor votage, probing on one motor line and utilizing oscilloscope low pass filter function to show moduled motor voltage.

CH2(blue): motor line current.

CH3(purple): servo motor torque command. 

As  the torque of servo motor suddently drops (falling edge of purple waveform), motor experiences of suddent drop of load. Motor starts to speed up and keeps accelerating during this low load duration. Accordingly motor back emf voltage is now getting higher and higher. To maintain motor current, motor voltage increases.

Similarily, at rising edge of servo motor toque, motor has heavier load, speeds down, back emf voltage drops. Motor voltage now gets lower and lower in order to regulate motor current.  In motor mode, everyone is happy about the current regulation.

square_motor_mode1.BMP (motor mode wavefrom1)

square_motor_mode2.BMP(motor mode wavefrom2)

<Generator Mode waveform>

Now comes the perplexing situation, generator mode. To recap, now servo motor is torqing the system, and the "motor" (or simply electric machine) now acts as a generator. As IqRef_Ext is set to constant, I expected to see constant motor current independent of the torque of servo motor. However this is not case, see the follwing captures.

CH1(yellow): Motor votage, probing on one motor line and utilizing oscilloscope low pass filter function to show moduled motor voltage.

CH2(blue): motor line current.

CH3(purple): servo motor torque command. 

square_generator_mode2.BMP(generator mode wavefrom1)

square_generator_mode3.BMP(generator mode wavefrom2)

Since the rising edge of servo torque command, motor speeds up suddently, therefore back emf voltage increases abruptly. However in this case, it seems that the motor voltage doesn't follow up rapidly but increases only slowly and steadily. Therefore a suddent jump of motor current can be observed. Similar observation can be made in the falling edge of servo motor torque. Motor voltage decreases only slowly and cound't catch up this suddent drop of motor back emf voltage, hence the drop of motor current. 

The trend of regulation seems correct, motor voltage is not modulated in the wrong direction, as I suspected in the beginning. But it just can't catch up as it does in the motor mode. Now this is the issue to be solved.

<Some attempts but failed>

Some attempts, but didn't work out.

.Enable/Disable DC bus compensation.

.Execution rate set to 1 or 2.

.Enable/Disable PFC

.Current loop bandwidth is 600rad/sec for the moment. I tried double it, but the motor current gets oscillating even in motor mode. 

==

Thanks for reading this post, and hope someone can solve this issue.

 

Zt.

Electronic Hedgehog
0 Likes
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

 

Hi @ZtLiu

Thanks for sharing details of the motor, test setup, and detailed explanation of your experiment.

In motor mode, I must ALWAYS set IqRef_Ext as positive! And conversely, always set IqRef_Ext negative in generator mode?

We would like to explain this in a detailed way 

Krupashankar_0-1645278705523.png

This figure illustrates the four-quadrant operation of PMSM In the above picture for the machine running in a clockwise direction there can be motoring and generating mode. For a machine running in a particular direction for positive Iq reference if it runs as a motor and for the negative reference during its operation in the same direction it will act as a generator.

Krupashankar_1-1645280011742.png

In the above picture machine in the same direction acts as a motor for Positive Iq and acts as a generator for negative Iq

Eg: If a machine running in a clockwise direction for positive Iq reference and in the same clockwise direction if a greater torque is applied to run the machine at a higher speed for a negative Iq reference it will act as a generator. Motor direction is not changed nor motor lines are changed.

I always thought that the sign of IqReg_Ext relates only to the direction of torque.  However, according to what you've said, positive IqReg_Ext is for motor mode, and negative IqReg_Ext is for generator mode. This seems weird. Does that mean in motor mode, I can't set negative IqRef_Ext? What if I need to control the motor to run in both directions, just both in motor mode? Is there any misunderstanding between us?

Yes, For Positive and negative Iq motor runs in two different directions, To run the same machine in the same direction as a generator Negative Iq reference will make it run in generator mode. We have provided a few references to clarify this point Please let us know if you need further clarification on this.


I don't see any reason why motor current can't be regulated in generator mode. As long as the motor current is still sampled and measured, the current PI gain and the closed-loop should make it regulated, no? Unless there should be some asymmetry between motor and generator mode in the control algorithm implementation, could it be the modulation index?


In the case of generator mode, the current flows in opposite direction( Negative Current) ( ref attached image of four-quadrant operation), In Generating Mode: Measured Iq will be negative 

Control loop Iq =  ( Refence Iq - Measured Iq )

Generating mode :

Iq from control loop =  [ (Iq ref) - ( - Iq ) ]

If Iq ref is positive: then the control loop will apply very high Iq and this will result in saturation of control loop and oscillations due to varying speed will not be regulated. 

so the PI loop will try to maintain a positive current, FOC control loop will try to increase the voltage to push more current Iq( Positive reference) so the voltage will be increased, If B-emf is greater than DC bus voltage then the control loop will not be able to maintain the current and result in oscillations.

If Iq ref is Negative: then the control loop will apply negative Iq and this will result in the flow of current from machine to DC bus or battery or HV discharge board. The error will be less in this case and current will be regulated.

 

Thanks for sharing more experiment results We will analyze that and get back to you!

Meanwhile could you please try applying negative Iq ref for the motor running in the same direction as motoring mode, You can do this by starting the machine in motoring mode and once the servo motor generates more torque than your motor( Designed) then try applying negative Iq ref to make the run as a generator for the same direction 


I just performed another test tonight. I switched over two motor lines and set negative IqRef_Ext to keep the same mechanical structure. The result is, unsurprisingly, the previous one.

Please don't change the motor lines or direction. Motor running in the same direction will run as a generator if negative Iq ref is provided.

 

Please contact us if you need any further clarifications on the above details.

 

Thanks,

Krupashankar


 


 

0 Likes

Hi, @Krupashankar !

I am really really grateful for your reply, especially during the weekend.

However I am afraid that we are getting further and further away from the issue i am facing. 

To make sure we won't have any misunderstandings about the mechanical structrue in further discussion, I would like to explain our mechanical structure again. Please have some patience, seat tight and bear with me. 

<Detailed explanation of the mechanical structure>

Our electric machine applies torque in one and only one direction, clockwise as indicated by the red arrow. The servo motor applies its torque also in one direction, the opposite one, counter-clockwise as indicated by the white one.

Due to the construction of one-way rachet, the belt can transmit only in the above directions of torque applied. Otherwise one motor presensts no load to the other. Just think about your bike, it's exactly the same way.

TestBenchBack_torque_direction.jpg

<Our requiremnt of the system>

The electric machine under control needs to produce a programmable constant torque in that direction, as red arrow indicates. The servo motor produces another torque in the opposite direction, it mimics the user reaction. Keep in mind that we only need to build a torque machine, applied in one and only one direction. Generators are not our objectives but consequences. For the real application sproduct, we have built prototypes using servo motors to prove the concept and it works just fine. Now we need to utilise general electric machines to acheive the same goal. 

If the torque of electric machine is greater than that of servo motor, it's motoring. Conversly, if the torque of electric machine is less than that of servo, it's generating. 

<Things I may not agree with you>

Please correct me if I am wrong, but make sure you also full and properly understand it first. 

  1. The sign of Iq represents only the direction of torque it produces, not that it's generating or motoring. It's motoring if the direction of torque produced is the same as the direction of rotation, and it's generating if the direction of toruqe is the opposite direction of rotation.
  2. Due to 1. Iq can be negative even if it's motoring and positive even if it's generating.
  3. In present test bench configuration, I always limit the speed of electric machine to around 250rpm, so it's back emf is still way belowed DC bus, here around 320V if PFC disabled. So the saturation you suspect should never occurr.
  4. Your reasoning about Iq and PI loop looks more suitable in brushed DC motor with H bridge. Here in three phase machines it seems to cause more confusion than clarification. 

<Issues to solve>

In the previsous post, I captured some waveforms with motor voltage in CH1. It shows that even in generator mode, the current is still somehow regualated,  but poorly and slowly not as fast as in motor mode. This is the issue we need to solve.

We've tried use support@infineon.com, but they suggested us to go to this forum. Is there any other way we can reach infineon support team?

Thanks again for reading this reply, and have a good weekend!

 

Zt.

 

 

Electronic Hedgehog
0 Likes
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @ZtLiu,


I just performed another test tonight. I switched over two motor lines and set negative IqRef_Ext in order to keep the same mechanical structure. The result is, unsurprisingly, as the previous one

Thanks for sharing the experiment details but unfortunately this is not same as we expected. Apologies if we couldn't explain it clearly.

Start the servo motor first and please don't switch over the two motor lines, For the positive Iq ref if your motor( PMSM )  running in a clockwise direction When Servo motor torque is greater than your electrical machine( PMSM) please try providing negative Iqref for the same clockwise direction.

Could you please share MCE Wizard .mc2 file not the parameter text file. Please share the MCEWizard Configuration File (.mc2) with .mc2 extension.

 

Thanks,

Krupashankar

0 Likes
lock attach
Attachments are accessible only for community members.

Plz see attached file for mc2 file

Electronic Hedgehog
0 Likes
ZtLiu
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hi, @Krupashankar 
Thanks for having conversation with me.

I 've performed the test again, this time as you requested I make the motor runs as a motor first, then servo runs accordingly. After that I switch the sign of IqRef_Ext. The results and waveforms are no different than those I did in the last last post. So I won't upload the waveformes again.

And  I also confirm that both sign of IqRef_Ext can be operated in generator mode, as can be observed from voltage and current waveform, to see whether they are in phase or out of phase, which is no surprise for me. 

Now I will spend some time checking motor parameters and current sensing settings. Moreover I've ordered EVAL-M1-CTE620N3, which has a leg shunt current sense configutation. I suppose this will give a better current sense perfomance.

Waiting for your reply.

 

Zt.

 

Electronic Hedgehog
0 Likes

Hi @ZtLiu ,

We have discussed this issue with the product team and we will get back to you in sometime. In the meantime, I wanted to ask you one other question related to your setup.

When you run the servo and the PMSM motor is acting like a generator, is a DC source connected to the imotion board?

Regards,

Ram

0 Likes

Hi, @Ramakrishnan_MK 

AC power is connected to input, and the HV DC bus is further wired to a customized HV discharge board. The discharge board simply discharges the voltage, through a power resistor, once it reaches around 360V.

Regards,

 

Zt 

 

 

 

 

 

 

 

 

Electronic Hedgehog
0 Likes