# Patent

## Title
Distributed power generation interface

## Abstract

Described herein are methods, systems, and apparatus for a controller for a power circuit that interfaces distributed power generation with a power distribution grid, comprising: a first portion, including a maximum power point tracker, that receives signals corresponding to the distributed power generation voltage and current, and outputs to the power circuit a signal for controlling the voltage of the distributed power generation; a second portion, including a current reference generator, a current controller, and a dc voltage controller, that receives signals corresponding to a dc voltage of the power circuit, the power distribution grid voltage and current, and the inverter current, and outputs signals for controlling the power circuit output voltage; wherein the current reference generator includes nonlinear circuit elements and generates a current reference signal from the dc voltage of the power circuit and the grid voltage and current; such that substantially harmonic-free power is injected into the power distribution grid. The distributed power generation may be, for example, a photovoltaic module or a wind turbine.

## Background
RELATED APPLICATIONS
This application claims the benefit of the filing date of U.S. Provisional Patent Application No. 61/243,807, filed Sep. 18, 2009, the contents of which are incorporated herein by reference in their entirety.


FIELD OF THE INVENTION
This invention relates to circuits, systems, and methods for interfacing distributed electrical power generation, such as wind turbines and photovoltaic cells and modules, with a power distribution grid.
BACKGROUND
Distributed power generation, such as used with wind turbines and photovoltaic (PV) cells or modules, is becoming an important renewable energy resource. Such power generation may be connected to the power distribution grid in various configurations of three basic elements, namely inverters, output filters, and controls. All approaches have advantages and disadvantages and compromise various attributes such as harmonic and noise rejection capability, simplicity, efficiency, flexibility, reliability, safety, modularity, and cost.
SUMMARY
Described herein is a controller for a power circuit that interfaces distributed power generation with a power distribution grid, comprising: a first portion, including a maximum power point tracker, that receives signals corresponding to the distributed power generation voltage and current, and outputs to the power circuit a signal for controlling the voltage of the distributed power generation; a second portion, including a current reference generator, a current controller, and a dc voltage controller, that receives signals corresponding to a dc voltage of the power circuit and the power distribution grid voltage and current and the inverter current, and outputs signals for controlling and/or changing the power circuit output voltage; wherein the current reference generator includes nonlinear circuit elements and generates a current reference signal from the dc voltage of the power circuit and the grid voltage and/or current; such that substantially harmonic-free power is injected into the power distribution grid. In one embodiment, the current reference generator generates a current reference signal from the dc voltage of the power circuit and the grid voltage.
In one embodiment, the current reference generator: (i) includes an instantaneous power calculator that generates an instantaneous power reference signal, and (ii) generates the current reference signal from the instantaneous power reference signal and the grid voltage and current using nonlinear circuit elements.
The controller may include an enhanced phase locked loop (EPLL). The EPLL may provide a phase angle of the grid voltage which is used to generate the instantaneous power reference signal.
In one embodiment, the instantaneous power calculator may calculate the instantaneous power from real and reactive power commands. The real and reactive power commands may be set externally. The real power command may be generated by an internal PI controller operating on dc-link voltage error or on dc link energy error. The reactive power command may be generated by an internal PI controller operating on voltage magnitude error.
In one embodiment, the current reference generator comprises a capacitor energy calculator, a notch filter, and at least one PI controller, and may further include an EPLL. The EPLL may generate parallel and orthogonal signals corresponding to the grid voltage. The notch filter may operate at double frequency.
In one embodiment, a first PI controller operates on an error between (i) a reference energy signal and (ii) an actual energy signal corresponding to the dc voltage of the power circuit, and multiplies a PI output with the parallel signal from the EPLL to generate a real current component of the current reference signal.
In one embodiment, a second PI controller operates on an error between (i) a reference reactive power signal and (ii) an actual reactive power signal corresponding to the output power of the power circuit, and multiplies a PI output with the orthogonal signal from the EPLL to generate a reactive component of the current reference signal.
The current controller may include a semi-state feedback control structure combined with a resonant-type output feedback portion. The current controller may include a semi-state feedback control structure combined with a resonant-type output feedback portion and a feed forward portion operating on the grid voltage in order to achieve soft-start operation. The current controller may include a semi-state feedback combined with one or more resonant-type output feedback portions, wherein each resonant-type output feedback portion may correspond to a harmonic of the grid voltage. The current controller may include a semi-state feedback control structure combined with a resonant-type output feedback portion and a soft-start feed forward controller.
The current controller may include a semi-state feedback control structure combined with a resonant-type output feedback portion and an integrating controller operating on the grid current signal to remove a dc component from the injected current. The current controller may include a semi-state feedback control structure combined with a resonant-type output feedback portion and one or more resonant-type controllers operating on the grid current signal to remove selected harmonics from injected current and reject those harmonics that may come from a reference current signal. The current controller may include a semi-state feedback control structure combined with a resonant-type output feedback portion and a wide band harmonic controller in parallel or in series with the resonant-type controller to suppress all harmonics within a wide range of frequencies. The current controller may include a semi-state feedback control structure combined with a resonant-type output feedback portion and a wide band feed forward harmonic compensator operating on the grid voltage to suppress all harmonics within a wide range of frequencies. The current controller may include a semi-state feedback control structure combined with a resonant-type output feedback portion and any combination of the aforementioned control and compensation structures.
The current controller may include one or more resonant-type harmonic controllers acting on grid current. The current controller may include an integrating controller acting on grid current. The current controller may include a wide band harmonic controller in parallel with the resonant-type controller or in series with the resonant-type controller. The wide band harmonic controller may have a proportional, proportional-derivative, lead, or lead-lag configuration. The current controller may include a wide band feed forward harmonic compensator acting on the grid voltage signal. The wide band feed forward harmonic compensator may have a proportional, proportional-derivative, lead, or lead-lag configuration. The current controller may include portions of any of the above controllers, alone or in combination.
Also described herein is a micro-inverter system for interfacing distributed power generation with a power distribution grid, comprising a controller as described herein and a power circuit including an inverter.
In one embodiment, the current controller controls flow of substantially harmonic-free power through an output filter of the power circuit. The filter may be an inductor. The filter may include a combination of inductive and capacitive elements. The filter may be an LCL.
Also described herein is a PV module including a micro-inverter system as described herein.
Also described herein is a method for controlling a power circuit that interfaces distributed power generation with a power distribution grid, comprising: controlling a voltage of the distributed power generation using signals corresponding to the distributed power generation voltage and current; generating a current reference signal and controlling the power circuit output voltage using signals corresponding to (i) a dc voltage of the power circuit and (ii) the power distribution grid voltage and current; wherein generating the current reference signal includes using a current reference generator with nonlinear circuit elements; such that substantially harmonic-free power is injected into the power distribution grid. Generating a current reference signal and controlling the power circuit output voltage may include using signals corresponding to (i) a dc voltage of the power circuit and (ii) the power distribution grid voltage and current and the inverter current.
The power circuit output voltage may be controlled by controlling an inverter of the power circuit. The inverter may be a current source inverter or a voltage source inverter.
In one embodiment, the method may include generating an instantaneous power reference signal, and generating the current reference signal from the instantaneous power reference signal and the grid voltage and current using nonlinear circuit elements. The method may include using a phase angle of the grid voltage to generate the instantaneous power reference signal.
In one embodiment, the method includes using a phase locked loop or an EPLL to provide the phase angle of the grid voltage.
The method may include calculating the instantaneous power from real and reactive power commands. The method may include setting the real and reactive power commands externally. The method may include generating the real power command by an internal PI controller operating on a dc-link voltage error. The method may include generating the reactive power command by an internal PI controller operating on a voltage magnitude error.
In another embodiment, the method may include generating parallel and orthogonal signals corresponding to the grid voltage. The method may include generating a real current component of the current reference signal from an error between a reference energy signal and an actual energy signal corresponding to the dc voltage of the power circuit, multiplied with the parallel signal. The method may include generating a reactive component of the current reference signal from an error between a reference reactive power signal and an actual reactive power signal corresponding to the output power of the power circuit, multiplied with the orthogonal signal. The method may include using an EPLL to generate the parallel and orthogonal signals corresponding to the grid voltage.
In another embodiment, the method may include using a semi-state feedback control structure combined with a resonant-type output feedback portion in the current controller, or using a semi-state feedback control structure combined with two or more resonant-type output feedback portions in the current controller. Each resonant-type output feedback portion may correspond to a harmonic of the grid voltage. The method may further include using a feed forward soft start controller. The method may include using one or more resonant-type controllers acting on the grid current. The method may include using an integrating controller acting on the grid current. The may include using a wide band harmonic controller in parallel with the resonant controller. The method may include using a wide band harmonic controller in series with the resonant controller. The wide band harmonic controller may have a proportional, proportional-derivative, lead, or lead-lag configuration. The method may include using a wide band feed forward harmonic compensator acting on the grid voltage. The wide band feed forward harmonic compensator may have a proportional, proportional-derivative, lead, or lead-lag configuration.
In the aspects, embodiments, and methods described herein, the distributed power generation may include at least one PV module, or at least one wind turbine, or a combination thereof, and the inverter may be a current source inverter or a voltage source inverter.



