Direct Sliding Mode Control for Dynamic Instabilities in DC-Link Voltage of Standalone Photovoltaic Systems with a Small Capacitor

Large electrolytic capacitors used in grid-connected and stand-alone photovoltaic (PV) applications for power decoupling purposes are unreliable because of their short lifetime. Film capacitors can be used instead of electrolytic capacitors if the energy storage requirement of the power conditioning units (PCUs) is reduced, since they offer better reliability and have a longer lifetime. Film capacitors have a lower capacitance than electrolytic capacitors, causing enormous frequency ripples on the DC-link voltage and affecting the standalone photovoltaic system’s dynamic performance. This research provided novel direct sliding mode controllers (DSMCs) for minimizing DC-link capacitor, regulating various components of the PV/BES system that assists to manage the DC-link voltage with a small capacitor. DSMCs were combined with the perturb and observe (P&O) method for DC boost converters to increase the photovoltaic system’s dynamic performance, and regulate the battery’s bidirectional converter (BDC) to overcome the DC-link voltage instabilities caused via a lower DC-link capacitor. The system is intended to power both AC and DC loads in places without grid connection. The system’s functions are divided into four modes, dependent on energy supply and demand, and the battery’s state of charge. The findings illustrate the controllers’ durability and the system’s outstanding performance. The testing was carried out on the MT real-time control platform NI PXIE-1071 utilizing Hardware-In-The-Loop experiments and MATLAB/Simulink.


Introduction
Renewable energy sources such as solar panels, wind energy, and battery energy storage emerged as feasible options for decreasing carbon emissions and slowing global warming, with the revelation of large and catastrophic global warming consequences on our world [1][2][3][4][5][6]. Solar energy is the most suitable renewable energy for use in buildings. For the integration of renewable solar systems in historic structures and conservation zones, the authors in [7] assessed the risk-benefit strategy specified in EN-16883:2017 [8]. By deleting unsuccessful criteria and adding new, broadly recognized criteria, the standard technique was adapted for solar RES systems. The proposed assessment scale ranges from high risk to high benefit. They covered everything from technical compatibility, to heritage significance of the building and its surroundings, to energy and indoor environmental quality, to impact on the outdoors and usage standards. The proposed assessment scale evaluates renewable energy systems in a different way. The results of this assessment are meant to foster conversation among members of the multidisciplinary team assessing RES solutions, allowing them to explore issues from a variety of angles. satisfy global stability standards. In [27], a feedback linearization technique based on Lyapunov stability theory is offered for addressing the effect of constant-power loads (CPLs) on global stability in a DC microgrid without taking into account real-world uncertainties. As a result, the robustness of the control system is compromised. Michele [28] and Satish et al. [29] extensively explore and apply higher order sliding model control (HOSMC) to MG. This method can help prevent chattering and allow flexible structural control when processing big signals. However, determining the uncertain boundary and minimizing the control system's reliance on the model is difficult, limiting the engineering application of this strategy. To ensure control system stability during load and source variations, a sliding-mode control approach based on a washout filter with hysteresis band (HB) is devised [30,31]. The downsides of this approach include a changeable switching frequency and a high noise sensitivity. To maintain the MG's stability and dynamic performance, Su et al. [32] use adaptive total sliding-mode control (ATSMC). The benefits of SMC in design, as well as its robustness to parameter uncertainty and external disturbances, are clearly demonstrated.
The primary problem in a DC microgrid is to maintain a narrow voltage range on the shared DC-link. As a result, a correct power management strategy [33] between generated and used power levels should be devised. This in turn will assure the microgrid's voltage management and stability of operation. Various control mechanisms are used to accomplish this. Control techniques in the microgrid are primarily aimed at ensuring that (i) new DGs and distributed storage systems (DSSs) can be added or removed without affecting the system; (ii) that variation in the common DC-link voltage is regulated; (iii) that proper power balancing within the microgrid is ensured; and (iv) that stable current sharing between parallel converters is enabled. The two primary control strategies utilized in DC microgrids are centralized control and autonomous distributed control [34]. Centralization of control necessitates communication between all elements and a central controller. However, it reduces system reliability in the event of a communication delay or loss. Additionally, system expandability is harmed, as the inclusion of any additional element increases the controller's complexity. While an autonomous distributed control method [35] should ensure that the system continues to operate well in a range of operating modes without requiring communication between distributed controllers. DC bus signaling (DBS) [36] is an autonomous control approach in which bus voltage is used to determine the DC microgrid's power balance. Despite the fact that it performs satisfactorily, the reference voltage is maintained constant in all modes of operation. As a result, the DSMCs approach is used in our work to manage the DC-link voltage. It operates more efficiently when multiple micro sources are connected in simultaneously. In this method, all photovoltaic boost converters are controlled by the same command to manage the DC-link voltage in the absence of a storage element. This concept is unique to this work. Every potential condition of the system has been considered. To adapt to changing system operating conditions, each converter alternates between multiple operating modes based on the terminal voltage's divergence from the nominal value and its power rating limit.
This article discusses a novel technique for enhancing electricity quality. The primary contribution of this work is the invention and implementation of a photovoltaic/battery energy storage (PV/BES) that provides uninterruptible power supply for local nonlinear loads operating in multimode mode. DSMCs implements MPPT control based on P&O in order to maximize the output of the solar array. Thus, instead of employing a conventional PI controller, DSMCs technology is used to manage and stabilize the DC-link voltage, boost overall system performance, and improve power quality by reducing harmonics in load current. Additionally, all photovoltaic boost converters that do not include storage components are regulated by the similar command used to adjust the DC-link voltage. This is a unique concept that is only used in this paper. Every possible system state has been taken into consideration.
The main advantages of this work are as follows.
• New direct sliding mode controllers (DSMCS) with P&O algorithm are proposed in this study for DC-link voltage stability, which removes the effects of lower DC-link capacitor as well as enhances the photovoltaic system's dynamic performance • The PV/BES is implemented with a BES backup, with a DC-DC bidirectional converter controlling the charging and discharging of the BES (BDC). The BDC with DSMCs eliminated the chance of the BES being overcharged or discharged and improve the dynamic performance of the entire system.

