How to design a single phase inverter (5kW) - Page 1
Forum section: electronics / general

author: Faringdon
author_rank: Super Contributor
timestamp: October 02, 2021, 01:27:28 pm
content: Hi,Would you agree that a grid-tied single phase mains inverter (sinusoidal output) is an extremely simple bit of hardware to design?Lets face it, it connects to the grid voltage, so that essentially defines its output voltage.Surely all that is needed, is simply to have a DC bus which is higher in voltage than mains peak, and then you simply use sinusoidal PWM and an H bridge, to shovel an AC voltage out towards the grid?……there will obviously be an inductor between the inverter output and the grid wires…and that will limit the di/dt of the current going into the mains. Also, obviously current limiting would be needed.What is the most complicated part of it? Its difficult to see where the feedback loop is needed…..there is obviously no control over the output current….just output current limit…..because it’s the load seen by the grid which determines what current is pulled from the inverter?The bit of control that I can see, is that at any instant in time, the inverter’s output must be higher than the grid voltage, otherwise current wont be able to flow out of the inverter. (when I say “inverter’s output voltage, I mean the voltage on the non-grid side of the inverter’s output inductor.)

author: fourtytwo42
author_rank: Super Contributor
timestamp: October 02, 2021, 06:32:36 pm
content: Quote from: Faringdon on October 02, 2021, 01:27:28 pmFortunately for mankind a large amount of signal processing software is also required that I believe you have no capability to produce!

author: Gyro
author_rank: Super Contributor
timestamp: October 02, 2021, 08:02:06 pm
content: Presumably related to his recent solar 'stuff'.Coming to a house fire near you!

author: Faringdon
author_rank: Super Contributor
timestamp: October 02, 2021, 08:06:58 pm
content: Thanks, i can manage the "sinsoidal PWM bit" into the H bridge.With a good LCL filter between H bridge and mains, and i'm on the way to supplying current into the mains...(with a current limiter in there aswell).I mean, there isnt any control over the current drawn from it.......(other than simple limitation), because its the load that decides the current.So the only thing that would be the changing is the sinsoidal PWM pulses...ie narrowing them down over the entire 10ms half cycle...........i assume the pwm can be changed pulse to pulse, but all procedding pulses would have to change in line with that i assume.....so i guess thats where the signal processing comes into it?At the end of the day, i believe its simply a case of supplying current into the mains, from a sinusoidally PWM'd H bridge. I mean, its hard to see whats to go wrong...because the mains is a very "stiff" 50Hz voltage source......so its not as if i am going to distort it.....and as long as we have current limitation, then we arenet going to burn out the wiring.Woudl you agree?Also, its unusual, that there are no posts on any forum , anywhere, of anybody asking "How to design a grid tied inverter" . Why is this?

author: bdunham7
author_rank: Super Contributor
timestamp: October 02, 2021, 08:11:24 pm
content: Quote from: Faringdon on October 02, 2021, 01:27:28 pmI would not agree. I believe that the sections of your statement that I've highlighted in red are all incorrect. The last part about the inverter output being higher than the grid voltage is probably the wrong way of thinking about it, but I'll leave it for now.

author: bdunham7
author_rank: Super Contributor
timestamp: October 02, 2021, 08:19:29 pm
content: Quote from: Faringdon on October 02, 2021, 08:06:58 pmThis is your most fundamental and egregious error here. The 'load' is extremely low Z, you said yourself it was 'stiff'. The inverter has very limited energy available and is much higher impedance. How is the load going to 'decide' the current?QuoteMaybe search the patent office instead? Or buy an old inverter and take it apart?

author: David Hess
author_rank: Super Contributor
timestamp: October 02, 2021, 09:15:41 pm
content: Quote from: Faringdon on October 02, 2021, 01:27:28 pmThe grid impedance is actually very low so the grid-tie inverter has a high impedance current output instead of a low impedance voltage output. The output current is regulated to keep the line voltage within range.QuoteThe inverter has to synchronize with the line frequency and it output can either be higher or deliberately out of phase. Either will inject current into the line with the later acting like a reactive capacitive or inductive source.

