# Bionic Intelligent Algorithms Used in Helicopter Individual Blade Control Optimization
## 2 Methods
### Fuzzy Neural Network Combined with PID Controller
#### 2.2.2 Artificial Neural Network (ANN)  
Artificial Neural Network (ANN) was established by imitating the structure of the human neuron system, which had a high adaptive ability and learning ability [10]. Figure 7 showed the structure of the human neuron.  
A typical BP neural network was composed of an input layer, a hidden layer, and an output layer. The signals transmitted forward and the errors transmitted reversely. When the result was inconsistent with the reference result, the error was propagated back, and the connection weights and thresholds of the neural network were adjusted according to the learning algorithm until the reference value is reached.  
The structure of the neural network is as in Figure 8:  
Figure 8: Topological structure of a typical BP neural network.  
Figure 6: Fuzzy controller system structural.  
Figure 7: Human neuron.  
BP neural network consisted of input variables \(X=(x_{1},x_{2},\ldots,x_{m})\), hidden layers \(q\), and output nodes \(Y=(y_{1},y_{2},\ldots,y_{m})\).  
The input calculation equation of the node \(i\) in the hidden layer is as follows:  
\[net_{i}^{p}=\sum_{j=1}^{M}\omega_{ij}o_{j}^{p}-\theta_{i}=\sum_{j=1}^{M}\omega_ {ij}x_{j}^{p}\quad(i=1,2,\cdots,q) \tag{21}\]  
In the above equations, \(x_{j}^{p}\) and \(o_{j}^{p}\), respectively, represented the input and output of the input layer node under the action of the sample \(p\), \(\omega_{ij}\) represented the connection weight between the input layer node and the hidden layer node, and \(\theta_{i}\) represented the threshold of the hidden layer node.  
If the error of output exceeds the set value, the error was fed back from the output layer, and the connection weights between the neuron nodes of each layer were modified until the error was less than the set value. The quadratic error for the output of any sample was expressed as:  
\[J_{p}=\frac{1}{2}\sum_{k=1}^{L}\left(t_{k}^{p}-o_{k}^{p}\right)^{2} \tag{22}\]  
The total error expression of the system was:  
\[J=\sum_{p=1}^{N}J_{p}=\frac{1}{2}\sum_{p=1}^{N}\sum_{k=1}^{L}\left(t_{k}^{p}-o _{k}^{p}\right)^{2} \tag{23}\]  
The main function of the ANN was the weight correction between the three layers.
* Correction of the connection weight between the output layer and the hidden layer The connection weights between the neuron nodes of each layer were adjusted in the opposite direction of the gradient of the error function.  
The adjustment expression of the connection weight \(\Delta\omega_{ki}\) could be obtained as:  
\[\Delta\omega_{ij}=\eta\delta_{k}^{p}o_{i}^{p}=\eta_{k}^{p}\Big{(}1-o_{k}^{p} \Big{)}\left(t_{k}^{p}-o_{k}^{p}\right)_{i}^{p} \tag{24}\]  
Among the equation, \(t_{k}^{p}\) and \(o_{i}^{p}\) represented the expected result and the output value of the hidden layer node, respectively.
* Correction of the connection weights between the input layer and the hidden layer In the same way, the modified expression of the connection weight between the hidden layer and the input layer could be obtained by the gradient of the error function:  
\[\Delta\omega_{ij}=\eta\delta_{i}^{p}o_{i}^{p}=\eta o_{i}^{p}\Big{(}1-o_{i}^{p }\Big{)}\left(\sum_{k=1}^{L}\delta_{k}^{p}\cdot\omega_{ki}\right)o_{j}^{p} \tag{25}\]  
Among the equation, \(o_{i}^{p}\) and \(o_{j}^{p}\), respectively, represented the output of the hidden layer neuron node \(i\) and the output of the output layer neuron node \(j\) under the action of the sample \(p\).  
Therefore, the weighting coefficient increment of the output layer node \(k\) and the connection weight increment of the hidden layer node \(i\) could be obtained under the action of the sample \(p\):  
\[\left\{\begin{array}{l}\omega_{ki}(k+1)=\omega_{ki}(k)+\eta\delta_{k}^{p}o_{ j}^{p}\\ \omega_{ij}(k+1)=\omega_{ij}(k)+\eta\delta_{i}^{p}o_{j}^{p}\end{array}\right. \tag{26}\]  
The connection weights of each layer of the neural network were adjusted to appropriate values, until the error is no more than the set value.