BRIEF DESCRIPTION OF THE DRAWINGS
For a better understanding of the invention, and to show more clearly how it may be carried into effect, embodiments will now be described, by way of example, with reference to the accompanying drawings, wherein:
FIG. 1 shows a block diagram of a micro-inverter system applied to a PV module, according to an embodiment.
FIG. 2 shows a block diagram of the microinverter and a current reference generator of a controller section of a micro-inverter system such as that shown in FIG. 1, according to an embodiment.
FIG. 3 shows a block diagram of the microinverter and a controller section of a micro-inverter system such as that shown in FIG. 1, according to another embodiment.
FIG. 4 shows a block diagram of an embodiment of an enhanced phase locked loop (EPLL) block for a controller section such as that shown in FIG. 2 or 3.
FIG. 5 shows a block diagram of a closed-loop feedback scheme used in an embodiment of the current controller portion of the controller section, designed using the improved LQR method described herein.
FIG. 6A shows a block diagram of a closed-loop feedback scheme used in an embodiment of the current controller portion of the controller section, designed using the improved LQR method for distorted grid voltage as described herein.
FIG. 6B shows a block diagram of a closed-loop feedback scheme used in an embodiment of the current controller portion of the controller section, designed using the improved LQR method for removing dc signal from grid current as described herein.
FIG. 6C shows a block diagram of a closed-loop feedback scheme used in an embodiment of the current controller portion of the controller section, designed using the improved LQR method for distorted grid voltage and distorted reference signal as described herein.
FIG. 6D shows a block diagram of a closed-loop feedback scheme used in an embodiment of the current controller portion of the controller section, for suppressing harmonics in wide frequency band as described herein.
FIG. 6E shows a block diagram of a closed-loop feedback scheme used in an embodiment of the current controller portion of the controller section, for compensating for the harmonics in wide frequency band as described herein.
FIG. 7 is a plot showing deviation in location of closed-loop poles when the output filter capacitor voltage is or is not used as a feedback signal, in a traditional state feedback design.
FIG. 8A is a plot showing sensitivity and instability of a conventional controller to grid-side inductance changes from 0.5 mH to 1 mH.
FIG. 8B is a plot showing robustness and stability of an embodiment of the controller section to grid-side inductance changes from 0.5 mH to 20 mH.
FIG. 9A shows the locus of closed loop poles as designed using the improved LQR method described herein.
FIG. 9B shows the evolvement of the response characteristics of the closed loop system for different design iterations.
FIG. 10A shows performance of the micro-inverter system with no grid harmonics for input irradiation step change in a sample PV system.
FIG. 10B shows performance of the micro-inverter system when the grid is distorted for input irradiation step changes in a sample PV system.
FIG. 11 shows the performance of the micro-inverter system in tracking active and reactive power commands: (a) active and reactive commands; (b) grid voltage (solid) and current (dashed); (c) instantaneous power error.
FIG. 12 shows performance of the micro-inverter system against grid frequency variations: (a) grid voltage (solid) and current (dashed); (b) instantaneous power error; (c) estimated frequency.
FIG. 13 shows performance of the micro-inverter system against grid voltage harmonics and noise: (a) grid voltage; (b) grid current.
FIG. 14 shows the amplitude of the output current of an embodiment of the micro-inverter system (solid) and a conventional design (dashed) when the input power steps from 100 W to 200 W.
FIG. 15(a) shows an embodiment of the dc-bus control loop where the signals in the loop include dc and double frequency terms, and FIG. 15(b) shows an embodiment of a simplified linear loop.
FIGS. 16A and 16B show graphical results comparing performances of the EPLL and conventional PLL.
FIG. 17 shows performance of the system without and with a soft start feed forward controller as described herein.