•
Presented a novel technique for controlling various parts of the system that assists in regulating the DC-link voltage in the presence of abrupt load variations and keeps the system operational even when batteries are not available. Additionally, it secures the batteries by only utilizing them when necessary, extending the life of the installation and The BDC with DSMCs was employed to eliminate the possibility of overcharging or discharging the BES. The load profile for the simulation is selected to replicate the many transitions between modes. Extreme weather and load variations put the system to the test. The results demonstrate the effectiveness of the proposed control.

•
The supply and load sides of a single system are used to combine the functions of solar power generation and power quality improvement. As a result, this system has a higher utilization rate than a traditional solar grid-connected system. This paper is organized as follows: Section 2 represents the configuration and operation of the grid-connected hybrid PV/BES system. Sections 3 and 4 address the DC-link capacitor reduced effects and proposed direct sliding mode control (DSMCs) technique, respectively. Section 5 addresses the performance discussion of DSMCs, comparing it with the PI controller. While Sections 6 and 7 present the MATLAB/Simulink results and Hardware-In-the-Loop experiment on the MT real-time control platform NI PXIE-1071, respectively. Section 8 presents the conclusion.

Configuration and Operation of the Grid-Connected Hybrid PV/BES System
Three photovoltaic panels power the system, which is equipped with three direct DC-DC step-up converters, BES with a bidirectional buck-boost converter, DC-AC inverter, resident DC load, and AC load, as shown in Figure 1. The DC-DC step-up converters are the system's most crucial component. Each photovoltaic array is made up of three photovoltaic panels connected in series to create a maximum output power of (810 W) at a maximum voltage of (105 V). The BESs have been set to operate at (48 V). Because connecting a series of batteries can generate an unbalance if one of the components is weaker than the rest, this design was chosen to extend the battery's lifetime. Due to the fact that the batteries will run at the same voltage, they can be connected in parallel. Currents for charging and discharging will be apportioned according to capacity.  The DC-link voltage is set at (V dc−re f = 200 V), taking the battery operating voltage into account and avoiding switching the bidirectional converter at duty cycles between 90% and 10%. As illustrated in Figure 1, BES is used to improve the regulation of the DC-link voltage. It is coupled by a bidirectional buck-boost converter, which regulates the charge/discharge processes under adverse operating situations such as fast variations in solar irradiation, load, and the incidence of faults.

