The connection of the photovoltaic solar panels to the electric grid can be carried out by using an inverter based on the Voltage Source Inverter (VSI). This converter can be controlled in an Stationary Reference Frame (StRF) by means of a resonant regulator (PR) tuned to the frequency of the grid and to some desired harmonics, so that a power factor next to the unit with a low line current THD below the limits described in the grid connection most used standards can be obtained. To get this, it is usual to estimate the phase of the electric grid by means of a Synchronous Reference Frame-Phase Locked Loop (SRF-PLL). In the present PhD, it has been carried out a study of the effect of the disturbances in the grid into the SRF-PLL and the regulators PR, and their effect in the power factor and in the THD of the current generated by the inverter. It has been proved that there exist some situations where the previously mentioned standards are not accomplished, mainly if a variation in the frequency of the grid appears, according to the tolerance defined in the standards, or when the inverter is connected to a distributed generation system in islanding situation. Keeping in mind that the most usual disturbances of the grid are imbalance and harmonic distortion, these ones can be rejected by using conventional digital filters in the SRF-PLL and in the PR regulators. Nevertheless, the performance of these filters is not good enough when the frequency of the grid varies. In the present thesis, adaptive filter theory has been used to adapt automatically the filter coefficients in order to obtain a better filtering even if a remarkable variation of the frequency of the grid appears, obtaining a good rejection of the disturbances. After studying several digital adaptive filters topologies based on FIR and IIR structures, it has been proved that the topology that offers better results is the Lattice-Notch IIR adaptive filter, which has been used in the PR regulator and in the SRF-PLL as well.