This paper proposes an MPC - based (model predictive control) scheme to control active and reactive powers of DERs (distributed energy resources) in a grid - connected mode (either through a bus with its associated loads as a PCC (point of common coupling) or an MG (micro - grid)). DER may be a DG (distributed generation) or an ESS (energy storage system). In the proposed scheme, the set - points provided to MPC are forecast for future instances by a linear extrapolation to gain smooth active and reactive power exchange under various loading conditions (e.g. balanced / imbalanced, nonlinear and dynamic loading) and voltage imbalance imposed by the upstream grid. In this scheme active and reactive power control change to current control and the references of the currents are forecast. The stability of the proposed control scheme is analyzed and discussed. The effectiveness of the proposed scheme is demonstrated by extensive time - domain simulations using PSCAD / EMTDC for various conditions (various loads, voltage imbalance, parallel operation with other DGs, parameter uncertainties and measurement noises) in several case studies. Comparing the obtained results with those of the two other schemes (PI - based and convectional MPC) shows the superiority of the proposed scheme.