DC-Link Capacitor Reduced Effects
In grid-connected and stand-alone photovoltaic (PV) systems, the DC-link capacitor is the most significant passive component. To smooth DC-link voltage, traditional designs used a set of electrolytic bulk capacitors. A single low-inductance high-frequency film capacitor could be used to replace the electrolytic capacitors, according to a DC-link voltage and current ripple analysis. (1) Size reduction, (2) cost reduction, and (3) reliability enhancement are all significant outcomes. The complete photovoltaic (PV) and inverter can then be incorporated into a grid-connected system using the proposed high power film capacitor, reducing a significant quantity of wires and their associated costs and losses. However, in a high-power grid-connected system, this DC-link capacitor must deal with the following issues: (1) DC-link voltage fluctuation, (2) ripple current due to inverter switching, and (3) overall system dynamic performance concern. As seen in the Figure 2, when a large capacitor is utilized, the DC-link and PV terminal voltages are constant DC, as seen in the waveforms at the bottom of Figure 2. In addition, when a capacitor system is lowered, the DC-link voltage ripples at 120 Hz, resulting in a 120 Hz ripple in the PV terminal voltage and a 180 Hz component in the inverter output voltage, as illustrated in the waveforms at the top of Figure 2. Due to the above-mentioned difficulties due to a reduced DC-link capacitor, the BES was required to adjust the DC-link overvoltage and undervoltage. Linking the batteries straightly to the DC-link stabilizes the system, but it has a significant impact on the battery life. Furthermore, because multiple batteries must be linked in series when the DC-link is set at a high voltage, this structure may generate an unbalance if one of the components is feebler than the rest. As a result, installing a bidirectional buck-boost converter between the batteries and the DC-link allows the system to be more versatile, but also makes voltage regulation difficult. Traditional PID controllers are not robust, and they operate poorly when substantial parameter fluctuations and load disturbances occur. In our system we proposed the direct sliding mode control (DSMCs) to control the bidirectional converter of the battery, to regulate the DC-link voltage to work at its reference voltage, and suppressed the output current ripples as well as control the AC-bus via DC-link voltage, because the ac-bus is greatly reliant on the DC-link voltage. DSMCs is a controller for the various components of the system that aids to adjust the DC-link voltage in contradiction of sudden load variations and maintains the system running even when batteries are not there. It also makes use of DC-DC step-up converters to increase the PV system's dynamic performance. It protects the batteries by only utilizing them when they are needed, extending the installation's lifetime.

Proposed Direct Sliding Mode Control (DSMCs) Technique
The numerous power converters control the system's power flow. In the great majority of converters in use, the current dynamic is far faster than the output voltage dynamic [37]. As seen in Figure 3, to address the control challenge, a cascaded control configuration comprising of two control loops-control loop of both an inner current and an outer voltage-can be used [38]. Current control is often achieved using PWM or hysteresis control, whilst the voltage control is typically accomplished using standard linear control technology [39]. This section introduces a novel current control strategy based on the direct sliding mode control (DSMCs) technique. The next subsections discuss the design and synthesis of various controllers.

The DSMC for Bidirectional Converter (BDC)
Two controllers are required because the bidirectional converter (BDC) that links the batteries to the DC-link can function in either step-down or step-up mode [40,41]. In Figure 4, the commands for the buck and boost controllers are (cmd-4 and cmd-5), respectively. Only one command can be activated depending on the direction of the battery current. The switch controlled by this command is switched off since the other command has been set to 0.The bidirectional converter control's goal in all situations is to set the DC-link voltage V DC to its reference voltage V DC_re f .

