Content area
Abstract
Microcontrollers (μCs) are extremely useful in renewable energy (RE) converters, where numerous onboard control actions need to be executed at low cost. This paper focusses on a cost-effective implementation of a fuzzy controller (FC) for the regulation of converters that are normally employed in RE applications such as solar, wind, and tidal. The μC realization has been achieved through simplification of a dual-input FC (DFC) into a single-input FC (SFC) using the signed distance approach, followed by the piece-wise linear (PWL) simplification of SFC named as piece-wise-linear single input FC (PWL-SFC). Despite the elimination of the fuzzification, knowledge inference, and defuzzification stages, PWL-SFC exhibits a similar control performance to that of DFC. The proposed PWL-SFC is tested through modeling and simulation using the MATLAB Simulink platform and experimentally validated through a low-cost dsPIC μC. The results reveal that the proposed PWL-SFC requires negligible tuning effort and uses three orders of magnitude less computational power compared to DFC.
Full text
This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.
1. Introduction
Electricity generated from renewable energy (RE) sources such as wind, hydrogen, and solar is being widely promoted to protect the environment and reduce dependence on fossil fuels. RE sources, however, possess specific electrical characteristics that cause their output voltage to fluctuate due to load variations and changing weather conditions. These fluctuations can lead to inefficiencies and instability in power supply, if not properly managed. Therefore, to attain a regulated input/output voltage along with optimal power from a RE sources, a power converter with good dynamic control is indispensable [1].
The fuzzy controller (FC) is an ideal choice for RE converters due to its excellent dynamic response, robustness, high immunity to disturbances, and model independence, as it does not require detailed knowledge of the process or application [2]. A conventional dual-input FC (DFC) processes the control signal through multiple computational stages: fuzzification, rule base, inference, and defuzzification. These stages, particularly the rule base, significantly increase the computational burden, making it challenging to achieve a low-cost implementation. The rule structure of DFC is composed of (-if-then-else-) statements, digital processors are utilized to implement DFCs in power converters; for instance, digital signal processors (DSPs) [3], field-programmable gate arrays (FPGAs) [4, 5], and μCs [6, 7]. Although fast and accurate results are envisaged using FPGAs and DSPs, they increase the overall cost of the system. In contrary, μCs are more cost effective compared to FPGAs and DSPs but in order to implement a FC-based RE system using a low-cost μC, computational burden needs to be optimized.
Since, efficient and timely control responses are crucial for maintaining the stability and performance of RE systems, reduction in computation time without compromising the effectiveness of DFC is a prime requirement [8]. Accordingly, authors in [8–11] proposed the reduced form of DFC but realization was carried out using expensive processors; for instance, FPGA in [8, 10], while DSP in [9]. Another reduced version of FC was reported by authors in [11], but only simulation results were presented; hence, digital implementation is still questionable. Despite the simplification of the rule base from
It is deduced that various computation stages are the root cause of computation overload. Consequently, eradication of these stages without jeopardizing the control performance can address this problem. This paper therefore aims to simplify the DFC using the two approaches: signed distance approximation (SDA) and piece-wise linearization (PWL). The former deforms two fuzzy inputs into a single variable and later linearizes the inherent nonlinear control surface of DFC. The resulting controller is thereby named as PWL-SFC, and it does not involve any fuzzification, rule inference, and defuzzification stage. The apparent advantage of this simplification is the lesser degree of computational load. In a microcontroller (μC)-based implementation, both the DFC and SFC controller requires multiple operations, including membership function evaluation, rule-based inference, and defuzzification to compute the output. These steps involve multiple arithmetic computations and conditional checks, leading to higher execution times and increased resource usage. Conversely, the PWL approach directly maps the input to the output using predefined linear segments, which can be executed with fewer conditional checks (if-else statements) and arithmetic operations. This simplicity reduces the computational overhead by directly addressing the key metrics such as the HEX file size and RAM usage that determine the computational burden in μC-based implementations. These metrics directly reflect the resource efficiency and feasibility of implementation on low-cost μCs [12]. Therefore, the proposed FC is envisaged to be very effective for RE converters, where not only closed-loop control but other processes such as maximum powerpoint tracking (MPPT) are also executed by the μC. Rigorous simulations supported with experimental results have been presented to prove the effectiveness of the proposed PWL-SFC.
The organization of the paper begins with the mathematical modeling of the dc-dc converter, which is used to regulate the input/output voltage which is described in Section 2. In Section 3, the transformation from dual to single input of the conventional FC has been described, which serves as the basis of linearization of the fuzzy control surface. Section 4 presents the MATLAB simulation results of DFC, SFC, and the proposed PWL-SFC. The experimental validation of PWL-SFC through a low-cost μC is described in Section 5. Finally, conclusive findings and remarks are given in Section 6.
2. Mathematical Modeling of dc-dc Converter
Power converters are crucial not only for regulating voltage and current but also for ensuring the optimal extraction of energy from RE sources. The Ćuk converter, in particular, is well-suited for such applications due to its ability to provide continuous input–output current, its flexibility in increasing or decreasing voltage, and its lower switching losses. It operates by transferring energy through a capacitor, which allows for a smoother output and reduced electromagnetic interference. These characteristics make it ideal for use with variable and intermittent RE sources such as solar panels, wind turbines, and tidal energy systems [13, 14]. Figure 1 illustrates the nonideal circuit model of the Ćuk converter, designed in continuous conduction mode (CCM). To derive the complete model, dynamics of the converter during the ON period are given in equations (1)–(4), followed by equations (5)–(8) for OFF period;
[figure(s) omitted; refer to PDF]
3. Proposed PWL-SFC Schemes
3.1. Conversion From DFC to SFC
A typical rule table of DFC having the Toeplitz structure is shown in Table 1. This structure appears due to the diagonal arrangement of the fuzzy output with respect to its inputs, as shown by dotted lines. The Toeplitz property stands true for all FLC types that utilize error (e) and its derivative (
Table 1
A typical fuzzy rule table for two fuzzy inputs
The distance variable d represents the absolute distance of the parallel diagonal lines from DZ and λ is the slope of the line DZ.
The transformation mechanism from DFC to SFC is shown in Figure 2. The inputs to the FCs are (
[figure(s) omitted; refer to PDF]
Since, the simplification is performed at the input side, the output variable Δu is unchanged. Due to the PI-type structure, the final output variable of both FCs is integrated to compute the control signal u. In contrast to
[figure(s) omitted; refer to PDF]
Table 2
The reduced rule base of SFC.
| Input, d | |||||
| Output, ∆u |
Despite this simplification, fuzzification, rule inference, and defuzzification stages still need to be executed to calculate the Δu signal by SFC. However, with the help of linearization between two adjacent input membership functions, an equivalent PWL control surface can be constructed, which is discussed in Section 3.2.
3.2. Conversion From SFC to PWL-SFC
Considering x as the measured distance within the space of input d (Figure 3), the output Δu can be calculated using the center of gravity operator as
Since
As can be seen from equation (11), the equations are only a function of peak locations of its membership functions. Thus, a PWL surface can be achieved by merely changing the peak values and, if required, can be further modified to achieve the optimal results. The formation of linearized control surface is shown with two supporting illustrations in Figures 4(a) and 4(b). The first illustration shows a linear line due to a constant slope throughout the UoD. The resulting surface is obtained for the evenly and 50% overlapped membership function for inputs and outputs, respectively.
[figure(s) omitted; refer to PDF]
A more complex case is shown in Figure 4(b), where the PWL surface is formed for the unequal spacing of membership functions. Moreover, two new membership functions are introduced for both inputs and outputs, denoted respectively by (
The proposed FC for a dc-dc Ćuk converter is depicted in Figure 5. The elimination of fuzzification, rule inference, and defuzzification step is expected to noticeably improve the computation time. Consequently, equation (11) can be implemented using any low-cost μC. For the case of DFC and SFC, both the shape of membership functions and rules must be stored in the digital processor. It should also be noted that PWL approximation not only speeds up the computation time but also reduces the memory space of the processor chip.
[figure(s) omitted; refer to PDF]
4. Simulation Results
To authenticate the efficacy of the proposed PWL idea, various simulations of DFC, SFC, and PWL-SFC are conducted. Figure 6 shows the block diagram of the simulation scheme. A nonideal switching model of the Ćuk converter is implemented in the MATLAB/Simulink platform. The following specifications for the converter are used:
[figure(s) omitted; refer to PDF]
Table 3
Parameters of the SZYL-P150-18 module at STC.
| Parameter name | Unit | Value |
| Peak power, | W | 150 |
| Peak power voltage, | V | 18.1 |
| Peak power current, | A | 8.29 |
| Open circuit voltage, | V | 21.5 |
| Short circuit current, | A | 8.91 |
| Temperature coefficient of current, | mA/°C | 0.003 |
| Temperature coefficient of voltage, | mV/°C | −0.08 |
| Number of series-connected cells, | — | 36 |
To implement the DFC and SFC, the input and output membership functions are of the same form as mentioned in Figure 3. The peak location of linguistic variables varies from −10 (NM) to +10 (PM) with 50% overlapping. Table 1 is used as the rule base for the DFC, while the reduced form of rules, as shown in Table 2, is used for the SFC implementation. Since, the overlapping of membership functions in DFC is 50%, the peak location of SFC also varies from −10 (
Figure 7(a) shows the simulation results of the Ćuk converter for a 100% variation in reference voltage that is 5 V–10 V, for a 10-Ω fixed load. All the fuzzy variants successfully track the reference variation, showing zero overshoot and settle down within 10 ms. To show the performance equivalency of PWL-SFC to that of DFC, a deviation among both controllers is also shown in the same Figure 7(a). A slight deviation has been noticed, which only occurs during the transient region. This is because most of the rules of DFC are fired in the transient phase, and only (Z, Z, Z) rule is fired at the steady state condition. Despite this deviation, the difference does not exceed beyond the order of 10−6. As a result, no significant disparities have been observed with respect to their settling time, rise time, and peak overshoots. However, undeniably, the PWL version is far superior in terms of execution time and implementation simplicity.
[figure(s) omitted; refer to PDF]
To further show the effectiveness of FCs under substantial load variations, a 100% variation in load from 10 to 104 Ω is made that subsequently brings the converter into discontinuous conduction mode (DCM). A major side effect of DCM is oscillation in inductor current; hence, the duty cycle evaluated on the basis of the inductor current waveform can be different from the one introduced to the switch. This difference eventually leads to an inconsistent output voltage. However, it is observed that despite of 100% variation in load, all FCs quickly achieve the reference voltage with similar control performance, as shown in Figure 7(b).
Table 4 compares the computational time of all the three FC controllers—time required to impart the control signal to generate the respective PWM after processing all the inherited stages. The computational times are determined within a MATLAB simulation environment. Each control strategy is implemented using m-file scripts, and execution times are measured in seconds (s) with the widely used tic-toc MATLAB functions [15]. It is noted that the DFC has the highest computational load due to extensive rule evaluations and membership function operations for two inputs. In contrast, the SFC demonstrates improved performance by reducing the number of membership functions and rules, thereby streamlining the inference process while preserving the key steps. Meanwhile, the PWL-SFC outperforms both methods in terms of speed, as it eliminates traditional fuzzification, inference, and defuzzification processes, relying instead on a computationally efficient piecewise linear approximation.
Table 4
Computation time comparison for simulation results.
| Controller | DFC | SFC | PWL-SFC |
| Execution time (ms) | 400 | 260 | 8 |
5. Experimental Results
To implement all three FCs in the hardware platform, a low-cost dspic30f4013 is used. Figure 8 shows the complete experimental setup. The IRFP250 MOSFET (
[figure(s) omitted; refer to PDF]
The validity of these controllers under large load variations is also carried out, and the results have been shown in Figures 10(a), 10(b), and 10(c). Like the simulation results, when the load changes from 10 to 104 Ω, the converter goes into the DCM mode (as shown in the zoom view of each figure) and quickly achieves the same reference voltage within 15 ms. The peak overshoot is similar in all cases; however, a slight difference is observed in the settling time. But the overall transient response is identical for all three FCs.
[figure(s) omitted; refer to PDF]
It is important to note that a sampling time of 500 μs is used for the initial experimental validation. However, the proposed PWL-SFC allows much faster PWM signal generation due to the elimination of computationally intensive stages such as fuzzification, inference, and defuzzification, enabling rapid computation of the control signal. To validate this capability, a sampling time of 20 μs, equivalent to the switching time, is used for the PWL-SFC, with the corresponding results shown in Figure 11(a). The curve clearly demonstrates that the proposed PWL-SFC achieves a much faster response, attaining the reference in less than 2 milliseconds. In contrast, the DFC and SFC algorithms were unable to execute within this time frame due to their reliance on extensive computational steps. Specifically, the μC requires additional time to process the voltage reference switching and execute the fuzzification, rule evaluation, and defuzzification stages. As a result, the 200-μs sampling time proved insufficient for these algorithms, highlighting the computational efficiency of the PWL-SFC. This is extremely useful, when the PV system incorporates an MPPT algorithm to track global power peak under varying environmental conditions, pertaining to the fact that in a typical solar PV system, besides closed-loop control, several other tasks such as MPPT and digital filtering also needed to be processed.
[figure(s) omitted; refer to PDF]
The idea has been reiterated by incorporating a conventional perturb and observe (P & O) algorithm [16] which is utilized to track the MPP of the PV module. This P & O method produces the reference voltage (
In contrast, Table 5 provides a detailed assessment of the computational burden during experimental execution on a dsPIC30F4013 μC, which includes factors such as HEX file size, RAM usage, and execution time. These are critical and accurate metrics to assess the computational burden of an algorithm. A larger HEX file indicates a more complex implementation that requires more memory for storage, which can directly correlate with longer execution times due to increased instruction cycles during runtime [12]. Similarly, higher RAM usage reflects the demand for temporary data storage during computation, which can contribute to slower execution speeds, especially in resource-constrained embedded systems [17]. For example, the DFC and SFC have significantly larger HEX file sizes (48% and 32%, respectively) and RAM usage (30% and 20%) compared to the proposed PWL-SFC, which uses only 11% of HEX file size and 8% of RAM. These differences directly translate into the superior execution time of the PWL-SFC (15 ms) compared to 120 and 150 ms for the other controllers.
Table 5
Computation burden comparison for experimental setup.
| Controller | Hex file size (%) | RAM usage (%) | Computation time (ms) |
| DFC | 48 | 30 | 120 |
| SFC | 32 | 20 | 50 |
| PWL-SFC | 11 | 8 | 15 |
It is worth mentioning here that the difference between the simulation-based computational times (Table 4) and the experimental execution times (Table 5) is attributed to the fact that dsPIC30F4013 is a low-cost μC and has limited processing power. Also, it lacks advanced computational units such as a floating-point unit (FPU), causing the performance gap between simulation and experimental results.
6. Conclusion
This paper provides a simplified yet effective control strategy of designing a FC for controlling the output voltage of a dc-dc Ćuk converter. The proposed idea is attained by transforming the conventional DFC into a PWL-SFC. The proposed controller significantly reduces the number of rules and exhibits a simple control structure. The PWL-SFC only utilizes linear lines; therefore, it is easy to implement through a simple μC. MATLAB simulations and experimental results of the Ćuk converter have verified the performance of the proposed FC scheme having the results similar to the DFC and SFC. In addition to the identical performance, PWL-SFC has substantially less computational burden compared to DFC. Consequently, faster performance is obtained.
Funding
No funding was received.
[1] H. Lin, Y. Yin, X. Shen, "Fuzzy Logic System-Based Sliding-Mode Control for Three-Level NPC Converters," IEEE Transactions on Transportation Electrification, vol. 8 no. 3, pp. 3307-3319, DOI: 10.1109/tte.2021.3134279, 2022.
[2] S. Mahjoub, S. Labdai, L. Chrifi-Alaoui, S. Drid, N. Derbel, "Design and Implementation of a Fuzzy Logic Supervisory Based on SMC Controller for a Dual Input-Single Output Converter," International Journal of Electrical Power & Energy Systems, vol. 150,DOI: 10.1016/j.ijepes.2023.109053, 2023.
[3] H. Doubabi, I. Salhi, M. Chennani, N. Essounbouli, "High Performance MPPT Based on TS Fuzzy–Integral Backstepping Control for PV System Under Rapid Varying Irradiance—Experimental Validation," ISA Transactions, vol. 118, pp. 247-259, DOI: 10.1016/j.isatra.2021.02.004, 2021.
[4] A. A. Nada, V. Parque, M. A. Bayoumi, "Accelerating the Performance of Fuzzy-FPGA Based Control in LabVIEW for Trajectory Tracking Problems," IFAC-PapersOnLine, vol. 56 no. 2, pp. 3386-3391, DOI: 10.1016/j.ifacol.2023.10.1486, 2023.
[5] A. Ilyas, M. R. Khan, M. Ayyub, "FPGA Based Real-Time Implementation of Fuzzy Logic Controller for Maximum Power Point Tracking of Solar Photovoltaic System," Optik, vol. 213,DOI: 10.1016/j.ijleo.2020.164668, 2020.
[6] A. S. F. Sobrinho, F. G. Junior, "Type-1 Fuzzy Logic Algorithm for Low Cost Embedded Systems," Computers & Electrical Engineering, vol. 88,DOI: 10.1016/j.compeleceng.2020.106861, 2020.
[7] B. Wyrwoł, E. Hrynkiewicz, "Implementation of a Microcontroller-Based Simplified FITA-FIS Model," Microprocessors and Microsystems, vol. 44, pp. 22-27, DOI: 10.1016/j.micpro.2015.11.012, 2016.
[8] C. Chang, Y. Yuan, T. Jiang, Z. Zhou, "Field Programmable Gate Array Implementation of a Single-Input Fuzzy Proportional–Integral–Derivative Controller for DC–DC Buck Converters," IET Power Electronics, vol. 9 no. 6, pp. 1259-1266, DOI: 10.1049/iet-pel.2015.0688, 2016.
[9] S. Md, N. Azli, Z. Salam, "PWM DC-AC Converter Regulation Using a Multi-Loop Single Input Fuzzy PI Controller," Journal of Power Electronics, vol. 9, 2009.
[10] F. Taeed, Z. Salam, S. Ayob, "FPGA Implementation of a Single-Input Fuzzy Logic Controller for Boost Converter With the Absence of an External Analog-To-Digital Converter," IEEE Transactions on Industrial Electronics, vol. 59 no. 2, pp. 1208-1217, DOI: 10.1109/tie.2011.2161250, 2012.
[11] Y. Yuan, C. Chang, Z. Zhou, X. Huang, Y. Xu, "Design of a Single-Input Fuzzy PID Controller Based on Genetic Optimization Scheme for DC-DC Buck Converter," 2015 International Symposium on Next-Generation Electronics (ISNE),DOI: 10.1109/isne.2015.7131965, 2015.
[12] J. E. Hopcroft, D. Rus, Algorithms, Analysis of, in Encyclopedia of Computer Science, 2003.
[13] S. Javed, K. Ishaque, "A Comprehensive Analyses With New Findings of Different PSO Variants for MPPT Problem Under Partial Shading," Ain Shams Engineering Journal, vol. 13 no. 5,DOI: 10.1016/j.asej.2021.101680, 2022.
[14] S. Javed, K. Ishaque, S. A. Siddique, Z. Salam, "A Simple Yet Fully Adaptive PSO Algorithm for Global Peak Tracking of Photovoltaic Array Under Partial Shading Conditions," IEEE Transactions on Industrial Electronics, vol. 69 no. 6, pp. 5922-5930, DOI: 10.1109/tie.2021.3091921, 2022.
[15] C. Ennis, "An Analysis of MATLAB’s Software Performance Interfaced With High-Level C Language for Expediting Numerical Integration Technique," Journal of Computing Sciences in Colleges, vol. 33 no. 4, pp. 84-91, 2018.
[16] A. K. Pandey, V. Singh, S. Jain, "Chapter Eleven-Study and Comparative Analysis of Perturb and Observe (P and O) and Fuzzy Logic Based PV-MPPT Algorithms," Applications of AI and IOT in Renewable Energy, pp. 193-209, 2022.
[17] D. Horla, Computational Burden Analysis for Integer Knapsack Problems Solved with Dynamic6Programming, 2017.
Copyright © 2025 Saba Javed et al. International Transactions on Electrical Energy Systems published by John Wiley & Sons Ltd. This is an open access article under the terms of the Creative Commons Attribution License (the “License”), which permits use, distribution and reproduction in any medium, provided the original work is properly cited. Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License. https://creativecommons.org/licenses/by/4.0/