Experimental Validation of Zero Crossing Detection Sinusoidal Pulse Width Modulation for Grid Synchronised Inverters in Renewable Energy Systems

Original scientific paper

Journal of Sustainable Development of Energy, Water and Environment Systems
Volume 14, Issue 1, March 2026, 1130646
DOI: https://doi.org/10.13044/j.sdewes.d13.0646
Saloua Yahyaoui , Jalal Blaacha, Sanae Dahbi, Abdelhak Aziz, Abdelhafid Messaoudi
Mohamed First University Oujda, Oujda, Morocco

Abstract

This article presents a synchronization control of a sinusoidal voltage from a single-phase inverter powered by a photovoltaic chain, with the sinusoidal voltage of the electrical network. The control is based on the principle of a phase-locked loop. This elaborate control does not necessarily use the blocks of a phase-locked loop, but it exploits its fundamental condition of constant phase difference and also the only resulting consequence that manifests itself in the frequency equality between the inverter voltage and the electrical network voltage.  The voltage at the output of the inverter is synthesized from the sinusoidal voltage of the electrical network according to a succession of simultaneous operations performed on this sine wave.  Indeed, the sine wave of the network is made accessible for measurement by control electronics. Then, a shaping (square signal) of the sine wave is carried out by zero comparison; the comparator changes state at each zero-crossing detection of the sine wave. On each rising edge of the square signal, a train of width-modulated pulses is started which controls the single-phase inverter by the sinusoidal pulse width modulation control which synthesizes the signal with the same frequency as the network. The algorithm of this command is implemented in an 8-bit microcontroller. An inverter from the photovoltaic chain developed in the laboratory was tested at the standard grid frequency (50 Hz) and at other frequencies (50 Hz to 80 Hz) to evaluate the system’s ability to track frequency variations that may occur in practice due to grid disturbances. The manufactured inverter, equipped with the proposed phase-locked loop, successfully follows the electrical network. The steady-state frequency and phase errors remain below 1%, and the synchronization loop is established within 25 ms. The experimental results confirm the synchronization of the inverter to the power grid over a wide frequency range. Compared to classical synchronization techniques, often more complex to develop, the proposed phase-locked loop is a simple approach and suitable for implementation on standard microcontrollers controlling photovoltaic inverters under rapidly changing operating conditions.

Keywords: Grid synchronisation, renewable energy,zero Crossing Detector,phase-Locked Loop,inverter,SPWM .

Creative Commons License
Views (in 2026): 567 | Downloads (in 2026): 173
Total views: 876 | Total downloads: 308
Introduction

The increasing use of renewable energy sources, in particular photovoltaic (PV) systems, is an essential solution to reduce greenhouse gas emissions and ensure sustainable electricity production [1]. However, the large-scale integration of these systems into power grids raises several planning, operational and management challenges [2]. Microgrids and distributed generation systems require reliable power electronic interfaces, such as DC-DC converters to regulate the power from PV panels [3], and the inverters to convert this energy into grid-compatible alternating current [4].

Inverters play a crucial role in the quality of injected energy [5]. They use pulse width modulation (PWM) techniques to control the output voltage and frequency by modulating signals applied to power switches [6]. There are two different strategies for modulation : unipolar modulation, which is characterised by low switching losses and reduced harmonic noise [7], and bipolar modulation, simpler but produced more losses and harmonics [8]. In order to further improve signal quality, advanced techniques are frequently employed such as spatial vector modulation (SVPWM) and sinusoidal modulation (SPWM) are widely used [9], [10].

The frequency, phase, and amplitude of the inverter output signal must be precisely synchronised with the network while maintaining the total harmonic distortion (THD) low in order to satisfy grid integration standards [11]. A proper sine wave at the inverter’s output similar to that of the electrical grid’s characteristics is ensured by the two signals being synchronised.

Phase-locked loop (PLL) is the most commonly used method for synchronizing inverters with the network [12]. This allows the inverter to produce an output voltage with a frequency equal to the network's frequency and a constant phase difference. The significant problem with PLLs is the locking area (frequency range) and achieving a fast loop response time. Apart from these two conditions (locking and fast detection), the PLL remains sensitive to perturbations and transient variations and can diverge. To overcome these limitations, many variations have been developed over the past 20 years.

