1. Introduction
For some practical applications, electricity, whether alternating current (AC) or direct current (DC), is intended to be converted from one form to another, such as AC-DC, DC-AC, AC-AC, or DC-DC. Therefore, techniques and devices must be required to facilitate this task. The emergence of semiconductor switches resulted in power electronics [
1].
Power electronics are critical tools for achieving efficient energy conversion; approximately 70% of electricity is converted by power electronic devices before reaching users [
2]. Power electronic converters play a fundamental role in efficiently using renewable energy and its various applications [
3].
The boost-type power converter is a device that operates through the closing and opening of a switch. It is known as a booster because the output voltage is always higher than the input voltage. For this reason, the boost converter is usually used in low-voltage applications like photovoltaic systems [
4].
The design of control systems for power electronic converters is an exciting challenge because these are non-linear and time-variant systems. For this, small-signal linearized mathematical models have been developed, facilitating the application of classic controls such as PI control [
5]. However, the main disadvantage of linear models and controllers is that this only guarantees that the system functions correctly at intervals of the operating point [
6].
There are other approaches, such as sliding mode control, where the non-linear characteristics of the plant are used for the design of the controller [
7]. This control approach has been most applied to power electronic converters [
5].
With the invention of digital circuits, it is increasingly common to migrate from continuous to discrete-time design [
8]. The main advantages of applying digital control instead of analog control are lower measurement error, reduced implementation errors due to variations in control system parameters, greater flexibility to make changes after implementing the controller, higher-speed hardware, and decreased device costs [
9].
Digital control-oriented hardware has recently been developed for closed and expensive platforms. However, open-source and hardware alternatives are currently in full swing, enabling the development of new low-cost platforms and products. These aspects greatly benefit the research community because users can add and modify hardware devices, thus making the system more flexible [
10].
In recent years, different devices have been developed to implement digital control. One of the most relevant is the dSPACE due to its versatility in controlling power electronic converters [
11]. OPAL-RT is another alternative for both real-time simulation and testing for rapid prototyping control (RPC) [
12]. Furthermore, devices with similar features like BoomBox, RT-BOX, PED-Board, or HIL404 are available on the market. Most of these are closed software and hardware solutions, which makes them expensive and less flexible for specific purposes [
13]. Low-cost hardware alternatives are the Texas Instruments microcontrollers. One of the most used is the LAUNCHXL-F28379D, a low-cost evaluation and development tool that provides a standardized integrated development environment (IDE) and is easy to use [
14].
There is a variety of work related to controlling power electronic converters, such as in [
15], in which an analysis of a boost converter was performed to design a PI control that fulfills the function of reducing harmonics in the output voltage of a converter; the validation of this controller is conducted through simulation using the Matlab/Simulink software. As in [
16], the aim is to regulate the voltage at the output of a boost converter that employs a sliding mode control (SMC) where the inductor current and the desired current value determine the sliding surface. A second control loop (in this case, a PI controller), determines the desired current value. The results are validated by simulation and experimentation to evaluate the performance of a boost converter that increases a low DC voltage to a level of 400 volts DC. In [
17], a performance analysis is conducted on a high-power converter, and a control strategy is presented where an external PI control loop is used for voltage regulation and an internal loop for current control using a proportional-plus-integral compensator. The validation of the results is presented through simulation and experimentation. In [
18], two control systems are proposed to achieve a proportional distribution of the load power between modular distributed generators (DGs) connected to inverters with standard AC and DC buses in isolated AC microgrids. System validation was completed through simulation and implementation.
There are also works related to the design and implementation of digital controllers, such as [
19], in which a digital controller is obtained for a boost converter to store thermoelectric energy, with a higher efficiency of 15% compared to other articles in the literature. Alternatively, as in [
20], a digital controller is developed for a DC-DC boost converter in continuous conduction mode (CCM). That is implemented on an FPGA through output voltage sensing and inductor current estimation.
Works can be found in the literature in the field of control design and implementation in renewable energy applications. Like in [
21], a discrete adaptive proportional–Integral–Derivative (PID) controller applied to a boost power converter was proposed for regulating the output current of a 400-watt turbine, where the maximum power point is achieved without significant overshoots or oscillations. In [
22], a neural high-order sliding-mode (NHOSM) controller is developed for a wind turbine, and a comparison is made between its performance and that of a simple SMC.
In addition, the literature observes the implementation of digital controllers in various development platforms. For example, in [
23], a discrete-time current controller is implemented on a field-programmable gate array (FPGA) for the control of a boost converter. The environment used for programming is Quartus II Web Edition. In [
24], a discrete feedback control was implemented on the dSPACE 1104 control card for voltage regulation at a buck converter’s output using the ControlDesk 6.2 programming software. In [
25], a PID controller is designed to regulate the DC voltage output and avoid limit-cycle oscillation for a boost converter. It is implemented through the Xilinx (San Jose, CA, USA) FPGA VIRTEX-II PRO device (retired and no longer for sale by the manufacturer). In [
26], a water-pumping system powered by a photovoltaic system is shown. This system is chiefly composed of a boost converter, a solar panel, an inverter, and a dSPACE DS1104 control card, the latter overseeing the control and MPPT algorithm of the system; programming is conducted through a block diagram using the MATLAB tool “Simulink Coder”. In [
27], a performance comparison of the platforms TMS320F28379D microcontroller (included in LAUNCHXL-F28379D), dSPACE, and OPAL-RT is presented for the implementation of digital controllers in DC-AC converters; the programming of the algorithm is deployed using Simulink Coder. In [
28], a performance comparison is made between the LAUNCHXL-F28379D from Texas Instruments and the dSPACE 1006. In both, a model predictive control (MPC) is implemented to optimize the power of a photovoltaic system. The programming is conducted in the Simulink environment using a block diagram. In [
29], a digital controller is implemented in power electronic converters on the LAUNCHXL-F28379D MCU to show the use of rapid prototyping oriented to digital control for academic purposes; software PLECS is used to simulate and implement the control algorithm. In [
30], an experimental platform for microgrid analysis and control is presented. In this case, the physical system is implemented and validated using the OPAL-RT, which is used for rapid control prototyping. In [
31], an application example of digital control is shown, where a PED-Board is used to implement a field-oriented control (FOC) in a permanent magnet machine. The controller algorithm is performed using Lab-View software. In [
32], a novel graphical loop-shaping technique is presented. This technique controls an interleaved boost converter (IBC) and is implemented using the hardware Typhoon Hil 402.
Table 1 compares some of the most-used devices for digital control applications, and
Table 2 compares the costs of some IDEs with tools to program digital control devices.
This document presents the cases of two discrete-time controllers implemented in a low-cost embedded card to regulate the voltage at the output of a DC-DC boost converter in continuous conduction mode. These control algorithms calculate a duty cycle value for the opening and closing of a switch using a pulse-width modulator (PWM). Simulations of these controllers in the event of possible disturbances are also presented. Finally, the results obtained through implementing the control algorithms in the plant are reported.
The controllers presented in this work are widely studied in the literature for a boost converter. However, the significant economic savings associated with the implementation costs of the controllers on a low-cost platform differentiate this paper from other similar ones reported in the literature.
The document’s content distribution is as follows:
Section 2 presents the mathematical model of switched, large-signal averaged, small-signal averaged, and transfer functions of the DC-DC boost converter.
Section 3 shows the case of a PI control discretized by the Forward Euler method.
Section 4 explains the case of a discrete sliding-mode controller to achieve a sliding surface related to a desired current value and an external PI control loop that defines the desired current value based on a voltage reference value.
Section 5 evaluates the controllers through simulation in the event of certain disturbances.
Section 6 illustrates the devices involved, as well as the response of the controllers by implementing them in the TMS320F28379D MCU from Texas Instruments.
Section 7 presents robustness tests for the controller that obtained the best simulation and implementation performance. Finally,
Section 8 presents the conclusions regarding the design and implementation.
6. Experimental Results
The controllers are implemented for the DC-DC boost converter to validate the results. The plant parameters are displayed in
Table 2. The controllers are implemented on the Texas Instruments TMS3020F28379D MCU (low-cost development and evaluation kit called LAUNCHXL-F28379D).
Figure 5 shows a photograph of the boost converter, together with the devices involved in the control system.
This implementation mainly consists of three devices: the MCU, which controls the converter’s output voltage through the implementation via software (compiled versions of C/C++ language) of the digital control algorithms previously described (PI and SMC); a signal-conditioning board with an LV25-P voltage sensor and a CSNE151 current sensor; and the prototype of the boost converter.
In this work, two DC sources supplied power to the sensors and the converter’s MOSFET driver (MICREL INC acquired by Microchip Technology (San José, CA, USA)), while the oscilloscope was used as a data-acquisition system.
Figure 6 illustrates the connection diagram for implementing both control systems.
6.1. Programming Controllers within the Code Composer Studio Development Environment
The two control cases are implemented using the Texas Instruments “Code Composer Studio” IDE through an optimized C/C++ language compiler. The main advantage of using Code Composer Studio directly without having to use other programming software is that CCS does not require a license fee.
The control algorithms employ a 12-bit ADC resolution and PWM with a fixed switching frequency of 40 KHz.
Table 4 describes the most important features of the LAUNCHXL-F28379D MCU for these implementations [
39].
Texas Instruments provides aid to facilitate the implementation of PID control. In [
40], examples of PID control applications and some results through simulations are presented. In [
41], the operation of the digital control library (DCL) is explained, and it contains examples of PID control classes and compensators. Although these examples are considered a starting point, for this implementation, a modified algorithm is developed due to the differences that the DCL architectures provide concerning the one presented in this document.
In the case of the SMC, Texas Instruments does not provide manuals or example codes that help implement the controller presented in this document. Therefore, this work develops and implements a version of the controller algorithm via software. The programming algorithms are expressed through flowcharts, which are illustrated in
Figure 7. The box indicated in red represents the new blocks that are required for the implementation of the SMC.
Table 5 presents the meaning of each variable and the control algorithm to which it belongs.
6.2. Current and Voltage Measurements
For the proper operation of the control algorithms, it is necessary to measure the current and voltage values in the boost converter. A maximum voltage at the output of the converter is considered to be 100 volts. However, the analog-digital converter (ADC) of the MCU has a measurement range of 0 to 3 volts. Therefore, in this case, it is necessary to transform the voltage signal of the boost converter to be sampled by the ADC. The LEM LV25-P Hall effect voltage sensor is used to accomplish this task.
Figure 8 shows the electrical circuit for the voltage sensor, where
is the input voltage and
is the supply voltage, according to the technical datasheet [
42].
Based on this circuit, it is necessary to choose the values of resistors
and
appropriately. It is known that the maximum current at the input is 10 mA, taking its technical datasheet as a reference. Therefore, by setting a maximum voltage range at the input of the sensor of 100 volts, Equation (23) is obtained by considering Ohm’s law.
The maximum current at the sensor output is 25 mA, and the maximum voltage that can be applied to an input port pin of the launchpad ADC is 3 volts. Therefore, in (24), the value of
is calculated by Ohm’s law. The voltage at the sensor output is measured in
.
The current must be transformed into an equivalent voltage value to be sensed by the ADC of the MCU. This is achieved by considering the scheme of the Honeywell CSNE151 current sensor illustrated in
Figure 9.
Ohm’s law is applied as shown in (25) to calculate
. For this reason, a maximum input current of 25 A and a maximum output current of 25 mA are considered, according to the technical datasheet [
43].
A printed circuit board (PCB) is designed to develop the signal conditioning board using KiCad 7.0 software. The KiCad PCB editor is an easy-to-use free software tool that generates complex designs [
44].
Figure 10 illustrates the result of the PCB design.
6.3. Costs of Implementation Elements
Table 6 reports the costs of implementation elements for both controllers. Note that laboratory equipment such as DC sources or oscilloscopes are not considered.
Table 7 presents a comparison between the approximate economic costs of the most expensive and cheapest work referenced in
Table 1 and
Table 2 according to the software and hardware used.
Based on the information reported in
Table 6 and the data presented in
Table 7, it is possible to affirm that this work reduces economic implementation costs between 11 and 187 times compared to other works in the literature [
13,
24,
25,
26,
27,
28,
29,
30,
31,
32].
6.4. PI Controller Response
Figure 11 illustrates the response of the PI controller to a reference voltage of 17 volts, an input voltage of 12 volts through a solar battery, and a load of 120
. The graph shows both the response in simulation and implementation as a comparison between them.
In
Figure 11, it can be observed that the implementation result is different from the simulated one. This is mainly due to the linearization of the elements and the disturbances not considered in the simulation.
6.5. SMC Response
Figure 12 shows the response of the SMC under the same test parameters as the implementation of the PI controller. In the same way, as in
Figure 11, a comparison is made between the system’s response through simulation and the response obtained when conducting the implementation.
Mathematical models that consider a greater number of non-ideal parameters and possible disturbances are necessary to obtain similar results between simulation and implementation. However, these considerations would have a higher computational cost. The mathematical modeling presented in this document allows for the simulation of the plant in an approximate manner and the obtaining of controllers that satisfy the requirements.
6.6. Comparison between Controllers
A comparison is presented through the graphs obtained in the implementation of the controllers to determine the controller with the best performance.
Figure 13 shows the response of the SMC, PI, and the voltage reference.
Table 8 illustrates the comparison of the controllers by considering the transient-state approximation time
, maximum overshoot percentage
, and the steady-state error percentage
.
According to the data obtained from both simulation and implementation, the SMC performs better in the sense of reducing the time response, the overshooting, and the steady-state error with respect to the PI control. Therefore, the risk of damage to the load or connected devices is reduced. For this reason, the SMC is the most adequate for photovoltaic system applications where the system is affected by different disturbances.
8. Conclusions
This document demonstrates that linear and non-linear controllers can be implemented using low-cost platforms. This objective is achieved by implementing two control systems as test cases for the voltage regulation of a DC-DC boost converter for photovoltaic system applications. Frequently, in the literature, high-performance software/hardware is used. Although that allows for the implementation of increasingly sophisticated and more straightforward controllers, the implementation costs of the system are high. Therefore, an important task is selecting the device for control implementation based on the requirements of the application to which it is directed. This work reduces the economic implementation costs between 11 and 187 times compared to other works in the literature.
The PI controller was initially presented continuously to satisfy the requirements, and the discretization of the controller was subsequently performed using the Forward Euler method; on the other hand, the SMC was obtained directly in discrete time.
It was possible to corroborate that both controllers satisfy the requirements for which these were developed. However, their performance in practice, especially in the case of the PI controller, was different from those obtained in simulation. These variations are mainly due to the idealized nonlinearities of the models, high switching frequency, and charging and discharging time of the capacitor, among others. Both in implementation and simulation, the SMC performed better than the PI. This difference is because, while the PI was chosen for a specific operating point, the SMC aimed to cover a more extensive operating range.
Simultaneously, despite the uncertainties that mathematical models of the plant may have, the SMC proved to be robust to disturbances such as changes in the voltage reference and changes in input voltage. Therefore, for applications of renewable energies, the SMC is the most viable between the two cases of controllers implemented.
The work presented in this scientific article has many potential practical applications where robust and low-cost control systems are required. For this reason, the implementation of these algorithms in greenhouse energy supply or electromobility applications is envisioned as future work.