DETAILED DESCRIPTION OF EMBODIMENTS
Distributed power generation may be connected to the power distribution grid in various configurations of three basic elements, namely inverters, output filters, and controls. Selection of inverter topology and output filter has a direct impact on the overall system performance and its operation. Higher order filters, for example, can significantly reduce the size and weight of circuit components but at the same time they may cause stability problems. A powerful control system is then required to overcome such problems and recover the desired performance for the system. Such a control system may require sensors to measure system variables so that appropriate control can be accomplished. To reduce complexity and cost, a minimum number of measuring sensors should be employed. However, currently available solutions have complex hardware and control systems, which make the overall system expensive, and do not maximize the efficiency of power extraction from the power generators.
Described herein is a system for interfacing distributed power generation with a power distribution grid. The system, which is also referred to herein as a “micro-inverter system”, includes a power section and a controller section. The power section includes an inverter for obtaining power from one or more distributed power generators, and injecting the power into the grid. In one embodiment, the distributed power generator is one or more PV cells or modules. The power section also includes an output filter to attenuate the switching ripple at the output current of the inverter. The output filter may be a simple inductor (L), or a combination of one or more inductor and one or more capacitor (C), such as, for example, an LCL filter, or any similar higher order filter. The controller section controls output power from the inverter and ensures the injection of high quality (i.e., substantially phased matched and substantially free of harmonics) power into the grid. That is, the power injected into the grid complies with national or international power authority specifications and standards for power quality, including total harmonic distortion (THD) and phase matching. For example, the techniques described herein may be applied to distributed power generation so that the THD of the current is less than 5%, less than 4%, less than 3%, less than 2%, or less than 1%, as prescribed by the power authority specifications and standards.
Although embodiments of the invention are described herein primarily with respect to a power distribution grid, it will be understood that the invention is not limited thereto. That is, embodiments may be used in stand-alone applications, wherein the interface is between the power generation and an electrical load. An example of a stand-alone application is an off-grid application. In a stand-alone embodiment, the voltage and current of the load may be sensed and used to condition the power delivered to the load, using techniques as described herein, or variations thereof.
To increase the overall efficiency of a distributed power generation system under different circumstances, independent control and power extraction is required for each power generator. For example, for a distributed power generation using PV modules, partial shadowing of the PV modules and/or mismatches between PV modules are factors requiring independent control and power extraction to maximize overall efficiency of the system.
This may be achieved in accordance with the aspects and embodiments described herein by using a separate micro-inverter system including a power section and a controller section for each PV panel. Typically, the micro-inverter system is compact and robust, so that it may be attached to a PV panel. The micro-inverter system does not require costly high voltage dc wiring and is suitable for distributed power generation applications such as PV modules, where partial shading of PV modules cannot be avoided, since maximum power point tracking (MPPT) is performed on each PV module independently. The micro-inverter system avoids mismatch losses between PV modules. Due to the modularity of this technology, PV modules may be added in a “plug and play” manner. In addition, the micro-inverter system may be mass-produced, which lowers the cost. Further, at least portions of the system may be implemented using a FPGA, which makes it even more compact and robust.
As used herein, the term “dc” refers to direct current, and is equivalent to the term “DC”.
As used herein, the terms “PV cell” and “PV module” are used interchangeably and are equivalent.
As used herein, the term “command” refers to a reference signal.
As used herein, the term “distributed power generation” refers to power generation that is distributed with respect to the power distribution grid. Examples of distributed power generation include, but are not limited to, PV modules and arrays thereof, and wind turbines and arrays thereof.
It will be appreciated that, although embodiments are described herein primarily with respect to PV modules, the embodiments may be applied to, or adapted for use with, other types of distributed power generation, such as wind turbines.
An embodiment of a micro-inverter system for interfacing distributed power generation with a power distribution grid is shown in the block diagram of FIG. 1. This embodiment includes a power section including an input capacitor CPV connected across the PV cell(s) 10, a first stage 20 connected across the input capacitor, a second capacitor C1 connected across the first stage output, a second stage 30 including an inverter, and an output LCL filter, including L1, C2, and L2. The first stage 20 may include one or more switches and is used to regulate the input capacitor CPV voltage, removing input voltage oscillation and avoiding the need for a large input capacitor. In the embodiment of FIG. 1, a controller section 40 includes a maximum power point tracker 50 and circuits to control the power flow to the grid by generating gate signals to drive the switches in the first stage 20 and the second stage 30. For example, the controller section 40 includes a stage 52 for controlling the PV output voltage VPV, a stage 54 for controlling the dc capacitor voltage Vdc, a modified pulse width modulation (PWM) controller 56, and an output current controller 58 for controlling power injection to the distribution grid, as shown in FIG. 1 and explained below.
The second stage 30 of the power section of the micro-inverter system may include a current source inverter (CSI) or a voltage source inverter (VSI). For example, a voltage source inverter may be connected to the grid using a simple inductive filter or a higher order filter such as an LCL filter. Such filters attenuate switching frequency ripples, generated by the inverter, transferred to the injected current. For a simple L filter the attenuation is 20 log(ωsL) dB. For example, for a value of L=10 mH and fs=50 kHz, the attenuation is about 70 dB. A higher order output filter may be used to provide the same level of filtering (or more) while requiring much smaller circuit elements. Consider, for example, an LCL filter with inductance L1 (inverter side), capacitance C2, and inductance L2 (grid side), as shown in FIG. 1. It can be shown that for L1=L2=220 μH and C2=2.2 μF, such filter acts like a single inductance equal to L=10 mH at a switching frequency of 50 kHz. The LCL filter thus substantially reduces the size of circuit components. For instance, in this example the size of the inductors may be reduced by about 22.7 times.
Another embodiment of a system for interfacing distributed power generation with a power distribution grid as described herein is shown in the block diagram of FIG. 2. FIG. 2 shows details of an embodiment of the controller section. In general, the controller section includes an instantaneous power reference calculator 60, an enhanced phase-locked loop (EPLL) 70, which calculates φv, and a reference current generator 80 whose task is to calculate the reference current for the micro-inverter. Such reference current is properly adjusted in a closed-loop (nonlinear) mechanism to ensure that accurate active (i.e., real) and reactive power levels are injected into the grid. In the embodiment of FIG. 2, the instantaneous power reference calculator 60 receives commands of active and reactive powers and generates an instantaneous power reference signal.
It is noted that conventional approaches only consider generation of real power, whereas the embodiments described herein may provide generation of both real and reactive power. The reactive power control is often required in stand-alone applications and micro-grid systems, where load reactive power demand can only be supplied by the DG system in the absence of the utility system. The generation of both real and reactive powers is achieved without requiring any additional circuitry. The reference for active power may be generated by, for example, a simple PI controller acting on the error of the dc capacitor voltage, Vdc. A sample performance result is shown in FIG. 11, where FIG. 11(a) shows the reference active and reactive power signals, FIG. 11(b) shows the grid current (dashed) and voltage (solid) signals, and FIG. 11(c) shows the instantaneous power error.
Another embodiment of a controller section as described herein is shown in the block diagram of FIG. 3. A feature of this controller is control of the dc link energy, rather than the dc link voltage, as is done in conventional methods. In FIG. 3 the constant K is equal to 0.5 C1 in order to generate energy variable from voltage. However, in general the constant can be any arbitrary number that has been included in the controller design. As a result of using an energy variable, the control loop becomes linear, while in conventional approaches, the control loop is nonlinear. (The detailed mathematical proof is given below.) A nonlinear loop requires linearization for design purposes and limits the performance and stability of the controller for large signal variations. Usage of dc-link energy as a control variable rather than dc-link voltage has two advantages: One advantage is to facilitate design of a set of parameters that ensure global stability. The second advantage originates from the fact that the dc-link energy has only double-frequency ripples while the de-link voltage has double-frequency and also higher-order ripples. Thus, the notch filter used in this embodiment (see FIG. 3) completely blocks the ripples when the energy signal is used. FIG. 14 shows the amplitude of the output current for the conventional method (dashed) and the embodiment (solid) of the control technique when the input power steps from 100 W to 200 W. It can be seen that in the conventional method the amplitude of the current has fourth order harmonics which translate into 3rd and 5th order harmonics on the grid current.
Another feature of the controller section embodiment of FIG. 3 is the independent control over active and reactive powers. This is accomplished by the voltage quadrature signal provided by the enhanced phase locked loop (EPLL). The reference for the reactive power Q* is either externally set or is calculated by processing (e.g., by using a PI controller) the output voltage magnitude and/or frequency error(s) in stand-alone or micro-grid applications. The actual output reactive power can be calculated using the data provided by the voltage EPLL and another EPLL for the output current (not shown in FIG. 3) or using low-pass or notch filters. It will be appreciated that the reactive power control loop is optional, and is mostly useful for stand-alone applications.
A block diagram of the EPLL portion is shown in FIG. 4. The EPLL estimates φv and ω from the measured voltage signal. The EPLL avoids harmful double-frequency ripples. Such ripples are the main shortcoming of conventional single-phase PLL systems which negatively affect accuracy of their operation. The EPLL provides an accurate reference for synchronization even in the short-term absence of the input signal. This is a desirable feature in cases where there are short interruptions in the measurement system and if there is outage in the system. FIGS. 16A and 16B show results obtained from an EPLL and a conventional PLL. The input is a noisy sinusoidal signal with changing magnitude that vanishes at t=0.1 s. The synchronization signal provided by the EPLL is accurate, whereas the synchronization signal provided by the conventional PLL has large double frequency ripples and has a large offset when the input signal vanishes. When the input signal is absent, the output of the EPLL also has a tiny offset in the phase but the extent of this offset may be controlled by compromising the amplitude estimation feature. Further, the EPLL provides another signal that is orthogonal to the synchronizing reference. Such a signal, called a quadrature signal, may be used for reactive power control as shown in FIG. 3. The EPLL is also able to estimate amplitude of its input signal; another feature of the reactive power control loop in the embodiment of FIG. 3.
It will be appreciated that the complexity of the controller section is no greater than that of existing techniques, with the added advantage that a controller as described herein provides flexible and independent control over both real and reactive power. A controller such as that shown in FIGS. 2 and 3 is suitable for digital implementation. The EPLL and the current reference generator may have similar structure, which simplifies sequential digital circuit implementations in FPGA because once the EPLL structure is implemented; the same approach may be used for the current reference generator in a finite-state machine design.
According to one embodiment, the controller section controls the behavior of an LCL filter connected between the inverter and the power distribution grid. The need for such control of the LCL filter arises because of the resonance among the LCL circuit components. Damping of this resonance mode is zero in a pure LCL filter, which means that the circuit will show oscillations at its natural resonance frequency. In practice, the resistive nature of the components provides some damping, although the poor damping still results in oscillations being generated by the filter. There are two ways to overcome this problem: (1) Passive Damping. In this method, a certain amount of resistance is added to the LCL components to increase damping of the resonant mode. Such resistors, however, dissipate energy and increase losses. (2) Active Damping. In this method, an appropriate control strategy is used to introduce adequate damping to the resonant modes. This approach is used in an embodiment of the controller section described below.
The control strategy plays a significant role in obtaining desirable performance when an LCL filter is used. The filter is of third order and has three state variables. The current injected to the grid is the most important variable and is controlled carefully. The objective is to maintain this current as a substantially harmonic free sinusoidal signal at 60 Hz for all system operating conditions and all system uncertainties and changes in parameters. Detailed explanations regarding system conditions and requirements are given as follows.

    
    
        Different system operating conditions stem from the fact that the power generation is an intermittent or variable source, such as a PV module or a wind turbine. This phenomenon causes a wide range of current levels and other system variables for which the controller must be able to operate.
        The filter is connected to the power distribution grid which is an infinite bus. Such an infinite bus, however, may show different impedances to the filter depending on the location the filter is being tied to. This phenomenon generates large uncertainties on the grid-side inductor of the filter.
        The power distribution grid voltage at the point of coupling is often assumed to be a pure sinusoid, which is not necessarily the case. The injected current must be smooth and must comply with the level of allowed harmonics despite the presence of grid voltage distortions.
        A typical grid often experiences some variations in its frequency. The controller must be able to operate in synchrony with the grid despite such variations. This issue is even more troublesome in weak grid systems or islanded systems.
        Components of the system may have nonlinearities, which can cause current distortion. The controller must be able to minimize adverse impacts of those phenomena on the quality of injected current.
        The circuit components may undergo changes due to temperature and/or aging. The controller must perform robustly against such changes.
        The resonance phenomenon of the LCL filter should be controlled to avoid undesirable oscillations during various operating conditions of the system.
    
    


