# Development of a Photovoltaic Array Emulator in a Real Time Control Environment Using xPC Target

S. Polo-Gallego, Carlos Roncero-Clemente, Enrique Romero-Cadaval, V. Miñambres-Marcos, M. A. Guerrero-Martínez

► To cite this version:

S. Polo-Gallego, Carlos Roncero-Clemente, Enrique Romero-Cadaval, V. Miñambres-Marcos, M. A. Guerrero-Martínez. Development of a Photovoltaic Array Emulator in a Real Time Control Environment Using xPC Target. 4th Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Apr 2013, Costa de Caparica, Portugal. pp.325-333, 10.1007/978-3-642-37291-9_35. hal-01348770

HAL Id: hal-01348770

https://hal.science/hal-01348770

Submitted on 25 Jul 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Development of a Photovoltaic Array Emulator in a Real Time Control Environment using xPC Target

S. Polo-Gallego, C. Roncero-Clemente, E. Romero-Cadaval, V. Miñambres-Marcos and M.A. Guerrero-Martínez

Power Electrical and Electronic Systems (PE&ES), School of Industrial Engineering (University of Extremadura)

http://peandes.unex.es

**Abstract.** This paper is devoted to the design and construction of a photovoltaic array emulator for high power applications in order to test all kind of photovoltaic inverters. To develop such device, a rapid prototyping tool based on xPC Target of Matlab/Simulink has been used, providing a real-time testing environment. PV array emulator can be used to evaluate the performance of photovoltaic inverters as any test conditions can be programmed. The proposed emulator operates as a distributed control system taking advantage of the TCP/IP protocol features.

**Keywords:** photovoltaic array, inverter performance, rapid prototyping tool, real-time, xPC Target, TCP/IP protocol.

## 1 Introduction

Nowadays, the power electrical system scenario is very different in comparison with the traditional configuration. Several factors, such as an electrical consumption increase, the electrical market liberalization, the need to reduce CO₂ emissions, and the new technological development, are boosting the distributed generation (DG).

Photovoltaic solar energy is one of the most relevant distributed energy resources taking an important part in this new scenario [1]. Due to the increased use of this technology, several regulations [2] have been established in order to manage the inverters of photovoltaic plants. The main deal of these rules says that the inverters must work providing support and stability in the electrical grid. This fact obliges that every inverter must be tested under different conditions. For high power testing applications a DC power supply is hard to find and certainly a photovoltaic array could not be available.

The well-known software Matlab/Simulink [3] has been widely used in system modeling and simulation of control algorithms. Since years ago, efforts have been made to control the physical systems by means of Matlab and its toolboxes. The xPC Target Matlab toolbox provides a rapid prototyping host-target environment by using TCP/IP [4] to construct the real time control system.

This paper is devoted to the designed and construction of a photovoltaic array emulator for high power applications in order to test all kind of photovoltaic inverters. xPC Target from Matlab/Simulink has been used as rapid control prototyping tool. The different characteristics and configuration of this control platform will be explained in detail.
## 2 Relationship to Internet of Things

A photovoltaic array emulator is a useful tool for testing an inverter. The non-availability of high DC power supplies is solved by means of the proposed device. This work shows the developed platform for evaluating the performance of PV inverters. As a result an optimum use of natural resources can be achieved. At the same time, xPC Target has been chosen to implement the real time embedded controller, to interact with the real system, to support control and functionality and to allow communication between the user and the system by means of internet connection. It operates as a distributed control system taking advantage of the TCP/IP protocol features as it can be seen in Fig. 1. The proposed emulator could be accessible by Internet for programming the test, monitoring the execution and acquiring data in a remote way.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Global communication scheme of the PV array emulator.</figcaption></figure>

## 3 Creating a Real-Time Testing Environment with xPC Target

The real time environment built for rapid prototyping is shown in Fig. 2. Controllers and algorithms are designed in Simulink on the host PC (which runs Matlab/Simulink, Real-Time Workshop and xPC Target toolbox). xPC Target operates with the code generated by a C compiler from the Simulink models in order to develop the real-time target application. Target application can be executed in real time once it is downloaded in the target PC from the host PC through TCP/IP.

The host-target communication can be obtained by means of TCP/IP communication protocol. Once the target application has been downloaded to the target PC, it can be controlled and changed from the host PC with the external control mode. It also allows tuning the parameters before, during and after real-time execution and viewing, logging and acquiring signal data.
<figure><img src="image_3.png" /><figcaption>Fig. 2. Rapid prototyping environment based on xPC Target.</figcaption></figure>

## 4 Plant Under Test. Physical System

In order to achieve PV array emulation, an electronic converter working as a rectifier has been used.

AC/DC converters constitute the interface circuit between the electrical grid and the DC loads. With the ever increase of power quality requirements at the point of common coupling (PCC), these converters are nowadays required to achieve different task such as: provide high input power factor, low current distortion [5] and fixed output voltage.

