The stochastic nature in the electrical discharge machining (EDM) is inherent to the process. The process instabilities like short-circuiting and arcing instances damage the workpiece and reduce machining efficiency. Pseudo-empirical or empirical relationships are presently in use for in-process control of parameters like discharge efficiency, energy consumption, and surface roughness. In this paper, a field-programmable gate array (FPGA)–based control strategy for discharge stabilisation is proposed, and a non-linear model for energy consumption is formulated to predict the in-process energy consumption. The model captures the dynamic behaviour of the EDM process. A novel method of pulse discrimination based on the pulse train gradient is used to determine the pulse duration, classify the pulses and finally calculate the discharge energy for building the model. A lumped control parameter named as gap condition number or “Gc number” is proposed to quantify the amount of debris and contaminants like soot and suspended particles in the electrode gap. Numerical simulations at various gap conditions and analysis for stability and sensitivity at different operating scenarios are studied. The simulation shows that the model converges to a single root for Gc number up to 1.93, undergoes periodic oscillations between two roots for the values between 1.93 and 2.42 and exhibits chaos for greater Gc numbers. Stability analysis of the model finds that the values of the non-dimensionalised discharge energy for which the energy oscillations during the discharge avoids arcing or short-circuiting are 60% of the maximum discharge energy. The present model has an increased monostability of 20% in comparison to a similar model and has a correlation of 63.48% with the experimental data. The proposed control strategy can be implemented to achieve stability control over the process, eventually improving the quality of machining. © 2020, Springer-Verlag London Ltd., part of Springer Nature.