Flyback Photovoltaic Micro-Inverter with a Low Cost and Simple Digital-Analog Control Scheme

: The single-stage ﬂyback Photovoltaic (PV) micro-inverter is considered as a simple and small in size topology but requires expensive digital microcontrollers such as Field-Programmable Gate Array (FPGA) or Digital Signal Processor (DSP) to increase the system efﬁciency, this would increase the cost of the overall system. To solve this problem, based on a single-stage ﬂyback structure, this paper proposed a low cost and simple analog-digital control scheme. This control scheme is implemented using a low cost ATMega microcontroller built in the Arduino Uno board and some analog operational ampliﬁers. First, the single-stage ﬂyback topology is analyzed theoretically and then the design consideration is obtained. Second, a 120 W prototype was developed in the laboratory to validate the proposed control. To prove the effectiveness of this control, we compared the cost price, overall system efﬁciency, and THD values of the proposed results with the results obtained by the literature. So, a low system component, single power stage, cheap control scheme, and decent efﬁciency are achieved by the proposed system. Finally, the experimental results present that the proposed system has a maximum efﬁciency of 91%, with good values of the total harmonic distortion (THD) compared to the results of other authors.


Background and Motivation
In recent years, renewable energy sources such as solar and wind, which are environmentally clean and free, have been receiving strong attention and emphasis throughout the world [1,2]. In renewable energy systems based on solar energy, Photovoltaic modules are the interface with the primary energy [3][4][5].
Although PV modules are a key element in energy conversion, they will often be looked at as just a source of electrical energy. Over an electrical energy source, they have a peculiar behavior related to solar irradiance and temperature [6]. Besides, to reduce prices, the durability of PV modules is an important factor in the popularity of renewable energy. A PV module does not contain any moving parts, as opposed to some of the other renewable energy sources such as wind. A long lifetime is therefore guaranteed, without almost any tear, wear, and maintenance. Nowadays, more and more complex PV modules are studied for the designing and implementation of efficient PV system strategies [7][8][9][10].

Literature Review and Research Gap
Several methods to arrange the solar PV modules are used to provide sufficient PV power to the grid-connected inverter, which in turn influences the cost of installation and inverter efficiency. Mainly, three general types of grid-connected inverter schemes depend on the solar PV module configuration: central inverters, string inverters, and microinverters are studied. In recent years, the modern technology of micro-inverter that consists of a single PV module integrated with an interactive inverter has been proposed and reviewed [11][12][13]. With many advantages, over conventional inverters, the micro-inverter is considered a popular solution for grid-connected inverters with PV systems [14,15].
However, a flyback micro-inverter was proposed for low PV power applications based on the DC/DC flyback converter. In this topology, the number of power stages depending on the type of connection of switches in the DC/AC stage that are integrated with the utility grid can be designed as a single-stage or two-stage inverter [16]. The two topologies of flyback micro-inverters can be implemented which are a center-tapped threewinding topology, and two-phase interleaved flyback topology based on the high-frequency transformer (HFT) [17].
Y. H. Kim et al. [18] presented the two-phase interleaved flyback micro-inverter with a new control strategy. It predicts that using a two-phase interleaved type instead of a centertapped transformer type can increase the transferred output power to the grid. Therefore, a stable operation and higher efficiency are achieved. Although higher efficiency is achieved, the control strategy has the drawback of being complicated and expensive. In general, the dominant losses that occurred in the switching operation decrease the overall efficiency of the interleaved flyback inverter that operates in discontinuous conduction mode (DCM) or boundary conduction mode (BCM) control strategies. Therefore, the authors in [19] proposed a new hybrid control strategy based on one-and two-phase DCM in order to achieve higher efficiency at light load or heavy load conditions by decrease the switching losses.
Z. Zhang et al. [20] applied the BCM control strategy on two parallel flyback converters in order to increase the output power level of what is injected into the utility grid, and then achieving higher efficiency. Unfortunately, the main drawback in this work is the higher total harmonic distortion (THD) content in the output current. Also, several studies are presented to combine the advantages of both the DCM and BCM control strategies [21][22][23]. In addition, the continuous conduction mode (CCM) as a simple control scheme with low cost is proposed in [24,25]. The main problem in this strategy is the right half-plane (RHP) zero that occurs in the CCM region operation which may cause poor power quality and higher THD in output current. Moreover, different types of flyback topologies operated with DCM, BCM, and CCM strategies were proposed and reviewed [26][27][28][29][30][31][32]. Moreover, a new flyback inverter topology was proposed by H. Hu et al. [32,33] to increase the long lifetime of the flyback inverter by using a small film capacitor. Although in [32,33] no switching losses regarding the system efficiency are mentioned, the switching losses across the decupling device circuit will reduce the system efficiency. Furthermore, higher stress for switching devices due to using a smaller capacitor may result in more losses and lower efficiency.
In summary, the type of control scheme used in the flyback micro-inverter is very important as it directly affects the cost and conversion efficiency of the system. As mentioned before, several digital control schemes use expensive controllers. This makes the control circuit high-cost which also requires more digital devices to implement the overall control scheme.

