# A New Method of Applying Data Engine Technology to Realize Neural Network Control
## 3 Research on DRNN Hybrid Controller Based on DE
### Implementation of the DRNN Control Algorithm  
Unlike offline learning, online learning attempts to update the knowledge base of the neural network incrementally after the presentation of each training sample, rather than learning data samples based on a particular offline learning scenario [29]. The topology of the DRNN controller in this study contains two parts: the instruction data that does not change during the execution of the control algorithm, and the dynamic data that participates in real-time computation and update which only needs to provide timely feedback and dynamic updates to the real-time data parts when the entire control system is running. When the DE receives a learning request, the calculation threads of the control algorithm for all data units are frozen. The data unit responsible for online learning and training is continuously receiving the feedback control signal from the actual device and is then sent to a temporary data buffer of the control station, where it retrieves the DRNN related execution algorithm from the algorithm execution library to self-iterate the data unit in time, completing the task of updating the weight data, and realizing the goal of online learning.  
Figure 7: The abstract platform architecture of the DRNN hybrid controller.  
Numerical simulations of DRNC and DRNI were performed on an IPC platform (model IPC-S2221), a set of sinusoidal analog signals were used for confirmatory experiments. The actual output \(y(k)\) and the reference output \(y_{r}(k)\) of the controlled device in the diagonal recurrent neural network control system are observed to verify the feasibility of this study. Assuming a single input single output nonlinear device, its difference equation can be described as  
\[y(k)=\frac{y(k-1)}{1+y^{2}(k-1)}u^{3}(k-1) \tag{9}\]  
The difference equation of the reference model is  
\[y_{r}(k+1)=0.6y_{r}(k)+r(k) \tag{10}\]  
where the reference input is \(r(k)=1.5\sin 0.02k+2\).  
The goal is to determine the device input \(u(k)\) make the \(\underset{k\rightarrow\infty}{\lim}\big{|}y(k)-y_{r}(k)\big{|}<\varepsilon\), where the \(\varepsilon\) is an appropriate minimum. In this experiment, the neurons nodes in the DRNC and DRNI network were 7 and 5 respectively, \(\delta_{I}=\delta_{C}=0.02\), the calculation cycle \(T_{s}\) of the control station is 100 ms; as mentioned above, not presetting (off-line training) of the weight vector was necessary. Special requirements are not necessary for the initial conditions of the first two controllers. A real-time dynamic nonlinear learning law (as opposed to off-line training procedure) of the weight vector is proposed for the neural network by using DE technology, initial conditions of the weight vector were random number is the random number between 0 and 1, and the seven nodes were used to approximate \(u(k)\).  
The simulation results are obtained when implementing the DRNN during 100 s. Figure 8 shows the evolutions of the errors of the \(y(k)-y_{r}(k)\) during the learning online process. The convergence of the weights of the identifier and controller are shown in Figure 9, respectively, where all of the INN weights converge after 20 s. Calculated by the IPC control station calculation cycle Ts = 100 ms, equivalent to the online iterative training nearly 200 times. The number of iterations is similar to that of some online learning research [30; 31; 32; 33; 34].  
Under the simulation conditions, the errors are significantly large and chattering in the early stages, but reduce fast when the weights converge and the performance approaches approximately optimal values. It is shown that the control system of DRNN based on DE technology has a good self-regulation and adaptive ability that can quickly recover to a stable state and the anti-interference ability is stronger.  
Figure 8: The estimated and real numerical simulations signals. Initial speed guess before 3 s is 1.6.