| Modeling and simulation of diesel engine and its electronic control system are very difficult and pivotal technology in their developments. In this paper, the mathematical model of in-cylinder working process is deduced according to in-cylinder working characteristic of four-stroke direct injection diesel engine. On basis of the mathematical model, first time the author has built a zero-dimension simulation model of diesel engine based on software Simulink and run it, the simulated results are accorded with the tested data, which proves that the model is accurate and modeling and simulation using software Simulink is valid in diesel engine. During the modeling two key problems not discussed previously are solved that would imply how to design a general phase crankshaft angle module based on valve-timing phase and how the simulated results produced by phase submodels in the same integer model keep consistent with those in the separate phase submodel, which are significant in theory and can be widely applied. Besides, a new real-time simulation technology of hardware-in-the-loop and its simulation constitution in developing diesel engine electronic control system are researched and a dynamic zero-dimension model of common rail diesel engine and its control system unit model are built for further investigation. |