Introduction

The future production of electrical power (EP) represents a great challenge for the countries of the world. It is considered one of the most important reasons for the development of the world's economies. It is also known that the production of this type of power comes mostly from coal, oil, and gas, which contributes to increasing carbon dioxide emissions and global warming, as well as pollution of the earth1. The rise in toxic gases in the atmosphere helps to spread dangerous diseases and physiological changes in animals, and this appears recently in the unexpected migration of some animals and the extinction of some of them. All this is because of the irrational use of traditional resources. On the other hand, it represents a depletion of the stock of natural resources, which primarily constitutes a serious threat to the capabilities of future generations. These obstacles made several governments of countries exploit all kinds of distributed energy resources (DERs) based on renewable energy (RE) technologies or green power technologies due to their natural renewal2. As they are environmentally friendly as well, they are clean and do not contribute to global warming. Of the RE sources that have received great attention, wind energy (WE), solar energy (SE), ocean currents, wave energy, and thermal energy are mentioned. All these energies are among the RE sources that greatly help protect the environment and do not pose a threat to human or animal health. As a result of the great progress of human civilization and the insane increase in industrialization that coincided with urbanization and globalization, which led to an increase in demand for energy throughout the world, a noticeable increase in the costs of energy sources and the costs of producing and consuming EP is observed, which is a negative matter that leads to undesirable problems. Conventional energy sources, with the fear of being exhausted at a rapid pace, seem to be failing to quench the swelling demand for energy alone. SE, being a widespread and environmentally friendly source of RE, has become one of the most prevalent forms of energy generation implemented in diverse applications today.

Literature review

Traditionally, SE is one of the available resources in unlimited quantities in most regions of the world3. The sun's energy is free, green, and inexpensive, as it can be used to generate EP easily and does not require huge resources as is the case in traditional sources. In addition, this type of energy is free of pollutants, which has encouraged researchers to develop better techniques to produce a good photovoltaic (PV) system4. The latter is a simple system that relies on PV cells to convert the sun's energy into current, as thousands of PV cells are used for this purpose. Like all systems, this system has its pros and cons. Its advantages are simplicity, inexpensive, environmentally friendliness, and ease of implementation. However, some drawbacks make it vulnerable to several problems and limit the spread of this system, especially in the northern regions of the globe. As it is known, the basis of this system is SE, and this energy is not present at night or in the event of air turbulence (rain), in which case there is no generation of EP. In addition, PV cells are susceptible to damage by sandstorms and in case of heavy snowfall. Also, this system needs large batteries to store energy, as this battery is expensive, exposed to internal and external risks (needs a high-capacity protection system), and has a shorter life. All these defects and problems limit the spread of this system. Likewise, in energy systems, regardless of the type of energy source, the most common problem in these systems is the quality of power and current, as the quality of power is low and is largely related to the type of strategy used. In the work5, the author addressed the issue of the quality of power generated by a T-type inverter, where a new control was used for this purpose. The control used is simple, uncomplicated, low cost, easy to implement, does not depend on the MM of the system, and has a small number of gains, which makes it easy to adjust and obtain good results. This proposed system was implemented in the MATLAB, where various tests were used to verify its validity. Also, the proposed control was compared with the conventional control based on proportional-integral (PI) controller in terms of performance, robustness, overshoot, and ripples. The proposed control provided satisfactory results compared to the traditional strategy, which is a positive thing, but the ripple problem remains despite the outstanding performance. Another work dealt with the problem of power quality in6, where synergetic control (SC) was used as a suitable solution to improve the quality of power coming out of the three-level voltage source inverter (VSI). As is known, the SC strategy is considered a nonlinear control that is characterized by simplicity, ease of implementation, small number of gains, and easy to adjust. This strategy was relied upon in order to improve the quality of current and power compared to the PI command based on the PI controller, where MATLAB was used for this purpose. The behavior of the SC strategy was compared with the PI command and some works. The results obtained and the completed comparison showed that the SC strategy provided satisfactory results in terms of improving the quality of current and EP, which is positive.

In general, PV systems are associated with a change in the flow of the amount of solar radiation. It requires the use of some algorithms to obtain the maximum power point tracking (MPPT)7. In recent years, modern optimization-based global MPP (GMPP) extraction schemes are gaining a lot of attention from researchers. Among these algorithms, we found the most popular traditional algorithm namely: perturbation and observation 8, incremental conductivity9, and hill-climbing10, and they are used because of their ease of implementation and low cost, as in the literature11,12. However, it does not respond in the event of a rapid change in climatic conditions13,14. This is what prompts researchers to use, or rather develop, modern techniques that check the behavior of the system by creating a disturbance in the constant work/effort cycle15. According to the work done in16, MPPT schemes are used to enhance clean energy production based on solar PVs (SPVs), where to ensure reliable and efficient MPP extraction from SPV systems, exploiting and implementing different MPPT schemes is of great importance. In this work, the author has presented a thorough and comprehensive review of MPPT techniques in SPV systems under partial shading conditions based on the meta-heuristic approach and artificial neural network (ANN). In this work, thirteen recent improvements and ANN-based global MPP (GMPP) tracking techniques are explicitly described with flowchart and detailed mathematical modeling, where all schemes are evaluated according to parameters such as tracking effectiveness, tracking time, application, sensed parameters, transducer used, and steady-state oscillations, experimental setup, and key observations. The author according to the thorough review done has proposed a new GMPP extraction scheme based on a recently introduced meta-heuristic approach called Artificial Gorilla Forces Optimizer to extract GMPP from SPV system under partial shading conditions. The simulation was used to complete this study and apply the designed technique to the PV system. The results obtained showed the superiority of the proposed strategy over other strategies. The author argues in17, to maximize the effectiveness of an SPV system, it should be operated at maximum MPP which includes the use of MPPT technique. The latter is a self-powered control technology that forces the SPV system to operate at MPP and thus utilize the maximum power obtainable under time-varying environmental conditions such as solar intensity, temperature, SPV module characteristics and module shading. The author has presented a detailed study in this work about 27 MPPT techniques deployed in SPV system. The entire evaluation addresses MPPT techniques used under uniform solar insolation that varies from time to time, as well as global MPPT (GMPPT) techniques used under partial shade conditions. Clear comparisons have been made between all MPPT techniques as well as a brief discussion of their advantages and disadvantages. Moreover, a detailed structure for MPPT technique was designed, and the results demonstrated the importance of these strategies in improving the power characteristics of this energy system.

In the normal case of irradiance with no shading effect, these methods suffer from a lack of tracking of abrupt irradiance changes18. Whereas a PI controller has been proposed whose strategies can extract maximum power from the PV-MPPT system19. However, this control is considered traditional as a linear control, as it lacks the precision and speed of response in the case of radioactive changes. To improve the effectiveness of the system, the researchers designed smart and non-linear strategies, as techniques that help to track the MPPT technique and ensure a rapid response in cases of irradiance changes, including adaptive control20, sliding mode controller (SMC)21, backstepping controller (BC)22, ANN controller23, MPPT-perturb and observe (MPPT-P&O) based on fuzzy logic (FL) controller24, model predictive control25, super-twisting SMC26, particle swarm optimization (PSO)27 and genetic algorithm (GA)28,…etc. These techniques show interesting results in terms of accuracy and response time, but they seem difficult to use because they require a large amount of data regarding radioactive change and temperature. SMC technique is a nonlinear controller that has many advantages such as robustness, responsiveness, and fast response dynamic compared to the PI regulator. However, this regulator has several drawbacks that limit its use, such as the problem of chattering and its attachment to the mathematical model (MM) of the system, which makes it affected by changes in the system parameters29. These defects create several problems in the systems, such as torque ripples and a significant decrease in the current quality if the system parameters change, which leads to high costs of periodic maintenance, and this is undesirable. In the work30, the author used a nonlinear control represented by the third-order SMC technique as a suitable solution to improve the performance of the MPPT strategy of PV system. This technique was first used in the field of WE to control induction generators, as it is characterized by high performance, high robustness, and a small number of gains, which makes it easy to adjust and control. According to the work done in31, the TOSMC controller provides excellent results, especially in the event of a system malfunction, which makes it suitable in the field of control. Therefore, the MPPT-TOSMC strategy of PV system is a new strategy and is a modification of the conventional MPPT technique, where durability, high performance, ease of application, and simplicity are among the most prominent features of this new strategy. The MPPT-TOSMC strategy was implemented in the MATLAB and the results were compared with the traditional MPPT strategy, where several different tests were used for the purpose of studying the proposed control. The simulation results show the high performance of the proposed strategy in improving the characteristics of the PV system compared to the traditional strategy. But the negative of this proposed control lies in the energy ripples, as the presence of ripples is observed, which is an undesirable negative matter. Another work dealt with improving the disadvantages of the DPC strategy in32, where the strategy integral BC (IBC) technique was used. In this proposed system, the battery was used to store excess energy and use it when needed, so the IBC technique was proposed to control the battery charge. The IBC strategy was also used to control the DC bus voltage. Accordingly, the proposed system is characterized by high durability and outstanding performance, as the MATLAB environment was used to implement this energy system and test it under different working conditions. Simulation results show that the quality of power and current are high when using the DPC-IBC technique compared to the DPC-PI. This proposed system lies in the complexity, difficulty of implementation, and the presence of a significant number of gains, which makes it difficult to determine the best dynamic response, which is undesirable. In the work33, the author used STC based on GA technique to control the grid connected PV system with filter. The proposed system relies on the PV system to generate power and uses the filter to improve power quality. This proposed power system is characterized by high performance and great robustness as a result of using a combination of two different strategies, one of which is a nonlinear strategy and the other is a smart strategy. Also, the control proposed in this work is characterized by simplicity, small number of gains, and ease of implementation. The proposed control does not require a MM of the system, which makes it the appropriate solution in this work. This designed system was implemented in the MATLAB using several tests, where the necessary graphical and numerical results were extracted. Another work was done to improve the quality of the power generated by the PV system in34, where the predictive DPC technique was used to control the three-level neutral point clamped-based filter. The proposed strategy is characterized by complexity compared to the DPC strategy, as the phase-locked loop (PLL) strategy was used to estimate energies. Using this strategy greatly increases the stability and robustness of the system. This proposed energy system was implemented in the MATLAB, where several tests were used for this purpose. All the obtained graphical and numerical results prove the superiority of the predictive DPC technique in improving system characteristics and power quality compared to the DPC method. In the work35, the author used a hybrid energy system that relies on the use of different sources to generate EP. He used the PV system as one of the most prominent of these systems because of its ability to protect the environment and reduce the cost of energy production and consumption. Also, the battery was used to store excess energy and use it at critical times. The use of storage also contributes significantly to reducing reliance on non-renewable sources for generating EP and thus reducing the spread of toxic gases in the atmosphere. The advantage of this system is that it is effective in protecting the environment, increases the performance of generating EP from renewable sources, and generating EE in different conditions. In this system, a new MPPT strategy was used to control the PV system, as intelligent P&O control was used for this purpose. The advantage of the control used is simplicity, high robustness, and outstanding performance in improving the system characteristics, and this is confirmed by the results obtained from the MATLAB. The negative of this proposed energy system lies in its complexity, as several systems were used along with the use of storage, which makes the system complex and requires management control. The use of control management increases the degree of complexity and the difficulty of implementing the system on the ground.

