Permanent magnet synchronous motor/generator (MG) operation

Ask for and share advice on using the PicoScope kit to fix Electric Vehicles
Post Reply
Steve Smith
Pico Staff Member
Pico Staff Member
Posts: 1581
Joined: Sun Aug 25, 2013 7:22 am

Permanent magnet synchronous motor/generator (MG) operation

Post by Steve Smith »

Research into the operation of a 3-phase permanent magnet synchronous motor/generator (MG) fitted to a VW E-Golf raised a number of questions surrounding “typical” operation and circuit characteristics that I would like to share & discuss here.

Before we proceed, safety, certification, training and system knowledge are both essential and paramount as the captures below include “live working”

Regarding “system knowledge” the following Self Study Programs (SSP-530 & SSP-527) from VAG provide an invaluable insight into the description and operation of the high voltage system on board the E-Golf (N.B. SSP’s are no substitute for EV training)

Starting with an overview of the circuits measured; below we have our E-Golf pulling away from rest and then decelerating to a stop with “recuperation” level 3 activated (selectable by the driver)

I.e., the vehicle is decelerating thanks to the “loading” upon the “Rotor” which is functioning as a generator (The Rotor is connected to road wheels via the transmission)
Image 1
Image 1
During the above test, a question was raised surrounding MG status, “how can we determine from the above captures when the MG is functioning either as a motor or a generator?”

I guess the simple answer has to be the HV battery DC current captured on channel F, here we have captured the precise point where current flow from the HV battery changes from a positive value (powering the Motor) to a negative value thanks to regeneration from our now Generator (see below)
Image 2
Image 2
Note above how the positive DC current flow from the HV battery peaks at approx. + 91 A to power our motor and drive the vehicle. During deceleration the current flow is reversed thanks to our MG acting as a generator whereby we achieve a peak negative current flow of approx. – 50 A.

Around 12.5 seconds into our capture, another -16 A of current is delivered to the HV battery (total approx. -66.85 A) thanks to the application of the brake pedal providing an additional reduction in rotor speed and hence, increased current generation.

A quick tip here, note how channel F has 4 signal rulers instead of 2!

In order to utilize 4 signal rulers for one waveform, create a reference waveform which automatically hides behind the waveform of interest. The benefits of duplicating a waveform are the addition of 2 more signal rulers providing a means for multiple measurements of the same trace

For more information regarding reference waveforms, refer to the A to Z of PicoScope here https://www.picoauto.com/library/picoscope-in-depth and here https://www.picoauto.com/library/picosc ... -waveforms

To understand the performance of our MG acting as a generator, a deeper dive into the operational characteristics of a 3-phase permanent magnet synchronous motor can be acquired from the PicoScope data above and the theory below

The following forum post viewtopic.php?p=100521#p100521 discusses the operation of a 3-phase brushless DC motor, which (for want of a better description) is exactly what we have here.

Rather than try to explain how the 3-phase brushless DC motor functions could you take a look at the superb animation here https://www.youtube.com/watch?v=bCEiOnuODac . Please note, in this animation the rotor is on the outside of the stator, with EV applications, the rotor is placed inside the stator and ultimately connected to the road wheels

To summarize the operation described in animation above, a rotating magnet field (RMF) is generated in the stator of our MG and referred to as “electronic commutation” or “EC” for short

The speed of the RMF is governed by precise switching of multiple Power Transistors using PWM control signals

The desirable side effect of precise switching (PWM control) of HV DC current is the creation of 3-Phase HV AC current

The following video covers the conversion of DC to AC in greater detail https://www.youtube.com/watch?v=qVeERT4 ... nel=Lesics

Below, using the positive duty cycle of channel E, we can see how the high voltage of one of our MG phases (Phase W) is controlled in order to create AC current
Image 3
Image 3
Note above, the math channel “posduty(E)” reveals how the peak positive duty control of MG Phase W voltage (Approx. 58%) near coincides with the peak positive current flow (Approx. 171 A) through the phase winding. Likewise, our lower positive duty of 42% near coincides with our peak negative current of -177 A.