Golestan et al. [13] introduced SOGI-FLL (Second-Order Generalized Integrator – Frequency Locked Loop), while Zhang et al. [14] enhanced SOGI-PLL to improve distortion rejection. Ranjan et al. [15] proposed the DSOGI-PLL, effective in unbalanced networks. Liu et al. [16] studied the SRF-PLL, widely adopted but sensitive to continuous shifts. Ortega and Milano [17] compared several variants (Lag-PLL, LPF-PLL [18], MAF-PLL [19]) and highlighted their respective compromises. The E-PLL [15] was designed to improve stability under too severe conditions. More recently, Prakash et al. [20] proposed an improved version of the SOGI-PLL with better disturbance rejection capability.

Despite their efficiency, these advanced approaches often require complex mathematical calculations and high-performance processors (DSP, FPGA), which limits their adoption in low-cost systems [14]–[20]. Therefore, the development of simple, robust and cost-effective synchronization techniques remains an open research need.

This work is part of the framework to propose a synchronization strategy for single-phase PV inverters, based on zero crossing detection (ZCD) [21] combined with SPWM [9].

Unlike classical PLL methods, this work adopts a path that involves only a zero-crossing detector (zero comparator) to obtain a square-wave signal of the same frequency as the grid. An 8-bit, general-purpose microcontroller then receives this sinusoid-shaped square-wave signal and generates the SPWM control used to drive a single-phase PV inverter.

This work is organized by designing a PV system that joins a 180 W peak power PV panel to a single-phase H-bridge inverter via a power adaptation structure. The purpose of this design is to:

Synthesize a sinusoidal waveform, at the output of the inverter charged by resistive load, with the same characteristics as those of the electrical network (same frequency and phase and same amplitude) by applying the ZCD synchronization technique with the SPWM.

Transfer the power, which exceeds the needs of the load, by redirecting it to the adaptation stage upstream from the inverter, towards an electrolyser that absorbs any excess power delivered by the PV generator and transforms it into hydrogen gas production through water electrolysis phenomenon.

The rest of this article is organized as follows: section 2 presents the system architecture and the design of the inverter used. Section 3 describes the proposed synchronisation strategy detailing the SPWM control and ZCD. Section 4 reports and discusses experimental validation. Finally, section 5 summarizes the conclusions and proposes future research perspectives.

Proposed System

The proposed system aims to maintain grid compatibility while ensuring effective energy management between the PV generator, electrolyser, and inverter The following section describes the system structure in detail, with particular focus on the inverter design used for synchronisation with electrical grid.

System in Blocks

Figure 1 illustrates the full architecture of a PV chain that is intended to produce a sinusoidal waveform at its final output with properties similar to those of the single-phase electrical grid. The chain consists of:

  • A PV panel producing 180 W under standard test conditions (1000 W/m2 and 25 °C).

  • An adaptation block composed of:

    • A Buck DC/DC converter, previously designed and dimensioned to operate at 100 kHz. This converter is equipped with a local MPPT control of the Perturb and Observe (P&O) type [22], [23], which maximizes the PV power and transfers it to the total system load. The total load consists of the inverter’s final load and an auxiliary load represented by an electrolyzer that generates hydrogen gas. The electrolyzer has the ability to tolerate voltage and current fluctuations across its terminals without affecting its operation, thereby consuming the surplus energy exceeding the inverter’s needs to produce hydrogen.

    • A Boost converter, connected between the electrolyzer and the inverter. This regulation stage specifically ensures a stable voltage at the inverter input [24], allowing it to generate an AC output with an effective value slightly higher than that of the grid voltage.

  • An inverter stage that converts the DC power into AC power meeting the nominal voltage and current requirements of the load. The inverter is supplied by the DC bus regulated at 24 V and is controlled by a SPWM control, producing an alternating signal which, after LC filtering, becomes a clean sinusoidal waveform matching the grid in amplitude, frequency, and phase. This stage constitutes the main focus of this work.

Block diagram of a PV system synchronised to the grid by the PLL

The main advantage of this inverter structure lies in its nested dual-control mechanism: the PWM command is fully embedded within a square-wave signal derived from the grid’s sinusoidal voltage. The PWM switching sequence begins only when the control unit receives the rising edge of this square-wave signal. This design enables a simple and flexible synchronization method, as the synthesis of the sinusoidal inverter output starts simultaneously with the detection and shaping of the grid waveform without requiring a feedback delay. Consequently, the inverter output follows the grid sinusoid in both frequency and phase without a conventional feedback loop that could slow down the system response.

