**MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration**

Marian Gaiceanu

Additional information is available at the end of the chapter

http://dx.doi.org/10.5772/48489

## **1. Introduction**

The main objective of the chapter is the development of technological knowledge, based on Matlab/Simulink programming language, related to grid connected power systems for energy production by using Renewable Energy Sources (RES), as clean and efficient sources for meeting both the environment requirements and the technical necessities of the grid connected power inverters. Another objective is to promote the knowledge regarding RES; consequently, it is necessary to bring contribution to the development of some technologies that allow the integration of RES in a power inverter with high energy quality and security. By using these energetic systems, the user is not only a consumer, but also a producer of energy. This fact will have a direct impact from technical, economic and social point of view, and it will contribute to the increasing of life quality.

The chapter intends to integrate itself into the general frame of the EU energy policies by imposing the global objectives of reducing the impact upon the environment, and promoting the RES for the energy production. At the same time, the chapter is strategically oriented towards the compatibility with the priority requirements from some European programmes: the wide-spread implementation of the distributed energy sources, of the energy storage technologies and of the grid connected systems.

The chapter strategy follows two directions: the first, is thedevelopment of knowledge (a study and implementation of a high performance grid-power inverter; the fuel cells technology as RES; the control methods; specific modelling and simulation methods); the second focuses upon the applicative research (a real time implementation with dSPACE platform is provided).

The interdisciplinarity of the chapter consists of using specific knowledge from the fields of: energy conversion, power converters, Matlab/Simulink simulation software, real time

© 2012 Gaiceanu, licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. © 2012 Gaiceanu, licensee InTech. This is a paper distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

implementation based on dSPACE platform, electrotechnics, and advanced control techniques.

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 221

from renewable sources. The monitoring of this Norm implementation is managed by the EU Energy General Directorship which presents periodical reports on the European researching and development stages. Considering these reports, under the conditions of implementing the DER concept (Distributed/Descentralized Energy Resources), it is obvious that the futurer research activities will be based upon the hybrid systems (windphotovoltaic, wind-biomass, wind-diesel generator) having the target of the energetic

The consolidation of the objectives proposed by Norm 2001/77/EC and the extension in more

The EU gives a great importance to the improvement of the energy efficiency and to the promotion of the renewable sources. Related to the above mentioned issues, the objectives of the EU are to produce at least 20% ofthe gross energy consumption from renewable sources until 2020 (COM, 2006) and to increase the energy efficiency by 20% until 2020 (EREC, 2011). As far as the energy efficiency is concerned, an EU norm aims at a reduction of 9% of the

In the context of the international scientific studies related to the development of new alternative solutions for electrical energy production by using renewable energy sources (RES), the aim of this chapter is to contribute to these studies by evaluating and working out the possible concepts for stand-alone and grid connected operating interface of these hybrid systems and the efficient and ecologic technologies to ensure an optimal use of the sources (solar energy, wind energy, hydrogen energy by using fuel cells, hydro-energy, biomass) in industry and residential buildings.The battery and the fuel cells are also meant to be reserve sources (which ensure the additional energy requirements of the consumers and the supply ofboth the residential critical loads and the critical loads of the hybrid system-auxiliary circuits for fuel cell start-up and operating), increasing the safety of the system. The fuel cell integration is provided by using a unidirectional DC/DC converter (to obtain regulated high voltage DC), an inverter and a filter in order to accommodate the DC voltage to the required AC voltage (single phase or three phase). The bidirectional DC/DC converter (double arrow, Fig.1) is used in order to charge/discharge the batteries (placed in order to increase the energy supply security and to improve load dynamics). The unidirectional DC-DC converter prevents the negative current going into the fuel cell stack. Due to the negative current, the cell reversal could occur and damage the fuel cell stack. The ripple current seen by the fuel cell stack due to the switching of the boost converter (unidirectional DC/DC

Firstly,the problem of choosing the number of phase for the front end converter is a matter of power. In this case, the three-phase line should be used for a 37kVA power converter.

security by removing the disadvantages of using a single renewable source.

geographical areas are possible only by using hybrid systems.

energy losses until 2020 (EREC, 2008)

converter) has to be low.

**2.2. Three-phase versus single phase** 

**2.1. A generic topology of the RES integration** 

## **2. The grid power converter**

The increased power demand, the depletion of the fossil fuel resources and the growth of the environmental pollution have led the world to think seriously of other alternative sources of energy: solar, wind, biogas/biomass, tidal, geothermal, fuel cell, hydrogen energy, gas micro turbines and small hydropower farms.

The number of distributed generation (DG) units, including both renewable and nonrenewable sources, for small rural communities not connected to the grid and for small power resources (up to 1000 kW) connected to the utility network has grown in the last years. There has been an increase in the number of sources that are natural DC sources, for instance fuel cells and photovoltaic arrays, or whose AC frequency is either not constant or is much higher than the grid frequency, for instance micro gas-turbines. These generators necessarily require an DC/AC converter to be connected to the grid. Although some generators can be connected directly to the electric power grid, such as wind power driven asynchronous induction generators, there is a trend to adopt power electronics based interfaces which convert the power firstly to DC and then use an inverter to deliver the power to the 50Hz AC grid.

At the international level**,** SMA Technologies AG (www.sma.de) promotes the innovative technology based on the renewable sources. The following results can be mentioned: the stand-alone or grid connected systems by using either a single type of source (Sunny Boy 5000 Multi-String inverter based on the modular concept, Hydro-Boy and Windy Boy) or combined (Sunny Island) including the interconnection of wind turbines, photovoltaics, micro-hydro and diesel generators. It is well-known that for systems efficiency increasing, the inverter is the answer of the problem. With this respect, Sunways (www.sunways.de) adopted the HERIC concept (from the Fraunhofer Solar and Energetic Systems Institute), by using a tranformerless inverter, obtaining a 97,33% high efficiency of the inverter for low powers (www.ise.fraunhofer.de). The Master-Slave and Team concepts are embedded in SunnyTeam and Fronius inverters in order to increase the efficiency in the partial load conditions. At world level, the implementation of energetic policies (with respect to renewable sources) has been carried out by performing systems based on a single renewable source. There are such examples in countries all over the world: in Europe, Dewind, Vestas, Enercon, Fronius International GmbH, SMA Technologies AG; Renco SpA, Ansaldo Fuel Cells SpA; in North America-Nyserda, Beacon Power, Magnetek Inc., Sustainable Energy Technology, Logan Energy Corp., IdaTech; Australia-Conergy Pty Ltd, Rainbow Power Company Ltd; and Asia-Nitol Solar, Shenzen Xinhonghua Solar-Energy Co Ltd).

In EU, the implementation of the energetic policies is based upon a legal document, Norm 2001/77/EC regarding the promotion of the electrical energy produced from renewable sources on the Energy Single Market. The objectives of the Norm provide that till 2020, a contribution of 20% of the total energy consumption shall be covered by energy produced from renewable sources. The monitoring of this Norm implementation is managed by the EU Energy General Directorship which presents periodical reports on the European researching and development stages. Considering these reports, under the conditions of implementing the DER concept (Distributed/Descentralized Energy Resources), it is obvious that the futurer research activities will be based upon the hybrid systems (windphotovoltaic, wind-biomass, wind-diesel generator) having the target of the energetic security by removing the disadvantages of using a single renewable source.

The consolidation of the objectives proposed by Norm 2001/77/EC and the extension in more geographical areas are possible only by using hybrid systems.

The EU gives a great importance to the improvement of the energy efficiency and to the promotion of the renewable sources. Related to the above mentioned issues, the objectives of the EU are to produce at least 20% ofthe gross energy consumption from renewable sources until 2020 (COM, 2006) and to increase the energy efficiency by 20% until 2020 (EREC, 2011). As far as the energy efficiency is concerned, an EU norm aims at a reduction of 9% of the energy losses until 2020 (EREC, 2008)

## **2.1. A generic topology of the RES integration**

220 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

techniques.

**2. The grid power converter** 

power to the 50Hz AC grid.

gas micro turbines and small hydropower farms.

implementation based on dSPACE platform, electrotechnics, and advanced control

The increased power demand, the depletion of the fossil fuel resources and the growth of the environmental pollution have led the world to think seriously of other alternative sources of energy: solar, wind, biogas/biomass, tidal, geothermal, fuel cell, hydrogen energy,

The number of distributed generation (DG) units, including both renewable and nonrenewable sources, for small rural communities not connected to the grid and for small power resources (up to 1000 kW) connected to the utility network has grown in the last years. There has been an increase in the number of sources that are natural DC sources, for instance fuel cells and photovoltaic arrays, or whose AC frequency is either not constant or is much higher than the grid frequency, for instance micro gas-turbines. These generators necessarily require an DC/AC converter to be connected to the grid. Although some generators can be connected directly to the electric power grid, such as wind power driven asynchronous induction generators, there is a trend to adopt power electronics based interfaces which convert the power firstly to DC and then use an inverter to deliver the

At the international level**,** SMA Technologies AG (www.sma.de) promotes the innovative technology based on the renewable sources. The following results can be mentioned: the stand-alone or grid connected systems by using either a single type of source (Sunny Boy 5000 Multi-String inverter based on the modular concept, Hydro-Boy and Windy Boy) or combined (Sunny Island) including the interconnection of wind turbines, photovoltaics, micro-hydro and diesel generators. It is well-known that for systems efficiency increasing, the inverter is the answer of the problem. With this respect, Sunways (www.sunways.de) adopted the HERIC concept (from the Fraunhofer Solar and Energetic Systems Institute), by using a tranformerless inverter, obtaining a 97,33% high efficiency of the inverter for low powers (www.ise.fraunhofer.de). The Master-Slave and Team concepts are embedded in SunnyTeam and Fronius inverters in order to increase the efficiency in the partial load conditions. At world level, the implementation of energetic policies (with respect to renewable sources) has been carried out by performing systems based on a single renewable source. There are such examples in countries all over the world: in Europe, Dewind, Vestas, Enercon, Fronius International GmbH, SMA Technologies AG; Renco SpA, Ansaldo Fuel Cells SpA; in North America-Nyserda, Beacon Power, Magnetek Inc., Sustainable Energy Technology, Logan Energy Corp., IdaTech; Australia-Conergy Pty Ltd, Rainbow Power

Company Ltd; and Asia-Nitol Solar, Shenzen Xinhonghua Solar-Energy Co Ltd).

In EU, the implementation of the energetic policies is based upon a legal document, Norm 2001/77/EC regarding the promotion of the electrical energy produced from renewable sources on the Energy Single Market. The objectives of the Norm provide that till 2020, a contribution of 20% of the total energy consumption shall be covered by energy produced In the context of the international scientific studies related to the development of new alternative solutions for electrical energy production by using renewable energy sources (RES), the aim of this chapter is to contribute to these studies by evaluating and working out the possible concepts for stand-alone and grid connected operating interface of these hybrid systems and the efficient and ecologic technologies to ensure an optimal use of the sources (solar energy, wind energy, hydrogen energy by using fuel cells, hydro-energy, biomass) in industry and residential buildings.The battery and the fuel cells are also meant to be reserve sources (which ensure the additional energy requirements of the consumers and the supply ofboth the residential critical loads and the critical loads of the hybrid system-auxiliary circuits for fuel cell start-up and operating), increasing the safety of the system. The fuel cell integration is provided by using a unidirectional DC/DC converter (to obtain regulated high voltage DC), an inverter and a filter in order to accommodate the DC voltage to the required AC voltage (single phase or three phase). The bidirectional DC/DC converter (double arrow, Fig.1) is used in order to charge/discharge the batteries (placed in order to increase the energy supply security and to improve load dynamics). The unidirectional DC-DC converter prevents the negative current going into the fuel cell stack. Due to the negative current, the cell reversal could occur and damage the fuel cell stack. The ripple current seen by the fuel cell stack due to the switching of the boost converter (unidirectional DC/DC converter) has to be low.

