Hopefully? Another 48vdc-240vac Toriod Inverter build.


Author Message
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1458
Posted: 02:50am 17 Jan 2023      

  Solar Mike said  
  poida said   This is an inherent characteristic of PWM modulating an AC sine output.
Somehow near zero voltages need to be produced from very narrow PWM pulses.
And at zero voltage there will be increasing gaps between the smallest available pulse widths where no pulse is required.


I was reading, cannot remember where, that if the PWM pulses are centered in each 20Khz time slice period, the modulation distortion is much reduced. See sketch below.

I think its much easier to produce the PWM at the start of each period, eg after timer interrupt, as in the top sketch.

If the CPU timers allow an offset and the bottom modulation achieved - 2nd sketch, then distortion products would be reduced and perhaps leading to more efficient operation.




Cheers
Mike


I have had yet another go at the PWM generation code for the nano/pico-verter
I think I have got perfect symmetry.
In the past there was a couple of small width pulses in not the right places
and this probably gave rise to some part of the zero crossing wobbles.

here it is, using 10kHz PWM to make it more clear that each pulse is exactly
correctly timed and going out the correct pin at the right time.



I will test this code tonight to see if it's any good.