It is challenging to design a standard feedback loop on the grid current to obtain stable and robust performance of the closed-loop system, due to the marginal stability of the LCL filter. Thus, in one embodiment, a semi-state-feedback strategy combined with an output feedback loop may be used, as shown in FIG. 5. The controller section includes an internal loop 110, which feeds back grid current and inverter current, and an external loop 100, which ensures tracking of a pure sinusoidal current without error. The feed forward term from grid voltage in the internal loop 110 does not have any impact on the stability properties of the control loop operation. It is used to achieve a soft-start operation. (Mathematical equations to design this term are included herein.) The micro-inverter output filter capacitor voltage VC (see FIG. 1) is not used as a feedback signal in the internal loop, to avoid excessive usage of sensors. Analysis of the design shows that the controller section operates desirably without using the capacitor voltage. A state estimator may also be used to estimate the grid current from the measurements of inverter current. This also obviates the need to sense the grid current.
Standard state-feedback techniques assume that all state variables are used for feedback. Thus, the closed-loop poles deviate from their pre-specified locations if the capacitor voltage gain is set to zero. The deviation is in the direction of the reduction of the response speed and the reduction of the damping of resonances, as can be seen in FIG. 7, which shows deviation of closed-loop poles for cases where VC is used, and where VC is not used.
Investigations show that the standard pole-assignment technique of state-feedback theory is not ideal for designing the controller gains, for various reasons. An appropriate set of locations for closed-loop poles is challenging to obtain, and the closed-loop system will become sensitive to system uncertainties, calculation delays, and to estimation accuracy, and will exhibit poorly damped resonance oscillations. For example, the impact of uncertainties on the grid-side inductor L2 (i.e., a change from 0.5 mH to 1 mH), is shown in FIG. 8A. This shows that an increase in the grid-side inductor makes the closed-loop system unstable. In contrast, the performance of the embodiment of FIG. 5 against large uncertainties in the grid-side inductor (i.e., a 40× change from 0.5 mH to 20 mH), is shown in FIG. 8B. It can be seen that the controller handles very large uncertainty levels without instability.
The embodiment uses optimal control techniques and optimally assigns the closed-loop poles to locations which meet control objectives. An improved version of a linear quadratic regulation (LQR) technique was developed and used to suit a single-phase PV application. The improvement involved solving the tracking problem rather than the regulation problem. Moreover, a resonant-type controller 100 as shown in FIG. 5 was incorporated to ensure zero steady-state error. Coefficients of this controller were optimally obtained using the improved LQR technique as discussed below. One major difficulty with using the conventional LQR technique is the correct adjustment of its Q matrix. Described herein is a systematic method of finding elements of the Q matrix to arrive at a desirable response.
To clarify the method some mathematical proofs are given here. The LCL filter may be described by the following state-space equations in which the index p stands for plant, xp is the state vector defined as xp=[ii,vc,ig]T, and y is the output of interest which is ig.

{dot over (x)}p=Apxp+Bpu+B1vg 

y=Cpxp  (1)

