Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Pure Sine Wave Inverter Design

Status
Not open for further replies.

AtMega32

Junior Member level 3
Joined
Nov 11, 2013
Messages
30
Helped
2
Reputation
4
Reaction score
3
Trophy points
8
Activity points
277
I am designing a pure sinewave inverter, 220V, 50 Hz.
Here is the complete design,
QpX93md.png

without filter i simulate the whole circuit and tried to plot the current waveform by placing a current probe in RL Load (R = 5 Ohm, L = 16 mH).
I should be getting a sinusoidal current waveform but it is giving my arbitrary result. what might be the problem ?
I have followed this article for PWM generation using Atmega16.
Switching Frequency 16 Khz.
Fundamental Frequency 50 Hz.
https://tahmidmc.blogspot.com/2013/02/sine-wave-generation-with-fast-pwm-mode_2525.html
An external crystal is being used for 16 Mhz clock frequency.
here is the configuration i have done .
JjK5UYJ.png


Here is the PWM waveform
jPlB2it.png


cXcdX7y.png




Instead of IR2110 i have used IR2112, as IR2110 is not available in Proteus. MOSFET Driver circuit is working fine, i have checked the voltage at gate and it is turning it ON/OFF.
MOSFETS are working good.

If i directly filter the PWM signal using RC filter i am getting a sinusoidal voltage waveform.

What might be the problem that i am not getting sinusoidal current waveform ????
If someone interested in debugging my circuit or just wants to run it in their Proteus please tell i will attach the design file.

Here is what i am getting when simulate the circuit
Current waveform
XbKkVQz.png


Voltage Waveform
rp0XPZp.png


Any help will be appreciated

I wish tahmid is here to help me out, he is the best guy when it comes to share knowledge and helping out.
 
I have experimented (in simulations) with different smoothing (filtering, snubber) networks. I have found it requires adding a capacitor. To be effective, two LC networks may be necessary.



I used a slow frequency (1.5kHz), to make the waveforms obvious. The capacitors are a larger value and they must carry heavy current pulses (in theory).
Your configuration is at a faster frequency, and it will use different values, and it may put less stress on the filter network.
 

Bradtherad: the filter circuit is necessary for getting sinusoidal voltage waveform, isn't it ?
without filter the current waveform should somewhat be sinusoidal even if there are some spikes or other noise, but my current waveform is no where near to sine wave
 

crutschow: how to know what value of inductance is sufficient ??
what do you say about my current waveform, is that cause of small inductance value ?
 

Add a capacitor , say 2u2 to ground between the inductor and the resistor.
 

Here is the result when I try an inductor alone inline with the load,



As you can see the waveform does not resemble a sinewave.
It contains a lot of random spikes. It can barely be recognized as deriving from the original PWM pattern.

What could be the reason? The H-bridge is driven so that heavy current switches on-and-off through the inductor. This creates spikes.

A capacitor (or two) is needed somewhere in the filtering network.
 

Brad, I think the inportant thing you are missing in your simulation is a commuting diode across each switch. This is normally the parasitic drain-source diode in the MOSFET bridge. If you add that you shouldn't need the capacitor as the diodes will suppress the splikes.

- - - Updated - - -

crutschow: how to know what value of inductance is sufficient ??
what do you say about my current waveform, is that cause of small inductance value ?
After some calculations it would seem your inductance should be adequate for a 16kHz switching frequency.

But your waveforms are confusing to me. I don't see how the current could be bouncing between the two values in a square-wave pattern at 50Hz as you show. Post all four gate waveforms to the bridge (at a fast enough sweep so the relative timing of individual PWM pulses can be seen).
 

curtshow: Do you mean sweep analysis of those gate PWM pulses or just the waveforms ?
After some calculations it would seem your inductance should be adequate for a 16kHz switching frequency.
Any formula, how to calculate that ?


BradtheRad: which simulation software are you using ?

what should be the filter connection, is it like this, without the caps to ground.
**broken link removed**
 

Brad, I think the inportant thing you are missing in your simulation is a commuting diode across each switch. This is normally the parasitic drain-source diode in the MOSFET bridge. If you add that you shouldn't need the capacitor as the diodes will suppress the splikes.

Yes, you are right. After I substituted mosfets, the inductor now does a reasonable job of smoothing the PWM to a sine shape.

Opposing pairs of mosfets conduct the spikes via the body diodes.



The scope traces show the body diodes must carry 61 A. That is a lot to ask. Therefore it still seems like a good idea to add a capacitor or two, to absorb some of the spike energy.

