Chapter 6: Neural Network based AFR Control
6.5 Neural Network Training Process
6.5.1 Training Input Selection Strategy
Training a perfect NN controller is to ensure that both the input and output data include all possible working conditions. For the training purpose a set of throttle angle data and a set of engine torque load should be generated, both of which are then used for manipulations of the engine simulation module. In addition, 9 data sets required by both the controller and the controller’s output data should be stored to achieve full working condition simulations. To determine the throttle angle, the engine idle speed is set at 850 rpm the throttle angle is 8.58 degrees, represent conditions for the steady state of the simulation system at this idle speed. Consequently, the throttle angle is set to the range between 8.58 and maximum angle of 90 degrees.
Once the range of throttle angle is determined, the engine load can then be analysed. Based on the engine’s performance, its load is known to be within the range (0-200Nm). As discussed in section 4.4.1, a simulation system that includes the vehicle dynamics model can provide the engine with real-time torque load. However, the model does not necessarily cover all working conditions of the engine due to possible strategy shifts in practice, such as the transmission box. Hence, the engine simulation model torque load input needs to be designed. Consider two randomly generated torque scenarios: one is high torque load when throttle angle is small and this results in engine overloaded and the system error; the other is small torque when throttle angle is large and this leads to high speed of the engine exceeding the maximum safe value at the actual state. Consequently, the module output should be complemented by a protection logic module, with two different algorithms:
(a) The minimum torque protection
The minimum speed of engine is at idle, which is 850 rpm (see Chapter 4), and the maximum torque at this speed is 160 Nm. However, the maximum torque is not suitable for all throttle angles. For example, if 1) the engine load is 160 Nm and the speed is 850 rpm; 2) the throttle angle is relatively small, the actual torque is less than the load torque, and as a result the engine stops running eventually. This situation can be actually avoided by either lowering the speed gear or using biting point of the clutch. In the simulation system these situations are not necessarily taken into consideration, hence a protection module is needed. For example, if the engine is running at 850 rpm then the
156
protection module starts working by comparing the automatically generated torque load against the maximum torque given by throttle angle. If the generated torque load is larger, the protection module will automatically switch to the corresponding safety value. The maximum output torque with regard to different throttle angle can be obtained through steady state tests of the engine simulation platform, and their results are shown in Fig 6.20 below.
Figure 6.20: Minimum Torque VS Throttle Open Angle
(b) The maximum torque protection
As discussed in Chapter 4, the maximum of precisely simulated speed of the engine simulation platform is 5500 rpm. This is the maximum safe speed of the engine, and simulation results are not accurate for any speed exceeding this number. If the simulated engine speed reaches 5500 rpm, the throttle angle is very large and engine load is small, then the engine speed can be easily increased beyond the safe limit. In order to avoid this situation when torque load is small, a comparison module should be added to the torque module. If the increased engine speed exceeds the maximum safe amount, then the protection system will be connected, providing a reasonable torque load to bring engine speed down to a safe range. This is shown by Fig 6.21 below, where engine torque load is sampled from the engine simulation platform for different throttle angle when the engine speed is set at 5500 rpm.
To rq u e (Nm )
157 Figure 6.21: Maximum Torque VS Throttle Open Angle
The logic of these two protective modules can be brought together in the following flow chart (Fig 6.22). The torque model randomly generates torque load, and at the same time the throttle module generates a throttle angle. The working process of the engine controlled by the both modules is: if the engine feedback speed is less than or equal to 850 rpm, the Max Torque is activated by the system to produce torque load corresponding to the generated throttle angle. The Max Torque is connected until the engine speed exceeds 850 rpm, at the point the Torque model is switched on again. If the engine speed is greater than or equal to 5500 rpm, the system will switch the load torque signal to the Min Torque model, which has the same basic work principles as that of Max Torque.
Figure 6.22 Torque Protection Model Flow Chart
SIMULINK compiled by a streamline chart is shown in Fig 6.23. Both Min block and
Engine Speed>=5500 Engine Speed<5500 Engine Speed<=850 Engine Speed>850 Torque Model Max Torque Min Torque Engine To rq u e (Nm )
158
Max block use lookup table block, and the data are compiled by Fig 6.20 and Fig 6.21. The random throttle and torque data are generated by MATLAB, which also produces a time matrix for them. These established matrices are entered into the corresponding lookup table block, and the Time block is used during simulations to achieve synchronisation.
Figure 6.23: Torque Protection Model Flow Chart in SIMULINK