The matrices are given by:




  
    
      
        
          
            A
            p
          
          =
          
            (
            
              
                
                  0
                
                
                  
                    -
                    
                      1
                      
                        L
                        1
                      
                    
                  
                
                
                  0
                
              
              
                
                  
                    1
                    C
                  
                
                
                  0
                
                
                  
                    -
                    
                      1
                      C
                    
                  
                
              
              
                
                  0
                
                
                  
                    1
                    
                      L
                      2
                    
                  
                
                
                  0
                
              
            
            )
          
        
        ,
        
          

        
        ⁢
        
          
            B
            p
          
          =
          
            (
            
              
                
                  
                    M
                    
                      L
                      1
                    
                  
                
              
              
                
                  0
                
              
              
                
                  0
                
              
            
            )
          
        
        ,
        
          

        
        ⁢
        
          
            B
            1
          
          =
          
            (
            
              
                
                  0
                
              
              
                
                  0
                
              
              
                
                  
                    1
                    
                      L
                      2
                    
                  
                
              
            
            )
          
        
        ,
        
          

        
        ⁢
        
          
            C
            p
          
          =
          
            (
            
              
                
                  0
                
                
                  0
                
                
                  1
                
              
            
            )
          
        
      
    
    
      
        (
        2
        )
      
    
  




where M is the PWM gain. Resonant-type controllers (R controller) are described by the following state-space equations:

{dot over (x)}r=Arxc+Bre  (3)

where the index r stands for resonant, xr is the state vector of R controller and e is the error of the injected current. The matrices are given by





  
    
      
        
          
            A
            r
          
          =
          
            (
            
              
                
                  0
                
                
                  
                    -
                    
                      ω
                      o
                    
                  
                
              
              
                
                  
                    ω
                    o
                  
                
                
                  0
                
              
            
            )
          
        
        ,
        
          

        
        ⁢
        
          
            B
            r
          
          =
          
            (
            
              
                
                  1
                
              
              
                
                  0
                
              
            
            )
          
        
      
    
    
      
        (
        4
        )
      
    
  




where ωo is the system frequency. The state variables of the R controller, in the Laplace domain, are





  
    
      
        
          
            X
            r
          
          ⁡
          
            (
            s
            )
          
        
        =
        
          
            
              
                (
                
                  sI
                  -
                  
                    A
                    r
                  
                
                )
              
              
                -
                1
              
            
            ⁢
            Br
          
          =
          
            
              
                E
                ⁡
                
                  (
                  s
                  )
                
              
              
                
                  s
                  2
                
                +
                
                  ω
                  o
                  2
                
              
            
            ⁢
            
              (
              
                
                  
                    s
                  
                
                
                  
                    
                      ω
                      o
                    
                  
                
              
              )
            
          
        
      
    
    
      
        (
        5
        )
      
    
  




and thus satisfy the following equations in the time domain

{umlaut over (x)}r1+ωo2xr1=ė

{umlaut over (x)}r2+ωo2xr2=ωoe  (6)

The LCL filter and the R controller, when combined together, make up a fifth order system which may be described by the following state-space equations

{dot over (x)}=Ax+Bu+B2vg+B3yref 

y=Cx  (7)

where x=[xp,xr]T is the vector of state variables, yref is the reference signal and the matrices are given below.





  
    
      
        
          A
          =
          
            (
            
              
                
                  
                    A
                    p
                  
                
                
                  0
                
              
              
                
                  
                    
                      -
                      
                        B
                        r
                      
                    
                    ⁢
                    
                      C
                      p
                    
                  
                
                
                  
                    A
                    r
                  
                
              
            
            )
          
        
        ,
        
          

        
        ⁢
        
          B
          =
          
            (
            
              
                
                  
                    B
                    p
                  
                
              
              
                
                  0
                
              
            
            )
          
        
        ,
        
          

        
        ⁢
        
          
            B
            2
          
          =
          
            (
            
              
                
                  
                    B
                    1
                  
                
              
              
                
                  0
                
              
            
            )
          
        
        ,
        
          

        
        ⁢
        
          
            B
            3
          
          =
          
            (
            
              
                
                  0
                
              
              
                
                  
                    B
                    r
                  
                
              
            
            )
          
        
      
    
    
      
        (
        8
        )
      
    
  




Note that the control signal u may be expressed as

u=−[K10K2]xp−[K3K4]xr=−[K10K2K3K4]x=−Kx  (9)

which is in the standard form of a state-feedback law. The only difference here is that one of the feedback gains, corresponding to the capacitor voltage, is set to zero. The combined system (described by matrices A and B) is completely controllable.

Equation set (1) describes the closed-loop control system. In (1), yref is the reference signal for the grid current. This signal is provided by the reference generation unit and is a pure sinusoidal signal at frequency of 60 Hz. It thus satisfies the equation ÿref+ωo2yref=0. The grid voltage vg also satisfies this equation if we assume that the grid is stiff. The above discussion amounts to the fact that if the differential operator D2+ωo2 is applied to both sides of (1), vg and yref disappear and the following simplified equation is obtained.

ż=Az+Bv  (10)

In (10), the new state vector z and the new control signal v are defined as z={umlaut over (x)}+ωo2x and v=ü+ωo2u. The new variables (z and v) characterize the deviation of the original variables from a pure sinusoid at frequency ωo. More specifically, the new state vector corresponding to the R controller is





  
    
      
        
          z
          r
        
        =
        
          
            
              
                x
                 ̈
              
              r
            
            +
            
              
                ω
                o
                2
              
              ⁢
              
                x
                r
              
            
          
          =
          
            (
            
              
                
                  
                    e
                    .
                  
                
              
              
                
                  
                    
                      ω
                      o
                    
                    ⁢
                    e
                  
                
              
            
            )
          
        
      
    
    
      
        (
        11
        )
      
    
  




in which the equality is inferred based on (6). The state-feedback control law (9) may also be used to obtain a similar law for the new control signal as

v=−Kz.  (12)

Equations (10) and (12) describe a standard regulation problem in which the objective is to regulate the state variables to “zero”. As a matter of fact the above transformations on the state variables and control signal transformed the tracking problem into a regulation problem. Such a problem can optimally be addressed using the technique of LQR. The LQR technique provides the best controller gains that minimize a quadratic cost function expressed below.

J=∫0∞(zTQz+v2)dt=∫0∞(q5ωo2e2+q4ė2+zpTQpzp+v2)dt  (13)

Matrix Q is positive semi-definite. The solution is obtained from the Algebraic Riccati Equation (ARE) and is conveniently calculated in MatlabTM using the procedure K=lqr(A,B,Q,1).