Aims and Contributions
In this paper, a low cost digital-analog control scheme is presented that realizes a single-stage flyback micro-inverter. The main part of the proposed control scheme is the low cost ATMega microcontroller. Also, we use a simple analog circuit to track the zero-crossing detection of the grid voltage and provides suitable signal pulses to the semiconductors of the inverter. Also, the proposed control scheme is compared with other topologies that used  [18,20,32,33]. The research is presented as follows: Section 2 covers the flyback micro-inverter and its analysis; design of transformer and system parameters is presented in Section 3. The proposed digital-analog control scheme is presented in Section 4. The simulation and experimental results are presented in Section 5, while the conclusion is presented in Section 6.

Flyback Micro-Inverter and Its Analysis
A Flyback PV micro-inverter is a single-stage inverter with a simple structure circuit. With many functions over multi-stage inverters, the flyback micro-inverter provides DC/AC conversion with isolation between the input side and output side; it raises the DC input voltage level to AC utility grid voltage level [19,20,34]. This topology transfers the output power from a PV module to the utility grid through the two secondary windings of a center tap high-frequency transformer alternatively during the half period of the AC sinusoidal wave of the utility grid [32]. Figure 1 shows the flyback topology circuit used in this work which consists of an input DC source (PV module), decoupling capacitor C in , HFT with one primary and centertapped two secondary windings, and one switch in the PV side module, two switches in the grid side with two diodes, and an output filter. Moreover, the main switch S PV is operated with high switching frequency (about 30 kHz), while the secondary switches, S AC1 and S AC2 are operated with a grid frequency (50 Hz). The simulation and practical implementation of the proposed work depend on the following main specifications: Input voltage from PV module is 25-33 V; RMS grid voltage is 220 V; Grid frequency is 50 Hz, and; Maximum transferred power to the grid is 120 W.

Aims and Contributions
In this paper, a low cost digital-analog control scheme is presented that realizes a single-stage flyback micro-inverter. The main part of the proposed control scheme is the low cost ATMega microcontroller. Also, we use a simple analog circuit to track the zerocrossing detection of the grid voltage and provides suitable signal pulses to the semiconductors of the inverter. Also, the proposed control scheme is compared with other topologies that used the different controllers [18,20,32,33]. The research is presented as follows: Section 2 covers the flyback micro-inverter and its analysis; design of transformer and system parameters is presented in Section 3. The proposed digital-analog control scheme is presented in Section 4. The simulation and experimental results are presented in Section 5, while the conclusion is presented in Section 6.

