Available online at www.sciencedirect.com Solar Energy 86 (2012) 1477–1484 www.elsevier.com/locate/solener A photovoltaic panel emulator using a buck-boost DC/DC converter and a low cost micro-controller Dylan D.C. Lu ⇑, Quang Ngoc Nguyen School of Electrical and Information Engineering, The University of Sydney, NSW 2006, Australia Available online 7 March 2012 Received 5 September 2011; received in revised form 8 February 2012; accepted 9 February 2012 Available online 7 March 2012 Communicated by: Associate Editor Nicola Romeo Abstract In order to facilitate the design and testing of photovoltaic (PV) power systems, a PV emulator which models the electrical characteristic of a PV panel or array is needed. Among different approaches to modeling PV characteristic, namely the I–V curve, curve-fitting is a popular approach. Even though a single high-order polynomial equation may accurately represent the I–V curve, the process of derivation and implementation is rather complex. This paper hence proposes the use of piecewise linear approach which is easier to derive and implement in a low-cost micro-controller. A two-switch buck-boost DC/DC converter is selected as the PV emulator and is analyzed. Experimental results on a hardware prototype of the proposed PV emulator are reported to show the effectiveness of the approach. Crown Copyright Ó 2012 Published by Elsevier Ltd. All rights reserved. Keywords: DC/DC converter; Photovoltaic; Micro-controller; Emulator 1. Introduction The demand of photovoltaic (PV) power system installation has been increased over the past decade due to technological improvement, better environmental awareness, lowered system costs, governmental initiatives, rising electricity bills, etc. While these installed PV systems and products are operating properly, there are still ongoing issues to be investigated and solved. For example, reliability of PV power systems (Petrone et al., 2008), PV power generation analysis (Ishaque et al., 2011; Paraskevadaki and Papathanassiou, 2011) and electricity network performance (van der Borg and Jansen, 2003) due to partial shading, development of power electronics interfaces (Marsh, 2011, 2010), etc. All these research and development activities require a stable, repeatable and variable PV source for ⇑ Corresponding author. Tel.: +61 2 9351 3496; fax: +61 2 9351 3847. E-mail address: [email protected] (D.D.C. Lu). design and testing. Hence there is a need of a PV generator emulator. The main task for a PV generator emulator is to reproduce the I–V curve of a practical PV panel. There are different approaches to performing this task. In Nagayoshi (2004), a p–n photodiode is used and a DC power amplifier increases the power level to match with that of a PV panel. However, this approach requires a light source and associated circuit to reproduce the I–V curves of a PV panel. In fact, a power electronics converter can mimic the I–V curve accurately with only a DC input voltage source (Mukerjee and Dasgupta, 2007). In Khouzam and Hoffman (1996), a AC/DC buck converter is used as the PV emulator to emulate a PV cell circuit model. However this approach requires the knowledge of the values of the parameters which are usually difficult to obtain. In fact, to model a PV panel, one may use the data available from the datasheet of the PV panel manufacturer and derive an analytical model to represent the I–V curves (Ortiz-Rivera and Peng, 2005). 0038-092X/$ - see front matter Crown Copyright Ó 2012 Published by Elsevier Ltd. All rights reserved. doi:10.1016/j.solener.2012.02.008 1478 D.D.C. Lu, Q.N. Nguyen / Solar Energy 86 (2012) 1477–1484 Look-up table and curve fitting are two popular approaches to implementing I–V curves of a PV panel by the power electronics converters. Look-up table would require a large memory storage of the micro-controller as large amount of panel data is stored if many I–V curves at different conditions and with high accuracy are implemented. Hence to implement look-up table in a low cost micro-controller which has limited memory space is usually difficult. Curve-fitting approach in general uses one or more polynomial equations to model an I–V curve and needs a digital controller with fast computational speed to find the solution. While this method requires less memory space, the non-linearity of the I–V curve requires the equations to be of higher orders which may increase the computational time substantially. A powerful DSP controller is usually needed to produce very fast and accurate results (Zhang and Zhao, 2010). Also the derivation process of the polynomial equations for different conditions such as insolation and temperature is rather troublesome. In order to use curve-fitting efficiently on a low-cost micro-controller, this paper introduces a PV emulator using multiple simple linear equations to mimic an I–V curve of the PV panel. This approach reduces computational time while maintaining sufficient accuracy and can be implemented in a low-cost 8-bit micro-controller. The paper is organized as follows: Section 2 describes the circuit and operation principle of the proposed PV emulator. Section 3 reports the experimental results of the emulator which models a BP Solar SX-10 PV panel. Section 4 discusses the limitations of the emulator and followed by the conclusions in Section 5. 2. Description of the PV emulator 2.1. System overview The PV emulator, as shown in Fig. 1, consists of a DC input source, Vin, a DC/DC converter for shaping the output I–V curves of the PV panel, a micro-controller for sensing the output voltage vpv and current ipv, calculation and sending duty cycle command, and a gate driver for amplifying the incoming duty cycle command suitable for driving the power transistor (MOSFET in this case). The output load RL is modeled as a variable resistor to represent an equivalent resistance of a maximum power point tracker (MPPT). 2.2. Mathematical modeling of a PV panel Apart from measuring an actual PV panel, one can also use an analytical model to represent the data in the datasheet from the manufacturer to obtain the I–V curves of a specific PV panel. In Ortiz-Rivera and Peng (2005), the authors have generated an analytical model for a PV panel which is adopted in this paper: IðV Þ ¼ a I max si V 1 1 exp bða c þ 1 cÞðV max þ sV Þ b ð1Þ where a is the percentage of effective intensity of the light, b is the characteristic I–V curve constant, c is the shading linear factor, si is the rate of change with the temperature for the current (A/°C), sV is the rate of change with the temperature for the voltage (V/°C) and Imax is the ideal maximum current (when V = 1 at STC). For this paper, a PV panel from BP Solar (Model: SX10) is modeled. Assuming no shading and using a = 1 and others values provided by the datasheet (BP Solar PC SX10 data sheet, 2003), a numerical expression of this PV panel can be found: 0:65 V 1 IðV Þ ¼ 1 ð2Þ 1 e1=b b 21 b Using the maximum power point condition at 16.8 V and 0.59 A, the value of b can be calculated by (2) as 0.085. At 25 °C, (2) can be further simplified to: IðV Þ ¼ 0:65½1 eðV =1:78511:7647Þ ð3Þ Similarly at 75 °C one can get: IðV Þ ¼ 0:6711½1 eðV =1:44511:7647Þ ð4Þ Fig. 2 shows the MATLAB plot of the I–V characteristic curves of SX-10 PV panel Eqs. (3) and (4). 2.3. Two-line and multiple-line fitting approaches To generate N number of fitting lines, N + 1 points from the curve need to be selected. To begin with, a two-line approach as shown in Fig. 3 is discussed. The two ends points from the curve are the open-circuit voltage (21 V, 0 A) and short-circuit current (0 V, 0.65 A). The third point is selected (16.8 V, 0.62 A) as the maximum power point (MPP) of the curve where the two lines converge. Therefore the two equations which represent the two lines are expressed as Fig. 1. Block diagram of the PV emulator. IðV Þ ¼ 0:65 0:004V ð5Þ IðV Þ ¼ 2:94 0:14V ð6Þ D.D.C. Lu, Q.N. Nguyen / Solar Energy 86 (2012) 1477–1484 Fig. 2. I–V characteristics of SX-10 at 25 °C and 75 °C. 1479 Fig. 4. Five-line curve fitting approach. converter for the PV emulator. The design consideration is that the converter is able to sweep through the entire voltage range of the PV panel. For a buck converter, a DC input voltage which is higher than the panel is required as it is a step-down converter. The buck-boost converter is more flexible as it can perform both step-up and step-down functions. The boost converter which is a step-up converter, however, can only operate when the input voltage is lower than the output voltage hence it cannot reach down to 0 V and cannot be used in this case. 3. Experimental setup and results 3.1. Design considerations and hardware description Fig. 3. Two-line curve fitting approach. To improve the accuracy of the curve-fitting method, five lines as shown in Fig. 4 are used. Similarly, with six points selected, the five equations which represent the five lines are given by IðV Þ ¼ 2:94 9:2143e4 V ½for V ¼ 0–14 ð7Þ IðV Þ ¼ 0:8233 0:0133V ½for V ¼ 14–16 IðV Þ ¼ 1:2633 0:0408V ½for V ¼ 16–18 ð8Þ ð9Þ IðV Þ ¼ 2:1651 0:0909V ½for V ¼ 18–19 IðV Þ ¼ 4:599 0:2190V ½for V ¼ 19–21 ð10Þ ð11Þ 2.4. DC/DC converter Among the basic converters, buck and buck-boost converters are able to be implemented as the DC/DC To verify the proposed PV emulator for the BP SX-10 model, a hardware prototype is built and tested. The schematic of the PV emulator circuit is shown in Fig. 5. The reason to select a two-switch buck-boost converter for this implementation is twofold. Firstly it can work with lower input voltage (12–15 V) that reduces the power loss when the input voltage is used to step down further for the micro-controller circuit (5 V). If a buck converter is used, the input voltage has to be higher than 21 V which is the open-circuit voltage of the PV panel. Secondly, the output voltage is non-inverting as compared to the single-switch buck-boost converter with inverting output. The advantage is that the output ground will be the same for the input ground and ground of other equipment which is connected to the output of the PV emulator, e.g. a MPPT switching converter. Another advantage is that the use of either splitting power supply or opto-coupler and associated circuit for negative voltage feedback sensing, which added complexity and slowed down the response of the system, is eliminated. The two-switch buck-boost converter consists of two power MOSFETs (Q1 and Q2), two diodes (D1 and D2), an inductor (L1) and an output capacitor (C1), as shown 1480 D.D.C. Lu, Q.N. Nguyen / Solar Energy 86 (2012) 1477–1484 Fig. 5. Schematic of the proposed PV emulator based on a buck-boost converter. in Fig. 5. The two power transistors Q1 and Q2 share the same driving pulses from the Gate Driver block. When both transistors are closed, the inductor is charged by the input voltage. When the transistors are turned off, the inductor is discharged via two diodes (D1 and D2) to output. By controlling the duty cycle of the transistors as a result of the linear equations calculation as stated in Section 2.2, the I–V curve of the PV panel is implemented. For the micro-controller, a 8-bit PICAXE AXE-08M chip is selected. It is a modified version of Microchip PIC12F68 model. It has three ADC inputs and a PWM output pin which is easily configured by a single-line command. The chip runs at 4 MHz and therefore it can operate easily at 50 kHz switching frequency for the converter with sufficient accuracy and speed. The inductor (L1) is chosen to operate in continuous conduction mode (CCM) as it produces less conduction loss. A ±20% maximum current ripple in the inductor is selected. At 50 kHz switching frequency, the minimum inductance Lmin to meet such requirement is at 15 V input and 21 V output (open-circuit voltage) Lmin ¼ V in D 15 0:58 ¼ 435 lH ¼ fs Di 50000 0:4 ð12Þ where Vin is the input voltage, D is the duty cycle of the power switches, fs is the switching frequency, and Di is the maximum current ripple. In order to provide at least 12 V and floating gate drive for the MOSFET, a high-side driver IR2117 is used. Since the PICAXE chip operates at 5 V but the IR2117 driver requires at least 9.6 V input, a simple transistor inverter as a level lifting circuit is implemented. This small transistor (2N7000) requires only 2.5 V to drive. When a high pulse from PICAXE chip is generated, the transistor is turned on and pulled the output to ground. When a low pulse is generated, the transistor is turned off and output is risen up to Vcc (12–15 V in this design). The programming for PICAXE is done on a free programming editor provided by PICAXE. Once the program is written it can be downloaded to the PICAXE AXE-08M micro-controller chip via a USB cable (AXE027) or RS-232 cable (AXE028) connecting the computer and the chip (Download Socket in Fig. 5). This cable is not a normal USB or RS-232 connector as it contains some electronic parts and it is pre-programmed. The programming language for PICAXE is similar to the BASIC language. The program flow chart is shown in Fig. 6. The program starts with defining the symbols for voltage and current measurements and for counters. Then it outputs a small duty cycle to start the buck-boost converter. Once the converter operates, the program can take readings from the voltage and current (V_sense and I_sense in Fig. 5) to determine the operating point for the PV panel the converter mimics. Note that we are using fractional open voltage MPPT algorithm so only a voltage reading is needed to operate the converter to the desired operating point. The current measurement is only used for overloading protection. The PICAXE-08M chip can contain maximum of 8 linear equations so we have used 5 linear equations for 75 °C and 3 linear equations for 25 °C. The D.D.C. Lu, Q.N. Nguyen / Solar Energy 86 (2012) 1477–1484 1481 Fig. 7. Output voltage ripple of the PV emulator (Y-axis: 200 mV/div; time scale: 10 ls/div). Fig. 6. Program flow chart for implementation of 5-line for 75 °C and 3line for 25 °C of the BP SX-10 PV panel. selection of what temperature to use is by providing a high or low signal to available ADC input of the PICAXE (Pin 4). Here we selected signal high for 75 °C and low for 25 °C. After the temperature is selected, the program will use the voltage reading to locate the nearest linear equation to find out the operating point. A new duty cycle is then determined and produced from the PWM pin of the PICAXE and the converter duty cycle is updated. After that the program goes back to the voltage and current checking process and repeats the procedure. The full program code for implementing the five-line approach is shown in Appendix A. 3.2. Results Fig. 7 shows the output voltage ripple of the PV emulator is less than 450 mV at 50 kHz switching frequency. The “On” and “Off” labels in the figure indicate the turn-on instant and turn-off instant of the power transistors Q1 and Q2 for each switching period. The duration of “On” period indicates the duty cycle of the transistors. And from the waveform it can be observed that the converter is operating in continuous conduction mode (CCM) as the ripple has only two stages, confirming our design in Section 3.1 and Eq. (12). Note that the voltage spikes during the turn-on and turn-off instants and appeared beyond the horizontal cursors are due to the pick-up of electromagnetic Fig. 8. Comparison between experimental and theoretical results on twoline approach. noise from the voltage probe. Minimizing the ground loop of the voltage probe will greatly reduce the pick-up. Fig. 8 shows the measured results on the prototype using the twoline approach. The results are very close to the two operating lines. Fig. 9 shows further results on the five-line approach at both 25 °C and 75 °C. Due to the memory limitation of the micro-controller, only eight lines can be implemented in a single program. Therefore Fig. 9 shows 5 lines for 25 °C and 3 lines 75 °C. Nevertheless, the measured results are closely matched with the theoretical designed curves. As shown in Fig. 10, the PV emulator reaches a maximum efficiency of around 80% near maximum power point voltage for both temperature settings. The low efficiency occurs at lower voltages because the output power of the power converter is small and the switching losses of power transistors and diodes are dominant. When PV emulator 1482 D.D.C. Lu, Q.N. Nguyen / Solar Energy 86 (2012) 1477–1484 Fig. 9. Comparison between experimental and theoretical results on fiveline approach and different temperature settings. open voltage with a factor, usually between 0.7 and 0.78. The converter will alter the duty cycle in order to adjust the panel voltage to be equal to this MPP value. This method is simple as no input current of the PV panel is needed. The limitation of this MPPT approach is that the MPP voltage is only an approximate value. Using the same MPPT code, different operating conditions are tested to confirm that the tracker can adapt to the change of the environment. Fig. 12 shows the capability of the tracker to reach the maximum power points at different temperatures and insolations. The tracker has been tested with the PV panel emulator. The tracker has successfully tracked the MPP voltages at 16.9 V for 25 °C and 13.7 V for 75 °C respectively which are very close to the theoretical values. The results demonstrated that the performance of the PV panel emulator reacts identically to the real PV panel which it models. 4. Discussions Fig. 10. Measured efficiency of the PV emulator at different temperature settings. voltage increases and is moving towards the maximum power point, the output power of the converter also increases. Since the rate of switching losses only increases slightly as compared to the rate of increase of output power, there is less switching losses proportionally to the overall input power and the efficiency improves as output power increases as a result. In order to demonstrate the usefulness of the PV emulator. A system is set up, as shown in Fig. 11, in which a buck converter as a maximum power point tracker is connected to the output of the PV emulator. The tracker is first tested using the real PV panel outdoor. Fractional open circuit voltage technique (Esram and Chapman, 2007; Ahmad, 2010) is used as the MPPT algorithm in this case. Fractional open circuit voltage technique measures the open circuit voltage of the PV panel at the start-up process. And the MPP is approximated by multiplying the measured Using multiple straight lines to model an I–V curve of the PV panel is fast and straight-forward. The low cost PICAXE-08 M chip has four basic mathematical functions: addition, subtraction, multiplication and division, and they are well suited for this implementation. To improve the accuracy of modeling further, however, exponential expressions can be used and a more powerful micro-controller needed to be used. Also, as mentioned in Section 3.2, with limited program memory (800 lines memory) of this microcontroller only eight lines can be implemented. But the PICAXE family has higher end micro-controller to implement more number of lines, such as 40 2 with 3200 lines memory. The PICAXE-08 M chip has a pin dedicated to PWM generation. By using the PWMOUT function in the program, frequency and duty cycle are set using a single command line. The resolution of the duty cycle increases with decreasing switching frequency. For instance, at 50 kHz switching frequency, there are 80 steps. While at 40 kHz, the steps increase to 100. Larger steps of duty cycle enable the converter to operate with smaller fluctuation when duty cycle has to be altered to adjust the output continuously due to change of input or output condition, provided the inductance and output capacitance have increased to maintain the same ripple current and ripple voltage with decreasing switching frequency. The power losses of the PV emulator are mainly due to conduction loss and switching loss. Conduction loss can be reduced by using better devices with smaller internal resistance. This includes smaller turn-on resistance for power transistor and diode, and less core loss and less copper (winding) loss for the inductor. Switching loss can be reduced by improving the slew rate of turn-off and turnon instances of the power transistor and of the power diodes. For instance, we can use Silicon-Carbide (SiC) instead of Silicon (Si) diodes. SiC diodes have negligible D.D.C. Lu, Q.N. Nguyen / Solar Energy 86 (2012) 1477–1484 1483 Fig. 11. System setup for proposed PV emulator and a maximum power point tracker. demonstrated the effectiveness and usefulness of the PV emulator. Appendix A. This appendix shows the original PICAXE program code for 5-line approach for implementing the I– V curve of BP SX-10 PV panel at 25 °C and 3-line approach at 75 °C. Fig. 12. Measured results on a maximum power point tracker using a buck converter. reverse-recovery current which usually causes additional switching loss (Spiazzi et al., 2003). 5. Conclusions This paper presents the design and implementation of a PV emulator based on a two-switch buck-boost DC/DC converter and a low cost 8-bit micro-controller. By using multiple straight lines approach, the PV emulator can mimic a PV panel with acceptable accuracy. The PV emulator has been tested using resistive loads as well as a maximum power point tracker. Experimental results have symbol v = b1 ’define symbols symbol i = b2 symbol dc = b0 symbol t = b3 let dc = 75 ’set duty cycle for low start voltage main: pause 100 gosub changeduty goto check check: pause 100 readadc 1, v ’ read voltage into v = 1/5 voltage value readadc 4, i ’ read current into i = current value if v > 250 then goto overload ’voltage of pin 1 >= 5 V if i > 51 then goto overload ’current flow >= 1 A let t = i/5 ’i = i/5 because of voltage divider let v = v -t ’calculate load voltage = V-2i if pin3 = 1 then ’pin 3 = 1 (75 °C); pin 3 = 0 (25 °C) if v < 123 then ’0 to 12 V let v = v/150 let v = 71/2 – v ’equation I = 0.67–0.0017*V elseif v > = 123 and v < = 153 then ’12 to 15 V let v = v*3/14 let v = 64 – v ’equation I = 1.238–0.049*V 1484 D.D.C. Lu, Q.N. Nguyen / Solar Energy 86 (2012) 1477–1484 elseif v > 153 and v < 182 then ’15 to 17 V let v = v*5/ let v = 219 – v ’equation I = 4.283–0.252*V else let dc = dc + 1 min 28 goto changeduty endif else if v < 143 then ’0 to 14 V let v = v/200 let v = 35 – v ’equation I = 0.65–9 e-4*V elseif v > = 143 and v < = 163 then ’14 to 16 V let v = v/15 let v = 45 – v ’equation I = 0.8233–0.0133*V elseif v > 163 and v < 184 then ’16 to 18 V let v = v/5 let v = 66 – v ’equation I = 1.2633–0.04*V elseif v > = 184 and v < 194 then ’18 to 19 V let v = 5*v let v = v/11 let v = 113 – v ’equation I = 2.1651–0.0909*V elseif v > = 194 and v < 224 then ’19 to 21 V let v = 65*v let v = v/61 let v = 238 – v ’equation I = 4.599–0.2190*V else let dc = dc + 1 min 28 goto changeduty endif endif if i < v then let dc = dc-1 min 28 goto changeduty elseif i > v then let dc = dc + 1 max 79 goto changeduty else goto check endif goto check changeduty: pwmout 2,19,dc goto check overload: let dc = 75 gosub changeduty goto main References Ahmad, J., 2010. A fractional open circuit voltage based maximum power point tracker for photovoltaic arrays. In: 2010 2nd International Conference on Software Technology and Engineering (ICSTE), vol. 1, pp. V1-247–V1-250. doi:doi:10.1109/ICSTE.2010.5608868. BP Solar PC SX-10 data sheet, 2003. <http://www.solaris.com.au/ documents/BPSX05_10DataSheet.pdf>. Esram, T., Chapman, P., 2007. Comparison of photovoltaic array maximum power point tracking techniques. IEEE Transactions on Energy Conversion 22 (2), 439–449. doi:10.1109/TEC.2006.874230. Ishaque, K., Salam, Z., Syafaruddin, 2011. A comprehensive matlab Simulink PV system simulator with partial shading capability based on two-diode model. Solar Energy 85 (9), 2217–2227. doi:10.1016/j. solener.2011.06.008. Khouzam, K., Hoffman, K., 1996. Real-time simulation of photovoltaic modules. Solar Energy 56 (6), 521–526. doi:10.1016/0038-092X(96) 00008-4. Kim, H., Kim, J., Kim, H., Lee, K., Kim, J., Yoo, D., Shin, D., 2010. A high efficiency photovoltaic module integrated converter with the asymmetrical half-bridge flyback converter. Solar Energy 84 (8), 1376– 1381. doi:10.1016/j.solener.2010.04.019. Marsh, G., 2011. Partner in power: Part two: Whilst the micro-inverter revolution looks set to spread, central and string inverters remain the mainstream. Renewable Energy Focus 12 (3). doi:10.1016/S17550084(11)70062-X, 38–40, 42. Mukerjee, A., Dasgupta, N., 2007. DC power supply used as photovoltaic simulator for testing MPPT algorithms. Renewable Energy 32 (4), 587– 592. Nagayoshi, H., 2004. I–V curve simulation by multi-module simulator using I–V magnifier circuit. Solar Energy Materials and Solar Cells 82 (1–2), 159–167. doi:10.1016/j.solmat.2004.01.014 (cANCUN 2003). Ortiz-Rivera, E., Peng, F., 2005. Analytical model for a photovoltaic module using the electrical characteristics provided by the manufacturer data sheet. In: Proceedings of the IEEE Power Electronics Specialists Conference, 2005, pp. 2087–2091. Paraskevadaki, E.V., Papathanassiou, S.A., 2011. Evaluation of MPP voltage and power of mc-Si PV modules in partial shading conditions. IEEE Transactions on Energy Conversion 26 (3), 923–932. doi:10.1109/TEC.2011.2126021. Petrone, G., Spagnuolo, G., Teodorescu, R., Veerachary, M., Vitelli, M., 2008. Reliability issues in photovoltaic power processing systems. IEEE Transactions on Industrial Electronics 55 (7), 2569–2580. doi:10.1109/TIE.2008.924016. Spiazzi, G., Buso, S., Citron, M., Corradin, M., Pierobon, R., 2003. Performance evaluation of a Schottky SiC power diode in a boost PFC application. IEEE Transactions on Power Electronics 18 (6), 1249– 1253. doi:10.1109/TPEL.2003.818821. van der Borg, N., Jansen, M., 2003. Energy loss due to shading in a BIPV application. In: Proceedings of 3rd World Conference on Photovoltaic Energy Conversion, vol. 3, pp. 2220 –2222. Zhang, H., Zhao, Y., 2010. Research on a novel digital photovoltaic array simulator. In: Proceedings of the IEEE International Conference on Intelligent Computation Technology and Automation, pp. 1077–1080.