Synchronous rectifier allows demanding sinusoidal currents from the grid which are synchronized with the voltage at the PCC. Fig.3 shows the topology used in this work. The rectifier is connected to the grid by means of an autotransformer.

The real system is the Semikron SEMISTACK SKS 230F B8CI 190 V12 inverter shown in Fig. 2.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Three-phase two-level rectifier electronic converter topology connected to the grid.</figcaption></figure>

## 5 Host PC. Photovoltaic Array Emulator Models and Controllers

In this section, the explanation of the designed models will be explained. Models have been implemented in Simulink on the host PC in order to be executed in the target PC in real time after its compilation. This PC has the hardware characteristics shown in Table 1.
<table><caption>Table 1. Host PC characteristics.</caption><thead><tr><th>Equipment</th><th>CPU</th><th>RAM</th></tr></thead><tbody><tr><td>Host PC</td><td>Pentium Dual-Core T4500 at 2.3 GHz</td><td>4 GB</td></tr></tbody></table>

## 5.1 Photovoltaic Panel Model

In order to reproduce the typical curve of a photovoltaic (PV) panel, a PV model has been employed. This model, explained in detail in [6], is based on the I-V exponential curve defined by the information provided by the manufacturers. I-V curves obtained in the simulation of the panel Shell SP 150-P in different conditions are shown in Fig. 4 a) and 4 b), as it is the panel that has been used to develop the proposed PV array emulator.

<figure><img src="image_5.png" /><figcaption>Fig. 4 a). I-V curves (differents W).Fig. 4b).I-V curves (differents T).</figcaption></figure>

## 5.2 Photovoltaic Array Emulator Control Strategy

In Fig. 5, the control strategy of the photovoltaic array emulator is shown. The measured DC load current is the input of the photovoltaic array model. By this way, the reference DC link voltage is generated by the model according to the I-V curve.

In order to generate the reference current demanded from the grid, a proportional-integral (PI) controller produces its RMS value (control variable) depending on the DC voltage error. The amplitude of the reference current is multiplied by three unitary wave forms synchronized with the voltage ($v_{pcc}$) at the PCC. These waveforms are provided by an adjustable synchronous reference frame (ASRF) [7].

<figure><img src="image_6.png" /><figcaption>Fig. 5. Control strategy in PV array emulator.</figcaption></figure>

## 5.3 Reference Tracking

In order to track the reference current, a hysteresis band has been used [8]. In Fig. 6 a) one can see a block diagram of this current controller. The reference current and the
measured current are compared to generate the switching signals that control the system (Fig. 6 b).

The switching signals are generated by the next way. The voltage on the filter inductance is given by (1) and (2):

$$v_L = L \frac{di(t)}{dt}, \qquad (1)$$

$$v_L = v_{sn} - v_{xn}, \qquad (2)$$

where $v_{sn}$ is the line to neutral voltage and $v_{xn}$ is the voltage between the middle point of any leg and the neutral point.

<figure><img src="image_7.png" /><figcaption>Fig. 6 a) Hysteresis band diagram.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Fig. 6 b) Switching signals generation.</figcaption></figure>

This value could take the next limits:

$$v_{xn} = \frac{2v_{DC}}{3} \text{ or } -\frac{2v_{DC}}{3}. \qquad (3)$$

Depending on the obtained error signal between the reference current ($i^*$) and the measured current, the slope (di/dt) of the demanded current must be changed. This is achieved by controlling $u_{xn}$ through the appropriate switching states defined in Table 2.

<figure><img src="image_9.png" /><figcaption>Table 2. Different states of the switching signals.</figcaption></figure>
<figure><img src="image_10.png" /></figure>

# 6 Target PC. Data Acquisition, Measurement and Control Signal

An industrial PC has been used as target. Its characteristics are shown in Table 3.

<table><caption>**Table 3.** Target PC characteristics.</caption><thead><tr><td>Equipment</td><td>CPU</td><td>RAM</td></tr></thead><tbody><tr><td>Target PC</td><td>Pentium Core 2 T4500 at 2.66 GHz</td><td>2 GB</td></tr></tbody></table>

The executable code is generated in the host PC and the target PC runs it in real-time to control the plant. This computer is equipped with a data acquisition (DAQ) board PCI-6259 by National Instruments. This board has the necessary I/O channels according to the designed control strategy and tracking technique. In this case, eight analogical input channels (required measurements) and six digital output channels (switching signals) are used.

## 6.1 Measurement Board

A measurement board with the necessary sensors has been built (Fig. 7.a). A total of eight sensors have been used (Table 4).

