Sine VS Square wave efficancy?

Drunkskunk

100 GW
Joined
Apr 14, 2007
Messages
7,244
Location
Dallas, Texas. U.S.A.
I've seen the move to Sine wave controllers lately and have been wondering how that works out?

It was basic knowledge way back in school that a square wave was superior for stepper motor control because it had a faster transition time, more time under power, more efficiency, and less heat. More power was available with a good steep sided square wave. But it did make more noise.

Now it seems everyone is jumping on the Sine wave boat and I'm still standing on the dock. I'm obviously missing something. Sure, Sine wave is closer to silent, but I can sneak up to wildlife in the woods riding many square wave controlled bikes. More silence is always great, but at what cost?

So I'm not getting it. I'm generally a dumbass compared to most of the Highly intelligent people here, so I need this one explained to me, please. Feel free to use small words, I'll understand better. :mrgreen:
 
Sine is now good becouse the controller processors have >80mhz power and are cheap (now).
A good efficient sinewave table to be calculated in the PWM frequency need that power.

I also be dumb i stick to my Kelly till the capacitors or MOSFETS get blown in 10 years or so :lol:
 
Below is a link from a robotics website, which discusses sinewave commutation in very technical terms for those who want to know more of the specifics. It also mentions that “Space Vector Commutation” (SVC), is even better than PWM-simulated sinewave commutation (concerning efficiency and smoothness), but apparently SVC requires a much more rapid real-time computation on the part of the controllers brain.

I don't understand this either, but I am trying to learn. If there is an efficiency benefit, thats great, but...the biggest supporters of sinewave really like how quiet it makes the motor (which I have not experienced yet)

http://robotics.stackexchange.com/q...ion-waveforms-look-like-for-a-brushless-motor
 
Getting technical is fine, for those that are inclined but I too would like the answer to the question,

2 identical bikes motors batteries, one with square wave and the other Sine wave controllers both pulling identical battery currents, which one travels further?
 
Tench said:
Getting technical is fine, for those that are inclined but I too would like the answer to the question,

2 identical bikes motors batteries, one with square wave and the other Sine wave controllers both pulling identical battery currents, which one travels further?


The one with a skinnier rider. :wink:

All jokes aside, I can't see the efficiency increase being huge or else it would be a major marketing factor for sellers.

From what I do understand about the commutation differences, the efficiency comes from the combination of the 3 fields such as the rotor is driven at the right angles electrically. But at some point, the computational requirements might exceed the efficiency gains or partially net them.
 
sine controllers have higher switching losses
sine driven motors have lower harmonic losses (sound means waste)
sine drive is mostly about control, low torque ripple, and low noise, not efficiency
at full power some will clip and become trap wave controllers for more power

total system efficiency will be motor dependent (back emf)
in general total sys efficiency for typical hub motors might be a little higher with a trap controller
 
Sinus has greatly reduced harmonic content, this means less heat and better efficiency.

When your torque feels jerky instead of smooth, all of the energy spent jerking and making noise is just inefficiency. Sinus setups are silky smooth torque, which means less energy spent doing things that aren't making drive torque (like resonating the stator from harmonic content etc).
 
Gab said:
Do Kelly make ebike sinewave controllers ?


I've personally only seen Kelly sell shit in a box that looked similar to something that could be confused for a controller to the untrained eye. ;) :pancake:
 
I can see the harmonics being less, and a smother transition being better.
But Phase A is up, is relying on Phase B and then C for ground. With a Sinus wave form, you never get a good ground, you're almost always in transition. That might be fine for reducing noise, but it means the Dropping phase is still falling through the transition of both the other phases, and that can't be good for efficiency or power delivery.

I think I must still be missing something obvious.
 
Drunkskunk said:
I can see the harmonics being less, and a smother transition being better.
But Phase A is up, is relying on Phase B and then C for ground. With a Sinus wave form, you never get a good ground, you're almost always in transition. That might be fine for reducing noise, but it means the Dropping phase is still falling through the transition of both the other phases, and that can't be good for efficiency or power delivery.


But doesn't the square wave form attempt to do the same thing?

To me, an analogy for the difference between squarewave and sinewave is like pushing a bowling ball down the street. Sinewave uses a smooth constant push the whole way, while squarewave attempts to simulate the same forces but uses constant jabbing/nudging instead of an even "push".
 
liveforphysics said:
Gab said:
Do Kelly make ebike sinewave controllers ?


I've personally only seen Kelly sell shit in a box that looked similar to something that could be confused for a controller to the untrained eye. ;) :pancake:

what do you think about these controllers?
http://endless-sphere.com/forums/viewtopic.php?f=30&t=51485&hilit=perfect+controller
 
Thank you for bring up this great subject that is long overdue. I look forward to a good deal of arguing:

