## 3 Cascaded Fuzzy Reward System (CFRS)
### Cascaded Structure  
In the path planning of intelligent robotic arms, particularly within the complex milieu of the textile industry, traditional integrated path-planning methods may encounter challenges such as high computational complexity, poor real-time performance, and weak adaptability to different task stages [37,38]. Therefore, this study introduces a novel CFRS, segmenting the entire path-planning process into distinct phases like initiation, mid-course obstacle avoidance, and alignment for placement. Each phase possesses its specific optimization goals and constraints, equipped with a dedicated fuzzy reward rule base. In the initial phase's fuzzy reward rule base, the priority is primarily on the robotic arm's motion smoothness and safety. A key rule states \"If the robotic arm's speed is low and it is far from obstacles, then the reward is high\". The specific rules are illustrated in Table 2, with the fuzzy logic system's output depicted in Figure 5. Such rules help ensure the robotic arm avoids sudden movements or collisions with objects in the environment during the initial stage. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(r_{lim}\) & **VG** & **G** & **M** & **B** & **VB** \\ \hline \(\mathbf{VG}\) & VG & VG & G & M & B \\ \(\mathbf{G}\) & VG & G & G & M & B \\ \(\mathbf{M}\) & G & G & M & M & VB \\ B & M & M & M & B & VB \\ \(\mathbf{VB}\) & B & B & VB & VB & VB \\ \hline \(\mathbf{VG}\) & VG & VG & VG & G & M \\ \(\mathbf{G}\) & VG & VG & G & M & B \\ \(\mathbf{M}\) & G & G & M & B & VB \\ \(\mathbf{B}\) & M & M & B & VB & VB \\ VB & B & B & VB & VB & VB \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Fuzzy rule base at the beginning stage. Figure 5: Output of the fuzzy logic system during the initial stage: The figure on the left represents the first layer, while the right figure illustrates the second layer of the fuzzy logic system. During the mid-course obstacle-avoidance phase, the focus of the fuzzy reward rule base shifts to safety and energy efficiency. The rules may become more complex, considering multiple sensor inputs and the dynamic state of the robotic arm. A principal rule is \"If the robotic arm maintains a safe distance from the nearest obstacle and consumes lower energy, then the reward is high\". The detailed rules are presented in Table 3, with the fuzzy logic system's output shown in Figure 6.  
In the alignment and placement phase, the fuzzy reward rule base emphasizes precision and stability. The rules in this stage are highly refined to ensure accurate alignment and secure placement of the target item. A leading rule is \"If the end-effector's positional error is within an acceptable range and stability indicators meet the preset threshold, then the reward is high\". These rules are detailed in Table 4, with the fuzzy logic system's output in Figure 7.  
To ensure coherence and efficiency in the path-planning process, the CFRS considers smooth transitions between different phases. This transition mechanism is based on the robotic arm's current position, the target position, and the safety distance \(r_{aff}\). Specifically, when the robotic arm approaches the goal of the current phase or the present safety distance becomes too short, it switches to the fuzzy logic of the initial phase or the placement phase. Figure 6: Output of the fuzzy logic system during the mid-course obstacle-avoidance stage. The figure on the left depicts the first layer, and the right figure showcases the second layer of the fuzzy logic system.