The design and implementation of a voltage source inverter (VSI) is presented to emulate similar characteristics of an autonomous diesel generator for using as an emulator for microgrids. The mechanical and electrical parts of a commercial diesel engine generator are modeled mathematically and then the model is fed to a VSI as reference signals to produce the same output power characteristics as in a real diesel engine generator. Droop control is also included in the control loop. The underlying inverter is designed with voltage and current control loops in the dq-frame and proper filtering and coupling inductors are included. The synchronous machine is also modeled as a generator represented by model 2.1 of the IEEE Std. 1110-2002. The emulator is designed in a modular way to have the flexibility to allow the study of parallel operation of wind or hydro-kinetic energy conversion system with the diesel generator where are being considered in remote parts of Quebec. For experimental validation, the control algorithm is implemented in dSpace using the DS-1103 controller board where the external measured and internal signals are processed.