Flyback Micro-Inverter and Its Analysis
A Flyback PV micro-inverter is a single-stage inverter with a simple structure circuit. With many functions over multi-stage inverters, the flyback micro-inverter provides DC/AC conversion with isolation between the input side and output side; it raises the DC input voltage level to AC utility grid voltage level [19,20,34]. This topology transfers the output power from a PV module to the utility grid through the two secondary windings of a center tap high-frequency transformer alternatively during the half period of the AC sinusoidal wave of the utility grid [32]. Figure 1 shows the flyback topology circuit used in this work which consists of an input DC source (PV module), decoupling capacitor C , HFT with one primary and center-tapped two secondary windings, and one switch in the PV side module, two switches in the grid side with two diodes, and an output filter. Moreover, the main switch S is operated with high switching frequency (about 30 kHz), while the secondary switches, S and S are operated with a grid frequency (50Hz). The simulation and practical implementation of the proposed work depend on the following main specifications:  Input voltage from PV module is 25-33 V;  RMS grid voltage is 220 V;  Grid frequency is 50Hz, and;  Maximum transferred power to the grid is 120 W.

Analysis of Duty Cycle and Turns-Ratio
The selection of turns-ratio N N s /N p of the flyback transformer, and the selection of duty cycle D are interrelated as each one depends on the other [26]. Therefore, the value of D is determined based on the value of N, which is assumed to be determined as the starting point for designing the flyback inverter. The value of N is defined as follows: whereV g and V pv,min are the peak value of grid voltage and the minimum value of the PV module voltage, respectively. N is the transformer turns-ratio. The proposed micro-inverter is designed to operate with DCM, therefore, the magnetizing current must be limited, so that this current falls to zero when the main switch, S PV becomes OFF, and before the new switching cycle begins. Thus, the critical case situation occurs when the inverter operates at a peak duty ratio D max . Also, while the main switch S PV is ON, the DC input voltage across the primary winding is the same PV module voltage and can be expressed as follows [35,36]: where L m is the magnetizing inductance. The primary current increases linearly as in the following [28][29][30][31]: where I p is the primary current, and D is the duty cycle.
To stay always under DCM operation, the OFF-time interval, T off , must be smaller than the difference between the total time interval and the ON time interval, T on , as given below [28,37]: where T off,max is the OFF time of S PV and T on,max is the ON time of S PV , which can be expressed as: where f s is the switching frequency. By substituting Equation (5) into Equation (3) we reach the following expression:Î p = V pv D max L m f s (6) and, the instantaneous grid voltage can be written as [29]: v g (t) =V g sin ωt (7) where ω is the line frequency in rad/sec. The primary current I p drops to zero when S pv turns OFF, and the energy stored in the magnetizing inductance is transferred to the grid. Since during this time the voltage across the secondary winding is reflected on the primary, it can be written as [37]: Therefore, the maximum OFF time T off,max can be expressed as: Substituting Equation (6) into Equation (9) gives: Energies 2021, 14, 4239

of 16
The values for N and D max should be selected so that the micro-inverter remains in DCM. By substituting Equation (10) into Equation (4), the following equation is obtained: By dividing both sides of this equation by T on,max : Alternatively, this equation can be simplified to give the peak value of the duty ratio as follows [28,31,37]:

Analysis of Magnetizing Inductance
The most important factor required to be carefully treated in DCM operation is the magnetizing inductance value, L m of the flyback transformer. If L m is low, a high peak magnetizing current in the primary winding will be generated, and this may cause damage to the main switch [28]. On the other hand, when the value of L m is high, a magnetizing current will work in the CCM mode. Therefore, an appropriate L m value should be chosen very carefully as is presented in this section.
However, the value of L m that stores sufficient energy in the transformer winding depends on the value of the output power P o , which is extracted from the micro-inverter. If the micro-inverter is assumed to be ideal, then the power balance equation under DCM condition can be expressed as follows [33,34]: (16) whereÎ out is the peak value of output current. Hence, the input power of the micro-inverter is equal to the AC output power that is fed to the utility grid, which can be written as: Since the input voltage from the PV module is DC, then the input power of the flyback micro-inverter is dependent on the input RMS current [34]. The real RMS value of this current is the average over a grid period. As a result, the input power is dependent on the input average current I in,avg as follows [29,34]: For this reason, deriving the expression between L m and I in,avg will achieve the objective of finding the relationship between the magnetizing inductance and input power.
So, the average current can be derived as in Equation (19) [34]: where T grid is the fundamental period for the grid (20 ms). In addition, the primary current of the flyback micro-inverter is the summation of triangular pulses as follows: where i = 1, 2, 3 . . . n, and n is the number of switching cycles per half AC grid line cycle so that, The integration of one triangular pulse from these pulses for an i th switching cycle can be written as: Moreover, the ON time of the main switch S PV for the switching cycle when the primary current is at its maximum value was given in Equation (6). Therefore, the peaks of the maximum current follow a sinusoidal envelope, and then after, the duty ratio can be written in terms of a sinusoidal as follows [30,34]: Substituting this equation into Equation (18) gives, The flyback micro-inverter usually supplies the utility grid, therefore, the power expression in Equation (25) can be written in terms of utility grid RMS voltage as follows: For this reason, the numerator and denominator of Equation (25) are multiplied by (V 2 g,rms ) and rearranged so it can be written as: As a result, the output power that is transferred to the grid can be written as follows [34]: where λ = V pv V g , and g l = 1 f s L m . By rearranging Equation (28), the relation between magnetizing inductance, L m , and the transferred rated output power, P o can be written as:

