This research work is about the development of a data-driven model of a dual fuel diesel engine fuelled with renewable fuels (waste cooking oil and ethanol). In the first phase of the work, test engine was modified to operate in a dual fuel mode with ethanol as primary fuel and waste cooking oil as pilot fuel. It is followed by the development of the algebraic model comprising of sub-models like gas exchange process, charge compression process, combustion and expansion process. Wiebe's function was used to develop the combustion model. In the second phase of the work a data driven model was developed using state space approach. Engine power output, mass of air, mass of waste cooking oil, mass of ethanol, in-cylinder volume and experimental pressure data were feed as the input to the model. Model is solved for in-cylinder pressure data. It was trained until the output of the model matches the experimental pressure data. Prediction error method was used to estimate outputs of the state space model. Further, the performance and prediction capability of the developed state space models were computed and results were compared with experimental and algebraic model data. Finally, the stability of the engine with respect to the chosen input conditions were analyzed using the concepts of pole zero and unit circle. It was found that developed state space model demonstrated a higher accuracy (i.e. 26%) than the algebraic model in capturing the dynamics of the output. Predicted output of the model is found to be very close with experimental data. It is also inferred that, the developed state space model claimed stable operation of the engine with respect to all the inputs other than mass of air and engine power output. Thus, this work concludes that state space approach is an efficient tool to predict the engine dynamic behavior and has a potential to forecast the behavior of the engine under analysis.