Author Topic: True sine inverter circuit - does not produce a sine wave - why?  (Read 6047 times)

0 Members and 1 Guest are viewing this topic.

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
True sine inverter circuit - does not produce a sine wave - why?
« on: November 14, 2021, 08:06:09 am »
Hi everyone,

I need a true sine inverter circuit, because of-the-shelf inverters do not fit my requirements. I need to be able to change the frequency, AC voltage and AC current for 3 phases (thus the test circuit below will be replicated 6 times).

So I have been looking around the Internet and found the following schematic:

1322813-0

The article stated that by varying the duty cycle of the PWM which drives the MOSFETs, the resulting waveform would approximate a sine wave. I tested the circuit on a breadboard, but replaced the BD139/140 transistors with a TC4427 MSOFET driver because I didn't have them on hand. I also did not have the same transformer, so just for this test I used a Triad F7-36, whose specs are 115VAC input, 36V/1.5A output. The arduino code which produces the complementary PWM signals is also attached (provided by the same article).

The resulting wave forms were captured by my scope as follows:

1322819-1

The yellow and blue traces are the complementary PWM signals, the purple trace is the output of the transformer. It does not look anything like a true sine. I should mention, that there is no load on the transformer just a 0.1uF 250V capacitor (the highest value I had on hand). I doubt that is the reason why the wave form looks the way it is. So is there something wrong with the circuit as show on the schematic? Is a half-bridge driven by variable duty cycle complementary PWM signals unable to produce a sine wave? Or is the transformer the wrong type?

I would appreciate any help! Thanks!

Here is the code (had to rename extension from cpp to c because cpp is apparently not acceptable)...
 

Offline Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 301
  • Country: br
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #1 on: November 14, 2021, 10:56:10 am »
Hi

Search youtube for the EGS002 board and you will get a lot of information. See also the datasheet below, of the IC EG8010 used in these boards. Do not use designs without negative feedback.

https://www.lz2gl.com/data/power-inverter-3kw/eg8010_datasheet_en.pdf

Was this your measurement without using a load?

 

Offline strawberry

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: lv
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #2 on: November 14, 2021, 12:08:23 pm »
1. 4.35V is marginal level to operate MOSFET out of linear region
2. your so called true sine wave inverter need to consider all transformer parasitics to calculate proper filter response
could try modified sine waveform(no PWM)
true sine inverter step-up to 150 or 300VDC then modulate 50Hz PWM then LC lowpass filter
 

Offline rvalente

  • Frequent Contributor
  • **
  • Posts: 831
  • Country: br
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #3 on: November 14, 2021, 12:28:28 pm »
Id highly recommend to use a proper dual mosfet driver like the ir4427, also id upgrade to low rds mosfets, the 44z are very old tech and you can have better performance
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3567
  • Country: au
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #4 on: November 14, 2021, 12:57:09 pm »
2. your so called true sine wave inverter need to consider all transformer parasitics to calculate proper filter response
Yep. That circuit will need a transformer with a certain amount of leakage reactance between primary and secondary if it is going to work properly. A toroid transformer would be unsuitable. An EI transformer, maybe even with the primary and secondary side by side on a segregated bobbin would be better. In the distant past I worked on a few standby UPSs that worked acceptably well like that.
 

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #5 on: November 14, 2021, 06:06:09 pm »
Quote
Search youtube for the EGS002 board and you will get a lot of information.

Thank you for the suggestion! I just ordered the EGS002 board but have not read the datasheet yet.
 

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #6 on: November 14, 2021, 06:39:56 pm »
1. 4.35V is marginal level to operate MOSFET out of linear region
Where do you get the 4.35V? If you look at my scope capture, the vertical division on channel 1 and 2 (yellow and blue), which is the PWM driving the MOSFET base, is 2 V - that makes the signal 11V. If you are going by the schematic alone, well I already said I modified it by replacing the BD139/4 driving transistors with a proper mosfet driver TC4427... If you refer to something else, I am sorry, but I don't understand.

