Enhancing the performance of the voltage source inverters (VSIs) without changing the hardware structure has recently acquired an increased amount of interest. In this study, an optimization algorithm, enhancing the quality of the output power and the efficiency of three-phase grid connected VSIs is proposed. Towards that end, the proposed algorithm varies the switching frequency (f sw ) to maintain the best balance between switching losses of the insulated-gate-bipolar-transistor (IGBT) power module as well as the output power quality under all loading conditions, including the ambient temperature effect. Since there is a contradiction with these two measures in relation to the switching frequency, the theory of multi-objective optimization is employed. The proposed algorithm is executed on the platform of Altera ® DE2-115 field-programmable-gate-array (FPGA) in which the optimal value of the switching frequency is determined online without the need for heavy offline calculations and/or lookup tables. With adopting the proposed algorithm, there is an improvement in the VSI efficiency without degrading the output power quality. Therefore, the proposed algorithm enhances the lifetime of the IGBT power module because of reduced variations in the module's junction temperature. An experimental prototype is built, and experimental tests are conducted for the verification of the viability of the proposed algorithm.