## 5 Flow Rate Estimation by Decentralization of Kalman Filters  
### The Design of Flow Rate Estimation  
In the first flow-rate estimation method [28], the EKF was applied to the pouring motion using the input command for tilting the ladle to the measured weight of the outflow liquid. This estimation method is applicable only where the ladle has a smooth shape (e.g., fanned), since a complicated shape does not satisfy the twice differentiability concerning the tilting angle. The Jacobian matrix in the EKF requires this twice differentiable of the model parameters obtained from the ladle shape. To avoid the twice differentiability of the model parameters concerning the tilting angle and simply construct the flow-rate estimation system in an automatic pouring machine with complicatedly shaped ladle, the SSKFs and EKF were decentralized to the motor systems and the pouring process, respectively, in [31]. The motor system and the pouring process are sequentially connected as shown in Figure 2. The angular velocity is added as the input in the pouring process. In addition, the angle of the ladle can be detected by the rotary encoder. Therefore, in the case that the angular velocity of the ladle tilted by the motor system on the \(\Theta\)-axis and the acceleration of the ladle transferred by the motor system on the \(z\)-axis can be estimated precisely by the SSKFs, and the pouring flow rate can also be estimated precisely by the EKF with only the pouring process model [31]. A block diagram of flow-rate estimation by DKFs is presented in Figure 7.  
In this approach, a discrete-time SSKF was applied for estimating the angular velocity of the motor for tilting the ladle. The discrete-time state equation of the motor system can be given as follows:  
\[\left[ \begin{array}{c}\omega_{n+1}\\ \theta_{n+1}\end{array} \right] = \left[ \begin{array}{cc}1-\frac{T_{s}}{T_{mt}}&0\\ T_{s}&1\end{array} \right]\left[ \begin{array}{c}\omega_{n}\\ \theta_{n}\end{array} \right]+\left[ \begin{array}{c}\frac{T_{s}K_{mt}}{T_{mt} }\\ 0\end{array} \right]u_{tn}, \tag{17}\] \[y_{n} = \left[ \begin{array}{cc}0&1\end{array} \right]\left[ \begin{array} []{c}\omega_{n}\\ \theta_{n}\end{array} \right], \tag{18}\]  
Figure 7: Block diagram of flow-rate estimation by DKFs. where \(T_{s}\) s represents the sampling interval and is given as 0.020 s in this study. The angular velocity estimated by the discrete-time SSKF with the model of the motor system in Equation (18) is applied to the estimation of the pouring flow rate described later. Similarly, a discrete-time SSKF was applied to estimate acceleration for transferring the ladle on the \(z\)-axis and is represented as follows:  
\[\left[ \begin{array}{c}v_{zn+1}\\ x_{zn+1}\end{array} \right] = \left[ \begin{array}{cc}1-\frac{T_{s}}{T_{mz}}&0\\ T_{s}&1\end{array} \right]\left[ \begin{array}{c}v_{zn}\\ x_{zn}\end{array} \right]+\left[ \begin{array}{c}\frac{T_{s}K_{mz}}{T_{mz}}\\ 0\end{array} \right]u_{zn}, \tag{19}\] \[y_{zn} = \left[ \begin{array}{cc}0&1\end{array} \right]\left[ \begin{array} []{c}v_{zn}\\ x_{zn}\end{array} \right]. \tag{20}\]  
The acceleration on the \(z\)-axis was estimated as:  
\[a_{zn}=-\frac{1}{T_{mz}}v_{zn}+\frac{K_{mz}}{T_{mz}}u_{zn}. \tag{21}\]  
We designed an EKF for estimating the pouring flow rate. The discrete-time state equation of the pouring process can be represented as follows:  
\[x_{n+1} = f(x_{n},u_{n}), \tag{22}\] \[y_{n} = \eta(x_{n}), \tag{23}\]  
where  
\[x = \left[ \begin{array}{cc}h&W&W_{L}\end{array} \right]^{\sf T}, \tag{24}\] \[u = \left[ \begin{array}{cc}\hat{\omega}&\hat{a}_{z}\end{array}  \right]^{\sf T},\] (25) \[f(x,u) = \left[ \begin{array}{cc}\left(1-\frac{T_{s}}{A(\theta)}\frac{ \partial A(\theta)}{\partial\theta}\hat{\omega}\right)h-\frac{T_{s}d(h)}{A( \theta)}-\frac{T_{s}}{A(\theta)}\frac{\partial V_{s}(\theta)}{\partial\theta} \hat{\omega}\\ W+T_{s}\rho q(h)\\ \left(1-\frac{T_{s}}{T_{L}}W_{L}\right)+\frac{T_{s}}{T_{L}}(W-\frac{M}{g} \hat{a}_{z})\end{array}