# Obstacle Avoidance in a Three-Dimensional Dynamic Environment Based on Fuzzy Dynamic Windows
## 3 Proposed Dynamic Window Approach
### The Fuzzy Rule for the DF_DWA
When the distance to the goal and the distance to the obstacles are long (i.e., longer than 5 agent radii), the agent does not need to avoid obstacles first. The agent should accelerate to a certain speed and approach the goal with moderate attention. \(\varepsilon_{\textit{obstacle}}\) can therefore be set at a small value. The value of \(\varepsilon_{\textit{goal}}\) can be increased moderately. \(\varepsilon_{\textit{heading}}\) can be set at a large value. 2. When the distance to the goal is long and the distance to obstacles is short (i.e., shorter than 2 agent radii), the agent should avoid obstacles first and not rush to approach the goal. The weight of the agent speed should be reduced to guarantee that the agent has enough time to adjust the forward direction. Therefore, \(\varepsilon_{\textit{obstacle}}\) should be set at a large value while \(\varepsilon_{\textit{goal}}\), \(\varepsilon_{\textit{heading}}\), and \(\varepsilon_{\textit{speed}}\) should be set at a small value. 3. When the distance to the goal is short and the distance to obstacles is long, the agent should approach the goal first and not rush to avoid obstacles. The weight of the agent speed should be appropriately reduced to ensure that it reaches the goal safely. \(\varepsilon_{\textit{obstacle}}\) and \(\varepsilon_{\textit{speed}}\) can therefore be set at a small value, while \(\varepsilon_{\textit{goal}}\) being set as the predominant weight and \(\varepsilon_{\textit{heading}}\) being set at a medium value. 4. When the distance to the goal and the distance to obstacles are short, the agent should avoid obstacles first and approach the goal with moderate attention. The weight of the agent's speed should be reduced. \(\varepsilon_{\textit{speed}}\) and \(\varepsilon_{\textit{heading}}\) should therefore be set at a small value. \(\varepsilon_{\textit{obstacle}}\) should be set at the predominant weight. \(\varepsilon_{\textit{goal}}\) should be set at a medium value. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Configuration** & \(\alpha\) & \(\overline{v}\) & \(\overline{\omega}_{\textit{pitch}}\) & \(\overline{\omega}_{\textit{gate}}\) & \(\sigma_{\
u}^{2}\) & \(\sigma_{\omega_{\textit{pitch}}}^{2}\) & \(\sigma_{\omega_{\textit{pump}}}^{2}\) \\ \hline No \(\varepsilon_{\textit{pitchreading}}\) & 282 & 0.7204 & 0.0034 & \(-\)0.386 & 0.0091 & 0.0029 & 02630 \\ Predominant & 197 & 0.3621 & 0.0039 & 0.0495 & 0.056 & 0.0231 & 0.0040 \\ No \(\varepsilon_{\textit{synchronading}}\) & 219 & 0.7165 & \(-\)0.1571 & 0.0515 & 0.0107 & 0.2323 & 0.0048 \\ Predominant & 462 & 0.16 & 0.006 & 0.0244 & 0.0258 & 0.0123 & 0.0073 \\ \(\varepsilon_{\textit{synchronading}}\) & 100 & 0.0318 & 0.0602 & 0.0779 & 7.12 \(\times\) 10\({}^{-4}\) & 0.003 & 0.0047 \\ No \(\varepsilon_{\textit{goal}}\) & 354 & 0.6429 & 0.0282 & 0.4408 & 0.0282 & 0.0240 & 0.1436 \\ No \(\varepsilon_{\textit{obstacle}}\) & 234 & 0.3038 & 0.0142 & 0.0417 & 0.0372 & 0.0147 & 0.0048 \\ Predominant \(\varepsilon_{\textit{obstacle}}\) & 187 & 0.2055 & 0.0095 & 0.0415 & 0.0438 & 0.0109 & 0.0093 \\ No \(\varepsilon_{\textit{goal}}\) & 340 & 0.2139 & 0.0097 & 0.0429 & 0.0446 & 0.0114 & 0.0091 \\ Predominant \(\varepsilon_{\textit{speed}}\) & 169 & 0.4195 & 0.0293 & 0.0817 & 0.0723 & 0.0178 & 0.0039 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The results of the parameter test. The fuzzy rules Distgoal, Diatobstacle and \(\varepsilon_{goal}\), \(\varepsilon_{obstacle}\), \(\varepsilon_{spend}\), \(\varepsilon_{heading}\) are shown in Tables 2-5. Figure 11: Fuzzy output membership functions. Figure 10: Fuzzy input membership functions. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \multicolumn{5}{c}{**Distobstacle**} \\ \cline{2-5}
**Distgoal** & **ZS** & **PS** & **PM** & **PB** & **PH** \\ \hline Z & ZS & ZS & PS & PM & PB \\ PS & ZS & ZS & PS & PM & PB \\ PM & ZS & ZS & PS & PM & PB \\ PB & ZS & PS & PM & PM & PB \\ PH & ZS & PS & PM & PB & PH \\ \hline \hline \end{tabular}
\end{table}