Consider any 360 degree BLDC motor wave drive technique. First, each 360 degree wave is composed of six sequence states (many references discuss this). Next, break up each sequence state into some number of binary intervals; 8, 16, 32, 64, 128, etc. Since there are six sequence states, then each 360 degree wave contains 48, 96, 192, 384, 768 total number of intervals. Binary lengths are good for uCs.

Now, consider lookup tables, wherein each entry in the table is one of the binary intervals (some type of coefficient) and there are actually three entries because you have three phases. Each entry is nonzero with the exception of those entries that represent the sine wave zero crossing points. Here one of the three table entries has a coefficient of zero and the other two coefficients are equal. Each interval has an on/off time (hi/lo side bridge drive signaling) that is directly related to the coefficient in the table.

So, a longer table would presume a smoother wave being generated. BUT, this also means more on/off switching. May be good for Mosfets, may be not so good for IGBTs. A tradeoff already in the works! Switching losses, etc.

Now, what is the relation of the lookup table to PWM? The action of the lookup table is already a nonlinear PWM operation. Go figure this out.

Table lookup procedures are really simple for uCs. Better save your computing power for later, when you are going to need it. BUT, you better know the positional relationship between the rotor/stator. Now, you have a neat lookup table. What about FOC (Field Oriented control)? This is the reaction to reactance/inductance of the motor coils with RPM change. Wow, now I have to worry about lead/lag of the phase drive and distortion! I prefer to view this as a simple sine wave distortion. SVM (Space Vector Modulation) is another sine wave distortion (my view) to minimize harmonics and reduce cogging. Well, just modify your lookup table to suit your requirements, or, have multiple lookup tables in the uC.

For rotor/stator positional relationship, I prefer to use a magnetic rotary sensor (AS5047D, new product). Easily capable of highly accurate (14-bits!) positioning at 3000 RPM.

Everyone have fun and join in.
kenkad
 
Now we really get to the fun part. How do we really make this exciting BLDC sine wave electronic controller to really, really, work. Let’s take the throttle issue.

We would like a very nice smooth throttle response. Well, that is what an S-curve is all about. Slow smooth RPM startup (no missed sequences), no hiccups, and then a nice smooth linear acceleration and then a gentle tapering off to a cruise speed. Wheelies not being discussed here.

BUT, we need to know if the motor is putting out the correct amount of torque to follow this S-curve we have invented (actually desire). Well, if we cannot follow the S-curve (we are falling below the curve), then we better apply more ‘power’ to the sine wave lookup table (egad, we have to modify the lookup table coefficients on the fly). Remember, I suggested that we need to save our computing power for later. This is that later time to kick in the computational abilities. Hi/lo side drive times are again changing, PWM again nonlinear. Have to monitor the current in the bridge (and temperature rise, etc.). Switching times are changing again. WOW, it is really complicated.

How much more do we have to deal with? Isn’t this all fun? Now is the time to sit back and contemplate what the sine wave controllers being marketed are all about. Oh, I forgot, it is all proprietary and you have to just trust us. But, we have a programmable capability. You just have to be able to fill out the menu entries. Technology is great!

Tongue in cheek in all this. I love technology.
kenkad
 
zener said:
Sine is now good becouse the controller processors have >80mhz power and are cheap (now).
A good efficient sinewave table to be calculated in the PWM frequency need that power.
Bull (to calculate the 3 PWM signals takes 76 assembly instructions, or 2.5 usec on the 30 MIPS processor I use)
 
cal3thousand said:
Drunkskunk said:
I can see the harmonics being less, and a smother transition being better.
But Phase A is up, is relying on Phase B and then C for ground. With a Sinus wave form, you never get a good ground, you're almost always in transition. That might be fine for reducing noise, but it means the Dropping phase is still falling through the transition of both the other phases, and that can't be good for efficiency or power delivery.


But doesn't the square wave form attempt to do the same thing?

To me, an analogy for the difference between squarewave and sinewave is like pushing a bowling ball down the street. Sinewave uses a smooth constant push the whole way, while squarewave attempts to simulate the same forces but uses constant jabbing/nudging instead of an even "push".

Good analogy, to me a sine wave controller is like having round wheels on your bike, square or trap is like having square or octogonal wheels. Both will get
you down the road but octogonal wheels will be bumpy and waste energy.

The difference between a sine and non-sine controller is not only in the output wave, but also in the timing of the signals (although I have the feeling this is not the case for some sinewave controllers coming from China). Running an electric motor is all about timing. Get the timing wrong and your efficiency drops. The equation for motor losses everyone always mentions is

P_loss = I^2 * R

the normal resistive loss equation, but for an electric motor (constant torque) this actually should be

P_loss = I^2 * R / (cos(x))^2

with x the difference in degrees between the perfect timing and the actual timing.

