Design and Simulation of Auto-Shifting System in Manual Transmission Gearbox for Electric Race Car with Fuzzy Logic Controller on Matlab-Simulink

In a race car that uses manual transmission, the driver has to be more focus in driving due to the shifting process. This research develops a system that is able to operate shifting process of manual transmission automatically, which later named as auto-shifting manual transmission. There are two important programs inside the system; auto-shifting program, which is used to control shifting process automatically, and auto-accelerator program, which is used to control acceleration value automatically in shifting process based on the driver’s acceleration behavior. In the simulation results, it shows that the auto-shifting program works properly for 1st gear ratio up to 4th gear ratio, with RPM parameter of 500 RPM for Race Mode and 300 RPM for Efficient Mode. The auto-accelerator program has good result in decreasing the Output RPM Value with specific value in order to get RPM target to obtain a proper and smooth shifting process. Furthermore, the auto-accelerator program successfully reads and memorizes “the acceleration behavior” or the slope of Acceleration Input Value and uses it to make its own rising value without changing the Acceleration Input Value as the manual accelerator. Overall, both auto-shifting and auto-accelerator programs are shown to work successfully.


Introduction
There are many vehicles with alternative power source, which are developed to subtitute the using of gasoline engine vehicle, such as, electric vehicle. Electric vehicle seems to be the future's most viable vehicle option for reducing the rate of oil usage and improving air quality and less emission [1]. Electric vehicle has been used widely in automotive field, such as passenger cars, motorcycles, busses, and even race cars. Recently, many research topics had been conducted to develope electric vehicle technologies, such as electric motor, drivetrain of electric vehicle, and battery technologies. There are many researches from around the world that focus on electric vehicle technologies, one of them being a research team for electric race cars, Arjuna Elactric Vehicle Universitas Gadjah Mada. Another study in electric race car had also been done, which is about protoype design and evaluation of Formula Society of Automotive Engineers electric vehicle [2].
In electric race car, there are some variables that related to its performance, namely, acceleration, top speed, and efficiency. These variables are affected by electric motor, battery, and also transmission or drivetrain. Transmission is an affecting variable in car's performance and character. Manual transmission is chosen to be one of the transmissions that able to deliver better car's performance than the other type of transmissions, such as epicyclic gear and Continous Variable Transmission (CVT)  [3]. Altough most of the electric vehicle use automatic transmission such as epicyclic gear or planetary, the using of manual transmission on electric vehicle is an alternative solution to increase its performance because manual transmission has better mechanical efficiency than automatic transmission [4].
In a race car that uses manual transmission, the driver has to be more focus in driving due to the shifting process, which is a disadvantage of the manual transmission. Therefore, this research will develop a system that able to operate shifting process of manual transmission automatically, which later named as auto-shifting manual transmission. This system will allow the driver to fully concentrate to the road and just operate acceleration and brake pedal, while the shifting process will be operated automatically by the controller. Besides auto-shifting system, there is auto-accelerator system in the controller. It is employed to control automatically the increasing or decreasing of acceleration value in the shifting process. Otherwise, both of these systems are improved with fuzzy logic controller to enhance controller's program quality. Auto-shifting and auto-accelerator system aimed to increase both car's performance, including acceleration and top speed, and also efficiency.

Design of Experiment
In this research, design and simulation process of auto-shifting system is conducted. The system itself is built in microcontroller Arduino Mega 2560 and programmed with Simulink on MATLAB R2013b.
Arduino is an open-source platform used to develop electronics projects, which consists of both a physical programmable circuit board and a software, or IDE (Integrated Development Environment) that runs on computer [5]. The system program involves auto-shifting program with fuzzy logic controller and auto-accelerator program, functioned to control shifting process automatically and to interupt and control acceleration value automatically in shifting process respectively. The application of fuzzy logic controller in vehicle automation technologies ranges in many studies, such as controlling clutch on hybrid vehicle [6] and controlling wet friction clutch [7].
There are important instruments utilized in this experiment, such as potentiometer as the accelerator input, microcontroller Arduino Mega 2560, and custom PCB board, which consists of push buttons, and LEDs. The scheme of instruments are shown in Figure 1. In addition, Simulink is also used in the experiment to execute and display the experiment result in external mode. External mode is a mode in Simulink that allows simulation done with another instrument connected to computer and display the result of the simulation at the same time, as shown in Figure 2.