<table><caption>**Table 4.** Sensor characteristics.</caption><thead><tr><td>Magnitude</td><td>Sensor</td><td>Number of sensors</td></tr></thead><tbody><tr><td>Voltage</td><td>LV 25-P by LEM</td><td>4 (v<sub>pcc</sub> (v<sub>an</sub>, v<sub>bn</sub>, v<sub>cn</sub>) and v<sub>DC</sub>)</td></tr><tr><td>Current</td><td>LA 25-NP by LEM</td><td>4 (i<sub>meas</sub>(i<sub>a</sub>, i<sub>b</sub>, i<sub>c</sub>) and i<sub>DC</sub>)</td></tr></tbody></table>

# 7 Full System. Experimental Results

The proposed photovoltaic array emulator has been studied experimentally in real-time environment (Fig. 7.b). The experimental test parameters are shown in Table 5. Resistance value correspond with the MPP for the chosen panel configurations under standard conditions. The PV array user interface created for the host PC is shown in Fig. 8.

Experimental results are displayed in Fig. 9 a) and b). One can see how the system produces the MPP voltage and current according to the parameters of the panel. Experimental results with different load conditions are shown in Fig. 10. Critical points have been emphasized. The test scheme can be seen in Fig. 11.
<figure><img src="image_11.png" /><figcaption>Fig. 7. a) Built measurement board.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Fig. 7. b) PV array emulator (full system).</figcaption></figure>

<table><caption>**Table 5.** Used parameters in experimental tests.</caption><thead><tr><th>Parameter</th><th>Description</th><th>Value</th></tr></thead><tbody><tr><td>n<sub>p</sub></td><td>Number of panel connected in parallel</td><td>1</td></tr><tr><td>n<sub>s</sub></td><td>Number of panel connected in series</td><td>6</td></tr><tr><td>V<sub>s</sub>(V)</td><td>v<sub> MCC </sub> RMS voltage</td><td>50</td></tr><tr><td>L<sub>f</sub> (mH)</td><td>Filter inductance</td><td>6.2</td></tr><tr><td>C<sub>1</sub>, C<sub>2</sub>(mF)</td><td>DC-Link capacitors</td><td>28.2</td></tr><tr><td>R<sub>L</sub> (Ω)</td><td>Load</td><td>48.22</td></tr><tr><td>f<sub>w</sub>(KHz)</td><td>Switching frequency</td><td>8</td></tr></tbody></table>

<figure><img src="image_13.png" /><figcaption>Fig. 8. PV array model interface.</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>Fig. 9. a) v<sub> MCC </sub> and demanded current (phase a).</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>Fig. 9. b) PV voltage and PV current.</figcaption></figure>
<figure><img src="image_16.png" /><figcaption>Fig. 10. Experimental results (stars).</figcaption></figure>

<figure><img src="image_17.png" /><figcaption>Fig. 11. Equivalent test scheme.</figcaption></figure>

## 8 Conclusion and Future Works

A rapid prototyping tool has been used and configured based on xPC Target from Matlab/Simulink using TCP/IP protocol to communicate host and target. It has been used to validate experimentally, and in real-time, a photovoltaic array emulator. By means of this device one can emulate any PV panel and any array configuration s in every condition. This platform will be used in the future to test any kind of photovoltaic inverter [9] in a high power level.

## References

1. International Energy Agency. Photovoltaic Power Systems Programme, http://www.iea-pvps.org. Statistic Reports, 2011.

2. Ministry of Industry, Tourism and Trade of Spain, R.D 1565/2010 Spain, 2010.

3. http://www.mathworks.com.

4. Low K.H., Wang H., Yu Wang M.: On the Development of a Real Time Control System by Using xPC Target: Solution to Robotic System Control. IEEE International Conference on Automation Science and Engineering, pp. 345-350 (2005).

5. Wilamowski, B.M., Irwin J.D.: The Industrial Electronics Handbook. Power Electronics and Motor Drives. Second Edition. 2011.

6. Roncero-Clemente C., Romero-Cadaval E., Roncero-Sánchez P., González-Romera E.: Comparison of Two Power Flow Control Strategies for Photovoltaic Inverters. 38th Annual Conference of the IEEE Industrial Electronics Society (IECON 2012). Montreál, Canadá. Accepted for publication.

7. Milanés-Montero M.I., Romero-Cadaval E., Miñambres V.M., Barrero-González F.: Novel Method for Synchronization to Disturbed Three-phase and Single-phase Systems. IEEE International Symposium on Industrial Electronics, pp. 860-865 (2007).

8. Roncero-Clemente C., Milanes-Montero M.I., Miñambres-Marcos V.M., Romero-Cadaval E.: Three-phase regenerative electronic load to test shunt power conditioners. Compatibility and Power Electronics (CPE), 7th International Conference-Workshop, pp.178-183, (2011).

9. Valentini, M., Raducu, A., Sera, D., Teodorescu, R.: PV inverter test setup for European efficiency, static and dynamic MPPT efficiency evaluation. Optimization of Electrical and Electronic Equipment. OPTIM 2008. 11th International Conference on, pp.433-438, (2008).