You are on page 1of 5

IJCST Vol.

1, Issue 2, December 2010 ISSN : 2229-4333(Print) | ISSN : 0976-8491(Online)

Design and Simulation of Digital PID Controller for Open


loop and Closed Loop Control of Buck Converter
1
P. Geethanjali, 2P. Vijaya Priya, 3M. Kowsalya, 4J. Raju
1,2,3,4
VIT University, Vellore
E-mail : pganjali78@hotmail.com, 2pvijayapriya@vit.ac.in, 3mkowsalya@vit.ac.in, 4jraju@vit.ac.in
1

Abstract (PWM), technique at a fixed frequency. The switching device


This paper presents an implementation of an open loop and is a power MOSFET.
closed loop digital PID controller using microcontroller, 8051
for control of buck converter. The controller is used to change The paper is organized as follows. Mathematical modeling
the duty cycle of the converter and thereby, the voltage is of dc-dc converter and digital controller is given in section
regulated. The buck converter, P, PI and PID controller are 2. Section 3 describes implementation of MATLAB based
modeled and are evaluated by computer simulations. It has controller. Experimental results are obtained for both open
been found that the transient performance and steady state loop and closed loop for P, PI and PID controller. Microcontroller
performance is improved using PID controller. The simulated based implementation is presented in section 4. Concluding
open loop and closed loop PID controller performance is verified remarks are given in section 5.
experimentally. The experimental system is found to be more
advantageous and cost effective with microcontroller.
II. Mathematical Modelling of Buck Converter and Digital
Keywords Controller
Buck converter, PI controller, Microcontroller, Open loop, Closed
loop A. Mathematical Modelling of Buck Converter
The buck converter consists of linear elements L, C, R as well
I. Introduction as non linear switch S as shown in Fig..1. The converter is not
To produce quality goods in any industry, the process necessarily a linear system. Dynamic equation of the converter is written
require the use of variable speed drives. Variable speed dc and with the assumption that switch is a linear element [6].
ac drives are being increasingly used in all industries. These
drives and process take power from dc voltage sources. In
many cases, conversion of the dc source voltage to different
levels is required.
Until eighties, the simulation programs developed for the study
of converters in open loop control were sufficient to establish
the general behaviour of the system and make the design of
the circuit possible. Liping Guo [3] explained implementation
of digital PID controllers for DC-DC converters. The primary
advantages of digital control over analog control are higher
increased flexibility by changing the software, more advanced
control techniques and reduced number of components [10]. Fig.1: Buck Converter
Analog converters were first designed using frequency response The output equation of the circuit for the ON period is
techniques and converted into digital controllers [7]. Dusan
Gleich et al [1] explained digital controlled buck converter
with different control algorithms. All control algorithms are
performed at a continuous current mode of operation. The
state controller eliminates the overshoot at startup, but the
steady state error appears. The steady state error is eliminated
using a discrete PID controller [7]. This discrete PID controller
has faster response and smaller overshoots under the load
change condition [3-5].
Vahid Yousefzadeh and Shamim Choudhury [2] explained an
approach for the design and implementation of a non-linear The output equation of the circuit for the OFF period is
digital PID controller. It shows that the Proportional, Integral
and Differential gains of a PID controller can be selected based
on the input error signal value to achieve significantly improved
dynamic response.
A PID controller is designed using MATLAB functions to generate
a set of coefficients associated with controller characteristics
and implemented in microcontroller. To assure a constant
output voltage, a classical linear design of a control is frequently
used. The regulation is achieved by pulse width modulation Vo = Vc (6)

202  International Journal of Computer Science and Technology w w w. i j c s t. c o m


ISSN : 2229-4333(Print) | ISSN : 0976-8491(Online) IJCST Vol. 1, Issue 2, December 2010

Where i1 is current through the inductor.


Vc is voltage across the capacitor.
Vd is DC input voltage
The above equations are in state-space model form. (14)

. For simulation, the following values are used to simulate the


During ON-time x = A1 x + b1V d ; Vo = q1 x (7) buck converter.
R = inf Ω, L = 4.215mH, C = 1000μF, RL = 1.1 Ω and Vd =
. 24 V
During OFF-time x = A2 x + b2V d ; Vo = q 2 x (8)
Where, B. Mathematical Modelling of PID Controller
The PI controller in the continuous time domain is described
by
u (s) K
Gc (s) = = K p + i + Kd s
E (s) s
(15)

