# Could We Realize the Fully Flexible System by Real-Time Computing with Thin-Film Transistors? +
## 5 Simulations and Analysis
### Fault Tolerance Analysis  
To evaluate the effect of the computational error of the circuit, DoG keypoints matching the experiment is performed between the analog circuit output and software results. As described in the Section 2.2.1, DoG is an approximation of Laplace of Gaussian (LoG) operator, which is usually used to detect the edge of objects in image with the advantages of high efficiency and low complexity. In these experiments, the two filtered images that are obtained by either circuit or the software are subtracted to get the DoG image, see Formula (11):  
\[D(x,y)\ =\ I_{\
u 2}(x,y)-I_{\
u 1}(x,y) \tag{11}\]  
where \(D\) is the DoG image, and \(I\) is the filtered image in the corresponding scale coordinate. The local extremums are detected in 3 \(\times\) 3 window. If two extremums appear in the same position in the circuit result and the software result, we say they are matched. The matching result is shown in Figure 10 and Table 3.  
We can see that the fault caused by analog circuit indeed has the impact on the image feature, especially on the minimum distribution. The interesting thing is that the mismatch mainly happens on the edge of image, according to Figure 10, which is because the large error appears on edge pixels due to the edge information missing we stated in the previous section. But, in some applications, \begin{table}
\begin{tabular}{c c c} \hline \hline
**Unit** & **Cell Number** & **Energy Consumption (\(\upmu\)J)** \\ \hline Multipliers & 39,760 & 9.23 \\ Non-linear activation & 50 & \(1.65\times 10^{-3}\) \\ Current mirror & 3950 & 5.93 \\ Total & - & 15.16 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Energy consumption of each part in MLP. Figure 10: Matching of circuit and software output. The red plus signs are the local maximum points and green ones are the minimum points. The lines connect the matched points in the circuit and software output images. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Key Point** & **Circuit** & **Software** & **Matching** & **Matching Rate** \\ \hline Maximum & 70 & 60 & 50 & 83.3\% \\ Minimum & 82 & 62 & 43 & 69.4\% \\ Avg. Rate & - & - & - & 76.2\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Matching experiment result. the 76.2% overall matching rate is quite enough to detect the object in the vision. This, in fact, utilizes the inherent fault-tolerance characteristic of the image processing applications. We believe that with the development of Oxide TFT technology, and more elaborate circuit design in future, the computational accuracy could be improved. Mismatch of transistors in the differential pair that introduced by unstable Oxide TFT would result in the nonlinearity of multiplying units and the biasing of the sigmoid function. In order to verify the fault-tolerance of proposed neural network that is based on the flexible device, classification accuracies with different degrees of mismatch are simulated and shown in Figure 11, where the mismatch is set to a uniform distribution of different thresholds. It is worth noting that the mismatch verification is sufficient to simulate the system function in real applications. Because the system error is mainly introduced by the variations of multipliers and non-linear activation units, of which the differential pair structure makes the variations could be equaled to the mismatch of the transistor pair. That is, the non-ideal factors, such as process variation, temperature, bending, etc., which introduces the error of computation units, can be equivalent to the mismatch of pair transistor to simulate the real applications. As the maximum threshold of mismatch increases from 1% to 10%, initial error increases as well. Nevertheless, error rates of the mismatch under 5% eventually converge to close to 9%, which is only 2% lower than the software implementation at the same network size. The system still has fast convergent trend within the mismatch of 10%. Therefore, the training of neural network has enough capability to correct the error introduced in the calculation process.