The Control Loop of Outer Voltage
The regulation of a DC-link voltage V DC to its desire voltage V DC_re f is accomplished by regulating the control current I DC flowing to the capacitor C DC to its reference current I DC_re f . The voltage control is obtained via the outer voltage loop's PI controller, as seen in Figure 5. It is provided in the frequency domain via: In the time domain, Equation (1) can be expressed as follows using the Inverse Laplace Transform: where (K P ) and (K i ) are parameters of the (PI) controller. Furthermore, by applying Kirchhoff's current law, we obtain: where I PV1_DC , I PV2_DC , I PV3_DC , and I B_DC are the PV boost converters output currents and the current of the battery bidirectional converter, respectively. Due to the discontinuous characteristics of the boost output current, it is hard to estimate its mean value in practice. Due to the existence of the inductor, the input current, on the other hand, has a continuous form and can thus be monitored and used in regulatory loops. By using the power conservation equation P I N = P OUT , the output current is calculated from the input current. The loss of power is not taken into account. Equation (3) is written as follows: (4) then, All photovoltaic and load currents are considered disturbances in Equation (5). I DC is only regulated to its reference using the battery current I B . Equation (5) can be rewritten as follows: I DC_re f : Subsequently,

. The Control Loop Inner Current
A DSMCs is used to rapidly stabilize the battery current around the goal value achieved via the outer voltage loop. The DSMC's resilience against system parameter changes further justifies this decision. According to the controller under investigation, the following proposition is made.
The following equation is the selection of the switching function: For the operation of the buck mode: And for the operation of the boost mode: In the sliding mode control offered by Equations (9) and (10), the current of the battery gets the target value in a finite time. As well as the DC-link voltage gets its reference value.
Proof. Both buck and boost modes must satisfy the sliding criterion s . s < 0 for sliding mode SM to occur in the manifold s = I B_re f − I B = 0.
By providing a dynamic representation of the battery current in the buck mode: Taking into consideration Equation (9), u cmd_4 = 0 when s > 0, and Equation (8) is used: when s < 0, u cmd_4 = 1 and As a result, s = 0 (sliding surface) is appealing during a finite time. By providing a dynamic representation of the battery current in boost mode: Taking into consideration Equation (10), u cmd_5 = 0 when s < 0, and Equation (8) is used: Electronics 2022, 11, 133 9 of 23 when s > 0, u cmd_5 = 1 and As a result, s = 0 (sliding surface) is attractive for a finite time.
Based on the foregoing calculations, the battery current will get its target value I B_re f in a finite period that is dependent on the beginning condition in both modes. Only one command may be sent while in active mode. The other command has a value of 0.

The DSMC for PV Boost Converters
Three controllers are required to make all the PV boost converters work with maximum power point tracking (MPPT). Each boost has its own controller, which is substituted by another controller when it comes time to manage the DC-link voltage. Figure 6 illustrates the boost converters utilized in each photovoltaic array.

Maximum Power Point Tracking Method
The maximum power point tracking (MPPT) method can be utilized with a variety of MPPT algorithms. In this investigation, the P&O technique was used to track the maximum power point. The algorithm's simplicity and effectiveness support this judgment. A flowchart summarizing the perturb and observe method phases can be seen in [42,43].

The Controller of Dc-Link Voltage
All photovoltaic step-up converters turn to stabilize the DC-link voltage when the battery bank is unplugged, and a single sliding mode controller is used. As seen in Figures 7  and 8, this controller resembles a bidirectional converter in appearance. The photovoltaic boost converters' overall power output is regulated by two cascaded control loops: an exterior voltage control loop and an internal power control loop.   (1) Control loop of the outer voltage.
By utilizing the power conservation connection, we get PV powers P PV1 , P PV2 , and P PV3 are employed as controller components for the dc-bus power P DC in this controller ( Figure 8).
Set P DC to its reference P DC_re f . Equation (18) turns into.
P PV_re f = P DC_re f + P Load (19) or where I DC_re f is determined by the outer voltage loop of proportional-integral (PI) controller. It is provided by in the frequency domain in the following equation: In the time domain, Equation (21) can be expressed as follows using the inverse Laplace transform: where (K P ) and (K i ) are the parameters of the PI controller.
(2) Control loop of the inner power.
A DSMCs is also used to offer quick PV power stabilization around the target value acquired via the outer voltage loop as seen in Figure 8. The following proposition is made by the controller under examination.

