Puzzling out the difference between 180 degree sine wave and FOC control

I am reading up and trying to puzzle through the difference between these control strategies. Clearly there is a whole spectrum of strategies that blend into one another.

Here are two of the best documents I have found:

https://www.magnelab.com/wp-content/uploads/2015/02/A-comparison-study-of-the-commutation-methods-for-the-three-phase-permanent-magnet-brushless-dc-motor.pdf

They have some diagrams. The one in the second document is a little different and seems to be a little borked as it shows the encoder angle going into the clarke transform but…

My main issue is that if you consider a motor rotating at constant speed, and you measure the current on each phase, it’s a sine wave for sine wave drive, and a sine wave for FOC drive (avoiding the whole space vector thing, the second doc seems to imply space vector goes hand in hand with FOC but that doesn’t seem to be true by most other accounts, or looking at the SimpleFOC code)

Ok. And then you regulate the difference in the angle between the rotor and the magnetic field i.e. the equilibrium position that the rotor would achieve were it completely unloaded and free to move (no friction or anything).

Ok.

The optimal angle is the same in either case, yes? 90 degrees. pi/2 radians.

It is kind of confusing that the diagrams of the magnetic fields do not resemble actual motors, but I think I can handle that.

So, if we monitored the current with an oscilloscope, and then graphed it as a relationship with rotor angle, the graph should be basically the same at any speed and for both control schemes, if that is true. And yet no.

Candidate explanations include mostly stuff that is not really explained in either of those documents. Also it’s not quite clear why they call it 180 degree sine wave drive if the optimal angle is 90 degrees… I know I should read up more before asking but I already spent quite a while reading up and the explanations are not so hot wherever I go.

This all leaves aside the reality that simpleFOC based drivers often do not actually monitor the current but instead just send out the voltage and call it good, and the PI control loop could lag or oscillate… perhaps the explanations lie somewhere in there.

If the sine wave drive suffers lower efficiency at higher RPMs, the current waveform must deviate from the ideal for some reason. I see no explanation for this anywhere, though.

1 Like

well here’s one thing that ChatGPT definitely has no clue about:
what’s the critical difference between 180 degree sine wave control of a motor and FOC control?

The critical difference between 180 degree sine wave control and Field Oriented Control (FOC) lies in the way they control the motor’s magnetic field.

In 180 degree sine wave control, the motor is driven by a simple sinusoidal waveform, which applies a fixed voltage and frequency to the motor’s windings. This results in a fixed magnetic field orientation that rotates at a constant speed. While this approach is simple and inexpensive, it is less efficient than FOC and does not offer precise control over the motor’s torque and speed.

FOC, on the other hand, is a more advanced control technique that allows for precise control of the motor’s magnetic field orientation and strength. It uses mathematical models to calculate the optimal current and voltage required to achieve the desired torque and speed. By controlling the motor’s magnetic field orientation and strength, FOC can provide precise control over the motor’s torque and speed, resulting in improved efficiency, reduced noise and vibration, and better overall performance.

In summary, the critical difference between 180 degree sine wave control and FOC is the level of precision and control over the motor’s magnetic field orientation and strength, which directly affects the motor’s torque and speed.

!(data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2738%27%20height=%2738%27/%3e)Anthony Douglas

but if you are rotating a motor at a constant speed under a constant load, is the current vs time waveform a 3 phase sine wave in both cases?

Yes, in both 180 degree sine wave control and FOC, if the motor is rotating at a constant speed under a constant load, the current vs. time waveform would be a three-phase sine wave.

In 180 degree sine wave control, the three-phase sine wave is applied directly to the motor’s windings to create a rotating magnetic field that drives the motor. The waveform has a fixed frequency and amplitude and is simply turned on and off at the appropriate times to maintain the desired speed and torque.

In FOC, the three-phase sine wave is also applied to the motor’s windings, but the amplitude and phase of the waveform are dynamically adjusted to achieve precise control over the motor’s magnetic field orientation and strength. This allows for more efficient operation and improved performance compared to 180 degree sine wave control, especially under varying load conditions. However, if the motor is operating under a constant load at a constant speed, the resulting current waveform will be a three-phase sine wave in both control methods.