Note below, the positive duty math channel also reveals how the voltage leads the current (by approx. 469 µs) which is typical of an inductor and highlights the inherent properties of a wire coil (phase W) that oppose AC current flow due to inductive reactance
Image 4
Image 4
Now we have our RMF (whose rotational speed is known as synchronous speed) we can now initiate rotation of the rotor and of course the road wheels thanks to the interaction between the induced magnet field of the stator and permanent magnet rotor. Once again please refer to the animation and video links above

The theoretical speed of the rotor within a synchronous motor should be identical to the RMF of the stator (after all this is a synchronous motor) We can prove this theory using math’s and the formulas below to discover clues to the status of our MG (Is it acting as a motor or as a generator based on rotor speed?)

So how do we calculate RMF and rotor speeds?

Starting with RMF speed calculation, we can use the formula 120*Freq(C) / Number of poles

120 refers to the degrees of separation between our 3 phases (120°)

Frequency (C) refers to the frequency of the AC current (Hz) through our phases

Number of poles refers to the number of magnets x 2 to derive the pole count (each magnet has a north and south pole)

Referring to our SSP’s once more, it would appear our rotor has 5 magnetic pole pairs (10 poles) and I am going to assume this is the same for the stator!

Below we display the speed of our RMF (synchronous speed) using the math channel “120*freq(C)/10”
Image 5
Image 5
To define rotor speed, we have a number of options and my first choice is to use wheel speed multiplied by the transmission ratio

This is where our optical pick up (on channel B) aimed at a piece of reflective tape attached to the LH drive shaft will generate one pulse per revolution of the road wheel

To improve resolution and accuracy, I have then added the wheel speed sensor signal of the L-H front wheel on channel A.

Using the single pulse from the drive shaft we can now calculate the number of pulses from our wheel speed sensor in relation to one revolution of the road wheel. We have used this technique here https://www.picoauto.com/library/case-s ... -operation
Image 6
Image 6
Using the “Falling Edge Count” measurement feature of PS7 above (between the time rulers) we can conclude above our ABS wheel speed sensor “pick-up” returns 44 pulse per revolution

Knowing the transmission of the E-Golf contains a single gear ratio of 2.704:1 and a final drive ratio of 3.608, our total overall gear ratio is equal to 2.704 x 3.608 = 9.756 :1

We can now calculate rotor speed using the following math channel (60/44*freq(A)/60)*9.756*60

60/44*freq(A) will provide the RPM of the road wheel based on 44 pulses per revolution from the ABS sensor

/60 will convert rpm to frequency in Hz

*9.756 will return the frequency of the rotor in Hz

*60 will convert rotor frequency to RPM
Image 7
Image 7
As can be seen above, the rotor speed calculated from ABS wheel speed and total transmission ratio, appears to be lower than synchronous speed! This is in stark contrast to the characteristics of a synchronous motor and highlights the variables to be considered when calculating rotor speed in this fashion. Typical variables include a buildup of tolerances throughout the drivetrain and differential action due to steering deviation etc.

An alternative option to measure rotor speed would be to use the integrated rotor speed sensor (referred to by VAG as “G713”)

Here we need to determine the number of electrical cycles from the rotor speed sensor in relation to one revolution of the rotor, but how?

This requires knowledge of the rotor pole count as described in our SSP’s 530 & 527 which, as mentioned earlier, is 10. The pole count is then divided by 2 to determine the number of electrical cycles for one revocation of the rotor, but why divide by 2?

The 10 rotor poles are arranged alternatively (North, South, North, South etc.) as each individual pole is detection by the speed sensor (e.g., a North pole) a voltage output is generated in the respective direction so generating one half of our sine wave. As the following alternate pole (e.g., a South pole) is detected by the speed sensor a voltage output is generated in the opposite direction, so generating the second half of our sine wave and completing one electrical cycle. Hence for every complete electrical cycle, 2 alternate magnetic poles must have passed by the rotor speed sensor

Therefore, the number of electrical cycles per rotor revolution = Number of rotor poles (10) / 2 = 5

The following waveform will help clarify the above. Note, with this vehicle, the electrical cycles of the rotor speed sensor and rotor assembly are identical
Image 8
Image 8
Based on the above knowledge If we know the pole count of our rotor, we use the formula 60/5*freq(H) (Channel H is connected to the rotor speed sensor)
Image 9
Image 9
“The proof” as they say is in the pudding and I think we can agree from the lime green math channel above our rotor speed does indeed equal our RMF speed during acceleration and deceleration (Confirmation indeed this is a synchronous motor)