I am uncertain about the realism of the mosfet model. It appears that only the upper mosfets conduct the spikes upward. This may mean the body diode is modeled in Falstad's, or it may be an oversight.

- - - Updated - - -

BradtheRad: which simulation software are you using ?

This is Falstad's animated interactive simulator. Free to download and use at:

www.falstad.com/circuit

what should be the filter connection, is it like this, without the caps to ground.
**broken link removed**

Yes, something like that. It is similar to filter networks that might be used to turn a square wave into a sinewave. However that is not quite the same as the job of smoothing PWM square waves. The L and C values must cooperate with your 16 kHz switching frequency, as well as with the 50 Hz sine frequency.

There are many possible arrangements. One would need to try several experiments. Both with L and C values, and their placement.

I doubt you need two inductors in series. They are equivalent to one inductor anyway.

The westhost.com schematic shows two capacitors connected to ground. I guess you mean they are to be omitted? I believe they can be omitted (as well as their connection to ground, since the load and filter network are not referenced to ground).
 

Do i need to externally connects those diodes in my circuit ?
i didn't connect externally as MOSFET IRF840 has those diodes built in.

what would be the formula for calculation of L and C.
f = 1/2*pi*sqrt(LC)
16 Khz = 1/2*pi*sqrt(LC)
is this correct way of calculating ?


-Vss is ground in my case, so does that mean i need to consider those caps to ground or just remove them.


How did you generate that PWM in https://www.falstad.com/circuit/ simulation software, i was checking that software, didn't able to find the comparator, for triangular wave i can use 741 to generate it, and can use the ac sine source for sinusoidal wave.

- - - Updated - - -

I have attached the project file and hex file for microcontroller, I would be very greatfull if someone can check this on his Proteus and give me the result.

files included in the rar are
1. InverterComplete.pdsprj
2. SPWM.hex

- - - Updated - - -

DSN file for lower version of Proteus download SPWM.rar
 

Attachments

  • invertercircuit.rar
    24.7 KB · Views: 281
  • spwm.rar
    20.6 KB · Views: 238

build the complete circuit again, debugged every single output after connection and finally made the complete circuit without connecting any filter, with an load of 5 ohm and 16 mH.

here is the complete circuit.
Input DC Voltage 20 V.

oHG1RvX.png


This is my voltage and current waveform

MTtnyjH.png

Red is current
green is voltage
Result is very nice as expected, although voltage waveform can be improved, it is still good.

if i use a filter
1 kHz = 1/(2*pi*L*C)
L = 0.0253 H
C = 1uF
yLDKq5P.png


then
voltage waveform and current waveform
7D448Is.png


The circuit works quite good for an input voltage of 20 V but the problem comes now if i increase it to 200 V DC Supply, it is giving me absurd result like this
voltage waveform
XyvKc6G.png


current waveform (it is distorted but still somewhat looks like sinusoidal)
t79KAiW.png


- - - Updated - - -
_____________________________________________________________________________________________________________________________

Now i rechecked the circuit again, started observing the PWM signals.

for voltage less than 70, it is working good, but when i increase voltage to 75 here is the kind of waveform i am getting,

have a look at PWM signal for Q3, it is kind of weird, at some part it is neither high nor low. why ??
ubEGwJJ.png



and for dc input voltage of 76v, here is the PWM signal
X15WnxC.png


The simulation is aborted after 20 ms, no idea what is going wrong with my PWM signal


PWM signals feed to MOSFETs are first passed to MOSFET driver (IR2112) and then passed to MOSFETs.


Update: For 80v input and adjusting the R1 = 1.2 ohm (connected to input DC voltage) , i am able to get the correct output waveform upto 120 ms.
up to 80v I need to keep changing R1 value to get output response without error message "Simulation Aborted"

I think there is something wrong with my driver circuit.
can someone verifies it ?

TlE9lLo.png
 

How did you generate that PWM in https://www.falstad.com/circuit/ simulation software, i was checking that software, didn't able to find the comparator, for triangular wave i can use 741 to generate it, and can use the ac sine source for sinusoidal wave.

This is the method that works in simulation.

All waveforms have identical amplitude, although you may need to change this, in order to get a satisfactory sinewave output.

A triangle wave works as well as a sawtooth.

1537874200_1402515403.png
 

I overlooked something. I'm cheating to an extent, because I specify a single polarity supply for the op amps (that is, a positive supply). The outputs are in the positive region only.