!(data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2738%27%20height=%2738%27/%3e)Anthony Douglas

What do you mean the sine wave is simply turned on and off at the appropriate times, in 180 degree sine wave control?

I apologize for any confusion. What I meant by “turned on and off” in 180 degree sine wave control is that the sine wave is applied to the motor’s windings as a series of pulses with varying duty cycles.

In 180 degree sine wave control, the waveform is generated by a pulse width modulation (PWM) technique, where the voltage is applied to each phase of the motor in a series of pulses, with the width of each pulse being adjusted based on the desired amplitude of the sine wave. This on-off cycling of the voltage waveform creates the illusion of a continuous sine wave at the desired frequency and amplitude.

The duty cycle of each pulse is adjusted based on the required torque and speed of the motor, with longer duty cycles resulting in higher torque and shorter duty cycles resulting in higher speed. The timing and duration of these pulses are controlled by a microcontroller or other control circuitry to maintain the desired motor speed and torque.

I hope this explanation clarifies the operation of 180 degree sine wave control.

!(data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2738%27%20height=%2738%27/%3e)Anthony Douglas

But you said the amplitude of the 3 phase sine wave did not vary, with 180 degree sine wave control

You are correct, and I apologize for any confusion. In 180 degree sine wave control, the amplitude of the three-phase sine wave does not vary, and instead, it is held constant at a fixed value.

The only variable that changes in 180 degree sine wave control is the timing of the pulses applied to each phase of the motor. The width of each pulse is varied based on the desired amplitude of the sine wave, but the amplitude itself is held constant.

This approach is simpler and less expensive than FOC, but it may result in lower efficiency and less precise control over the motor’s torque and speed.

!(data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2738%27%20height=%2738%27/%3e)Anthony Douglas

Dude that makes no sense.

I apologize for the confusion. Let me clarify my previous answer:

In 180 degree sine wave control, the amplitude of the three-phase sine wave is fixed and does not vary. This is achieved by applying a constant voltage to each phase of the motor’s windings.

The timing of the voltage applied to each phase is varied to create a rotating magnetic field that drives the motor. This is achieved by switching the voltage on and off at the appropriate times using pulse width modulation (PWM) technique.

The duty cycle of each pulse is adjusted based on the desired amplitude of the sine wave. However, the amplitude of the sine wave itself is held constant.

I hope this clears up any confusion, and I apologize for any mistakes in my previous answers.

!(data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2738%27%20height=%2738%27/%3e)Anthony Douglas

The sine wave’s amplitude cannot be constant as you describe.

You are correct, and I apologize for any confusion. In 180 degree sine wave control, the amplitude of the three-phase sine wave is not held constant, but rather it varies based on the required torque and speed of the motor.

The voltage applied to each phase of the motor’s windings is modulated using pulse width modulation (PWM) to create a three-phase sine wave with variable amplitude. The duty cycle of each pulse is adjusted based on the required amplitude of the sine wave, which in turn affects the torque and speed of the motor.

I apologize for any confusion caused by my earlier answers, and I hope this clarification helps.

!(data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2738%27%20height=%2738%27/%3e)Anthony Douglas

ok, but for a given load and speed, why would the efficiency of sine wave drive be any different than FOC based drive, then? If the current waveforms are the same, efficiency should be the same.

You are correct that in steady-state operation, with a constant load and speed, the efficiency of a 180 degree sine wave control and FOC-based control could be similar, provided that both control methods are implemented properly.

However, FOC control offers some advantages over 180 degree sine wave control, especially under dynamic conditions. FOC control allows for precise control of the motor’s magnetic field, which can improve the motor’s efficiency and performance. FOC can also reduce the torque ripple and noise in the motor, which can improve the motor’s operation and lifespan.

In contrast, 180 degree sine wave control is a simpler control method that may be less expensive to implement, but it can result in less precise control and reduced efficiency under dynamic conditions. The lack of precise control over the motor’s magnetic field can lead to increased losses and reduced efficiency in the motor.

Therefore, while the efficiency of 180 degree sine wave control and FOC control may be similar under steady-state conditions, FOC control can offer advantages in terms of performance and efficiency under dynamic conditions.

!(data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2738%27%20height=%2738%27/%3e)Anthony Douglas

