# Real-Time Hybrid Navigation System-Based Path Planning and Obstacle Avoidance for Mobile Robots
## 6 Discrete Time Control Method  
PCBC is the curve that has a parameter that does not respect to arc length [17]. Therefore, it cannot be used directly as a robot trajectory. To solve this problem, reparameterization is required. This study employs a local linear approximation approach for approximating the curve parameter based on the arc length. Based on Equations (21) and (22), by sampling curve parameter we can obtain Table 1 for converting between arc length and curve parameter. Let \(L_{R}\)(t) be the total distance traveled by the robot from its initial position to \(\mathbf{P}_{R}\)(t). Suppose that robot have followed the curve, from the table above, we can approximate the value of the curve parameter u and v respect to \(t\). \[ \begin{array}{l}u(t)=u(L_{R}(t))\\ v(t)=v(L_{R}(t))\end{array}  \tag{23}\]  
Let \(\mathbf{P}^{\prime}_{R}\)(t) = \(\mathbf{P}^{B}\mathbf{R}\)(t) = \(\{u\)(t),\(i\)(t)\(\}\) be the desired position of the robot on curve respect to curve parameter at time \(t\). Let \(\kappa(t)\) = \(\kappa\)(\(u\)(t),\(i\)(t)) be curvature of curve at time t. According to Equation (2), \(\kappa\)(\(t\)) can be achieve by equation below. \[\kappa(t)=\frac{\dot{\mathbf{B}}(u(t),v(t))\times\ddot{\mathbf{B}}(u(t),v(t))} {\|\dot{\mathbf{B}}(u(t),v(t))\|}^{3} \tag{24}\]  
Figure 6: Curvature of piecewise cubic Bézier curve (C\({}^{2}\) PCBC) are continuous over the entire curve. Let VS(t), \(\omega\)S(t) is the desired linear and angular speed of robot at time t; \(\theta_{R_{S}}(t)\), \(\theta_{L_{S}}(t)\)are the desired right and left wheel angular speed of robot, \(\theta_{\max}\) is the maximum angular speed that robot gear can achieve. According to Equations (1) and (3), if \(\kappa(t)>0\) then set \(\theta_{R_{S}}(t)=\theta_{\max}\) and \(\theta_{L_{S}}(t)\) by the Equation (25). \[\theta_{L_{S}}(t)=\frac{2-\kappa(t)l_{w}}{2+\kappa(t)l_{w}}\theta_{R_{S}}(t) \tag{25}\]  
If \(\kappa(t)<0\) then set \(\theta_{L_{S}}(t)=\theta_{\max}\) and \(\theta_{R_{S}}(t)\) based on Equation (25). According to Equation (1) we can obtain \(V_{S}(t)\) and \(\omega\)S(t). According to Equations (24) and (25), the robot can constrain its speed when moving on a trajectory. However, as the discussion in [18], maintaining maximum speed on one gear causes the robot to easily slip out of the desired trajectory when the robot goes through a trajectory segment which has large curvature due to its failure to respond to the acceleration in the other gear. That reason causes deviations between \(V_{S}\)(t), \(\omega_{S}\)(t) and \(V_{R}\)(t), \(\omega_{R}\)(t). Together with the open system, the robot cannot determine the error between its actual position and desired position on the curve that causes cumulative errors described in Figure 7. Therefore, the desired position of the robot on the curve will be different from the actual position \(\mathbf{P}^{\prime}_{R}(t)\
eq\mathbf{P}_{R}(t)\). To be able to create a closed-loop system, the robot will refer to its true position by localization sensors, while the desired position on the trajectory is determined by the parameter of the curve determined by Equation (15) and (23). By the position error, the robot needs to be navigated for returning initial trajectory. To overcome this problem, we propose a method of re-path algorithm summarized in Figure 8. Instead of changing the robot behavior, our method changes shape of initial trajectory. Let \(\varepsilon(t)\) be the position error of the robot. If \(|\varepsilon(t)|>\varepsilon_{max}\) then based on the main trajectory, the robot will reproduce a new path that does not differ from the remaining path to help the robot return desired position. The new path receives the actual current position of the robot is the initial point, \(\mathbf{P}_{\mathrm{back}}(t)\) is the point located in the curve and it is added to the new path. points in path point set that the robot has not passed through are also added to the new path. The C\({}^{2}\) PCBC generator takes its role and generates a new trajectory called a reshaped trajectory.