2. your so called true sine wave inverter need to consider all transformer parasitics to calculate proper filter response
could try modified sine waveform(no PWM)
true sine inverter step-up to 150 or 300VDC then modulate 50Hz PWM then LC lowpass filter
Ok, I see I need more research...Were you maybe talking about this: https://web.wpi.edu/Pubs/E-project/Available/E-project-042507-092653/unrestricted/MQP_D_1_2.pdf?
 

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #7 on: November 14, 2021, 06:41:35 pm »
Id highly recommend to use a proper dual mosfet driver like the ir4427, also id upgrade to low rds mosfets, the 44z are very old tech and you can have better performance

IR4427 / TC4427... Potayto / Potahto... But thank you for the suggestion!  ;D
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2524
  • Country: ca
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #8 on: November 14, 2021, 08:38:29 pm »
With no load on the output, I'm not surprised you're seeing a weird output waveform.

Does your Rigol have an FFT mode?  If so, use it on the output waveform and I think you'll see a large 50 Hz (Did you want 50 Hz?) signal with lots of harmonics.  Is your breadboard circuit robust enough to tolerate a load?  If so, add a small load - maybe 1 or 2 watts and see what happens.  Do the harmonics drop more than the fundamental?  Does the end result look more like a sine wave?

It's also possible that the 2 uf capacitor is not just attenuating harmonics.  It could be intended to resonate with the inductance of the transformer.  If so, the value is critical and would have to change for a different transformer.  The original article should discuss that if it's an issue.

Ed
 
The following users thanked this post: ttodorov

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #9 on: November 14, 2021, 11:18:34 pm »
@edpalmer42

Thank you for the advice!

With no load on the output, I'm not surprised you're seeing a weird output waveform.

Does your Rigol have an FFT mode?  If so, use it on the output waveform and I think you'll see a large 50 Hz (Did you want 50 Hz?) signal with lots of harmonics.  Is your breadboard circuit robust enough to tolerate a load?  If so, add a small load - maybe 1 or 2 watts and see what happens.  Do the harmonics drop more than the fundamental?  Does the end result look more like a sine wave?

The only high-power resistor I have here is 1K 5% 5W piece. After I added it on the output, the Vrms fell down to 30V. According to my math this is a 900mW load - the best I can do for now. With that the waveform changed from a triangle-ish to more of a square-ish kind (see first attachment).

I tried using the FFT math function on my scope, but I do not know enough about it and am unsure if my settings are correct. But if they are even close, then this waveform has a lot of harmonics, maybe about 100 Hz apart from each other??? (second attachment)

Quote
It's also possible that the 2 uf capacitor is not just attenuating harmonics.  It could be intended to resonate with the inductance of the transformer.  If so, the value is critical and would have to change for a different transformer.  The original article should discuss that if it's an issue.

The article is here: https://circuitdigest.com/microcontroller-projects/pure-sine-wave-generator-using-arduino. It mentions the capacitor inasmuch as it providing filtering to the output. I did not read anything about the value being critical with relation to the transformer. But I ordered some 1uF 400V polypropylene caps to try out and see if different values make it better.
 

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #10 on: November 14, 2021, 11:31:39 pm »
I tried using the FFT math function on my scope, but I do not know enough about it and am unsure if my settings are correct. But if they are even close, then this waveform has a lot of harmonics, maybe about 100 Hz apart from each other??? (second attachment)

Yes, I played a bit with the scope settings and adjusted the scale. From the picture below, you can see the highest peak at 50Hz and then some other peaks at 150Hz, 250Hz, 350Hz, and so on...
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2524
  • Country: ca
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #11 on: November 15, 2021, 07:54:06 am »
Okay, so the capacitor is just filtering.  That's good because you don't have to match it to anything.

The FFT graph shows the expected results.  A square wave is the fundamental plus odd harmonics so 50 Hz, 150 Hz, 250 Hz, etc. makes perfect sense.  As the filtering gets better, the harmonics will be attenuated more and the output will look closer to a sine wave.

