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.

Voltage feed back control loop

Status
Not open for further replies.

kathmandu

Full Member level 5
Joined
Dec 7, 2015
Messages
298
Helped
7
Reputation
14
Reaction score
7
Trophy points
18
Activity points
3,146
Hello,

I'm trying to implement a reliable feed back control loop for the output voltage of a sine wave inverter.

The inverter has a Mosfet full-bridge driven by some PMW signals generated by an MCU.

I have defined an extended look-up table to set the output voltage (from 33% to 97% of the maximum amplitude in steps of 0.5%). Thus I have a bidimensional array with 129 rows (the above mentioned attenuation) and 100 cols (samples per half wave).

I'm reading the output voltage using the MCU built-in 12 bit ADC.

First scenario: I have defined two thresholds (Vmin=224 and Vmax=226). Every time I check the output voltage, if its value is outside this range I increment/decrement the array index to increase/decrease the output voltage.

Second scenario: I have only defined a single threshold (Vout=225) and every time I check the output voltage, I increment/decrement the array index if the value I'm reading is smaller/larger than that fixed threshold.

The problem is I don't get a fast response (thus I got a poor voltage regulation) no matter what scenario I've used.

I want to avoid intensive computing hence I have defined that large(?) array. Maybe I need even smaller steps (0.25%)?

For now, a single step means +/-0.5% x 225 Vrms = 1.125 Vrms. The output voltage seems to stay in range but it fluctuates very quick (I'm using a halogen lamp for testing and it's flickering quite annoying).

Could anyone suggest any fix?
 

This may or may not be real-life behavior, but in simulations I have seen a few cycles need to go by after I change some parameter, which causes output voltage to go up and down a few times.

Therefore it's not always useful to start applying feedback again right away after a change. Allow settling time or else the feedback can produce oscillating behavior, and increasingly large voltage swings.
 

Its a very difficult thing to do, and some loads such as incandescent lights flicker badly from even small voltage fluctuations when (say) the starting load of a refrigerator or air conditioner suddenly kicks in.

The brute force method seems to be the most satisfactory. Use a fixed sinewave lookup table, and regulate the incoming dc bus to the PWM stage independently.

With some massive capacitors on the dc bus, it should provide some spectacular surge current capability for motor starting. Its then much easier to regulate the dc bus with a pretty fast analog control loop to keep the dc voltage constant.

Combined with a very fast current limit, it should provide a much stiffer power source with greater tolerance to step load changes.
 

Use a fixed sinewave lookup table, and regulate the incoming dc bus to the PWM stage independently.

Its then much easier to regulate the dc bus with a pretty fast analog control loop to keep the dc voltage constant.

Are you suggesting a PFC circuit between the battery bank and the inverter? Even if I'm using a fixed sine wave look-up table and a regulated DC voltage, the output will still swing due to variable load current (core & conductor losses).

Beside, I didn't see any commercial product having such an input circuit (for this inverter topology). There must be some tweaking of the feedeback algorithm.

This may or may not be real-life behavior, but in simulations I have seen a few cycles need to go by after I change some parameter, which causes output voltage to go up and down a few times.

Therefore it's not always useful to start applying feedback again right away after a change. Allow settling time or else the feedback can produce oscillating behavior, and increasingly large voltage swings.

I was looking for a faster response to compensate all those core losses and such. I'll try a running average algorithm then.

Thank you both for your quick support.
 

What I am suggesting is making the inverter a two step process.
The first stage is used to dynamically regulate the dc bus.
That can be corrected very fast, and in very fine increments, and also include the current limit circuit.

The second stage PWMs that into a sinewave, and it can jut plod along doing that using a single lookup table with very little software overhead, and no need for clever software or extreme speed.

Not saying its the only solution, but it is a very simple fool proof hardware based system that works.

How fast do you want it ?
A 100 Khz hysteric buck regulator can go from zero load to max load in one switching cycle (10uS) and back again to no load in the next switching cycle, and still maintain the output at the nominal regulated voltage.
 

If you operate your inverter with constant load, there won't be any flicker. So apparently you are creating a problem with your approach rather than solving it.

First step to understand the system behavior would be to run a control characteristic without feedback to verify that the duty cycle variation is working correctly. Secondly verify that your output voltage measurement is accurate and stable enough. Finally implement a suitable control algorithm. It would be rather a PID-like or deadbeat compensating controller than an up/down ramp algorithm.
 
You're right, it's much easier to regulate a DC voltage but it comes at a cost of an extra circuit (and losses).

For a rated power of +1000 kW you need a mighty buck converter (synchronous at best).

Anyway, I have a pretty large battery bank thus I doubt I actually need something to regulate its output. A bunch of capacitors could help, indeed.

For now, I'm using a 20 uF polypropylene film capacitor just across the Mosfets and few 4700 uF ones in parallel ten inches apart.

The lead acid batteries lacks of voltage stabilisation in the case of high frequency load currents hence those PP (high pulse) capacitors are much more important than the aluminium ones.
 

