  The low-voltage ride-through service is carried out in this paper according
to the voltage profile described by the IEC 61400-21 European normative when
short-duration voltage sags happen, and some instantaneous reactive power is
delivered to the grid in accordance with the Spanish grid code; the mandatory
limitation of the amplitude of the three-phase inverter currents to its nominal
value is carried out with a novel control strategy, in which a certain amount
of instantaneous constant active power can also be delivered to the grid when
small or moderate voltage sags happen. A Multiple second order generalized
integrator frequency-locked loop synchronization algorithm is employed in order
to estimate the system frequency without harmonic distortions, as well as to
output the positive- and the negative- sequence of the {\alpha}\b{eta}
quantities of the three-phase grid voltages when balanced and unbalanced
voltage sags happen in a frequency-adaptive scheme. The current control is
carried out in the stationary reference frame, which guarantees the
cancellation of the harmonic distortions in the utility grid currents using a
Harmonic compensation structure, and the implementation of a constant active
power control in order to protect the DC link capacitor from thermal stresses
avoiding the appearance of large harmonic distortions at twice the fundamental
frequency in the DC link voltage. A case study of a three-phase single-stage
grid-connected PV system with a maximum apparent power about 500 kVA is tested
with several simulations using MATLAB/SIMULINK firstly, and secondly, with some
experiments using the Controller hardware-in-the-loop (CHIL) simulation
technique for several types of voltage sags in order to do the final validation
of the control algorithms.