Design of Transformer and System Parameters
The principle of flyback DCM micro-inverter is based on the stored energy in magnetizing inductance during the "ON period" and the discharge of the energy to the grid during the "OFF period". Therefore, all the energy stored in the magnetizing inductance is transferred to the utility grid before the next charging period occurs [34].
The primary current is a rectified sine wave, therefore, a relatively high DC current component will flow in the primary winding, thus a high DC magnetizing force will occur which may cause saturation. For this reason, a ferrite core is a suitable choice [36]. Also, the skin depth is known as the distance below the surface, where the current density has fallen to 1⁄ε or 37 percent of its value at the surface. The skin depth in centimeters can be written as [35,36]: When selecting the wire for high frequencies, we need to select a wire such that the relationship between the AC resistance and the DC resistance is unity. For switching frequency f s equal to 30 kHz, the skin depth will be ε = 0.03822 cm, then the wire diameter D w and cross-section area can be calculated from the following equations, As a result, we have a cross-section area of 4.6 × 10 −3 cm 2 . Moreover, from the wire table of American Wire Gauge (AWG) specifications, we used number 19 that has a bare wire area of 5.18 × 10 −3 cm 2 . Furthermore, the transformer ratio can be calculated from Equation (1), N ∼ = 10, and the total switching period T S = 33.33 µs. The maximum duty cycle can be calculated from Equation (15) as D max ≤ 0.5 for T o,max = 16.6 µs. Also, The required magnetizing inductance L m = 18.8 µH.
However, the energy handling capability, E in watt-seconds, can be determined by using the following Equation [36]: Therefore, the calculated energy handling is E = 0.01 J. As a result, we select the ferrite core type E55/28/2-3C90, which is manufactured by the company Ferroxcube [38].
Finally, the number of primary and secondary turns are calculated as in [36], so we have N p = 21 turns, and N s2 = N s1 = 196 turns.

Simple Analog Control Circuit
The proposed analog control circuit is shown in Figure 2. This circuit consists of three parts, a precision rectifier circuit, pulse width modulation (PWM) comparator, and zero-crossing detector. As observed, the precision rectifier circuit is implemented using the operational amplifier type LM324 in order to generate the rectified sine wave from the grid voltage. This signal is regulated by the MPPT algorithm to produce the reference signal of the primary current I * p which is compared with the high switching frequency signal S(t).

