Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/352845845

Controller Design for an Off-Grid Photovoltaic Solar Inverter

Conference Paper · May 2021


DOI: 10.1109/MI-STA52233.2021.9464514

CITATIONS READS

0 132

4 authors:

Abdusslam Alrimali Akrem Mohamed Aljehaimi


Misurata University Misurata University
1 PUBLICATION 0 CITATIONS 11 PUBLICATIONS 119 CITATIONS

SEE PROFILE SEE PROFILE

Abdallah Hussein P. Pillay


Misurata University Concordia University Montreal
2 PUBLICATIONS 12 CITATIONS 479 PUBLICATIONS 13,356 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Design and performance of especial electric machines View project

Design Considerations and Implementation of an Electromechanical Battery System View project

All content following this page was uploaded by Abdusslam Alrimali on 25 April 2023.

The user has requested enhancement of the downloaded file.


2021 IEEE 1st International Maghreb Meeting of the Conference on Sciences and Techniques of
Automatic Control and Computer Engineering MI-STA, 25-27 May 2021, Tripoli-Libya

Controller Design for an Off-Grid Photovoltaic


Solar Inverter
Abdulsalam Ali Alrimali Akrem Mohamed Aljehaimi Abdallah Suliman Hussein
Electrical and Electronic Engineering Electrical and Electronic Engineering Electrical and Electronic Engineering
Department Department Department
Misurata University Misurata University Misurata University
Misurata, Libya Misurata, Libya Misurata, Libya
abdulsalam.alrimali@eng.misuratau.ed a.aljehaimi@eng.misuratau.edu.ly alxash1@gmail.com
u.ly
Pragasen Pillay, FIEEE
Department of Electrical and Computer
Engineering
Concordia University
Montreal, Canada
Pillay@encs.concordia.ca

Abstract— One of the key components in photovoltaic NOMENCLATURE


(PV) electrical systems is the inverter. It is the unit that DC link voltage, V
converters the DC power generated from the solar Output current from the inverter, A
panels or the batteries to an AC power that can supply Current of filter Capacitor, A
the electrical home appliances. The issues associated
Current of Primary winding, A
with the inverter are power quality and harmonics. This
paper introduces a controller design for a single phase Capacitor of filter, F
full bridge inverter for an off-grid PV electrical system Filter Capacitor Voltage, V
which supplies a typical home or an office. For a pure Resistance of Primary winding, Ω
sinewave inverter, a sinewave pulse-width modulation Inductance of Primary winding, H
(SPWM) scheme is used. This puts the switching
Filter Inductance, H
harmonics far away from the fundamental 50Hz
component, which eases the filtering process by a simple V_inverter Modulation indexV
Inverter voltage,
low pass filter (LPF). As a result, a sinusoidal AC Voltage transfer Function.
voltage waveform is obtained. Then, a step up voltage OLTFv(s) open loop transfer function of voltage
transformer is used to step up the voltage to 220V. As
Current transfer function
K
the AC load increases, the drop voltage on the LPF and
the transformer primary increases significantly. This proportional gain
causes the secondary voltage of the transformer to drop Close loop transfer function of current
drastically bellow 220V. To solve this issue, a cascaded crossover frequency
voltage and current control loops are designed to control V_primary Voltage of primary winding
V_ref
the transformer primary voltage at exactly 12V so that Reference voltage, V
V_load
the secondary voltage is held always at 220V. The
Load voltage, V
inverter circuit with the closed-loop control is simulated
)*+,
Voltage open loop control and current close
fully using Power Simulation (PSIM) software. Then, the
loop control plant.
inverter circuit is built and tested experimentally in the carrier triangular waveform of fixed high
laboratory using only the open-loop control, and this is -
frequency (10 kHz), V
due to the lake of LEM voltage and current sensors in - Modulating voltage AC waveform, V
the laboratory.
Cut-off frequency, Hz
Keywords— Full-bridge inverter, SPWM, PI I_load Load current, A
Controller, PSIM. PM Phase Margin

978-1-6654-1855-3/21/$31.00 ©2021 IEEE


