## 5 Experiment and Analysis
### Experimental Results  
The developed MCU-controlled closed-loop fluxgate current sensor is designed to measure DC current at 0-1 A and 0-10 A, with feedback winding turns of 200 and 500, respectively. The sensor system changes at different range settings, necessitating adjustments to the optimal PID parameters for the closed-loop controller. The process of determining these PID parameters is called the debugging process, which involves the parameter tuning of the single-neuron-based self-pre-optimization algorithm. Four key parameters, \(K\), \(\eta_{p}\), \(\eta_{i}\), and \(\eta_{d}\), are manually adjusted during debugging, while the remaining parameters remain unchanged. The debugging table for the 0-10 A range is presented in Table 2, with the corresponding PID operating curve illustrated in Figure 7.  
The PID error rapidly converges to zero on the optimal PID control curve without oscillations or overshoots. This indicates that Result 5 yields the best performance, with its \begin{table}
\begin{tabular}{c c c} \hline \hline
**Result** & **Parameterization** & **PID Parameter** \\ \hline Result 1 & \(K=1.0\), \(\eta_{p}=0.8\), \(\eta_{i}=0.20\), \(\eta_{d}=0.1\) & \(K_{p}=0.6336\), \(K_{i}=0.3649\), \(K_{d}=0.0015\) \\ \hline Result 2 & \(K=0.8\), \(\eta_{p}=0.8\), \(\eta_{i}=0.03\), \(\eta_{d}=0.1\) & \(K_{p}=0.6747\), \(K_{i}=0.1212\), \(K_{d}=0.0041\) \\ \hline Result 3 & \(K=0.5\), \(\eta_{p}=0.5\), \(\eta_{i}=0.10\), \(\eta_{d}=0.1\) & \(K_{p}=0.3566\), \(K_{i}=0.1413\), \(K_{d}=0.0020\) \\ \hline Result 4 & \(K=0.1\), \(\eta_{p}=0.8\), \(\eta_{i}=0.10\), \(\eta_{d}=0.1\) & \(K_{p}=0.0712\), \(K_{i}=0.0263\), \(K_{d}=0.0024\) \\ \hline Result 5 & \(K=0.1\), \(\eta_{p}=0.8\), \(\eta_{i}=0.08\), \(\eta_{d}=0.1\) & \(K_{p}=0.0737\), \(K_{i}=0.0239\), \(K_{d}=0.0024\) \\ \hline Result 6 & \(K=0.1\), \(\eta_{p}=0.8\), \(\eta_{i}=0.02\), \(\eta_{d}=0.1\) & \(K_{p}=0.0873\), \(K_{i}=0.0114\), \(K_{d}=0.0012\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Debugging table for important neuronal PID parameters. Figure 7: PID operation curves for different debugging results. corresponding \(K_{p}\), \(K_{i}\), and \(K_{d}\) values representing the optimal PID parameters for the sensor system. In particular, manual debugging can be improved to automatic debugging in future work, i.e., by setting the PID optimization criteria in the program and automatically adjusting the neuronal parameters to compare the PID operating results, thus obtaining the best controller parameters. At present, the neuronal parameters are determined for both the 0-1 A and 0-10 A measuring ranges through the manual debugging process. Once the sensor executes the single-neuron-based self-pre-optimization algorithm, it autonomously determines the optimal PID parameters for the current system. This adaptive approach mitigates the risk of factory-set PID parameters becoming suboptimal due to hardware variations or sensor aging. In the next phase, the experimental measurements will validate the sensor's accuracy across both ranges. The states of the sensor are characterized into two phases: the self-learning phase and the measurement phase, as illustrated in Figure 8. In the self-learning phase, the optimal PID parameters are identified by the single-neuron-based self-pre-optimization algorithm, which usually lasts a few seconds. Subsequently, the sensor enters the measurement phase, where the digital positional PID control algorithm is used to achieve the closed-loop control of the sensor. The microcontroller-controlled closed-loop fluxgate current sensor prototype is tested using a 12 V power supply provided by a Tenma 72-10495 power source. The BD-4D measuring instrument offers a current source with an accuracy of 0.1%. A BZ-10 reference resistor of 0.1 \(\Omega\) is used to precisely measure the input current. This reference resistor features an accuracy of 0.01% and a maximum measuring current of 10 A. The input current is determined using [PERSON]'s law by measuring the voltage across the reference resistor.