author: Faringdon
author_rank: Super Contributor
timestamp: October 02, 2021, 10:25:33 pm
content: QuoteThanks,I was meaning that the load is connected to good old 50Hz AC...and it will draw what current waveform it draws...and it wont care if there are grid tied inverters connecting in.Eg, supposing that the grid tied inverters were all suddenly turned off..then a mains connected load isnt even going to know about it...it will still just draw what current waveform it usually draws from 50Hz mains. (60 Hz in US).The great thing about a grid tied inverter, is that it cant ruin the power factor of current drawn from the mains...because its the loads that decide the power factor.This is why there is so much "leeway" in grid tied inverter design.

author: bdunham7
author_rank: Super Contributor
timestamp: October 02, 2021, 11:20:16 pm
content: Quote from: Faringdon on October 02, 2021, 10:25:33 pmIt's true that if the grid-tie inverter power is small compared to the mains service (which you shouldn't necessarily take for granted) that the output of the inverter will have only a small effect on the mains--but the relevant issue isn't what some other loads draw from the mains, but rather what the mains are going to draw from the inverter. If the mains are low impedance, then they'll take whatever they're given, so the inverter has to regulate its current output to match the power that it has available to it on the DC side. It won't need to 'regulate' output voltage because the mains voltage will not be changed much by the inverter current.

author: David Hess
author_rank: Super Contributor
timestamp: October 03, 2021, 12:01:20 am
content: Quote from: Faringdon on October 02, 2021, 10:25:33 pmNothing prevents a grid-tie inverter from having any power factor that it wants. The highest performance ones take advantage of this to add more power into the line without exceeding the maximum voltage.

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 03, 2021, 03:51:23 am
content: Quote from: David Hess on October 03, 2021, 12:01:20 amIt's even possible to have a device that pulls power from the peaks and returns it off the peak, thereby lowering the peak voltage if it's on the high side.

author: Faringdon
author_rank: Super Contributor
timestamp: October 03, 2021, 06:26:42 pm
content: QuoteThanks, and i would tend to agree with this.Also, your statement does tend to suggest that as long as high frequencies are filtered out, then the GTI can put out any current that it wants.This tends to suggest that a simple GTI, using just a simple sinusoidally PWM'd H bridge, is a viable proposition.You just scale the sinusoidal PWM depending on the current thats getting drawn...so eg you shorten the pulses if the GTI is delivering more current than its rated for...So basically, if you think of the sinusoidal PWM being produced by a sawtooth waveform into a comparator. (the standard way) ..then to get shorter PWM widths, you just reduce the ref voltage into this comparator, ie, the sinusoidal reference... then all the pulses will be less in widthI think in UK/EU/USA, all GTIs in domestic properties are limited to 5kWh max of export to the grid anyway.

author: bdunham7
author_rank: Super Contributor
timestamp: October 03, 2021, 07:01:54 pm
content: Quote from: Faringdon on October 03, 2021, 06:26:42 pmNot here. It gets a bit trickier paperwork-wise if you go over 10kW capacity, but I export more than 5kW on a regular basis.

author: Phoenix
author_rank: Frequent Contributor
timestamp: October 04, 2021, 04:26:33 am
content: Quote from: Faringdon on October 02, 2021, 01:27:28 pmIt's just that simple? Damn, I wasted 4 years on a PhD researching aspects of current regulation for grid connected inverters! I feel like such a fool now.

author: Faringdon
author_rank: Super Contributor
timestamp: October 04, 2021, 06:21:17 am
content: Thanks, reference GTI's......they have no current control...they cant, because the current drawn from them depends on the loading of the phase........they have no voltage control...the voltage at their output is determined by the mains.The GTI's only have current and voltage limiting.The attached LTspice sim shows an open loop GTI doing a pretty good job with no control whatsoever......i admit that a little bit of extra control is needed to get that current sinusoid and in phase with the voltage...but as you can see.....the jobs almost done here, and thats open loop!This is why i say the GTI is nowhere near as difficult as its made out.

