# Inverter Voltage Control - Stability Concerns

I have a voltage inverter that converts a 400VDC source into sine wave of 240VAC @ 50Hz. The inverter is based on a H-Bridge. The inverter works well but I'm struggling in understand how to control the output voltage incase the output rises or falls above the desired value (240VAC). The MCU driving the H-Bridge reads the output voltage via a step down transformer.

Will Proportional Control only work or do I need to implement PI? I was considering implementing something as follows: if actual voltage is less than desired voltage, increase duty cycle by 5%. Keep increasing the duty cycle by 5% till the output gets to 240VAC.

If the output voltage is higher than 240VAC, we decrease the duty cycle by 5% per iteration till we get to the desired output.

Is such a scheme likely to make the system unstable? Is there a better way to do this?

• How do you generate a sinusoidal reference for PWM? Is it just a fixed sin reference e.g. a lookup table or d = sin(ωt)? – Szymon Bęczkowski May 19 '14 at 17:50
• It's a lookup table. – Saad May 19 '14 at 18:23

In answer to your second question (which is the easiest), your 5% scheme produces a system which is almost guaranteed to display a certain degree of instability. Let's say that (just as an example) a duty cycle of 50% gives a slightly low output, and 52.5% (1.05 times 50) gives a slightly high output. Then the system will "hunt", shifting back and forth between the two duty cycles. This is a classic problem with feedback systems with quantized outputs. The solution is also classic - establish a "dead zone" in which small errors around the desired output are ignored. Generally the dead zone must be equal or greater than twice the output quantization; in your example, +/- 5%.

The first question is a little harder, since it depends on how much error you can tolerate. A proportional controller provides an error proportional to the inverse of the feedback gain - the higher the gain, the less the error. In principle this error can be made arbitrarily small by increasing the gain. However, since there is always delay around such a loop (in this case the obvious one being the rectification and filtering of the output of the feedback transformer, but the filtering required to remove harmonics from the bridge output also counts), at some point increasing gain will cause the loop to become grossly unstable. If this limit is reached while the error is too large, more sophisticated measures are called for. This is also a classic problem, and you are aware of the classic solution - a PID controller. As to whether or not you need this solution - well, that's up to you. There's no way anybody can tell without a detailed system analysis.

I'm going to suggest you look at things slightly differently...

To avoid instabilities due to negative feedback as much as possible I'd reason that the 400V dc power supply would keep the sine output largely at the optimum level and, if this dc level dropped, I could conclude that my output sine voltage had dropped the same amount. In other words use feed-forward to help as much as possible then see how it performs.

So if the 400V dropped 5%, then increase the PWM by 5% to compensate. If you can control more accurately than 5% (and do it continually) I'd consider doing just that. This halves your potential feedback problem.

If you are not happy that the 400V dc "largely" reflects the output amplitude, then are you running too close to the limit with the H bridge mosfets?

• Can you describe what you mean by feed-forward? This method sounds very simple and reasonable! – Saad May 19 '14 at 18:52
• In a H bridge with FETs whose on resistance is really low, any output loading effects will only reduce the AC voltage because the 400V dc voltage is being caused to droop so, use the 400 V dc as your measuring stick and try and accommodate the droops in the 400V dc by applying more duty cycle to the MOSFETs. en.wikipedia.org/wiki/Feed_forward_(control). Ideally if you could hold the 400V dc constant I bet loading effects on the AC would be significantly less. – Andy aka May 19 '14 at 19:29
• @Andyaka - this is an extremely dangerous approach unless you can guarantee that the 400V level is extremely stable under constant load. This may or may not be true; for instance, if there are any other variable loads on the 400 volt line, the level will vary. Counting on high stability in a DC power source is never a good idea. – WhatRoughBeast May 19 '14 at 22:20
• @WhatRoughBeast that sounds a tad over cautious dude. I would fully expect the 400V dc level to droop under load conditions and if it didn't then there would be no issue. If there are other things connected to the 400V dc and these are comparable in scale to the main load then this of course rules it out but can you think of any circuit that might be sat on the 400 V that is comparable to the main power output of the inverter? – Andy aka May 20 '14 at 7:19

You are basically proposing a hysteresis controller. It works but it will oscillate around its set point.

A P controller will always introduce steady-state error. PI controller is P controller without the steady-state error. If this PI controller is fast enough and if you measure voltage with each switching cycle you can make your converter react to any transients caused by switching in a big load. However, you will need a rotating reference frame to get rid of any steady-state error.