Guidelines for real op amps say the inputs should not be exposed to a volt level outside the supply rails.

This means my schematic should not be used in real life.
It will require more work to design a proper PWM waveform.

- - - Updated - - -

The circuit works quite good for an input voltage of 20 V but the problem comes now if i increase it to 200 V DC Supply, it is giving me absurd result like this
voltage waveform

As you can see, it is not easy to design your own inverter.

There are companies which have an expert on their research team, with experience in this area, and he needs to know how to work out the bugs, and he must spend time trying to solve glitchy behavior.

It's the same as you are doing.

You are making progress. You may yet have to try a dozen things, to track down the reason your waveform is acting strange.

Examples, change the waveform,
reduce switching frequency,
change volt levels,
etc.

Furthermore your project has several sections.
Sometimes it helps to split up a complicated project, and test each section. Confirm that each component is acting the way it ought. This is a tough job and it will require ingenuity on your part. It's part of learning electronics.

up to 80v I need to keep changing R1 value to get output response without error message "Simulation Aborted"

I think there is something wrong with my driver circuit.
can someone verifies it ?

TlE9lLo.png

You may need to resort to constructing the most basic, simplest driver circuits. For instance it might help if you use simple switches, as in my schematic post #7. That should give you a better idea whether your mosfets are working right.

Make sure components are not exposed to incorrect volt levels. I find that mosfets are fussy about what voltage their gates are exposed to, and it must be 'sensible' in relation to their supply voltage.

Try experimenting with P-mosfets. Your N-mosfets require a very high bias voltage, to overcome the high voltage at those middle nodes of the H-shape. I'm not saying you must wind up using P-mos, necessarily.

Put high-ohm resistors across components which conduct on and off. This may help the simulator find convergent solutions. Or put a resistor from the component to ground.
(Example, from mosfet gates to ground. Don't rely on a simulated IC to do this internally. Don't rely on the simulator to make your job easy.)
Etc.
 

Your software only updates four values from sine table and PWM is never 0%. It should be zero, when phase is reversed.

6362264600_1402553589.jpg


2912586500_1402553590.jpg
 

i have followed this article for PWM generation https://tahmidmc.blogspot.in/2013/02/sine-wave-generation-with-fast-pwm-mode_2525.html
32 entries of sine tables makes 180 degree of sine wave,
for two phase operation, AND gates are used to divide PWM in two halfs,
PWM output from Atmega16 looks good i believe, https://i.imgur.com/cXcdX7y.png


I found one bug,
MOSFETs IRF840 is capable of 8 A Maximum Current, so with 100 v input and 5 ohm, 16 mH load it exceed that and giving undesirable result.

But still i am confused over why the PWM is like that for high voltage dc input to those H-Bridge. It shouldn't be affected by it, isn't it. ?
check the red portion, PWM signal is neither high nor low, what might be the cause for this problem
n166U1G.png


may be there is something wrong with my driver circuit.
 

what inductor and capacitor value you chose at out filter portion ??

- - - Updated - - -

i have followed this article for PWM generation https://tahmidmc.blogspot.in/2013/02/sine-wave-generation-with-fast-pwm-mode_2525.html
32 entries of sine tables makes 180 degree of sine wave,
for two phase operation, AND gates are used to divide PWM in two halfs,
PWM output from Atmega16 looks good i believe, https://i.imgur.com/cXcdX7y.png


I found one bug,
MOSFETs IRF840 is capable of 8 A Maximum Current, so with 100 v input and 5 ohm, 16 mH load it exceed that and giving undesirable result.

But still i am confused over why the PWM is like that for high voltage dc input to those H-Bridge. It shouldn't be affected by it, isn't it. ?
check the red portion, PWM signal is neither high nor low, what might be the cause for this problem
n166U1G.png


may be there is something wrong with my driver circuit.

WHY YOU ARE APPLYING 100V AS YOUR MOSFET MAX VDS CAN BE 500V ??
 

aqildad: well i am designing an 220 v, 50 hz inverter, circuit wasn't working for that voltage so i reduced it and started testing the circuit, upto 70v it was giving good result but after that it started giving absurd results

filter circuit parameters
L : 0.025 H
C: 0.1 uF

what should be the test cases for RL load values to test this inverter, R and L values, currently i am testing it with R = 5 ohm, L = 16 mH and then second time with R = 500 ohm and L = 1.6 H.
 

do you test it with real hard ware ?? i thing it is just a Proteus simulation problem ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top