Hi polyrhythm. Thanks for the feedback, it's much appreciated. I was using cos and sin before, but it makes sense to simplify things (for my simple mind) and use sin for both with the relevant phase shift for one of them.
I noted from the link that AC posted that it was imperative that the magnetic field not reverse direction, and it should only vary in intensity from 0% - 100%.
MOSFETs are designed to turn on or off, they aren't designed to vary the voltage level. I think you can do that by causing them to partially turn on when feeding the gate with a lower voltage, but this causes unwanted heat as a byproduct. Heat (power) dissipation is calculated as (voltage difference from Drain-to-Source) x (amperage flowing from Drain-to-Source). There is no current flow when the MOSFET is off, so no heat. There is also little voltage difference when the MOSFET is ON, so no heat.
Since a single MOSFET can only cause the voltage to be either 0V or supply voltage, it means that there is no negative voltage produced. This causes my SPWM waveforms to intrinsically have a DC offset so they start from 0V, which effectively shifts the max negative part of the cycle to 0V. This means that the magnetic field will not reverse direction because the current doesn't alternate.
I've revised the waveform calculations to be what you posted, except I don't need the DC offset since I get that 'for free' due to the way the MOSFET switch works.
I haven't used FEMM before, but I've seen references to it in other posts. Seeing the simulated fields would be very helpful, so if you fix your laptop and find some time then that would be a real help.
I'm using a 2D graphing tool called
Desmos to visualize the waveforms.
Here's a link to my graph with the out-of-phase waves.
Red is sin(x),
blue is shifted by 90°,
green is shifted by 180°.
A 180° phase angle will result in two attractive poles being generated. A 90° will have one field be on while the other is off.Isn't the 180° shift what we're aiming for? Your formula references pi, which is 180°.