The proportional constant K p is implemented digitally by


a constant gain. Since a digital computer or processor has
finite word length, the constant can not be realized with infinite
resolution. The numerical integration technique i.e trapezoidal
rule of integration can be used to digitally approximate

the integral controller K i /s. The time derivative can be
The above representation is in standard state space form for approximated by backward difference rule.
each interval. A representation of the buck converter through Transfer function of the PID controller is obtained by taking
a single equivalent dynamic equation is obtained, combining z-transform of the difference equation as given below.
2.7 and 2.8 as given below.

(16)
(9)
.
Where, x avg is the average rate of change of dynamic variables III. Simulation of Open Loop and Closed loop Control of
over a full switching period. The above equivalent description Buck Converter using MATLAB
. Open loop and closed control of buck converter is analyzed in
is valid if x dTs and x(1-d)Ts are constant during the ON and OFF MATLAB for the model discussed in section 2.
duration respectively. Open loop simulink model of buck converter is shown in Fig.
The averaged dynamic equation is 2 and the results of buck converter for duty ratio of 0.65 are
x = Ax + Bvd (10) shown in Fig.. 3.
The linear model of 2.10 is given below
. ∧ ∧ ∧ ∧ ∧ ∧
x = A x + b v g + [(A1 + A2 )x + (b1 + b2 )v g ] d = A x + b v g + f d
(11)

From the above linear model of the converter we may define


the transfer function of the converter as follows.


Input Transfer function: ( d =0)

Fig. 2: Open loop simulink model of buck converter

(12) Simulink model of closed loop PID control of buck converter is


shown in Fig.. 4. The performance of controller with P, PI, PID
controller is shown in Fig. 5, Fig. 6 and Fig. 7 respectively.

Fig. 3: Output Voltage open loop buck converter for Vref =


(13) 15V


Control Transfer function: ( v g (s ) =0)

w w w. i j c s t. c o m   International Journal of Computer Science and Technology  203


IJCST Vol. 1, Issue 2, December 2010 ISSN : 2229-4333(Print) | ISSN : 0976-8491(Online)

Fig. 7: Output Voltage of buck converter for Kp = 6, Ki =1, Kd


= 0.0001, Vref = 15V
From the performance of open loop and closed loop control
of buck converter, it is clear that closed loop controlled buck
converter outperform the open loop controlled buck converter.
In closed loop control of buck converter, PID controller gives
improved transient and steady state performance compared
to other controller.

IV. Hardware Implementation


Buck converter and digital PID controller modeled in MATLAB
has been experimentally verified. Fig. 8 and Fig. 9 show the
schematic diagram of open loop and closed loop control of
buck converter with 8051 microcontroller.

Fig. 4: Closed loop simulink model PID of buck converter


Voltage

VRe
Time (Sec)
f
Fig. 5: Output Voltage of buck converter for Kp = 6, Ki =0, Kd Fig. 8: Schematic diagram of open loop control of buck converter
= 0, Vref = 15V with microcontroller
Voltage

Time (Sec)

Fig. 6: Output Voltage of buck converter for Kp = 6, Ki =1, Kd


= 0, Vref = 15V Fig. 9: Schematic diagram of closed loop control of buck
converter with microcontroller

204  International Journal of Computer Science and Technology w w w. i j c s t. c o m


ISSN : 2229-4333(Print) | ISSN : 0976-8491(Online) IJCST Vol. 1, Issue 2, December 2010

8051 microcontroller has two 16-bit timer/counter registers


namely timer 1 and timer 2. Both can be configured to operate
either as timers or event counters. In this work timer 1 is
configured to generate PWM pulses in TCON register. For closed
loop control, ADC0808 is used for interfacing analog circuit and
comparator circuit. Fig. 10 show the interfacing of ADC with
microcontroller. Port 0 is used as input port to read data. Port
3 is used for getting output. To isolate power circuit and control
circuit optocoupler is used. This symmetric PWM output is not
capable of driving the MOSFET. Driver is used to amplify the
output of the optocoupler and is connected to the gate of the
MOSFET. Fig. 11 show the laboratory set up of closed control
of buck converter. Fig. 12 and Fig. 13 show the open loop and
closed loop control flow chart. Fig. 14 shows the driver circuit
output and output of the buck converter.

Fig. 12: Flow chart for open loop control of buck converter
Fig. 10: Interfacing of microcontroller with ADC0808

