High side vs Low side PWM

trialspower2

100 W
Joined
Dec 31, 2016
Messages
108
Hello,

I have been doing some research but I can't seem to find anywhere any information which explains the performance different between PWM on the high side vs PWM on the low side. From what I can gather active free wheeling can be done with both options, with maybe low side PWM lending itself more for regenerative braking as from what I can gather leaving the high side switched off and pulsing the low side will brake the motor depending on duty cycle.

Any comments would be appreciated.
 
trialspower2 said:
I have been doing some research but I can't seem to find anywhere any information which explains the performance different between PWM on the high side vs PWM on the low side. From what I can gather active free wheeling can be done with both options, with maybe low side PWM lending itself more for regenerative braking as from what I can gather leaving the high side switched off and pulsing the low side will brake the motor depending on duty cycle.
Not much different in theory. In practice, low side switching of MOSFETs is easier to do (easier to do low side gate drive; no isolation required.)
 
I am using isolated power supplys to power the gate drivers, so there are no issues here. I can do either, but which is best.......
 
In that circumstance, Why do you think there is a difference in efficiency? Ultimately both sides need to be switched. So the difference boils down to how often you switch them. Depending on the type of PWM both sides will be switched at the same frequency or different frequencies. There are other impacts as well, such as measuring for sensorless transitions or measuring motor phase currents in different configurations. Ultimately efficiency is probably not the determining factor in the choice.
 
I thought there might be a good reason to choose one, in my case it is sensored control with current sensing.

I guess the main question is will it make any different to torque ripple.

With low side switching at 24V bus voltage I am seeing a negative spike following switch on once I get over 100amps. At 200 amps this spike is around -30 volts. The turn off spike is not as bad reaching about 35v total.

Just wondering if it would be identical with high side switching. I would expect the larger spike to be positive in this case as everything will be opposite?


I am going to setup active free wheeling first because I believe this will help. And then more resistance on the gates if required. While the spike isn't that much of an issue at 24V, And hardly present under 50a. I want to run at 75v so I am expecting it to be worse at this voltage.

I did do a low ampage test on 65v and switching did look fine, but I haven't got the battery's to test under load.
 
If you have isolated supplies for the gates, then I don't see why there would be any real difference in performance.
 
Tonight I have got it up and running with active free wheeling, however I have found a couple of things out in the process.

First, my dspic puts pwm H as the main output when in complementary mode. This means if using low side switching, throttle would be off when at full power and full power when off. So I changed it to run with pwm on high side.

With this setup it runs great when accelerating and at steady output. However soon as throttle goes below the no load speed for that particular output, things don't sound very healthy. I played a little at low speed, and with a 20kg flywheel on the motor it would quite easily regen.

I think the rough noise from the motor is because when at zero throttle the low side is still getting a pwm with a full duty cycle minus the dead time while another phase leg is connected directly to the low side. So its shorting out the motor while it is spinning.

When putting the throttle slightly under the motor speed, the effect is the same but as the high side is still switching we don't see any regen, Just sounds horrible.

This was not something I saw coming, and now I am wondering how to best attack it. The two options I can see are-

* Make a lookup table for pwm period vs motor RPM for unloaded running and only switch on complimentary output if the motor is below this.

* I do have a current sensor on the battery wire, I could monitor this and only use complimentary pwm output when under load

* Maybe I am doing something wrong and this should not happen?
 
Here is a clip to give you an idea of how it sounds. Motor has a 20kg 600mm diameter flywheel on it.

https://youtu.be/DeVprI9lVRo

Am I right in thinking that for regen I should leave all the high side switched off and pulse all the low side. Where the duty cycle will control the level of braking/ regen?
 
trialspower2 said:
Am I right in thinking that for regen I should leave all the high side switched off and pulse all the low side. Where the duty cycle will control the level of braking/ regen?

That is one way to do it. This might be a good option if you want to have a "coast" mode.

I had a controller once that did complementary PWM. This gives you synchronous rectification, which is better than using the body diode in most cases, but anytime you decreased the throttle, it went into regen. If you let off the throttle suddenly, it was violent regen. What worked was to add a current sensor and control the PWM based on the current. I had it programmed to limit the regen current to a preset value. If I programmed the value to near zero, it gave a nice coast mode. Brake signal input toggled the regen current setting from zero to the preset.

With enough practice, you could ride it without the limiter circuit, but it sure took some getting used to and was bad when you suddenly let go of the throttle.
 
The controller is for an electric trials bike, so throttle response/ control is going to be everything. I want to try and emulate a petrol engine if possible, so have engine braking based on how far the throttle is closed. This will not need to be excessive at lower speeds, but can maybe be more violent at higher speeds.

I think I am going to try and implement this based on battery voltage, pwm duty cycle and motor speed. If I estimate the motor no load speed based on the battery voltage and pwm duty cycle I should be able to implement the right control for either light regen, or synchronous rectification (if below no load speed).

fechter said:
If you let off the throttle suddenly, it was violent regen

Can this damage the motor, or potentially produce an excessive amount of current from the generation? As you can see in the video I really didn't push it as I was worried it might damage the motor/ controller.
 
trialspower2 said:
Can this damage the motor, or potentially produce an excessive amount of current from the generation? As you can see in the video I really didn't push it as I was worried it might damage the motor/ controller.

Yes, the controller could be blown by excessive current. The motor can usually handle it. I did snap a drive belt once.

I'll be interested to see how estimating the current works out. Torque is proportional to current, so keeping the regen current from getting too high is the key. Implementing a current sensor is not that hard, at least on the battery side.
 
I have allowed for a battery side current sensor, its just not installed at the minute. I could use this if it is a better route.