There are many non-linear strategies chosen from the best solutions that can be focused on in the field of control. SC technique is one of the simplest non-linear strategies and the easiest to apply to systems, no matter how complex they are, as they can be applied easily and do not need the MM of the system as is the case in SMC technique. This strategy was proposed to improve the performance of the DPC technique in the WE generation system36,37, as it gave very satisfactory results in terms of energy ripples and current quality compared to traditional strategies. Compared with SMC technique, SC strategy can be easily applied in complex systems, reducing the problem of chatter and increasing the robustness of systems. In Ref.38, a nonlinear SC technique is designed for the command of grid-independent and grid-connected PV arrays. The use of SC technique as a solution has resulted in high stability of the PV system with a fast dynamic response compared to the traditional technique. In addition, the chattering phenomenon is significantly eliminated while obtaining high-quality current. Work using the SC strategy was implemented in Ref.39, where the fractional calculus, PI controller, and PSO technique were used to improve power quality and overcome the problems of the fielded-oriented control of WE system. The proposed strategy is characterized by high robustness and outstanding performance. This is demonstrated by the graphical and numerical results obtained from the MATLAB, where the quality of current and power has been greatly improved compared to the traditional strategy and some existing controls. The disadvantage of this strategy is that it relies on estimating powers and the presence of a significant number of gains, which makes it difficult to use smart strategies in determining the values of gains and adjusting the dynamic response. The SC technique and fractional calculus were combined to create a controller characterized by high durability and its ability to improve the quality of the current and energy resulting from a WE system. The fractional-SC technique is a modified strategy, which is based on the SC technique and is characterized by simplicity, ease of implementation, small number of gains, and fast dynamic response. This strategy was used to overcome the problems of the DPC strategy, as the MATLAB was used to implement it and extract the necessary results while comparing the behavior of this strategy with the DPC technique and some existing works. Simulation results show the high performance and robustness that characterize this strategy compared to the conventional technique. Also, this technique provided better results in terms of energy quality and energy response time compared to existing strategies, and this is evident in the reduction rates. This strategy has a negative side, which is that it relies on estimating powers, which makes it affected if the system parameters change. This is what the robustness test shows, as it was observed that this strategy was significantly affected by changing the system parameters. In the work40, the author used the modified SC technique to overcome the problems of the DPC strategy, where the modified SC strategy was compared with the traditional SC strategy. This proposed strategy was implemented in a MATLAB using several different tests to highlight its superiority and performance in improving the quality of current and power for a WE system. This strategy has several advantages, the most notable of which are simplicity, small gains, ease of implementation, high performance, great durability, and fast dynamic response. The extracted graphical and numerical results show the extent of the superiority of the modified SC technique over the traditional SC strategy and some existing works, and this is demonstrated by the calculated reduction ratios, which is a positive thing. However, there is a negative to this technique, which lies in its noticeable impact on changing system parameters due to its reliance on power estimation, which makes the power quality affected, which is an undesirable negative. A comparative study between the two strategies, SC technique and SMC strategy, was carried out in the work41, where the differences and similarities between them were mentioned. These two strategies were applied to overcome the defects of the DPC strategy, as the MATLAB was used to accomplish this comparison, while extracting the necessary graphical and numerical results to study the behavior of the two strategies in terms of tracking references, reducing the value of total harmonic distortion (THD) of current, overshoot, SSE, response time of active and reactive power. The results obtained show the extent to which the SC strategy is superior to the SMC strategy in terms of response time, overshoot, SSE, etc. Through the results obtained it is noted that the two strategies are affected together by changing system parameters due to their reliance on capacity estimation, which is negative. A new strategy for the SC technique has been proposed in the work42 under the name integral SC technique to overcome the problems of the DPC strategy. This strategy is characterized by simplicity, few gains, fast dynamic response, ease of implementation, high performance, and great robustness against changes in system parameters. This strategy was used in addition to the pulse width modulation strategy to improve the characteristics of the DPC strategy and reduce the value of THD of current. This proposed strategy was implemented in the MATLAB, where several tests were used to verify its superiority over the conventional technique. All test results indicate the extent of the significant superiority of this strategy and this is shown through the numerical values and the calculated reduction percentages. This strategy has a negative effect on the durability test, as a noticeable increase in the values of ripples and THD of current is observed, which is a negative matter due to the use of power estimation. In the work43, the author combined the SC technique, PI controller, and GA technique to obtain a strategy characterized by high robustness and distinctive performance to be used to overcome the problems of the DPC strategy. The GA strategy was used to calculate the gains of the proposed control and increase its performance. This technique is characterized by simplicity, high robustness, great efficiency, ease of implementation, few gains, and fast dynamic response. The MATLAB was used to implement this proposed strategy, and various tests were used to verify performance. The numerical and graphical results show the superiority of the proposed strategy in improving the characteristics of the DPC strategy compared to the conventional technique. Also, the quality of power and current has been significantly improved and this is shown by the comparison achieved with the conventional technique and some existing works. This designed technique has a negative side, which is its reliance on power estimation, which makes the power quality and THD value of current affected, and this is revealed by the robustness test. A comparative study between the two STC and SC strategies in44, where they were compared to show the best strategy in improving the characteristics of the DPC strategy. First, the author gave the characteristics of each strategy and then made a comparison between these two strategies, mentioning the positives and negatives of each strategy. As is known, the SC strategy is characterized by simplicity, ease of implementation, and few gains compared to the STC strategy, which allows it to provide satisfactory results. These strategies have been implemented in the MATLAB under different working conditions. The graphical and numerical results show the superiority of the SC strategy over the STC strategy in terms of improving the characteristics of the DPC strategy and reducing the value of THD of current in all tests. In the work45, a SC-SMC technique was used to overcome the shortcomings and problems of the direct field-oriented control (DFOC) strategy of induction generator. This proposed strategy is somewhat simple and easy to implement. But compared to the DFOC strategy and DPC technique, it is complex and difficult to implement. Using the SC-SMC technique led to a significant increase in performance and durability, and this is demonstrated by the results obtained using the MATLAB. Also, the power quality was increased and the THD of current value was significantly reduced compared to the conventional technique and some existing works. The negative of this strategy is that it depends on the MM of the studied system, which makes it affected in the event of a malfunction in the system, as an increase in the values of ripples, response time, overshoot, and SSE is observed in the durability test, which is negative. This strategy also depends on estimating capabilities, which is a negative thing that contributes to a decrease in the durability of the system. In the work46, a combination of SC technique and STC strategy was used to reduce active power undulations and reduce the THD of current. The resulting strategy is characterized by high durability and distinguished performance, as the characteristics of the two strategies were combined with the aim of obtaining a controller that has great effectiveness in improving the characteristics of energy systems. This method (SC) is characterized by a small number of gains, easy implementation, and a fast dynamic response. This strategy was implemented in the MATLAB environment, where several tests were used to verify performance compared to the STC technique. Simulation results show the superiority of the proposed strategy compared to the STC technique in terms of power quality, response time, SSE, and overshoot compared to the STC technique. This proposed strategy (DPC-SC) has a negative effect on the robustness test, which is a result of its reliance on power estimation, which is negative.