True, but most of us typically have refrigeration and air conditioning cycling on and off.
Yes. I didn't suggest to omit voltage control, just to evaluate the inverter behavior systematically.

There's nothing against implementing the voltage control only in the inverter stage. That's what any industry standard VFD does. You can even go to a certain degree of over-modulation if the bus voltage drops. As far as I understand, the topology of interest is a single stage inverter with low voltage input also discussed in parallel threads. In this case, there's no reasonable way to implement separate voltage control.
 

First step to understand the system behavior would be to run a control characteristic without feedback to verify that the duty cycle variation is working correctly.

The duty cycle variation is working good (the voltage is kept in range for a battery level of 23 VDC to 30 VDC and when load changes) but the output it's not stable (is fluctuating around the setpoint).

Secondly verify that your output voltage measurement is accurate and stable enough.

That's the real problem. I don't know what time constant to choose for the RC low-pass filter (after the rectifier).

Finally implement a suitable control algorithm. It would be rather a PID-like or deadbeat compensating controller than an up/down ramp algorithm.

I'll read about those algorithms (PID or deadbeat compensation - never heard about it). Thank you very much for your time.
 

The basic measurement problem is sampling being asynchronous to output voltage period. Integrating (averaging) the samples over a full or at least half cycle is suggested. Addition low pass filtering to suppress pwm frequent residuals.

Dead beat is a digital controller algorithm that ideally cancels a perturbation (e.g. a load step) completely after e.g. two discrete time steps. In many cases, a PID controller achieves similar quality. As a disadvantage, the control process gain must be well known. https://en.wikipedia.org/wiki/Dead-beat_control
 

The basic measurement problem is sampling being asynchronous to output voltage period. Integrating (averaging) the samples over a full or at least half cycle is suggested. Addition low pass filtering to suppress pwm frequent residuals.

I check the output voltage at every half wave peak. The ADC is continuosly reading the voltage and it's averaging the last 32 readings (though one reading takes ~ 1 us thus I only got last 32 us average reading) but I actually check the ADC every 10 ms.

Maybe I should try to read the voltage few more times during a half wave (I was trying to not overload the MCU).

Moreover, to not introduce an asymetry (leading to a DC bias current through transformer) I only change the attenuation (a different look-up table row) at every zero crossing point of the positive half wave. This way, I keep a symetrical full wave output voltage.

Dead beat is a digital controller algorithm that ideally cancels a perturbation (e.g. a load step) completely after e.g. two discrete time steps.

I've tried not to average the readings too much as to get a faster reaction on load (voltage) change. I'll try to play with the control algorithm for a better result.

Seems like I have some problems with the output LC filter thus I've got some higer frequencies disturbing the output voltage sample.
 

I have defined an extended look-up table to set the output voltage (from 33% to 97% of the maximum amplitude in steps of 0.5%). Thus I have a bidimensional array with 129 rows (the above mentioned attenuation) and 100 cols (samples per half wave).

I have tried this approach by using 60% to 97.5% duty cycle with a variation of 2.5% in each step. The result is quite satisfactory. Output is varied within a range of 5-6 volts. But it is not flickering. When the load is varied causing the output vary beyond 5-6 volts, the output frisks a bit only. I have been using the inverter for couple of months.

Finally implement a suitable control algorithm. It would be rather a PID-like or deadbeat compensating controller than an up/down ramp algorithm.

I have come across the term PID. I have no conception about it. Please provide some hint how to implement PID for this type of control on duty cycle.
 

Output is varied within a range of 5-6 volts. But it is not flickering. When the load is varied causing the output vary beyond 5-6 volts, the output frisks a bit only.

My current algorithm is trying to adjust the output on a cycle-by-cycle basis. The output is actually bouncing +/- 1 V (fixed step) around the setpoint.

I have another idea though: I'll try to read the battery bank voltage (which is very steady) and I'll change the PWM attenuation factor according to battery voltage level.

I will read the output voltage too (to ensure the voltage is in range) but I'll take into account the DC voltage first.

Might be a feasible solution?
 

There are really two separate problems here.
The first is overall output voltage regulation which mainly has to do with slow long term changes in battery voltage.
The dc input voltage range to cover can be quite wide, but exact precise output voltage control is usually not a requirement. After all, the grid voltage wanders up and down by several volts throughout the day without any ill effects.

Correction for battery voltage can be quite slow, as with changing the output voltage on a VFD. It can creep up and down with small incremental changes an give excellent results. Simple ramping (with some slight hunting) will work fine, for this.

By far the bigger problem will be very large step changes in load causing sudden voltage sags and surges, causing really annoying light flicker.
There is no real solution to that with only one main inverter, but running the lights off a second smaller inverter (for totally off grid) may be worth a try.

What helps is a lower source impedance, as nothing will ever be fast enough to totally correct for a really large instantaneous step load change.
 
Please, post the code I am also interested about " Voltage feed back control loop" of sine inverter.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top