## 2 Methodology
### Numerical Analysis of Required Regenerative Braking Force
#### 2.1.1 Evaluation of Required Braking Force  
To ensure ride comfort, the motor torque must be evaluated along with acceleration and jerk [15]. According to the magnitude of \(k\), the slope of the velocity change curve as shown in Figure 6 was obtained. The maximum deceleration was also determined.  
As \(k\) decreases, the vehicle takes longer to slow, increasing riding inconvenience. If \(k\) is greatly reduced, the vehicle takes a very long time to slow. Hence, \(k\) affects the vehicle speed, as shown in Equation (1) [16, 17].  
Equation (1) evaluates the asymptotic nature of the hyperbolic tangent function. However, it is complex to implement a small constant to control the degree of deceleration such that we have the following equation [18],  
\[b^{*}=b+2\epsilon, \tag{2}\]  
\[v^{*}=v_{0}+\epsilon, \tag{3}\]  
where  
\(b^{*}:\) difference between initial and target vehicle speed, and  
\(v^{*}:\) initial vehicle speed.  
Figure 6: Speed graph for varying values of \(k\) as vehicle slows from 30 to 10 km/h. Target time was set to 20 s. When constant \(k\) is decreased, the vehicle slowing time increases.  
The vehicle speed is altered by varying the tanh function in Equation (5). After introducing the constant \(\epsilon\) and evaluating \(k\), the corresponding speed change can be modeled by using the following equation,  
\[v_{0}=-\frac{b+2\epsilon}{2}\text{tanh}(k(\tau_{0}-\frac{\tau}{2}))-\frac{(b+2 \epsilon)}{2}+v^{*}, \tag{4}\]  
where  
\[k=\frac{\text{artanh}(\frac{b}{b+2\epsilon})-\text{artanh}(\frac{-b}{b+2\epsilon })}{\tau}, \tag{5}\]  
\(\tau_{0}\) : set point to begin deceleration, and  
artanh : inverse hyperbolic tangent function.  
\(k\) is obtained from Equation (5), and the time to reach the target speed is identified from the vehicle's speed [19; 20]. The speed is controlled by varying the tanh function, as shown in the speed graph in Figure 7.  
Equation (6) shows the acceleration obtained by differentiating Equation (1),  
\[a=-\frac{bk\text{sech}^{2}(k(t-\frac{\tau}{2}))}{2}, \tag{6}\]  
where  
\(a\) : Acceleration,  
sech : Hyperbolic secant function.  
Jerk is the change in acceleration [21] and can be derived by differentiating Equation (6) to obtain Equation (7) as follows,  
\[Jerk=bk^{2}\text{sech}^{2}(k(t-\frac{\tau}{2}))\text{ tanh}(k(t-\frac{\tau}{2})). \tag{7}\]  
By solving Equations (6) and (7) by using the graph in Figure 7, the graphs in Figure 8 were plotted.  
Figure 7: Proposed deceleration model. Speed graph showing time taken to reach target speed. Plotted by using \(k\) from Equation (5). The tanh function controls vehicle speed.  
The deceleration and the corresponding jerk are important parameters to achieve riding comfort and the values obtained are 2.5 m/s\({}^{2}\) and 2.94 m/s\({}^{3}\). Lowering the values can help achieve a more comfortable ride. Maximum acceleration is achieved when time is half of \(\tau\), which means (\(\frac{\tau}{2}\)) and is expressed in Equation (8). Maximum jerk is obtained by differentiating Equation (9) at zero, as expressed in Equation (10):  
\[-bk^{3}\text{sech}^{2}(k(t-\frac{\tau}{2}))(2\text{tanh}^{2}(k(t-\frac{\tau}{ 2}))-\text{sech}^{2}(k(t-\frac{\tau}{2}))) \tag{8}\]  
\[Jerk_{\text{max}}=0.3849 bk^{2} \tag{9}\]