Now a proper FOC controller will maintain perfect timing even at high rpm. A hall sensor based simple controller, here it is impossible to place the hall sensors
correctly and have x = 0. The magnet-to-magnet spacing of a motor is 180 degree timing difference, this means typically the 180 is spaced out over less than half an inch. Putting the halls within 15degree accuracy means putting them accurate to the mm. Second thing a FOC takes care of is the timing advance needed to compensate for the delay through the motor inductances. Especially at high speed this means timing must be moved over 30 degrees or more. A 30 degree timing error would increase losses by 33%.

I have the feeling many cheap china sine waves just interpolate the timing between hall signals and output a sine wave, but they do nothing for correct timing and the associated efficiency.
 
cal3thousand said:
To me, an analogy for the difference between squarewave and sinewave is like pushing a bowling ball down the street. Sinewave uses a smooth constant push the whole way, while squarewave attempts to simulate the same forces but uses constant jabbing/nudging instead of an even "push".

http://en.wikipedia.org/wiki/Project_Orion_(nuclear_propulsion)

It's all the same to most of us if it gets us there.
 
Chalo said:
cal3thousand said:
To me, an analogy for the difference between squarewave and sinewave is like pushing a bowling ball down the street. Sinewave uses a smooth constant push the whole way, while squarewave attempts to simulate the same forces but uses constant jabbing/nudging instead of an even "push".

http://en.wikipedia.org/wiki/Project_Orion_(nuclear_propulsion)

It's all the same to most of us if it gets us there.
yep and this is why some of use have rim brakes and others swear by dis brakes (my mam only does coaster brakes :? )
 
Lebowski said:
cal3thousand said:
Drunkskunk said:
more stuff

Good analogy, to me a sine wave controller is like having round wheels on your bike, square or trap is like having square or octogonal wheels. Both will get
you down the road but octogonal wheels will be bumpy and waste energy.

The difference between a sine and non-sine controller is not only in the output wave, but also in the timing of the signals (although I have the feeling this is not the case for some sinewave controllers coming from China). Running an electric motor is all about timing. Get the timing wrong and your efficiency drops. The equation for motor losses everyone always mentions is

P_loss = I^2 * R

the normal resistive loss equation, but for an electric motor (constant torque) this actually should be

P_loss = I^2 * R / (cos(x))^2

with x the difference in degrees between the perfect timing and the actual timing.

Now a proper FOC controller will maintain perfect timing even at high rpm. A hall sensor based simple controller, here it is impossible to place the hall sensors
correctly and have x = 0. The magnet-to-magnet spacing of a motor is 180 degree timing difference, this means typically the 180 is spaced out over less than half an inch. Putting the halls within 15degree accuracy means putting them accurate to the mm. Second thing a FOC takes care of is the timing advance needed to compensate for the delay through the motor inductances. Especially at high speed this means timing must be moved over 30 degrees or more. A 30 degree timing error would increase losses by 33%.

I have the feeling many cheap china sine waves just interpolate the timing between hall signals and output a sine wave, but they do nothing for correct timing and the associated efficiency.

I get what you're saying, Smooth delivery is better. But it sounds like the advantages of a good sinewave controller have nothing to do with the wave form being sinus, and everything with the controller just being better.

LFP hit on something I sort of get, but am still grasping to fully understand. If the Sinewave clips under load, it effectively turns into a square wave and can deliver more power. That would also give it a steeper gradient and improve switching times, making it more efficient, as I understand it. So how is it that a normal sinewave isn't inefficient?

What got me started on this was the realization that the basic controller could be so much better. However my limited knowledge of motor control (which is probably flawed anyway) says just switching to Sine would be worse. That the real advantage have more to do with how timing and power are delivered, and little to do with the actual wave form. So what I'm grasping to understand is why I'm wrong, or what I could do better.
 
Drunkskunk said:
So how is it that a normal sinewave isn't inefficient?
Think about your average direct drive ebike motor. It has permanent magnets rotating around a bunch of motor winding coils. Now look at a sine wave graph of a normal sine wave. It looks like a sideways "S" where the x axis is rotor angle and the y axis is voltage. Now when voltage is zero your permanent magnet is coming around approaching a motor winding that's about to turn on. With a normal sine wave the power comes on gradually. With a modified wave the power comes on abruptly. Think of the square edge of the wave. That means full voltage before the magnet is over the coil causing a tugging sensation on the windings (and magnet) making some unwanted noise. Now move down the sine wave graph (along the x axis) to where the voltage is at it's highest. Here both waves are the same. We're now at "top dead center". The magnet is directly over the coil (motor winding) that is powered up. No problem here, both have the power full on pulling the magnet (and your wheel) around. Now move further down the graph. On the regular sine wave the voltage is dropping off as the magnet is leaving the motor winding area. On a square wave graph the magnet has gone past the winding but the winding is still on at full voltage tugging on the magnet! What I believe is going on here is the coil is trying to pull the magnet back maybe even trying to reverse the rotation of the motor! Only the mass and momentum of the wheel (and magnets) not to mention all other motor windings firing off at other locations prevent the motor from reversing while again giving a big tug on the windings. It's almost like plucking some guitar strings.

