Pipeline natural gas composition is monitored and controlled in order to deliver high quality, relatively consistent gas quality in terms of heating value and detonation characteristics to end users. The consistency of this fuel means gas-fired engines designed for electrical power generation (EPG) applications can be highly optimized. As new sources of high quality natural gas are found, the demand for these engines is growing. At the same time there is also an increasing need for EPG engines that can handle fuels that have wide swings in composition over a relatively short period of time. The application presented in this paper is an engine paired with an anaerobic digester that accepts an unpredictable and varying feedstock. As is typical in biogas applications, there are exhaust stream contaminants that preclude the use of an oxygen or NOx sensor for emissions feedback control. The difficulty with such a scenario is the ability to hold a given exhaust gas emission level as the fuel composition varies. One challenge is the design of the combustion system hardware. This design effort includes the proper selection of compression ratio, valve events, ignition timing, turbomachinery, etc. Often times simulation tools, such as a crank-angle resolved engine model, are used in the development of such systems in order to predict performance and reduce development time and hardware testing. The second challenge is the control system and how to implement a robust control capable of optimizing engine performance while maintaining emissions compliance. Currently there are limited options for an OEM control system capable of dealing with fuels that have wide swings in composition. Often times the solution for the engine packager is to adopt an aftermarket control system and apply this in place of the control system delivered on the engine. The disadvantage to this approach is that the aftermarket controller is not calibrated and so the packager is faced with the task of developing an entire engine calibration at a customer site. The controller must function well enough that it will run reliably during plant start-up and then eventually prove capable of holding emissions under typical operating conditions. This paper will describe the novel use of a crank-angle resolved four-stroke engine cycle model to develop an initial set of calibration values for an aftermarket control system. The paper will describe the plant operation, implementation of the aftermarket controller, the model-based calibration methodology and the commissioning of the engine.