**5. Gated recurrent neural network (GRNN)**

The GRNN was proposed by Cho et al. [19] in order to make each recurrent unit to extract dependencies of different timescales adaptively. The GRNN, shown in **Figure 7**, has gating units that modulate the flow of information inside the unit like the LSTM unit but without having a separate memory cell. The parameters in the GRNN are updated as follows:

**Figure 7.** The block diagram of GRNN.

$$\mathbf{z}\_t = \sigma(w\_{x,z} \* \mathbf{x}\_t + \mathbf{z}v\_{h,z} \* h\_{t-1} + b\_z) \tag{7}$$

$$\mathbf{r}\_t = \sigma(\mathbf{z}\mathbf{w}\_{x,r} \* \mathbf{x}\_t + \mathbf{z}\mathbf{v}\_{h,r} \* h\_{t-1} + b\_r) \tag{8}$$

$$\tilde{h}\_{\mathbf{i}} = \tanh\left(\varpi\_{x,h} \ast \mathbf{x}\_{\mathbf{i}} \ast \varpi\_{h,\mathbf{i}} \ast \left(\mathbf{r}\_{\mathbf{i}} \ast h\_{\mathbf{i}-1}\right) + b\_{h}\right) \tag{9}$$

$$h\_{\iota} = z\_{\iota} \* h\_{\iota - 1} + (1 - z\_{\iota}) \* \bar{h}\_{\iota} \tag{10}$$

better performance for classification, the hidden layer is set into 7 neurons, and therefore, we can obtain the length of MI-EEG characteristic sequence being 15, while the channel number of MI-EEG-based BCI is 3. In order to evaluate the classification results and obtain a reliable and stable model, this model performs 500 cross validation to calculate the classification accuracy. In 2009, Smith [23] indicated that the nervous system is significantly important to integration of information and to the range of behaviors in which the system can stably engage and among which the system can flexibly switch. However, the nervous system, the body, and the environment each possess their own complex intrinsic dynamics, and these are always in continuous interaction with each other. Human intelligence reveals both remarkable stability and nimble flexibility. Stability emerges from the incorporation of the past into the present. Flexibility, requires an abandonment of (or selection among) past ways, a shifting of responses to meet new circumstances. For the consideration of stability and flexibility, the proposed methods are compared to other strategies based on "BCI Competition 2003" [24]. The experimental results

**Authors Features Classifiers Accuracy rates** Christin Schafer [24] Wavelet Bayes 89.29% GAO Xiaorong [24] ERD LDA 86.43% Akash Narayana [24] AR LDA 84.29% The proposed LSTM DWT LSTM 92.83% The proposed GRNN DWT GRNN 94.50%

A Motor-Imagery BCI System Based on Deep Learning Networks and Its Applications

http://dx.doi.org/10.5772/intechopen.75009

23

**Figure 8.** The performance competition between GRNN and LSTM.

**Table 1.** The accuracy rates of different strategies for BCI Competition 2003.

where *xt* is the input vector, *ht* is the output vector in hidden layer, *zt* is the vector of update gate, and *r t* is the vector of reset gate, respectively.