### **2.2. Three-phase versus single phase**

Firstly,the problem of choosing the number of phase for the front end converter is a matter of power. In this case, the three-phase line should be used for a 37kVA power converter.

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 223

**Figure 2.** The simplified steady state model of the SOFC Power System for Island Operation Mode

hybrid system with fuel cell generator and battery pack will be investigated.

*2.3.1.1 The failure operation mode (Island Operation)* 

( *acload critical \_ load P P* , Fig.2).

p1=0.005, p2=0.01/Prated.

For the sake of simplicity and for chapter length limit reason, only the grid-connected

In this operation mode, the power system must assure the power supply for the critical loads (as alarms, auxiliary power systems for fuel cell, reformer and so on, depending on the consumer requirements). In the first stage, the power supply is assured from the battery pack, followed by the SOFC. Therefore, by knowing the critical load power, an adequate Simulink file is designed (Fig.2).A simple and effective energetic model has been considered. This model puts in evidence the inverter power losses at critical load conditions. A repeating table block from the Simulink tool is used in order to implement the load cycle of the residential consummer (critical load cycle, Fig.4). The available acquisition time for the load cycle was at 10 s for each sample, and two days as time interval length. By knowing the critical load power cycle, it is possible to size the required battery pack. Therefore the output inverter power, *out,inv P* , is the same with the critical load power

The losses of the Power Conditioning System (PlossPCS=Ploss,inv) are modelled by using a quadratic function(Metwally, 2005), which is the most used one. The power loss function requires three parameters extracted from the experimental data by the least-squaresmethod.

The first parameter, *p*0, takes into account the load independent losses[W]. The second parameter, *p*1, represents the voltage drops in semiconductors as load linear proportional losses. The last term, *p*2, includes the magnetic losses [1/W], known as load ohmic losses. The PCS model has been implemented in Simulink (Fig.3) based on the following function:

in which the coefficients of the approximated function are as follows: p0 = 0.0035\*Prated,

2 *loss,inv* 0 1 *critical \_ load critical \_ load* <sup>2</sup> *P p pP pP* (1)

<sup>2</sup> *f(u) p \* u p \* u p* 2 10 (2)

**Figure 1.** A generic topology of the RES integration

Secondly, in case of using balanced three phase AC loads, the possibility that low frequency components to occur in the fuel cell input current is reduced.

## **2.3. System description**

The proposed way of the efficient integration of RES is illustrated in Fig.1. With this respect only one inverter is used in DC-AC conversion for interfacing the stand-alone or gridconnected consumer (Gaiceanu, *et al.,* 2007b). By its control, the inverter can ensure the efficient operation and the accomplishment of the energy quality requirements related to the harmonics level. The hybrid system can ensure two operation modes: the normal one, and the emergency one (as backup system).

### **2.3.1. Operation modes**

There are four modes of operation:


**Figure 2.** The simplified steady state model of the SOFC Power System for Island Operation Mode

For the sake of simplicity and for chapter length limit reason, only the grid-connected hybrid system with fuel cell generator and battery pack will be investigated.

#### *2.3.1.1 The failure operation mode (Island Operation)*

222 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

Secondly, in case of using balanced three phase AC loads, the possibility that low frequency

The proposed way of the efficient integration of RES is illustrated in Fig.1. With this respect only one inverter is used in DC-AC conversion for interfacing the stand-alone or gridconnected consumer (Gaiceanu, *et al.,* 2007b). By its control, the inverter can ensure the efficient operation and the accomplishment of the energy quality requirements related to the harmonics level. The hybrid system can ensure two operation modes: the normal one, and





**Figure 1.** A generic topology of the RES integration

**2.3. System description** 

**2.3.1. Operation modes** 

the emergency one (as backup system).

There are four modes of operation:

Utility via the Static Switch;

consumers will still be supplied from Utility;

the Utility and the eventual residential consumers.

from SOFC and battery and supplies the critical loads.

components to occur in the fuel cell input current is reduced.

In this operation mode, the power system must assure the power supply for the critical loads (as alarms, auxiliary power systems for fuel cell, reformer and so on, depending on the consumer requirements). In the first stage, the power supply is assured from the battery pack, followed by the SOFC. Therefore, by knowing the critical load power, an adequate Simulink file is designed (Fig.2).A simple and effective energetic model has been considered. This model puts in evidence the inverter power losses at critical load conditions. A repeating table block from the Simulink tool is used in order to implement the load cycle of the residential consummer (critical load cycle, Fig.4). The available acquisition time for the load cycle was at 10 s for each sample, and two days as time interval length. By knowing the critical load power cycle, it is possible to size the required battery pack. Therefore the output inverter power, *out,inv P* , is the same with the critical load power ( *acload critical \_ load P P* , Fig.2).

The losses of the Power Conditioning System (PlossPCS=Ploss,inv) are modelled by using a quadratic function(Metwally, 2005), which is the most used one. The power loss function requires three parameters extracted from the experimental data by the least-squaresmethod.

$$P\_{loss,inv} = p\_0 + p\_1 P\_{critical\\_load} + p\_2 P\_{critical\\_load}^2 \tag{1}$$

The first parameter, *p*0, takes into account the load independent losses[W]. The second parameter, *p*1, represents the voltage drops in semiconductors as load linear proportional losses. The last term, *p*2, includes the magnetic losses [1/W], known as load ohmic losses. The PCS model has been implemented in Simulink (Fig.3) based on the following function:

$$f(u) = p \mathbf{2} \, \text{"} \, u^2 + p \mathbf{1} \, \text{"} \, u + p \mathbf{0} \, \tag{2}$$

in which the coefficients of the approximated function are as follows: p0 = 0.0035\*Prated, p1=0.005, p2=0.01/Prated.

**Figure 3.** The energetic model of the PCS

In the Fig.3. the energetic component of the PCS block is presented. By knowing the total inverter losses at critical power, *tot loss,inv P* , the corresponding DC power can be obtained:

$$P\_{DC} = P\_{out,inv} + P\_{loss,inv}^{tot} \tag{3}$$

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 225

1 1.1 1.2 1.3

0.6 0.65 0.7 0.75

Ploss[kW]

PlossPCS [kW]

<sup>0</sup> <sup>2000</sup> <sup>4000</sup> <sup>6000</sup> <sup>8000</sup> <sup>10000</sup> <sup>12000</sup> <sup>14000</sup> <sup>16000</sup> <sup>18000</sup> 0.9

time[s]

Ploss aux[kW]

<sup>0</sup> <sup>2000</sup> <sup>4000</sup> <sup>6000</sup> <sup>8000</sup> <sup>10000</sup> <sup>12000</sup> <sup>14000</sup> <sup>16000</sup> <sup>18000</sup> 0.55

time[s]

PlossPCS [kW]-loss power of the PCS

(a) (b) (c)

0.1 0.2 0.3 0.4

EDC[kWh]

Battery Capacity [Ah]

of the PCS and the auxiliary power losses.

<sup>0</sup> <sup>2000</sup> <sup>4000</sup> <sup>6000</sup> <sup>8000</sup> <sup>10000</sup> <sup>12000</sup> <sup>14000</sup> <sup>16000</sup> <sup>18000</sup> <sup>2</sup>

time[s]

PDCkW [kW]-estimated total DC Power

<sup>0</sup> <sup>2000</sup> <sup>4000</sup> <sup>6000</sup> <sup>8000</sup> <sup>10000</sup> <sup>12000</sup> <sup>14000</sup> <sup>16000</sup> <sup>18000</sup> 4.5

time[s]

PCSoutPower [kW]

2.2 2.4 2.6 2.8

5 5.5 6

PDC [kW]

PCSout [kW]

*2.3.1.2 The Normal operation mode* 

 2 2 1 2

stack mathematical model.

transport losses 1

between limit

*/*

0

*A. The Fuel Cell Power Conditioning System* 

latter design requirement is solved by DC voltage control.

*A.1 The Fuel cell stack Matlab/Simulink based model* 

*lim*

*fc <sup>I</sup>* at a certain hydrogen flow 2

*<sup>i</sup> cln i* 

**Figure 5.** (a) The load power PCSoutPower [kW], the estimated total DC power PDC[kW], including the auxiliary power loss; (b) the required capacity and energy of the battery, respectively; (c) the losses

<sup>0</sup> <sup>2000</sup> <sup>4000</sup> <sup>6000</sup> <sup>8000</sup> <sup>10000</sup> <sup>12000</sup> <sup>14000</sup> <sup>16000</sup> <sup>18000</sup> <sup>0</sup>

<sup>0</sup> <sup>2000</sup> <sup>4000</sup> <sup>6000</sup> <sup>8000</sup> <sup>10000</sup> <sup>12000</sup> <sup>14000</sup> <sup>16000</sup> <sup>18000</sup> <sup>0</sup>

time[s]

time[s]

EbatDC[kWh] DC energy

Cbatt [Ah]-estimated battery capacity

The fuel cell power conditioning system consists of fuel cell stack and DC power converter.The fuel cell is an electrochemical device which produces DC power directly, without any intermediate stage. It has high power density and zero emission of green house gases. Fuel cell stacks were connected in series/parallel combination to achieve the desired rating. The main issue for the fuel cell power converter design is the fuel cell current ripple reduction. The secondary issue is to maintain a constant DC bus voltage. The former is solved by introducing an internal current loop in the DC/DC power converter control. The

The polarization curve of the SOFC is based on Tafel equation. The output voltage of the SOFC is built taking into account the Nernst instantaneous voltage equation

*H O E aln P P* , the activation overvoltage *bln i* , the voltage variation due to the mass

first three terms are multiplied by No, number of series cells, in order to obtain the fuel cell

The parameters of the Tafel equation are the load current, the temperature and the pressures of the hydrogen and oxygen. The demanded current of the fuel cell system is limited

> 2 2 08 09 2 2

*in in H H in fc r r .q .q <sup>I</sup> K K*

The Simulink model of the FC Power System before starting must be initialized (based on *Ifc\_init.m* file, Fig.6) from the Fuel Cell data initialization block (Fig.5). In order to obtain the

*in*

and the ohmic voltage drop *Ri* (Candusso D., *et al*. 2002). The

*Hq* value (Padulles, *et al.*, 2000):

(8)

The input and the output inverter powers are related to the inverter efficiency:

$$
\eta\_{inv} = \frac{P\_{out,inv}}{P\_{DC}} \tag{4}
$$

By taking into account the power requirements of the auxiliary circuits, which are supported only by the battery pack in critical load case during the fuel cell start-up, the corresponding DC power is (Fig.4):

**Figure 4.** The power losses of the auxiliary power circuits

$$P\_{D\text{Ci}} = P\_{\text{DC}} + P\_{\text{aux}} \Longrightarrow P\_{\text{DCi}} = P\_{\text{DC}} + 0.15 P\_{\text{FC}}^{critical} \tag{5}$$

The necessary energy of the battery pack is obtained as:

$$\mathcal{W}\_{batt} = \int\_0^t P\_{D \gets i} d\tau \tag{6}$$

The blowers have been considered as main auxiliary loads; the value of 0 7 *aux .* for the equivalent efficiency of the auxiliary power circuits has been considered. In the Fig.4c, the power losses of the auxiliary power circuits have been deducted.

$$
\Delta P\_{loss,aux} = P\_{out,aux} \left(\frac{1}{\eta\_{aux}} - 1\right) \tag{7}
$$

#### *PCU Matlab/Simulink simulator results*

Based on the PCUMatlab/Simulink simulator (Fig.2, Fig. 5a), the required capacity and energy of the battery have been obtained (Fig. 5b)

**Figure 5.** (a) The load power PCSoutPower [kW], the estimated total DC power PDC[kW], including the auxiliary power loss; (b) the required capacity and energy of the battery, respectively; (c) the losses of the PCS and the auxiliary power losses.

#### *2.3.1.2 The Normal operation mode*

224 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

The input and the output inverter powers are related to the inverter efficiency:

*inv*

In the Fig.3. the energetic component of the PCS block is presented. By knowing the total

*tot*

*out ,inv*

*P*

By taking into account the power requirements of the auxiliary circuits, which are supported only by the battery pack in critical load case during the fuel cell start-up, the corresponding

> 0 *t*

The blowers have been considered as main auxiliary loads; the value of 0 7 *aux .* for the equivalent efficiency of the auxiliary power circuits has been considered. In the Fig.4c, the

<sup>1</sup> <sup>1</sup> *loss,aux out,aux*

Based on the PCUMatlab/Simulink simulator (Fig.2, Fig. 5a), the required capacity and

*P P*

*aux*

*DC*

*loss,inv P* , the corresponding DC power can be obtained:

*DC out,inv loss,inv PP P* (3)

*<sup>P</sup>* (4)

0 15 *critical DCi DC aux DCi DC FC P P P P P .P* (5)

*W Pd batt DCi* (6)

(7)

**Figure 3.** The energetic model of the PCS

inverter losses at critical power, *tot*

**Figure 4.** The power losses of the auxiliary power circuits

The necessary energy of the battery pack is obtained as:

*PCU Matlab/Simulink simulator results* 

energy of the battery have been obtained (Fig. 5b)

power losses of the auxiliary power circuits have been deducted.

DC power is (Fig.4):

#### *A. The Fuel Cell Power Conditioning System*

The fuel cell power conditioning system consists of fuel cell stack and DC power converter.The fuel cell is an electrochemical device which produces DC power directly, without any intermediate stage. It has high power density and zero emission of green house gases. Fuel cell stacks were connected in series/parallel combination to achieve the desired rating. The main issue for the fuel cell power converter design is the fuel cell current ripple reduction. The secondary issue is to maintain a constant DC bus voltage. The former is solved by introducing an internal current loop in the DC/DC power converter control. The latter design requirement is solved by DC voltage control.

#### *A.1 The Fuel cell stack Matlab/Simulink based model*

The polarization curve of the SOFC is based on Tafel equation. The output voltage of the SOFC is built taking into account the Nernst instantaneous voltage equation 2 2 1 2 0 */ H O E aln P P* , the activation overvoltage *bln i* , the voltage variation due to the mass