The ZCD-based PLL developed in this work differs fundamentally from conventional PLLs in terms of internal structure but ultimately fulfils the same purpose: ensuring continuous tracking of the grid’s frequency and phase for proper inverter synchronization.

Inverter Design

PV systems convert solar energy into DC, typically at low voltage, while most electrical devices operate on AC at 230 V or 110 V. PV inverters therefore play a crucial role by transforming the DC power generated by PV panels into AC power, enabling its injection into the electrical grid or its use to supply various electrical appliances and machines.

Figure 2 shows the electrical schematic of the full-bridge inverter used in this design, consisting of four MOSFET switches labelled S1, S2, S3, and S4. The inverter input is supplied by the DC bus from the PV chain, while its output generates an alternating current intended either to feed an AC load or to be injected into the grid. The gates of the MOSFET transistors (switches) are driven by PWM signals modulated using a square-wave signal derived from the grid sinusoid (a pulse train embedded within a square waveform).

Full H-bridge inverter

The switching frequency was set to 500 Hz to minimize current ripples and obtain a regularly sinusoidal waveform.

A galvanic isolation was implemented between the control and power sections using optocouplers and gate drivers (A2211, IR2113) to protect the control circuitry from overvoltage and faults originating in the power stage. This configuration also enhances the operational safety and reliability of the overall system.

Synthesis of the Zero-Crossing Detection Phase-Locked Loop

A control strategy based on a ZCD-PLL-SPWM has been developed in order to achieve reliable grid synchronisation. This section describes the principle of the proposed method and its implementation within the inverter control structure.

Principle of the Zero-Crossing Detection Method

The developed synchronization strategy is based on the synthesis of a simplified PLL, which differs from conventional architectures. Unlike traditional PLLs composed of a phase detector, a low-pass filter, an oscillator, and a feedback loop, the proposed version combines a ZCD circuit, a simple comparator of the grid sinusoidal voltage at 0 V, providing a square-wave signal at the same frequency as the grid, and a SPWM circuit derived from the grid waveform. The square-wave signal is then sent to an 8-bit Arduino microcontroller for further processing and control.

Sinusoidal Pulse Width Modulation Control for the Inverter

The SPWM is used for inverter control. This section presents the principle of the method as well as the steps for its digital implementation on an Arduino Uno microcontroller, indicating the main control parameters ensuring stable operation and correct synchronization with the grid.

Principle of the algorithm

The code controls the switches of the full-bridge inverter by generating two PWM signals phase-shifted by 180. The flowchart in Figure 3 summarises the main steps of the process.

Implemented algorithm of the SPWM for the H-bridge inverter

By using this equation to determine the duty cycle values from the sine function, the reference wave is produced:

dutycyclei=( 1+sin 2πi n ) TOP 2 +0.5

where are: I the table index (0 to n−1), n - number of samples per period, and TOP maximum value of the Timer counter.

The PWM frequency is determined by the configuration of the ICR1 register from the following equation:

TOP= F CPU f PWM 1

where FCPU =16 MHz: clock frequency of the microcontroller.

Therefore, the PWM frequency can be written as:

f PWM = F CPU TOP+1

The second PWM signal starts at halfway through the sine table. Thus, to achieve a 180° phase shift, the following equation is used:

j= n 2 +i

The AC output voltage is determined by the difference between the two PWM signals for i and j variables:

V AC (t)= V DC ( dutycyle i (t) dutycyle j (t))
Control Parameters and Implementation

The digital implementation of the SPWM control was carried out on an Arduino Uno microcontroller, setting the main control parameters summarized in Table 1. These parameters include the fundamental frequency of the grid, the PWM switching frequency, the number of samples per period, the duty cycle calculation as well as the phase shift between the PWM signals.

Control parameters used in the implementation

Parameter

Value

Description

Fundamental signal frequency (fsignal)

50 Hz (nominal)

Reference grid frequency

PWM frequency (fPWM)

500 Hz

Switching frequency used for validation

Samples per period (n)

50

Discretisation of sinusoidal reference

