This paper proposes the use of a predictive controller to regulate a dc/dc converter interacting with a photovoltaic generator and a grid-connected inverter. The proposed solution rejects perturbations generated by environmental conditions and inverter transients. In addition, the predictive controller is able to recover from inverter wrong operation, i.e. drive dc-link voltage under the photovoltaic voltage. The predictive solution is contrasted with a classical PID controller to illustrate its advantages.