## 2 Materials and Methods
### Controller Design
#### 2.3.2 Follow Control Strategy  
In the follow control strategy, the controller mainly controls the exoskeleton system to follow the movement of the human body. This requires the controller to continuously adjust the output torque of the actuator according to the man-machine interaction force data, so that the human-machine interaction force data received by the force sensor of the leg is kept near the target. In the follow control block diagram (Figure 8) and Formula (10), \(\tau_{ref}\) is the reference interaction moment and is set as 0 in the follow control strategy. \begin{table}
\begin{tabular}{l l l l} \hline \hline \# & \multicolumn{2}{c}{**Transition Conditions**} & \multicolumn{2}{c}{**Next State Machine**} \\ \hline \hline  & \(K_{l}>K_{thr}>0\) & \(K_{l}^{l}>K_{thr}^{l}\) & \(|K^{b}|<K_{thr}^{b}\) & 3.Left Front Swing \\  & \(0<-K_{thr}<K_{l}\) & \(K_{l}^{l}>K_{thr}^{l}\) & \(|K^{b}|<K_{thr}^{b}\) & 4.Left Back Swing \\  & \(-K_{thr}<K_{l}<K_{thr}\) & \(K_{l}^{l}<K_{thr}^{l}\) & \(|K^{b}|<K_{thr}^{b}\) & 1.Upright \\  & \(K_{r}>K_{thr}>0\) & \(K_{r}^{l}>K_{thr}^{l}\) & \(|K^{b}|<K_{thr}^{b}\) & 5.Right Front Swing \\  & \(0<-K_{thr}<K_{r}\) & \(K_{r}^{l}>K_{thr}^{l}\) & \(|K^{b}|<K_{thr}^{b}\) & 6.Right Back Swing \\  & \(-K_{thr}<K_{r}<K_{thr}\) & \(K_{l}^{l}<K_{thr}^{l}\) & \(|K^{b}|<K_{thr}^{b}\) & 1.Upright \\  & \(K_{l},K_{r}>K_{thr}>0\) & \(K_{r}^{l},K_{l}^{l}>K_{thr}^{l}\) & \(|K^{b}|<K_{thr}^{b}\) & 2.Semi-Squat \\  & \(0<-K_{thr}<K_{r},K_{l}\) & \(K_{r}^{l},K_{l}^{l}>K_{thr}^{l}\) & \(|K^{b}|>K_{thr}^{b}\) & 1.Upright \\ \hline \hline \end{tabular} where \(K_{thr}\) refer to the slope thresholds of the angular data detected over a period of time; \(K_{l},K_{r}\) refer to the slopes of the angle sensors at the left and right thighs; \(k_{thr}^{b}\) refer to the slope thresholds of back angle detected by IMU over a period of time; \(K^{b}\) refer to the slope of back angle detected by IMU over a period of time; \(K^{b}\) refer to slope thresholds of the sampling current over a period of time; and \(K^{b}_{r},K^{b}_{r}\) refer to the slopes of the sampling current at the left and right thighs. Unwritten transition conditions are considered to have no effect on state switching.  
\end{table} 
Table 1: Finite-state machine transition conditions. Figure 8: Follow control block diagram. Figure 7: Finite-state machine. When the control system detects that the human body is not standing up, the power controller is closed. At this time, the torque of the system is obtained by the feedback control loop at the bottom. By introducing the interactive force into the negative feedback control loop, the reference moment of the dynamic solution during the control motion is constantly corrected and allows the wearer to perform his or her own movements without hindrance. Without considering the motion of the human body, the formula for calculating the output torque of the follow-controlled exoskeleton joint is as follows:  
\[\tau_{m}=\tau_{b}+\tau_{ref}+\Delta\tau_{i}, \tag{10}\]  
\[\Delta\tau_{i}=-P\tau_{h}-\tau_{ref}-D\tau_{h}, \tag{11}\]  
The dynamic equation at the exoskeleton joint is as follows:  
\[\left(J_{m}R^{2}+J_{l}+J_{g}\right)\ddot{\beta}+sign\left(\dot{\beta}\right) mgl\dot{\beta}-fl=\tau_{b}, \tag{12}\]  
where \(J_{m}\) is the internal rotational inertia of the motor, \(J_{l}\) is the rotational inertia of the harmonic drive gear, \(R\) is the deceleration ratio of the harmonic drive gear, and \(J_{g}\) is the rotational inertia of the external member; \(f\) refers the friction force generated when the body and the exoskeleton move side to side, and \(l\) is the effective distance of the friction force from the revolute joint. \(mgl\dot{sin}\beta\) represents the output torque due to the gravity of the thigh member, \(\tau_{m}\) is the output torque of the motor operating in the torque mode, and \(\tau_{h}\) is the interaction torque between the human and the exoskeleton.