In contemporary times, the utilization of power electronic interfaces is steadily rising across various sectors, spanning from power generation to industrial and residential consumption. However, while power electronic converters offer enhanced comfort and flexibility, they also introduce certain drawbacks concerning power quality. These include issues such as power factor degradation, heightened power losses, and premature aging of insulators and equipment47. Such challenges pose significant concerns for manufacturers, as they can lead to reduced annual profits and, in extreme cases, even bankruptcy. Furthermore, the competition to enhance the dynamic response of electronic systems and elevate their performance necessitates substantial investments in research, thereby escalating manufacturing costs. These factors collectively contribute to several challenges within the electricity generation system derived from RE sources. Despite the availability of technology and abundant energy sources like solar and WE, the widespread adoption of these systems remains.

As it is known, the quality of current is of great importance in industrial systems, where it is considered an important criterion to know the quality of any control strategy. The quality of the current affects the life of electrical machines greatly if the quality of the current is low, the life of the electrical machine will inevitably decrease, and vice versa. Current quality is largely related to harmonics. The latter is linked to internal and external factors of the system (largely related to the command technique), as it rises in the event of a change in the system parameters and causes several problems (damages). To overcome these harmonics, nonlinear techniques such as BC technique or TOSMC technique and smart strategies such as ANNs and GAs can be used. The use of these strategies leads to a minimization in these harmonics, and thus an increase in the current quality. Also, filters can be used to overcome these harmonics, as several filters can be used for this display. These filters depend on the use of capacitors and coils.

Traditionally, passive filters are the classic solutions used to remove lower order harmonics from mains power, but this type of filter cannot be easily adapted to multivariable operating conditions, in addition to poor filter performance48, Therefore, active filters have been used which are among the most widely used solutions to address these problems in electrical grid systems, which are connected in parallel with the network to inject a current opposite to the harmonic current generated by the load to minimize the effect of harmonic currents and Qs, which allows obtaining a sinusoidal current from the AC grid49. Three-level shunt active power filter (SAPF) is among the most famous electronic circuits in the field of energy and improving its quality, as it plays an important role in improving the current quality. This circuit is a three-phase filter that eliminates harmonic currents created by non-linear loads, trajectory pursuit, and stabilization, compensates the Qs and performance improves such as robustness, and reduces response time and Qs and Ps ripples maintaining a fixed switching frequency.

SAPF typically uses two-stage voltage inverters (VIs); these give acceptable results in terms of power factor correction and THD of current elimination50. However, for high-power and medium applications, this type of inverter is no longer suitable because it requires power components that can withstand a strong reverse current and voltage. Another disadvantage associated with this type of converter is the problem of magnetic interference caused by the sudden change in the output voltage of the inverter from a zero value to a high value51. According to the continuous and large-scale development known in the industrial field to transport high-power electric power, it is preferable to raise the voltage; however, this increase degrades the static and dynamic performance of semiconductor components of these converters. To remedy this limitation, so-called multi-level structures have emerged. These structures are based on the idea of distributing voltage loads over several low-voltage semiconductor components connected in series52, Therefore, several multilevel inverter topologies have been developed in the literature. However, the distributed potential neutral point (NPC) topology designed by A. NABAE, due to its close similarity to the structure of two-level VIs and its simplicity. The controller has attracted the attention of several researchers and practitioners for specific applications53. Many command techniques have been presented in the literature to control the SAPF, such as voltage-oriented command (VOC)54 and DPC technique55. All of these strategies have one goal: eliminating harmonic currents and improving power factors, but their principles are different.

DPC technique is a simple and powerful command technique inspired by the famous direct torque control used for variable-speed drives56. It was published in 1998 by Noguchi et al. proposed and in 2001 by Malinowski et al. developed57. This technique does not need current command loops and no pulse with modulation (PWM) modulator bloc, because the converter switching states are selected by a switching table (ST) based on the instantaneous errors between the reference and the measured values of the reactive and active power (Qs and Ps) which are controlled independently using hysteresis comparators (HCs) and the angular position of the source voltage vector58. This strategy has been used a lot in the field of REs, especially in WE, to control the inverter of electric generators59,60,61,62. The use of this strategy in the field of power generation provided very satisfactory results in terms of dynamic response, durability, ease of control, ease of programming, inexpensive, and not affected much by changing system parameters, as is the case in the VOC strategy. However, this strategy has several drawbacks that limit its spread in the field of power generation and its improvement, as the main drawbacks of this strategy lie in power ripples, unstable frequency, and low quality of the current. The research offers a solution to get a fixed switching frequency by replacing the HCs and the ST with two PI controllers and voltage modulators. This strategy is the DPC strategy with SVM technique63. The DPC-SVM technique calculates the states of the VI to meet the following two requirements: minimized power ripple and operation at constant switching frequency64. In scientific works, many solutions have been suggested to overcome the defects of the DPC strategy, where some focused on the use of nonlinear techniques such as third-order SMC strategy65, SMC technique66, SC technique67, BC technique 68, SC-SMC technique69. Similar to non-linear strategies, smart strategies were proposed as the best solution to improve the efficiency of the DPC because of its high efficiency and great dynamic speed. ANN technique70, GAs71, PSO strategy72, and FL technique73 are mentioned in this strategy.

Other similar techniques based on PI actions like resonant or multi-resonant controllers are also proposed in some references such as74,75,76. However, especially in the case of harmonics control, a compromise between a satisfactory dynamic response and a zero steady-state error (SSE) is often difficult with these controllers. Moreover, the non-linear control techniques constitute a good solution to these problems related to linear control, among these controls, control by SMC technique, control by BC technique, and controls based on artificial intelligence77. These types of control provide robustness, stabilization, tracking, response time, rejection of disturbances, and bidirectional. Their use has become widespread. The predictive power control methodology has the potential to advance the effectiveness of future energy processing and command systems78. Is the subject of this paper.

In this study, an electrical system consisting of a PV system and three-level SAPE is considered, where this proposed system can be used in several different fields such as controlling electrical machines. In addition, it was proposed to use two strategies for two plans that are different in principle and idea, namely SC technique and SMC method, to find out the best strategy for controlling the PV system. Also, the PLL strategy is used to command the three-level SAPF to increase the system's durability and reduce current ripples further. The advantage of the proposed system is that it is simple, easy to control, and inexpensive compared to some other systems. This proposed work in this paper is different from several scientific works79,80,81 in terms of the command technique used to command the PV system and SAPF, the level of the inverter used, and the load used.

Research gap and motivation

In the field of REs, there is no energy system that can provide ripple-free power quality. Based on the related works mentioned above, the power quality and THD of current are related to the type of control strategy used, to reduce active power ripples and significant reactivity. Also, to reduce the value of THE, a control strategy with high efficiency and performance must be used. Therefore, the search for these strategies continues to achieve satisfactory results. On the other hand, attention must be paid to the number of gains, ease of achievement, cost, simplicity, and durability of any strategy that can be relied upon. Therefore, it is necessary to focus on a set of steps before completing or implementing any energy system, as the steps can be divided into the following points:

  • Durability: The energy system must be characterized by high durability against internal and external factors to obtain high quality energy despite the occurrence of malfunctions.

  • Simplicity of the energy system: Simplicity is one of the most prominent features of any energy system that can be relied upon to generate EP, as the type of control strategy plays an important role in simplifying the system and facilitating its implementation on the ground. Simplicity contributes greatly to reducing costs and making the system characterized by rapid dynamic response.

  • Number of gains: The number of gains is a clear picture of the degree of complexity of the control strategy or the energy system itself, as the greater the number of gains, the more complex the control strategy, and thus the energy system becomes expensive and difficult to implement. Also, a smaller number of gains allows for easy adjustment and change of the dynamic response, which is a positive thing that should be available in any control.

  • Performance and efficiency are among the most prominent characteristics that must be present in any reliable energy system in energy production, as the performance and efficiency of the system are largely related to the type of control used. Therefore, a control strategy must be used that does not depend on the MM of the energy system in any way (avoiding the use of power estimation) to obtain high energy quality, no matter how the system parameters change.

Challenges

In any energy system, to obtain high power quality with the lowest THD of current value, attention must be paid to choosing control strategies with high performance and great durability. These control strategies significantly affect the response of energy systems. Therefore, it is necessary to pay attention to choosing the type of control strategy that can be relied upon for control.