Proposition 2.
The switching function is provided as follow: At the moment, simply Equation (9) controls all photovoltaic converters. The total photovoltaic power generated will get the requisite level in a limited length of time, and also the DC-link voltage will likewise reach the required level.
All boost controllers for photovoltaic systems must provide the following features: Proof. The demonstration of the aforementioned sliding surface s = P PV_re f − P PV = 0 attractiveness is identical in boost mode of the bidirectional converter (BDC).
Under changing climatic conditions, each PV array's power characteristics may take on different shapes, and their sum may cause the shape distortion of photovoltaic characteristics. The voltage used by all PV arrays is the same V PV = V PV1 = V PV2 = V PV3 when the PV DC-DC step-up converters are controlled by a single command, as seen in Figures 7 and 8, but they generate various powers P PV1 , P PV2 , and P PV3 . In this approach, the PV arrays are viewed as a single PV producer, operating at a voltage of P PV and producing a power of P PV = P PV1 + P PV2 + P PV3 . The latter must be equal to the P PV_re f intended power. The novel technique of using a single command for all photovoltaic step-up converters increases the system's efficiency. Under conditions of significant load variation, the duty cycle will fluctuate continuously to meet the load power demand, a situation in which boost converters perform exceptionally well. This technique addresses an issue that may develop in the system discussed in [44] when PV DC-DC step-up converters are operated distinctively and inversely in the similar mode.

Inverter Control
To supply AC loads, we employed a simple common 3-ph inverter with LC filter in our system. In terms of stability, the AC-bus is greatly reliant on the DC-link voltage. The waveforms of AC voltage and current show how excellent or terrible the AC-bus is.

Performance Discussion
The dynamic resistance of a single-stage grid-connected system voltage source control (VSC) with a low DC-link capacitance was investigated in [17]. The conventional singlestage model, on the other hand, is insufficient because it only contains three states. Furthermore, the step-up transformer, direct current cables, grid stiffness, phase-locked loop (PLL), and AC voltage regulation dynamics are not included in the dynamic model. Furthermore, no solution or mitigation strategy has been offered to improve the single-stage system's stability and permit the integration of solar generators with lower DC-link capacitance.
DSMCs is used in this work because its changeable structure corresponds to the characteristics of the converter. The switching frequency variation and chattering phenomena, on the other hand, are two significant properties of DSMCs. The DSMCs and P&O can be used to successfully solve the chattering problem. There are two techniques for concurrently overcoming the flaws of variable switching frequency and taking use of DSMCs. To fix switching frequency, one option is to install an additional hardware circuit. Obviously, this method will increase system costs and is incompatible with distributed generators and loads' scalability and plug-and-play capabilities in DC microgrid. Alternatively, DSMCs can be combined with other methods of control.
In this work, the proposed converter allows the use of small DC-link capacitors in stand-alone PV/BES systems; therefore, using a thin film capacitor instead of an electrolytic capacitor can improve the reliability of the system. The converter also realizes low-frequency ripple free maximum power point tracking (MPPT) based on sliding mode control. Firstly, a DC-link voltage synchronization control is devised to mitigate the effect of capacitance decrease. Then, a thorough design of a power mitigation control is proposed that is based on the DSMC-BDC dynamic model to prevent the DC-link from propagat-ing substantial low-frequency voltage changes to the photovoltaic side. In addition, a new P&O-DSMC-algorithm is suggested, which not only ensures the high efficiency of MPPT, but also ensures the fast maximum power extraction under rapid irradiation and load changes.
A bidirectional buck-boost converter is connected to the DC-link, and an DSMCs control technique is created such that the buck-boost converter may bypass the harmonic current instantly, preventing harmonic current from flowing into the DC-link capacitor and load. The voltage ripples can be significantly decreased since the harmonic current is bypassed instantly. To filter out the high-frequency switching harmonics created by the extra current compensator, only a film capacitor is required in general. The voltage ripples problem is then transformed into instantaneous current tracking. Because of the well-known repetitive control approach DSMC's great performance in tracking periodic signals, a repetitive controller for instantaneous harmonic current compensation with a set switching frequency has been devised. Although the proposed technology is intended for rectifiers, it can easily be applied to inverters and fuel cell and battery-powered devices.
Finally, it can be concluded that employing thin film capacitors at the DC-link with a standard PI controller is unfeasible. DSMCs filter is used in the bus control system to prevent double frequency ripples from propagating to the output current control system, lowering the THD of the output current. DSMCs is suggested in this study to reduce dc-link voltage overshoot and undershoot. As a result, as compared to the traditional way of employing a PI controller, this method helps reduce overshoot, undershoot, and THD values.

