This paper details the development of a microgrid laboratory test rig capable of emulating linear and non-linear loads as well as dynamically varying electrical machinery such as wind turbine generators, flywheel energy storage systems and other motor/generator equipment. This test-rig is comprised of two 15 kW dc-ac converters connected in a back-to-back configuration together with a rapid control prototyping platform utilising a Linux PC to control the inverters using Simulink RealTime Workshop allowing for fast implementation and testing of inverter controls. A vector proportional integral (VPI) scheme, using a PI controller in parallel with proportional resonant (PR) controllers, was designed and implemented in the synchronous dq frame to allow for appropriate regulation of desired currents and mitigation of harmonic distortion from external sources. Experimental tests are presented to verify the operation of the emulation system under operation as linear and non-linear load emulator and a flywheel energy storage emulation in motoring mode, with results being verified through comparison to simulation and hand calculations.