Duty cycle i

Eq. (1)

Computed per sample, scaled to TOP = 31,999

Phase shift

180°

Between the two complementary PWM signals

This method, implemented using a microcontroller, offers the following advantages:

SPWM enables the generation of output voltages that closely resemble a sinusoidal waveform, with reduced harmonic distortion, thereby significantly improving signal quality. It is easy to implement on widely available microcontrollers and microprocessors, such as the ATmega328P used in the Arduino board.

SPWM is well suited for controlling the switches of a full-bridge (H-bridge) inverter, as the two complementary PWM signals ensure diagonal switch control and prevent simultaneous operation of switches on the same leg.

Microcontroller-Based Implementation of the Synchronisation Technique

The implementation of the ZCD-PLL within the microcontroller represents a key stage in achieving precise and stable synchronisation between the inverter and the electrical grid. This section details the digital realisation of the proposed control algorithm, its structure, and its integration into the microcontroller environment to ensure accurate frequency and phase tracking.

Principle of the algorithm

The operation of the ZCD-PLL in the system, after the network signal has been converted into a square wave, is structured in three main stages, as illustrated in Figure 4.

Block diagram of the proposed ZCD-PLL

Each rising edge triggers the PhaseLock interrupt routine, which records the current time and calculates the time interval T between two successive zero crossings. Based on this interval, the instantaneous frequency of the network is determined according to the relationship f=1/T. On the microcontroller side, these events are captured using an external interrupt configured in the code as follows:

attachInterrupt(digitalPinToInterrupt(2), PhaseLock, RISING);

The internal modulation frequency of the system is continuously compared to the measured frequency. If there is a deviation, the ICR1 register of Timer 1 is used to dynamically modify the PWM switching frequency. The SPWM algorithm creates two complementary PWM signals, each of which controls one of the inverter's two diagonal switches, by estimating the grid's frequency and phase. The DC bus voltage is subsequently transformed by the inverter into an AC waveform that is in phase and frequency synchronisation with the grid. The system continuously monitors the grid frequency and compensates for any deviations.

Finally, an LC filter removes high-frequency harmonics from the PWM signal, producing a clean sine wave suitable for grid coupling.

The overall control process is summarised in Figure 5, which illustrates the ZCD–PLL–SPWM algorithm implemented in the Arduino microcontroller.

ZCD_PLL_SPWM algorithm implemented in the microcontroller

Synchronisation Accuracy Metrics

In order to evaluate the performance of the proposed system, four key parameters were selected. These indicators are used to verify compliance with network code requirements and ensure that the inverter remains properly synchronized with the electrical grid. The parameters evaluated include phase error, frequency deviation, THD and reset time after a disturbance [25].

  1. The phase error is obtained by measuring the time difference (Δt) between the zero-crossings of the grid signal and the inverter output. It is expressed as:

    Δϕ= 360 × Δt T

    Where T is the grid signal period.

  2. The frequency deviation quantifies the difference between the inverter output frequency and the grid frequency:

    Δf= f inv f grid , ε f (%)=100× Δf f grid

    Where εf represents the relative error.

  3. The harmonic content of the filtered inverter output voltage is evaluated using Fourier analysis. THD is calculated as:

    THD= k=2 V k 2 V 1 ×100%

    Where V1 is the RMS value of the fundamental component and Vk the RMS of the kth harmonic.

  4. The re-locking time is defined as the duration required for the PLL to re-establish synchronisation after a disturbance or a sudden variation in grid frequency. It is expressed as:

    T lock = t 1 t 0

    Where t0 is the instant of disturbance and t1 the instant at which stable synchronisation is regained.

These parameters enable the system's compliance with network code requirements in terms of stability, voltage quality and resynchronisation speed to be assessed.

Experimental Procedure

A test bench is designed to validate the power distribution in the PV system and the proposed synchronisation approach, by executing the diagrams in Figure 6.

Block diagram of the grid synchronisation system with the inverter

The installation comprises a PV panel delivering 180 W of power under standard conditions (1000 W/m2, 25 °C), an Arduino microcontroller for real-time control, as well as a single-phase 220/24 V transformer and galvanic isolation and adaptation circuits to lower the mains voltage to 5 V to ensure the safety of the electronic components.

