Analysis and Simulation of Single Phase Inverter Controlled by Neural Network
Analysis and Simulation of Single Phase Inverter Controlled by Neural Network
Analysis and Simulation of Single Phase Inverter Controlled by Neural Network
Ahmed G. Abdullah
ABSTRACT
This paper presents the analyses and design of Neural Network (NN) control of a
single phase voltage source inverter with an L-C filter using only voltage sensor. A multiple
feedback loop PI (Proportional-Integral) controller for PWM (pulse width modulation)
inverter is built by root-locus method then simulated using Matlab (Simulink). The proposed
NN is traind off-line using the patterns obtained from the simulated inverter with multiple
loop PI (Proportional-Integral) controllers. Simulation results show that the proposed NN
control can achieve low total harmonic distortion under linear loading condition, small steady
state error and good dynamic response under any disturbance change in load. A hardware
single phase inverter with programmed pulse width modulation control based on
microcontroller is built and implemented with resistive load.
. (L-C) ( single phase inverter(( ANN)
) Root locus(( PI controller)
, MATLAB (SIMULINK)
) off line(
, .(PI controller(
.
.)microcontroller(
Received: 3 3 - 2010
Accepted: 2 2 - 2012
Al-Rafidain Engineering
No. 6
Vol.20
December 2012
1-INTRODUCTION
With the increasing demands for high-quality power sources, a pulse-width
modulated PWM inverter has been used as a key element for a high performance power
conversion system such as uninterruptible power supplies (UPS), medical equipment and
communication systems [1]. In the UPS inverter the output voltage is required to be
sinusoidal with minimum total harmonic distortion (THD). This is usually achieved by
employing a combination of pulse width modulation (PWM) scheme and a second order filter
at the output of the inverter .One way of achieving a clean sinusoidal load voltage is by
using sinusoidal pulse width modulation (SPWM). In this technique the load voltage
waveform is compared with a reference sinusoidal voltage waveform and the difference in
amplitude is used to control the modulated signal in the control circuit of the power inverter
[1]. A multiple loop feedback control scheme can be utilized to achieve good dynamic
response and low total harmonic distortion (THD). Although the performance of these
schemes are good, the complicated algorithms and the heavy computational demands make
the implementations difficult.
In recent years, artificial neural networks (ANNs) have received considerable attention and
their applications are now being actively explored. ANNs are computing architectures that
consist of massively parallel interconnections of simple neural processor. They have the
ability to approximate an arbitrary nonlinear mapping and can achieve a higher degree of
fault tolerance [2]. When an NN is used in a system control, the NN can be trained either online or off-line. The most popular training algorithm for a feed forward NN is back
propagation. It is attractive because it is stable, robust, and efficient [2].
In this paper, first a multiple feedback loop PI controller with inner capacitor current
loop and outer voltage loop for PWM inverter is built and simulated using Matlab (Simulink)
to obtain adequate example patterns. Then a selected NN with using only voltage sensor is
trained off-line with data base comprising all example patterns using matlab programme.
When the training is complete this ANN is used to control the inverter on-line. Simulation
results show that the proposed ANNs controlled inverter achieve low THD, small steady state
error and good dynamic responses under disturbance change in load or input voltage. Finally
a simple hardware inverter with programmed PWM based on microcontroller is built.
Al-Rafidain Engineering
No. 6
Vol.20
December 2012
3-COMPONENT SELECTION
The magnitude of the ripple
current and ripple voltage in the output
of the inverter is determined by the
size of the LC filters. Once the filter
size has been chosen, the PI
compensator constants are chosen..
The design specifications for the
proposed inverter circuit is shown in
table (1)
Value
15 KHz
350 V
220V
100
50 Hz
220V rms
Where Vd is the dc bus voltage, i is the inductor ripple current and f s is the inverter switching
frequency.
The output filter capacitor size is determined by the allowable output voltage ripple V o and can be
calculated from [5] :
Cf
i
8 f s Vo
(2)
If the dc input voltage is limited to 350 volt and the switching frequency is limited to 15 KHz, and if
the maximum inductor ripple current is limited to 20% of the maximum peak to peak output current,
then L f obtained.
L f 4.689 mH .
Mansoor: Analysis and Simulation of Single Phase Inverter Controlled By Neural Network
In order to obtain sinusoidal load voltage with a small amount of THD, the maximum ripple voltage is
limited to 1% of the maximum peak to peak output voltage, then C f is obtained C f 1.666F
Vo ( s) Vload ( s) R f il ( s) L f il ( s) s
il ( s )
(3)
Vo ( s ) Vload ( s ) R f il ( s )
(4)
Lf s
Vload ( s )
1
ic ( s )
Cf s
(5)
(6)
(7)
Fig.(5) shows the linear model of the inverter system (PWM inverter plus the output filter and
load), in which the proportional gain K represents the PWM inverter is equal to Vd / Vc ( Vd is the
voltage of DC power supply and Vc is the peak voltage of triangular carrier wave).
Fig.(5): block diagram of the linear model for PWM inverter plus
output filter and load (open loop)
Al-Rafidain Engineering
No. 6
Vol.20
December 2012
8-PRINCIPLE OF OPERATION
The output voltage is compared to a reference voltage and the voltage error signal is passed
through PI compensator as shown in Fig.(6). Then the signal forms the current reference for the inner
current loop. The current in the filter capacitor ic is measured and compared with the reference which
forms the current error. The error is passed through another Proportional and Integral (PI)
compensator to form the modulating signal. The proportional and integral constants of the PI
compensators are chosen to produce a stable system with good transient response and small steady
state error. The PI compensator provides high gain at low frequencies. The modulating signal is
compared with a triangular carrier signal to generate the required PWM signal.
Mansoor: Analysis and Simulation of Single Phase Inverter Controlled By Neural Network
The feedback signals of the capacitor current and load voltage obviously have to be scaled down to
low current and low voltage control signals. For this design the feedback signals are converted to perunit (pu) values of full load: 1 pu voltage represent 311 V (2*220) and 1 pu current feedback
represents 3.11 A. The triangular carrier waveform Vc also has amplitude of 1 pu. By approximating
the pulse width modulation to a linear function this can be neglected from the model in Fig.(7) . The
value of Kp and Ki for the inner current loop is calculated using Matlab GUI program shown in fig.(8)
and found to be :
Kp =1.0878 , Ki=9508.59
And the value of Kp and Ki for the outer voltage loop is found to be :
Kp =2.33 and Ki =9223
Fig.( 8): MATLAB (GUI) Window for control system design by root locus
Al-Rafidain Engineering
No. 6
Vol.20
December 2012
From the root locus plot shown in Fig.(9) its noted that the over all closed loop system is stable due to
the location of the root locus which are all on the left of the imaginary axis.
From the step response shown in Fig.(10), it is observed that the settling time is approximately equal
to the required value which is 1mse, the peak over shot is 13.8% and the steady state error of the
output voltage is equal to zero.
Mansoor: Analysis and Simulation of Single Phase Inverter Controlled By Neural Network
one node in the output layer). The activation functions are sigmoid in the hidden layer and linear in
the output layer. The inputs of NN are load voltage Vlo a d , load voltage with one sample time delay
Vload ( k 1) , load voltage with two sample time delay Vload ( k 2 ) , and error voltage. The
compensation signal (modulation signal Vcontrol ) is the desired output of the network. Fig.(11) shows
the ANN controlled inverter.
13-SIMULATION RESULTS:
1-SIMULATION RESULTS OF MULTIPLE LOOP CONTROL PWMINVERTER
The performance of the inverter system was run using the MATLAB simulation software
shown in Fig (12) . To evaluate the controller performance, several types of loading condition have
been tested. Fig.(13) shows the steady state load voltage and current for full resistive load of the
inverter under multiple loop PI controller. Fig.(14) shows the load voltage and current for 0.8PF
lagging and Fig (15) shows the load voltage and current at step change of load (no-load 1000 to full
load 100) at t=25msec. from the figures its noted that the multiple loop PI controller gives good
results, small steady state error (0.5V)rms, small THD, but have large peak over shoot at the step load
change.
Al-Rafidain Engineering
No. 6
Vol.20
December 2012
Fig.(13): Load voltage and current for full resistive load for inverter
under closed loop PI control
Fig.(14): Load voltage and current for full load and 0.8 PF lagging
under closed loop PI control
Mansoor: Analysis and Simulation of Single Phase Inverter Controlled By Neural Network
10
Al-Rafidain Engineering
Vol.20
No. 6
December 2012
Fig.(17):Load voltage, load current and spectrum analyzer for load voltage at full resistive load
for inverter under NN control
Fig.(18): Load voltage and current for full load and 0.8 PF lagging
under NN control
Fig.(19): Load voltage, load current at step load change (no load to
full load) at t=25msec for inverter under NN control
11
Mansoor: Analysis and Simulation of Single Phase Inverter Controlled By Neural Network
14-HARDWARE IMPLEMENTATIOIN
For further verifying of the performance of the proposed NN controller, an experimental
inverter system is built. The hardware implementation is based on AT89C51 microcontroller. It is
used to drive the DC-AC inverter circuit through the PWM look-up table. The PWM look-up tables
are obtained from the computer simulation of the inverter with closed loop NN control. Fig.(20)
shows the block diagram for the DC-AC practical inverter circuit, Fig. (21) shows the circuit diagram
of experimental inverter circuit while Fig.(22) show the photograph for experimental inverter circuit.
And the flow chart for microcontroller program is shown in Fig.(23).
Digital signal
trigger generator
circuit
Buffer
circuit
Optocoupler
circuit
Matching
circuit
12
Power
circuit
Al-Rafidain Engineering
Vol.20
No. 6
December 2012
13
Mansoor: Analysis and Simulation of Single Phase Inverter Controlled By Neural Network
16-CONCLUSION
A NN controller for single phase inverter using only voltage feedback has been presented in
this paper. Modules of the PWM inverter and LC filter have been developed to aid in the control
design. Two control strategies for the H-bridge inverter were designed and analyzed in detail, The
First, model for the inverter with multiple loops, inner capacitor current loop and outer voltage loop
using classical PI controller has been built and simulated under transient and variable loading
conditions and the example patterns have been taken from it. Then, the proposed ANN is trained offline with database comprising all example patterns using MATLAB program. When the training is
completed, the network is connected together with the inverter instead and is simulated under variable
and transient loading condition. The simulation results show that the multiple loop PI control and
proposed NN controlled inverter give good results i.e. small steady state error, low THD. But the NN
control have faster dynamic response than PI controller, so the proposed NN is best than PI controller
because it uses only voltage sensor and this will decrease the inverter cost and complexity Finally,
hardware inverter with programmed PWM using microcontroller has been built.
REFERENCES
[1] N. M. Abdel-Rahim and J. E. Quaicoe, Analysis and design of a
multiple feedback
loop
control strategy for single-phase voltagesource UPS inverters, IEEE Transactions on Power
Electronics, vol. 11, no. 4, pp. 532-541, July 1996
[2] X. Sun, D. Xu, F. H. F. Leung, Y. Wang ,Y. S. Lee "Design And
Implementation of Neural
Network Controlled UPS Inverter," IEEE Industrial Electronics Society, 1999. IECON apos;99
[3] N. Aphiratsakun, S. R. Bhaganagarapu, K. Techakittiroj
"Implementation of a Single-phase
Unipolar Proceedings. The 25th Annual Conference, vol. 2,PP. 779-784, 1999.Inverter Using
DSP TMS320F241", AU J.T. 8(4):pp 191-195, Apr. 2005
[4] Ned Mohan , Tore M. Undeland , William P. Robbins "Power Electronics : Converter,
Applications and Design" John Wiley &
Sons.Inc.2003.
[5] M. E. Fraser , C. D. Manning "Performance of Average Current
Mode Controlled
PWM
UPS Inverter with High Crest Factor
Load," IEEE Power Electronics and Variable-Speed
Drives, 26 - 28 October 1994, Conference Publication No 399,pp 661-667.
[6] M. J. Ryan , R. D. Lorenz "A High Performance Sine Wave Inverter Controller with
Capacitor Current Feedback and "BackEMF" Decoupling", IEEE Wisconsin
Electric Machines and Power
Electronics Consortium, vol. 1, pp. 507-513, 1995.
[7] N. R. Zargari, P. D. Ziogas, and G. Joos, A two switch high
performance
current
regulated DC/AC converter module, IEEE Transactions on Industry Applications Society, Vol.
2, pp. 929- 934,oct 1990.
14