You tend to repeat yourself a lot, can you please try to repeat yourself a bit less.

I apologize if my previous responses were repetitive. I will do my best to be more concise in my answers in the future. Thank you for your feedback.

!(data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2738%27%20height=%2738%27/%3e)Anthony Douglas

This still does not explain at all what the difference between sine wave drive and FOC is. Does the waveform of the two control schemes change then the motor is accelerating, and in what way?

The difference between sine wave drive and FOC is in how the control systems manipulate the three-phase current waveforms applied to the motor’s windings.

In sine wave drive, the three-phase current waveforms applied to the motor’s windings are generated by simply turning the voltage on and off at the appropriate times using pulse width modulation (PWM). The resulting waveforms resemble a sine wave and rotate in a fixed pattern.

In contrast, FOC control uses a more sophisticated control algorithm to precisely control the magnitude and phase of the three-phase current waveforms applied to the motor’s windings. FOC control involves transforming the three-phase currents and voltages into a two-coordinate rotating frame of reference and controlling the currents in this frame. This allows for precise control of the motor’s torque and speed.

Under dynamic conditions, such as during acceleration or deceleration, the waveform generated by sine wave drive will remain the same, with the only change being the timing of the pulses applied to each phase. In contrast, FOC control can adjust the current waveforms applied to the motor’s windings to optimize the motor’s performance and efficiency during dynamic operation.

To summarize, the main difference between sine wave drive and FOC is in how the control systems manipulate the three-phase current waveforms applied to the motor’s windings. FOC control offers more precise and efficient control of the motor’s performance under dynamic conditions, while sine wave drive is a simpler and less expensive control method that may be suitable for steady-state operation.

Here is another good article:

I think, reading between the lines, it appears that the critical difference may be the current feedback going into the PI controller. Apparently this cannot happen without the clarke transformation at least, although the parke transformation appears to be mostly optional. Because a PI controller would have some difficulty performing well if it tried to regulate the actual current to match a certain sine waveform as it changed, and you would need 3 separate pi controllers, one for each phase, which would clearly have downsides, we send the currents through the clarke transform to get the angle back and then work on that.

However this does not actually happen when SimpleFOC is not operating in current control mode. It sends the voltage out and then doesn’t check to see what the current actually is. Thus, we can simply steal the assumed magnetic/electrical angle before it went into the setelectricalangle() function. Thus, there is no need for any clarke transform to convert the voltages or currents back to an angle. We still use the inverse clarke transform, but since we only ever want the useless current to be zero I don’t see much point in that. A sine lookup table would work just as well, but it doesn’t really matter.

I have thus come to suspect that this approach, usually adopted by simpleFOC actually more resembles 180 degree sine wave drive more than true FOC, with the same downsides as compared with true FOC.
Nevertheless it’s still good stuff and having a set of modules that lets you do this is very useful, I’m not complaining or anything, just puzzling things out.

It appears that the reason they call it 180 sine wave drive is because they think of the rotor as being at 90 degrees for some reason. Thus, you set the magnetic field of the stator/electromagnets to 180 degrees, so that they are 90 degrees advanced. Ok. I would think of the rotor as being at 0 degrees, and then 90 degrees gives full forward torque and -90 gives full reverse torque. But whatever, suit yourself.

I saw in the past FOC even in voltage mode is superior to sinusoidal because it can handle motors with Delta wiring.
Those motors have a 30° phase shift that will result in phase advance making the motor spin much faster in one direction.

[edit] Probably because the implementation I use has a PI Control on d current even in voltage mode

Why can’t you just compensate in the driver for that static difference in phase, which you know will occur depending on direction? I see it may happen automatically with FOC, but I don’t see why the ability to drive delta wired motors is inherent to the FOC control scheme, inherently.

Yeah I mean you can do it automatically with FOC.
Having control on d an q axis you can also do more advanced control like maximum torque per ampere, d-q axis decoupling.

I think that the 180 deg sine control is in contrast to the old-school 120-degree trapezoid control.
https://www.semanticscholar.org/paper/Sensorless-drive-of-brushless-DC-motor-with-Hu-Sathiakumar/9c623c6e812b372f4a4cee8ba5e9a8235fcd3221