A four-channel Tektronix TBS2000B oscilloscope (used in relaxed time base mode) and an acquisition system based on LV25-P (voltage) and LA55-P (current) sensors were used for real-time monitoring and analysis of electrical signals, as well as for measuring the power generated by the PV and consumed in the system.

Adaptation Structure

The adaptation unit consists of a 100 kHz DC/DC converter equipped with a P&O MPPT algorithm that optimises the power extracted from the PV generator and transfers it to the loads: electrolyser and alternating load (inverter output).

A cylindrical electrode electrolyser, placed downstream of the Buck, accepts tolerance to variations in current and voltage at its terminals. This electrolyser does not act as a load shedding device that dissipates energy in the form of Joule heating. The electrolyser is introduced at this exact point to maintain the optimal operating point and convert the absorbed energy into hydrogen production, which is considered an energy vector from PVs.

Finally, a boost converter controls the voltage at 24 V which is then converted to 220 V to match the grid amplitude, ensuring a stable power supply to the inverter and a functional separation between hydrogen production and AC conversion.

Inverter Control

Inverter control is based on synchronisation using the ZCD method.

This architecture ensures phase locking, frequency tracking and waveform stability between the inverter output voltage and the grid reference signal.

Several test scenarios were developed to evaluate the ZCD synchronisation method on the PV system and inverter, particularly in response to frequency variations.

In practice, these variations were introduced using a low-frequency generator (LFG) replacing the electrical grid and providing a variable reference signal. By gradually varying the frequency of the LFG from 50 Hz to 60 Hz, then to 80 Hz, it was possible to analyse the ability of the ZCD-SPWM control algorithm to continuously track and adapt to these changes.

The tests were carried out using two types of sinusoidal reference sources:

Synchronisation of the inverter with the grid at a fixed mains frequency of 50 Hz;

Continuation of the inverter's synchronisation with the low-frequency generator (50 Hz, 60 Hz and 80 Hz) simulating the variable-frequency mains.

The evaluation focused exclusively on the ability of the ZCD control algorithm to maintain the synchronisation of the inverter with the grid, in particular phase alignment, frequency tracking and waveform tracking to ensure that it can be injected into the grid.

Results and Discussion

The tests are carried out in the laboratory for different frequency values, focusing on the phenomenon of synchronisation, from the inverter output to the sine wave on the electrical grid.

Analysis of Power Balance and Energy Distribution in the System

As shown in Figure 7, the power delivered by the PV generator varies between 20 W and 90 W depending on fluctuations in irradiance. The tests were carried out with a 100 Ω load, under unstable sunlight conditions in order to assess the stability of the system. The electrolyser absorbs most of the available power (approximately 10 W to 70 W), in line with the system's main function of hydrogen production, while the finale load consumes relatively low power 5 W depending on the load used and remains stable, in order to show that the synchronisation phenomenon has always occurred.

System Performance: PV Power Generation and Consumption

Despite rapid variations in irradiance (between 200 and 600 W/m2), the energy distribution remains balanced and overall losses do not exceed 10%, mainly due to losses in the converters and the inverter. Furthermore, Figure 8 shows that the DC bus voltage, regulated by the boost converter, remains stable at around 24 V, ensuring a constant power supply to the inverter and continuous synchronisation even in the presence of environmental fluctuations.

Controlled Voltage at the output of the boost converter

Analysis of Photovoltaic-Inverter System Performance and Synchronisation

The SPWM-modulated AC signal (Figure 9), once filtered by the LC filter (Figure 10), produces a clean sine wave that complies with grid wave quality standards. This is because the filtering process removes all harmonics above 50 Hz.

Inverter output voltage by unfiltered SPWM control

Inverter output with filtering

In order to evaluate the stability of the proposed synchronisation method, step frequency variations were applied using an LFG, with values of 50 Hz, 60 Hz and 80 Hz. The results, shown in Figure 11 to Figure 13, demonstrate that the inverter maintains stable synchronisation during these frequency transitions. The inverter output voltage (blue trace) follows the reference signal (red trace), confirming the ability of the ZCD–PLL–SPWM control to track frequency variations.

Inverter signal output synchronised with reference signal with frequency 50 Hz

Inverter signal output synchronised with reference signal with frequency 60 Hz

Inverter signal output synchronised with reference signal with frequency 80 Hz