Experimental Procedure
The auto-shifting system program has 3 inputs and 1 output. The inputs are Acceleration Input Value, which uses a potentiometer, Race Mode toggle, and Efficient Mode toggle. The output is an Output RPM Value which is produced by the program inside the system. Both Acceleration Input Value and Output RPM Value have value of 0 to 666 RPM.
Fuzzy logic controller operated in this program has one input and output, which is Acceleration Input Value and shifting signal respectively. Inside the fuzzy logic controller, there is a parameter of Acceleration Input Value deciding when the shifting signal is produced. There are two different mode in this program, which is Race Mode and Efficient Mode. The difference between these modes is on the parameter of accelerator value. In Race Mode, parameter of Acceleration Input Value is set at 500 RPM, and in Efficient Mode, parameter of Acceleration Input Value is set at 300 RPM. If the Acceleration Input Value in Race Mode reaches 500 RPM, then shifting signal is produced. Meanwhile, if the Acceleration Input Value in Efficient Mode reaches 300 RPM, then shifting signal is produced. Race Mode uses higher RPM than Efficient Mode in order to get the maximum performance of the electric race car. Race Mode provides high performance but it uses much electrical power of the battery. While, Efficient Mode uses lower RPM than Race Mode in order to get the minimum electrical power usage of the battery.
After shifting signal is produced, it will give command to the shifting program to change the gear value of the manual transmission gearbox, which is later named upshifting process. Noted that the manual transmssion gearbox used in this study is a motorcycle manual transmission gearbox without clutch system and has 4 gear ratios. In addition, the mechanism of shifting automation uses a 24 V DC Motor to move the shifting lever. The shifting time is assumed to be zero because in this study, the simulation is only simulating the program in Simulink. Then, when the shifting process happens, the auto-accelerator program will produce signal to decrease the Output RPM Value with specific value. It has to be done so that the Output RPM Value will have specific RPM target, which will decrease smaller as higher gear ratios were changed.
Prior to Acceleration Input Value reaching its parameter value, the auto-accelerator program will read and memorize the slope of the increasing input acceleration value to determine the driver acceleration behavior. Later on, this slope value will be used in auto-accelerator process. The autoaccelerator process is a process to control automatically the Output RPM Value according to the driver acceleration behavior, during the shifting process. One example of this program can be seen in Figure  2, which the blue line indicates the Acceleration Input Value and the red line indicates Output RPM Value.
In this experiment, the program will be tested with two different acceleration behavior of Acceleration Input Value for both Race Mode and Efficient Mode. The first acceleration behavior is a The second acceleration behavior is a fast acceleration rate. This type of acceleration behavior can be indicated with fast rising value of Acceleration Input Value, which is about 200 RPM/s for Race Mode and 100 RPM/s for Efficient Mode. The Acceleration Input Value will be operated manually with potentiometer and the response of the auto-shifting program will be shown in the Output RPM Value.

Fuzzy Logic Controller
Fuzzy logic used in this research is based on SISO (Single Input Single Output) fuzzy system, which uses Mamdani inference. Mamdani inference has simple expression on par with great computational and intuitive properties [8]. Mamdani type inference expects the output membership functions to be fuzzy sets. After the aggregation process, there is a fuzzy set for each output variable that needs defuzzification [9]. Fuzzy inference applied in this research uses trapezoidal input membership function and singleton output membership function. Fuzzification equation used in fuzzy inference for both Race Mode and Efficient Mode can be representated in Eq. (1): Where for Race Mode, a=480 and b=500; for Efficient Mode, a=280 and b=300.
For rule evaluation of the fuzzy sets, min-max method is used and then it will give fuzzy output. Defuzzification equation with center of mass method is used in fuzzy inference for both Race Mode and Efficient Mode and can be representated in Eq. (2):

O = ∑{(Fuzzy Output) x (Singleton Position)} / ∑(Fuzzy Output)
Where O is the output value of shifting signal and fuzzy output is gained from rule evaluation.

RPM Target in Shifting Process
It has been mentioned about RPM target used in shifting process. RPM target can be calculate based on gear ratio in the transmission. This research uses manual transmission gear box with 4 gear ratios and the description is shown in Table 1.

RPM target for (n) gear ratio = RPM parameter x {[(n) Gear Ratio] / [(n-1) Gear Ratio]}
(3) Which in this case, RPM parameter = 500 for Race Mode; RPM parameter = 300 for Efficient Mode; (n-1) is the number of gear before the shifting process takes place; (n) is the number of gear after the shifting process takes place. The value of (n) is 2, 3, and 4. With this equation, RPM target for every gear ratio and mode can be determined as shown in Table 2, but in different case the value of RPM target is determined by Fuzzy Logic calculation. The RPM decreasing process is needed to gain a proper and smooth shifting process with varied gear increment manual transmission gearbox [3].

