## Modeling the performance of an engine

##### By Roberto López, Artelnics.

Nowadays, engine manufacturers are trying to implement strategies that provide the best efficiency and are as clean as possible. Deep learning can be used to model the behavior of an engine, based on the most important operational variables. This can be used for a variety of purposes, which include performance optimization or predictive maintenance.

The data set used in this study contains quantitative information about fuel rate and angular speed of an engine, and its corresponding torque and NOx emissions. Data from 1.200 different engine operations has been acquired. A simple cross-plotting identified the presence of a few outliers, which were removed.

That input and target variables are summarized in the following table.

There are 60% of the instances for training, 20% for generalization, and 20% for testing.

This application is solved with the professional predictive analytics solution Neural Designer. The objective is to design a model which is capable of predicting accurately the engine operation. In this way, a neural network is trained to learn the underlying relationships between the outputs (torque and emissions) and the inputs (fuel rate and speed).

The next picture shows the neural network that defines the model mentioned before. The number of inputs is 2, and the number of outputs is 2. The complexity, represented by the number of hidden neurons, is 6.

In order to validate the predictive capabilities of the model, the neural network is tested against data that it has never seen. A useful method for that is to perform a regression analysis between the outputs from the neural network and the corresponding targets in the testing data.

The next picture shows the results of the linear regression analysis for the torque. As we can see, the results for that performance variable are very good. Indeed, the correlation coefficient is almost 1. Also, the intercept and slope are also very close to 0 and 1, respectively. This demonstrates the model´s very accurate predictions for the torque.

The next picture shows the linear regression analysis results for the NOx emissions. As before, the predictions here are very accurate. The correlation coefficient is close to 1, and the regression line is well adjusted.

It is also convenient to explore the errors made by the neural network; the mean error for the torque is 0.83%, and for the NOx emissions rate is 3.61%. Note that the torque is slightly better modeled than the emissions. This was expected, since physical processes are more stable than chemical processes.

Once the model has been tested, we can use it to predict the torque and the emissions as a function of the rotational speed and the fuel flow. For that purpose, we can use the mathematical expression of the neural network, which is listed below.

scaled_fuel_rate = 2*(fuel_rate-0.6)/(314-0.6)-1; scaled_speed = 2*(speed-612.1)/(1801.8-612.1)-1; y_1_1 = tanh(-1.11096-1.61239*scaled_fuel_rate+0.430536*scaled_speed); y_1_2 = tanh(0.53813+0.546026*scaled_fuel_rate-3.48146*scaled_speed); y_1_3 = tanh(2.41882-2.12554*scaled_fuel_rate+3.45315*scaled_speed); y_1_4 = tanh(1.31628-1.76257*scaled_fuel_rate-0.881265*scaled_speed); y_1_5 = tanh(-0.134698-0.138303*scaled_fuel_rate+2.60122*scaled_speed); y_1_6 = tanh(0.110113+0.472119*scaled_fuel_rate-0.0221803*scaled_speed); scaled_torque = (-0.190618-0.174056*y_1_1+0.215817*y_1_2-0.00182521*y_1_3-0.0968754*y_1_4+0.287748*y_1_5+1.61218*y_1_6); scaled_nitrous_oxide_emission = (-0.780686-1.56753*y_1_1+1.44214*y_1_2-0.406431*y_1_3+0.453272*y_1_4+1.93066*y_1_5-1.23584*y_1_6); torque = 0.5*(scaled_torque+1.0)*(1784.3+176.7)-176.7; nitrous_oxide_emission = 0.5*(scaled_nitrous_oxide_emission+1.0)*(1774-0);

The expression can be added to whatever software tool you wanted to use. It can be used by an engineer for performance optimization or it can be embedded in a car for predictive maintenance.

In summary, deep learning allows you to accurately predict the behaviour of an engine in its whole operational range.
The outcomes are improvement of the engine's performance in a more ecological way and prevention of any possible failure before it happens.

As we already mentioned, this problem has been solved with the professional deep learning solution Neural Designer.
To find out more about Neural Designer click here.