214
I. INTRODUCTION ON and OFF 100 times in a second. This is not possible to
The inverter is a power electronic device that converts be done mechanically or manually. Thus, MOSFET or
DC power to AC power. It allows a battery-based IGBT replaced the manual switches for ON and OFF
independent power system to run conventional electrical purpose. The MOSFETs or IGBTs can turn ON and OFF
appliances through conventional home wiring [1]. 10000 time per second easily with the help of heat sinks.

The inverter looks like a box with one or two switches on III. SYSTEM TRANSFER FUNCTION AND CONTROL
it, but inside it is a small universe of dynamic activities. A The electrical circuit along with the equivalent circuit of
modern home inverter must cope with input voltage that the inverter are shown in Fig. 2. The inverter circuit consists
varies as much as 35% (with varying battery state of charge), of four stages. The DC bus, the H-bridge, the low pass filter,
and also with huge variations in output demand (from a and the step-up transformer with the load. The equivalent
circuit of the solar single-phase inverter is shown in Fig.2,
where 1 is the modulation index, which is the ratio between
single night-light to a big surge required to start a well pump
modulating (control) signal 2345 and the peak value of the
or a power tool). Through all, it must regulate its output
quality within narrow constraints, with a minimum of power switching (triangle) signal 26457 .
loss. This is no easy task [2].
For an inverter to be right for a system, its watts rating
must be approximately equal to the solar system's watts
rating. This is the correct way to size an inverter. If multiple
appliances are run at the same time, and one wants to make
sure the inverter can handle the load, continuous Watt ratings
of all the appliances that may be running are added and
compared to the inverter rating. Depending on the total Fig. 1. Basic configuration of full-bridge (H-bridge) inverter.
continuous watts obtained, one can determine whether or not
the inverter can handle the load.
The second way solar inverters are rated is in Surge
Watts. Another method for an inverter to be right for a
system, its surge watts rating must be approximately equal to
(or greater than) the potential surge watts of each appliance.
By doing this, one can determine the minimum surge wattage
that inverter need to be rated for. Usually, it needs about 1.5
to 2 times as much surge watts as continuous watts for a
good measure of surge protection (more, if powering heavy
duty equipment) [2].
This paper proceeds as follows. The operating principle
of the inverter is presented in section II. The System transfer
function and control is in section III. The design and
simulated results are in section IV. The experimental results
and conclusion are in section V and VI, respectively.

II. THE OPERATING PRINCIPLE OF THE INVERTER

An inverter with four switches and one input DC


voltage is known as a full-bridge inverter as shown in Fig. 1.
The output (load) is connected between the middle of the Fig. 2. Equivalent circuit of the system.
switches. When S1 and S4 are ON, and S3 and S2 are OFF,
the current flows through S1 to the load, and returns back to By applying Kirchhoff current law on the equivalen
the DC bus through S4. When S3 and S2 are ON, and S1 circuit, one can obtain the following [3],
and S4 are OFF, the current flows oppositely to the load
23 (9)
87 (9) = 83 (9) + 84 (9) = 83 (9) +
through S3 and returns back to the DC bus through S2. This
<4 + =>4
(1)
23 (?)
is called bipolar pulse width modulation which forces the
87 (?) = 83 (?) +
<4 + @A4
current through the load in an alternating direction [1]. This (2)
is the basic technique which produces an AC waveform.
From Kirchhoff voltage law, the following equations are
The frequency of the AC supply which is available at
obtained,
homes (the grid) is 50 Hz. This means, the switches must be