Simple Analog Control Circuit
The proposed analog control circuit is shown in Figure 2. This circuit consists of three parts, a precision rectifier circuit, pulse width modulation (PWM) comparator, and zerocrossing detector. As observed, the precision rectifier circuit is implemented using the operational amplifier type LM324 in order to generate the rectified sine wave from the grid voltage. This signal is regulated by the MPPT algorithm to produce the reference signal of the primary current I * which is compared with the high switching frequency signal S(t). As a result, the SPWM pulses (HF pulses) are obtained to turn on the main MOSFET S through a simple comparator type SG3525. As a result, the main MOSFET S is controlled by tracking the reference value of the primary current. So, the peak spike voltage across S in the "OFF time" period is adjusted. Moreover, the zero-crossing detector using a low cost comparator (LM339) is used to track the reference grid voltage. Furthermore, the IGBTs on the grid side, S and S are triggered reciprocally according to the grid voltage polarity. The reference grid voltage is compared with the ground to turn on the S which is responsible for the positive cycle, while other IGBTs are turned on by inverting the pulses of S . In addition, when the reference voltage of the grid is altered from the negative to the positive, this will be predicated by the input pins of the Arduino board, therefore, the phase shaft error between the output current and grid is indicated and the synchronization process is implemented as presented in Figure 1.

Digital Control Circuit
The main objective of the digital control scheme is to obtain the MPP from the PV module at different weather conditions by a program embedded in the ATMega 328 microcontroller of the Arduino Uno board. In this paper, a simple P&O-MPPT algorithm with a digital PI controller is implemented to track the MPP of the PV panel. The ATMega 328 microcontroller represents the brain of the entire control scheme, it converts the analog values from the sensors into digitals and produces two output channels to control the main MOSFET and detect the phase shaft error between the injected current and the grid. Also, a simple code algorithm is used and loaded through the Arduino IDE environment. Table 1 shows the price of the proposed control scheme components. As observed, the budget of the control components is cheap compared with the one used in [18,20]. As a result, the SPWM pulses (HF pulses) are obtained to turn on the main MOSFET S PV through a simple comparator type SG3525. As a result, the main MOSFET S PV is controlled by tracking the reference value of the primary current. So, the peak spike voltage across S PV in the "OFF time" period is adjusted. Moreover, the zero-crossing detector using a low cost comparator (LM339) is used to track the reference grid voltage. Furthermore, the IGBTs on the grid side, S AC1 and S AC2 are triggered reciprocally according to the grid voltage polarity. The reference grid voltage is compared with the ground to turn on the S AC1 which is responsible for the positive cycle, while other IGBTs are turned on by inverting the pulses of S AC1 . In addition, when the reference voltage of the grid is altered from the negative to the positive, this will be predicated by the input pins of the Arduino board, therefore, the phase shaft error between the output current and grid is indicated and the synchronization process is implemented as presented in Figure 1.

Digital Control Circuit
The main objective of the digital control scheme is to obtain the MPP from the PV module at different weather conditions by a program embedded in the ATMega 328 microcontroller of the Arduino Uno board. In this paper, a simple P&O-MPPT algorithm with a digital PI controller is implemented to track the MPP of the PV panel. The ATMega 328 microcontroller represents the brain of the entire control scheme, it converts the analog values from the sensors into digitals and produces two output channels to control the main MOSFET and detect the phase shaft error between the injected current and the grid. Also, a simple code algorithm is used and loaded through the Arduino IDE environment. Table 1 shows the price of the proposed control scheme components. As observed, the budget of the control components is cheap compared with the one used in [18,20].

Simulation and Experimental Results
To verify the proposed control scheme, the PSIM software was used for simulation. The proposed system of Figure 1 was simulated for the rated output power and nominal PV voltage 120 W and 33 V, respectively. As observed in Figure 3, the varied SPWM pulses were obtained by the proposed control circuit to provide suitable gate signals to the main MOSFET by tracking the primary reference current. Figure 4 reports the simulation results for the primary current, injected current with grid voltage, and the PWM signals of the IGBTs. From these figures, it is clear that the proposed control represents a good performance. Therefore, the simulation results present similar characteristics to the experimental results in terms of the performance and accuracy.