Power quality and current THD are among the challenges we faced in this completed work. Also, choose the type of control that can be used to control the proposed system and obtain good results. Simplicity, durability, ease of implementation, small number of gains, and high performance are all features that must be present in a reliable strategy for controlling the energy system, which makes the matter become more complex. Also, the dynamic response of the system is one of the most prominent challenges facing this work, as several different strategies were applied in the first place. It was chosen to use both SMC and SC strategies to improve the MPPT characteristics of the PV system, and then the best strategy that can be relied upon in the future is chosen. Controlling the filter is another challenge faced in this work, as the search was done for the most appropriate and reliable control to obtain high quality power, especially in the event of a malfunction in the system. Also, the challenge facing this work is complexity, as the focus was on simplifying the system and significantly reducing its cost. Therefore, focus was placed on several data to obtain satisfactory graphical and numerical results. To control the filter, the predictive DPC technique based on PLL strategy was relied upon due to its durability and high performance.

The proposed solution for controlling the studied energy system has the advantage of robustness, as two different controls were used for both the filter and the PV system, thus obtaining good results. The controls proposed in this work do not use system parameters and contain a small number of gains, which will allow the dynamic response to be easily tuned. Also, emphasis was placed on simplicity and uncomplicated control, thus making the system easier to implement, which is desirable and leads to a significant reduction in costs. In addition to the advantages of the proposed control, this studied energy system also faces some difficulties that may limit its adoption in the industrial field, as these difficulties can be summarized in the following points:

  • The quality of power and current are among the most important characteristics that must be focused on.

  • Control parameters: These parameters are among the most prominent challenges faced in this work to obtain good results due to not using artificial intelligence strategies and relying on the method of experimentation and simulation.

  • DC line voltage control: Using a nonlinear technique to control the DC line voltage may pose a problem in increasing the complexity of the system and increasing the difficulty of implementation.

  • High system costs: Using a PV system with a three-level filter may increase complexity, making costs relatively high.

Given these challenges and the importance of power quality and current in energy systems, completing this work and proposing a system based on generating and improving power quality at the same time has generated great interest in proposing a suitable solution and addressing the power quality problem. Accordingly, this completed work aims to overcome the difficulties and provide an effective and appropriate solution to raise the quality of energy and reduce the value of current THD. In addition to the quality of power and current, attention is paid to simplicity and ease of implementation to reduce costs. Also, unleashing the full potential of these promising energy systems, with the possibility of integrating them in the future with other energy systems, such as the wind system.

Contribution

The present work describes how a suitable operation of a double-stage grid-connected PV system, feeding a nonlinear load can be achieved. A model predictive DPC-SVM (PDPC-SVM) technique of the SAPF using the PLL technique, allowing a proper regulation of Qs and Ps amounts exchanged with the grid, and compensation of undesirable current harmonics with a minimum THDs on the grid side. MPPT-SC technique and MPPT-SMC strategies are used for controlling the duty cycle of the electronic switch of the DC-DC-BC to ameliorate power conversion efficiency. The main contributions of our work can be summed up as follows: (1) The command of a PV system based on a 3-level multifunctional voltage source inverter (MVSI) has been dealt with in detail with an implementation procedure using simulations; (2) The effectiveness and performance of the PDPC-SVM technique based on PLL technique are presented and confirmed; (3) A comparative study was proposed between the proposed strategies (MPPT-SC technique and MPPT-SMC) and the traditional MPPT strategy based on PI regulator in terms of current quality, dynamic response, and durability.

The simulation and analysis in the MATLAB software of these command strategies are presented, and their characteristics are evaluated. In order to show and give a clear picture of the strategies proposed in this completed work, Fig. 1 is used, as this figure shows the stages of design, testing, and validation of the designed techniques.

Figure 1
figure 1

Flow chart of the proposed technique.

This paper has nine different sections that explain the work done in detail. In the first section, an introduction is given about the work done, and related works are mentioned in this section along with the main contributions. In the second section, the MM of the energy system under study is given, as the MM is given for both the PV system and the three-level inverter that is used as an active filter. The proposed strategy for controlling the SAPF is listed in the third section, where the necessary information is given (working principle, pros, cons,…) about this technique. In the fourth section, control of the DC link voltage is discussed, where anti-windup PI control is used to obtain good results and simplify control. In the fifth section, the SC strategy was discussed, where the necessary and essential information about this strategy was given, mentioning the negatives and positives. The MPPT-SC strategy applied to the PV system is listed in Section VI. The MM for this proposed strategy is given, along with the pros and cons. The seventh section was devoted to the MPPT-SMC strategy used to control the PV system to obtain good results. The necessary equations were given that show the principle of this strategy. In the eighth section, the graphical and numerical results of the strategies were given, and the MATLAB was used for this purpose. The results obtained from this work are listed in Section IX.

System description and modelling

In this part, the PV-SAPF energy system is discussed, which aims to generate energy from solar energy and at the same time improve the energy quality by using an SAPF. Therefore, this studied system has very great importance in the industrial field, where the problem of energy and current ripples is addressed. This studied system has several advantages, including simplicity, ease of implementation, high performance, and high robustness. Also, it contributes to reducing gas emissions and thus reducing global warming. On the other hand, the use of this well-studied energy system contributes significantly to reducing the bill for production and consumption of EP, which is a positive thing, as this system can be implemented at the individual (household) level and thus the problem of high energy demand can be overcome.

The proposed system illustrated in Fig. 2 comprises a PV array linked to a DC–DC converter. The boost converter is used to embody the DC–DC converter, as the type used is characterized by simplicity, easy to implement, inexpensive, and easy to control. This converter is governed by various MPPT techniques (MPPT-SMC and MPPT-SC) to achieve the optimal operating point for the PV array's maximum power output. Other types can also be used to embody the DC–DC converter, such as interleaved boost and buck boost converters, as the type mentioned in this work was relied upon because of its advantages compared to these types. Subsequently, the PV array is connected to the electrical grid through a 3-level MVSI and an inductive filter. All of this supplies power to a nonlinear load consisting of an uncontrolled three-phase rectifier and a resistor \({R}_{l}\) connected in series with an inductive element (\({L}_{l}\)).The control of the three-phase three-level MVSI inverter is managed by the PDPC-SVM technique using the PLL method. Anti-windup PI regulators are employed to compute the reference value of Ps (Psref), ensuring efficient power transfer between the load, grid, and PV array.

Figure 2
figure 2

The proposed technique for the PV-SAPF.

Three-level inverter description and modelling

In this part, a three-level MVSI was used to get better the efficiency and greatly improve the current and power quality of the proposed system. As it is known, a 3-level inverter has proven its efficiency in improving the current quality and system characteristics significantly, its use leads to a significant minimization of current and power ripples compared to the traditional inverter82. NPC is one of the most famous topologies for inverters, as it is characterized by simplicity, ease of control, inexpensive, ease of implement, and provides very satisfactory results compared to traditional inverters. This topology is used in this paper to achieve a 3-phase SAPE to ameliorate the power and greatly minimize the current ripples.

The topology of a 3-level NPC inverter is consisting two identical capacitors with a common medium point denoted (o) which allows the inverter to access an additional voltage level compared to the traditional two-level inverter, the total DC bus voltage Vdc under normal operating conditions, this is evenly distributed over the two capacitors which then have a voltage (uc1 = uc2 = Vdc/2), at their terminals. the inverter has three arms 1, 2, and 3, each one consists of four bidirectional switches controllable (\(T_{1x}\),\(T_{2x}\),\(T_{3x}\),\(T_{4x}\) with x : arm index) set in series, in anti-parallel with four main diodes to ensure the reversibility of the currents, is two of clamp (\(D_{x1}\),\(D_{x2}\)) connected to the medium point of the DC bus voltage.

The differential equation of the dynamic MM of a 3-phase SAPF in the \(\alpha \beta\) axes are given as follows:

