+ Post New Thread
Results 1 to 5 of 5

24th December 2016, 12:35 #1
 Join Date
 Dec 2016
 Posts
 3
 Helped
 0 / 0
 Points
 92
 Level
 1
Pure Sine Wave  Distorted output on PWM reduciton.
Hi,
I am new to this forum and hope somebody can point me in the right direction with the problem i am having as I build a pure sine wave inverter.
I am using PWM and its complement at 20kHz to drive an HIP4082 Mosfet Driver and HBridge made out of IRF3205 Mosfets. The output then feeds a common mode choke followed by a 12V to 240VAC, 225VA toroidal transformer. I then have a 4.7uF, 300V capacitor on the output of the transformer. So far it is working very well. It is producing a nice clean sine wave with no load and minimal distortion when running 2 * 40W fans. However, i am in the process of added output voltage regulation which i am trying to achieve via reducing the PWM values. I have 15 different tables, 100%, 97.5% ... 62.5% reduction of the PWM values that generate the sine wave. During testing today I found that these reduced value tables were creating significant distortions on part of the sine wave. See picture which is using the 90% table. Testing with one table at a time until i get it right. The distortion would would start even with 97.5% table and become more pronounced as i used a further reduced value table. The idea came from here: http://tahmidmc.blogspot.com.au/2012...erpic16f.html. I however am using an 800 value table full wave table.
I have tried the following:
 A variety of different value inductors on the output of the HBridge, before the transformer. 33uH through to 470 uH. This just helps smooth the distortion to some extent.
 A variety of capacitors on the output of the transformer. .33uF trough to 4.7uF. Smooths the small ripple caused by the PWM duty change as it creates the wave.
 Changed the dead time on the HIP4082 (15K and 33K ohm resistors). Nothing happened.
 Verified the value table is correct. I.e. the 90% is the 100 percent value table * 0.9 (calculated in excel). I have double checked the values and using a 10K resistor and .1uF ceramic confirm it creates a nice clean sine wave at least before it goes to the HIP4082. See the third attached picture of the PWM passed through a 10K & 0.1uF cap for. Note, small variations in amplitude are due to using two different scope probes unfortunately.
 Lowered the gate resistors on the Mosfet from 33 ohms to 16.5 ohms (2 in parallel). No change.
Other observations: a noticeable buzzing comes from the transformer when the distorted wave form is observed. No load current rises form 0.7A @ 19VDC to 4.1A @ 19VDC when the distortion is apparent (90%). Applying a load does not assist.
The second attached file is the output of the transformer (via a 24V step down transformer) when the PWM table of 100% is used. The circuit design is almost identical to that in the HIP4082 datasheet.
Thank you for your help and suggestions.
Last edited by Zibe; 24th December 2016 at 12:53.

Advertisement

24th December 2016, 13:34 #2
Awards:
 Join Date
 Apr 2014
 Posts
 16,081
 Helped
 3643 / 3643
 Points
 79,246
 Level
 68
Re: Pure Sine Wave  Distorted output on PWM reduciton.
Hi,
Show us your schematic. With all your used parts and values.
Show us your code.
Klaus

Advertisement

24th December 2016, 15:04 #3
 Join Date
 Feb 2014
 Posts
 903
 Helped
 298 / 298
 Points
 6,274
 Level
 18
Re: Pure Sine Wave  Distorted output on PWM reduciton.
Buzzing is normal when you have distortion like that.
I'm inferring a lot here but you need to decide whether the problem is your power stage or your control. It sounds like you have a micro spitting out PWM values? Well if things work with a '100% table' then it seems your power stage is validated across the entire PWM range.
The difference between working on not working is these tables in your control, it seems likely the problem is there. Find a way to take a smaller step from the state that works to the state that doesn't, perhaps generate a new intermediate table for example.

Advertisement

24th December 2016, 18:52 #4
 Join Date
 Dec 2016
 Posts
 3
 Helped
 0 / 0
 Points
 92
 Level
 1
Re: Pure Sine Wave  Distorted output on PWM reduciton.
Thanks for your replies. I will post some more details of the circuit tomorrow and of the code when I fire up the computer.
I am using an arduino nano (atmegga 328), using timer1 in 10 bit mode on pins 9 & 10. I am using a table of 800 values for 1 full cycle of the sine wave. 800, as it is high resolution and allows me to achieve a 20kHz switching frequency. 800 is the TOP value for the TCCR, ICR1. E.g. 800 = 100% duty cycle. I generated the values using Smart Sine from the link mentioned above.
The distortion occurs even with the first value reduced table of 97.5%. It is mild but becomes more pronounced with 95%, even more with 92.5% etc. For the sine value tables, 92.5% for example, the PWM will reach a maximum of 92.5% duty or value of 740.
A For loop is used to run through the entire table of 800 values before repeating.
The output from the micro using two filters on the PWM, pins 9 & 10 doesn't show this behaviour.

25th December 2016, 12:28 #5
 Join Date
 Dec 2016
 Posts
 3
 Helped
 0 / 0
 Points
 92
 Level
 1
Re: Pure Sine Wave  Distorted output on PWM reduciton.
As an update, I was able to find the problem seems to be with the sine wave data that i have been producing. Rather than reducing both the amplitude and the offset by X percentage I tried just reducing just the amplitude. Doing so now produces clean sine waves as expected for the reduced PWM values and the output voltage also reduces as expect. The two attached screenshots of Smart Sine summarizes the above change.
+ Post New Thread
Please login