# Pipe Spatter Detection and Grinding Robot
## 4 Velocity Control
### Dimensionless PID Control  
When controlling the speed inside the pipe, there is a difference between the speed expected from the control input and the one that is actually achieved by the robot. This occurs because the link used to run the robot inside the pipe is grounded to the pipe surface by means of a strong force, which significantly affects the driving torque, thereby causing the mentioned difference between the input and actual speeds. Considering this, a closed-loop control algorithm is used to control the error by feeding back the current speed in real time [25; 26]. However, there are other disturbances that may impact speed, such as mechanical errors and environmental factors inside the pipe. When such disturbances exist, controller design becomes difficult, and the design must consider various environments. Moreover, it is necessary \begin{table}
\begin{tabular}{c c c} \hline \hline
**Pipe (cm)** & **Steering Angle** & **Driving Speed (m/min)** \\ \hline \hline  & 5 & 7 \\
18 & 15 & 22 \\  & 30 & 48 \\  & 5 & 8 \\
20 & 15 & 26 \\  & 30 & 55 \\  & 5 & 10 \\
25 & 15 & 32 \\  & 30 & 69 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Relation between driving angle and speed for different pipe diameters. Figure 9: Relationship between steering angle and rotation speed (rpm). to set the optimal gain through extensive time and experimentation. The driving characteristics of the proposed SGR require speed control based on a large external force and torque during spiral driving. Consequently, we adopted a standard proportional-integral-differential (PID) controller, assuming a primary time-delay system control target, as follows:  
\[G_{p}(s)=\frac{Y(s)}{U(s)}=\frac{Ke^{-Ls}}{1+\tau s}, \tag{4}\]  
where \(K\) is the normal gain, \(\tau\) is the time constant, and \(L\) is the time delay. The performance of Equation (4) can improve if a higher-order model is used, which is currently a widely used option in industrial sites, and it can be approximated to a higher-order processor by appropriately adjusting its three parameters (\(K,\ \tau,\ \text{and}\ L\)). For ease of analysis, the time delay can be defined as a dimensionless parameter (\(\frac{\tau}{\tau}\)) by dividing the time, T, by the time constant, \(\tau\). When this parameter is replaced by the Laplace transformation \(\frac{\tau}{\tau}=t^{\prime}\), the relationship \(s^{\prime}=\tau s\) holds in the frequency domain. Hence, by setting \(s=\frac{s^{\prime}}{\tau}\), the dimensionless transfer function of the PID controller and the control object can be defined as follows:  
\[G_{c}\big{(}s^{\prime}\big{)}=G_{c}(s)_{|s=\frac{\tau}{\tau}}=K_{p}[1+\frac{ \frac{\tau}{\tau}s^{\prime}}{\tau}+\frac{\tau_{d}}{\tau}s\prime \tag{5}\]  
\[G_{p}\big{(}s^{\prime}\big{)}=G_{p}(s)_{|s=\frac{\tau}{\tau}}=\frac{Ke^{-\frac {t}{\tau}s^{\prime}}}{1+s^{\prime}}. \tag{6}\]  
Equation (5) represents the PID controller, and Equation (6) can be expressed in the time domain by the inverse Laplace transform on the control target as follows:  
\[u\big{(}t^{\prime}\big{)}=K_{p}[e\big{(}t^{\prime}\big{)}+\frac{\tau}{\tau_{i }}\int\ e\big{(}t^{\prime}\big{)}dt^{\prime}+\frac{\tau_{d}}{\tau}\frac{de(t^ {\prime})}{dt\prime} \tag{7}\]  
\[\dot{y}\big{(}t^{\prime}\big{)}+y\big{(}t^{\prime}\big{)}=K_{u}\bigg{(}t^{ \prime}-\frac{T}{\tau}\bigg{)} \tag{8}\]  
\[\frac{Y(s^{\prime})}{Y_{r}(s^{\prime})}=\frac{G_{c}(s^{\prime})G_{p}(s^{\prime })}{1+G_{c}(s^{\prime})G_{p}(s^{\prime})}. \tag{9}\]  
The block diagram of the final PID design is shown in Figure 10, where the transfer function is given by Equation (9). The Ziegler-Nichols method was applied to the selected model to set the current PID gain and optimal gain values of the robot controller. After setting the initial values of I and D while increasing the P gain, an appropriate gain value was derived using a table based on the frequency response through the critical gain in the critical state and the critical period.