Simulation Results and Discussions
The integration of the PV and battery connected system is simulated in MATLAB/Simulink using Simscape power systems toolbox, which estimate the performance of the control strategy upon the proposed grid-tied PV solar system connected to battery storage system.

Battery Discharging with a Lack of Energy
Batteries are used to bridge the gap or supply the entire load during off-peak hours, when solar energy output is much less than the local load requirement. By regulating the power flowing from the BES, the battery's BDC adjusts the DC-link voltage. The battery bank's voltage (48 V) is increased to match that of the DC-link (200 V). All solar photovoltaic step-up converters employ maximum power point tracking method. An inverter is designed to power only AC current loads.

Battery Charging with the Surplus of Energy
Excess photovoltaic electricity is used to charge the battery when it exceeds local load requirements. In this way, the battery BDC controls the DC-link voltage. The DC-link voltage lowers to the BES voltage. In photovoltaic arrays, all DC step-up converters track MPP. The inverter powers AC loads.

The Absence of Batteries with Lack of Energy
All loads are disconnected once the batteries have been discharged. After the PV generator has charged the batteries to a specific level, the loads can be reconnected. The battery bidirectional converter controls the power flow from or to batteries in both cases, regulating the DC-link voltage. MPPT is compatible with all PV arrays converters. This mode can be considering with mode two.

The Absence of Batteries with Surplus of Energy
When the BES is entirely charged, the bidirectional DC-DC converter on the battery is unable to protect it from overcharging. No MPPT step-up converters can operate in this mode because the solar generator's maximum power output exceeds the local load demand. In reality, DC-link regulation is the responsibility of a single regulator. The goal of shifting to DC-link regulation for all boost converters is to minimize duty cycle variations while maintaining high boost converter efficiency.

The Load Variation Scenario with Radiations Changes
In this section the control strategy was tested under load variations, as seen in Figure 9a, and all the PV systems had different solar radiation conditions: first module-1000 W/m 2 , second module-800 W/m 2 , third module-600 W/m 2 , as seen in Figure 1. and mode four has one patch, which is (0.0312-0.12). It is worth noting that mode three can occur through mode two, as it depicts a serious circumstance in mode two. Additionally, the ten patches are given below: (t 0 = 0 s, t 1 = 0.009094 s, t 2 = 0.020448 s, t 3 = 0.0312 s, t 4 = 0.12 s, t 5 = 0.124454 s, t 6 = 0.142 s, t 7 = 0.157082 s, t 8 = 0.17082 s, t 9 = 0.1843 s, t 10 = 0.3 s).

PI Controller
With this method, the PI controller is modeled with a small capacitor (10 µF) for the DC-link and a high sample rate of the DC-link controller. Figure 10 shows the reactions when the DC-link capacitor is 10 µF. In this circumstance, the gains of the PI controller are selected to be p = 0.06 and I = 1.3. In addition, the DC-link voltage overshoots and the overshoots are 0.75 and 2.2 V, respectively.

