Real-time control of Reactivity Controlled Compression Ignition (RCCI) during engine load and speed transient operation is challenging, since RCCI combustion phasing depends on fuel reactivity gradients and nonlinear thermo-kinetic reactions. This paper designs and implements a real-time closed-loop combustion controller to maintain an optimum combustion phasing during RCCI engine transient operation. New algorithms for real-time In-cylinder pressure analysis and combustion phasing calculations are developed and embedded on a Field Programmable Gate Array (FPGA) to compute RCCI combustion and performance metrics on cycle-by-cycle basis. This cycle-by-cycle data is then used as a feedback to the combustion controller, which is implemented on a real-time processor. This paper introduces a computationally efficient algorithm for detecting Start of Combustion (SOC) for the High Temperature Heat Release (HTHR) or main-stage heat release, which is then utilized to calculate main-stage CA50 (i.e. crank angle of 50% cumulative heat release). The designed RCCI controller simultaneously adjusts CA50 and Indicated Mean Effective Pressure (IMEP) during engine transient operation. For controlling CA50, either Premixed Ratio (PR) or Start of Injection (SOI) timing of high reactive fuel is utilized. The selection between PR and SOI is done based on the experimental sensitivity analysis. For controlling IMEP, fuel quantity is varied to obtain the desired engine load. The experimental validation results show that the designed controller can maintain desired CA50 during engine load transients and also reach to a desired IMEP within 3-4 engine cycles.