$$\left\{ \begin{gathered} \frac{{di_{f\alpha } }}{dt} = - \frac{{R_{f} }}{{L_{f} }}i_{f\alpha } - \frac{1}{{L_{f} }}v_{l\alpha } + \frac{1}{{L_{f} }}v_{f\alpha } \hfill \\ \frac{{di_{f\beta } }}{dt} = - \frac{{R_{f} }}{{L_{f} }}i_{f\beta } - \frac{1}{{L_{f} }}v_{l\beta } + \frac{1}{{L_{f} }}v_{f\beta } \hfill \\ \frac{{dV_{dc} }}{dt} = \frac{1}{{C_{dc} }}i_{dc} \hfill \\ \end{gathered} \right.$$
(1)

PV system modelling

Boost DC–DC converter model

Depending on the DC-DC converter circuit shown in Fig. 2, its MM can be written with the following differential equations 83.

$$\frac{{dV_{PV} }}{dt} = \frac{1}{{C_{PV} }}\left( {I_{PV} - I_{{L_{PV} }} } \right)$$
(2)
$$\frac{{dI_{{L_{PV} }} }}{dt} = \frac{1}{{L_{PV} }}\left( {1 - D} \right)V_{PV} - \frac{1}{{L_{PV} }}V_{dc}$$
(3)

where, \(V_{PV} ,\;I_{PV} ,\;I_{L} ,\;I_{dc} ,\;V_{dc}\) are respectively the input voltages and current of PV array, input inductance current, output current of the boost converter and DC-link voltage, D is the duty cycle, \(C_{PV} ,\;L,\;C_{dc}\), are the electrical parameters of the DC-DC converter.

PV array model

Applying Kirchhoff's law to the PV array equivalent circuit model shown in Fig. 2, we obtain the output equation for a current of the PV array by84:

$$\left\{ {\begin{array}{*{20}c} {I_{pv} = N_{p} i_{ph} - N_{p} i_{o} \left[ {\exp \left( {\frac{q}{{N_{s} K\gamma T}}\left( {V_{PV} + \left( {\frac{{N_{s} }}{{N_{p} }}R_{s} } \right)I_{PV} } \right)} \right) - 1} \right] - N_{p} \left( {\frac{{V_{PV} + \left( {\frac{{N_{s} }}{{N_{p} }}R_{s} } \right)I_{PV} }}{{\left( {\frac{{N_{s} }}{{N_{p} }}R_{sh} } \right)}}} \right)} \\ {i_{ph} = \frac{G}{{G_{ref} }}\left( {i_{ph,ref} + \mu_{isc} \left[ {T - T_{ref} } \right]} \right)} \\ {i_{o} = i_{o,ref} \left( {\frac{T}{{T_{ref} }}} \right)^{3} \exp \left( {\frac{{qE_{G} }}{k\gamma }\left( {\frac{1}{{T_{ref} }} - \frac{1}{T}} \right)} \right)} \\ \end{array} } \right.$$
(4)

where,\((i_{o} )\) is the reverse saturation current of the diode, γ is ideality factor, \(N_{s} ,\;N_{p}\) represents the number of the PV array connected series and parallel, \((q = \, 1,602 \times 10^{ - 19} C; \, K = \, 3,807 \times 10^{23} J/K)\) are the electron charge and the Boltzmann’s constant.

The type of the PV array used in this study is: (BP SX 150S PV module) and its characteristics are illustrated in Fig. 3.

Figure 3
figure 3

IPv–VPv and PPv–VPv characteristics at T = 25 °C.

Proposed DPC technique

DPC strategy is among the strategies that have been very popular in the field of REs, and this appears through the number of published articles that dealt with this strategy in terms of application and performance improvement85,86,87,88,89,90. The advantage of this strategy is that it is simple, inexpensive, easy to program, easy to implement, and provides better results compared to the VOC strategy88. But the negative of this technique lies in power ripples and a significant decrease in the quality of the current (THD) in the event of a change in system parameters89, and this is undesirable. A new strategy proposed in this section is based on the use of a predictive DPC-SVM strategy with the PLL technique to control the three-phase SAPE.

PDPC-SVM technique is a new strategy that differs from the DPC strategy in principle and idea, where the SVM technique is used to generate control pulses in IGBTs instead of using a ST, and the predictive control technique is used to calculate the reference voltage values. In this technique, the use of HCs is dispensed with to command Qs and Ps. Also, the PLL technique is used to calculate the measured values ​​of both Ps and Qs. The use of this strategy leads to an increase in the durability of the system, a reduction in power ripples, and a significant increase in the quality of the current. Although its use increases the complexity of the system and its total cost, it is necessary to use it, which leads to improving the operating conditions of electrical machines.

The proposed PDPC-SVM technique requires a predictive model in a discrete-time domain to select the best voltage vectors. This approach operates with constant switching frequency using the SVM technique. For this purpose, a predictive command strategy based on the deadbeat control approach was developed to compute the required average voltage control vector in (α–β) reference frame, to be applied during each sampling period Ts, to minimize the Qs and Ps errors at the next sampling period and provide good tracking performance. The average voltage vector is converted into a sequence of switching states using the SVM technique. The general working principle of the PDPC-SVM technique block as shown in Fig. 4.

Figure 4
figure 4

Working principle of PDPC-SVM technique with PLL strategy.

The Ps and Qs are given by the following expressions a stationary reference frame:

$$\left\{ \begin{gathered} p = e_{g\alpha } i_{g\alpha } + e_{g\beta } i_{g\beta } \hfill \\ q = e_{g\alpha } i_{s\beta } - e_{g\beta } i_{g\alpha } \hfill \\ \end{gathered} \right.$$
(5)

The variation of the Ps and Qs between two successive sampling instants can be expressed as follows:

$$\left[ {\begin{array}{*{20}c} {p(k + 1) - p(k)} \\ {q(k + 1) - q(k)} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {e_{g\alpha } (k)} & {e_{g\beta } (k)} \\ \end{array} } \\ {\begin{array}{*{20}c} {e_{g\beta } (k)} & { - e_{g\alpha } (k)} \\ \end{array} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{g\alpha } (k + 1) - i_{g\alpha } (k)} \\ {i_{g\beta } (k + 1) - i_{g\beta } (k)} \\ \end{array} } \right]$$
(6)

Furthermore, by neglecting the effect of the resistance of network, the evolution of the current vector is governed by a first order differential equation:

$$\frac{d}{dt}\left[ {\begin{array}{*{20}c} {i_{g\alpha } } \\ {i_{g\beta } } \\ \end{array} } \right] = \frac{1}{{L_{g} }}\left[ {\begin{array}{*{20}c} {e_{g\alpha } } \\ {e_{g\beta } } \\ \end{array} } \right] - \left[ {\begin{array}{*{20}c} {v_{c\alpha } } \\ {v_{c\beta } } \\ \end{array} } \right]$$
(7)

By using Forward Euler approach, it is possible to discretization the grid current in α–β reference frame is given by the following expression:

$$\left[ {\begin{array}{*{20}c} {i_{g\alpha } (k + 1) - i_{g\alpha } (k)} \\ {i_{g\beta } (k + 1) - i_{g\beta } (k)} \\ \end{array} } \right] = \frac{{T_{s} }}{{L_{g} }}\left[ {\begin{array}{*{20}c} {e_{g\alpha } (k)} \\ {e_{g\beta } (k)} \\ \end{array} } \right] - \left[ {\begin{array}{*{20}c} {v_{c\alpha } (k)} \\ {v_{c\beta } (k)} \\ \end{array} } \right]$$
(8)

Substituting (Eq. 7) in (Eq. 5), variation of Ps and Qs during one switching period \(T_{s}\) is given as follows:

$$\left[ {\begin{array}{*{20}c} {p(k + 1) - p(k)} \\ {q(k + 1) - q(k)} \\ \end{array} } \right] = \frac{{T_{s} }}{{L_{g} }}\left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {e_{g\alpha } (k)} & {e_{g\beta } (k)} \\ \end{array} } \\ {\begin{array}{*{20}c} {e_{g\beta } (k)} & { - e_{g\alpha } (k)} \\ \end{array} } \\ \end{array} } \right]\left( {\left[ {\begin{array}{*{20}c} {e_{g\alpha } (k)} \\ {e_{g\beta } (k)} \\ \end{array} } \right] - \left[ {\begin{array}{*{20}c} {v_{c\alpha } (k)} \\ {v_{c\beta } (k)} \\ \end{array} } \right]} \right)$$
(9)

Taking account, the objective of the predictive command is to make the output Ps and Qs track the relevant reference powers (Eq. 10), where Fig. 5 represents the predictive values for each of the Ps and Qs.