Simulation and Experimental Results
To verify the proposed control scheme, the PSIM software was used for simulation. The proposed system of Figure 1 was simulated for the rated output power and nominal PV voltage 120W and 33V, respectively. As observed in Figure 3, the varied SPWM pulses were obtained by the proposed control circuit to provide suitable gate signals to the main MOSFET by tracking the primary reference current. Figure 4 reports the simulation results for the primary current, injected current with grid voltage, and the PWM signals of the IGBTs. From these figures, it is clear that the proposed control represents a good performance. Therefore, the simulation results present similar characteristics to the experimental results in terms of the performance and accuracy.   Furthermore, to evaluate the proposed control scheme, a 120W prototype was developed and tested in the laboratory as presented in Figure 5. Overall single-stage circuit parameters considered for experimentation are listed in Table 2. In this work, a single Furthermore, to evaluate the proposed control scheme, a 120 W prototype was developed and tested in the laboratory as presented in Figure 5. Overall single-stage circuit parameters considered for experimentation are listed in Table 2. In this work, a single Kyocera KC200GT PV panel was used as a PV source. Moreover, solar irradiation was measured using the auto digital lux-meter device (model LX1010B), while the temperature was measured using a thermometer device. In addition, the experimental measurements were shown using a digital storage oscilloscope (TSO 1022, 25 MHz, and 500 MSa/s). To demonstrate the performance of the proposed control, the flyback inverter was tested at different power levels from 10% to 100% of the rated power. Furthermore, to evaluate the proposed control scheme, a 120W prototype was developed and tested in the laboratory as presented in Figure 5. Overall single-stage circuit parameters considered for experimentation are listed in Table 2. In this work, a single Kyocera KC200GT PV panel was used as a PV source. Moreover, solar irradiation was measured using the auto digital lux-meter device (model LX1010B), while the temperature was measured using a thermometer device. In addition, the experimental measurements were shown using a digital storage oscilloscope (TSO 1022, 25 MHz, and 500 MSa/s). To demonstrate the performance of the proposed control, the flyback inverter was tested at different power levels from 10% to 100% of the rated power.    Figure 6 presents the reference signal of the primary current with the high-frequency S(t) signal, and the produced HF pulses (SPWM pulses) that control the main MOSFET. As observed in Figure 7, the proposed control scheme has an identical accuracy in the tracking of the reference signal. Figure 8 reports the primary current of the flyback inverter, whose shape represents a rectified sine wave with a peak value of 26.4 A. is in phase with the utility voltage, so the maximum real output power of 120W is delivered to the grid with a power factor PF = 0.988 and THD = 3%. Also, the PWM pulses for the control of the IGBTs are shown in Figure 9. As shown in this figure, these pulses are obtained to turn on the first IGBT S in the positive cycle and the second IGBT S in the negative cycle. Figure 10 shows the experimental waveform of the output current with grid voltage for 10% of the rated output power.         Figure 9 presents the practical output current that was injected into the grid for G = 650 W/m 2 and temperature T = 20 • C. From this figure, it is clear that the output current is in phase with the utility voltage, so the maximum real output power of 120 W is delivered to the grid with a power factor PF = 0.988 and THD = 3%. Also, the PWM pulses for the control of the IGBTs are shown in Figure 9. As shown in this figure, these pulses are obtained to turn on the first IGBT S AC1 in the positive cycle and the second IGBT S AC2 in the negative cycle.          Figure 11 reports the FFT waveform of the output current for 100% of the rated output power (i.e., 120 W). As observed, the THD value is good which is within the standard limit. Besides, Figure 12 presents the FFT waveform of the output current for 10% of the rated output power (i.e., 12 W) with THD value of 6%.  Figure 11 reports the FFT waveform of the output current for 100% of the rated output power (i.e., 120 W). As observed, the THD value is good which is within the standard limit. Besides, Figure 12 presents the FFT waveform of the output current for 10% of the rated output power (i.e., 12 W) with THD value of 6%.
Moreover, Z. Zhang et al. [18] mentioned the THD values with different output power, therefore, a comparison between the THD values achieved by the proposed work and those of Z. Zhang are listed in Table 3. As can be seen in this Table, the proposed work shows the values of the THD content and are better than the results obtained by Z. Zhang especially at high output power.     However, the digital controller device represented the brain of the overall system. Therefore, the proposed controller used in this work is compared with some digital controllers published recently, based on the type micro-inverter topology, the controller used, maximum efficiency, and the cost as presented in Table 4. Therefore, if we compare our proposal with the low cost controllers used by H. Hu et al. [32,33], the proposed work presents high efficiency by using a low cost Arduino Uno microcontroller. Whereas, Young-Ho K. [18] who implemented an interleaved flyback inverter based on a TMS320F28035 controller, obtained an efficiency of 94.5% although the experimental implementation of this system was not easy due to the use of a complex digital controller, making the control scheme and system more expensive. Also, Z. Zhang et al. [20] proposed an interleaved flyback inverter based on an FPGA EP3C10E controller and obtained Moreover, Z. Zhang et al. [18] mentioned the THD values with different output power, therefore, a comparison between the THD values achieved by the proposed work and those of Z. Zhang are listed in Table 3. As can be seen in this Table, the proposed work shows the values of the THD content and are better than the results obtained by Z. Zhang especially at high output power. However, the digital controller device represented the brain of the overall system. Therefore, the proposed controller used in this work is compared with some digital controllers published recently, based on the type micro-inverter topology, the controller used, maximum efficiency, and the cost as presented in Table 4. Therefore, if we compare our proposal with the low cost controllers used by H. Hu et al. [32,33], the proposed work presents high efficiency by using a low cost Arduino Uno microcontroller. Whereas, Young-Ho K. [18] who implemented an interleaved flyback inverter based on a TMS320F28035 controller, obtained an efficiency of 94.5% although the experimental implementation of this system was not easy due to the use of a complex digital controller, making the control scheme and system more expensive. Also, Z. Zhang et al. [20] proposed an interleaved flyback inverter based on an FPGA EP3C10E controller and obtained a maximum efficiency of 94%, although the authors have obtained a good efficiency, the THD content in the output current was high. Furthermore, we used an ATMega 328 microcontroller embedded in Arduino Uno board for the implementation of the control scheme instead of complex expensive controllers, which makes the cost of the implementation system low. As observed, the proposed control scheme is simpler and less expensive compared to the others. In addition, the maximum system efficiency obtained in this work was 91% which is rather comparable to existing works. Moreover, the proposed system efficiency is compared with that obtained by the single-stage flyback systems [32,33] as presented in Figure 13. From this figure, it is clear that the proposed system has a good efficiency, especially at a high output power. The price was sourced from www.aliexpress.com (accessed on 1 July 2021). Figure 13. Experimental efficiency as a function of output power level.

