Smart Shift Decision Method Based on Stacked Autoencoders

Manual calibration and testing on real vehicles are commonmethods of generating shifting schedules for newly developed vehicles. However, these methods are time-consuming. Shifting gear timing is an important operating parameter that affects shifting time, power loss, fuel efficiency, and driver comfort.The stacked autoencoder (SAE) algorithm, a type of artificial neural network, is used in this study to predict shifting gear timing on the basis of throttle percentage, vehicle velocity, and acceleration. Experiments are conducted to obtain training and testing data. Different neural networks are trained with experimental data on a real vehicle under different road conditions collected using the CANcaseXL device and control AMESim simulation model, which was constructed based on real vehicle parameters.The input number of SAE is determined through a comparison between two and three parameters. The output type of SAE is determined through a comparative experiment on pattern recognition and multifitting. Meanwhile, the network structure of SAE is determined through a comparative experiment on simple and deep-learning neural networks. Experimental results demonstrate that using the SAE intelligent shift control strategy to determine shift timing not only is feasible and accurate but also saves time and development costs.


Introduction
Shift control is a key technology in automotive automatic transmission control because it directly affects the fuel economy and dynamic performance of vehicles [1].Current methods of gear decision-making consist of two categories.One is the traditional method, in which an optimal method for solving the shift schedule is established after the shift control parameter is selected according to a certain performance index.The other method involves using intelligent shift, driving experience, and expert knowledge.Shift control in the traditional basic shift schedule is based on different parameters (e.g., single-, two-, or three-parameter shift schedules).However, regardless of the number of parameters, a shift schedule can only reflect the running state of a vehicle and does not fully consider the intention of the driver and the automotive environment.Manual calibration and testing on real vehicles are common means of generating shifting schedules for newly developed vehicles; however, these methods are time-consuming [2].Current research on intelligent shift decision-making mainly includes two methods, namely, those based on fuzzy logic and those based on neural networks [3][4][5][6].Alternate method based on artificial intelligence techniques implemented with fuzzy controllers is proposed [7].Elnashar used the fuzzy theory and neural network to establish the automatic variable speed controller of the automobile and carried out the computer simulation [8].Gear shift strategy is based on stochastic dynamic programming [9].Mechatronic gear shift system has been developed and tested in a passenger car reducing fuel consumption and improving the vehicle drivability [10].Casavola et al. have fully analyzed and here described genetic and fuzzy algorithm gear shifting strategy [11].The artificial neural network (ANN) has strong nonlinear mapping and generalization capabilities and can even be trained to adapt to the dynamic conditions of vehicles, road conditions, and changes in the characteristics of drivers [12].A feedforward neural network that calculates optimal dynamic and economical shift schedules using a three-parameter shift schedule has been presented [13].The fuzzy neural network has been adopted for the construction of vehicles with multiparameter transmission [14].A neural network has also been developed to evaluate downhill engine brake necessity and make correct shifting decisions similar to those made by experienced drivers [15].In [16], a multilayer perceptron algorithm was applied to predict shifting gear timing.However, this algorithm can only be implemented on the AMESim transmission model and not on vehicles with transmission.Moreover, it does not consider the deviation of the optimized values.
In this study, actual vehicle data obtained from an experimental vehicle under different road conditions were analyzed using the CANcaseXL device.The network implemented on an AMESim model of the experimental vehicle with automated transmission was sufficiently trained.A stacked autoencoder (SAE) method was developed for the gear recognition rate and compared with the traditional ANN.

Experimental Vehicle Model
Figure 1 shows a diagram of neural network shift control.The vehicle model was established based on an actual test vehicle using the AMESim software.The driver and neural network controller models were established using the Simulink software.The CANcaseXL device was used to analyze the actual vehicle data of the experimental vehicle.The model described was modified based on the test data.The engine output and torque characteristics of the engine mode were changed based on the experimental data.The basic parameters of the vehicle, such as rated power, maximum engine torque, engine speed range, total mass loaded, wheel rolling radius, transmission mechanical efficiency, air resistance coefficient, and rolling resistance coefficient, were set.The transmission model's shifting logic based on a shift table is shown in Table 1, together with the setting of the solenoid valve and shifting clutch.Figure 2 presents the physical model constructed using AMESim to model the proposed vehicle.Figure 3 presents the driver and neural network controller models constructed using MATLAB to model the behavior of the driving and transmission control unit.The driver model controls the accelerator and brake pedals and outputs the signal of throttle and brake percentages with time.The neural network controller model is a sufficient training network that uses a neural network with a three-parameter shift.The details of the neural network controller model are described in the subsequent sections.