transport losses 1 *lim <sup>i</sup> cln i* and the ohmic voltage drop *Ri* (Candusso D., *et al*. 2002). The

first three terms are multiplied by No, number of series cells, in order to obtain the fuel cell stack mathematical model.

The parameters of the Tafel equation are the load current, the temperature and the pressures of the hydrogen and oxygen. The demanded current of the fuel cell system is limited between limit *fc <sup>I</sup>* at a certain hydrogen flow 2 *in Hq* value (Padulles, *et al.*, 2000):

$$\frac{0.8q\_{H\_2}^{in}}{2K\_r} \le I\_{fc}^{in} \le \frac{0.9q\_{H\_2}^{in}}{2K\_r} \tag{8}$$

The Simulink model of the FC Power System before starting must be initialized (based on *Ifc\_init.m* file, Fig.6) from the Fuel Cell data initialization block (Fig.5). In order to obtain the

demanded current between certain limits, an adequate Matlab function has been created(Fcn).

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 227

By using the implemented Simulink model (Fig.5), the output voltage and the output power

<sup>0</sup> <sup>2000</sup> <sup>4000</sup> <sup>6000</sup> <sup>8000</sup> <sup>10000</sup> <sup>12000</sup> <sup>14000</sup> <sup>16000</sup> <sup>0</sup>

<sup>0</sup> <sup>2000</sup> <sup>4000</sup> <sup>6000</sup> <sup>8000</sup> <sup>10000</sup> <sup>12000</sup> <sup>14000</sup> <sup>16000</sup> <sup>0</sup>

time[s]

time[s]

the output voltage of the SOFC

**Figure 8.** The solid oxide fuel cell characteristics: the power and the output voltage

<sup>8</sup> x 104 SOFC output power

*storage elements integration: Boost and Buck-Boost power converters* 

the power converters presented in Fig. 9 (Ionescu, 1997).

a

p

 (a) (b) **Figure 9.** DC-DC non-isolated converters: (a)boost; (b) buck-boost

> during 0 during 1 *a s*

*i (t) DT i (t) ( D)T*

consideration (Figure 9), operating in continuous conduction mode (CCM).

i Co

*A.3 Mathematical modeling of the DC-DC power converters for fuel cells and energy* 

In order to obtain a constant DC voltage, a boost power converter has been taken into

The method of the time averaged commutation device is applied to the unitary modeling of

io

Ud

During the *DTs* period, the active device is ON and the passive device is OFF. During the 1 *<sup>s</sup> ( D)T* period, the active device is OFF and the passive device is ON, while the passive terminal *p* is connected to the common terminal *c*. The duty factor is denoted D and *<sup>s</sup> T* is the switching period. Taking into consideration the above mentioned hypotheses, the following

*s*

*p*

c

L iL

, 0 during

during 1

*i (t) i (t) ( D)T*

*c s*

*s*

(9)

*DT*

a

p

io

Co Ro

i Co

io

Co Ro

*A.2 Simulation results* 

U

d

<sup>i</sup> <sup>L</sup> <sup>L</sup> <sup>c</sup>

instantaneous currents can be deducted:

*a*

have been obtained, as shown in Figure 7.

2 4 6

Vfc[V]

P[W]


**Figure 7.** SOFC Initial data (Padulles; Zhu)

#### *A.2 Simulation results*

226 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

**Figure 6.** The Simulink model of the solid oxide fuel cell stack

**Figure 7.** SOFC Initial data (Padulles; Zhu)

created(Fcn).

demanded current between certain limits, an adequate Matlab function has been

By using the implemented Simulink model (Fig.5), the output voltage and the output power have been obtained, as shown in Figure 7.

**Figure 8.** The solid oxide fuel cell characteristics: the power and the output voltage

## *A.3 Mathematical modeling of the DC-DC power converters for fuel cells and energy storage elements integration: Boost and Buck-Boost power converters*

In order to obtain a constant DC voltage, a boost power converter has been taken into consideration (Figure 9), operating in continuous conduction mode (CCM).

The method of the time averaged commutation device is applied to the unitary modeling of the power converters presented in Fig. 9 (Ionescu, 1997).

**Figure 9.** DC-DC non-isolated converters: (a)boost; (b) buck-boost

During the *DTs* period, the active device is ON and the passive device is OFF. During the 1 *<sup>s</sup> ( D)T* period, the active device is OFF and the passive device is ON, while the passive terminal *p* is connected to the common terminal *c*. The duty factor is denoted D and *<sup>s</sup> T* is the switching period. Taking into consideration the above mentioned hypotheses, the following instantaneous currents can be deducted:

$$\dot{i}\_a(t) = \begin{cases} \dot{i}\_a(t) & \text{during } DT\_s \\ 0 & \text{during } (1 - D)T\_s \end{cases}, \dot{i}\_p(t) = \begin{cases} 0 & \text{during } DT\_s \\ \dot{i}\_c(t) & \text{during } (1 - D)T\_s \end{cases} \tag{9}$$

**Figure 10.** (a) The equivalent three-pole for the commutation device; (b) the equivalent diagram of a time averaged model over a switching period(Ionescu, 1997)

In the similar manner, the specific instantaneous voltages are obtained:

$$u\_{cp}(t) = \begin{cases} u\_{ap}(t) & \text{during} \quad DT\_s \\ 0 & \text{during} \ (1-D)T\_s \end{cases}, u\_{ac}(t) = \begin{cases} 0 & \text{during} \ DT\_s \\ u\_{ap}(t) & \text{during} \ (1-D)T\_s \end{cases} \tag{10}$$

If averaging is carried out over a period of switching time, equations (9) - (10) will assume the equivalent form of the currents

$$\begin{cases} \dot{\mathbf{i}}\_a = \mathbf{D} \dot{\mathbf{i}}\_c \\ \dot{\mathbf{i}}\_p = (\mathbf{1} - \mathbf{D}) \dot{\mathbf{i}}\_c \end{cases} \tag{11}$$

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 229

d

, is obtained:

*<sup>i</sup> U ( D)u t L*

*i*

d *L*

<sup>1</sup> 0 1 <sup>1</sup>

1 1 <sup>1</sup> <sup>0</sup>

*o o*

By vanishing the differential terms, the steady-state regime is obtained from the above

*<sup>L</sup> xiu* ,:

1

*o L*

*<sup>U</sup> I ( D)I <sup>R</sup>*

The Battery Power Conditioning Systemconsists of a battery pack and a DC-DC power converter. The NiMH battery produces a variable DC power. The battery pack has as main

*d*

0

 

*U U*

*T*

1 1

*D*

*o*

*o*

*o o*

*d o*

*d*

(15)

*L U*

(14)

*L o o u u ( D)i tC R* 

By applying the first Kirchhoff's theorem to the Fig.11b, the first differential equation

By applying the second Kirchhoff's theorem, the second differential equation that

or, in the form <sup>d</sup> <sup>1</sup> <sup>1</sup>

The commutation mathematical model in state space form will be as following:

0 0

*<sup>u</sup> <sup>u</sup> ( D)C RC* 

*L L*

*( D) <sup>i</sup> <sup>L</sup> <sup>i</sup>*

that characterizes the output voltage dynamic state <sup>0</sup> *v* is obtained:

or, in the final form <sup>d</sup> <sup>1</sup> <sup>1</sup>

*o*

d

*L o*

*u u ( D)i C t R*

d *o o*

characterizes the inductor current dynamic state, *<sup>L</sup>*

d d *L do o <sup>i</sup> U Du L u*

The voltage <sup>0</sup> *u* is considered controlled output.

deducted dynamic state-vector <sup>0</sup>

*B. Battery Power Conditioning System* 

task to deliver the critical load power (Fig.1).

**Figure 12.** The Simulink diagram of the boost converter

*t*

1

and of voltages, respectively:

$$\begin{cases} \boldsymbol{\mu}\_{cp} = \boldsymbol{D} \, \boldsymbol{\mu}\_{ap} \\ \boldsymbol{\mu}\_{ac} = (1 - \boldsymbol{D}) \, \boldsymbol{\mu}\_{ap} \end{cases} \tag{12}$$

where, for the sake of convenience , values such as *ia* are still considered as time averaged values for a period of switching time.

To demonstrate the validity of the time-averaged commutation device model, the mathematical models for DC –DC converters, boost and boost-buck are considered.

#### *A.4 The Boost converter*

**Figure 11.** The equivalent structure of the boost converter (Ionescu, 1997)

From the Fig.11a, the following equivalent relations are obtained:

$$\begin{cases} \dot{\mathbf{i}}\_c = -\dot{\mathbf{i}}\_L\\ \boldsymbol{\mu}\_{ap} = -\boldsymbol{\mu}\_o \end{cases} \tag{13}$$

 By applying the first Kirchhoff's theorem to the Fig.11b, the first differential equation that characterizes the output voltage dynamic state <sup>0</sup> *v* is obtained:

$$(\mathbf{1} - \mathbf{D})\mathbf{i}\_L = \mathbf{C}\_o \frac{\mathbf{d}u\_o}{\mathbf{d}t} + \frac{u\_o}{R\_o} \text{ or, in the final form } \frac{\mathbf{d}u\_o}{\mathbf{d}t} = \frac{\mathbf{1}}{\mathbf{C}\_o} \left[ (\mathbf{1} - \mathbf{D})\mathbf{i}\_L - \frac{u\_o}{R\_o} \right]$$

 By applying the second Kirchhoff's theorem, the second differential equation that characterizes the inductor current dynamic state, *<sup>L</sup> i* , is obtained:

$$\text{d}\,\mathcal{U}\_d + \mathcal{D}\,\boldsymbol{\mu}\_o = L\frac{\text{d}\dot{\boldsymbol{i}}\_L}{\text{d}\,t} + \boldsymbol{\mu}\_o \text{ or, in the form} \\ \frac{\text{d}\dot{\boldsymbol{i}}\_L}{\text{d}\,t} = \frac{1}{L} \left[\mathcal{U}\_d - (1 - D)\boldsymbol{\mu}\_o\right].$$

The commutation mathematical model in state space form will be as following:

$$
\begin{bmatrix} \dot{i}\_L \\ \dot{\mu}\_0 \end{bmatrix} = \begin{bmatrix} 0 & -(1-D)\frac{1}{L} \\ (1-D)\frac{1}{C\_o} & -\frac{1}{RC\_o} \end{bmatrix} \begin{bmatrix} \dot{i}\_L \\ \mu\_0 \end{bmatrix} + \begin{bmatrix} \frac{1}{L} \\ \frac{1}{D} \end{bmatrix} \mathcal{U}\_d \tag{14}
$$

The voltage <sup>0</sup> *u* is considered controlled output.

228 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

uac <sup>a</sup> <sup>c</sup>

uap

**Figure 10.** (a) The equivalent three-pole for the commutation device; (b) the equivalent diagram of a

*s*

If averaging is carried out over a period of switching time, equations (9) - (10) will assume

1 *a c p c*

1 *cp ap ac ap*

where, for the sake of convenience , values such as *ia* are still considered as time averaged

To demonstrate the validity of the time-averaged commutation device model, the

o

*c L ap o*

*i i u u* 

Ud

i L <sup>L</sup>

L

Duo

Di

*u Du u ( D)u*

 

mathematical models for DC –DC converters, boost and boost-buck are considered.

a u

From the Fig.11a, the following equivalent relations are obtained:

 (a) (b) **Figure 11.** The equivalent structure of the boost converter (Ionescu, 1997)

o

i C

Co

o

R

io

c

Duap p

Di

*i Di i ( D)i*

  *ac*

*( D)T*

Du

Dic ic

ap

, 0 during

during 1

*u (t) u (t) ( D)T* 

*ap s*

*s*

(10)

*DT*

(11)

(12)

o

i C

Co

(13)

o

R

io

u

o

p

<sup>a</sup> <sup>c</sup> DT

s (1-D)Ts ia ic

> i p p

In the similar manner, the specific instantaneous voltages are obtained:

during

*u (t) DT*

0 during 1 *ap s*

ucp uap

(a) (b)

time averaged model over a switching period(Ionescu, 1997)

*cp*

and of voltages, respectively:

*A.4 The Boost converter* 

Ud

*u (t)*

the equivalent form of the currents

values for a period of switching time.

c i L <sup>L</sup>

 By vanishing the differential terms, the steady-state regime is obtained from the above deducted dynamic state-vector <sup>0</sup> *T <sup>L</sup> xiu* ,:

$$\begin{cases} \mathcal{U}\_0 = \mathcal{U}\_d \frac{1}{1 - D} \\ I\_o = (1 - D)I\_L = \frac{\mathcal{U}\_o}{\mathcal{R}\_o} \end{cases} \tag{15}$$

#### *B. Battery Power Conditioning System*

The Battery Power Conditioning Systemconsists of a battery pack and a DC-DC power converter. The NiMH battery produces a variable DC power. The battery pack has as main task to deliver the critical load power (Fig.1).

**Figure 12.** The Simulink diagram of the boost converter

Therefore, individual batteries are connected in series/parallel combination to achieve the desired rating. The Matlab/Simulink battery model from the Mathworks has been used. The main issue for the battery power converter is to charge/discharge battery according to the available flow power. The problem is solved by introducing an internal current loop (Fig.12) in the DC/DC power converter control (Fig.13).

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 231

<sup>2</sup> *D sign S* (17)

*max max U V LI grid inv grid* (18)

*grid I* , is the frequency

<sup>1</sup> <sup>1</sup>

2 2

In order to follow the current reference, the output DC voltage must be greater than the

After the simulation, results have confirmed the benefits of SMC control (Fig.15a). The output voltage of the converter reaches and stabilizes at the reference value of 690 V at a time of <sup>2</sup> 2 10 s (Fig.15b), a very short time in comparison with other control methods,

0 3 2

(rad/s), and *inv L* is the phase inductance (Candusso D, et al., 2002).

while the error voltage is zero (Fig.15c).

0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 <sup>0</sup>

time[s]

the output current of the boost converter

<sup>0</sup> 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 <sup>0</sup>

time[s]

inductor current of the boost converter

current and the voltage at converter output

c

Dic Duap p

i

L

L

inverter input, i.e. 690Vdc.

a

Ud

where the RMS grid voltage is *max Vgrid* , the maximal grid current is *max*

379.5 380 380.5 381

Uo[V]

Ud[V]

(a) (b) (c)

**Figure 15.** a) The converter output voltage and the reference voltage; b) Input voltage variation; c) The

<sup>0</sup> 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 <sup>379</sup>

time[s]

the output voltage of the boost converter

<sup>0</sup> 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 <sup>0</sup>

time[s]

input voltage of the boost converter

The fundamental purpose of using this converter is to raise the voltage from the fuel cell generator. Thus, the battery pack delivers 380Vdc, being the input voltage of the boost converter; the output voltage must be compatible with that of the three-phase voltage source

uo

(a) (b)

Ud

i

L

L

Udc ref[V]-Uo[V]

DiL D(U +u ) <sup>d</sup> <sup>o</sup>

uo

o

<sup>0</sup> 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 <sup>0</sup>

time[s]

The converter output voltage and the reference voltage

i C

Co

o

R

io

The advantages of this type of control are: stability, robustness and a good dynamics.

*B1. The mathematical model of the Buck-Boost power converter* 

o

i C

Co

**Figure 16.** Equivalent structure of the boost-boost converter (Ionescu, 1997)

o

R

io

following limit:

io[A]

iL[A]

## *B1. Simulink implementation of the SMC control diagram for DC-DC Boost Power Converter*

In (Gulderin Hanifi, 2005) it is shown that the existence condition of the SMC is that the output voltage must be greater than the input one.

**Figure 13.** Control of the boost converter: Cascaded DC link voltage loop and current control

The DC-link voltage control is based on the Proportional Integral (PI) controller having kp=0.00001 and ki=0.01 as parameters. The circuit parameters of the boost converter are Lboost=80\*1e-6 [H], Cboost=3240\*1e-6 [F], Rboost=20[].

The current loop is based on the sliding mode control (Fig.14); theMatlab Simulink implementation is shown in Fig.13.

**Figure 14.** Sliding mode current control

The sliding mode surface S consists of the current error:

$$S = \dot{i}\_L^\* - \dot{i}\_{L'} \tag{16}$$

which vanishes (S=0) in order to force the system to enter the sliding surface. The sliding mode controller has two functions: the control function and the modulator one. Therefore, the output control of the SMC is the duty cycle, D, of the boost power converter.

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 231

$$D = \frac{1}{2} \left( 1 - \text{sign}(\mathcal{S}) \right) \tag{17}$$

In order to follow the current reference, the output DC voltage must be greater than the following limit:

230 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

in the DC/DC power converter control (Fig.13).

output voltage must be greater than the input one.

Lboost=80\*1e-6 [H], Cboost=3240\*1e-6 [F], Rboost=20[].

The sliding mode surface S consists of the current error:

implementation is shown in Fig.13.

**Figure 14.** Sliding mode current control

*Converter* 

Therefore, individual batteries are connected in series/parallel combination to achieve the desired rating. The Matlab/Simulink battery model from the Mathworks has been used. The main issue for the battery power converter is to charge/discharge battery according to the available flow power. The problem is solved by introducing an internal current loop (Fig.12)

In (Gulderin Hanifi, 2005) it is shown that the existence condition of the SMC is that the

*B1. Simulink implementation of the SMC control diagram for DC-DC Boost Power* 

**Figure 13.** Control of the boost converter: Cascaded DC link voltage loop and current control

The DC-link voltage control is based on the Proportional Integral (PI) controller having kp=0.00001 and ki=0.01 as parameters. The circuit parameters of the boost converter are

The current loop is based on the sliding mode control (Fig.14); theMatlab Simulink

*\**

which vanishes (S=0) in order to force the system to enter the sliding surface. The sliding mode controller has two functions: the control function and the modulator one. Therefore,

the output control of the SMC is the duty cycle, D, of the boost power converter.

*L L Si i* , (16)

$$\text{CL}\_0 \ge \frac{3}{2} \sqrt{\left(V\_{grid}^{\text{max}}\right)^2 + \left(L\_{inv} \text{co} I\_{grid}^{\text{max}}\right)^2} \tag{18}$$

where the RMS grid voltage is *max Vgrid* , the maximal grid current is *max grid I* , is the frequency (rad/s), and *inv L* is the phase inductance (Candusso D, et al., 2002).

After the simulation, results have confirmed the benefits of SMC control (Fig.15a). The output voltage of the converter reaches and stabilizes at the reference value of 690 V at a time of <sup>2</sup> 2 10 s (Fig.15b), a very short time in comparison with other control methods, while the error voltage is zero (Fig.15c).

**Figure 15.** a) The converter output voltage and the reference voltage; b) Input voltage variation; c) The current and the voltage at converter output

The fundamental purpose of using this converter is to raise the voltage from the fuel cell generator. Thus, the battery pack delivers 380Vdc, being the input voltage of the boost converter; the output voltage must be compatible with that of the three-phase voltage source inverter input, i.e. 690Vdc.

The advantages of this type of control are: stability, robustness and a good dynamics.

*B1. The mathematical model of the Buck-Boost power converter* 

**Figure 16.** Equivalent structure of the boost-boost converter (Ionescu, 1997)

From the Fig.16a, the following equivalent relations are obtained:

$$\begin{cases} \dot{\mathbf{i}}\_c = \dot{\mathbf{i}}\_L\\ \boldsymbol{\mu}\_{ap} = \mathbf{U}\_d + \boldsymbol{\mu}\_o \end{cases} \tag{19}$$

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 233

<sup>0</sup> 0.005 0.01 0.015 0.02 <sup>388</sup>

time[s]

the output voltage of the buck-boost converter

<sup>0</sup> 0.005 0.01 0.015 0.02 <sup>0</sup>

time[s]

input voltage of the buck-boost converter

The buck-boost converter is necessary to connect the battery stack (Ud=Udc) to the power inverter system and it comes into operation when the electrical power demanded by consumers is higher than the electrical power obtained from the fuel cell generator. Another reason for the use of the buck-boost converter is to recharge the batteries from the other available sources. The circuit parameters of the buck boost power converter are L=100\*1e-

> 389 390 391

Uo[V]

Ud[V]

(a) (b)

Thanks to the buck boost current controller, the actual inductor current follows the reference current. In the output current a delay of 0.001 s could be found (Fig.19a). The input voltage of the buck-boost converter, Ud, is about 390 Vdc and it is delivered from the battery stack,

**Figure 19.** The simulation results of the buck-boost power converter

<sup>0</sup> 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 <sup>0</sup>

time[s]

the output current of the buck-boost converter

<sup>0</sup> 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 <sup>0</sup>

time[s]

inductor current of the buck-boost converter

while the output voltage, Uo, is boosted at 690 Vdc (Fig.19b).