My thinking was that it I follow a set of regen parameters based on motor rpm and low side duty cycle, this should limit the regen current? If the motor speed is very high, the low side duty will be lower than if the motor speed is low and everything in between will be adjusted every motor revolution. I can see it being difficult from the fact that I want going between motoring and regen to be as smooth as possible.

Would the control system I am planning not be more predictable and faster to react than waiting for feedback from the battery current sensor?
 
You can estimate the current.

If you know motor RPM you can calculate back EMF from kV

You know system resistance.

You know battery voltage (hopefully by measurement as it changes).

You know the duty cycle (PWM).

Current = ((battery voltage * duty cycle) - back EMF) / system resistance.

A negative value will indicate regen.
 
I was going to take a less mathematical approach and measure the motor speed at different duty cycles under no load conditions. Then using this information make a lookup table take return a value.

If the motor is below the no load speed for the given duty cycle it will return a zero which will keep synchronous rectification enabled.

If the motor speed is at the no load speed, it will return 1 and synchronous rectification will be disabled.

If the motor speed is above no load speed it will return a value greater than 1 to set the regen value based on how far above the speed it is. My thinking is a lookup table will allow me to tailor the response at different speeds.
 
A current sensor will react very quickly. One thing to consider is what happens if you are going downhill vs. flat or uphill.
 
fechter said:
One thing to consider is what happens if you are going downhill vs. flat or uphill.

Does this make a difference?

If its uphill the motor will never reach no load rpm for a given duty cycle.

If its flat the motor shouldnt reach no load RPM and if it does synchronous rectification will be disabled. I will probably allow some decrease in motor speed before regen starts to kick in.

If going down hill, it the regen will be based on how far the throttle is shut off, im hoping this will be a little bit like engine braking. On a petrol bike the deceleration will change based on how far the throttle is closed. At high speeds regen will be stronger. If the hill is really steep the bike will still accelerate, but as it does regen will increase as the motor rpm will be getting further above the pwm set point.

it works in my head.......... this really does not mean it will work in reality.....
 
Tonight I have found out why it sounded so lumpy during regen. It was due to the sensor timing. What I hadn't noticed is after changing from low side to high side pwm the motor was now turning in the opposite direction and it really wasn't happy with the sensor alignment. After adjusting this, it ran loads better and the regen started working smoothly.

I am now thinking it might be better to control the deceleration of the pwm signal and run in synchronous rectification all the time??


However now with high side pwm my switch on spike is even worse. (see attached image, I seem to have my new scope in x10 looking at the voltage readings)

What I can't understand is why switch on is so quick and so much quicker than switch off. The scope is on 200ns per division.

I have 6 x TO247 transistors on each phase (36 in total) with a 2.5A(on)/5A(off) driver. The driver is switching from -5v to +15v. The gate resistors are 25R, with an extra parallel resistor of 35R in series with a diode which is pointing towards the gate driver. So that should be 25R for turn on and 14.6R for turn off. Yet switching ON seems to be 10 x faster than switch off.
 
Are you looking at the gate signal or the voltage on the phase wire?

On the commercial controllers I've reverse engineered that do regen, they were always running synchronous and controlled the PWM to keep the current in bounds, sort of. It worked well with a battery current feedback. You need to limit the regen current to avoid toasting the battery or the motor. In the case of going down a steep hill, you want as much regen as you can get without overheating anything or breaking anything. If you go to zero PWM, it's like shorting the motor and something is likely to fail. On level ground at lower speeds, zero PWM might be fine.
 
switching.jpg

sorry, I forgot the image.

Its the voltage on the phase wire.

I am guessing that the mosfet is not fully turned on when the first peak is reached?

I have just increased the dead time which has helped a little. Im guessing the best approach is to increase the gate resistor for switch on? The ripple is only very faint on the DC bus, I have 118 x 22uf polymer capacitors which should give about 270A ripple current. I am running at 100KHz switching frequency. I don't seem to have excessive switching losses, the motor will rotate with a 20kg flywheel on it with 200ma current. (measured on the battery lead with fluke multimeter, currently on 24V)

I dont think the motor helps, its a 25kW outrunner which weights 4kg. I think they are renown for being difficult to run due to the very low inductance. I had over 300amp at 24v on it with a torque meter locking it up, it did 35 ft/lb. Will be interested to see if the torque doubles when going to 24V.

With regard to regen, I want to make it predictable for trials riding, initially I will set a minimum pwm for a given motor speed.
 
My guess is you're seeing voltage from the BEMF of motor making the decay look slow. If you were measuring current I think it would drop much faster.
 
How exactly are you measuring (physically)? Where did you put the probe's tip and the GND clip (you're using the clip and not the lead, right?)?
Your switch-on spike actually looks "too" low to me, for something switching in 40ns. Information is missing. At what phase current are you measuring?
 
I had the ground clip on the battery negative and the probe onto one of the motor phases. It was low current and probably quite low RPM.

Here is another scope picture which was probabily somewhere between 50 - 100A at a few hundred RPM. The yellow is one of the motor phases and the green battery voltage. The voltage scales are different as I was trying to capture all of the spike.

I have order some 50R resistors to replace the 25R currently fitted. I'm guessing the switch on is fast due to the FET's low gate charge. (FDH055N15A)

 
That's more what I would expect to see for any relevant load. Motor RPM is irrelevant, it's the current that matters for this ringing.
However, if you measured it using the ground lead and not the ground clip, the ringing amplitude may be much higher that it actually is. For a good measurement you should use the gnd clip and measure right there at the FET's legs (sometimes I solder a little piece of wire at the pad so the probe has something to grab on to).
 
Back
Top