ANN and SAE
3.1.ANN.Artificial intelligence consists of two major branches.Expert systems and the study of ANN do not require detailed system information and work similar to a black box model.However, the relationships between the input parameters and controlled and uncontrolled variables are learned by studying previously tested data, similar to nonlinear regression.Another advantage of using ANN is its ability to handle large and complex systems with many interrelated parameters [17].A suitable shifting strategy based on the BP neural network algorithm has been established [18].Reference [19] presented a neural-networked, threeparameter gear-shift control.In [18,19], the back-propagation learning algorithm was used in a feed-forward process, but  these studies did not use curve fitting or pattern recognition of neural networks, which were used in [20,21].In this study, the use of curve fitting and pattern recognition was discussed.This study selected a multilayer ANN structure, as shown in Figure 4.The input data were a combination of throttle percentage, vehicle velocity, and acceleration.Gear was the desired output. was set as the sample number, and  was set as the number of samples.With a certain input   , the network output is   , and the node output is   .The node input is where   are the weights of the connection of the intermediate layer  node to the node on level  and   is the node threshold.The output of each node is a nonlinear function of the input desirable sigmoid function.
For the set of input samples  1 , . . .,   , network output set  1 ,  2 , . . .,   , and target output set  1 ,  2 , . . .,   , the error function of the sample training network can be defined as follows: where   is the ideal output value of the th output node of sample  and   is the output value of node  which stands at the output layer with the influence of sample input .With the most rapid descent method, the algorithm used to change   and   when   is zero is derived as where  is the learning ratio or epoch,   is the error signal of the th node of sample , and Δ  is incremental weight of   in sample .
If  is the output node, then If  is not the output node, then In the first training stage, the inputs and desired outputs are provided to the neural network (NN).The weights are modified to minimize the error between the NN predictions and the expected outputs.Training aims to minimize errors and consequently optimize the NN solution.Each iterative step where the weights are recalculated is called an epoch.When the minimum is achieved, the weights are fixed, and the training process ends.Once an NN has been trained to a satisfactory level, it is used as an NN controller for the AMESim model.
In this work, the back-propagation learning algorithm was used in a feed-forward, and a function fitting neural network was developed and compared with a pattern recognition neural network.An ANN that is trained and simulated with validated vehicle data was proposed and compared.The result showed that the function fitting neural network predicted gear timing better than the pattern recognition neural network.Accurate data are discussed in the next section.The three-parameter shift schedule based on neural network model was compared with the two-parameter shift schedule.The result of the comparison showed that the proposed three-parameter gear shift conformed to driver experience or practice better and was smoother for gearshift surface changes.Accurate data are discussed in the next sections.

SAE.
At present, manufacturers should improve their services, products, and technological base to achieve a sustainable value proposition, become highly efficient and effective in the market, and satisfy the needs of users.Significant emerging technologies being discussed in various research studies include wearable technologies, networked and smart environments connected by the Internet of Things, evolving tools, tangible interfaces, human-robot collaborations, processes and interactions, virtual reality, ubiquitous use of machine learning, and deep-learning algorithms [22].In the last few years, applications based on deep neural networks have performed various tasks, such as speech recognition or image classification, to levels that even exceed human abilities [23][24][25].SAE is a deep-learning algorithm.It is better than a traditional neural network.According to [26,27], SAEbased deep learning uses limited shallow neural network learning capability; thus, the depth of the network should be known when SAE is utilized.SAE consists of multiple layers of sparse autoencoders, in which the outputs of each layer are the inputs of the successive layer.Formally, we consider an SAE with  layers. (,1) ,  (,2) ,  (,1) , and  (,2) denote the parameters of  (1) ,  (2) ,  (1) , and  (2) for the th autoencoder.The encoding for the SAE is obtained by implementing the encoding step of each layer in a forward order as follows: The decoding step is obtained by running the decoding stack of each autoencoder in a reverse order as follows: The information of interest is contained in  () , which is the activation of the deepest layer of hidden units.This vector represents the input in terms of higher-order features.
An autoencoder neural network is an unsupervised learning algorithm that applies back-propagation, and it sets the target values to be equal to the inputs.The autoencoder attempts to learn an approximation to the identity function; thus, the output is similar to the input.
First, a sparse autoencoder is trained based on the raw inputs of throttle percentage, vehicle velocity, and acceleration to learn the primary features ℎ (1)   on the raw input (Figure 5).Second, the raw input is fed to the trained sparse autoencoder, thereby obtaining the primary feature activations ℎ (1)   for each of the inputs.Third, these primary features are used as the "raw input" to another sparse autoencoder to learn the secondary features ℎ (2)   on these primary features (Figure 6).Following this method, the primary features are fed to the second sparse autoencoder to obtain the secondary feature activations ℎ (2)   for each of the primary features ℎ (1)   .These secondary features are treated as a "raw input" to the softmax classifier, which trains it to map secondary features to digit labels (Figure 7).Finally, all three layers are combined to form an SAE with three parameter inputs (Figure 8).

Data Extraction.
A vehicle can only shift gears according to a fixed shift control strategy under different driving environments because the basic shift rule is preset in the controller.Thus, the given gear of the vehicle may not be the optimum.The basic shift strategy presents a poor control performance when the vehicle operates on a ramp.The vehicle encounters a cycle shift when climbing, and its speed increases with a high gear ratio.Hence, the engine brakes are not fully utilized.In this work, the CANcaseXL device was used to analyze the actual data of the experimental vehicle when shifting gears manually under different road conditions.We collected information on the driver's shift under seven different road conditions.The information was then used to train the neural network.Useful vehicle data are shown in Figures 9-15.When the neural network with three-parameter shift was trained, throttle percentage, vehicle velocity, and acceleration were treated as input data, and the gear was treated as target data.When the neural network with two-parameter shift was trained, throttle percentage and vehicle velocity were treated as input data, and the gear was treated as target data.