DSMC Techniques
The DSMCs controller is modeled with a small capacitor (10 µF) for the DC-link and a high sampling rate for the DC-link controller. Figure 10 shows the reactions for the case that the DC-link capacitor is 10 µF. In this circumstance, the DSMCs controller reacts well by regulating the intermediate circuit voltage better than the PI controller. In addition, the overshoots of the DC-link voltage are 0.2 and 0.3 V, respectively.
The load pattern used to examine the control strategy's robustness is shown in Figure 9a. The pattern is designed to demonstrate all probable switches between modes. The AC load begins at time (0.015 s), as seen in Figure 9b,c, and the load current curve is seen in Figure 9a. When we look at the AC amounts, such as current and voltage, we can see that the AC-bus is completely reliant on the DC-link, which performs admirably. The photovoltaic system considers all AC and DC loads to be a single load or disturbance.
Due to the lack of load at the begin, the PV arrays charge the batteries until approximately time equal to (0.01 s mode two). Each MPPT-enabled photovoltaic array controller begins by identifying the MPP of the PV arrays. When they get the MPP, they preserve the maximum rate of power generation. As illustrated in Figure 1, photovoltaic arrays are visible to a range of radiations, which has a direct effect on their maximum power output. The maximum power, voltage, and current are generated by the first photovoltaic array depicted in Figure 11, the second photovoltaic array and the third photovoltaic array have similar curves but distinct values. Because the whole amount of energy generated is used to charge the batteries, as demonstrated in Figure 12, the BES controller runs in step-down mode, guaranteeing that the DC-link voltage remains constant, as illustrated in Figure 10, which reflects the desired voltage to be regulated. All observable peaks in the DC-link voltage curve are the result of abrupt switching of one or more power supplies or DC/AC loads. At approximately t = 0.01 s, the system moves to mode one, resulting in an unexpectedly large current demand, as illustrated in Figure 9a. Due to the fact that the solar energy generated is insufficient to meet the local load requirement, the batteries are used to compensate, and the BES converter switches from step-down to step-up mode, as depicted in Figure 12. As is readily apparent, the battery boost controller's dynamic response to variations in load power is extremely fast at the moment, with only a (0.5 V) (0.25%) shift in the DC-link voltage. The photovoltaic system converters continue to operate using MPPT. We observe that the abrupt increase in local load has no influence on the controllers of any photovoltaic arrays.
When the time gets to 0.02 s, the load demand rapidly falls below the amount of PV energy produced, and the system switches to mode two. Excess energy is used to refuel the batteries. When the load changes abruptly, as seen in Figure 12, the BES back regulator exhibits a great and unusually fast dynamic behavior in the DC-link voltage. We see a variation of only (0.2 V) (0.1%). The controllers for the photovoltaic arrays remain in MPPT mode and are unaffected by the load shift.
Throughout the simulation (after time = 0.12 s), the system alternates between modes one and two in response to the power imbalance between load demand and generated power. To determine the capacity of the control system, abrupt and severe load fluctuations are applied. The most notable fluctuation happens when the current load reaches a high of around 50 A. The magnitude of the variation is 2 V and is less than 1% of the DC-link voltage value, confirming the controllers' excellent enactment. The photovoltaic array controllers are unaffected by load variations and exhibit excellent resilience in their presence.
We tried the BES overcharge threshold in order to get the system to run in mode four due to the time necessary to charge the batteries in simulation. As illustrated in Figure 12, the battery converter is unplugged between t = 0.03 s and t = 0.12 s. During this time period, a single DSMCs will regulate the PV array converters. As a result of the switch from maximum power point tracking to DC-link voltage regulation, no maximum power will be given. We can determine how resilient the PV array controller is to load changes by examining the DC-link voltage curve over this time period. The highest fluctuation occurs at the time of mode switching and all subsequent fluctuations have a negligible effect.

The Radiations Changes Scenarios with Constant Load
Another random radiations changes scenario (Figure 13a) is used to verify the control strategy's robustness in Figures 13-16. The PV arrays are exposed to the same but variable irradiation during this time. The DC-link voltage stays steady despite irradiance variations, with only minor fluctuations due to abrupt and violent radiation changes.    As demonstrated above, the control and power management system employing sliding mode control for hybrid PV/BES, with both DC and AC loads in standalone photovoltaic systems, is capable of managing power flows in the converters of all units flexibly and effectively, and ultimately achieving power balance between the hybrid microgrid system and the AC load. Additionally, DSMCs assures the system's reliability of power supply when PV power fluctuates due to unpredictable irradiance and demand, or when the battery is unavailable. Additionally, this enables the system to accommodate higher loads without the need for additional converters, lowering operation and control expenses. Finally, the effort will seek to identify a viable DSMCs solution for stabilizing the DC-link voltage and minimizing power loss in photovoltaic production due to PV voltage ripple with a lowered DC-link capacitor in the DC-link voltage, as well as improving the overall system's dynamic performance.