author: bdunham7
author_rank: Super Contributor
timestamp: October 04, 2021, 02:54:01 pm
content: Quote from: Faringdon on October 04, 2021, 06:21:17 amThat's not true. The inverter needs the capability of arbitrarily choosing exactly how much current to deliver at any point in time. "Loading" (of what?) should have nothing to do with it. How else can the inverter accomplish things like MPPT and PFC?

author: Siwastaja
author_rank: Super Contributor
timestamp: October 04, 2021, 06:39:56 pm
content: Add anti-islanding.Add all practical small details which make any "simple" project orders of magnitude larger than it seems on a lab table first.Most importantly, grid-tie solar inverters are finallycheap! So there will be dire competition.So your product needs to be* Cheap to produce* Yet reliable so you can give a long warranty, like the others* Highly efficient* Pass EMI* Offer reliable and safe anti-islanding. This is regulated like EMI, you need to pass.* Offer high end tested and verified MPPT algorithm which doesn't get stuck into local maximum (but not global maximum) under partial shading conditions like the "easy" prototype code does* and so on and so on.

author: Faringdon
author_rank: Super Contributor
timestamp: October 04, 2021, 07:19:04 pm
content: QuoteThanks, i see your point, though a power staion doesnt have to deliver a power factor corrected output, so why should a grid tied inverter?Though i would agree in that a grid tied inverter shouldnt provide current with high frequency harmonics in it.Post #9 above, is in agreemence that a grid tied inverter needn't have a PFC'd output.Also, as you know, the MPPT, could be carried out by a converter thats prior to the grid tied inverter...and just delivers, say, a 400VDC input to the grid tied inverter?And Actually i think im incorrect...the following is the very thorough GTI design guide that i got recomended 5 years back...so there is actually loads of GTI design guides readily available on the web....in fact, there's tons of GTI design guides out there...the TI one evens writes the control software for you..https://www.ti.com/lit/ug/tidub21d/tidub21d.pdf?ts=1633332343091&ref_url=https%253A%252F%252Fwww.google.com%252F

author: bdunham7
author_rank: Super Contributor
timestamp: October 04, 2021, 08:20:27 pm
content: Quote from: Faringdon on October 04, 2021, 07:19:04 pmWell, you need to consider the term 'Power Factor Corrected' as it applies to loads and generators.For loads, the definition is easy--the load is designed to draw current in phase with the voltage so as to have a PF as close to 1 as feasible. The 'corrected' implies that the load is inherently not a PF=1 load like a heating element, but rather something that without the 'correction' would have a poor power factor.For a generator or mains supply, the term is not really applicable--the generator has to supply whatever recirculating is current made necessary by the PF characteristics of the load. That is its lot in life, and the statement that it either does or doesn't "deliver a PFC output" has no meaning as far as I can tell. A generator--or the mains in general--supply a voltage and whatever current flows as a result is not something the generator can separately control. Power factor is characteristic of a load, not a generator.Which brings us to the grid-tied inverter, which is also a generator, so why would it have 'PFC' characteristics? Well, because they are now (in some cases) required to have exactly that. Since the GTI is just injecting current into the grid, it can do that with an arbitrary phase and amount. IOW, they assist the mains generation system by supplying some local recirculating current where needed. How this need is determined and how the inverters implement it is not going to to be a 'very simple' matter. And if the inverter(s) are expected to be able to operate in a separate 'islanded' mode, it will be even more interesting.

author: WattsThat
author_rank: Frequent Contributor
timestamp: October 04, 2021, 09:51:04 pm
content: Simple huh? It’s old news but you should ask ABB about that. It cost them almost a half billion dollars to get out from under just the warranty costs projected from the solar inverter business they bought. In the end, they pissed away $1.5B trying to play in the solar inverter space. The Chinese ate their lunch and dinner.That’s what happens when some overpaid idiot thinks they can buy market share by offering a 10 year warranty.https://www.reuters.com/article/us-abb-solar-divestiture/abb-pays-up-to-470-m-to-ditch-solar-converter-business-idUSKCN1U40E8