SAE with Data
Fitting.The function fitting neural network was compared with the pattern recognition neural network to predict gear timing.The function fitting neural network is an example of a fitting problem in which inputs are matched to associated target outputs to create a neural network that not only estimates the known targets of given inputs but also accurately generalizes the estimated outputs.The regression across a sample of the road test is plotted in Figure 16.The regression plot shows the actual network outputs plotted in terms of the associated target values.
If the network has learned to fit the data well, then the linear fit to this output-target relationship should closely intersect in the bottom-left and top-right corners of the plot.If the case is the opposite, then further training or training a network with more hidden neurons would be advisable.The value of  is an indication of the relationship between the outputs and targets.If  is close to one, then the outputs and targets have an exact linear relationship.If  is close to zero, then the outputs and targets have no linear relationship.

SAE with Pattern Recognition.
Neural networks are good at solving pattern recognition problems.A neural network with sufficient elements (called neurons) can classify any data with arbitrary accuracy.These networks are particularly well suited for complex gear shifting decisions over many variables.Therefore, neural networks are good candidates for solving gear classification problems.Then, the data were used to train the pattern recognition neural network.The performance curve is given in Figure 18.The plot shows the value of the performance function versus the iteration number (epochs).Training, validation, and test performances are plotted.The best validation performance is 0.023685 at epoch 1000.
The confusion matrix explains how the trained neural network fits the data, as shown in Figure 19.The confusion matrix is plotted across all the training data of the twoparameter neural network.The confusion matrix shows the percentages of correct and incorrect classifications.Correct classifications form the green squares on the matrices diagonally.Incorrect classifications are represented by the red squares.If the network is trained well and has learned to classify properly, then the percentages in the green squares should be large, indicating good classifications.If the case is the opposite, then further training or training a network with more hidden neurons would be advisable.The number  of experimental pieces of data is 189,808, and the percentage of correct classification is 94.383759%.
Figure 20 shows the accuracy of the neural network classification with three and two parameters.The accuracy of the three-parameter classification is relatively close to 100% and is significantly higher than that of the two-parameter classification.The comparison shows that the three-parameter gear shift conforms better to driver's experience or practice than the two-parameter gear shift.Moreover, as the data points increase, the percentages of correct classification decrease.function fitting neural network predicts gear timing better than the pattern recognition neural network.

Comparison between SAE and a Shallow Neural Network.
Figure 17 shows that the fitting effect decreases as the data points increase.Figure 20 shows that the percentages of correct classification decrease as the data points increase.As the data points increase, the learning capability of the shallow neural network becomes limited.A large amount of data for network training is required to apply the neural  network shift law and complex intersection.Hence, an ANN technique that uses the SAE algorithm was utilized to predict shifting gear timing based on throttle percentage, vehicle velocity, and acceleration.Table 2 shows that neural network with pretraining performs better than the algorithm without pretraining.

Conclusion
Manual calibration and testing on real vehicles are traditional ways of generating shifting schedules for newly developed vehicles.However, these methods are time-consuming.In this study, the back-propagation learning algorithm was used in feed-forward progress, and a polynomial fitting neural network was developed and compared with the pattern      recognition neural network.The polynomial fitting neural network predicts gear timing better than the pattern recognition neural network.The polynomial fitting neural network and pattern recognition neural network with three parameters perform better than those with two parameters.
The accuracy of the BP neural network decreases with the increase in the experimental sample points in terms of the fitting effect and correct rate after network training,  and meeting the requirements of intelligent shift control to cope with complicated conditions is difficult.However, its depth learning stack self-coding is good.At the experimental sample point of 205,632, the accuracy of SAE is 1.6% higher than that of the BP neural network.Therefore, the SAE neural network with the three-parameter intelligent shift control strategy not only correctly predicts shift timing and saves time but also adapts to the different driving habits of drivers.

Figure 1 :
Figure 1: Diagram of neural network shift control.

Figure 17 :
Figure 17: Regression of the test road.

4. 4 .
Comparison of Pattern Recognition and Data Fitting underthe Same Network Structure.Two types of neural networks were trained and simulated with the validated vehicle data to determine whether a neural network with fitting predicts gear timing better than pattern recognition.Figures21-27show the output of a neural network with the input data of seven types of roads.Three curves are drawn in each figure to represent the actual vehicle gear timing, the pattern recognition network output gear timing, and the function fitting output gear timing.The comparison shows that the

Figure 18 :
Figure 18: Training error curve of the neural network.

Figure 19 :
Figure 19: Accuracy of neural network classification.

Table 2 :
Comparison of algorithms with and without pretraining.