# Fuzzy Echo State Network-Based Fault Diagnosis of Remote-Controlled Robotic Arms
## 3 Deep Fuzzy Echo State Networks for Fault Classification
### Computational Complexity Analysis  
In this section, we analyze the computational complexity of the DFESN and compare it with the backpropagation (BP) algorithm. This comparison is essential to demonstrate the efficiency of DFESN in terms of computational resources.  
The single-layer fuzzy ESN consists of three main steps: fuzzy clustering, state updating, and output weight optimization. The computational complexity for the fuzzy clustering process is  
\[\kappa_{1}=O(G\times N^{2}\times o) \tag{24}\]  
where \(\kappa\) denotes computing times, G represents the number of neurons in the hidden layer, \(N\) is the number of samples, \(o\) is the maximum number of iterations for fuzzy clustering, and \(O(*)\) represents the computation complexity.  
The computational complexity for the state updating step, as described in Equation (21), is  
\[\kappa_{2}=O(G\times(S+G)\times N) \tag{25}\]  
where \(S\) represents the input feature dimension.  
The computational complexity for the output weight optimization step, as described in Equation (14), is  
\[\kappa_{3}=O(G^{3}\times N) \tag{26}\]  
The total computational complexity of a single-layer fuzzy ESN is, therefore, given by  
\[NU=\kappa_{1}+\kappa_{2}+\kappa_{3} \tag{27}\]  
In contrast, the computational complexity of the BP method in a single-layer neural network, for the forward propagation through the network, can be expressed as  
\[\kappa_{4}=O(G\times S\times N) \tag{28}\]  
For the backward propagation process, one has  
\[\kappa_{5}=O(G^{2}\times N) \tag{29}\]  
Including the iterative updates, the total computational complexity of the BP method with \(k\) iterations is  
\[NT=k\times(\kappa_{4}+\kappa_{5}) \tag{30}\]  
A single-layer DFESN using layer-wise fuzzy tuning has a computational complexity of only \(NU\). On the contrary, that of BP is \(k\times NT\) due to the need for multiple iterations of feedback processing. To evaluate the computational loads of the two methods, the single-layer difference function \(C\) between BP and DFESN can be derived by combining Equations (27) and (30) as follows:  
\[\begin{array}{ll}C&=k\times NT-NU\\ &=k^{2}\times O(G\times S\times N)+k^{2}\times O(G^{2}\times N)\\ &-O(G\times N^{2}\times o)-O(G\times(S+G)\times N)-O(G^{3}\times N)\\ &=k^{2}\times O(G\times S\times N)-O(G\times(S+G)\times N)\\ &+k^{2}\times O(G^{2}\times N)-O(G\times N^{2}\times o)-O(G^{3}\times N)\\ \end{array} \tag{31}\]  
Assuming \(S=\max\{G,S\}\) and \(G=S\), one has  
\[\begin{array}{ll}C_{1}&=k^{2}\times O(S^{2}\times N)-O(2\times S^{2}\times N )\\ &+k^{2}\times O(S^{2}\times N)-O(S\times N^{2}\times o)-O(S^{3}\times N)\\ &=(2k^{2}-2-S)O(S^{2}\times N)-O(S\times N^{2}\times o)\\ \end{array} \tag{32}\]  
where \(C_{1}\) represents the minimum difference. Supposing \(G=\min\{S,G\}\) and \(S=G\), one has  
\[\begin{array}{ll}C_{2}&=k^{2}\times O(G^{2}\times N)-O(2\times G^{2}\times N )\\ &+k^{2}\times O(G^{2}\times N)-O(G\times N^{2}\times o)-O(G^{3}\times N)\\ &=(2k^{2}-2-G)O(G^{2}\times N)-O(G\times N^{2}\times o)\\ \end{array} \tag{33}\]  
where \(C_{2}\) denotes the maximum difference.  
Based on the analysis above, it is clear that \(C_{1}<C<C_{2}\)[29]. This outcome depends significantly on the values of \(k\), \(S\), and \(G\). When \(k\ll\left[(2+G)/2\right]^{1/2}\), the computational cost of the DFESN is typically not significantly lower than that of the BP; however, this case is relatively uncommon. The situation changes when \(k\geq\left[(2+G)/2\right]^{1/2}\). Consequently, in most cases, the DFESN achieves a reduced total computational cost.