## 4 Conclusions  
This research presented the design and implementation of an on-grid microinverter control technique for managing active and reactive power based on a _dq_ transformation. The simulated model allowed us to approach the real behavior of the system, and good performance was obtained for the control techniques. In the DC-DC stage, the maximum power point of the panel was monitored with the generation of the current reference, which was given by the incremental conductance MPPT algorithm and regulated by a 2P2Z control. This algorithm is robust against continuous changes in irradiance, as it quickly follows the ideal power and it always operates at a point close to the MPP. In addition, the 2P2Z control allowed the panel current to follow the reference without steady-state error and low oscillations, results that were evidenced in the simulations and experimentally.  
Furthermore, In the DC-AC stage, an anti-windup PI controller was implemented for the DC bus voltage; it followed the desired reference to regulate the active power supplied by the microinverter. Furthermore, a second-order generalized integrator (SOGI)-based phase-locked loop (PLL) was employed to calculate the P and Q control. In addition, a 3P3Z current controller was applied, which followed the reference given by the P and Q control. Moreover, a feedback linearization technique was implemented to compensate for disturbances caused by the voltage of the grid in the 3P3Z control.  
Moreover, the P and Q control implemented in the TI solar microinverter and simulations delivered the maximum active power. It supplied reactive power according to a defined reference and within the established limits. In addition, the integration of the microinverter into a microgrid could be performed due to the possibility of changing the reference values of the DC bus voltage and P and Q powers supplied by a secondary control.  
This research demonstrated that it is possible to simulate control techniques that behave similarly to those of real equipment to ensure proper operation during implementation. Additionally, it was possible to demonstrate the viability of active and reactive power control techniques using a low-cost commercial microinverter. Finally, by implementing an active and reactive power control technique in a low-power microinverter, these controls can be used in small microgrids to maintain power quality.  
In future work, the LCL filter and the structure of the dual-buck inverter can be improved in order to obtain lower harmonic distortion levels in the output current of the microinverter. In addition, the PWM control can be improved to reduce oscillations or distortions around the zero-crossing area. Additionally, it is possible to implement other active and reactive power control techniques and integrate the microinverter into a secondary control for a microgrid.  
Conceptualization, D.S.B.-B. and O.D.O.-S.; methodology, D.S.B.-B. and O.D.O.-S.; validation, J.R.-F. and J.E.C.-B.; formal analysis, J.R.-F. and J.E.C.-B.; investigation, D.S.B.-B. and O.D.O.-S.; writing--original draft preparation, D.S.B.-B. and O.D.O.-S.; writing--review and editing, J.R.-F. and J.E.C.-B.; visualization, J.R.-F. and J.E.C.-B. All authors have read and agreed to the published version of the manuscript.  
This work was funded by the Fondo de Ciencia, Tecnologia e Innovacion--Sistema General de Regalias de Colombia, under project SIGP 66777, BPIN 2020000100041. The work of [PERSON]. [PERSON], [PERSON], and [PERSON] was supported by Universidad de Narino, Pasto, Colombia. The work of [PERSON] was supported by Universidad Nacional de Colombia--Sede Medellin, Colombia.  
Not applicable.  
We thank the Department of Electronics Engineering of the Universidad de Narino and the GIIEE research group for supporting the academic and financial processes that allowed us to carry out this project. We also thank the Universidad Nacional de Colombia, Sede Medellin.