The LQR technique transforms the problem of selecting closed-loop poles into selecting the matrix Q. This matrix is a diagonal non-negative matrix and thus it has the same number of elements as those of the controller gains K, i.e. Q=diag(q1,q2,q3,q4,q5). However, unlike selection of closed-loop poles, selection of Q is performed with the clear view that increasing each element qi has its eminent effect on decreasing the deviation of state variable zi from zero. Thus, often an easy trial and error stage can lead to a suitable selection, which results in desirable behavior of the closed-loop system. Moreover, in this method, the designer is not worried about closed-loop instability because the stability is guaranteed for any choice of non-negative Q.
It is observed from (13) that q5 controls the tracking error and has the most significant impact on generating a desirable response. The coefficient q4 controls the rate of change of the tracking error and may be used to make the system responses smoother. Further adjustments are possible by using q3, q2 and q1. The systematic method used herein is to start increasing q5 from an initial positive value while all the other coefficients are set to zero. Once q5 reaches a certain value, it becomes frozen and then q4 starts to increase. The system responses together with the location of closed-loop poles and zeros are monitored while the q coefficients are being increased. The design is ended once a desirable response is achieved. A typical root-locus curve is shown in FIG. 9A and the evolvement of system response characteristics is shown in FIG. 9B.
For every selection of Q, the closed-loop poles are arranged and placed at a specific location in such a way that the cost function (13) is minimized. Such a solution is called optimal. This means that not any blind selection of closed-loop poles would necessarily correspond to an optimal solution. A feature of the LQR technique is that it guarantees those locations of the closed-loop poles which are optimal. Such an optimality also corresponds to certain degrees of system robustness in terms of classical concepts of phase-margin and gain-margin, as well-known in the art. FIG. 8B shows a similar situation to that of FIG. 8A. Unlike the conventional state feedback design that becomes unstable for an uncertainty as small as 0.5 mH in L2, the technique described herein maintains the stability for very large uncertainties, i.e., as large as 20 mH or greater.
It is a feature of the improved LQR design method described herein the infinite-time tracking problem is addressed. Such a problem has not previously been addressed in a closed form formulation. Solutions for the finite-time tracking problem are known, as are the challenges that occur when the infinite time is concerned. The technique described herein effectively resolves the challenges.
The feed forward term on the grid voltage is included to achieve soft-start operation. The closed-loop state-space equations are

{dot over (x)}=Ax+Bu+B2vgrid+B3igridref 

y=Cx,  (14)

where the matrices are given below.





  
    
      
        
          A
          =
          
            [
            
              
                
                  
                    A
                    p
                  
                
                
                  0
                
              
              
                
                  
                    
                      -
                      
                        B
                        c
                      
                    
                    ⁢
                    
                      C
                      p
                    
                  
                
                
                  
                    A
                    c
                  
                
              
            
            ]
          
        
        ,
        
          

        
        ⁢
        
          B
          =
          
            [
            
              
                
                  
                    B
                    p
                  
                
              
              
                
                  0
                
              
            
            ]
          
        
        ,
        
          

        
        ⁢
        
          
            B
            2
          
          =
          
            [
            
              
                
                  
                    B
                    1
                  
                
              
              
                
                  0
                
              
            
            ]
          
        
        ,
        
          

        
        ⁢
        
          
            B
            3
          
          =
          
            [
            
              
                
                  0
                
              
              
                
                  
                    B
                    c
                  
                
              
            
            ]
          
        
        ,
        
          

        
        ⁢
        
          C
          =
          
            [
            
              
                C
                p
              
              ,
              0
            
            ]
          
        
      
    
    
      
        (
        15
        )
      
    
  




According to the control structure, the control signal is

u=−Kpxp−Kcxc−kFFvgrid.  (16)

That generates the following description for the closed-loop system:





  
    
      
        
          x
          .
        
        =
        
          
            
              [
              
                
                  
                    
                      
                        A
                        p
                      
                      -
                      
                        
                          B
                          p
                        
                        ⁢
                        
                          K
                          p
                        
                      
                    
                  
                  
                    
                      
                        B
                        p
                      
                      ⁢
                      
                        K
                        c
                      
                    
                  
                
                
                  
                    
                      
                        -
                        
                          B
                          c
                        
                      
                      ⁢
                      
                        C
                        p
                      
                    
                  
                  
                    
                      A
                      c
                    
                  
                
              
              ]
            
            ⁡
            
              [
              
                
                  
                    
                      x
                      p
                    
                  
                
                
                  
                    
                      x
                      c
                    
                  
                
              
              ]
            
          
          +
          
            
              [
              
                
                  
                    
                      
                        B
                        1
                      
                      -
                      
                        
                          k
                          FF
                        
                        ⁢
                        
                          B
                          p
                        
                      
                    
                  
                
                
                  
                    0
                  
                
              
              ]
            
            ⁢
            
              v
              grid
            
          
          +
          
            
              [
              
                
                  
                    0
                  
                
                
                  
                    
                      B
                      c
                    
                  
                
              
              ]
            
            ⁢
            
              
                i
                grid
                ref
              
              .
            
          
        
      
    
    
      
        (
        16
        )
      
    
  




The response of the output current to the grid voltage is calculated from the following equation:





  
    
      
        
          
            i
            grid
          
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            Cx
            ⁡
            
              (
              t
              )
            
          
          =
          
            C
            ⁢
            
              
                ∫
                0
                t
              
              ⁢
              
                
                  
                    e
                    
                      A
                      ⁡
                      
                        (
                        
                          t
                          -
                          τ
                        
                        )
                      
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          
                            
                              B
                              1
                            
                            -
                            
                              
                                k
                                FF
                              
                              ⁢
                              
                                B
                                p
                              
                            
                          
                        
                      
                      
                        
                          0
                        
                      
                    
                    ]
                  
                
                ⁢
                
                  
                    v
                    grid
                  
                  ⁡
                  
                    (
                    τ
                    )
                  
                
                ⁢
                
                  
                    d
                    τ
                  
                  .
                
              
            
          
        
      
    
    
      
        (
        17
        )
      
    
  




To optimize the feed forward term to achieve soft start operation, the following norm is defined for minimization:

min∥igrid(t)∥2=min∫0Tfigrid2(t)dt.  (18)

The norm can be calculated from well-known linear analysis theory as shown in the following equation:

∫0Tfigrid2(t)dt=∫0TfCeAt(Λ1Λ1T−2kFFΛ1Λ2T+kFF2Λ2Λ2T)eATtCTdt,  (19)

Where the matrices are defined below:





  
    
      
        
          
            
              Λ
              1
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              ∫
              0
              t
            
            ⁢
            
              
                
                  e
                  
                    
                      -
                      A
                    
                    ⁢
                    
                      
                    
                    ⁢
                    τ
                  
                
                ⁡
                
                  [
                  
                    
                      
                        
                          B
                          1
                        
                      
                    
                    
                      
                        0
                      
                    
                  
                  ]
                
              
              ⁢
              
                
                  v
                  grid
                
                ⁡
                
                  (
                  τ
                  )
                
              
              ⁢
              
                d
                τ
              
            
          
        
        ,
        
          

        
        ⁢
        
          
            
              Λ
              2
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              ∫
              0
              t
            
            ⁢
            
              
                
                  e
                  
                    
                      -
                      A
                    
                    ⁢
                    
                      
                    
                    ⁢
                    τ
                  
                
                ⁡
                
                  [
                  
                    
                      
                        
                          B
                          p
                        
                      
                    
                    
                      
                        0
                      
                    
                  
                  ]
                
              
              ⁢
              
                
                  v
                  grid
                
                ⁡
                
                  (
                  τ
                  )
                
              
              ⁢
              
                
                  d
                  τ
                
                .
              
            
          
        
      
    
    
      
        (
        20
        )
      
    
  




