Hi Brian
Yes, typically a microcontroller is used for control. Assuming a) a fair to good quality control scheme and b) a fairly normal power electronics design, the basic concept to drive power from an inverter into an existing grid looks like this:
- Line voltage is measured
- Software PLL locks onto line voltage fundamental (50 / 60 Hz) and strips off harmonics, noise etc. It gives a continuous output of the line phase angle theta and (with some filtering) the average line voltage magnitude V_AC.
- A power reference P* comes in from somewhere (e.g. from solar MPPT control software)
- The average reference 'Direct axis' current ID* is calculated by ID* = P* / V_AC. This is a DC quantity.
- The desired instantaneous current i* is generated using i* = ID* * cos(theta). This is an AC quantity.
- A suitable current controller is used to adjust the PWM duty cycle such that the line current tracks the reference current. Note: as this is an AC quantity, a standard PI controller isn't really suitable. There are several options but they're quite technical.
This scheme doesn't try to control the line voltage - it just pushes some current into the grid. The grid still controls the line voltage.
It is generally possible to play with the reference current to provide extra features. For example, injecting reactive power can be added with the following modifications:
- A reactive power reference Q* comes in from somewhere
- The average reference 'Quadrature axis' current IQ* is calculated by IQ* = Q* / V_AC. This is a DC quantity.
- The desired instantaneous current i* is generated using i* = ID* * cos(theta) + ID* * sin(theta). This is an AC quantity and contains multiple components.
The downsides of this are: a) you have extra RMS current, and hence extra losses, and therefore don't make as much money selling power; and b) some inverter circuits aren't capable of it (or have special restrictions).
It is also possible to generate even more interesting current reference schemes, and indeed to provide 'tidy up' current to compensate for the behaviour of other devices. A classic example is to tidy up harmonic currents from large thyristor drives (there are plenty still in service!). There are again some downsides: a) extra RMS current again; and b) to get the best results you need high control speeds, which changes the power electronics requirements a bit and can decrease efficiency.
Note: I glossed over a lot with the 'suitable current controller', and indeed the whole bit of generating
i* as an AC quantity. There are a lot of options, so I chose to present one which is conceptually simple. If you want to get more into it, I can recommend:
- Looking at the design notes from Texas Instruments grid connected inverter reference designs.
- A book: Buso and Mattavelli, Digital Control in Power Electronics, Morgan and Claypool, 2006. (Note: more recent editions may be available.)