**Figure 18.** Buck-boost current controller

5[H], C=500\*1e-8[F], R=50[].

5 10 15

io[A]

iL[A]

**Figure 20.** The Power Source Selector

 Following the above procedure applied to the boost power converter, the dynamic model of the buck boost converter is deducted :

$$\begin{cases} \frac{\mathbf{d}i\_L}{\mathbf{d}t} = \frac{1}{L} \left[ DUI\_d - (1 - D)u\_o \right] \\ \frac{\mathbf{d}u\_o}{\mathbf{d}t} = \frac{1}{C\_o} \left[ (1 - D)i\_L - \frac{u\_o}{R\_o} \right] \end{cases} \tag{20}$$

and the steady state regime, respectively:

$$\begin{cases} \mathcal{U}\_0 = \mathcal{U}\_d \frac{D}{1 - D} \\\\ I\_o = (1 - D)I\_L = \frac{\mathcal{U}\_o}{R\_o} \end{cases} \tag{21}$$

#### *B.2. The Simulink model of the Buck Boost power converter*

Both the buck boost power converter and the current controller have been implemented and simulated in Simulink (Fig.17).

**Figure 17.** Simulink diagram of the buck-boost converter

#### *B.2.1 The Current Controller*

By imposing the inductor current reference (ILref, Fig.18), the current controller will assure the fast reference tracking at the same time with delivering the appropriate duty cycles (D). By introducing an anti-parallel diode for each active power device, a bidirectional buckboost converter is obtained.

**Figure 18.** Buck-boost current controller

*c L*

*i i*

<sup>d</sup> <sup>1</sup> <sup>1</sup>

<sup>0</sup> 1 1

*<sup>D</sup> U U*

*d*

*o L*

*<sup>U</sup> I ( D)I <sup>R</sup>*

Both the buck boost power converter and the current controller have been implemented and

By imposing the inductor current reference (ILref, Fig.18), the current controller will assure the fast reference tracking at the same time with delivering the appropriate duty cycles (D). By introducing an anti-parallel diode for each active power device, a bidirectional buck-

<sup>d</sup> <sup>1</sup> <sup>1</sup>

 

 

*ap d o*

(19)

(21)

(20)

*u Uu*

Following the above procedure applied to the boost power converter, the dynamic

*o o*

*u u ( D)i tC R*

 

*<sup>i</sup> DU ( D)u t L*

*d o*

*L o o*

*D*

*o*

*o*

From the Fig.16a, the following equivalent relations are obtained:

d

*L*

d

model of the buck boost converter is deducted :

*B.2. The Simulink model of the Buck Boost power converter* 

**Figure 17.** Simulink diagram of the buck-boost converter

and the steady state regime, respectively:

simulated in Simulink (Fig.17).

*B.2.1 The Current Controller* 

boost converter is obtained.

The buck-boost converter is necessary to connect the battery stack (Ud=Udc) to the power inverter system and it comes into operation when the electrical power demanded by consumers is higher than the electrical power obtained from the fuel cell generator. Another reason for the use of the buck-boost converter is to recharge the batteries from the other available sources. The circuit parameters of the buck boost power converter are L=100\*1e-5[H], C=500\*1e-8[F], R=50[].

**Figure 19.** The simulation results of the buck-boost power converter

**Figure 20.** The Power Source Selector

Thanks to the buck boost current controller, the actual inductor current follows the reference current. In the output current a delay of 0.001 s could be found (Fig.19a). The input voltage of the buck-boost converter, Ud, is about 390 Vdc and it is delivered from the battery stack, while the output voltage, Uo, is boosted at 690 Vdc (Fig.19b).

*C. Power Source Management (PSM) (Fig.20)* 

The purpose of the PSM is to assure an adequate DC-link voltage to the power inverter from both power source generators: the solid oxide fuel cell stack and the battery pack.

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 235

1 s

**Figure 23.** The Simulink model of the Grid Power Inverter for Renewable Energy Sources Integration

**Figure 22.** VSI PLL showing switched reference frequency

EAB EBC

ABC/dq

Filter

ED EQ fixed

with DC link Load Current Estimator

**Figure 24.** Feedback Signals Acquisition measurement block

(a) (b)

**Figure 25.** (a)Active Load Power Calculation block; (b) 2/3 phase transformation block

The final DC link voltage (VDC\_inverter, Fig.21) is delivered to the Voltage Source Inverter (VSI) by the Power Source Management block (Fig.20).

**Figure 21.** The power sources interconnection

## **3. Inverter modelling and control**

The fundamental types of control can be classified into two categories: current control and voltage control. When the inverter is connected to the network, the network controls the amplitude and frequency of the inverter output and the inverter operates in current control mode. The classical current control can lead to other control methods can be obtained such as active and reactive power control/voltage control. If the network being power injected is not available due to improper network parameters, the inverter will autonomously supply the load; consequently it adequately supplies the alternative voltage in amplitude and frequency and it is not affected by network black outs. In this case, the inverter will control the voltage. The 50 Hz frequency is assured by a phase-locked loop (PLL) control. The grid converter is a full-bridge IGBT transistor-based converter and it normally operates in inverter mode such that the energy is transferred from the hybrid source to the utility grid and/or to the load. When the system is operating in **grid-connected mode**, the PLL tracks the grid voltage to ensure synchronization; but when the system enters in **islanding mode of operation**, the VSI can no longer track the grid characteristics. As seen in Fig. 22, the PLL for the VSI changes the frequency which is sent to the pure integrator for angle calculation by switching between the frequency from the filter and that from another fixed reference. In the islanding mode of operation the VSI needs to have an external frequency reference provided, fixed (Fig.22). The PLL for the VSI is the main catalyst for the re-synchronization and re-closure of the system to the Utility once disturbances have passed. The frequency from the filter is used during the grid-connected mode.

**Figure 22.** VSI PLL showing switched reference frequency

both power source generators: the solid oxide fuel cell stack and the battery pack.

The purpose of the PSM is to assure an adequate DC-link voltage to the power inverter from

The final DC link voltage (VDC\_inverter, Fig.21) is delivered to the Voltage Source Inverter

The fundamental types of control can be classified into two categories: current control and voltage control. When the inverter is connected to the network, the network controls the amplitude and frequency of the inverter output and the inverter operates in current control mode. The classical current control can lead to other control methods can be obtained such as active and reactive power control/voltage control. If the network being power injected is not available due to improper network parameters, the inverter will autonomously supply the load; consequently it adequately supplies the alternative voltage in amplitude and frequency and it is not affected by network black outs. In this case, the inverter will control the voltage. The 50 Hz frequency is assured by a phase-locked loop (PLL) control. The grid converter is a full-bridge IGBT transistor-based converter and it normally operates in inverter mode such that the energy is transferred from the hybrid source to the utility grid and/or to the load. When the system is operating in **grid-connected mode**, the PLL tracks the grid voltage to ensure synchronization; but when the system enters in **islanding mode of operation**, the VSI can no longer track the grid characteristics. As seen in Fig. 22, the PLL for the VSI changes the frequency which is sent to the pure integrator for angle calculation by switching between the frequency from the filter and that from another fixed reference. In the islanding mode of operation the VSI needs to have an external frequency reference provided, fixed (Fig.22). The PLL for the VSI is the main catalyst for the re-synchronization and re-closure of the system to the Utility once disturbances have passed.

The frequency from the filter is used during the grid-connected mode.

*C. Power Source Management (PSM) (Fig.20)* 

**Figure 21.** The power sources interconnection

**3. Inverter modelling and control** 

(VSI) by the Power Source Management block (Fig.20).

**Figure 23.** The Simulink model of the Grid Power Inverter for Renewable Energy Sources Integration with DC link Load Current Estimator

**Figure 24.** Feedback Signals Acquisition measurement block

**Figure 25.** (a)Active Load Power Calculation block; (b) 2/3 phase transformation block

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 237

DC, DC voltage feedback signal (VDC), AC input

was introduced in order to increase the dynamic response of the bus voltage to load

voltages (Eab and Ebc), current feedback signals (Ia, Ib), and the load power signal (got through a load power estimator) (Gaiceanu, 2004a), the Digital Signal Processor-based software operates the control of the power inverter (DC link voltage and current loops) system and generates the firing gate signals to the PWM modulator (Fig.27). The grid connected PWM inverter supplies currents into the utility line by maintaining the system power balance. By controlling the power flow in power conditioning system, the unidirectional DC-link voltage can be kept at a constant value. Using the synchronous rotating frame the active power is controlled independently by the*q*-axis current whereas

The control of the grid inverter is based on the minor current loop in a synchronous rotating-frame with a feedforward load current component added in the reference, completed with the DC voltage control loop in a cascaded manner.The outer loop controller consists of two parts: the phase-locked loop (PLL) and the DC link voltage controller. The former, the PLL, is used to extract the fundamental frequency component of the grid voltages and it also generates the corresponding quadrature signals in *d-q* synchronous reference frame, *E*d-*E*q, which are necessary to calculate the active and reactive power of the grid. The latter monitors the power control loop. The power control of the PWM inverter, is based on the power detection feedforward control loop and the DC-voltage feedback control loop (Fig.27). The main task of the voltage controller is to maintain the DC link voltage to a certain value. Another task is to control the grid converter power flow. The task of the DC link voltage and of the current regulation has been accomplished by means of the Proportional-Integral (PI) controller type, because of its good steady-state and dynamic behavior with the power inverter. It is important to underline that the PI controller performances are parameters sensitive, because of its design procedure, based on the DC bus capacitor and inductor values. However, in these specific applications, the system parameters values are known with reasonable accuracy. The design of the linear control systems can be carried out in either the time or the frequency domain. The relative stability is measured in terms of **gain margin,** and**phase margin.** These are typical frequency-domain

specifications and should be used in conjunction with such tools as Bode plot.

<sup>1</sup> <sup>1</sup> *PIc pc*

The calculation of the PI controller coefficients, *K*pc (proportional gain) and *T*ic (integral time), is done imposing the phase margin mc (in radian) and the bandwidth,c, (in radian per second). Imposing these two conditions, the following relations for *K*pc and *T*ic are

*C (s) K T s*

*ic*

(22)

 

The transfer function of the PI controller (Gaiceanu, 2007b) has the form:

obtained(Gaiceanu, 2007b):

changes.

On the basis of the DC voltage reference V\*

the reactive power can be controlled by the *d*-axis current.

**Figure 26.** Block diagram of RES, Grid inverter, Local Load and grid interconnection

The Grid Power Inverter for Renewable Energy Sources Integration is of 37kVA and delivers the power to the grid (simulated as three-phase programmable voltage source in Fig. 23) and the necessary power to the consumers (simulated as three-phase parallel RLC load in Fig. 23). There is an adequate boost inductor (three-phase series RL branch, Fig. 23) between the grid and the inverter. In order to calculate the *dq* components of the grid current, (ID, IQ), the Feedback Signals Acquisition block is used (Fig. 24). Through the implemented Simulink blocks (Figs.25a, 25b), the active power of the load is known.

**Figure 27.** Proposed control system for grid inverter

### **3.1. The grid inverter control**

The grid inverter control block delivers the corresponding duty-cycles to the Power Inverter (Gate\_Pulses in Fig.23 or SW\* ABC in Fig. 26). To achieve full control of the utility-grid current, the DC-link voltage must be boosted to a level higher than the amplitude of the grid lineline voltage. The power flow of the grid side inverter is controlled in order to keep the DClink voltage constant. The structure of the DC/AC converter control system is shown in Fig. 27. The control structure of the power inverter is of vector control type and it uses the power balance concept (Sul and Lipo, 1990). Therefore, the load current feedforward component was introduced in order to increase the dynamic response of the bus voltage to load changes.

236 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

Local Load