215
F84
1(9)BC3 = AD E G + 23 (9)
[4], the minimum inductance value can be calculated as
F9
(3)
follows,
1(?)BC3 = ?AD 87 (?) + 23 (?) (4) Bnopq
F23 (9) AD =
83 (9) = HD I J 2s t un t √2 t ∆xn
F9
(5)
yz
83 (9) = HD ?23 (?) = ≅ 0.1 j€ (12)
(6) Y{ty|ty|f t√Yt|.Y

By substituting (2) and (6) in (4):


23 (?)
1(?)BFK = ?AD L83 (?) + M + 23 (?)
Hence, the minimum inductance value is 0.1 mH. The
<4 + ?A4 chosen inductance is 0.2 mH
OP (Q)
= ?AD NHD ?23 (?) + W + 23 (?) (7)
RS TUVS
VZ
= X? Y AD HD + ? (RS TVS Q)
+ 1\23 (?)
Therefore, the transfer function of the capacitor voltage to
the modulation index (voltage plant) can be obtained:
b dS
E TQG
O]P (Q) `aP cZ eS
_ (Q)
=
^ VZ d b b b dS (8)
Q f TQ g E S GTQ I T JT
eS cZ eZ eS eS eZ cZ

Knowing that 83 (9) = HD ?23 (?), thus, Fig. 3. The FFT of the inverter output voltage.

BC3 <4
Now, with the cut-off frequency and filter inductance in
@ k + ?l
h̃3 (@) AD A4 hand, it is easy to find of the filter capacitance from the
=
_ (@)
j < 1 1 1 <4 (9)
?m + ?Y k 4l + ? E + G +
following equation,
A4 HD AD A4 A4 AD HD 1
u3 = , (13)
By subsitituting equation (6) in (2), 2s•AD HD
<4 1
HD (? Y + ?+ )
A4 A4 HD which found to be 126 µF. The chosen value of the filter
87 (?) = 23 (@)
< (10) capacitance is 100 µF. This makes the exact cut-off
k 4 + ?l
A4 frequency of the filter is 1.13 kHz, which is very fine with
By subsituting equation (10) in (8), the transfer function of this application.
the inductance current to the modulation index (current B. System behavior in the open loop
plant) can be obtained,
BC3 Y <4 1 Figure 4 shows the PSIM circuit of the inverter in an
E? + ? + G
h̃7 (?) AD A4 HD A4 open-loop control with a resistive load equals to 220Ω.
=
_(?) ? m + ? Y k<4 l + ? 1 E 1 + 1 G + <4
j (11)
A4 HD AD A4 A4 AD HD

IV. DESIGN AND SIMULATION

A. Design of the low-pass filter


The cut-off frequency of the low-pass filter has to be at
least 10 times bigger than the frequency of the fundamental
component, which is 50 Hz. This is to ensure no attenuation
is taking place for the fundamental component at 50 Hz.
Fig. 4. PSIM circuit of the inverter with an open-loop control
Also, the value of the cut-off frequency of the low-pass
Figure 5 shows how PWM works. The modulation
filter has to be 10% to 20% of the switching frequency,
signal (50 Hz) is compared with the carrier signal (10 kHz).
which is 10 kHz. This is to ensure excellent filtering
When the modulating signal is bigger than the carrier signal,
dynamics for the switching harmonics Therefore, one can
the positive DC bus voltage (+Vdc) is applied on the inverter
choose the cut-off frequency of the low-pass filter to be 1
output. However, when the modulating signal is smaller
kHz.
than the carrier signal, the negative DC bus voltage (-Vdc) is
As for the filter inductance, its value is chosen so that
applied on the inverter output.
the harmonics of the inductance current must be limited
Figure 6 shows the primary and secondary voltages of
below 2% of the fundamental current (in our case 0.2 A).
the transformer. It is clear that the LC filter is working
Figure 3 shows the frequency spectrum of the inverter
perfectly since the primary voltage is almost pure sinusoid.
output voltage with 0.95 modulation index. From which it is
clear that the most severe harmonic is the one at 10 kHz
with a peak voltage of 16 V. Therefore, and according to

216
filtered out by an electrolyte capacitor on parallel with the
DC bus. A 50 V, 2200 µF electrolyte capacitor should be
fine. The high order harmonics in the input voltage and
current can be filtered out by the use of film capacitor of
10µF to 15 µF. The detailed calculations of those two
capacitors can be found in [4].
When the inverter is loaded, it starts drawing more
current from the battery system. This causes the drop
voltage on the low-pass filter to increase. For this reason,
Fig. 5. Sine Pulse Width Modulation
the primary voltage of the transformer will not be fixed at
12 V. It will actually drop down. Thus, the load voltage will
not be 220 V. It also drops significantly as the load
increases. Figure 8 shows the primary and secondary
voltages of the transformer with an increased load (load
resistance = 22 Ω). It can be seen from Fig. 8 that both
voltages have dropped, and this is due to the increased drop
voltage on the filter inductance. To stabilize the load voltage
at 230 V, one must control the primary voltage to be at 12 V
always. This is done by changing the modulation index
Fig. 6. The primary and the secondary (load) voltages when the load
accordingly. Changing the modulation index manually is
equals to 220Ω.
obviously not a feasible solution. Therefore, a closed-loop
control is necessary in this case.
Furthermore, figure 6 shows that the rms values of the
primary and secondary (load) voltages are 12.56 V and
225.5 V, respectively. In Fig. 7, it can be seen that the input
current is smoothed out by the filter inductance and filter
capacitance. It can also be seen that the ripple of the inverter
current, which is the inductance current, is quite high
(around 14% of the fundamental rms current).

Fig. 8. The primary and the secondary (load) voltages when the load
equals to 22Ω.

C. Design of a voltage control loop for the inverter


The aim is to design a controller that can control the
primary voltage of the transformer, which is the filter
capacitor voltage, at 12 V during all operating conditions.
This is done by controlling the modulation index. Thus, a
transfer function between the capacitor voltage and the
modulation index is needed. Actually, this transfer function
is already obtained in the previous section, which is
equation (8). By plugging the values of the parameters in
(8), the following transfer function is obtained,
2]3 (@) 1.2 ∗ 10† (@ + 0.4)
„O = =
j_ (@) (@ + 0.2222)( @ Y + 0.1778 @ + 9 ∗ 10‹ )
Figure 9 shows the bode plot of the of the plant. By
Fig. 7. The current of the system when the load equal to 220Ω
choosing the crossover frequency (fx) to be 20% of the
However, this current ripple is further filtered out by the
switching frequency (10 kHz * 0.2 = 2000 Hz). The slop
filter capacitance. As one can see that most of the current
around the crossover frequency is negative 40dB. This
ripple appeared in the inverter current is passed through the
means the plant requires a PI controller with two poles as
capacitor leaving the primary current of the transformer
shown in equation (14). This PI is sometimes called a
almost ripple free (2.2% as designed). There are low order
PI type-3.
harmonics appear in the input current. Most severely one is
at 100 Hz (twice the fundamental frequency). This is
common in the single phase inverters. This harmonic can be

217
Equation (15) gives the open-loop transfer function
between the inductance current and the modulation index.
This is the plant for the inner current loop. The closed loop
transfer function HA•’7 (?) is given by the following
equation:
Œ t „7 (?)
HA•’7 (?) = ,
1 + Œ t „7 (?)
(16)

Fig. 9. Bode plot of the planet Gv(s).

Œ•Ž (1 + ?•)Y
„345 =
?•(1 + ?•• )Y
(14)

By designing a PI controller type-3 for a crossover


frequency (fx) equals to 2000Hz and a phase margine (PM)
equals to 60 degrees, the PI parameters can be obtained. The
PI gain(KPI) is found to be 0.13, the PI time constant (•) is
found to 0.6msec, and the poles time contant (Tp) is found to Fig. 10. PSIM circuit of the inverter with a voltage control loop
be 10.47µsec. The output of the controller is the modulating
signal vctr(s), which is compared with the carrier signal
vtri(s). The implantation of the control circuit in PSIM is
shown in Fig. 10. The reference voltage is (12 Vrms or 17
Vpeak, 50Hz).

Figure 11 shows the primary voltage of the inverter


(V_primary) is following the reference voltage (V_ref), and
the load voltage (V_load) is at 230.7 V. As the load Fig. 11. The primary voltage with the reference voltage, the load voltage,
increases, the shape of the waveforms improves. and the load current when the load equals to 220 Ω.
Where Πis the gain of the proportional controller. By trial
To sum up, having one closed control loop to control and error method, it is found that the best value of the
the output voltage is feasible, however, with a high order proportional controller (Œ) is 20.
controller (complex design) and with low distortion in the
output voltage and current waveforms at small loads. Thus,
one should investigate adding a current inner control loop
along with the voltage outer control loop in a cascaded
manner, and how it affects the performance of the system. Fig.12. Block diagram of the control inner current loop.

D. Design of a voltage and a current control loops ii) Controller design of the outer voltage loop using a PI
(Cascaded Control loops) controller:
It is important to mention here that when trying Figure 13 shows the block diagram of the inner and the
different combinations of using a proportional controller and outer loops. In order to design a controller for the outer
a PI controller in the inner current loop and the outer voltage voltage loop, it is important to find the plant, which is the
loop, it was found that using a proportional controller in the relationship (the transfer function) between the transformer
inner current loop and a normal PI controller in the outer primary voltage (filter capacitor voltage) and the filter
voltage loop gives the perfect results. inductance current (the output of the inner current loop)
i) Controller design of the inner current loop using a multiplied by the inner closed-loop transfer function.
proportional controller: Therefore, the open-loop transfer function (the plant) of the
Figure 12 shows the block diagram of the inner current outer voltage loop is:
loop. By plugging the values of the parameters in (9), the
following transfer function is obtained,
h̃7 (@)
„7 (?) =
j
_(@)
1.2 ∗ 10‘ ∗ (? Y + 0.04 ∗ ? + 0.04) (15)
=
(? + 0.2222)( ? Y + 0.1778 ? + 9 ∗ 10‹ )
Fig. 13. Block diagram of the outer voltage control loop with the inner
current loop.

218
“”•–9O (?) = „O (?) ∗ HA•’8 (?) 12V at the primary of the transformer to insure having 220V
2]3 (@) Œ t „7 (@)
= ∗
at the load side. Figure 18 shows the primary and load
h̃(@) 1 + Œ t „7 (@) (17) voltages when the battery voltage reduces to 20 V. One can
@A4 + <4 Œ t „7 (@)
= Y ∗ . see that the controller is working and primary voltage is still
@ A4 HD + @<4 HD + 1 1 + Œ t „7 (@)
at 11.74 V and the load voltage is around 225 V.
By plotting the bode plot of the above open-loop
transfer function “”•–9O (?), it is found that the slop of the
gain at the crossover frequency fx = 2 kHz equal to -20dB.
Thus, a PI controller has been chosen to give the required
phase margin (PM), which is 60o. The transfer function of
the PI controller is given by the following equation,
Œ•Ž (1 + ?•)
„345—˜ = .
?•
(18)

The calculations of the compensator’s parameters yield • =


15.45j?šK, •–F Œ•Ž = 1. The circuit in PSIM is shown in
Fig. 14. Figure 15 shows the primary transformer voltage
with the reference voltage. One can see that the primary Fig. 16. The actual and reference inductance current, the actual and
reference primary voltage, and the load voltage when the PI controller
transformer voltage is not following the reference, and there gain is 30 and the load equals to 220 Ω.
is an error in the amplitude and phase. In this case, the
controller is not fast enough, which is due to the small gain
of the PI controller. This can be rectified by increasing the
PI controller gain. Figure 16 shows the primary voltage with
the reference voltage when the gain of PI equals 30. It is
clear that the primary voltage is following the reference.

Fig. 14. PSIM circuit of the inverter with the cascade control loop. Fig. 17. The same outputs as in Fig. 16, when the PI controller gain is
30 and the load equals to 22 Ω.

Fig. 15. The actual and reference inductance current, the actual and
reference primary voltage, and the load voltage when the PI controller
gain is 1 and the load equals to 220 Ω.
Figure 17 shows the results when increased load. It is
clear that the load voltage has not changed and remained
almost pure sinusoidal, which proves that the outer voltage
control loop is working.

As the battery voltage might reduce from 24V at full


charge to 20V (minimum allowed discharge), the inverter
Fig. 18. The same outputs as in Fig. 16, when the battery voltage is
should regulate the output inverter voltage to always get 20V and the load equals to 110 Ω.

219
V. EXPERMENTAL RESULT
A proof of concept inverter circuit with an open-loop
control has been implemented in the laboratory. The circuit
validates the concept of Sine Pulse Width modulation
(SPWM) and the inversion concept with a low pass filter to
filter out the switching harmonics. Finally, a single phase
step-up transform connected to a power resistive load is used
to step up the voltage to the grid level. Fig. 24 shows the
experimental setup.

Fig. 21. One micosecond deadtime.

Fig. 19. Experimental Setup


The SPWM is implemented digitally using
microcontroller (in FPGA), where the carrier signal of
Fig.22. Inverter output voltage (24V peak).
10kHz is compared with a sinusoidal reference of 50 Hz in
order to generate the switching signals to the gate drivers of
the MOSFETs. A bipolar SPWM scheme is adopted. The
gate drive is powered by 5 Vdc. The dead-time is 1 µs. This
is to prevent the short circuit on the DC bus by insuring that
the switches in one leg of the H-bridge are not ON at the
same time.
Figure 20 shows the gating signals for two switches in
one leg. It can be seen that the signals are inversion of each
other. This is because the switches in one leg cannot be ON
Fig. 23. Inverter output voltage (red trace).
at the same time. The dead time is shown in Fig. 21.

Fig. 24. Secondary transformer voltage with its FFT.


Fig. 20. Gaing signals. shows the secondary voltage of the transformer (load
The inverter output voltage is shown Fig. 22. This voltage), with the FFT signal. It can be seen that the voltage
waveform illustrates the sine PWM technique. Fig. 23 is a pure sinwave with 50 Hz frequency.
shows the output voltage of the inverter after being filtered
VI. CONCLUSION
by a low-pass filter. The cut-off frequency of the LC low-
pass filter is almost 500 Hz. The inductance filter is 3 mH, From the simulated and experimental results, some points
and the capacitor filter is 30 mF. Figure 23 is obtained using can be stated.
a resistive load connected directly after the filer without the • A closed loop control is necessary to prevent voltage
use of transformer. It can be seen that the output voltage of drop at the load side. Changing the modulation index
the inverter (red trace) is almost pure sinusoidal. Figure 24 manually is not a feasible solution.

220
• Using only one voltage closed loop control comes on
the cost of a complex controller and poor control
performance at small loads.
• With the use of cascaded voltage and current control
loops, the controller degree of complexity is reduced
and the control is enhanced.
• During the experiment, a dead-time of 1 µs is needed to
avoid short-circuiting the batteries.
• A proof of concept single phase inverter with an open-
loop control was built along with a LPF to filter out the
switching harmonics. The voltage on the secondary side
of the transformer was at the grid level with almost zero
distortion.

ACKNOWLEDGMENT
The authors would like to acknowledge the support
of Misurata University.

REFERENCES
[1] S.G. Solanki, M. Ramasamy, S. Manzoor and U. K. R.
Ganesalingam “Design & Development for OFF grid Solar
Inverter”, 2018 IEEE 4th International Symposium in
Robotics and Manufacturing Automation (ROMA),
Perambalur, Dec. 2018.
[2] R. John, S. S. Mohammed and R. Zachariah, “Variable step
size Perturb and observe MPPT algorithm for standalone
solar photovoltaic system”, 2017 IEEE International
Conference on Intelligent Techniques in Control
Optimization and Signal Processing (INCOS), Srivilliputtur,
Mar. 2017.
[3] N.M. Abdel-Rahim, and J.E. Quaicoe, “Analysis and design
of a multiple feedback loop control strategy for single-phase
voltage-source UPS inverters”, in IEEE Transactions on
Power Electronics, vol. 11, no. 4, pp. 532 – 541, Jul. 1996.
[4] A. S. Hussein, “Design of a Non-Isolated Solar PV Inverter
for Household Applications”, Third Conference for
Engineering Sciences and Technology (CEST), Alkums,
Dec. 2020. URL:
http://dspace.elmergib.edu.ly/xmlui/handle/123456789/199

221

View publication stats

You might also like