Next, tests were carried out with the actual power grid. Figure 14 illustrates the inverter output voltage before synchronisation, while Figure 15 shows the PWM waveform after synchronisation has been established. Figure 16 highlights the phase tracking process, during which the inverter voltage gradually locks onto that of the grid.

System not synchronised with the electrical grid

Inverter output and grid signal synchronised in phase and frequency

Phase alignment obtained through the proposed ZCD–PLL–SPWM synchronisation method

Finally, the filtered output voltage of the inverter is illustrated in Figure 17, which shows a high-quality sine wave that is precisely synchronised with the grid in terms of frequency, phase, and amplitude even when there are an unstable weather affecting irradiance

Filtered inverter output synchronised with grid signal in phase and frequency

The grid reference signal is sinusoidal, according to oscilloscope measurements, while the inverter output before filtering exhibits a PWM waveform. The algorithm automatically adjusts the phase and switching frequency during synchronisation until the two signals are completely superposed. Following filtering, the output voltage aligns with the grid and takes the form of a stable sinusoidal waveform.

The ZCD control, implemented on an Arduino microcontroller, uses zero-crossing detection to directly extract phase and frequency information, reducing the complexity of processing and hardware. This approach is suitable for low-cost PV systems and applications requiring synchronisation for possible injection of PV current into the electricity grid.

Tests carried out for different reference frequencies (50 Hz, 60 Hz and 80 Hz) confirm the stability of the synchronisation and the system's ability to adapt to dynamic variations and changes in irradiance, while maintaining smooth and consistent operation.

Results Summary

The performance of the proposed ZCD synchronisation technique was evaluated using the accuracy indicators defined in the synchronisation accuracy metrics section.

The phase error, calculated according to eq. (6) from the measured time difference between the zero crossings of the grid and inverter signals, is approximately 0.9°, which is below the 1° limit commonly considered for stable grid integration.

The frequency deviation, determined according to eq. (7), is 0.05 Hz for a nominal grid frequency of 50 Hz and an inverter output frequency of 49.95 Hz, i.e. a relative error of 0.1%, below the tolerance of ±1%.

Spectral analysis of the output signal using fast Fourier transform indicates a THD of 0.68% after LC filtering by applying eq. (8), which is below the 5% threshold recommended by the IEEE 519 standard for grid-connected systems.

The re-locking time, obtained from eq. (9) after a frequency variation from 50 Hz to 60 Hz, is approximately 25 ms.

The main results are presented in Table 2, illustrating the compliance of the proposed system with the synchronisation requirements in terms of phase alignment, frequency tracking, harmonic distortion and stability.

Summary of synchronisation performance metrics

Metric

Equation used

Result

Standard requirement

Phase error (Δφ)

Eq. (6)

0.9°

< 1°

Frequency deviation (Δf)

Eq. (7)

0.05 Hz (0.1%)

< ±1%

THD

Eq. (8)

0.68%

< 5%

Re-locking time

Eq. (9)

25 ms

< 50 ms

Conclusion

This article presents a new, simple synchronisation strategy for single-phase PV inverters, which differs significantly from conventional PLLs. Synchronisation between the electrical grid and the inverter is achieved by combining ZCD with SPWM. The proposed method allows phase and frequency locking without the use of any feedback loops requiring heavy calculations that delay the response time of the PV system to follow the electrical grid.

Experimental tests have shown that the system maintains a phase error of less than 1°, a frequency deviation of less than 0.1%, and a THD of 0.68%, with a re-locking time of approximately 25 ms during frequency variations. The system remained stable even when the reference frequency varied in steps from 50 Hz to 80 Hz.

Furthermore, tests carried out under varying irradiance conditions confirmed the PV system's ability to distribute energy between the electrolyser and the inverter. The boost converter maintained a stable DC bus voltage of around 24 V, even under fluctuating weather conditions. The results obtained show that the PV system is functioning as expected at all levels of design, in particular the smooth tracking of the inverter's sinusoidal voltage to that of the reference signals (grid or low-frequency generator simulating the grid):

Beyond the experiments conducted in this work, the ZCD technique can be extended to other high-power PV systems for possible connection to the electricity grid. The ZCD method can also be extended to all microgrid systems and decentralised installations and to any system producing direct current energy, in order to transform it into alternating current energy to synthesise a wave similar to that of the grid.

