More progress made today, I connected up the alternator to the engine to begin testing it under load. This was pretty successful, and the ECU all performed as expected, with only a few tweaks to the PID controller parameters to improve the AFR control. I restricted the range of fuelling down to as restricted as possible to prevent the system setting wildly large or small fuelling amounts under certain conditions. I finally managed to get the PID to maintain the AFR slightly rich within a few percent under steady state conditions.
I have now managed to successfully map my engine simulator for the fuel injection timings across all loads and engine speeds. I have set up a two dimensional array, of speed and throttle position, and inside each element is the time in microseconds (us) that the fuel injector should be open for. I’ve also added closed loop lambda feedback.