Resumen: In this paper, a model-based maximum power point tracking (MPPT) technique is presented for a two-stage grid-connected photovoltaic (PV) system, where the loci of the maximum power points (MPPs) is specified accurately based on a new formulation. In this formulation, the effect of both irradiance and temperature is taken into consideration, whereas the irradiance is estimated to reduce the cost of the system and enhance its reliability. Furthermore, constant power generation (CPG) is integrated with the developed MPPT method to facilitate other power regulation schemes in the PV system. The proposed methodology is compared with the well-known perturb and observe (P&O) method for evaluation. Additionally, a modified version of the P&O is included in the comparison for better assessment. The effect of different partial shading conditions on the system's performance is also investigated. The DC-link PI controller is replaced with a new adaptive DC-link controller to enhance the transient behavior of the PV system. Moreover, the suggested DC-link controller removes the DC offsets, which appear in case of gradient increase or decrease in the input PV power. In contrast to the conventional PI controller, which has poor performance at such circumstances. The active and reactive power exchange with the grid is managed using a computationally efficient finite-set model predictive control (FS-MPC) algorithm. Furthermore, switching frequency minimization is added as a secondary objective using a weighting factorless procedure. The grid-voltage sensors are eliminated and estimated using an extended Kalman filter (EKF). The overall control strategy is evaluated using experimental implementation, hardware-in-the-loop (HIL), and matlab/simulink.