Algebraic Loop in Auto-accelerator Program
The auto-accelerator program uses algebraic loops in creating an independent signal with certain slope and uses it as the automatic acceleration value. In a Simulink model, an algebraic loop occurs when a signal loop exists with only direct feedthrough blocks within the loop. Direct feedthrough means that the block output depends on the value of an input port; the value of the input directly controls the value of the output [10]. Algebraic loop is difficult to solve mathematically. In order to solve this in Simulink, algebraic loop must be added with a small delay or added with memory block, which can be seen in Figure 3. With solved algebraic loop, it will produce an output graphic that is linear and has slope vaule of 1.   Figure 4 shows that the simulation of auto-shifting program was conducted successfully. It is indicated by the initiation of shifting process that begins in every 500 RPM for 1 st gear ratio up to 3 rd gear ratio, for both fast rising slope and slow rising slope simulation. The shifting process can be seen in Figure 4. Furthermore, the auto-accelerator program is an another success in this simulation. It is shown by the red line graphic in Figure 4. It shows that the Output RPM Value is decreased by specific value in order to get RPM target value after shifting process is completed. Both fast rising slope and slow rising slope in Race Mode have the same RPM target value, which can be seen in Table 2. In addition, auto-accelerator program successfully reads and memorizes "the acceleration behavior" or the slope of Acceleration Input Value and uses it to make its own rising value without changing the Acceleration Input Value as the manual accelerator. This automatic acceleration rising value is done repeatedly in shifting process of 1 st gear ratio up to 4 th gear ratio. After it reaches 4 th gear ratio, the automatic acceleration rising value keep rising until it gets the same value with Acceleration Input Value, as shown in Figure 4. Overall Race Mode simulation results show that both the autoshifting and auto-accelerator program work properly for different " acceleration behavior" or rising slope of the acceleration input, whether it is a fast or a slow rising slope.

Efficient Mode Simulation
The simulation in Simulink is done with Efficient Mode toggle turns ON. It indicates that the RPM parameter is set on 300 rpm. Then, simulation is done with two different acceleration behavior, which is a fast rising slope of Acceleration Input Value (about 100 RPM/s) and slow rising slope of Acceleration Input Value (about 50 RPM/s). The result of the fast rising slope and slow rising slope simulation can be shown in Figure 5. In this Efficient Mode simulation for fast rising slope and slow rising slope, the result are mostly the same as the Race Mode simulation. The auto-shifting works properly, indicated by the initiation of the shifting process that begins in every 300 RPM for every shifting process in 1 st gear ratio up to 3 rd gear ratio, and then after reaches 4 th gear ratio, the auto-accelerator generates rising acceleration value until it attains the equal value with Acceleration Input Value. Due to the RPM parameter of Efficient Mode, the automatic acceleration value rises for longer period than in Race Mode, in order to get the same value with Acceleration Input Value. In addition, Figure 5 shows that the Output RPM Value is decreased by specific value in order to get RPM target value after shifting process is completed. Both fast rising slope and slow rising slope in Efficient Mode have the same RPM target value, which can be seen in Table 2.

Conclusions
In this paper, auto-shifting and auto-accelerator program had been built to automatically control a manual transmission gearbox. In the simulation results, both Race Mode and Efficient Mode simulations show that auto-shifting and auto-accelerator program are successfully working, not only in both Race and Efficient Mode, but also in various slope of the acceleration input. The auto-shifting program works properly for 1 st gear ratio up to 4 th gear ratio, with RPM parameter of 500 RPM for Race Mode and 300 RPM for Efficient Mode. The auto-accelerator program has good result for decreasing the Output RPM Value with specific value in order to get RPM target to get a proper and smooth shifting process.
Furthermore, the auto-accelerator program successfully reads and memorizes the "acceleration behavior" or the slope of Acceleration Input Value and uses it to make its own rising value without changing the Acceleration Input Value as the manual accelerator. This automatic acceleration rising value is done repeatedly in shifting process of 1 st gear ratio up to 4 th gear ratio and after it reaches 4 th gear ratio, the automatic acceleration rising value keep rising until it gets the same value with Acceleration Input Value. It comes to a conclusion that in real usage of this system, the driver will not operate the manual transmission while driving, meanwhile the microcontroller operates it instead. For further research, the auto-shifting and auto-accelerator program will be integrated with the real manual