Fig 11: Laboratory set up of closed loop control of buck


converter

Fig. 13: Flow chart for open loop control of buck converter

w w w. i j c s t. c o m   International Journal of Computer Science and Technology  205


IJCST Vol. 1, Issue 2, December 2010 ISSN : 2229-4333(Print) | ISSN : 0976-8491(Online)

P. Geethanjali received the B.Tech. degree in


Electrical and Electronics engineering from
Vellore Engineering College in 2001, M. Tech
degree in Electrical drives and control from
Pondicherry Engineering College in 2004.
She is doing research in the area of is control
of prosthetic hand from VIT University.
She has published papers in various journals and international
conferences. Her interest includes pattern recognition, soft-
computing, and controller design using DSP.
Ms. Geethanjali is IEEE Member and Associate member of
Fig. 14: Output of driver (CRO) and buck converter IE(I) and member in SSI.
(Multimeter)
M.Kowsalya was born in India in 1974
V. Conclusion She received B.E degree in Electrical and
As concluding remark, the performance of the open loop and Electronics Engineering and M.E degree in
closed performance is analysed using MATLAB and found that Power Systems from Annamalai University
the performance of closed loop controller gives satisfactory in the year 1995 and 1997. Her research
response with buck converter. It is found that the step response interests are power system stability and
of digital PID controller implementation in microcontroller 8051 power electronics applications in power
is simple and can implement in cost-effectively. In future it systems. She has published papers in international journals
can be extended to study the performance of intelligent and international conferences. M.Kowsalya is a member in
controller. institute of Engineers (India) [AMIE] and Life member in ISTE
and SSI.
References
[1] Dusan Gleich, Mira Milanovic, Suzana Uran, Franic Vijayapriya Tamilmaran was born in India in
Mihalic.“Digitally controlled buck converter” IEEE power 1976 and obtained her bachelors degree
electronics society ISCAS-2004, pp-V944-V947 in Vellore Engineering College, Vellore,
[2] Vahid Yousefzadeh and Shamim Choudhury “Nonlinear Tamilnadu, India in the field of Electrical
Digital PID Controller for DC-DC Converters” Texas and electronics Engineering in 1998 and
Instruments, Digital Power, pp-1704-1709 M. Tech from Vellore Institute of Technology
[3] Liping Guo “Implementation of Digital PID Controllers for in 2006 in Power system.
DC-DC Converters using Digital Signal Processors” IEEE She has published paper in various
power electronic society EIT-2007,pp-306-311 international conferences and also in International Journal of
[4] Jianxin Tang “PID controller using the TMS320C31 DSK Engineering and Technology and her current area of interest is
with on-line parameter adjustment for real time dc motor on UPFC and Smart Grid. Mrs Vijayarpiya is a Associate member
speed and position control”IEEE-ISIE-2001, pp- 786- of IE and member in SSI.
791.
[5] Sumant.G.Kadwane, Someswara Phani Vepa, B.M.Karan,
T Ghose, “Converter Based DC Motor Speed Control Using
TMS320LF2407A DSK”, IEEE-ICIEA-2006. J. Raju obtained his bachelors degree in
[6] Mohan, Underland, Robbins “Power Electronics converters Government college of Engineering, Bargur,
applications and design” John Wiley & sons, inc. 2003 Tamilnadu, India in the field of Electrical and
pp- 231-303. Electronics Engineering in 1998 and M. Tech
[7] M. Gopal, “Digital control and state variable methods”, M. from Vellore Institute of Technology in 2004
Gopal, TATA McGraw Hill edition. in Power Electronics.
[8] http.www.microchip.com He has published paper in various
[9] Chin Chang, “Robust control of DC-DC converters-The Buck international conferences and also in International Journal of
Converter”, Power Electronics Specialists Conference- Engineering and Technology and his current area of interest
PESC, 26th Annual IEEE-1995. is on FACTS controller. Mr. J. Raju is a member of ISTE and
[10] Tarun Gupta, R.R. Boudreaux, R.M. Nelms and John Y member in SSI.
Hung, “Implementation of a fuzzy controller for DC-DC
converters using an inexpensive 8-b Microcontroller”,
IEEE Transactions on Industrial Electronics, Vol. 44, No.5,
October 1997.

206  International Journal of Computer Science and Technology w w w. i j c s t. c o m

You might also like