# Bridge Model Updating Based on Wavelet Neural Network and Wind-Driven Optimization
## 2 Wavelet Neural Network
### WNN Training  
As a mature learning algorithm, gradient descent is often used to train neural networks. According to the idea of gradient descent and matrixing and introducing a momentum factor to accelerate the learning process, the iterative equations of coefficient matrices \(\mathbf{W}(m)\) and \(\mathbf{I}(s)\) are given:  
\[\mathbf{W}(m)_{p+1}=\mathbf{W}(m)_{p}-\eta\frac{\partial U_{p}}{\partial\mathbf{W}(m)_{p}} +a\Big{(}\mathbf{W}(m)_{p}-\mathbf{W}(m)_{p-1}\Big{)} \tag{16}\]  
\[\mathbf{I}(s)_{p+1}=\mathbf{I}(s)_{p}-\eta\frac{\partial U_{p}}{\partial\mathbf{I}(s)_{p}} +a\Big{(}\mathbf{I}(s)_{p}-\mathbf{I}(s)_{p-1}\Big{)} \tag{17}\]  
where \(p\) is the number of iterations of the gradient descent method; \(\mathbf{W}(m)_{p}\) and \(\mathbf{I}(s)_{p}\) are the matrices obtained by the \(p\)-th iteration of \(\mathbf{W}(m)\) and \(\mathbf{I}(s)\); \(U_{p}\) is the matrix of total error function of the neural network after the \(p\)-th iteration, that is, the performance function of the neural network; \(\eta\) is the learning rate; \(a\) is the momentum factor. To speed up the network training process and avoid falling into local optimum, the learning rate \(\eta\) needs to be adjusted, that is, the adaptive learning rate method. Using the adaptive learning rate to adjust the network can not only effectively improve the convergence rate but also improve the stability of the network learning process. The adjustment mechanism is as in Equation (18):  
\[\eta=\begin{cases}1.05\eta&U_{p+1}<U_{p}\\ 0.95\eta&U_{p+1}>1.04\ U_{p}\\ \eta&\text{otherwise}\end{cases} \tag{18}\]The learning rate is adjusted by comparing the network's total error function size before and after the update. When the error function increases, it indicates that the updating direction is wrong, or the updating amount is too large, and the learning rate needs to be reduced; when the error function decreases, it indicates that the direction is correct, and the learning rate should be increased.  
\[\text{Let}\,\mathbf{D}(m)=\begin{bmatrix}d_{11}&\cdots&d_{1T}\\ \vdots&\ddots&\vdots\\ d_{m1}&\cdots&d_{mT}\end{bmatrix}\]  
be the actual output sample; the mean squared error (MSE) function can be used as the network performance function:  
\[U_{p}=\text{MSE}=\frac{1}{T}\Big{\|}\mathbf{D}(m)-\mathbf{Y}(m)_{p}\Big{\|}_{2}^{2}= \frac{1}{T}\sum_{t=1}^{T}\sum_{j=1}^{m}\Big{(}\text{d}_{jt}-\mathbf{y}_{jt,p}\Big{)} ^{2} \tag{19}\]  
Thus, we obtain the following:  
\[\frac{\partial U_{p}}{\partial\mathbf{W}(m)_{p}}=\Big{(}\mathbf{D}(m)-\mathbf{Y}(m)_{p} \Big{)}\odot f^{\prime}\bigg{(}\mathbf{W}(m)_{p}\Big{[}\begin{matrix}\mathbf{R}(s)_{p} \\ \mathbf{E}_{1\times T}\end{matrix}\bigg{]}\bigg{)} \tag{20}\]  
\[\begin{split}\frac{\partial U_{p}}{\partial\mathbf{I}(s)_{p}}& =\mathbf{V}^{\prime}\Big{(}\mathbf{H}(s)_{p}\Big{)}\\ &\odot\bigg{[}\mathbf{V}(m)_{p}^{T}\bigg{(}\Big{(}\mathbf{Y}(m)_{p}-\mathbf{D}(m) \Big{)}\odot f^{\prime}\bigg{(}\mathbf{W}(m)_{p+1}\Big{[}\begin{matrix}\mathbf{R}(s)_{ p}\\ \mathbf{E}_{1\times T}\end{matrix}\bigg{]}\bigg{)}\bigg{)}\bigg{)}\bigg{[}\begin{matrix} \mathbf{X}(n)\\ \mathbf{E}_{1\times T}\end{matrix}\bigg{]}\end{split} \tag{21}\]  
where \(\mathbf{y}_{jt,p}\) is the element of \(\mathbf{Y}(m)\) in the matrix \(\mathbf{Y}(m)_{p}\) after the \(p\)-th iteration; \(\mathbf{V}(m)_{p}^{T}\) is the inversion of \(\mathbf{V}(m)\) after the \(p\)-th iteration; \(\mathbf{R}(s)_{p}\) is the matrix obtained after the \(p\)-th iteration of \(\mathbf{R}(s)\).