## 4 Closed-Loop Control Algorithms
### Single-Neuron-Based Self-Pre-Optimization Algorithm  
A biological neuron comprises a cell body, dendrites, and an axon. Dendrites serve as the receiving parts of the neuron that receive synaptic inputs from axons. When the sum of the dendritic inputs exceeds a threshold, the neuron fires an action potential. The axon acts as the transmitting part of the neuron, which initiates an action potential down the axon, leading to the release of neurotransmitters. Numerous neurons together form a vast network of nerves called the nerve center, and human beings can perform a variety of behaviors in response to the commands from the nerve center. Inspired by the structure of a biological neuron, computational models based on neuronal architecture can be designed to enable machines to self-learn. A typical single-neuron model in machine learning is illustrated in Figure 5. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method Type** & **Complexity** & **Precision** & **Effort** & **Adaptability** \\ \hline Trial and Error & Low & Low & High & Low \\ \hline Experiment-Based & Moderate & High & Moderate & Moderate \\ \hline Model-Based & High & High & High & Low \\ \hline Automatic Tuning & Moderate & High & Moderate & High \\ \hline \hline \end{tabular}
\end{table} 
Table 1: A comparison of four PID tuning methods. Figure 5: Block diagram of a typical single-neuron model in machine learning. In this model, the input \(x_{j}\) (where \(j=1,\ \dots,\ n\) ) corresponds to the receivers which are analogous to the dendrites of a biological neuron, while the output \(y_{i}\) serves as the transmitter for the \(i\)-th neuron, which corresponds to the axon of a biological neuron. Each \(w_{ij}\) (where \(j=1,\ \dots,\ n\)) represents the weight coefficient of the \(i\)-th neuron's input signals, and \(\theta_{i}\) denotes the \(i\)-th neuron's threshold. This neuron model operates on the principle that the neuron produces an output signal if the sum of its inputs, weighted by the corresponding coefficients, exceeds its threshold \(\theta_{i}\). This mirrors the behavior of a biological neuron, which fires an electrical signal only when sufficiently stimulated. The neuron model illustrated in Figure 5 can be mathematically represented as follows:  
\[y_{i}=\left\{ \begin{array}{ll}\sum\limits_{j=1}^{n}w_{ij}x_{i}-\theta_{i}&if \sum\limits_{j=1}^{n}w_{ij}x_{i}>\theta_{i,}\\ 0&if\sum\limits_{j=1}^{n}w_{ij}x_{i}\leq\theta_{i.}\end{array} \right. \tag{8}\]  
A single neuron achieves self-learning and adaptation by modifying the weight coefficients based on specific learning rules [37]. Various learning rules exist for tuning these coefficients, such as the unsupervised Hebbian learning rule, the supervised Delta learning rule, the supervised Hebbian learning rule, etc. [38]. Learning processes are typically categorized into unsupervised and supervised learning, which are distinguished by introducing or not introducing an expectation value. The generic form of these learning rules is shown below:  
\[\Delta w_{ij}(t)=\eta\times r\times x_{j}(t), \tag{9}\]  
where \(\Delta w_{ij}(t)\) represents the difference in weights at the moment \(t\); \(\eta\) is the scale factor or learning constant; \(r\) is the learning signal; and \(x_{j}(t)\) is the input signal at the moment \(t\). Then, the weight coefficients at the moment \(t\) can be derived:  
\[w_{ij}(t)=w_{ij}(t-1)+\eta\times r\times x_{j}(t). \tag{10}\]  
For implementing a single-neuron self-adaptive PID controller, the supervised Hebbian learning rule can be utilized, which is the combination of the Hebbian learning rule and the Delta learning rule [38; 39]. Hebbian theory suggests that when two neurons are activated simultaneously, their connection strengthens, allowing the cell to remember the association between the two stimuli. Conversely, if the activation of the neurons becomes less synchronized over time, their connection weakens.