A new hierarchical control scheme is proposed to improve power sharing of multi-distributed energy resources (DERs) microgrids including non-linear and unbalanced loads. The electronically coupled DERs are responsible to perform the harmonic and unbalance compensation to reduce the voltage harmonics at the point of common coupling (PCC) and improve power quality. The proposed scheme uses a complementary control loop for small/large-signal stability enhancement, and moreover exploits new concept for fundamental and harmonic virtual impedance scheme for positive and negative sequences based on IEEE standards. Compared to conventional virtual impedance methods that add only line current feed-forward terms to the voltage reference, here, the line current and voltage at the PCC regulate the virtual impedance at fundamental and harmonic frequencies, respectively. So, mismatches in the feeder and line impedances are compensated. Also, a harmonic power calculation is presented based on the non-linear mapping capability of radial basis function neural networks to obtain voltage harmonics and active and reactive powers for balanced/unbalanced operation modes. To show the effectiveness of the proposed control scheme, offline time-domain simulation studies have been performed on a sample microgrid using MATLAB/Simulink software and OPAL-RT real-time digital simulator for verification.