# Bridge Model Updating Based on Wavelet Neural Network and Wind-Driven Optimization
## 2 Wavelet Neural Network
### WNN Structure  
The WNN is consistent with the BP neural network structure, which consists of three layers: input layer, hidden layer, and output layer [39], as shown in Figure 1. The function of the input layer is to input sample data, the hidden layer uses the wavelet function \(\Psi(t)\) as the excitation function, and the output layer can use the Sigmoid function and the linear Purline function as the excitation function. Figure 1: Network structure of WNN. Let {\(x_{1}\), \(x_{2}\),..., \(x_{i}\),..., \(x_{n}\)} be the network input, {\(y_{1}\), \(y_{2}\),..., \(y_{i}\),..., \(y_{n}\)} the network output, \(n\) the number of samples, and \(m\) the number of outputs; thus, the hidden layer can be defined as in Equations (1)-(4):  
\[ \begin{split}\Psi(h_{k}(x))=\Psi\Big{(}\sum\limits_{i=1}^{n} \frac{\lambda_{ki}x_{i}-b_{k}}{a_{k}}\Big{)}\\ =\Psi\bigg{(}\sum\limits_{i=1}^{n}g_{ki}x_{i}+r_{k}\bigg{)}\\ h_{k}(x)=\frac{\sum\limits_{i=1}^{n}\lambda_{ki}x_{i}-b_{k}}{a _{k}}\\ =\sum\limits_{i=1}^{n}g_{ki}x_{i}+r_{k}\\ g_{ki}=\frac{\lambda_{ki}}{a_{k}}\\ r_{k}=-\frac{b_{k}}{a_{k}}\end{split}  \tag{1}\]  
\[ \begin{split} h_{k}(x)=\frac{\sum\limits_{i=1}^{n}\lambda_{ki}x_{i }-b_{k}}{a_{k}}\\ =\sum\limits_{i=1}^{n}g_{ki}x_{i}+r_{k}\\ g_{ki}=\frac{\lambda_{ki}}{a_{k}}\\ r_{k}=-\frac{b_{k}}{a_{k}}\end{split}  \tag{2}\]  
where \(k=1\), \(2\),..., \(s\), \(s\) is the number of hidden layer nodes, \(\lambda_{ki}\) is the connection coefficient between the input layer and hidden layer, \(a_{k}\) is the k\({}^{\text{th}}\) scaling factor, and \(b_{k}\) is the k\({}^{\text{th}}\) translation factor. The output layer can be defined as Equation (5):  
\[ \begin{split}\gamma_{j}=f\bigg{(}\sum\limits_{k=1}^{S}\omega_{jk }\Psi(h_{k}(x))+\delta_{j}\bigg{)}\\ =f\bigg{(}\sum\limits_{k=1}^{S}\omega_{jk}\Psi\bigg{(}\sum\limits _{i=1}^{n}g_{ki}x_{i}+r_{k}\bigg{)}+\delta_{j}\bigg{)}\end{split}  \tag{3}\]  
where \(f(x)\) is the output layer excitation function, \(\omega_{jk}\) is the connection coefficient between the hidden layer and the output layer, and \(\delta_{j}\) is the neural network threshold. Similarly, for multiple samples, the hidden layer and output layer of the WNN can be defined as Equations (6)-(8):  
\[\Psi(h_{kl}(x))=\Psi\bigg{(}\sum\limits_{i=1}^{n}g_{ki}x_{it}+r_{k}\bigg{)} \tag{4}\]  
\[h_{kl}(x)=\sum\limits_{i=1}^{n}g_{ki}x_{it}+r_{k} \tag{5}\]  
\[ \begin{split}\gamma_{jl}=f\bigg{(}\sum\limits_{k=1}^{S}\omega_{jk }\Psi\bigg{(}\sum\limits_{i=1}^{n}g_{ki}x_{it}+r_{k}\bigg{)}+\delta_{j}\bigg{)} \end{split}  \tag{6}\]  
where \(t=1\), \(2\),..., \(T\), \(T\) is the number of samples, \(x_{it}\) is the \(i^{\text{th}}\) element of the \(i^{\text{th}}\) input samples, and \(\gamma_{jl}\) is the \(j^{\text{th}}\) neural network output, which corresponds to the \(i^{\text{th}}\) input samples. The matrix method is used to simplify the expression of hidden layer and output layer:  
\[\mathbf{X}(n)= \begin{bmatrix}x_{11}&\cdots&x_{1T}\\ \vdots&\ddots&\vdots\\ x_{n1}&\cdots&x_{nT}\end{bmatrix}  \tag{7}\]  
\[\mathbf{I}(s)= \begin{bmatrix}g_{11}&\cdots&g_{1n}&r_{1}\\ \vdots&\ddots&\vdots&\vdots\\ g_{s1}&\cdots&g_{sn}&r_{s}\end{bmatrix}  \tag{8}\]\[\mathbf{V}(m)= \begin{bmatrix}\omega_{11}&\cdots&\omega_{1s}\\ \vdots&\ddots&\vdots\\ \omega_{m1}&\cdots&\omega_{ms}\end{bmatrix}  \tag{11}\]  
\[\mathbf{W}(m)= \begin{bmatrix}\omega_{11}&\cdots&\omega_{1s}&\delta_{1}\\ \vdots&\ddots&\vdots&\vdots\\ \omega_{m1}&\cdots&\omega_{ms}&\delta_{m}\end{bmatrix}  \tag{12}\]  
where \(\mathbf{X}(n)\) is the input sample matrix; \(\mathbf{I}(s)\) is the coefficient matrix consisting of \(g_{ki}\) and \(r_{k}\); \(\mathbf{W}(m)\) is the coefficient matrix consisting of \(\omega_{jk}\) and \(\delta_{j}\); \(\mathbf{V}(m)\) is the \(1\)-\(n\) columns of \(\mathbf{W}(m)\), which is the coefficient matrix consisting of \(\omega_{jk}\). Thus, we obtain the following:  
\[\mathbf{H}(s)= \begin{bmatrix}h_{11}(x)&\cdots&h_{1T}(x)\\ \vdots&\ddots&\vdots\\ h_{s1}(x)&\cdots&h_{sT}(x)\end{bmatrix} =\mathbf{I}(s)