**Figure 26.** Block diagram of RES, Grid inverter, Local Load and grid interconnection

Simulink blocks (Figs.25a, 25b), the active power of the load is known.

Grid inverter

PWM modulator

V \* <sup>A</sup> V \* <sup>B</sup> V \* C

V \* <sup>d</sup> V \* q

Current regulator

VDC <sup>E</sup>

Poutt

Load current feedforward.

currents Ia, Ib

V

Power control

DC link voltage regulator

> V \* DC

SW \* A,B,C

The Grid Power Inverter for Renewable Energy Sources Integration is of 37kVA and delivers the power to the grid (simulated as three-phase programmable voltage source in Fig. 23) and the necessary power to the consumers (simulated as three-phase parallel RLC load in Fig. 23). There is an adequate boost inductor (three-phase series RL branch, Fig. 23) between the grid and the inverter. In order to calculate the *dq* components of the grid current, (ID, IQ), the Feedback Signals Acquisition block is used (Fig. 24). Through the implemented

output

The grid inverter control block delivers the corresponding duty-cycles to the Power Inverter

the DC-link voltage must be boosted to a level higher than the amplitude of the grid lineline voltage. The power flow of the grid side inverter is controlled in order to keep the DClink voltage constant. The structure of the DC/AC converter control system is shown in Fig. 27. The control structure of the power inverter is of vector control type and it uses the power balance concept (Sul and Lipo, 1990). Therefore, the load current feedforward component

ABC in Fig. 26). To achieve full control of the utility-grid current,

I inDC <sup>I</sup> outDC

C

input

Fuel cell

Renewable Energy Source

Grid inverter

PCC

Utility Grid

**Figure 27.** Proposed control system for grid inverter

Input voltages Eab, Ebc

PLL

<sup>L</sup> <sup>E</sup>

Network interface

**3.1. The grid inverter control** 

(Gate\_Pulses in Fig.23 or SW\*

On the basis of the DC voltage reference V\* DC, DC voltage feedback signal (VDC), AC input voltages (Eab and Ebc), current feedback signals (Ia, Ib), and the load power signal (got through a load power estimator) (Gaiceanu, 2004a), the Digital Signal Processor-based software operates the control of the power inverter (DC link voltage and current loops) system and generates the firing gate signals to the PWM modulator (Fig.27). The grid connected PWM inverter supplies currents into the utility line by maintaining the system power balance. By controlling the power flow in power conditioning system, the unidirectional DC-link voltage can be kept at a constant value. Using the synchronous rotating frame the active power is controlled independently by the*q*-axis current whereas the reactive power can be controlled by the *d*-axis current.

The control of the grid inverter is based on the minor current loop in a synchronous rotating-frame with a feedforward load current component added in the reference, completed with the DC voltage control loop in a cascaded manner.The outer loop controller consists of two parts: the phase-locked loop (PLL) and the DC link voltage controller. The former, the PLL, is used to extract the fundamental frequency component of the grid voltages and it also generates the corresponding quadrature signals in *d-q* synchronous reference frame, *E*d-*E*q, which are necessary to calculate the active and reactive power of the grid. The latter monitors the power control loop. The power control of the PWM inverter, is based on the power detection feedforward control loop and the DC-voltage feedback control loop (Fig.27). The main task of the voltage controller is to maintain the DC link voltage to a certain value. Another task is to control the grid converter power flow. The task of the DC link voltage and of the current regulation has been accomplished by means of the Proportional-Integral (PI) controller type, because of its good steady-state and dynamic behavior with the power inverter. It is important to underline that the PI controller performances are parameters sensitive, because of its design procedure, based on the DC bus capacitor and inductor values. However, in these specific applications, the system parameters values are known with reasonable accuracy. The design of the linear control systems can be carried out in either the time or the frequency domain. The relative stability is measured in terms of **gain margin,** and**phase margin.** These are typical frequency-domain specifications and should be used in conjunction with such tools as Bode plot.

The transfer function of the PI controller (Gaiceanu, 2007b) has the form:

$$\mathbf{C}\_{Plc}(\mathbf{s}) = \mathbf{K}\_{pc} \left( \mathbf{1} + \frac{\mathbf{1}}{T\_{ic}s} \right) \tag{22}$$

The calculation of the PI controller coefficients, *K*pc (proportional gain) and *T*ic (integral time), is done imposing the phase margin mc (in radian) and the bandwidth,c, (in radian per second). Imposing these two conditions, the following relations for *K*pc and *T*ic are obtained(Gaiceanu, 2007b):

$$\begin{cases} T\_{ic} = \frac{1}{\text{co}\_c \cdot \tan\left(-\frac{\pi}{2} - \phi\_{mc}\right)}\\\\ K\_{pc} = \frac{-T\_{ic} \cdot \text{co}\_c^2 \cdot L}{\sqrt{1 + \left(T\_{ic} \cdot \text{co}\_c\right)^2}} \end{cases} \tag{23}$$

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 239

**Figure 30.** (a) The PI regulator of the PLL (b) The integrator for angle calculation (c) *dq* grid voltage

By using a decoupling of the nonlinear terms, the cross coupling (due to boost input inductance) between the *d* and *q* axes was compensated. To decouple current loops, the

proper utility voltage components have been added (Gaiceanu, 2004b) (Fig 32).

**Figure 31.** The Simulink structure of the DC/AC converter control system

components: ED, EQ

**3.3. The current controllers** 

**Figure 32.** Voltage decoupling control

#### **3.2. The Phase Locked Loop (PLL)**

A phase locked loop (PLL) ensures the synchronization of the reference frame with the source phase voltages by maintaining their *d* component at zero (*E*d=0) through a PI controller; the grid frequency is delivered by knowing the line-line grid voltages (EBA, EBC), as in Figs.28, 29.

(a) line-line to three phase

(b) (A,B,C)-(alfa, beta)

**Figure 28.** The transformation of the coordinates

**Figure 29.** (a) Calculus of the required PLL's input trigonometric functions (b) PLL

**Figure 30.** (a) The PI regulator of the PLL (b) The integrator for angle calculation (c) *dq* grid voltage components: ED, EQ

**Figure 31.** The Simulink structure of the DC/AC converter control system

#### **3.3. The current controllers**

238 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

*ic*

*T*

*pc*

*K*

**3.2. The Phase Locked Loop (PLL)** 

**Figure 28.** The transformation of the coordinates

EBC), as in Figs.28, 29.

*ic c*

1

 

2

(23)

2

*ic c*

*T*