author: bdunham7
author_rank: Super Contributor
timestamp: October 04, 2021, 10:00:36 pm
content: Quote from: WattsThat on October 04, 2021, 09:51:04 pmEnphase has a 25-year warranty. Their high defect rate on the early models almost sank them, but they've been making reliable inverters for a decade now. The only catch is that all the parts of the system other than the inverters only have 1-5 year warranty, and those tend to be what breaks.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 06, 2021, 05:58:56 pm
content: Offering long warranty is exactly the right thing to do.People were/still are afraid of making PV investments because they fear the investments never pay back or they get significantly net negative due to panels and inverters failing early. There is no other way around this but to give a guarantee they work and keep working.Obviously, you can't just guarantee this to customers without your product actually backing this up, you also have to make sure the engineering is up to the task to avoid such catastrophe.

author: David Hess
author_rank: Super Contributor
timestamp: October 07, 2021, 03:58:28 am
content: Quote from: Faringdon on October 04, 2021, 07:19:04 pmAt least one manufacturer makes grid-tie inverters which take advantage of altering their power factor to pump more power into the grid then they would otherwise be able to because of voltage limitations. So in effect they "pull" the grid frequency slightly higher.They wrote an article discussing it in connection with the regulatory requirements but after all this time I was not able to find it.

author: Circlotron
author_rank: Super Contributor
timestamp: October 07, 2021, 04:29:43 am
content: Quote from: bdunham7 on October 04, 2021, 10:00:36 pmThat's the exact opposite of my LG front loading washing machine. The motor has a 10 year guarantee but not the inverter that drives it. You can guess which is likely to conk out first.

author: EPAIII
author_rank: Super Contributor
timestamp: October 10, 2021, 03:00:57 am
content: They "'pull' the grid frequency slightly higher." Really?That, if not corrected by a later period of lower frequency, would make millions of electric clocks run fast and be out of time. The power grid, in the US at least, is kept to the value of 60 Hz over the long term VERY PRECISELY. The generating stations use the time signals from the National Institute of Standards (NIST) which are, in turn, kept by atomic clocks. This is done exactly so that all those inexpensive, power line based electric clocks will have the correct time over long periods (days, weeks, months, etc.) with no need to re-set them.I rather doubt that the electrical utilities, who are responsible for maintaining this time relationship, would permit anything more than a very short period where the grid frequency is forced to even a slightly higher value. Perhaps things work differently in an emergency, as in after a hurricane, but not on a day-to-day basis. No, any inverter or any other device that feeds power into the grid must follow the grid's frequency very closely. And these devices will not pull the grid, the grid will pull them.And please notice that I said "long term". At any given time of day the grid's frequency and the electric clocks that use it may be off by a few seconds. This is always made up as soon as possible by running those generators at a faster or slower speed to correct the time on those clocks on a long term basis. Excellent long term accuracy but very poor short term. Even the simplest crystal oscillator with no temperature control will have much better short term accuracy.I don't know, but I would suspect that Europe and other areas of the world would do something similar except their cheap, electric, grid dependent clocks have a gear which has a multiple of five teeth instead of six. Or a chip that does the same thing.Quote from: David Hess on October 07, 2021, 03:58:28 am

author: Faringdon
author_rank: Super Contributor
timestamp: October 10, 2021, 04:38:17 pm
content: I am wondering, if a grid tied inverter was to produce a sinusoidal current in phase with the mains voltage, and push that into the mains, then as long as the mains voltage did not get raised outside of 230+/-10%, then no-one would be able to complain about this?...not even the regulatory bodies?

author: David Hess
author_rank: Super Contributor
timestamp: October 11, 2021, 12:24:52 am
content: The regulations for grid-tie inverters specify voltage, phase, frequency, and power factor limits. By combining them, the inverter can drive more power into the grid without exceeding the maximum voltage.

author: Faringdon
author_rank: Super Contributor
timestamp: October 11, 2021, 05:01:50 am
content: QuoteThanks, from what you say, it seems to me that there is a bit of leeway in the requirements for GTI...so i reckon a sinusoidal current source...being pumped into the mains, would be ok?The voltage generally, will be set by the mains itself, so too the frequency.....and as you suggest, power factor does not have to be unity......many deliberately wangle the output current to pump more current into the mains.So that engineer who can design a sinusoidal current source, in phase with the mains, is a long way toward designing a GTI, i believe?On page 11 of this, its seen that a sinusoidal current source is being designed for the GTI...https://www.ti.com/lit/ug/tiduay6e/tiduay6e.pdf?ts=1633885097383