Therefore, the optimum gain can be derived by differentiation and making it equal to zero:





  
    
      
        
          k
          FF
        
        =
        
          
            
              
                ∫
                0
                
                  T
                  f
                
              
              ⁢
              
                C
                ⁢
                
                  
                
                ⁢
                
                  e
                  At
                
                ⁢
                
                  Λ
                  1
                
                ⁢
                
                  Λ
                  2
                  T
                
                ⁢
                
                  e
                  
                    
                      A
                      T
                    
                    ⁢
                    t
                  
                
                ⁢
                
                  C
                  T
                
                ⁢
                
                  d
                  t
                
              
            
            
              
                ∫
                0
                
                  T
                  f
                
              
              ⁢
              
                C
                ⁢
                
                  
                
                ⁢
                
                  e
                  At
                
                ⁢
                
                  Λ
                  2
                
                ⁢
                
                  Λ
                  2
                  T
                
                ⁢
                
                  e
                  
                    
                      A
                      T
                    
                    ⁢
                    t
                  
                
                ⁢
                
                  C
                  T
                
                ⁢
                
                  d
                  t
                
              
            
          
          .
        
      
    
    
      
        (
        21
        )
      
    
  




A sample simulation is presented in FIG. 17 where the system output current responses are shown for the case where the start-up term is included and for the case where the start-up term is not included. It is observed that the feed forward term contributes to smoothing of the startup stage of the system.
According to another embodiment of the controller section shown in FIG. 6A, a further improvement minimizes impacts of grid voltage distortion on the quality of the injected current. The improvement was made by incorporating multiple resonant controllers 103 and 109 in the outer feedback loop as shown in FIG. 6A. The design of such controllers may also be accomplished using the improved LQR technique as discussed above. Such a design involves adjustment of several controller coefficients that is very challenging using conventional techniques. The method described herein facilitates such a design in a very convenient way without any instability concern.
FIGS. 10A and 10B show performance of the embodiment of FIG. 6A for two cases where the grid voltage is smooth and when it is distorted. The shown scenario corresponds to a case where the irradiation level is dropped from 100 percent to 25 percent at the time instant 0.075 s. Fast and smooth grid current injection that signifies injection of high-quality power is observed. Another simulation result is shown in FIG. 13 that confirms desirable performance of the system when the grid voltage is distorted by harmonics and/or noise. In this Figure, the grid voltage undergoes 20% of the fifth harmonic at t=0.7 s and then white noise with variance 0.01 is also added at t=0.8 s. The grid current is shown and is highly sinusoidal despite the extreme distortion and noise which is present at the voltage terminals.
According to another embodiment of the current control section, multiple resonant controllers may be displaced as shown in FIG. 6B in order to reject harmonics of the grid voltage as well as those of the reference current. The gains of these controllers may also be optimally determined using the modified LQR method described herein.
According to another embodiment of the current control section, an integrating controller is included as shown in FIG. 6C in order to reject any possible dc component that may exist in the grid current. The gain of this controller may also be optimally determined using the modified LQR method described herein.
According to another embodiment of the current control section, a wide band harmonic controller is included as shown in FIG. 6D in order to suppress harmonics that are within a wide range of frequencies. This controller may have a proportional, proportional derivative, lead, or lead-lag structure.
According to another embodiment of the current control section, a wide band feed forward harmonic compensator is included as shown in FIG. 6E in order to compensate for harmonics that are within a wide range of frequencies. This compensator may have a proportional, proportional derivative, lead, or lead-lag structure.
It is appreciated that a current control section of the embodiments described herein may use one or combine any two or more configurations, such as those shown in FIGS. 5, 6A, 6B, 6C, 6D, and 6E. The closed-loop controller embodiment is robust against both large variations of system uncertainties and large measurement noise which is caused by the switching actions of the inverter. The controller section handles distortion and possible frequency swings in the grid voltage without negative impact on its performance. The resonance phenomenon is sufficiently damped and virtually no oscillation appears on the signals. Frequency adaptability of the system is achieved, owing to the EPPL feature of the system. Moreover, the R controllers are appropriately structured to avoid any error caused by fast frequency changes. FIG. 12 shows a sample performance of the system when a large frequency variation from 60 to 50 Hz occurs. FIG. 12(a) shows the grid current (dashed) and voltage (solid) signals, FIG. 12(b) shows the instantaneous power error, and FIG. 12(c) shows the estimated frequency. The system has adjusted the operating frequency and the injected power remains unchanged in the steady-state.
The controller section embodiments may be implemented in, for example, DSP microprocessors and/or FPGAs. However, care must be taken to make the controller insensitive to both controller parameter length and quantization errors for fixed-point implementations. The use of delta operator as stated in existing literature may be beneficial in this regard. As a result the implementation of the controller section becomes less complicated and more compact in a FPGA.
The nonlinear control embodiment of FIG. 2 is mathematically derived and discussed below for the sake of completion. Assume the grid voltage at the point of coupling is denoted by v(t) and the injected current by the DG is i(t). The objective is to control the current to ensure appropriate injection of the instantaneous power p(t)=v(t)i(t) to the grid. The power is conveniently characterized by its active and reactive components denoted by P and Q respectively. In a sinusoidal situation where v(t)=V sin(φv) and i(t)=I sin(φi), the instantaneous power is




  
    
      
        
          
            
              
                p
                ⁡
                
                  (
                  t
                  )
                
              
              =
              
              ⁢
              
                
                  v
                  ⁡
                  
                    (
                    t
                    )
                  
                
                ⁢
                
                  i
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  
                    1
                    /
                    2
                  
                  ⁢
                  VI
                  ⁢
                  
                    
                  
                  ⁢
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    φ
                    ⁡
                    
                      [
                      
                        1
                        -
                        
                          cos
                          ⁡
                          
                            (
                            
                              2
                              ⁢
                              
                                φ
                                v
                              
                            
                            )
                          
                        
                      
                      ]
                    
                  
                
                +
                
                  
                    1
                    /
                    2
                  
                  ⁢
                  VI
                  ⁢
                  
                    
                  
                  ⁢
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  φ
                  ⁢
                  
                    
                  
                  ⁢
                  
                    sin
                    ⁡
                    
                      (
                      
                        2
                        ⁢
                        
                          φ
                          v
                        
                      
                      )
                    
                  
                
              
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  P
                  ⁡
                  
                    [
                    
                      1
                      -
                      
                        cos
                        ⁡
                        
                          (
                          
                            2
                            ⁢
                            
                              φ
                              v
                            
                          
                          )
                        
                      
                    
                    ]
                  
                
                -
                
                  Q
                  ⁢
                  
                    
                  
                  ⁢
                  
                    sin
                    ⁡
                    
                      (
                      
                        2
                        ⁢
                        
                          φ
                          v
                        
                      
                      )
                    
                  
                
              
            
          
        
      
    
    
      
        (
        22
        )
      
    
  




where φ=φv−φi and P=1⁄2 V I cos φ and Q=−1⁄2 2 V I sin φ.

Assume that the commands for active and reactive powers are denoted by Pref and Qref, respectively. Then the command for the instantaneous power is given by