Conclusions
In this paper, we propose a simple and low cost analog-digital control scheme for the single-stage flyback DCM micro-inverter. The use of expensive microcontrollers such as a FPGA and TMS320F28035 make the cost of the overall system high. However, this problem can be avoided by using a low cost ATMega 328 microcontroller which is more economical. For this purpose, the single-stage flyback circuit was initially analyzed and designed. Then, the proposed control scheme was implemented using a PV 120W prototype in the laboratory. Moreover, the brain of the proposed control scheme is the ATMega 328 microcontroller that is integrated into the Arduino Uno board. The theoretical analysis and the performance of the proposed work are validated by the simulation and experimental results. In addition, the correctness of the proposed work is proved by comparing Figure 13. Experimental efficiency as a function of output power level.

Conclusions
In this paper, we propose a simple and low cost analog-digital control scheme for the single-stage flyback DCM micro-inverter. The use of expensive microcontrollers such as a FPGA and TMS320F28035 make the cost of the overall system high. However, this problem can be avoided by using a low cost ATMega 328 microcontroller which is more economical. For this purpose, the single-stage flyback circuit was initially analyzed and designed. Then, the proposed control scheme was implemented using a PV 120 W prototype in the laboratory. Moreover, the brain of the proposed control scheme is the ATMega 328 microcontroller that is integrated into the Arduino Uno board. The theoretical analysis and the performance of the proposed work are validated by the simulation and experimental results. In addition, the correctness of the proposed work is proved by comparing the performance of the proposed system with reference from the literature at different output power, these comparisons presented that the proposed system is low cost. Finally, a good efficiency of 91% was obtained compared to the systems that used the single-stage flyback topology with a 1.4% improvement.