$$\left\{ \begin{gathered} \varepsilon \left( p \right) = p_{ref} (k + 1) - p(k + 1) \hfill \\ \varepsilon \left( q \right) = q_{ref} (k + 1) - q(k + 1) \hfill \\ \end{gathered} \right.$$
(10)
Figure 5
figure 5

Predictive value estimation of reference power.

For an optimal convergence toward the desired power values, the following equation must be verified:

$$\left\{ \begin{gathered} p_{ref} (k + 1) - p(k + 1) = 0 \hfill \\ q_{ref} (k + 1) - q(k + 1) = 0 \hfill \\ \end{gathered} \right.$$
(11)

Then:

$$\left\{ \begin{gathered} p_{ref} (k + 1) = p(k + 1) \hfill \\ q_{ref} (k + 1) = q(k + 1) \hfill \\ \end{gathered} \right.$$
(12)

The predicted reference values \(p_{ref} (k + 1)\) and \(q_{ref} (k + 1)\) are computed as follows:

$$\left\{ \begin{gathered} p_{ref} (k + 1) = 2p_{ref} (k) - p_{ref} (k + 1) \hfill \\ q_{ref} (k + 1) = q_{ref} (k) \hfill \\ \end{gathered} \right.$$
(13)

Putting (Eq. 9) into (Eq. 13) and solving the equation, the output voltage components of the PCC point can be listed as:

$$\left[ {\begin{array}{*{20}c} {v_{l\alpha }^{*} (k)} \\ {v_{l\beta }^{*} (k)} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {e_{g\alpha } (k)} \\ {e_{g\beta } (k)} \\ \end{array} } \right] - \frac{{L_{g} }}{{T_{s} \left( {e_{g\alpha }^{2} + e_{g\beta }^{2} } \right)}}\left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {e_{g\alpha } (k)} & {e_{g\beta } (k)} \\ \end{array} } \\ {\begin{array}{*{20}c} {e_{g\beta } (k)} & { - e_{g\alpha } (k)} \\ \end{array} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {2p_{ref} (k) - p_{ref} (k + 1) - p(k)} \\ {q_{ref} (k) - q(k)} \\ \end{array} } \right]$$
(14)

Control voltages of the SAPF (\(v_{f\alpha }^{*} (k)\) and \(v_{f\beta }^{*} (k)\)) are estimated using the following equations:

$$\left\{ \begin{gathered} v_{f\alpha }^{*} (k) = v_{l\alpha }^{*} (k) + R_{f} i_{f\alpha } + L_{f} \frac{{di_{f\alpha } }}{dt} \hfill \\ v_{f\beta }^{*} (k) = v_{c\beta }^{*} (k) + R_{f} i_{f\beta } + L_{f} \frac{{di_{f\beta } }}{dt} \hfill \\ \end{gathered} \right.$$
(15)

The SVM technique is to generate a specified sequence of states of the inverter, this requires several basic steps, as follows, determination of the reference voltage vector, determination of the sector, determination of the region, calculation of switching time, calculation of switching sequences, finally, generation of PWM signals. As we know that the three-level inverter has 27 vectors, divided into 24 active vectors including 12 short vectors, 6 medium vectors and 6 long vectors, and three zero vectors, they all converge at the center of the hexagon, as shown in Fig. 6. The hexagonin turn, is divided into 6 sectors each of which has 4 regions, using the predictive control outputs in \(\alpha \beta\) reference frames91:

Figure 6
figure 6

Three-level SVM technique.

The reference voltage vector can be written in \(\alpha \beta\) reference frames, this vector has an amplitude and an angle given as:

$$|v^{*} | = \sqrt {v_{f\alpha }^{2} + v_{f\beta }^{2} } { , }\theta = {\text{atan}} \left( {\frac{{v_{f\beta } }}{{v_{f\alpha } }}} \right)$$
(16)

The reference voltage vector works by scanning all six sectors of the hexagon, so we need to know the sector in which the voltage vector is advancing, as the following equation shows:

$$S_{k} = ceil\left( {\frac{\theta }{{{\pi \mathord{\left/ {\vphantom {\pi 3}} \right. \kern-0pt} 3}}}} \right) \in \{ 1,2,3,4,5,6\}$$
(17)

where, \(ceil\) is function that fits a given real to an adjacent larger whole number.

To determine the region of the voltage vector, we consider sectors (1) shown in Fig. 7, the expected components include at vector voltage \(v_{x}^{*} ,v_{y}^{*} {\text{ and }}v_{{}}^{ * }\) is given by:

$$\begin{gathered} v_{x}^{*} = |v^{*} |\left( {\cos (\theta ) - \frac{1}{\sqrt 3 }\sin (\theta )} \right) \hfill \\ v_{y}^{*} = \frac{\sqrt 3 }{2}|v^{*} |\sin (\theta ) \hfill \\ \end{gathered}$$
(18)
Figure 7
figure 7

Determination of the two distances \(v_{x}^{*} ,v_{y}^{*}\).

Using Eq. (17), all regions can be expressed as follows:

  • \(if \, v_{x}^{*} < 0.5*\sqrt{\frac{2}{3}} .V_{dc} {\text{ and }}v_{y}^{*} < 0.5*\sqrt{\frac{2}{3}} .V_{dc} ,{\text{ and (}}v_{x}^{*} + v_{y}^{*} ) < 0.5*\sqrt{\frac{2}{3}} .V_{dc} ; \, r_{1}\)

  • \(if \, v_{x}^{*} > 0.5*\sqrt{\frac{2}{3}} .V_{dc} {; }r_{2}\)

  • \(if \, v_{x}^{*} < 0.5*\sqrt{\frac{2}{3}} .V_{dc} {\text{ and }}v_{y}^{*} < 0.5*\sqrt{\frac{2}{3}} .V_{dc} ,{\text{ and (}}v_{x}^{*} + v_{y}^{*} ) > 0.5*\sqrt{\frac{2}{3}} .V_{dc} ;r_{3}\)

  • \(if \, v_{y}^{*} > 0.5*\sqrt{\frac{2}{3}} .V_{dc} {; }r_{4}\)

The determination of the switching times is done in the same way in all sectors and differs from one region to another in the same sector, therefore, we will present the technique of calculating the times. The application time adjacent vectors times its duration and that its duration must fill the complete cycle92.

$$\left\{ \begin{gathered} T_{{}} v^{*} = T_{x} V_{1} + T_{y} V_{2} + T_{z} V_{0} \hfill \\ T_{{}} = T_{x} + T_{y} + T_{z} \hfill \\ v^{*} = |v^{*} |e^{j\theta } ,\theta = \angle v^{*} \hfill \\ \end{gathered} \right.$$
(19)

The next step is to identify the states of the switching states and create a switching diagram to control the capacitor voltages. This requires knowledge of phase currents, effects of switching states, and capacitor voltage, many references speak of it, especially93.

DC link voltage control loop by anti-windup PI controller

The role of the DC voltage control loop is to maintain DC voltage at a constant reference value by controlling the Ps flow between the network and the DC bus to decrease variations and instability of the DC bus voltage, Commonly, the PI regulator with anti-windup compensation is designed for its voltage control, as shown in Fig. 8.

Figure 8
figure 8

DC link voltage controller: (a) PI controller and (b) anti-windup-PI controller.

The synthesis of the regulator gains Kp and Ki passes by placing the poles of the closed loop, is given as:

$$G\left( s \right) = \frac{{k_{p} s + k_{i} }}{{C_{eq} .s^{2} + k_{p} .s + k_{i} }}$$
(20)

From (20), we note that the closed loop is a canonical second-order transfer function:

$$R\left( s \right) = \frac{{\omega_{n}^{2} }}{{s^{2} + 2\xi \omega_{n} .s + \omega_{n}^{2} }}$$
(21)

By equalizing (20) and (21) and adopting an optimal damping coefficient, the controller’s gains are given as follows:

$$\left\{ \begin{gathered} k_{p} = 2.C_{eq} .\xi \omega_{n} \hfill \\ k_{i} = C_{eq} .\omega_{n}^{2} \hfill \\ \end{gathered} \right.$$
(22)

\(P_{ref}\) is the Ps reference. It is provided as given below:

$$P_{ref} = i_{dc}^{*} V_{dc}$$
(23)

Synthesis of the SC technique

SC technique is one of the simplest and easy-to-apply nonlinear strategies, especially in the case of complex systems. This strategy is highly efficient in reducing chatter, especially when system parameters change. This strategy has been proposed in several different fields such as control and electronics94,95,96,97. To design SC controller depends on the nonlinear dynamic system SISO of dimension (n) which can be described by the following nonlinear equation:

$$\frac{dx(t)}{{dt}} = f(x,u,t)$$
(24)

in which \(x\) is the state vector of dimension (n). \(u\) the control vector.

The first step in the design of a SC technique lies in the formation of the macro-variables (MVs) define according to the state variables of the system in the form of algebraic relationships between these variables which reflect the characteristics of the design requirements, such as:

$$\sigma = \sigma (x,t)$$
(25)

where,\(\sigma\) is the MV and \(f(\sigma ,t)\) is a user-defined function, usually a function of state variables.

The objective of the SC technique is to force the system to evolve on the domain chosen, where the macro-variable is equal to zero, the properties of a variable can be specified, based on control parameters, such as response time and limitations of the control, is given by95:

$$T\frac{d\sigma }{{dt}} + \sigma = 0;\quad T > 0$$
(26)

in which \(T\) defines the speed of the convergence of MVs towards the intersection of manifolds, \(\dot{\sigma }\) is the derivative of the aggregated MV.

Control depends not only on the state variables of the system, but also on the MV and the time constant \(T\). In other words, the designer can choose the characteristics of the controller by choosing an appropriate MV and a specific time constant \(T\)96.

$$T\frac{d\sigma (x,t)}{{dt}} = \frac{d\sigma }{{dx}}\frac{dx(t)}{{dt}}$$
(27)

The substitution of (Eqs. 24, 26) in (Eq. 27) allows to write:

$$T\frac{d\sigma }{{dt}}f(x,u,t) + \sigma = 0$$
(28)

By solving (Eq. 28) to find the control law \(u\), can be found as following:

$$u = g(x,\sigma (x,t),T,t)$$
(29)

From (Eq. 29) we can see that in the synthesis of the SC technique described above, the SC operates on the nonlinear system and this simplification of the model is not necessary as in conventional theorems.

To ensure that the SC technique law ensures overall stability, this can be ensured using the Lyapunov function which we express as follows95,97:

$$V = \frac{1}{2}\sigma (x,t)^{2}$$
(30)

The derivative of this function, with the use of the equation (Eq. 28) is given by:

$$\frac{dV}{{dt}} = \frac{d\sigma (x,t)}{{dt}}\sigma (x,t) = \frac{ - 1}{T}\sigma (x,t)^{2} < 0\quad if\quad T > 0$$
(31)

From (Eq. 31), we note that the stability of the system is not affected by the nonlinear properties of the model of the system, it is stable as long as \(T\) is greater than zero.

MPPT-SC technique

In this part, a new strategy for the MPPT technique based on the use of SC technique is proposed. This proposed nonlinear MPPT technique is a modification of the MPPT, in which the PI regulator is dispensed with and replaced by a SC technique. The advantage of this new nonlinear MPPT strategy is that it is more robust, easy to implement, easy to program, and provides better results than the traditional strategy.

Based on the PV array characteristic (see Fig. 4), when this last is operating at MPPT, (mathematically)\(V_{PV} \frac{{\partial I_{PV} }}{{\partial V_{PV} }} + I_{PV} = 0\):

Step 1: We define the first macro-variable

$$\sigma_{{V_{PV} }} = V_{PV} \frac{{\partial I_{PV} }}{{\partial V_{PV} }} + I_{PV}$$
(32)

The derivative of these macro-variable:

$$\frac{{d\sigma_{{V_{PV} }} }}{dt} = \left( {2\frac{{\partial I_{PV} }}{{\partial V_{PV} }} + V_{PV} \frac{{\partial^{2} I_{PV} }}{{\partial V_{PV}^{2} }}} \right)\frac{{dV_{PV} }}{dt}$$
(33)

By substituting the equation (Eq. 2) into (Eq. 33), we get:

$$\frac{{d\sigma_{{V_{PV} }} }}{dt} = \frac{1}{{C_{pv} }}\left( {2\frac{{\partial I_{PV} }}{{\partial V_{PV} }} + V_{PV} \frac{{\partial^{2} I_{PV} }}{{\partial V_{PV}^{2} }}} \right)\left( {I_{PV} - I_{L}^{*} } \right)$$
(34)

Upon substituting (Eq. 34) into (Eq. 26), the dynamics become:

$$T_{1} \left( {\frac{1}{{C_{PV} }}\left( {2\frac{{\partial I_{PV} }}{{\partial V_{PV} }} + V_{PV} \frac{{\partial^{2} I_{PV} }}{{\partial V_{PV}^{2} }}} \right)\left( {I_{PV} - I_{L}^{*} } \right)} \right) + \sigma_{{V_{PV} }} = 0$$
(35)

where, \(T_{1}\) > 0 is a positive constant:

The control law is obtained:

$$M = I_{L}^{*} = I_{PV} + \frac{{C_{PV} }}{{T_{1} \left( {2\frac{{\partial I_{PV} }}{{\partial V_{PV} }} + V_{PV} \frac{{\partial^{2} I_{PV} }}{{\partial V_{PV}^{2} }}} \right)}}\sigma_{{V_{PV} }}$$
(36)

Step 2: The second macro-variable are defined by:

$${\sigma_{I_L}} = {I_L} - M$$
(37)

And taking the derivative of the macro variable to apply Eq. (12) we get:

$${\dot \sigma_{I_L}} = {\dot I_{I_L}} - \dot M$$
(38)

By substituting the equation (Eq. 3) into (Eq. 38), we deduced:

$${\dot \sigma_{_{I_L}}} = \frac{1}{L}{V_{PV}} - \frac{1}{L}\left( {1 - D} \right){V_{dc}} - \dot M$$
(39)

The substituting (Eq. 39) into the functional equation (Eq. 26) yields to

$${T_2}\left( {\frac{1}{L}{V_{PV}} - \frac{1}{L}\left( {1 - D} \right){V_{dc}} - \dot M} \right) + {\sigma_{I_L}} = 0$$
(40)

where,\({T_2}\) is positive constant.

The SC technique signal we deduce the duty cycle formula by:

$$\alpha = \frac{1}{{{V_{dc}}}}\left( {{V_{dc}} - {V_{PV}} + L\dot M - \frac{L}{{T_2}}{\sigma_{I_L}}} \right)$$
(41)

Figure 9 illustrates the working principle of the proposed MPPT-SC technique.

Figure 9
figure 9

The MPPT-SC technique of the PV–DC–DC converter.

MPPT-SMC technique

In this section, a second new MPPT strategy based on the use of the SMC strategy is designed. This proposed nonlinear MPPT technique is a modification of the classical MPPT strategy, whereby the PI controller is dispensed with and replaced by the SMC controller. Compared to the classical MPPT-PI technique, the MPPT-SMC technique is robust, highly efficient, inexpensive, easy to implement, easy to program, and provides better results compared to the MPPT technique.

Concerning the MPPT method, the (MPPT-SMC) structure is based on three steps: Choice of the error, the definition of the conditions of existence and convergence of the sliding regime, and determination of the control law98.

To achieve these steps, based on the \(p_{PV} - v_{PV}\) characteristic as shown in (Eq. 3), when the (PVG) operates at the MPPT point.

The SMC technique is based on three steps: Choice of the error, the definition of the conditions of existence and convergence of the sliding regime, and determination of the control law99.

From Fig. 2 and Eq. (2), the error of the PV voltage is defined as:

$$S\left( {V_{PV} } \right) = \left( {V_{PV} \frac{{\partial I_{PV} }}{{\partial V_{PV} }} + I_{PV} } \right)$$
(42)

The derivate surface is expressed:

$$\dot{S}\left( {V_{PV} } \right) = \left( {2\frac{{\partial I_{PV} }}{{\partial V_{PV} }} + V_{PV} \frac{{\partial^{2} I_{PV} }}{{\partial V_{PV}^{2} }}} \right)\frac{{dV_{PV} }}{dt}$$
(43)

The control law has two components, equivalent component \(I_{{_{Leq} }}^{*}\) it conserves sliding surface \(S\left( {V_{PV} } \right) = 0\) and non-linear component \(I_{{_{Ln} }}^{*}\) it keeps the control law constant.

$$I_{{_{L} }}^{*} = I_{{_{Leq} }}^{*} + I_{Ln}^{*}$$
(44)

By replacing Eq. (2) in Eq. (43) and taking the convergence condition \(\dot{S}\left( {V_{PV} } \right) = 0\) we obtained:

$$I_{{_{Leq} }}^{*} = I_{PV}$$
(45)

The choice \(i_{Ln}\) by the following expression:

$$I_{Ln}^{*} = k_{1} \times sign\left( {S\left( {V_{PV} } \right)} \right) = \left\{ \begin{gathered} \begin{array}{*{20}c} {k_{1} } & {S\left( {V_{PV} } \right) > 0} \\ \end{array} \hfill \\ \begin{array}{*{20}c} { - k_{1} } & {S\left( {V_{PV} } \right) < 0} \\ \end{array} \hfill \\ \begin{array}{*{20}c} 0 & {S\left( {V_{PV} } \right) = 0} \\ \end{array} \hfill \\ \end{gathered} \right.$$
(46)

where,\(k_{1}\) are positive gains.

The second sliding surface of the input inductance current is defined by:

$$S\left( {I_{L} } \right) = \left( {I_{L} - I_{L}^{*} } \right)$$
(47)

The derivate of Eq. (47) is expressed by:

$$\dot{S}\left( {I_{L} } \right) = \left( {\dot{I}_{L} - \dot{I}_{L}^{*} } \right)$$
(48)

The control law has two components, equivalent control (\(D_{eq}\)) and non-linear control (\(D_{n}\)):

$$D = D_{eq} + D_{n}$$
(45)

By replacing Eq. (3) in Eq. (49) and taking the convergence condition we obtained:

$$D_{eq} = \frac{L}{{V_{dc} }}\left( {L\dot{I}_{L}^{*} + V_{dc} - V_{PV} } \right)$$
(50)

And the \(D_{n}\) component defined by:

$$D_{n} = k_{2} sign\left( {S\left( {I_{L} } \right)} \right) = \left\{ \begin{gathered} \begin{array}{*{20}c} {k_{2} } & {S\left( {I_{L} } \right) > 0} \\ \end{array} \hfill \\ \begin{array}{*{20}c} { - k_{2} } & {S\left( {I_{L} } \right) < 0} \\ \end{array} \hfill \\ \begin{array}{*{20}c} 0 & {S\left( {I_{L} } \right) = 0} \\ \end{array} \hfill \\ \end{gathered} \right.$$
(51)

where,\(k_{2}\) are positive gains.

Figure 10 illustrates the working principle of the proposed SMC-MPPT technique.

Figure 10
figure 10

MPPT-SMC technique of the PV-DC-DC converter.

Results

To evaluate the performances of the designed system and its control under dynamic and static conditions, a series of simulation tests were carried out using MATLAB. The parameters of the system corresponding to Fig. 2 are detailed in Table 1. To illustrate clearly the performance of the system, a gradient solar irradiance profile was chosen as, during the time interval [0 s, 0.3 s] absence of solar radiation, while from [0.3 s, 0.6 s], the radiation is 750 W/m2, while 350 W/m2 is in the interval [0.6 s, 0.9 s], while 1000 W/m2 the rest of the time, with the non-linear load change at t = 1.2 s and inversely, depicted in Fig. 11.

Table 1 System parameters.
Figure 11
figure 11

Solar irradiation profile.

Figure 12 depicts the PV characteristic across three irradiation levels, illustrating that both the SC and SMC techniques ensure effective MPPT technique across all irradiation levels. However, it is observed that the SC technique maintains the maximum point with less oscillation compared to the SMC technique. Similarly, in Fig. 12, it is evident that the SC technique operates the MPPT technique with reduced oscillation compared to the SMC technique.

Figure 12
figure 12

I–V and P–V curve of PV solar for different irradiation with both MPPT.

Performance comparison of all controllers (SC technique and SMC strategy) is given Fig. 13a–c illustrating the behaviors of PV system output current and voltage, and power with their references in the two nonlinear controllers before and after connecting at the grid at 0.3 s. Before connecting the PV to the grid, the output current and power are equal to zero. The comparison of these behaviors shows that the PV system output current and voltage, power tracking perfectly their references with zero ripple and SSE in the case, and provides dynamic responses, of SC technique(zoom of all points of Fig. 13, it can be observed that the PV system output current and voltage, power overshoot and in all points at the varying irradiation are greatly reduced with very small response time in the case of SC technique based PV system compared to SMC technique, as shown in the zooms). It is also clearly observed in all points and periods that the SC technique rejects all perturbations at the variation of irradiance. The comparative study of overshoot, ripple, and response time based on the simulation results of the two controllers has been achieved and presented in Table 2.

Figure 13
figure 13

Simulation results of the currents, voltage, and power of the PV array for both techniques.

Table 2 A comparative results in terms of the overshoot, response time, voltage ripples, undershoot and tracking accuracy.

One can see almost perfect regulation of the DC bus voltage (see Fig. 14); Before and after connecting the active filter a t = 0.1 s, the dc voltage zero overshoot with only 0.06 s to established at the reference and low ripple about \(\pm\) 0.45. At injected PV system at t = 0.3 s, the MPPT-SC technique strategy is the best control compared to an MPPT-SMC technique from where the total oscillation, and absence phenomenon chattering of the DC bus voltage after injecting PV system.

Figure 14
figure 14

DC link voltage of MVSI.

Figures 15 and 16, illustrated the behaviors of three-phase grid source currents, and the first phase grid source current with correspondent voltage using PDPC-SVM strategy with PLL technique, with the use of two different techniques of tracking the MPP of the PV system, immediately after the active filter connects at t = 0.1 s, the source currents become purely sinusoidal and in phase with the correspondent voltage, at t = 0.3 s connection the PV system. During the time interval [0.3 s, 1.2 s], the source currents remain sinusoidal and in phase with the correspondent voltage, at t = 1.2 s non-linear load change, the source currents remain sinusoidal and in phase opposition with the correspondent voltage with a unity power factor operation in the two control, as well as very small oscillation magnitude and harmonics with better response time in the case of SC technique, compared to the SMC technique. Table 2 gives the numerical values and reduction percentages for both the MPPT-SC technique and the MPPT-SMC technique in terms of voltage ripples, response time, overshoot, and undershoot. Table 2 gives a clear picture of the superiority of the MPPT-SC technique over the MPPT-SMC technique, and this remarkable superiority appears through the calculated reduction ratios, where the MPPT-SC technique reduced all of the voltage ripples, overshoot, response time, and undershoot by percentages estimated at 88.32%, 80%, 41.86%, and 94.89%, respectively, compared to the MPPT-SMC technique. Also, the MPPT-SC technique reduced active and reactive power ripples by rates estimated at 38.46% and 15.30%, respectively, compared to the MPPT-SMC technique. It is also noted that the MPPT-SC strategy has a greater percentage of tracking accuracy compared to the MPPT-SMC strategy, which is a positive thing, as these percentages were estimated at 99.99% and 98.43% for MPPT-SC and MPPT-SMC, respectively.

Figure 15
figure 15

Simulation results of the three-phase grid currents; (a) MPPT-SC technique and (b) MPPT-SMC technique.

Figure 16
figure 16

Simulation results of the first phase voltage and current; (a) MPPT-SC technique and (b) MPPT-SMC technique.

Figure 17 represents the real and imaginary power on the grid side. For both SC technique and SMC technique, one can note that the imaginary power is kept zero with both control strategies confirming the observation made above on the power factor. However, using SC technique offers less variation around zero. Regarding the real power, like the case of DC bus voltage, the dynamic response using SC technique is much better and less ripples, this is shown in the zoom-out in both cases.

Figure 17
figure 17

Grid active and reactive powers; (a) MPPT-SC technique and (b) MPPT-SMC technique.

From Fig. 18, the harmonic spectrums of grid source current using PDPC-SVM technique with PLL technique, before filtration the grid current is distorted and rich harmonics, one can see that, the value of the current THD = 22.61%, after active filter connecting a t = 0.1 s, the grid source current become purely sinusoidal, that is confirmed by the harmonic spectrums in which this THD is minimized to a 0.53%. So the use of the filter led to a decrease in the THD value by an estimated rate of 97.65%, which makes us say that the used filter has a great benefit in improving the quality of the current. Also, the value of the fundamental amplitude (iga) at 50 Hz is larger after filtering, as this value before filtering is 34 A, and after filtering it is 36.46 A. Therefore, the value of fundamental amplitude (iga) has been improved by 2.46 A, which is a value that indicates that there is a noticeable improvement in the quality of the current. On the other hand, after connecting the PV to the grid, this THD is slightly increased to 0.94% with the MPPT-SC technique and MPPT-SMC technique is 1.38% (Fig. 19). Through these values, the MPPT-SC technique reduced THD by 31.88% compared to the MPPT-SMC technique. Accordingly, it can be said that SC technique is better than the SMC technique in this work, and this is confirmed by the work done in Ref.80. However, MPPT-SMC technique provided a better value in terms of the fundamental signal amplitude of iga (11.72 A) compared to the MPPT-SC technique (11.64 A). The main comparisons between the proposed MPPT-SC technique and MPPT-SMC technique regarding the power quality and dynamic performances are summarized in Table 3.

Figure 18
figure 18

THD of grid source current: (a) Before filtration and (b) after filtration.

Figure 19
figure 19

Harmonic spectrum at G = 1000 Wm2: (a) MPPT-SMC and (b) MPPT-SC technique.

Table 3 A comparative results in terms of the current/power quality.

In Table 4, the numerical results for the DC link voltage are given in the case of G = 750, using the two proposed controls. From this table, it is noted that using the PDPC-SVM strategy with MPPT-SC technique gave satisfactory results in terms of response time, ripples, overshoot, and undershoot of DC link voltage compared to the PDPC-SVM strategy with MPPT-SMC technique and this is shown by The reduction rates listed in the table. Therefore, the PDPC-SVM strategy with MPPT-SC technique reduced ripples, response time, undershoot, and overshoot of DC link voltage by percentages estimated at 67.85%, 12%, 9.37%, and 12.56%, respectively, compared to the PDPC-SVM strategy with MPPT-SMC technique. These obtained percentages indicate the satisfactory performance of the PDPC-SVM strategy with MPPT-SC technique in improving the line tension characteristics compared to the PDPC-SVM strategy with MPPT-SMC technique.

Table 4 Quantitative analysis for DC bus voltage.

In Table 5, a comparison is made between the work done in this paper and other existing works in terms of the value of current THD. It is noted that the proposed strategy provided a lower value for THD compared to several existing strategies, which makes the current quality better in the work performed, which is a positive thing that makes the proposed strategy in the future one of the most prominent solutions that can be relied upon in the field of control.

Table 5 Comparison in terms of current THD value.

Conclusions

In this study, the study of solar electric power generation system (PV), filtration using three-level SAPE, and a comparative study between SMC and SC technique applied to the MPPT technique of PV system are dealt with. The filter was controlled using the PDPC-SVM technique using the PLL technique to get better the quality of the current.

The proposed system is simulated, verified, and analyzed. The necessary results were extracted and a detailed analysis of the efficiency of the designed system (PV system + SAPE) was given. Through the simulation and the presented results, the following points were summarized:

  • The THD of the current is better after the filter.

  • MPPT-SC technique has a significant impact on power and current quality significantly, this strategy lowers the current THD compared to the MPPT-SMC technique.

  • The use of a PV system with three-level SAPE greatly reduces network problems and defects.

Moreover, it was observed that in the case of using the MPPT-SC technique PV system the ripples, SSE, and time response are less than in the case of the MPPT-SMC technique under medium and high radiation conditions. It is also concluded that the use of nonlinear strategies provides a distinctive performance of the PV system. Therefore, further studies must be conducted to know the best strategy that has a very high efficiency in improving the current and power quality, and this can be done by combining smart and nonlinear strategies.

Further, as a future work new hybrid strategies with high efficiency can be applied to effectively mitigate power ripples, improve current quality and extract maximum power from PV unit under all different working conditions.