author: Phoenix
author_rank: Frequent Contributor
timestamp: October 11, 2021, 11:04:55 am
content: Quote from: Faringdon on October 11, 2021, 05:01:50 amThe requirements for GTI are quite strict. In fact they keep getting tighter as more renewables and batteries are installed and grid authorities learn more about them.The first step in a very complex controller design is the sinusoidal current regulation. Then you build and build on that until you meet the standards and meet the application.

author: Circlotron
author_rank: Super Contributor
timestamp: October 11, 2021, 12:05:46 pm
content: Quote from: Phoenix on October 11, 2021, 11:04:55 amSeeing the mains voltage waveform is a bit flat topped in many locations, which would be the correct thing for the inverter to do? Feed a perfect sinusoidal current into the mains, or a current waveshape that exactly matches the distorted voltage waveshape?

author: David Hess
author_rank: Super Contributor
timestamp: October 11, 2021, 04:00:09 pm
content: Quote from: Circlotron on October 11, 2021, 12:05:46 pmOr should it try to correct the mains waveform by injecting a current based on the difference between an ideal sine wave and the distorted mains?

author: Phoenix
author_rank: Frequent Contributor
timestamp: October 12, 2021, 12:40:07 am
content: Quote from: Circlotron on October 11, 2021, 12:05:46 pmThe "correct" thing is to obey the standards. I am most familiar with AS/NZS 4777.2 which has a current THD and harmonics requirement - but this test is performed with a low distortion grid simulator (with defined harmonic limits also). The other countries will have similar requirements.What happens under a more distorted grid - well that's undefined.I tend to let the inverter have whatever it's normal disturbance rejection is and distort the current. Disturbance rejection is really a function of the filter inductance and switching frequency/sampling rate. But you could clean up certain harmonics with cascaded resonant controllers (like in that TI document) quite easily.

author: Faringdon
author_rank: Super Contributor
timestamp: October 16, 2021, 01:49:42 pm
content: QuoteThanks, the sinusoidal current regulation is done in the atatched schematic.I must confess this method doesnt need much software...just enough software to get the sinusoidalreference...which needs to be variable in amplitude, as you know....So is this OK to take forward towards a Grid Tied inverter design?LTspice sim and pdf schem attached.

author: Phoenix
author_rank: Frequent Contributor
timestamp: October 17, 2021, 04:04:47 am
content: Quote from: Faringdon on October 16, 2021, 01:49:42 pmNot a chance. You might've be able to push power into the grid in an ugly fashion using this but you will never meet any performance or standards requirements.Do you even know the grid connect inverter requirements?

author: Faringdon
author_rank: Super Contributor
timestamp: October 17, 2021, 11:06:46 am
content: Thanks, yes i would agree its not a "completed" grid tie inverter, and not by any means....my apologies if i misled into thinking that it was.But why isnt it possible to take this forward towards being a grid tied inverter?Its putting a sinusoidal current into a stiff mains source....isnt that a good starting point?QuoteThanks, yes, the completed product has to be able to synchronize to the mains, have OV, OC protection.Not power mains when mains is off.Not put too many harmonics into mains.Sinusoidal current injected should have good power factor. (excepting the "special situations" said elsewhere in this post).Not put power into mains when mains is outside 230V +/-10%

author: Phoenix
author_rank: Frequent Contributor
timestamp: October 17, 2021, 10:22:16 pm
content: Quote from: Faringdon on October 17, 2021, 11:06:46 amNot all current regulators and PWM schemes are equal. The one you have simulated won't meet performance requirements such as power factor and harmonics. There is a reason people use microcontrollers for this. It looks more like something you'd see on a rectifier (which usually have requirements of just a basic load).QuoteWhich country or region is this for? The specs are not accurate for US or EU or Australia (likely everywhere else too). It's far more complicated!