Hardware-in-the-Loop Experimental Results and Analysis
The experiment platform is created to validate the proposed sliding mode control method's effectiveness. The control mechanism is implemented using the National Instruments PXIE-1071. As illustrated in Figure 17, the NI PXIE-1071 primarily performs hardware-in-the-loop simulation using HIL software. The system's power circuit is implemented using an NI PXIE-1071 FPGA board. The sampling and control circuit is translated to C code using the NI standard C language code generation tool in Simulink and then loaded into the NI PXIE-1071 control board. The power analyzer displays the experimental findings via an external port board attached to a number of ports defined within the NI PXIE-1071.
To validate the suggested control scheme and model's performance under various operating situations, and demonstrate the state of the different voltages, currents, power states, and harmonics of the system's components, two alternative scenarios were constructed. The first displaying the system's dynamics and control performance under varied load situations and the second showing the different partial shading conditions with constant load. The total harmonic distortion (THD) of the DC-link voltage capacitor has been removed, as illustrated in Figure 18. It is a very essential component of power quality related to grid rules as well as the load's nominal frequency design. Even if the system is independent, providing high power quality to the user is critical.  To validate the suggested control scheme and model's performance under various operating situations, and demonstrate the state of the different voltages, currents, power states, and harmonics of the system's components, two alternative scenarios were constructed. The first displaying the system's dynamics and control performance under varied load situations and the second showing the different partial shading conditions with constant load. The total harmonic distortion (THD) of the DC-link voltage capacitor has been removed, as illustrated in Figure 18. It is a very essential component of power quality related to grid rules as well as the load's nominal frequency design. Even if the system is independent, providing high power quality to the user is critical.

The Experiment Results under Load Variation Scenario with Radiations Changes
The power, current, and voltage variations of various parts of the system during the experiment time under load fluctuation scenario with radiations changes are illustrated in the following curves (Figures 18-21).    is month).

The Experiment Results under Load Variation Scenario with Radiations Changes
The power, current, and voltage variations of various parts of the system during the experiment time under load fluctuation scenario with radiations changes are illustrated in the following curves (Figures 18-21).

The Experiment Results under the Radiation Changes Scenarios with Constant Load
The experimental results in the above demonstrated the effectiveness of the proposed method and its influence on the stability of the system under the condition of load and radiation changes, as well as the good harmonic suppression performance (Figures 22-25).

The Experiment Results under the Radiation Changes Scenarios with Constant Load
The experimental results in the above demonstrated the effectiveness of the proposed method and its influence on the stability of the system under the condition of load and radiation changes, as well as the good harmonic suppression performance (Figures 22-25).    is month).

The Experiment Results under the Radiation Changes Scenarios with Constant Load
The experimental results in the above demonstrated the effectiveness of the proposed method and its influence on the stability of the system under the condition of load and radiation changes, as well as the good harmonic suppression performance (Figures 22-25).

Conclusions
This study offered comprehensive modeling and a novel control strategy for PV/BES grid-connected system with both AC and DC loads. In a range of operating circumstances   is month).

Conclusions
This study offered comprehensive modeling and a novel control strategy for PV/BES grid-connected system with both AC and DC loads. In a range of operating circumstances such as load and radiation changes, the dynamic performance of system is investigated. Reduced dc-link capacitance is shown to have an effect on the dynamic stability of the entire system via interactions with the solar array's dynamic resistance. All possible scenarios were considered. Each controller in the system used direct sliding mode control to modify and stabilize the dc-link voltage while keeping the dc-link capacitance as low as possible. The duty cycle of the MPPT was determined using both the P&O and SMC methods. Without batteries, the concept of employing photovoltaic panels to control the dc-link voltage significantly improved the system. Additionally, the direct sliding mode control described here offers the following benefits: (1) It is effective and can be easily used to overcome the problems of using a small dc-link capacitor in the PV/BES gridconnected system, such as the output current ripples and overvoltage and undervoltage of the dc-link voltage; (2) it has no effect on the steady-state operation of the VSC gridconnected photovoltaic system; (3) it improves the dynamic performance of the dc-link voltage and provides robust and stable performance under a variety of photovoltaic system operating conditions and load variations, better than the PI controller; and (4) it allows for the transmission of low voltage ripples in a variety of operational conditions. Finally, the described control approaches ensure that the power balance between the various distributed resources in a PV/BES grid-connected system remains stable under extreme conditions. The operation of a low voltage a PV/BES grid-connected system is validated in various operating modes on the MT real-time control platform NI PXIE-1071 using Hardware-In-the-Loop experiments and Matlab/Simulink.