I should mention also that a regular sine wave is created by a normal AC generator and an AC generator is a very close cousin of an AC motor. In fact, depending on construction they can be substituted for each other. An AC motor could be made to serve as a generator and visa versa. The sine wave created by this generator is a "natural diet" that an AC motor would expect. A square wave (sometime called a modified sine wave) is kind of an artificial diet for an AC motor made through the wonders of a computer chip. It works but it's just not as good as the natural diet.

That's basically how I understand it. I welcome any criticisim here if I'm wrong . 8)
 
Drunkskunk said:
If the Sinewave clips under load, it effectively turns into a square wave and can deliver more power. That would also give it a steeper gradient and improve switching times, making it more efficient, as I understand it. So how is it that a normal sinewave isn't inefficient?


System efficiency is not measured by how much power a controller sent to a motor, but rather how well the motor converts the power it receives from the controller.

Things that use reluctance for switching (like steppers) work by having the greatest and most abrupt change in reluctance as the poles of the rotor pass by the stator teeth. As a result, the BEMF of the system is very trap-like by design, this is why they call them 'steper-motors' because unless you power them in a way to enable micro-stepping, they want to just snap to the next location.

I'm not going to discuss the advantages and disadvantages of motor types, as all have a place they belong. However, in things like hubmotors that have more sinus-like than trap-like BEMF profiles, sending them a trap wave means dumping a bunch of current at the rising and falling edges while the magnet has poor geometry to be converting that current into torque. (you know it has bad geometry at that time because if it didn't, the BEMF would be higher in that area).

There is only electro-magnetism. There is no electricity on it's own. When a magnetic field moves through a conductor, that is generating a current that is the same identical current always exactly proportional to the strength and rate of motion of the magnetic field. The motor spins and makes BEMF, the shape of that BEMF is the plot of how much flux moved through the teeth as the flux projected by the geometry of the moving magnetic field of the rotor pushing flux to grow and contract in the coil of copper around the tooth. The optimization for a drive to minimize losses from harmonic content and non-linear rate caused by torque ripple is to simply send it a current waveform that matches it's own BEMF voltage waveform.

Doing that accomplishes a few nice things:

Lowest harmonic content loss.
Smoothest torque
Highest continuous torque possible.
Highest continuous power possible.
Lowest controller losses due to the minimization of harmonic current content.


When it's done right, you can not perceive any steps or pulses in the rotation of the motor, and the motor only makes the noise of windage and bearings spinning.

These are the reasons why you don't just want a "Sinus" controller over a "Trap" controller. Neither are right for your motor unless your motor happens to have perfect trap shaped BEMF or perfect sinus shaped BEMF (neither of which is possible to achieve, you will always have some percent devation, but you can get pretty close to dead-nuts <1% with good sinus motor design).

This is why Lebowski's controller IS the optimization for motor drive function, because it learns the motors BEMF and copies it in the current waveform it uses to drive the motor. As usual, the absolute bleeding edge of EV technology comes from the genius of the individual motivated by his own passions. Thank you for your amazing contribution to motor drive topology concepts Lebowski.
 
liveforphysics said:
The optimization for a drive to minimize losses from harmonic content and non-linear rate caused by torque ripple is to simply send it a current waveform that matches it's own BEMF voltage waveform.
I don't think Lebowski agrees: http://endless-sphere.com/forums/viewtopic.php?p=904571#p904571

liveforphysics said:
This is why Lebowski's controller IS the optimization for motor drive function, because it learns the motors BEMF and copies it in the current waveform it uses to drive the motor.
That was only an option in earlier versions as stated in the post I linked to above.
 
Futterama said:
liveforphysics said:
The optimization for a drive to minimize losses from harmonic content and non-linear rate caused by torque ripple is to simply send it a current waveform that matches it's own BEMF voltage waveform.
I don't think Lebowski agrees: http://endless-sphere.com/forums/viewtopic.php?p=904571#p904571

liveforphysics said:
This is why Lebowski's controller IS the optimization for motor drive function, because it learns the motors BEMF and copies it in the current waveform it uses to drive the motor.
That was only an option in earlier versions as stated in the post I linked to above.

It is something for which I have ideas, something to be added in the future. The first version matched the motor backemf, but since
then my knowledge has evolved and I've realised this is not the way to go. I have ideas how to continue, need to have the time though.
 
Back
Top