The focus of this article is on implementation of real time combustion control by using an FPGA. The feedback used for the controller is the heat release. Due to the desire to avoid using division on the FPGA an alternative way of calculating the polytropic exponent is investigated. When this method is compared against using a constant exponent it shows less fluctuations in regards to cycle to cycle variations when calculating the heat release. A dual injection strategy is used and real time control is implemented on the second fuel injection. The calculated heat release is continuously compared with a reference and then the difference is converted to a duration correction of the fuel injection. This is done by a proportional controller which is initiated after the start of the second injection. By adding a perturbation on the first fuel injection the controller is shown to compensate during the second and thereby decreasing the cycle to cycle variations.