Acknowledgment
Acknowledgments

The authors acknowledge the support of the Electrical Engineering and Maintenance Laboratory (LEEM), Higher School of Technology, Mohammed First University, Oujda, Morocco, for providing the facilities and technical assistance used in this study.

REFERENCES
    1.
  1. Xia C., Balsalobre-Lorente D., Raza Syed Q., “Electricity generation from renewable and non-renewable energy sources in China: The role of environmental policy stringency, FDI, and economic growth,”, Energy, Vol. 318 , :1346952025, https://doi.org/10.1016/J.ENERGY.2025.134695
  2. 2.
  3. Guillen D., Soto J., Valdez-Resendiz J., “Fundamentals of energy efficiency to management renewable energy sources in electrical grids,”, Energy Effic. Mod. Power Energy Syst., 329-3602024, https://doi.org/10.1016/B978-0-443-21644-2.00015-4
  4. 3.
  5. Lu S., Lin C., Huang L., Lee Y., Liu H., Liao P., Gao G., Hsu C., “Novel Global-MPPT Control Strategy Considering the Variation in the Photovoltaic Module Output Power and Loads for Solar Power Systems,”, Processes, Vol. 10 (2), 2022, https://doi.org/10.3390/pr10020367
  6. 4.
  7. Karimi A., Nayeripour M., Abbasi A., “Coordination in islanded microgrids: Integration of distributed generation, energy storage system, and load shedding using a new decentralized control architecture,”, J. Energy Storage, Vol. 98 , :1131992024, https://doi.org/10.1016/J.EST.2024.113199
  8. 5.
  9. Meraj S., Yu S., Rahman M., Hasan K., Hossain Lipu M., Trinh H., “Energy management schemes, challenges and impacts of emerging inverter technology for renewable energy integration towards grid decarbonization,”, J. Clean. Prod., Vol. 405 , :1370022023, https://doi.org/10.1016/J.JCLEPRO.2023.137002
  10. 6.
  11. Omer P., Kumar J., Surjan B., “Comparison of multicarrier PWM techniques for cascaded H-bridge inverter,”, 2014 IEEE Students’ Conference on Electrical, Electronics and Computer Science, 1-62014, https://doi.org/10.1109/SCEECS.2014.6804463
  12. 7.
  13. Blaacha J., Aboutni R., Chennaif M., Aziz A., “Design of a single-phase inverter controlled by a digital PWM for the optimization of photovoltaic energy,”, Mater. Today Proc., Vol. 45 , 2021, https://doi.org/10.1016/j.matpr.2021.03.501
  14. 8.
  15. Tutkun N., “Improved power quality in a single-phase PWM inverter voltage with bipolar notches through the hybrid genetic algorithms,”, Expert Syst. Appl., Vol. 37 , :5614-56202010, https://doi.org/10.1016/j.eswa.2010.02.051
  16. 9.
  17. Srief M., Soltane B., Lokmane N., Malak G., “A complete control structure based backstepping controller design for stacked multi-cell multi-level SPWM VSC STATCOM,”, Energy Reports, Vol. 12 , :687-698, https://doi.org/10.1016/j.egyr.2024.06.051
  18. 10.
  19. Palanisamy R., “Mitigation of capacitor voltage unbalance and common mode voltage for 3-phase 5-Level NPC inverter using hexagonal SVPWM,”, e-Prime - Adv. Electr. Eng. Electron. Energy, Vol. 9 , :1006392024, https://doi.org/10.1016/j.prime.2024.100639
  20. 11.
  21. Chakir F., El Magri A., Kissaoui M., Lajouad R., El Fadili A., Chakir M., “Advanced control strategies for multilevel inverter in grid-connected and off-grid photovoltaic systems: A multi-objective approach using LS-PWM for THD reduction,”, Sci. African, Vol. 26 , :e024722024, https://doi.org/10.1016/J.SCIAF.2024.E02472
  22. 12.
  23. Kulkarni S., Gaonkar D., “An investigation of PLL synchronization techniques for distributed generation sources in the grid-connected mode of operation,”, Electr. Power Syst. Res., Vol. 223 , :1095352023, https://doi.org/10.1016/J.EPSR.2023.109535
  24. 13.
  25. Golestan S., Guerrero J., Vasquez J., Abusorrah A., Al-Turki Y., “Standard SOGI-FLL and Its Close Variants: Precise Modeling in LTP Framework and Determining Stability Region/Robustness Metrics,”, IEEE Trans. Power Electron., Vol. 36 (1), :409-4222021, https://doi.org/10.1109/TPEL.2020.2997603
  26. 14.
  27. Zhang C., Føyen S., Suul J., Molinas M., “Modeling and Analysis of SOGI-PLL/FLL-Based Synchronization Units: Stability Impacts of Different Frequency-Feedback Paths,”, IEEE Trans. Energy Convers., Vol. 36 (3), :2047-20582021, https://doi.org/10.1109/TEC.2020.3041797
  28. 15.
  29. Ranjan A., Kewat S., Singh B., “DSOGI-PLL With In-Loop Filter Based Solar Grid Interfaced System for Alleviating Power Quality Problems,”, IEEE Trans. Ind. Appl., Vol. 57 (1), :730-7402021, https://doi.org/10.1109/TIA.2020.3029125
  30. 16.
  31. Liu B., An M., Wang H., Chen Y., Zhang Z., Xu C., Song S., Lv Z., “A Simple Approach to Reject DC Offset for Single-Phase Synchronous Reference Frame PLL in Grid-Tied Converters,”, IEEE Access, Vol. 8 , :112297-1123082020, https://doi.org/10.1109/ACCESS.2020.3003009
  32. 17.
  33. Ortega Á., Milano F., “Comparison of different PLL implementations for frequency estimation and control,”, in 2018 18th International Conference on Harmonics and Quality of Power (ICHQP), 1-62018, https://doi.org/10.1109/ICHQP.2018.8378935
  34. 18.
  35. Karimi-Ghartemani M., Iravani M., “Robust and frequency-adaptive measurement of peak value,”, IEEE Trans. Power Deliv., Vol. 19 (2), :481-4892004, https://doi.org/10.1109/TPWRD.2004.824764
  36. 19.
  37. Liu C., Jiang J., Jiang J., Zhou Z., “Enhanced Grid-Connected Phase-Locked Loop Based on a Moving Average Filter,”, IEEE Access, Vol. 8 , :5308-53152020, https://doi.org/10.1109/ACCESS.2019.2963362
  38. 20.
  39. Prakash S., Singh J., Behera R., Mondal A., “A Type-3 Modified SOGI-PLL With Grid Disturbance Rejection Capability for Single-Phase Grid-Tied Converters,”, IEEE Trans. Ind. Appl., Vol. 57 (4), :4242-42522021, https://doi.org/10.1109/TIA.2021.3079122
  40. 21.
  41. Ali A., Desa M., Ai Ooi C., Al-Gailani S., Hafeez M., Abdullah M., Zaid M., “Sensorless microcontroller-based zero-crossing detection system for AC signals using a rounding function,”, Ain Shams Eng. J., Vol. 15 (2), :1023752024, https://doi.org/10.1016/J.ASEJ.2023.102375
  42. 22.
  43. Fares D., Fathi M., Shams I., Mekhilef S., “A novel global MPPT technique based on squirrel search algorithm for PV module under partial shading conditions,”, Energy Convers. Manag., Vol. 230 , :1137732021, https://doi.org/10.1016/J.ENCONMAN.2020.113773
  44. 23.
  45. Dahbi S., Aboutni R., Aziz A., Benazzi N., Elhafyani M., Kassmi K., “Optimised hydrogen production by a photovoltaic-electrolysis system DC/DC converter and water flow controller,”, Int. J. Hydrogen Energy, Vol. 41 (45), :20858-208662016, https://doi.org/10.1016/J.IJHYDENE.2016.05.111
  46. 24.
  47. Yahyaoui S., Aziz A., Messaoudi A., Blaacha J., Dahbi S., Messaoudi I., “Experimental Validation of a Photovoltaic/Electrolysis System Dedicated to Supplying an Alternating Load and Producing Hydrogen, 2022
  48. 25.
  49. Yahyaoui S., Blaacha J., Dahbi S., Aziz A., “Optimizing Photovoltaïc System: Efficient Hydrogen Production and Grid Integration Through PWM Control and PLL Synchronization BT, 2025

DBG