A phase locked loop (PLL) ensures the synchronization of the reference frame with the source phase voltages by maintaining their *d* component at zero (*E*d=0) through a PI controller; the grid frequency is delivered by knowing the line-line grid voltages (EBA,

(a) line-line to three phase

(b) (A,B,C)-(alfa, beta)

**Figure 29.** (a) Calculus of the required PLL's input trigonometric functions (b) PLL

*T L*

*tan*

2

1

*c mc*

By using a decoupling of the nonlinear terms, the cross coupling (due to boost input inductance) between the *d* and *q* axes was compensated. To decouple current loops, the proper utility voltage components have been added (Gaiceanu, 2004b) (Fig 32).

**Figure 32.** Voltage decoupling control

Fig.33 shows the Simulink implementation of the reverse transformation from synchronous reference frame (d,q) tofixed reference frame (A,B,C) through the (alfa,beta) transformations. MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 241

*dc dcin dcout pCV (p) I (p) I (p)* (24)

*dcin dc dcout I (p) pCV (p) I (p)* (25)

such that the error between

(26)

The estimator (Fig. 34), after some manipulations (Fig.35), gets the form presented in the Fig.

k+pC <sup>k</sup> 1/p + - ^ Idcout(p) Idcout(p)

> k C

^ Idcout(p)

p2 +p+1

Idcout(p) 1

36.

or:

Fig.36, is given by:

**Figure 36.** The simplified diagram of the DC load

**Figure 37.** The final second order estimator

**4.1. Calculus of the estimator parameters** 

Using Laplace transform the DC link voltage equation gets the form

The problem consists of the calculation of the parameters *k* and

Considering a step variation for the *Idcout(p),* by setting:

*^*

the estimated DC load current gets the form

This means that the block diagram from Fig.35 can be redrawing as in Fig. 36.

*^ dcout dcout I (p) G(p) I (p) <sup>C</sup>*

the estimated DC load current *I^dcout(p)*and the actual DC load current *Idcout(p)* to be insignificant. The closed loop transfer function of the estimator, (Fig.37), derived from

*dcout <sup>I</sup> I (p)*

2

1

*p p <sup>k</sup>*

*dcout*

1

2

*dcout dcout I (p) I <sup>C</sup> p(p p ) <sup>k</sup>* 

1

1

*<sup>p</sup>* (27)

(28)

**Figure 33.** Reverse voltage transformation

## **4. The DClink current estimator**

The load power (*P*load=*P*out) is calculated from the load inverter terminals. Another method is to estimate the load power from the DC link, indirectly, through a first or second order DC load current estimator (Gaiceanu, 2004a). The power feedforward control (Uhrin, 1994) allows the calculus of the input current reference based on the generated power, and it satisfies the power balance in a feedforward manner. By using the load feedforward control, the input reference of the current is changed with load, thus it is obtained a better transient response. The increase in the power response of the DC-AC inverter leads to the possibility of reduction the size of the DC link capacitor by maintaining the stability of thesystem.

The block diagram of the second degree estimator is presented in the Fig. 34, where the input needs the measure of the DC link voltage *Vdc(p)* and the calculus of the input ac load current component *Iq*. The output of the estimator is the estimated DC link load power *P^dcout(p)* .

**Figure 34.** The second order dc link load power estimator

**Figure 35.** The redrawing estimator

The estimator (Fig. 34), after some manipulations (Fig.35), gets the form presented in the Fig. 36.

**Figure 36.** The simplified diagram of the DC load

$$\begin{array}{c} \mathbf{I}\_{\text{dcount}} (\mathbf{p}) \xrightarrow{\begin{bmatrix} 1 & \\ \end{bmatrix}} \begin{array}{c} \hat{\mathbf{I}}\_{\text{dcount}} (\mathbf{p})\\ \mathbf{p}^2 \xrightarrow{\begin{subarray}{c} \pi \mathbf{C} \end{subarray}} \mathbf{\pi} \mathbf{\pi} + 1 \end{array} \end{array}$$

**Figure 37.** The final second order estimator

Using Laplace transform the DC link voltage equation gets the form

$$p\mathbb{C}V\_{dc}(p) = I\_{dc\dot{m}}(p) - I\_{d\text{cout}}(p) \tag{24}$$

or:

240 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

Fig.33 shows the Simulink implementation of the reverse transformation from synchronous reference frame (d,q) tofixed reference frame (A,B,C) through the (alfa,beta) transformations.

(a) DQ-ABC (b) DQ-(alfa, beta) (c) (alfa,beta)-(A,B,C)

The load power (*P*load=*P*out) is calculated from the load inverter terminals. Another method is to estimate the load power from the DC link, indirectly, through a first or second order DC load current estimator (Gaiceanu, 2004a). The power feedforward control (Uhrin, 1994) allows the calculus of the input current reference based on the generated power, and it satisfies the power balance in a feedforward manner. By using the load feedforward control, the input reference of the current is changed with load, thus it is obtained a better transient response. The increase in the power response of the DC-AC inverter leads to the possibility of reduction the size of the DC link capacitor by maintaining the stability of thesystem.

The block diagram of the second degree estimator is presented in the Fig. 34, where the input needs the measure of the DC link voltage *Vdc(p)* and the calculus of the input ac load current component *Iq*. The output of the estimator is the estimated DC link load power


1/pC k 1/p

1/p Idcout(p)

Idcout(p)

Pdcout(p) ^

+

k

k+pC

**Figure 33.** Reverse voltage transformation

**4. The DClink current estimator** 

**Figure 34.** The second order dc link load power estimator


Idcin(p)


pC

Vdc(p)

Idcin(p) <sup>+</sup>


**Figure 35.** The redrawing estimator

*P^dcout(p)* .

$$I\_{dcin}(p) - p\mathcal{C}V\_{dc}(p) = I\_{dcout}(p) \tag{25}$$

This means that the block diagram from Fig.35 can be redrawing as in Fig. 36.

#### **4.1. Calculus of the estimator parameters**

The problem consists of the calculation of the parameters *k* and such that the error between the estimated DC load current *I^dcout(p)*and the actual DC load current *Idcout(p)* to be insignificant. The closed loop transfer function of the estimator, (Fig.37), derived from Fig.36, is given by:

$$G(p) = \frac{\stackrel{\frown}{I\_{dcount}}(p)}{I\_{dcount}(p)} = \frac{1}{p^2 \frac{\pi \text{C}}{k} + p\pi + 1} \tag{26}$$

Considering a step variation for the *Idcout(p),* by setting:

$$I\_{dcount}(p) = \frac{I\_{dcount}}{p} \tag{27}$$

the estimated DC load current gets the form

$$\hat{I}\_{dcount}(p) = I\_{dcount} \frac{1}{p(p^2 \frac{\text{rC}}{k} + p\tau + 1)}\tag{28}$$

The usual form of the equation (28) is given by

**Figure 38.** Simulink implementation of the DC link load current estimator

$$\hat{I}\_{dcount}(p) = I\_{dcount} \frac{1}{p(T\_0^2 p^2 + 2\xi T\_0 p + 1)}\tag{29}$$

where the damping factor is

$$
\xi = \frac{\mathbf{r} \cdot \mathbf{o}\_0}{2} \tag{30}
$$

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 243

, (33)

2

0

*ln( . )* 0 05 1

<sup>0</sup> 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -1

time[s]

coseps-cosgamma ref

<sup>0</sup> 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -1

time[s]


Reactive current of the converter [A]

[V]

sineps-singamma ref

**Figure 41.** The comparison of the grid voltage and the converter voltage (Ed,Vdref), (Eq, Vqref) and

0.05 0.1 0.15 0.2 -20

time[s]

Iq-Iqref [A]

0.05 0.1 0.15 0.2 <sup>20</sup>

time[s]

Ed -Vdref [V]

An advantage of the estimated method is that there is no ripple presence in the feed-forward reference current of the source side. The small reference current ripple is delivered from the

0.05 0.1 0.15 0.2 <sup>0</sup>

time[s]

Id-Idref [A]

<sup>0</sup> 0.05 0.1 0.15 0.2 -0.02

time[s]

Eq, Vqref [V]

*t a*

**Figure 40.** The input and the output signals of the PLL circuit


Load(active)current of the converter [A]

[V]


Cosinus of the PLLs angles [rad]


Sinus of the PLLs angles[rad]

the performances of the current controllers

output of the DC link voltage controller.

and a minimum output noise.

and the pulsation factor

$$
\cos\_0^2 = \frac{1}{T\_0^2} = \frac{\pi}{k \cdot \text{C}} \tag{31}
$$

**Figure 39.** The frequency of the line voltage. The acquisition of the grid line voltages (EAB,EBC) and the phase transformation (EA, EB).

The parameters *k* and are chosen such that the response *I^dcout*(*p*) to have an acceptable overshoot

$$\sigma = e^{-\frac{\pi \xi}{\sqrt{1-\xi^2}}},\tag{32}$$

a small step time response

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 243

2 0 *ln( . )* 0 05 1 *t a* , (33)

and a minimum output noise.

242 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3

**Figure 38.** Simulink implementation of the DC link load current estimator

*^*

where the damping factor is

and the pulsation factor

the phase transformation (EA, EB).

The parameters *k* and

a small step time response

overshoot

2 2 0 0 1

0 2

Grid phase voltages [V]

input line grid voltages

2 0 2 0 1 *T k C* 

<sup>0</sup> 0.05 0.1 0.15 0.2 314.12

time[s]

EA=f(t)

<sup>0</sup> 0.05 0.1 0.15 0.2 -400

time[s]

omega [rad/s]

314.14 314.16 314.18 314.2

A phase grid voltage [V]

omegapll [rad/s]

**Figure 39.** The frequency of the line voltage. The acquisition of the grid line voltages (EAB,EBC) and

<sup>2</sup> <sup>1</sup> *e* 

are chosen such that the response *I^dcout*(*p*) to have an acceptable

<sup>0</sup> 0.05 0.1 0.15 0.2 -1000

<sup>0</sup> 0.05 0.1 0.15 0.2 -400

time[s]

time[s]

EA-EB

EAB, EBC

, (32)

2 1

*dcout dcout I (p) I p(T p T p )* (29)

(30)

(31)

The usual form of the equation (28) is given by

**Figure 40.** The input and the output signals of the PLL circuit

**Figure 41.** The comparison of the grid voltage and the converter voltage (Ed,Vdref), (Eq, Vqref) and the performances of the current controllers

An advantage of the estimated method is that there is no ripple presence in the feed-forward reference current of the source side. The small reference current ripple is delivered from the output of the DC link voltage controller.

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 245

Active (k) and reactive power-method1

<sup>0</sup> 0.05 0.1 0.15 0.2 -10

time[s]

Active (k) and reactive power-method3

<sup>0</sup> 0.05 0.1 0.15 0.2 <sup>0</sup>

time[s]

[kW]

[kW]

**Figure 44.** The unitary power factor operation and comparison results of the three methods of active

Active\_power1(i)=Ein\*Iqff\*cos(fi)/1000;

Reactive\_power1(i)=Ein\*Iqff\*sin(fi)/1000;

 Active\_power2(i)=3\*(Ed\*Id+Eq\*Iq)/2/1000; Reactive\_power2(i)=3\*(Eq\*Id-Ed\*Iq)/2/1000;

<sup>0</sup> 0.05 0.1 0.15 0.2 <sup>0</sup>

time[s]

Active (k) and reactive power-method 2

<sup>0</sup> 0.05 0.1 0.15 0.2 <sup>0</sup>

time[s]

%First Method % power factor fi=atan(Id/Iq); PF(i)=cos(fi); % Active Power [kW]

% Reactive Power

% Second Method

% Third Method

Power factor

0.5 1 1.5 2

[kW]

PF

The reference and actual *d* axis current waveforms (Id-Idref) are shown in Fig.41 proving the

The DC link voltage step response was obtained by using a DC link voltage test generator (Fig.42) under a load current variation between [0.65, 1.15]IN (Fig.41), IN being the rated

 Active\_power3(i)=(Valfa\*Ialfa+Vbeta\*Ibeta)/1000; Reactive\_power3(i)=(Vbeta\*Ialfa-Valfa\*Ibeta)/1000;

The performances of the active current inverter control are shown in Fig.41. The actual active current, *I*q, accurately follows the reference *I*qref (Fig.41). In Fig. 42 the performances of DC-link voltage controllers are shown. The trace of the A phase of the line current is in phase with A phase of the grid voltage, which clearly demonstrates the unity power factor

and reactive power deduction

value of the line current.

cancellation of the reactive power.

**Figure 42.** DC link voltage reference, Actual DC link voltage.

**Figure 43.** Waveforms showing the unity power factor operation: A, B, C phase grid voltages and the corresponding IA, IB, IC line currents. Simulation results. Idc- the current through the DC link capacitor

#### **4.2. Simulation results**

Fig. 41 shows the comparison of the grid voltage and the converter voltage (Ed,Vdref): the Ed component is 0 and the voltage Vdref is calculated as Vdref =om\*Lin\*IqN+Ed in steady state regime (Gaiceanu, 2007a). The voltages Eqref and Vqref have the same value of 326.55[V].

**Figure 42.** DC link voltage reference, Actual DC link voltage.

VC [V]-IC[A]

A phase voltage-input line current

<sup>0</sup> 0.05 0.1 0.15 0.2 -400

<sup>0</sup> 0.05 0.1 0.15 0.2 -400

time[s]

time[s]

VC-IC: Unity power factor

VA-IA: Unity power factor

DC-link voltages [V]

**4.2. Simulation results** 

326.55[V].

**Figure 43.** Waveforms showing the unity power factor operation: A, B, C phase grid voltages and the corresponding IA, IB, IC line currents. Simulation results. Idc- the current through the DC link capacitor

<sup>0</sup> 0.05 0.1 0.15 0.2 -400

time[s]

Idc-Idc discret

0.05 0.1 0.15 0.2 -40

time[s]

B phase voltage-input line current

0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 <sup>620</sup>

time[s]

[A]

VB[V]-IB[A]

Vdc-Vdcref [V]

Fig. 41 shows the comparison of the grid voltage and the converter voltage (Ed,Vdref): the Ed component is 0 and the voltage Vdref is calculated as Vdref =om\*Lin\*IqN+Ed in steady state regime (Gaiceanu, 2007a). The voltages Eqref and Vqref have the same value of

**Figure 44.** The unitary power factor operation and comparison results of the three methods of active and reactive power deduction

The reference and actual *d* axis current waveforms (Id-Idref) are shown in Fig.41 proving the cancellation of the reactive power.

The DC link voltage step response was obtained by using a DC link voltage test generator (Fig.42) under a load current variation between [0.65, 1.15]IN (Fig.41), IN being the rated value of the line current.

The performances of the active current inverter control are shown in Fig.41. The actual active current, *I*q, accurately follows the reference *I*qref (Fig.41). In Fig. 42 the performances of DC-link voltage controllers are shown. The trace of the A phase of the line current is in phase with A phase of the grid voltage, which clearly demonstrates the unity power factor operation (Fig. 43). Comparative waveforms showing unity power factor operation during regeneration obtained from DC-AC power converter are shown in Fig. 43. For all three methods of active and reactive power deduction (Fig.44) the steady state values are the same, however the first method is more accurate in transient regime (Fig.44) (Gaiceanu, 2004b).

MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 247

**Figure 47.** Real time implementation of the current control by using dSpace 1103 platform

**Figure 48.** The three phase load currents, the corresponding duty cycles, the actual and the reference

**Figure 49.** The three phase load currents, the corresponding duty cycles, the actual and the reference

line currents for the accurate tuning of the current regulator parameters: Kp=18, Ki=105

line currents for the inaccurate tuning of the current regulator parameters: Kp=9, Ki=42

The 2nd degree DC link current estimator was implemented for a 37kVA power inverter. The dynamic performances of the DC load current estimator are presented (Gaiceanu, 2004a).

By an adequate choice of the estimator parameters an acceptable step response can be obtained (Fig.45).

Through simulation (Figs. 45-46) the real and the estimated DC link currents are obtained.

The power semiconductor active devices operate with a switching time Ts=125μs, and a 2μs dead time. The converter specifications are given as follows: Supply voltage (line-to-line): 400V; Main frequency: 50Hz, Line current: 69A, Line inductance: 0.5 mH, DC bus capacitor: 1000 μF, Ambient temperature 400C,DC voltage reference: 690V.

**Figure 45.** Simulation results. The real DC load current Idcout, the estimated DC link current I^dcout.

**Figure 46.** Simulation results. The real DC link current Idc, the estimated DC link current I^dc

## **5. dSpace implementation**

The PI Current Control in Synchronously Reference Frame is shown in Fig.47. The current regulators have two tasks: the error cancelling, and the modulation (the appropriate switching states are provided).

For an adequate tuning of the current regulators, the actual load current, iA, accurately follows its reference i\*A (Fig. 49), despite of an inappropriate tuning of the current controllers (Fig.48).

**Figure 47.** Real time implementation of the current control by using dSpace 1103 platform

2004b).

