Control of The Output Voltage of The PV
Control of The Output Voltage of The PV
I. INTRODUCTION
The world trend nowadays is to use sustainable and
renewable energy sources such as PV cells which require Fig. 1: Basic circuit of the boost converter
power electronic devices. The output voltage of the solar
panels is relatively low and considerably unregulated In the boost converter, the output voltage is stepped
since it is depending on sun insolation and temperature. up and controlled by adjusting the ON/OFF time
Therefore, the low and fluctuating PV system voltage is durations of the control signal which is applied to the
required to be boosted to a higher and regulated voltage. controlled switch (SW). The boost converter runs in two
A DC to DC boost converter with feedback control loop distinct states [3].
is commonly employed to control the voltage of the PV - State 1: in this state, SW is in ON-state (closed). The
system to the desired and constant level suitable for boost circuit will be divided into two loops as shown in
several domestic applications [1]. Fig. 2-a. At the first loop (left), the input current flows
The objectives of this paper can be summarized by: through the inductor and the SW. During this state, the
i) Analyzing the continuous conduction mode (CCM) of inductor current (IL) will rise and the energy stored in it
DC-DC boost converter and designing their components and not supplied to the load. The inductor voltage (VL)
under this operating mode at 10 kHz switching frequency represents input voltage (Vin). Under this state, the diode
for a PV system having a maximum power rating of 2 is OFF (reverse biased) and the capacitor is in
kW. discharging mode to supply current to the load (right
ii) Testing the response of the boost converter with and loop).
without PID controller using MATLAB/ Simulink under - State 2: here the SW is in OFF state (Open). The
various operating conditions. current flows to the capacitor and load through the diode
as depicted in Fig. 2-b. The energy stored in the inductor
during state1 is now transferred to the load together with Fig. 3: Current and voltage waveforms of the boost
that from the input source. The current of the inductor converter (CCM)
continues in decay up till the MOSFET is fired again in
the following period. During this period, (VL =Vin-Vout). The relation that relates the output voltage (Vout) and
input voltage (Vin) in CCM is given by following
equation [4]:
V
1
1 D
V (1)
out in
IL 11A
6 V. CONTROL SCHEMES OF DC-DC CONVERTERS
(1 0.45) To regulate the output voltage of the DC-to-DC
For CCM operation, the peak inductor current (ILpeak) can converters, feedback loop is employed for adjusting duty
be given by
I
cycle and obtained the desired voltage output. The most
I Lpeak I L L
common control schemes are: Voltage Mode Control
2 (VMC) and Current Mode Control (CMC) [3,6,7]. Other
(8) hybrid designs are deduced from combinations of these
The approximate value of Δ IL is 2.2A based on the controls. Here, VMC control strategy has been adopted
assumption of 20% ripple input current. Therefore, because CMC has a certain complexities.
ILpeak ≈ 12.1A. The schematic diagram of a VMC is shown in Fig. 5
Substitute all values in equation (6) to find Lcrit, which is [3]. Vout of the boost converter is observed through a
equal to (3.7 mH ). voltage divider (R1 and R2) that feeds a fraction of the
The practical design of the inductor is based on the output voltage back and creating a closed-loop system.
value of critical inductance that is calculated and The feedback voltage (Vfb) and the reference voltage
maximum amount of current that is carried. A toroidal (Vref) are entered into the error amplifier to generate the
ferrite core is suitable selection for the design. error signal (Ve). The generated signal (Ve) is then fed to
the compensator (such as PID controller) to produce
E. Output Capacitor Selection control voltage (Vc). This control voltage signal is
The output boost converter capacitor (Cout) is greatly compared with a saw-tooth wave to produce a
affected by the output voltage ripple (Δ Vout). The output controllable duty cycle which is called pulse width
voltage peak-to-peak ripple can be determined by [2]: modulation (PWM) signal, that drives the MOSFET[4,
Vout out
I D 6].
f swCout
(9)
The capacitor value can be determined from:
Cout
I out D
f sw Vout
(10)
The selection of Cout must be higher than the calculated
value to make sure that the converter’s output voltage
ripple remains within the specific range and its
equivalent series resistance (ESR) should be low. ESR (a)
can be minimized by connecting a number of capacitors
in parallel.
Substitute the values of Iout, fsw, and ∆Vout into Equation
(10), the capacitance value is about 166 uF. An
appropriate standard capacitor is chosen greater than this
calculated value.
Table 3 summarized the calculated parameters and
selected components of the proposed boost converter
based on the equations and considerations mentioned (b)
previously. Fig. 5: VMC of the boost converter
(a) Boost converter and Control block
Table 3: Boost converter calculated parameters and (b) Voltage control block
selected components
When Vout of the converter is increased, Vc is also
increased which causes the duty cycle of the MOSFET to
decrease (less pulse width) as shown in Fig. 6. The
changing in duty cycle will adjust Vout of the boost
converter by reducing error to zero and make the output
voltage follow the reference value.
Vc (t ) K pVe (t ) K i Ve (τ )dτ K d
t
dVe (t )
0
dt
(12)
Where:
t: Current time, and τ : Integration variable; its value
from time zero to the current t [8].
Although there are only three parameters associated
with the PID controller, but the tuning of them to the
optimal value is a complex problem. There are different
methods are adopted to find the values of these
parameters, called PID tuning. If the PID controller Fig. 9: Complete simulink model of the boost converters
parameters are selected incorrectly, the controlled
process will become unsatisfactory or unstable. The boost circuit has been connected to a PV system
The Ziegler-Nichols method [9] is widely used to tune which is pictured in details in the mathematical simulink
the parameters of the PID controller experimentally. model of Fig 10.
First, set Ki and Kd to zero and the gain Kp increase until
the system reaches to a stationary oscillation. After that
Kp, Ki and Kd parameters will calculated through
determining the gain (Ku) and the time of the oscillation
(Tu). The parameters are calculated depending on the
controller type, and can be found in the Table 4.
(a)
(b)
Fig. 13: Step changes in weather conditions
a) Operating temperature, b) Solar insolation
Fig. 11: Boost converter input and output voltages at
D=0.23 The output voltage response and the changes in the
input voltage have been pictured in Fig. 14. The figure
The inductor current (IL) and output current (Iout) are shows that the output voltage is to some extent constant
shown in Fig. 12. The inductor current ripple (Δ IL) of the and equals 325V. After each disturbance in the input
converter is (1.9 A) which falls within the requirements voltage (increase or decrease), the controller senses these
range, (≤ 20% IL). This means that the inductor value changes and respond to them after comparing them with
selection was correct. the reference voltage. The output voltage quickly reaches
the steady state value (after 0.1s from the instant of
disturbance creation). This means that the PID controller
has an effectiveness response during the adopted In order to implement a PWM signal generator for
changes. controlling the duty cycle of the MOSFET switch using a
microcontroller, the following items should be covered.
- PWM concept and how can be generated using Arduino
microcontroller.
- How to measure DC voltage by microcontroller.
A. PWM Generation Using Microcontroller
A PWM is a well known technique to control the
output voltage by adjusting on-time of the pulse width
(duty cycle) of analog signal. The frequency of PWM
represents the amount of time taken by PWM to
complete one cycle. In order to produce variable analog
values, the pulse width can be changed from 0% to
Fig. 14: Response of Vout of closed loop system at 100%. Figure 16 displays the PWM output for different
constant load and Variable Vin duty cycle. The distance between any two successive red
lines represent the time of one cycle and the reciprocal
ii- Constant input voltage and variable load this time interval gives the switching frequency of the
The designed closed loop PID controller also has been PWM output. To effectively use the PWM function of
tested under load step changes while the PV system the Arduino, its timer function should be concerned.
voltage remains constant at STC. As it is clear from Fig.
15, the load changes have been issued at 0.2s interval. It
is obvious that the PID controller response depends on
the amount of changes in the load and the output voltage
almost matches the desired value of 325V.
corresponding output is toggled. Each timer has pre-scale microcontroller using (analogRead) function that covers
factors (such as 1, 8, 64, 256, or 1024) to set the time the range 0 to 1023.
intervals between successive counting. The timer clock The step increment can be found as:
frequency represents the ratio of Arduino clock step increment=1ADC = 5/1024 = 0.00488 V
frequency (16 MHz) and pre-scale factor. Vin = Vout*(R1+R2)/R2
Two registers are used to adjust the output of each = ADC reading * 0.00488 * (1012kΩ /12kΩ )
timer. They are called Timer/Counter Control Registers, This marks that a 1023 reading corresponds to an input
written acronym TCCRnA and TCCRnB, and the value voltage of 5V. In practical, 5V may not obtain always
of x is the timer number (0,1,2). These two registers hold from the Arduino, so the voltage between the 5V pin and
the following groups of bits that control the operation of ground pin of Arduino must be measured first during
the registers, frequency, and also pre-scalar values:
Waveform Generation Mode bits (WGM): These bits
calibration by using a voltmeter, and use
1ADC=measured voltage/1024 instead of (5/1024).
control the supported mode of the timer. These bits are The microcontroller changes the duty cycle according
split between the Registers TCCRxA and TCCRxB. to the reading of analog value of the feedback voltage (at
Clock Select bits (CS): These bits control pre-scale its analog input pins). The modification of the duty cycle
value. follows the relation derived in CCM (D=1- Vin/ Vout).
Compare Match Output Mode bits (COMxA and
COMxB): These bits enable/disable/invert outputs A
and B.
There two PWM modes of the operation for the timer
(fast mode and phase correct mode). In this work, fast
PWM mode is used so it will be explained briefly here
only.
In the fast mode PWM mode this PWM mode, the
timer repeatedly counts from 0 to 255. The output turns
ON (HIGH) when the timer is at 0, and turns OFF
(LOW) when the timer reaches the output compare
register value (OCRxX). Higher OCRxX value means
the higher duty cycle. The diagram given in Fig. 17
shows the outputs values for the two registers OCRxA
and OCRxB. Note that both outputs, OCxA and OCxB, Fig. 18: The boost converter circuit and its control
have the same frequency with different duty cycle.
the power circuit. Figure 20 shows the schematic Fig. 21: Flowchart of the digital PID algorithm
diagram of the 6N137 optocoupler.
XI. EXPERIMENTAL RESULTS AND ANALYSIS
The boost converter system is tested with a closed loop
only using digital PID controller under the same states
introduced in closed loop simulation subsection in order
to establish the circuit operation and emphasize the
simulation results.
i- Variable input voltage and constant load
The input voltage is supplied from rectified variable
AC source. It increased and decreased is steps (increased
from 180V to 240V then return to 180V). The load is
Fig. 20: 6N137 optocoupler schematic diagram constant and has power of 1kW. The output voltage
response is appeared in Fig. 22 where it is close to 325V
The output PWM signal of the 6N137 optocoupler is during two changes in the input voltage. The practical
applied to the power MOSFET switches in the boost results offer that the output voltage is approximately
power stage via an IR2110 gate driver. The PWM signal match the simulation result and thereby confirms the
will be fed to the LIN pin (pin 12) as depicted in circuit of controller design. The positive and negative overshoots
Fig. 18 which has been given obviously. When the are about 45V and 60V respectively. The positive
internal logic detects logic high at pin 12, the Lo pin (pin overshoot is due by the rise in the input voltage while
1) will be driven. negative overshoot due to the drop in the input voltage.
Moreover, the converter circuits have some protection The settling time is approximately 1s and is higher than
features. The zener diodes at the analog inputs are used simulated time (0.1 ms) due to the parasitic impact of the
for over voltage protection. They ensure that the practical boost components circuit.
feedback voltage does not exceed their breakdown
voltage of 5 V. The small ceramic capacitors are putted
in parallel with the large electrolytics that have a
relatively high resistance to reduce the SER and hence
improve the efficiency and performance of the circuit.
X. DIGITAL IMPLEMENTATION OF PID CONTROLLER
The program boost control code is written use Arduino
software and loaded into the microcontroller directly.
ATmega328P executes calculation based on the PID
control algorithm and generate a PWM control signal
using Timer 2 and working in fast PWM Mode. Figure
21 shows the flowchart of the proposed digital PID
algorithm. (a)
(b)
Fig. 22: Output voltage response at during step change
input voltage
a) when Vin step up from 180 to 240V,
b) when Vin step down from 240 to 180