pref(t)=Pref[1−cos(2φv)]−Qref sin(2φv).  (23)

Define the cost function

J[i(t)]=[pref(t)−p(t)]2=[pref(t)−v(t)i(t)]2  (24)

which is the instantaneous square error between the actual power and the reference power. The objective as stated above can now be translated into finding an appropriate current i(t) which minimizes J[i(t)]. To address a solution to this problem, the current is i(t)=I sin(φi) where φi=∫0tω(τ)dτ−φ in which ω is the grid frequency. The voltage signal v(t)=V sin(φv) is taken as the reference such that φv=∫0tω(τ)dτ. The cost function will then be a function of smooth unknown variables θ=(I,φ). The same strategy used to derive the EPLL equations (which is based on gradient descent method) may be adopted to arrive at equations governing variations of these unknown variables. The general expression is {dot over (θ)}=−μ∂J(θ)/∂θ, in which μ is a positive-definite 2×2 matrix. Assuming a diagonal structure as μ=diag{μ1, μ2}, the resulting equations can be summarized as

İ(t)=μ1e(t)v(t)sin(φi)

{dot over (φ)}i(t)=μ2e(t)v(t)cos(φi)+ω  (25)

where e(t)=pref(t)−p(t)=pref(t)−v(t)i(t) and i(t)=I sin(φi).

Equation set (25) shows how the desired variables I and φi must be changed to ensure minimum error between the actual power and the desired power. FIG. 2 shows the scheme. Equation (23) shows how in FIG. 2 the instantaneous power reference pref(t) is synthesized from the active and reactive reference values Pref and Qref. Moreover, an EPLL is employed on the voltage signal to obtain the phase-angle and frequency. A feature of the EPLL, in this context, is its ability to eliminate the double frequency harmonics in single phase applications, which makes it useful for grid connected single-phase applications.
In the following, mathematical proof is given to show the dc voltage controller performance and its design method. Equation (26) shows the power balance equation for the dc-bus, where pin is the input power and pout is the inverter output power. This equation is nonlinear.




  
    
      
        
          
            Cv
            dc
          
          ⁢
          
            
              d
              
                v
                dc
              
            
            
              d
              t
            
          
        
        =
        
          
            p
            in
          
          -
          
            p
            out
          
        
      
    
    
      
        (
        26
        )
      
    
  




By defining dc link energy (wc) as a new state variable, the linear equation (27) is obtained, where pL is the instantaneous power stored in the output filter.

{dot over (w)}c=−vi+pin=−vgi−pL+pin  (27)

The two terms vgi and pL are double frequency signals and pin is a dc signal. The result is that wc consists of only dc and double frequency terms. Thus vdc has many higher order harmonics. This means that a notch filter centered at the double frequency may not be able to filter out the harmonics from the control loop if, as traditionally done, vdc is used for the feedback loop. On the other hand, a feedback loop on wc eliminates this problem. This phenomenon is shown in FIG. 14 where the method does not cause any ripples on the output current.
This method not only avoids ripples but also facilitates the design procedure for the dc link control loop. The complete control loop is shown in FIG. 15(a) where the signals in the loop include dc and double frequency terms. Since the current controller is faster than the dc link control loop, this embodiment may be simplified as shown in FIG. 15(b), which shows a linear loop. Any well-known linear system design technique may be used to design the PI controller coefficients for the loop. The characteristic equation for the loop is given in (28).

s2(s2+4ξωos+4ωo2)−α(kps+ki)(s2+4ωo2)=0  (28)

The contents of all references, pending patent applications, and published patents cited throughout this application are hereby expressly incorporated by reference.
EQUIVALENTS
Those skilled in the art will recognize or be able to ascertain variants of the embodiments described herein. Such variants are within the scope of the invention and are covered by the appended claims.

## Claims

1. A method for controlling a power circuit that interfaces distributed power generation with a power distribution grid, comprising:
generating a current reference signal;
minimizing a difference between an output grid current and the current reference signal, and outputting a first control signal;
rejecting harmonics, dc, or harmonics and dc in output power delivered to the power distribution grid by receiving only a signal corresponding to the power distribution grid current, and outputting a second control signal; and
generating at least one gating signal that controls the power circuit output current using the first and second control signals;
wherein substantially harmonic-free, dc-free, or harmonic-free and dc-free power is delivered to the power distribution grid using the second control signal corresponding to the power distribution grid current.

2. The method of claim 1, wherein the power circuit includes a current source inverter.

3. The method of claim 1, wherein the power circuit includes a voltage source inverter.

4. The method of claim 1, wherein the distributed power generation includes at least one PV module.

5. The method of claim 1, including generating an instantaneous power reference signal, and generating the current reference signal from the instantaneous power reference signal and the grid voltage and current using nonlinear elements.

6. The method of claim 5, including using a phase angle of the grid voltage to generate the instantaneous power reference signal.

7. The method of claim 6, including using an enhanced phase locked loop (EPLL) to provide the phase angle of the grid voltage.

8. The method of claim 5, including using real and reactive power commands to control real and reactive power delivered to the power distribution grid.

9. The method of claim 8, including setting the real and reactive power commands externally.

10. The method of claim 8, including generating the real power command using a PI controller operating on a dc-link voltage error, on a dc-link current error, or on a dc-link energy error.

11. The method of claim 8, including generating the reactive power command using a PI controller operating on a voltage magnitude error.

12. The method of claim 1, including generating parallel and orthogonal signals corresponding to the grid voltage.

13. The method of claim 12, including generating a real current component of the current reference signal from an error between a reference energy signal and an actual energy signal corresponding to the dc voltage of the power circuit, multiplied with the parallel signal.

14. The method of claim 12, including generating a reactive component of the current reference signal from an error between a reference reactive power signal and an actual reactive power signal corresponding to the output power of the power circuit, multiplied with the orthogonal signal.

15. The method of claim 12, including using an EPLL to generate the parallel and orthogonal signals corresponding to the grid voltage.

16. The method of claim 1, including using a semi-state feedback control structure combined with a resonant-type output feedback portion in a current controller.

17. The method of claim 16, including using a feed forward soft start controller.

18. The method of claim 17, wherein the current controller comprises:
(i) one or more resonant-type harmonic controllers acting on grid current;
(ii) an integrating controller acting on grid current;
(iii) a wide band harmonic controller in parallel with a resonant-type controller;
(iv) a wide band harmonic controller in series with a resonant-type controller; or
(v) a wide band feed forward harmonic compensator acting on the grid voltage signal; or
(vi) two or more of (i) to (v).

19. The method of claim 17, wherein the current controller comprises a wide band harmonic controller having a proportional, proportional-derivative, lead, or lead-lag configuration.

20. The method of claim 17, wherein the current controller comprises a wide band feed forward harmonic compensator having a proportional, proportional-derivative, lead, or lead-lag configuration.

21. The method of claim 1, including using a semi-state feedback combined with one or more resonant-type output feedback portions in a current controller.

22. The method of claim 21, wherein each resonant-type output feedback portion corresponds to a harmonic of the grid voltage.

23. The method of claim 1, wherein controlling power delivered to the power distribution grid includes using a maximum power point tracker.