real Idcout-estimated Idcout [A]

obtained (Fig.45).

**5. dSpace implementation** 

real IDC- estimated IDC [A]

<sup>0</sup> 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 <sup>0</sup>

time[s]

Real DC-load current-Estimated DC-load current

switching states are provided).

operation (Fig. 43). Comparative waveforms showing unity power factor operation during regeneration obtained from DC-AC power converter are shown in Fig. 43. For all three methods of active and reactive power deduction (Fig.44) the steady state values are the same, however the first method is more accurate in transient regime (Fig.44) (Gaiceanu,

The 2nd degree DC link current estimator was implemented for a 37kVA power inverter. The dynamic performances of the DC load current estimator are presented (Gaiceanu, 2004a).

By an adequate choice of the estimator parameters an acceptable step response can be

Through simulation (Figs. 45-46) the real and the estimated DC link currents are obtained.

**Figure 45.** Simulation results. The real DC load current Idcout, the estimated DC link current I^dcout.

0.098 0.1 0.102 0.104 0.106 0.108 0.11 <sup>30</sup>

0.144 0.146 0.148 0.15 0.152 0.154 0.156 <sup>30</sup>

time[s]

Real DC-load current-Estimated DC-load current

Real DC load current

Estimated DC load current

0.1 0.105 0.11 0.115 -40

time[s]

Real and estimated dc link current

Estimated DC link current, Idce

Real DC link current, Idc

real Idcout-estimated Idcout [A]

Estimated DC load current

time[s]

**Figure 46.** Simulation results. The real DC link current Idc, the estimated DC link current I^dc

The PI Current Control in Synchronously Reference Frame is shown in Fig.47. The current regulators have two tasks: the error cancelling, and the modulation (the appropriate


real IDC- estimated IDC [A]

For an adequate tuning of the current regulators, the actual load current, iA, accurately follows its reference i\*A (Fig. 49), despite of an inappropriate tuning of the current controllers (Fig.48).

1000 μF, Ambient temperature 400C,DC voltage reference: 690V.

0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -40

time[s]

Real and estimated dc link current

Real DC link current, Idc Estimated DC link current, Idce

real Idcout-estimated Idcout [A]

Real DC load current

The power semiconductor active devices operate with a switching time Ts=125μs, and a 2μs dead time. The converter specifications are given as follows: Supply voltage (line-to-line): 400V; Main frequency: 50Hz, Line current: 69A, Line inductance: 0.5 mH, DC bus capacitor:

Real DC-load current-Estimated DC-load current

**Figure 48.** The three phase load currents, the corresponding duty cycles, the actual and the reference line currents for the inaccurate tuning of the current regulator parameters: Kp=9, Ki=42

**Figure 49.** The three phase load currents, the corresponding duty cycles, the actual and the reference line currents for the accurate tuning of the current regulator parameters: Kp=18, Ki=105

## **6. Conclusions**

The main outcomes of the chapter:


MATLAB/Simulink-Based Grid Power Inverter for Renewable Energy Sources Integration 249

Abou El-Maaty Metwally (2005). Modelling and Simulation of a Photovoltaic Fuel Cell

Candusso D. , Valero I.& Walter A. (2002). Modelling, control and simulation of a fuel cell based power supply system with energy management,IECON 2002 28th Annual

COM(2006) Action Plan for Energy Efficiency: Realising the Potential, Available fromhttp://ec.europa.eu/energy/action\_plan\_energy\_efficiency/doc/com\_2006\_0545\_en.

http://www.erec.org/fileadmin/erec\_docs/Documents/Publications/Renewable\_Energy\_

EREC, the European Renewable Energy Council (2011). Mapping Renewable Energy

Gaiceanu M (2004b). AC-AC Converter System for AC Drives, *IEE Conference Publication Journal*, British Library, London, Publisher: Institution of Electrical Engineers, Vol. 2, no.

Gaiceanu M. (2004a). A new load power estimator for quasi-sinusoidal ac-ac converter system," *Proceedings of the 9th International Conference on Optimization of Electrical and Electronic Equipments (OPTIM 2004),* Vol. II: Power Electronics, Electrical Machines &

Gaiceanu M. (2007a) Inverter Control for Three-Phase Grid Connected Fuel Cell Power System, The *5th International IEEE Conference CPE 2007*, *Compatibility in Power Electronics Conference*, May 29- June 1, 2007, Gdansk, Poland, Power Electronics, 2007 Compatibility in, Conf Proceedings IEEE Product No.: EX1712, ISBN: 1-4244-1054-1 Gaiceanu, M.& Fetecau G. (2007b). Grid connected Wind turbine-Fuel Cell Power System having Power Quality Issues, EPQU'07 Barcelona, pp.7-13, 2007. ISBN 978-84-690-9441-

Gulderin Hanifi (2005), Sliding Mode Control of DC-DC boost converter, Journal of Applied

Padulles J., Ault G.W. &McDonald J.R. (2000). An integrated SOFC plant dynamic model for

Sul, S.K., & Lipo T.A. (1990). Design and performance of a high-frequency link induction motor drive operating at unity power factor," *IEEE Trans. Ind. Applicat*., vol.26, no.3, pp.

Uhrin, R.& Profumo F. (1994). Performance comparison of output power estimators used in AC/DC/AC converters, *Industrial Electronics, Control and Instrumentation,* IECON '94., 20th International Conference on, Volume 1, 5-9 Sept. 1994 Page(s):344 - 348 vol.1,

Ionescu Fl. et al (1997). Electronica de putere. Modelare si simulare, Editura Tehnica

power systems simulation, J. Power Sources 86 495\_500

http://www.eufores.org/fileadmin/eufores/Projects/REPAP\_2020/EREC-roadmap-

498, Printed in Great Britain by WRIGHTSONS, ISSN 0537-9989, pp 724-729

Drives, ISBN 973-635-287-0, Brasov, May 20-21, pp.189-195, 2004

EREC, Renewable Energy Technology Roadmap (2008), Available from

**7. References** 

pdf

V4.pdf

9

1994

Sciences 5 (3): 588-592

434-440, May/June

Hybrid System) Kassel, Germany

Technology\_Roadmap.pdf, pp2

Pathways towards 2020, Available from

Conference , pp.1294-1299


The implicit longer term outcomes are related to:


The chapter will also bring contributions to the development of the theoretical knowledge if the following aspects are taken into account: the complexity of the issue, its interdisciplinary, the performance of an experimental model and the necessary theoretical knowledge of the interface solutions for the renewable system, in particular for fuel cells.

Through a proper control sinusoidal input current, a nearly unity power factor (0,998), bidirectional power flow, small (up to 5%) ripple in the DC-link voltage in any operated conditions, disturbance compensation capability, fast control response and high quality balanced three-phase output voltages were obtained. By using the load feed-forward component the input reference of the current is changed with load so that a better transient response is obtained. The proposed control was successfully implemented by the author on quasi direct AC-AC power converter (Gaiceanu M., 2004b) and based on the Matlab/Simulink software the simulation test has been performed for the modified topology of the grid power inverter. The experimental results (Figs. 48, 49) have been obtained by using dSpace platform (Fig.47). The second-degree DC load current estimator for DC-AC power converter system is developed in this chapter. Since the DC-AC power converter control by means of pulse-width modulation (PWM) is based on the power balance concept, its load power should be known. In order to overcome the measuring solution with well-known disadvantages, the load power can be estimated from the DC side by using the DC load current estimator. Thus, it is mandatory to have the information regarding the DC load current. The DC voltage regulation with good dynamic response is achieved even if DC capacitance is substantially reduced. This implies also the good accuracy of the DC link load current estimation.

## **Author details**

Marian Gaiceanu *Dunarea de Jos University of Galati, Romania* 

### **7. References**

248 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 3



2. New design of the adequate controllers for integrated systems, which will enable the efficient operation of such power inverters connected to the grid, with high stability in

3. The rapid prototyping through dSpace real time platform can prove very useful in medium and longer term for further modelling/investigation/development of similar

The chapter will also bring contributions to the development of the theoretical knowledge if the following aspects are taken into account: the complexity of the issue, its interdisciplinary, the performance of an experimental model and the necessary theoretical knowledge of the interface solutions for the renewable system, in particular for fuel cells.

Through a proper control sinusoidal input current, a nearly unity power factor (0,998), bidirectional power flow, small (up to 5%) ripple in the DC-link voltage in any operated conditions, disturbance compensation capability, fast control response and high quality balanced three-phase output voltages were obtained. By using the load feed-forward component the input reference of the current is changed with load so that a better transient response is obtained. The proposed control was successfully implemented by the author on quasi direct AC-AC power converter (Gaiceanu M., 2004b) and based on the Matlab/Simulink software the simulation test has been performed for the modified topology of the grid power inverter. The experimental results (Figs. 48, 49) have been obtained by using dSpace platform (Fig.47). The second-degree DC load current estimator for DC-AC power converter system is developed in this chapter. Since the DC-AC power converter control by means of pulse-width modulation (PWM) is based on the power balance concept, its load power should be known. In order to overcome the measuring solution with well-known disadvantages, the load power can be estimated from the DC side by using the DC load current estimator. Thus, it is mandatory to have the information regarding the DC load current. The DC voltage regulation with good dynamic response is achieved even if DC capacitance is substantially reduced. This

implies also the good accuracy of the DC link load current estimation.

that these experts can later carry out RES projects with outstanding results.

**6. Conclusions** 

systems.

**Author details** 

Marian Gaiceanu

*Dunarea de Jos University of Galati, Romania* 

The main outcomes of the chapter:

service and power quality.

implement renewable energy projects.

The implicit longer term outcomes are related to: 1. Accurate models for fuel cells power systems.

	- Zhu Y. &Tomsovic K. (2002). Development of models for analyzing the load-following performance of microturbines and fuel cells, Electric Power Systems Research 62 (2002) 1\_/11

**Chapter 11** 

© 2012 Chin, licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use,

distribution, and reproduction in any medium, provided the original work is properly cited.

© 2012 Chin, licensee InTech. This is a paper distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Renewable energy resources will be an increasingly important part of power generation in the new millennium. Besides assisting in the reduction of the emission of greenhouse gases, they add the much- needed flexibility to the energy resource mix by decreasing the dependence on fossil fuels [1]. Among the renewable-energy resources, solar energy is the most essential and prerequisite resource of sustainable energy because of its ubiquity, abundance, and sustainability. Regardless of the intermittency of sunlight, solar energy is widely available and completely free of cost. Recently, photovoltaic (PV) system is well recognized and widely utilized to convert the solar energy for electric power applications. It can generate direct current (DC) electricity without environmental impact and emission by way of solar radiation. The DC power is converted to AC power with an inverter, to power local loads or fed back to the utility [2]. Being a semiconductor device, the PV systems are

The PV applications could be grouped according to the scheme of interaction with utility grid: grid connected, stand alone, and hybrid. PV systems consist of a PV generator (cell, module, and array), energy storage devices (such as batteries), AC and DC consumers and elements for power conditioning. The most common method uses the PV cells in the grid network. However, to understand the performance and to maximize the efficiency of the irradiation of the PV cells, the standalone PV cells have spurred some interest, especially, in

Over the years, test and researchers had proven that development of smart solar tracker maximizes the energy generation. In this competitive world of advanced scientific discoveries, the introductions of automated systems improve existing power generation

**Model-Based Simulation of** 

Additional information is available at the end of the chapter

suitable for most operation at lower maintenance costs.

the area of the solar tracker system.

C.S. Chin

http://dx.doi.org/10.5772/46458

**1. Introduction** 

**an Intelligent Microprocessor-Based** 

**Standalone Solar Tracking System** 

**Chapter 11** 