But now, look at the difference between the output waveform with no load and with your 1K load.  It's not a sine wave, but it looks better than the quasi-triangular wave.  Yes, it looks a bit square, but the sides aren't straight up and down, they're more sloped.  That tells you that the higher frequencies are being filtered out, as expected.  It will be more obvious if you change the timebase from 20 ms. to 5 or 10 ms.  The problem is that the filtering isn't aggressive enough.  That makes sense because you stated that your filter capacitor is only 0.1 uf rather than the 2 uf that's specified.  With only 5% of the necessary capacitance you can't expect to see a better waveform.  You need to get your hands on the right capacitor or parallel a bunch of capacitors before the waveform will look better.  Then it will look closer to a sine wave and the harmonics in the FFT will be attenuated more.

I see that the original article includes a warning that there is no feedback, regulation, protection, etc. in the circuit.  Are you sure that this circuit will do what you want?

Ed
 
The following users thanked this post: ttodorov

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #12 on: November 16, 2021, 04:18:07 am »
@edpalmer42

Thank you for the continued help - really appreciate it!

I see that the original article includes a warning that there is no feedback, regulation, protection, etc. in the circuit.  Are you sure that this circuit will do what you want?

I am aware of the missing feedback. This circuit is (intended to be) only to test if I can reliably produce a proper sine wave under PWM control with a microcontroller. If it is achievable, then I will replace the Arduino with an ARM Cortex-M MCU. Those can produce the desired PWM with complementary output and dead-time insertion, in order to prevent the high and low side of the half-bridge to conduct at the same time. There are such MCUs from ST and NXP, which also provide PWM break features to help implement over-current and over-voltage protection. There I will add the proper feedback and safety. This will be sorely needed, because the requirements are that all of frequency, voltage, and current be variable within a certain range.

Ultimately I need to produce a total of 6 sine outputs to simulate 3 phase voltage and current. It doesn't need to provide a lot of power, because it is not intended to supply power to any equipment. I will be using it as a test bed to verify the functionality of a 3 phase power quality metering device I am working on (firmware). There are already devices on the market which can provide test voltage and current, like this Relay Tester from Megger: https://us.megger.com/megger-multi-phase-relay-test-system-smrt410d-2. Problem is, those cost about 40k USD a pop and I really can't afford them... :'(
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3567
  • Country: au
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #13 on: November 16, 2021, 05:24:58 am »
@edpalmer42
Ultimately I need to produce a total of 6 sine outputs to simulate 3 phase voltage and current. It doesn't need to provide a lot of power, because it is not intended to supply power to any equipment.
What about a couple of class D audio amplifier modules, and depending on the output voltage needed, each feeding a step up transformer? I've used several of these to run a 3-phase induction motor to ridiculous speeds. Way more power capability than what you need, but they certainly work okay. Sound reasonable too, for that matter.