Graphing both RMF and Rotor speeds across all rpm and load ranges (with synchronous MG’s) will provide invaluable data when it comes to evaluating invertor performance, stator integrity, rotor balance and drivetrain condition. Here we are looking for uniformity and perfect synchronization between the two math channels where any “drop out” or cyclic deviation will highlight areas of concern. On the subject of cyclic deviation, check out Ben’s “Martins’ Method” here topic22592.html

Had this been an inductive asynchronous motor, our RMF speed would have been higher than rotor speed during acceleration but slower than rotor speed during deceleration (a phenomena known as “Slip”) This phenomena/characteristic can be used as an indication of MG status (Motor or Generator) for inductive asynchronous motors only (which is nice to know) but this does not apply with our synchronous motor, so where to now?

Coming right back to the original question “how can we determine from the above captures when the MG is functioning either as a motor or a generator?” Assuming you don’t have a current clamp around the HV battery DC cable (Image 2 above) and you are measuring a single-phase voltage (ref to HV negative) with current, the answer is “phase

Note below the phase relationship between the positive duty of the phase voltage and current compared to images 3 & 4 above
Image 10
Image 10
Note above, the math channel “posduty(E)” reveals how the peak positive duty control of MG Phase W voltage (Approx. 64%) coincides with the peak negative current flow (Approx. -143 A) through the phase winding. Likewise, our lower positive duty of 35% coincides with our peak positive current of -137 A. This is the complete opposite of the duty cycle behavior when our MG is acting as a Motor given their phase relationship has shifted by approx.180°! (referring to electrical cycles)

The waveform below introduces the phase rulers to denote 360° of rotor rotation with 5 partitions, one for each rotor magnet (72° degrees apart) Here we can clearly see the phase shift between the positive duty of the phase voltage and current
Image 11
Image 11
Given the relationship (“phase”) between the positive duty of our phase winding voltage and current reveals the status of the MG (operating as a motor or generator) rather than having to zoom into each section of the waveform and measure the phase, wouldn’t it be great if we could simply graph phase shift?

Well, get ready for the mother of all math channels thanks to my colleague Martyn (the Obi-Wan of math channels) here it is.........

LowPass(Duty(((((atan(1/tan(pi*((posduty(E)-50)/10000)))/pi)+((posduty(E)-50)/10000))*-((atan(1/tan(pi*(C/10000)))/pi)+(C/10000)))+0.25))/0.555555555,10)

I am not going to attempt to explain the above math’s other than it contains a low pass filter, trigonometry, positive duty calculations and a sprinkle of magic!

Unfortunately, when applying this math channel to our capture above, it fails to draw any data due to a measurement error on channel C! The keen eyed will have spotted that during acceleration and deceleration there is an “over-range” condition where the current flow has exceeded 200 A. In such a scenario the math channel cannot perform calculations and returns an infinite value resulting in no drawn data.

Not to worry, searching through similar tests with the E-Golf, “TEST 8” has another acceleration and deceleration event with all phase currents within range and with the added benefit of HV battery DC voltage (note the increase during deceleration)

The math channel is now modified as we are looking at the phase between Channel A (phase winding U Voltage positive duty) and Channel D (phase winding U current)

LowPass(Duty(((((atan(1/tan(pi*((posduty(A)-50)/10000)))/pi)+((posduty(A)-50)/10000))*-((atan(1/tan(pi*(D/10000)))/pi)+(D/10000)))+0.25))/0.555555555,10)
Image 12
Image 12
Above we can now graph the phase shift between the positive duty of our phase winding U voltage (referenced to HV negative) and our phase winding U current in order to determine the status of our MG (Motor or Generator)

Below have hidden a number of waveforms and removed numerous rulers to demonstrate the value of graphing phase shift
Image 13
Image 13
I hope this helps and there will be more to follow as we dig deeper into the above captures and also compare these results with an inductive asynchronous motor (We have so much to learn together)

Take care……Steve

Post Reply