KeepIS
 Guru
 Joined: 13/10/2014 Location: AustraliaPosts: 2260 |
| Posted: 11:35pm 26 Jul 2026 |
|
|
|
Confirmed that the slight wobble in the sine wave slope caused by the extended zero crossing duration has been completely eliminated, just a simple 3 character code change.
I resized the ½ sine array to maintain 20kHz and skipped the final zero entry, this keeps AC frequency timing exactly where it was when the final zero was previously included in 20kHz SPWM generation. User InPhase is correct in that any wobble or misshape in the sine wave is a distortion product that would increase THD, however, THD is very low in this inverter and as the disturbance was extremely small, I doubt that I will see any real difference in THD when I retest the code in the Off Grid Inverter under load.
When I've torture tested it, I'll post an updated file for anyone interested.
EDIT:
My Test Toroid is an old Aerosharp with existing compromised secondary winding and 27 turn primary chucked on, easy to make it hum.
THD tested with no Load - most Inverters usually produce higher THD under no load.
Running the existing, slightly extended zero crossing code, THD is 0.8% to 0.9%, with only 9 small harmonics.
Running the modified Sine array and code, THD is now 0.4% to 0.5%, with 1 tiny close harmonic, which in big reduction in what was, an extremely low THD at Idle.
However 0.4% difference will hardly register under a typical household load of 1.6% to 2.4%, BUT! there is a difference, and it was worth the small amount of time to make the WG Inverter specs even better.
Edited 2026-07-27 15:39 by KeepIS |