https://www.ebay.com.au/itm/185148710830?epid=912272086&hash=item2b1bb91fae:g:xTQAAOSwJZNhhgiP&amdata=enc%3AAQAGAAACUPYe5NmHp%252B2JMhMi7yxGiTJkPrKr5t53CooMSQt2orsS7UXID%252BRPOSNsnm8kYPghtM3sqb9%252F7akZqFQvqzRL4hk%252B8BXoaxPxv%252FocICTN06S001E84jVYo52dO5AYkKHdh%252FuSmE16VjQT4gWKoEWkK04GRb5VKUDMeEDD6ciRYXhKUsy%252FleptPwakinf2D%252BUaEeDiGpFZjYbcZakrVoBQa4ZPXNCz8XtePqhZ%252BrvgBOOJpf8wf2OpEYAIO1ajbGVSZs4LZbyjT9DE6HVD0amXF%252BsO8FQt3kS6itLseKLTmF9P4qc56vBzXJdN7nMVrnypMYvpxgPQ0seZURbIAE46sI%252B9tx8tcfR4TaXuppgmwcEjFQLkbKhQdaqyz6KIEWEwNEWRs%252BsGLFsC%252BBAKqcMj7OUSd21oY4SGGThIwPCrJfjuD0BJTEu3uEe9ngHMoSIP3bRKKdyxnrXfOOBTSUBUF%252Be80tg%252BLr%252Fyww6fdd7rp%252BAxmfOYTJ7UMBoE5xB8wm9NhTKjRQpztEpr3WP3rqL5NknFplqfzywu3umGm0yhiyVz8%252FvLVQhUXyrw6xf4c1PdRvV9BsVEoLSxk1sjlSVSxxTQBaK3us3v36U1XMekHroDRpb7RYFgcGUQo1A7m09kvX45Fo1x0WgpPkk8ys2738nngu4qg4nzQ%252Ftx78e0FInpvq8S%252FHxiRbTNE9jKRLrt4gazGjM%252Fjxspic%252BT%252FRk6niNgVC2x0ZBz2FFc%252F7YwLV%252BZlhgIHgZz5hR%252BJHj%252FquX5R%252BkxXc%252FYA87K%252FoGFDHSsqjA%253D%7Cclp%3A2334524%7Ctkp%3ABk9SR6jDkvOkXw
 
The following users thanked this post: ttodorov

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #14 on: November 16, 2021, 06:46:41 am »
What about a couple of class D audio amplifier modules, and depending on the output voltage needed, each feeding a step up transformer? I've used several of these to run a 3-phase induction motor to ridiculous speeds. Way more power capability than what you need, but they certainly work okay. Sound reasonable too, for that matter.

If I just wanted it as a 3 phase power supply, sure. But I need it as a test tool. That means that I need to be able to vary separately and together on each phase: the frequency from 40 Hz to 70 Hz; the voltage from 50 to 150 Vrms; the current from 0 to 5 Arms; voltage to voltage phase angle; current to voltage phase angle; at some further point in the future be able to inject harmonics; be able to produce spikes or dips on a timer.... the list goes on and on. I doubt very much that using audio amplifiers would let me shape the output to this extent.
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3567
  • Country: au
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #15 on: November 16, 2021, 07:02:18 am »
The idea is you still generate the desired waveforms with a micro and D/A, clean it up a little with a LPF and then send it to the amplifiers. The PWM to nice waveform conversion is done at low signal level with an opamp active filter, not passively at higher power levels. Much more flexibility to get the end result.
 
The following users thanked this post: ttodorov

Offline ttodorovTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #16 on: November 16, 2021, 08:14:16 am »
The idea is you still generate the desired waveforms with a micro and D/A, clean it up a little with a LPF and then send it to the amplifiers. The PWM to nice waveform conversion is done at low signal level with an opamp active filter, not passively at higher power levels. Much more flexibility to get the end result.

Ok, I think I see what you mean. Let's say I can produce 6 sine waves up to 0-3 Vpp form the micro and they would be already with the correct frequency and phase offsets to each other. I can then put it through some opamps to move it to +/- 1.5Vpp and then through the LPF. The amplifier will make this +/- 55Vpp, because it has "Voltage Magnification: 36 times" according to one of the pages when I searched for "IRS2092 500W mono amplifier". Does my understanding match your suggestion? Thx!
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3567
  • Country: au
Re: True sine inverter circuit - does not produce a sine wave - why?
« Reply #17 on: November 16, 2021, 09:35:42 am »
Yep, that's it.  :-+ Also, the gain of those particular amplifier modules is actually higher than quoted. There is a resistor R13 that needs to be changed from 100R to 3K.

https://www.diyaudio.com/forums/class-d/330201-fixing-preventing-fried-zobel-network-post5609033.html
« Last Edit: November 16, 2021, 09:58:03 am by Circlotron »
 
The following users thanked this post: ttodorov


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->