Paper+7+ (2021 3 2) +Simulation+and+Implementation+PID+Controlling+Buck+Converter+DC
Paper+7+ (2021 3 2) +Simulation+and+Implementation+PID+Controlling+Buck+Converter+DC
ISSN: 2709-104X
DOI: 10.32996/jcsts
Journal Homepage: www.al-kindipublisher.com/index.php/jcsts
I Wayan Raka Ardana1 ✉ Lalu Febrian Wiranata2 and Ida Bagus Irawan Purnama3
123Politeknik Negeri Bali, Indonesia
✉ Corresponding Author: I Wayan Raka Ardana, E-mail: [email protected]
Received: 04 October 2021 Regulating the output voltage based on the desired set point is useful for many
Accepted: 21 November 2021 applications. However, getting the optimal value using fast computation with minimal
Published: 07 December 2021 error is still challenging. This paper aims to design, simulate, and implement a second-
DOI: 10.32996/jcsts.2021.3.2.7 order Buck-Boost DC-DC converter circuit so that the voltage result according to the
desired set point can be achieved. Initially, testing is conducted using Matlab Simulink.
KEYWORDS Then, Proteus is used to test the computation of the program on embedded systems
in which the result is implemented in C. In low voltage power electronics applications,
Buck Converter, PID, Simulation, this approach has never been used to determine the output form. To determine the
Matlab, Proteus value of Kp, Ki, dan Kd, PID, Ziger Nichos (Guo, 2002). method is used. Meanwhile,
tuning is done through Matlab. For simulation on Proteus, the output is tested by
setting the setpoint values of 3.0, 2.5, and 1.7 volts. This aims to see the pattern of
changes in the simulation. The simulation results with Proteus show that they have
similar peak values but with different overshoot values. This is because the simulation
must pass the reference voltage before it drops to the desired setpoint value. Proteus
simulation can also help to prove embedded system programs are running correctly.
On the other hand, the value of 1.7 volts is used as a setpoint in device implementation.
This is due to the determination that the setpoint voltage in the implementation does
not exceed the value of the source/power supply. The results show that for the rise
time value of 378,770 ms, Overshoot and settling time are 11.798% and 0, respectively.
This means the result produces an optimal value which is a return to the initial target.
The optimal factor is assessed from the ability to minimize existing errors as well as
having the shortest possible computational process.
1. Introduction1
The main objective of this research is to design a DC buck converter electronic component simulation using Matlab and Proteus
tools. This is then followed by implementing this design to get live data of the output form. Simulation with Matlab is carried out
to easier determine the values of Kp, Ki, Kd from Matlab tuning. Meanwhile, simulation with Proteus is carried out to test the output
form against the setpoint. This also aims to find out whether the programming algorithm on embedded systems is running
correctly. The second-order system, which is the main target, is first reviewed in depth both when the state is off and when the
state is on. A better analysis is expected to be carried out to understand the output form of the second-order system used in both
conditions (Shirazi, 2009).
To determine the value of Kp, Ki, and Kd, the Ziger-Nichos method is used. However, in Matlab, it can be searched by simulation
programming. A DC-DC Buck Converter is used for the main system, which has a high level of efficiency [3]. It also describes in
detail the conditions when the system is in the state off and state on and the form of modelling when the switching process occurs.
This makes it is easier to analyze the shape of the state space program used for simulation and implementation. For the results,
first tested by simulation using Matlab to get the parameters Kp, Ki, and Kd, and to see the resulting output form. Before being
Copyright: © 2021 the Author(s). This article is an open access article distributed under the terms and conditions of the Creative Commons
Attribution (CC-BY) 4.0 license (https://creativecommons.org/licenses/by/4.0/). Published by Al-Kindi Centre for Research and Development,
London, United Kingdom.
Page | 72
JCSTS 3(2): 72-81
implemented into embedded systems, it is first tested using Proteus to be a reference for the success rate in determining the
algorithm in its implementation.
2. Literature
The literature review relates to some of the basic concepts used in this study. Some references and analytical processes from
several standard journals and books are presented. Among them are the basic concepts of PWM (Pulse Width Modulation) in
regulating the duty cycle, a buck converter to adjust the output speed of the Mosfet so that it is possible to set the desired setpoint,
PID to determine the magnitude of the parameter, as well as the stability of the desired output.
Figure. 2 describes the working principles for calculating the duty cycle at a frequency of 50 Hz so that the percentage of the duty
cycle used in a certain time range is obtained. This relates to the opening and closing speed of the MOSFET valve itself.
Page | 73
Simulation and Implementation PID Controlling Buck Converter DC
Fig. 3 shows the Buck Converter circuit when it is ON (switch-on) or when the input voltage passes through the component. While
the OFF state describes when there is a switch-off from the Mosfet, the inductor releases the current stored in the component. In
this case, the values of A, B, C, D are the system matrix, x is the state variable, x is the form of the state variable, u is the system input,
and y is the system output. The relations of these variables are written in equations (1) and (2).
𝑥 = 𝐴𝑥 + 𝐵𝑢 (1)
𝑦 = 𝐶𝑥 + 𝐷𝑢 (2)
For state variables in voltage and current on the Buck Converter is written as 𝑉𝐶 and 𝑖𝐿 . During ON state 𝑉𝐶 and 𝑖𝐿 , it can represent
with equations (3) and (4).
𝑑𝑖
𝑉𝑐 = 𝑢 − 𝐿 (3)
𝑑𝑡
𝑑𝑣 𝑉𝑐
𝑖𝐿 = 𝐶 + (4)
𝑑𝑡 𝑅
With 𝑖𝐿 = 𝑥1 and 𝑉𝑐 = 𝑥2 , so we can write the derivative on the equation 𝑥1 ′ and 𝑥2 ′ and the equation become (5) and (6). The state-
space matrix form when the buck converter is ON is shown in equation (7).
1 1
𝑥1 ′ = − 𝑥1 + 𝑢 (5)
𝐿 𝐿
1 1
𝑥2 ′ = 𝑥1 + 𝑥2 (6)
𝐶 𝑅𝐶
1
𝑥 ′ 0 − 𝑥1 1
[ 1 ] = [1 𝐿
] [𝑥 ] + [ 𝐿 ] 𝑢
1 (7)
𝑥2 ′ − 2 0
𝐶 𝑅𝐶
The OFF mode where u is 0 can be explained by equation (8), which becomes the derivative value, while the state space form is
shown in equation (9).
1
𝑥1 ′ = − 𝑥2 (8)
𝐿
1
𝑥 ′ 0 − 𝑥1 0
[ 1 ] = [1 𝐿
1 ] [𝑥 ] + [ ] 𝑢 (9)
𝑥2 ′ − 2 0
𝐶 𝑅𝐶
Page | 74
JCSTS 3(2): 72-81
To combine the values of the shape of the state space matrix when the ON and OFF modes of the buck converter occur, it is
necessary to add a switching duty cycle d, which is shown in equations (11) and (13).
1 1 1
0 − 0 − 0 −
𝐴̅ = [ 1 𝐿
1 ] 𝑑 + [1 𝐿
1 ] (1 − 𝑑) = [ 1 𝐿
1 ] (11)
− − −
𝐶 𝑅𝐶 𝐶 𝑅𝐶 𝐶 𝑅𝐶
So, that the form of the output system from the Matrix state-space 𝑉𝐶 and 𝑖𝐿 , is written in the form of equation (15), which becomes
the form C and D in the matrix output system [9, 10].
𝑦1 1 0 𝑖𝐿 0
[𝑦 ] = [ ][ ] + [ ]𝑢 (15)
2 0 1 𝑉𝐶 0
PID control consists of proportional, integral, and derivative. This type of proportional control calculates the difference (error)
between the setpoint and the control variable each time the sampling is taken.
Derivative control is used to fix all existing errors quickly and immediately eliminate these existing errors.
𝑑
𝑢𝑑 (𝑡) = 𝑒(𝑡) (17)
𝑑𝑡
A closed-loop system can also be written with a combination of P, I, D written in equation (18) so that it becomes equation (19).
Here, the closed-loop system changes from the t domain to the s domain.
𝑑𝑒(𝑡)
𝑢 (𝑡) = 𝐾𝑝 𝑒(𝑡) + 𝐾𝑝 𝐾𝑖 ∫ 𝑒(𝑡) 𝑑𝑡 + 𝐾𝑝 𝐾𝑑 (18)
𝑑𝑡
𝑈(𝑠) 1
= 𝐾𝑝 (1 + + 𝑇𝑑 𝑆) (19)
𝐸(𝑠) 𝑇𝑖 𝑆
Kp is the proportional gain, Ki is integral gain, Ti is the integral time constant, and Td derivative time.
Fig. 5 shows R(s) input, E(s) error, U(s) control signal, and Y(s) output in close loop buck converter. The Ziegler-Nichols method is
used to find the value of an existing parameter. This method can be used in any way. Set the Kp value to get the form of an oscillation
Page | 75
Simulation and Implementation PID Controlling Buck Converter DC
or an oscillating output wave (Kcr); besides that, the value of Ki, Kd given is 0. Fig. 6 shows the setting of the Kp value to oscillate.
Then, after the oscillating value is obtained, the next step is to calculate the peak-to-peak distance (Pcr) value of the Pcr multiplied
by the PID parameter value. Kp = 0.6 Kcr, Ki = 0.5 Pcr and Kd = 0.125 Pcr. (Astrom, 2010).
Fig. 6. PID ZN Tuning explains the manual process of getting Pcr value
Page | 76
JCSTS 3(2): 72-81
Fig. 8 describes a tested schematic in Matlab Simulink. The used schematic directly tests the PID parameter input form. In principle,
when the input voltage is sourced from PV (simulated with 20.38V input from the battery), it will provide the buck converter system
voltage and current. The Mosfet will regulate the incoming voltage, which acts as a faucet or valve that allows electronic components
such as capacitors and inductors to be filled with their respective charges. Then, from the Mosfet, the DC voltage will start to be
stored in the capacitor so that it can withstand some of the load used for a while. This mechanism also applies to inductors that can
store electric current in the form of a magnetic field. They can then supply current to the load in a few moments. This aims if there
is a demand for a load, there will be no short circuit that causes a spark. In addition, the presence of electronic components makes
the current and voltage output more efficient.
Fig. 9 buck converter subsystem is a signal generation system at a frequency of 62500 Hz and explains the set point used, which is
12V. The setpoint value is entered into the Gain K with the step system input. This system becomes feedback from the information
obtained at the output of the buck converter, which regulates how much voltage and current is required so that it will be able to
supply energy into the load more efficient. However, this paper does not simulate the used load and only focuses on the PID concept
on the buck converter. The concept of duty-cycle control is described in switching Mosfet, Fig. 10.
Parameter Value
Vin 5.00 V
Capacitor 0,22 F
Inductor 0,22 H
Fig. 11 explains the data collection process using default values of proportional 2, integrated 5, and derivated 1. This 2, 5, 1 is the
standard value of Kp, Ki, and Kd, which is used for the initial determination process. This is very helpful because this basic value can
be used as a reference for estimating the PID amount, which is usually not far beyond the basic value used. The results are quite
good, and it looks like the setting time is stable after getting it. The ZN PID tuning process is carried out directly by Matlab on the
Control Estimation Tool Manager (CETM) tools. This is done to maximize the results, where if done manually, the process is too large
for the Kp value itself.
The block-like Fig. 13 PID Simulink tuning can be used for the tuning process or determining PID parameters.
Page | 78
JCSTS 3(2): 72-81
Fig. 15. is obtained by entering the parameter values into Fig. 8 of the buck converter system so that the rise time is 378,770 ms,
Overshoot 11.798%, and settling time 0. The difference between the three values (rise time, Overshoot, settling time) is quite bigger
than the standard value of Fig. 11, also show different results because the parameter values P, I, D have been entered into the test
system.
Fig. 17 shows the results of different setpoints. It can be seen that the overshot value has the same peak but a different setpoint.
This state happens because in the simulation with Proteus, the voltage must decrease from the reference voltage, which in this case
is tested at 5V, and only occurs in the simulation. This also proves that both the program made on the embedded system and the
hardware can follow the desired setpoint value in simulation.
Page | 79
Simulation and Implementation PID Controlling Buck Converter DC
Table 2 lists the results of the obtained setpoint values, where this value is achieved by entering the results from the simulation and
processing using Matlab.
Fig. 17 shows the results of the implementation with a setpoint of 1.7V. This value is tested to match the charging voltage of 4-5 AA
batteries. The results are relatively good.
Page | 80
JCSTS 3(2): 72-81
The average value of the relative error after steady-state is obtained, which is about 4.61% of the 1.7 V setpoint. It can be seen from
Table 3 that there is no overshoot. This state is due to the use of supercapacitors and large coils. It can be seen from Table 3 that
there is no overshoot. This state is due to the use of supercapacitors and large coils.
4. Conclusion
The results obtained in the Matlab simulation are very good used to find the parameter values of Kp, Ki, and Kd. These are used to
run the simulation and implementation. In this case, there are differences in the values of rising time, settling time, and Overshoot
from each simulation and the experimental results. However, this is not a problem because all the outputs have a fairly stable output
value after the Overshoot, especially in the implementation results that have been applied. The results of the implementation are
shown in Table 3, where the system has a fairly small peak time and rising time. Meanwhile, the overshoot value is 0%. This result is
obtained because the implementation uses a type of capacitor with a value of 0.22 F, which is referred to as a supercapacitor in the
market designation and juxtaposed with the inductor value of 0.22 H. This makes the second-order system has two balanced stability
components.
References
[1] Astrom, K. (1995). PID controllers. theory, design and tuning.
[2] Åström, K. J., & Hägglund, T. (2001). The future of PID control. Control engineering practice, 9(11), 1163-1175.
[3] Ali, A., & Majhi, S. (2009). PI/PID controller design based on IMC and percentage overshoot specification to controller setpoint change. ISA
transactions, 48(1), 10-15.
[4] Celanovic, N., & Boroyevich, D. (2000). A comprehensive study of neutral-point voltage balancing problem in three-level neutral-point-
clamped voltage source PWM inverters. IEEE Transactions on power electronics, 15(2), 242-249.
[5] Chander, S., mod Agarwal, P., & Gupta, I. (2010, December). FPGA-based PID controller for DC-DC converter. In 2010 Joint International
Conference on Power Electronics, Drives and Energy Systems & 2010 Power India (pp. 1-6). IEEE.
[6] Grassi, E., & Tsakalis, K. (1996, December). PID controller tuning by frequency loop-shaping. In Proceedings of 35th IEEE Conference on Decision
and Control (Vol. 4, pp. 4776-4781). IEEE.
[7] Gowda M (2014). Modelling of a buck DC-DC converter using Simulink, IJIRSET, 3.
[8] Shirazi, M., Zane, R., & Maksimovic, D. (2009). An autotuning digital controller for DC–DC power converters based on online frequency-
response measurement. IEEE Transactions on Power Electronics, 24(11), 2578-2588.
[9] Kwok, K. E., Ping, M. C., & Li, P. (2000). A model-based augmented PID algorithm. Journal of Process Control, 10(1), 9-18.
[10] Liu, Y. F., Meyer, E., & Liu, X. (2009). Recent developments in digital control strategies for DC/DC switching power converters. IEEE Transactions
on Power Electronics, 24(11), 2567-2577.
[11] Mathwork,https://www.mathworks.com/help/control/ref/lti.stepinfo.html accessed on May 20, 2021
[12] Ogata, K., & Yang, Y. (2002). Modern control engineering (Vol. 4). India: Prentice hall.
Page | 81