Voice coil servo valve core position control method and system based on ADRC

By combining the bidirectional Bi-GRU network and ADRC model, the problem of insufficient accuracy and robustness in voice coil servo valve parameter tuning and model prediction control is solved, and more efficient and accurate control effects are achieved.

CN119247749BActive Publication Date: 2025-04-04HANGZHOU REBOTECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411787987.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-04
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The prior art has problems of insufficient accuracy and robustness in parameter setting and model prediction control of voice coil servo valves, especially when facing saturation effects during electromagnetic conversion and frictional resistance changes in valve core movement.

Method used

Using the ADRC-based voice coil servo valve spool position control method, an efficient and accurate control system is built by combining the bidirectional Bi-GRU network, embedded ADRC model, orderly clustering algorithm, and attention and residual backtracking mechanism.

Benefits of technology

It improves the accuracy and robustness of parameter setting, enhances the accuracy and adaptability of model prediction control, and can better handle the nonlinear and dynamic characteristics of voice coil servo valve system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119247749B_ABST
    Figure CN119247749B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for controlling the valve core position of a voice coil servo valve based on ADRC; the present invention relates to the technical field of liquid control systems; an input data sequence S as a valve core target position electrical signal is input into a bidirectional Bi‑GRU network of a coding layer. In each gated recurrent unit, an integrated tracking differentiator TD, an extended state observer ESO and a nonlinear state error feedback NLSEF are used to form an embedded ADRC model; used to process input data. The bidirectional Bi‑GRU network extracts the temporal dependencies in the input data sequence S from both the forward and backward directions to generate a hidden state sequence H; the present invention extracts the temporal dependencies in the input data sequence from both the forward and backward directions at the same time, and the bidirectional Bi‑GRU network can more comprehensively capture the dynamic features in the data, thereby improving the accuracy and robustness of data processing. An ordered clustering algorithm is used to perform feature extraction and cluster analysis on a specific sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of liquid control systems, and in particular to a voice coil servo valve control method using ADRC as a model predictive control (MPC), and in particular to a voice coil servo valve valve core position control method and system based on ADRC. Background Art

[0002] The voice coil servo valve is a transmission valve mainly used to accurately control the flow of liquids. It consists of a valve seat, a valve core, a voice coil, a sensor and an amplifier. It is essentially a moving coil force motor that can directly drive the valve core to output displacement. Voice coil servo valves have the advantages of high precision and fast response, and are widely used as the main control element in aircraft control mechanisms (such as rudders, landing gear and brakes). The failure of voice coil servo valves is mainly manifested in the disturbance caused by valve core oscillation and howling, which can cause the performance of the servo system to deteriorate and bring catastrophic consequences. Therefore, at this stage, technologies for voice coil servo valve failures and control methods are emerging in an endless stream. For example:

[0003] (1) The paper "Ren Pengda, Zhang Wei, Xie Zhigang, et al. Research on oscillation suppression of direct-drive servo valve based on ADRC and model predictive control" discloses an ADRC and model predictive controller, which adjusts the current of each axis of the linear motor in a small range at high frequency to offset the sudden flow force and make the valve core move smoothly. It can effectively control the servo valve core vibration and thus improve the response effect of the actuator.

[0004] However, because the electromagnetic force of the voice coil servo valve is linearly related to the current, a slight change in the control parameters (such as the ESO gain coefficient in ADRC, the prediction step size and control step size in the model predictive control) may cause a large fluctuation in the electromagnetic force, which in turn affects the position and speed control of the valve core. The ESO in ADRC is used to estimate the system state and disturbance. The setting of its parameters (such as β01, β02, β03) is inaccurate or too sensitive. The system may not be able to make adjustments quickly and accurately when it is disturbed by external interference, resulting in performance fluctuations. At the same time, there are nonlinear factors and uncertainties in the voice coil servo valve system, such as the saturation effect in the electromagnetic conversion process and the change in the friction resistance of the valve core movement. Although ADRC can handle these nonlinearities and uncertainties to a certain extent, the model predictive controller relies on an accurate mathematical model when predicting the future state of the system. If there is a large deviation between the model and the actual system, especially under high-frequency and high-dynamic response requirements, the prediction error may accumulate rapidly, resulting in a decrease in the control effect.

[0005] (2) The paper "Wang Bang, Li Yuesong, Zhang Yizhe. Simulation analysis of RBF-ADRC control of electro-hydraulic position servo system [J]. Machine Tool & Hydraulics, 2024, 52(20): 168-174" discloses an RBF-ADRC control model. When disturbance occurs, the control model can respond quickly and adjust quickly.

[0006] But in the same way, the voice coil motor is composed of a permanent magnet and a coil. When current flows through the coil, it will be affected by the electromagnetic force in the magnetic field of the permanent magnet, thereby generating linear motion. The magnitude of this electromagnetic force is proportional to the current intensity, and the direction is determined by the direction of the current and the polarity of the magnetic field. Since the electromagnetic force of the voice coil servo valve is linearly related to the current, a slight change in the control parameters (such as the gain coefficient of the ESO) may cause a large fluctuation in system performance. Although the RBF neural network can adjust these parameters online, if the adjustment algorithm is not accurate enough or the training data is not sufficient, the adjusted parameters may not be optimal, thereby affecting the system performance, that is, the robustness is not ideal. In addition, the RBF neural network needs to process a large amount of input data and real-time feedback during the parameter adjustment process. If the calculation speed cannot keep up with the dynamic response requirements of the system, it may cause control delays or increase overshoot.

[0007] Therefore, the technical problems to be solved by the prior art can be summarized as follows:

[0008] (1) Enhance the accuracy and robustness of parameter tuning: Slight changes in the control parameters of traditional technologies (such as the gain coefficient of ESO, the prediction step size and control step size in model predictive control) may lead to large fluctuations in system performance. Therefore, it is necessary to develop a more accurate and robust parameter tuning method;

[0009] (2) Improving the accuracy and adaptability of model predictive control: The above-mentioned prior art mentioned that the model predictive controller relies on an accurate mathematical model, but there may be deviations between the actual system and the nonlinear model. Therefore, it is necessary to establish a more accurate and adaptable model;

[0010] (3) The voice coil servo valve system has significant nonlinear and dynamic characteristics, including the saturation effect during electromagnetic conversion and the change in friction resistance of the valve core movement. These characteristics need to be taken into account in the model.

[0011] To this end, the present invention proposes a method and system for controlling the valve core position of a voice coil servo valve based on ADRC. Summary of the invention

[0012] In view of this, the present invention hopes to provide a voice coil servo valve spool position control method and system based on ADRC to solve or alleviate the technical problems existing in the prior art, namely, how to enhance the accuracy and robustness of parameter setting and improve the accuracy and adaptability of model predictive control under the premise of considering the saturation effect in the electromagnetic conversion process and the change of friction resistance of the valve spool movement; the technical solution of the present invention is achieved as follows:

[0013] First, the voice coil servo valve core position control method based on ADRC:

[0014] 1. Overview:

[0015] This scheme aims to achieve accurate prediction and output of voice coil motor control signals through an innovative neural network architecture. The core of the scheme is to combine the bidirectional Bi-GRU network, the embedded ADRC model, the ordered clustering algorithm, and the attention and residual backtracking mechanism to build an efficient and accurate control system. The encoding layer uses a bidirectional Bi-GRU network to extract the temporal dependency of the input valve core target position electrical signal. In the clustering layer, the ordered clustering algorithm is used to extract features and cluster analysis of the saturation effect generated during the electromagnetic conversion of the voice coil motor and the change in the friction resistance of the valve core movement. In the attention and residual backtracking layer, all hidden states of the encoding layer output are weighted summed to generate an intermediate vector. The embedded ADRC model is integrated to process the input to generate an accurate control signal. The control electrical signal of the voice coil motor is gradually generated and output to the actual control system.

[0016] (II) Technical solution:

[0017] 2.1 Step S1, coding layer processing:

[0018] The input data sequence S, which is the electrical signal of the valve core target position, is input into the bidirectional Bi-GRU network of the encoding layer. In each gated recurrent unit, the tracking differentiator TD, the extended state observer ESO and the nonlinear state error feedback NLSEF are integrated to form an embedded ADRC model for processing the input data. The bidirectional Bi-GRU network extracts the temporal dependencies in the input data sequence S from both the forward and backward directions to generate the hidden state sequence H.

[0019] 2.1.1 Step S100, collect input data sequence S:

[0020] ;

[0021] Where T is the length of the time series, s i is the electrical signal of the target position of the ith valve core. The bidirectional Bi-GRU network consists of a forward GRU and a backward GRU, which calculate the hidden states of the forward and backward directions respectively.

[0022] 2.1.2 Step S101, read the gated recurrent unit (integrate and embed ADRC model):

[0023] For each time step t, the input of the gated recurrent unit (GRU unit) is the current input s t and the hidden state h at the previous time step t-1 After integrating the embedded ADRC model, the internal calculation of the GRU unit is as follows:

[0024] Tracking Differentiator TD: ;

[0025] Extended State Observer ESO: ;

[0026] Nonlinear state error feedback NLSEF: ;

[0027] Update Gate: ;

[0028] Reset the gate: ;

[0029] Candidate hidden states ;

[0030] Update hidden state ;

[0031] Among them, W and U are weight matrices, which are parameters that need to be trained; σ is the sigmoid activation function, ⊙ represents element multiplication, and x ref is the reference state (given externally or determined according to the task). t Indicates that the input s is processed by the tracking differentiator TD at the current time step t t The output obtained after. is the output of the extended state observer ESO, which represents the estimate of the system state at the current time step t. t is the output of the nonlinear state error feedback NLSEF, indicating the current system state estimate With reference state x ref The error between u and U u is the weight matrix in the Update Gate, which is used to calculate the activation value of the Update Gate. u is the activation value of the update gate, which is a number between 0 and 1. u When it is close to 1, it means that more new information should be incorporated; when z u When it is close to 0, it means that more old information should be retained. ris the activation value of the Reset Gate, also a number between 0 and 1. is a candidate hidden state. t is the weight matrix W and the nonlinear state error feedback e t The matrix product between .

[0032] 2.1.3 Step S102, execute the bidirectional Bi-GRU network:

[0033] S1020, for the forward GRU, calculate the hidden state sequence from the forward direction:

[0034] ;

[0035] ;

[0036] in, Represents the set of hidden state sequences calculated by the forward GRU. It is a matrix or vector sequence that contains all forward hidden states from time step 1 to time step T. It represents the hidden state vector calculated by the forward GRU at time step t, which contains all the information of the input sequence up to the current time step and is obtained after internal processing (gating mechanism) of the GRU unit. forward Represents the computational function or model of the forward GRU, which receives the input s of the current time step t and the forward hidden state at the previous time step , then calculate and output the forward hidden state of the current time step .

[0037] S1021, for backward GRU, calculate the hidden state sequence from the backward direction:

[0038] ;

[0039] ;

[0040] in, Represents the set of hidden state sequences calculated by the backward GRU. Similar to the forward hidden state sequence, it is also a matrix or vector sequence, but contains all backward hidden states from time step T to time step 1 (note that the order is reversed). Represents the computational function or model of the backward GRU, which receives the input s of the current time step t and the backward hidden state at the next time step , then calculate and output the backward hidden state of the current time step ht . Represents the backward hidden state of the next time step (i.e. time step t+1). In the backward GRU, it is used as one of the inputs of the current time step calculation to help pass the information of the next time step (backward propagation).

[0041] S1022, merge forward and backward hidden states:

[0042] Merge the forward and backward hidden states to get the final hidden state sequence:

[0043] ;

[0044] ;

[0045] Among them, [·;·] represents the vector concatenation operation. t Represents the final hidden state vector at time step t. In this way, the bidirectional Bi-GRU network extracts the temporal dependencies in the input data sequence S from both the forward and backward directions and generates a hidden state sequence H.

[0046] 2.2 Step S2, clustering layer processing:

[0047] The ordered clustering algorithm is used to extract features and perform clustering analysis on the sequence L composed of the saturation effect produced in the electromagnetic conversion process of the voice coil motor and the change of the friction resistance of the valve core movement. According to the clustering results, the weight factor δ is generated, and the weight factor δ is used to perform weighted correction on the hidden state sequence H to obtain the corrected hidden state sequence H'.

[0048] 2.2.1 Step S200, determine the sequence L:

[0049] ;

[0050] in, represents the i-th saturation effect and its corresponding friction resistance eigenvalue at time step t, T is the length of the time series, and N is the total number of saturation effects and their corresponding friction resistance eigenvalues.

[0051] 2.2.2 Step S201, feature extraction:

[0052] Extract features from sequence L and obtain feature vector sequence ;

[0053] Among them, f t yes The feature vector representation of .

[0054] 2.2.3 Step S202, perform ordered clustering:

[0055] S2020, initialize each feature vector, set ft is a separate cluster, namely:

[0056] ;

[0057] Among them, C0 represents the initial clustering set.

[0058] S2021, define the distance measure d(C i , C j ), where C i and C j represents two clusters, d is the Euclidean distance or Manhattan distance;

[0059] S2022, iterative merging clusters:

[0060] Repeat the following steps until the stopping condition is met or the maximum number of iterations is reached:

[0061] 1) Calculate the distance between all cluster pairs, i.e. d(C i , C j ) for all i <j;

[0062] 2) Find the cluster pair with the smallest distance ;

[0063] Right now ;

[0064] 3) Merge cluster pairs Forming new clusters , and update the clustering set.

[0065] 4) Update the distance matrix between clusters to reflect the new clustering structure.

[0066] 5) Get the clustering label sequence:

[0067] After the clustering process is completed, the final cluster set is obtained ;

[0068] Here, K is the number of clusters.

[0069] 6) For each eigenvector f t Find the cluster C to which it belongs k And assign cluster label c t = k;

[0070] 7) Finally, we get the clustering label sequence C = {c1,c 2, ...,c T}; where c t Denotes the eigenvector f t The cluster category to which it belongs.

[0071] 2.2.4 Step S203, mapping to form a weight factor δ:

[0072] According to the clustering label sequence C, a weight factor sequence is formed; first, a weight mapping function δ(c) is defined to map the clustering label c to the weight factor δ, satisfying δ(c)∈[0, 1]; then, a weight factor sequence is formed by mapping:

[0073] 1) For each cluster label c t , calculate its corresponding weight factor δ t =δ(c t );

[0074] 2) Based on the idea that “the smaller the cluster, the greater the weight, reflecting the importance of rarity”, based on the existing K clusters, each cluster C k Contains k Eigenvectors:

[0075] 2.1) Define cluster size: n k = |C k |, where k=1,2,...,K;

[0076] 2.2) Define the total number of eigenvectors ;

[0077] 2.3) Define weight mapping function ;

[0078] Or equivalently (if each cluster is weighted in proportion to its size) ;

[0079] Among them, n k is cluster C k N is the total number of eigenvectors in all clusters.

[0080] Finally, we get the weight factor sequence ;

[0081] in, is the cluster label c t The corresponding weight factor.

[0082] 2.2.5 Step S204, weight factor Perform weighted correction on the hidden state sequence H:

[0083] Get the corrected hidden state sequence : ;

[0084] The tth corrected final hidden state vector .

[0085] 2.3 Step S3, attention and residual backtracking layer processing:

[0086] When the decoding layer generates each output, all hidden state sequences H' output by the encoding layer are considered and weighted summed through the attention mechanism to generate an intermediate vector C i ; The attention mechanism dynamically adjusts the weighting coefficient according to the correlation between the current output and the input sequence to enhance the focus on important information; the least squares method is used to minimize the residual sum of squares, calculate the error feedback coefficient, and use the residual backtracking mechanism to compensate with the historical prediction error to generate the corrected intermediate vector C' i ; The corrected intermediate vector C' i As the input of the decoding layer.

[0087] 2.3.1 Step S300, read the hidden state matrix and determine the output state:

[0088] Define all hidden state matrices R of the encoding layer output d×T :

[0089] ;

[0090] Among them, the output state S of the decoding layer at the i-th step is defined i ∈R d ; R d×T is a d×T matrix, where d is the dimension of the hidden states and T is the length of the sequence (i.e. the number of time steps or hidden states).

[0091] 2.3.2 Step S301, execute the attention mechanism:

[0092] Define the weight coefficient vector in the attention mechanism ;

[0093] Among them, α i is the weight coefficient vector of the attention mechanism, which is used to perform weighted summation of hidden states.

[0094] Define the middle vector ;

[0095] Among them, the weighted coefficient calculation of the attention mechanism (based on the correlation between the current output state and the hidden state) is ;

[0096] in, and are the hidden state vectors output by the encoding layer at the tth and jth time steps respectively; the score function is a dot product operation, or a bilinear function:

[0097] ;

[0098] Among them, s i The state vector of the decoding layer at the i-th time step. Yes i is the transpose of , i.e. a row vector. W is a learnable weight matrix used to calculate s i and The correlation score between . is the hidden state vector output by the encoding layer at the tth time step.

[0099] 2.3.3 Step S302, define the historical prediction error vector:

[0100] ;

[0101] in is the historical forecast error vector, which represents the difference between the forecast value and the actual value in the previous step; It means that this is an m-dimensional vector, where m is the dimension of the output. It is in The actual output (or target) vector for each time step. In the The predicted output vector for each time step.

[0102] The error feedback coefficient matrix B (where B∈R d×m ), minimize the residual sum of squares:

[0103] ;

[0104] Among them, B is an error feedback coefficient matrix, which is a learnable parameter used to adjust the intermediate vector C according to the historical prediction error. i , whose dimension is d×m, where d is the dimension of the intermediate vector and m is the dimension of the output vector (that is, the dimension of the error vector); Represents the square of the Euclidean distance; ┬ represents the matrix transpose operation;

[0105] The error feedback coefficient and historical prediction error are used for compensation to generate the corrected intermediate vector C'i:

[0106] .

[0107] in, Based on historical forecast errors The adjustment term calculated by and the error feedback coefficient matrix B. is the prediction error vector of the previous time step, whose dimension is m; B has a dimension of d×m; therefore, The result is a d-dimensional vector representing the adjustment amount to the original intermediate vector.

[0108] 2.4 Step S4, decoding layer processing:

[0109] The corrected intermediate vector C' i , the hidden state of the previous time step, and the prediction result of the decoder are input into the bidirectional Bi-GRU network of the decoding layer; in each gated recurrent unit, the embedded ADRC model is also integrated to process the input to generate accurate control signals; the output data sequence (i.e., the control electrical signal of the voice coil motor) is gradually generated and output to the actual control system.

[0110] 2.4.1 Step S400, decoding layer processing:

[0111] 1) Input processing:

[0112] ;

[0113] Among them, C' i is the corrected intermediate vector, h decoder, i-1 is the hidden state at the previous time step, is the decoder’s prediction result of the previous time step. decoder,i is the input vector of the decoder at the i-th time step;

[0114] 2) Bidirectional Bi-GRU network processing:

[0115] ;

[0116] Among them, h decoder, i-1 Initialized by the future hidden state.

[0117] 2.4.2 Step S401, in each gated recurrent unit (GRU), the embedded ADRC model is integrated to process the input:

[0118] ;

[0119] Among them, X GRU,i represents the input in the gated recurrent unit, h ADRC,i represents the control signal or hidden state generated by the ADRC model;

[0120] Then further update the state of the gated recurrent unit using:

[0121] ;

[0122] Where f represents the state update function of the GRU unit.

[0123] 2.4.3 Step S402, generating an output data sequence:

[0124] ;

[0125] Among them, W out and b out are the weights and biases of the output layer, is the predicted output of the decoder at the i-th time step (i.e., the control electrical signal of the voice coil motor).

[0126] 2.4.4 Step S403, output to the actual control system:

[0127] Output the prediction of the entire sequence Output to the actual control system.

[0128] 3. Mechanisms for solving technical problems:

[0129] 3.1 Enhance the accuracy and robustness of parameter setting:

[0130] Through the bidirectional Bi-GRU network, the model can simultaneously consider the forward and backward temporal dependencies, thereby more accurately capturing the dynamic characteristics of the system. The embedded ADRC model accurately estimates and feedback controls the system state through its internal tracking differentiator, extended state observer, and nonlinear state error feedback mechanism, improving the accuracy and robustness of parameter setting.

[0131] Compared with the traditional RBF neural network, the Bi-GRU network can utilize the timing information more comprehensively, while the embedding of the ADRC model provides stronger robustness and adaptability, enabling the model to work more stably when facing system parameter changes or external disturbances.

[0132] 3.2 Improve the accuracy and adaptability of model predictive control:

[0133] In the decoding layer, the hidden states of the encoding layer output are weighted and summed through the attention mechanism to generate an intermediate vector, which is corrected according to the historical prediction error. This helps the model to focus more accurately on the key information related to the current output and reduce the impact of historical prediction errors. At the same time, the embedded ADRC model can adjust the control strategy in real time according to the changes in the system state, improving the adaptability of the model.

[0134] The introduction of the attention mechanism enables the model to process information at different time steps more flexibly and improve the accuracy of prediction. The real-time adjustment capability of the ADRC model enhances the adaptability of the model, enabling it to better cope with complex and changing system environments.

[0135] 3.3 Dealing with the nonlinear and dynamic characteristics of the voice coil servo valve system:

[0136] The clustering layer extracts features and performs cluster analysis on the saturation effect of the voice coil motor's electromagnetic conversion process and the change in friction resistance of its valve core movement, and generates weight factors to perform weighted corrections on the hidden state sequence. This helps the model capture the nonlinear characteristics of the system more accurately and reduce the impact of these characteristics on control performance through weighted corrections. At the same time, the embedded ADRC model further enhances the model's control ability over nonlinear systems through its internal nonlinear processing mechanism.

[0137] The introduction of the clustering layer enables the model to handle the nonlinear characteristics of the system more finely, while the nonlinear processing mechanism of the ADRC model provides stronger control capabilities. This combination enables the model to better cope with the complex nonlinear and dynamic characteristics of the voice coil servo valve system.

[0138] Secondly, the voice coil servo valve core position control system based on ADRC:

[0139] The system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the above-mentioned method for controlling the position of the valve core of the voice coil servo valve.

[0140] Compared with the prior art, the present invention has the following beneficial effects:

[0141] 1. Improve the accuracy of data processing and modeling: The present invention extracts the temporal dependencies in the input data sequence from both the forward and backward directions. The bidirectional Bi-GRU network can more comprehensively capture the dynamic features in the data, thereby improving the accuracy and robustness of data processing. The embedded ADRC model consisting of the tracking differentiator (TD), the extended state observer (ESO), and the nonlinear state error feedback (NLSEF) integrated in the GRU unit can achieve accurate estimation and feedback control of the system state, further improving the accuracy of data processing and control effects. The ordered clustering algorithm is used to extract features and perform cluster analysis on specific sequences, and the weight factors are generated according to the clustering results to perform weighted correction on the hidden state sequence, fully considering the heterogeneity in the data and improving the accuracy and generalization ability of modeling.

[0142] 2. Enhance the adaptability and robustness of the system: The present invention uses the attention mechanism to perform weighted summation of all hidden states output by the coding layer to generate an intermediate vector. The attention mechanism can dynamically adjust the weighting coefficient according to the correlation between the current output and the input sequence, thereby enhancing the system's attention to important information and improving adaptability and robustness. The error feedback coefficient is calculated using the least squares method, and the historical prediction error is used for compensation through the residual backtracking mechanism. This mechanism can effectively correct errors in the prediction process and improve the stability and accuracy of the system.

[0143] 3. Improve the accuracy and real-time performance of control signal generation: In the decoding layer, the present invention inputs the corrected intermediate vector, the hidden state of the previous time step, and the prediction result of the decoder into the bidirectional Bi-GRU network, and integrates and embeds the ADRC model to process the input. This processing method can make full use of historical information and current input to generate more accurate control signals.

[0144] Fourth, compared with the traditional RBF neural network combined with the ADRC model, it has a better processing effect: the Bi-GRU network of the present invention can simultaneously consider the forward and backward temporal dependencies, while the RBF neural network mainly focuses on the mapping relationship between the current input and output. Therefore, the Bi-GRU network has a stronger ability in temporal processing and can more accurately capture the dynamic characteristics of the system. The embedded ADRC model accurately estimates and feedback controls the system state through its internal mechanism, which improves the robustness and adaptability of the model. Although the RBF neural network can also adapt to system changes by adjusting weights, its adaptability is relatively weak. The nonlinear characteristics of the system are feature extracted and clustered through the clustering layer, and combined with the nonlinear processing mechanism of the ADRC model, the model can more finely process the nonlinear characteristics of the system. Although the RBF neural network also has a certain nonlinear processing capability, its processing method is relatively simple and rough. BRIEF DESCRIPTION OF THE DRAWINGS

[0145] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0146] Figure 1 It is a schematic diagram of the method flow of the present invention.

[0147] Figure 2 Schematic diagram of the operation of the gated recurrent unit (GRU) of the present invention.

[0148] Figure 3 Schematic diagram of the coding layer of the present invention.

[0149] Figure 4 Schematic diagram of the clustering layer of the present invention.

[0150] Figure 5 Schematic diagram of the decoding layer of the present invention.

[0151] Figure 6 Schematic diagram of the model training process of the present invention.

[0152] Figure 7 It is a schematic diagram of the system composition of the present invention.

[0153] Figure 8 Schematic diagram of MAPE changes in model training of the present invention.

[0154] Fig. 9 It is a schematic diagram of the application effect of the model of the present invention.

[0155] Fig.10 It is a comparative schematic diagram of the test examples of the present invention.

[0156] Fig.11 It is a schematic diagram of the finite element simulation of the present invention. DETAILED DESCRIPTION

[0157] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;

[0158] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0159] Embodiment 1: Figure 1 As shown, this embodiment discloses a method for controlling the position of a voice coil servo valve core based on ADRC, which relies on a bidirectional Bi-GRU-ADRC neural network disclosed in this embodiment, which belongs to a control strategy based on model predictive control (MPC). The execution method of the bidirectional Bi-GRU-ADRC neural network disclosed in this embodiment includes the following steps S1 to S4.

[0160] In this embodiment, regarding step S1, the encoding layer processes: the input data sequence S as the valve core target position electrical signal is input into the bidirectional Bi-GRU network of the encoding layer. In each gated recurrent unit, the tracking differentiator TD, the extended state observer ESO and the nonlinear state error feedback NLSEF are integrated to form an embedded ADRC model for processing the input data. The bidirectional Bi-GRU network extracts the temporal dependencies in the input data sequence S from both the forward and backward directions to generate a hidden state sequence H.

[0161] Specifically, step S100, collecting input data sequence ;

[0162] Where T represents the length of the time series, that is, the total number of data points; s i It represents the electrical signal of the target position of the ith valve core, which is the position information that the control system expects the valve core to reach, and is given in the form of an electrical signal (unit: 5~25 mA).

[0163] The bidirectional Bi-GRU network is the core of the encoding layer, which consists of two parts: the forward GRU and the backward GRU. The forward GRU starts from the beginning of the sequence and processes each data point in turn to generate a forward hidden state sequence; the backward GRU starts from the end of the sequence and processes the data points in reverse to generate a backward hidden state sequence. This bidirectional processing method can simultaneously capture the forward and backward temporal dependencies in the sequence, improving the comprehensiveness and accuracy of feature extraction.

[0164] Specifically, Figure 2 As shown, step S101, read the gated recurrent unit (integrated embedded ADRC model): for each time step t, the input of the gated recurrent unit (GRU unit) is the current input s t and the hidden state h at the previous time step t-1 After integrating (embedding) the ADRC model, the internal calculation of the GRU unit is as follows:

[0165] (1) Tracking differentiator TD: ;

[0166] Among them, TD is used to extract the input signal s t Smooth representation of and its derivative information. TD(s t ) means to input s t As the input of the tracking differentiator TD; this helps reduce signal noise and provides a stable and continuous signal input for the subsequent control strategy. Through smoothing and differentiation, TD enhances the system's sensitivity and robustness to changes in the input signal, helping to track the target position more accurately.

[0167] (2) Extended State Observer ESO: ;

[0168] Among them, ESO (h t-1 ,z t ) means to change the hidden state h of the previous time step t-1 and the current TD output z t As the input of the extended state observer ESO; ESO is based on the hidden state h of the previous time step t-1 and the current TD output z t , estimate the current system state This includes the actual state of the system, unknown disturbances or unmodeled dynamics, etc. The introduction of ESO improves the system's ability to perceive changes in internal states, which helps to more accurately adjust the control strategy to cope with the saturation effect during electromagnetic conversion and changes in friction resistance of the valve core movement.

[0169] (3) Nonlinear state error feedback NLSEF: ;

[0170] in, Indicates that the current system state is estimated With reference state x ref The error between t As input to the nonlinear state error feedback, NLSEF calculates the current system state estimate With reference state x ref The error between t This error signal is used to adjust the control input or state estimation of the system to achieve more precise control. Through nonlinear feedback, NLSEF can quickly respond to changes in system state and effectively eliminate errors, improving the accuracy and robustness of control.

[0171] (4) Update gate: ;

[0172] The update gate determines how much old information the current hidden state should retain and how much new information should be incorporated. This is done through the weight matrix W u and U u The introduction of the update gate enables the GRU unit to flexibly adjust its hidden state to adapt to different input sequences and system dynamic changes.

[0173] (5) Reset gate: ;

[0174] The reset gate determines how much hidden state information from the previous time step should be retained when calculating the candidate hidden state. This is also done by resetting the weight matrix W in the gate. r and U rAnd the sigmoid activation function σ. The reset gate allows the GRU unit to "forget" some historical information when necessary, so as to better capture the new features in the current input sequence.

[0175] (6) Candidate hidden states ;

[0176] The candidate hidden state is calculated based on the current input and the hidden state of the previous time step (adjusted by the reset gate). It represents what the new hidden state will be at the current time step if the influence of the update gate is not considered. The introduction of the candidate hidden state provides a new state update direction for the GRU unit, which helps to more accurately capture the temporal dependencies in the input sequence.

[0177] (7) Update hidden state ;

[0178] According to the activation value z of the update gate u , the GRU unit converts the hidden state of the previous time step and candidate hidden states Perform weighted combination to obtain the hidden state h of the current time step t This updating mechanism enables the GRU unit to flexibly fuse historical information and current input, thereby more accurately representing the temporal characteristics of the input sequence and providing strong support for subsequent model predictive control.

[0179] In step S101, W and U are weight matrices, which are parameters that need to be trained; ⊙ represents element multiplication, x ref is the reference state (given externally or determined according to the task).

[0180] In step S101, t Indicates that the input s is processed by the tracking differentiator TD at the current time step t t The tracking differentiator is used to extract the smoothed input signal and its derivative (or rate of change), so z t Contains t Some smooth representation of or its derivative information.

[0181] In step S101, is the output of the extended state observer ESO, which represents the estimate of the system state at the current time step t. ESO is used to estimate the internal state of the system, which includes the actual state of the system, unknown disturbances or unmodeled dynamics, etc.

[0182] In step S101, t is the output of the nonlinear state error feedback NLSEF, indicating the current system state estimate With reference state x refBased on this error, NLSEF generates a feedback signal to adjust the control input or state estimation of the system.

[0183] In step S101, W u and U u is the weight matrix in the update gate, which is used to calculate the activation value of the update gate. In GRU, the update gate determines how much old information should be retained in the current hidden state and how much new information should be incorporated.

[0184] In step S101, u is the activation value of the update gate, which is a number between 0 and 1. u When it is close to 1, it means that more new information should be incorporated; when z u When it is close to 0, it means that more old information should be retained.

[0185] In step S101, r is the activation value of the reset gate, which is also a number between 0 and 1. The reset gate determines how much hidden state information from the previous time step should be retained when calculating the candidate hidden state. r When it is close to 0, it means that almost no information from the previous time step is retained; when z r When it is close to 1, it means complete retention.

[0186] In step S101, is a candidate hidden state, which is calculated based on the current input and the hidden state of the previous time step (also adjusted by the reset gate). The candidate hidden state represents what the new hidden state will be at the current time step if the update gate is not considered.

[0187] In step S101, We t is the weight matrix W and the nonlinear state error feedback e t This product is used to calculate part of the candidate hidden state or the activation value of the update gate / reset gate.

[0188] Specifically, Figure 3 As shown, step S102, executing the bidirectional Bi-GRU network:

[0189] S1020, for the forward GRU, calculate the hidden state sequence from the forward direction:

[0190] ;

[0191] ;

[0192] in, Represents the set of hidden state sequences calculated by the forward GRU. It is a matrix or vector sequence that contains all the forward hidden states from time step 1 to time step T. Represents the hidden state vector calculated by the forward GRU at time step t. It contains all the information of the input sequence up to the current time step and is obtained after internal processing of the GRU unit (such as the gating mechanism). forward Represents the calculation of the forward GRU. It receives the input s of the current time step t and the forward hidden state at the previous time step , then calculate and output the forward hidden state of the current time step ;

[0193] The forward GRU controls and passes information through a gating mechanism (update gate and reset gate) to capture the temporal dependencies in the input data sequence. At each time step, it receives the input s of the current time step t and the forward hidden state at the previous time step , then calculate and output the forward hidden state of the current time step In this way, the forward hidden state sequence contains all the forward information from time step 1 to time step T. The forward GRU can capture the forward temporal dependencies in the input data sequence and provide useful forward information for subsequent spool position control.

[0194] S1021, for backward GRU, calculate the hidden state sequence from the backward direction:

[0195] ;

[0196] ;

[0197] in, Represents the set of hidden state sequences calculated by the backward GRU. Similar to the forward hidden state sequence, it is also a matrix or vector sequence, but contains all the backward hidden states from time step T to time step 1 (note that the order is reversed). Represents the computational function or model of the backward GRU. It receives the input s of the current time step t and the backward hidden state h at the next time step t+1 , then calculate and output the backward hidden state of the current time step ht . Represents the backward hidden state of the next time step (i.e. time step t+1). In the backward GRU, it is used as one of the inputs of the current time step calculation to help pass the information of the next time step (backward propagation).

[0198] The backward GRU also controls and transmits information through a gating mechanism, but it is different from the forward GRU in that it starts from time step T and calculates the backward hidden state of each time step in reverse order. At each time step, it receives the input s of the current time step t and the backward hidden state at the next time step , then calculate and output the backward hidden state of the current time step . In this way, the backward hidden state sequence contains all the backward information from time step T to time step 1 (note that the order is reversed). The backward GRU can capture the backward temporal dependencies in the input data sequence and provide useful backward information for spool position control. By combining the forward and backward information, the temporal dependencies in the input data sequence can be more fully understood.

[0199] S1022, merge the forward and backward hidden states to obtain the final hidden state sequence:

[0200] ;

[0201] ;

[0202] Among them, [·;·] represents the vector concatenation operation. t represents the final hidden state vector at time step t. In this way, the bidirectional Bi-GRU network extracts the temporal dependencies in the input data sequence S from both the forward and backward directions and generates a hidden state sequence H. Through the vector concatenation operation, we fuse the information in the forward and backward hidden state sequences together to obtain a hidden state sequence containing more comprehensive temporal dependencies. In this way, the final hidden state of each time step contains both forward and backward information, providing a richer feature representation for the subsequent valve core position control.

[0203] It can be understood that the bidirectional Bi-GRU-ADRC neural network of this embodiment extracts the temporal dependencies in the input data sequence from both the forward and backward directions, and generates a hidden state sequence containing more comprehensive information. This helps to enhance the accuracy and robustness of parameter setting, and improve the accuracy and adaptability of model predictive control. In particular, when considering the saturation effect in the electromagnetic conversion process and the change in the friction resistance of the valve core movement, the bidirectional Bi-GRU network can more accurately capture the impact of these changes on the valve core position control, thereby achieving a more precise control effect.

[0204] In this example, see Figure 4Regarding step S2, clustering layer processing: using an ordered clustering algorithm, feature extraction and clustering analysis are performed on the sequence L composed of the saturation effect generated during the electromagnetic conversion process of the voice coil motor and the change in the friction resistance of the valve core movement; based on the clustering results, a weight factor δ is generated, and the weight factor δ is used to perform weighted correction on the hidden state sequence H to obtain a corrected hidden state sequence H'.

[0205] Specifically, step S200, determining the sequence ;

[0206] in, It represents the i-th saturation effect and its corresponding friction resistance eigenvalue at time step t, T is the length of the time series, and N is the total number of saturation effects and their corresponding friction resistance eigenvalues. The sequence L contains all the information about the saturation effect and the friction resistance of the valve core movement during the electromagnetic conversion process of the voice coil motor, which is the basis for subsequent feature extraction and cluster analysis.

[0207] Specifically, in step S201, feature extraction is performed on the sequence L to obtain a feature vector sequence F:

[0208] ;

[0209] Among them, f t yes Feature extraction is to convert the original data into a form that can better represent its essential characteristics for subsequent analysis and processing. Here, we use feature extraction to convert the saturation effect and friction resistance eigenvalues ​​in the sequence L into a feature vector sequence F, which provides a basis for subsequent clustering analysis.

[0210] Specifically, step S202, performing ordered clustering, includes:

[0211] S2020, Initialization: Initialize each feature vector, set f t is a separate cluster, namely:

[0212] ;

[0213] Among them, C0 represents the initial clustering set.

[0214] S2021, define the distance measure d(C i , C j ), where C i and C j Represents two clusters, d is the Euclidean distance or Manhattan distance; the inter-cluster distance metric is the basis for judging whether two clusters should be merged, which reflects the similarity or difference between clusters.

[0215] S2022, iterative merging clusters:

[0216] Repeat the following steps until the stopping condition is met or the maximum number of iterations is reached:

[0217] 1) Calculate the distance between all cluster pairs, i.e. d(C i , C j ) for all i <j;

[0218] 2) Find the cluster pair with the smallest distance , ;

[0219] 3) Merge cluster pairs Form new clusters:

[0220] , and update the clustering set.

[0221] 4) Update the distance matrix between clusters to reflect the new clustering structure.

[0222] 5) Get the cluster label sequence: After the clustering process is completed, the final cluster set is obtained:

[0223] ; where K is the number of clusters.

[0224] 6) For each eigenvector f t Find the cluster C to which it belongs k And assign cluster label c t = k;

[0225] 7) Finally, we get the clustering label sequence C = {c1,c 2, ...,c T}; where c t Denotes the eigenvector f t The cluster category to which it belongs.

[0226] Iterative merging of clusters is the core step of cluster analysis. It gradually builds a cluster tree that reflects the essential structure of the data by continuously merging the cluster pairs with the smallest distance. The choice of stopping conditions determines the granularity and accuracy of clustering.

[0227] Specifically, in step S203, mapping is performed to form a weight factor δ:

[0228] According to the clustering label sequence C, a weight factor sequence is formed; first, a weight mapping function δ(c) is defined to map the clustering label c to the weight factor δ, satisfying δ(c)∈[0, 1]; then, a weight factor sequence is formed by mapping:

[0229] 1) For each cluster label c t , calculate its corresponding weight factor δ t=δ(c t );

[0230] 2) Based on the idea that “the smaller the cluster, the greater the weight, reflecting the importance of rarity”, suppose we have K clusters, each cluster C k Contains k Eigenvectors:

[0231] 2.1) Define cluster size: n k = |C k |, where k=1,2,...,K;

[0232] 2.2) Define the total number of eigenvectors ;

[0233] 2.3) Define weight mapping function ;

[0234] Or equivalently (if each cluster is weighted proportionally to its size): ;

[0235] Among them, n k is cluster C k N is the total number of eigenvectors in all clusters.

[0236] Finally, we get the weight factor sequence ;in, is the cluster label c t The corresponding weight factor.

[0237] Specifically, in step S204, the corrected hidden state sequence is obtained : ;

[0238] Among them, the t-th corrected final hidden state vector is calculated as: .

[0239] It can be understood that the weight factor is formed by mapping , we can dynamically adjust the weight of each hidden state according to the clustering results, thereby enhancing the model's sensitivity to saturation effects and changes in friction resistance. This weight distribution method can reflect the rarity and importance of the data and help improve the accuracy and robustness of parameter tuning. Finally, we apply it to the weighted modification of the hidden state sequence H to further improve the accuracy and adaptability of model predictive control. By weighting the hidden state sequence H, we can more accurately reflect the influence of saturation effect and friction resistance change on valve core position control. It contains richer feature information, so that the model can more accurately consider the changes in these factors when predicting the valve core position. Therefore, the predictive control performance of the model has been significantly improved, and it can better adapt to the control requirements under different working conditions. At the same time, this weighted correction method also enhances the robustness of the model, so that it can maintain a good control effect when facing data changes.

[0240] In this embodiment, regarding step S3, attention and residual backtracking layer processing: when generating each output at the decoding layer, consider all hidden state sequences output by the encoding layer , and perform weighted summation on them through the attention mechanism to generate the intermediate vector C i ; The attention mechanism dynamically adjusts the weighting coefficient according to the correlation between the current output and the input sequence to enhance the focus on important information; the least squares method is used to minimize the residual sum of squares, calculate the error feedback coefficient, and use the residual backtracking mechanism to compensate with the historical prediction error to generate the corrected intermediate vector C' i ; The corrected intermediate vector C' i As the input of the decoding layer.

[0241] Specifically, step S300 reads the hidden state matrix and determines the output state, that is, defines all hidden state matrices R output by the coding layer d×T :

[0242] ;

[0243] Among them, the output state S of the decoding layer at the i-th step is defined i ∈R d ; R d×T is a d×T matrix, where d is the dimension of the hidden states and T is the length of the sequence (i.e. the number of time steps or hidden states).

[0244] Specifically, step S301, execute the attention mechanism: define the weighted coefficient vector in the attention mechanism , which is used to perform a weighted summation of the hidden states.

[0245] Define the middle vector ; It is equivalent to the weighted sum of all hidden states, and the weight coefficient is determined by the correlation between the current output state and the hidden state.

[0246] Among them, the weighted coefficient calculation of the attention mechanism (based on the correlation between the current output state and the hidden state) lies in the current output state s i With hidden state The correlation is normalized using the softmax function, that is: ;

[0247] in, and are the hidden state vectors output by the encoding layer at the tth and jth time steps respectively; the score function is a dot product operation, or a bilinear function: ;

[0248] Among them, s i The state vector of the decoding layer at the i-th time step. Yes i is the transpose of , i.e. a row vector. W is a learnable weight matrix used to calculate s i and The correlation score between . is the hidden state vector output by the encoding layer at the tth time step.

[0249] It is understandable that the attention mechanism can dynamically adjust the weighting coefficients so that the decoding layer pays more attention to the hidden states related to the current output state, thereby enhancing the ability to capture important information. This helps to improve the accuracy and adaptability of model predictive control, especially when dealing with complex and dynamically changing working conditions. Because by dynamically adjusting the weighting coefficients, the attention mechanism can make the decoding layer pay more attention to the hidden states related to the current output state. These hidden states often contain the most critical information for the prediction of the current output state. Therefore, during the decoding process, the model can more accurately use this information to generate outputs, thereby enhancing the ability to capture important information. Moreover, when dealing with complex and dynamically changing working conditions, the input data of the model often contains a lot of redundant information and noise. Through the attention mechanism, the model can automatically filter out the most critical information for prediction and ignore unimportant information. It helps to improve the accuracy of model predictive control. At the same time, because the attention mechanism can dynamically adjust the focus of attention, it can also better adapt to changes in input data and improve the adaptability of the model.

[0250] Specifically, in step S302, define the historical prediction error vector ;

[0251] in, is the historical forecast error vector, which represents the difference between the forecast value and the actual value in the previous step; It means that this is an m-dimensional vector, where m is the dimension of the output. It is in The actual output (or target) vector for each time step. In the The predicted output vector for each time step.

[0252] The error feedback coefficient matrix B (where B∈R d×m ), minimize the residual sum of squares: ;

[0253] Among them, B is an error feedback coefficient matrix, which is a learnable parameter used to adjust the intermediate vector C according to the historical prediction error. i , whose dimension is d×m, where d is the dimension of the intermediate vector and m is the dimension of the output vector (that is, the dimension of the error vector); Represents the square of the Euclidean distance; ┬ represents the matrix transpose operation;

[0254] The error feedback coefficient and historical prediction error are used for compensation to generate the corrected intermediate vector C' i :

[0255] .

[0256] in, Based on historical forecast errors The adjustment term calculated by and the error feedback coefficient matrix B. is the prediction error vector of the previous time step, whose dimension is m; B has a dimension of d×m; therefore, The result is a d-dimensional vector representing the adjustment amount to the original intermediate vector.

[0257] It can be understood that the residual backtracking mechanism can reduce the accumulation of prediction errors and improve the prediction accuracy of the model by using historical prediction errors to correct the intermediate vectors. At the same time, the learning of the error feedback coefficient matrix B enables the model to adaptively adjust the correction amount, further enhancing the robustness and adaptability of the model. When considering the saturation effect in the electromagnetic conversion process and the change in the friction resistance of the valve core movement, this mechanism can more effectively compensate for the influence of these nonlinear factors, thereby improving the control performance. The principle is:

[0258] (1) The residual backtracking mechanism corrects the intermediate vector by introducing historical prediction errors. This helps reduce the accumulation of prediction errors. In traditional prediction models, the prediction errors of each step may accumulate and be passed on to subsequent steps, resulting in a decrease in prediction accuracy. The residual backtracking mechanism corrects the intermediate vector by using historical prediction errors. It can take previous errors into account in each step of the prediction process, thereby reducing the cumulative effect of errors. In this way, even if there are errors in the initial prediction, the model can gradually approach the true value through subsequent correction steps, thereby improving the overall prediction accuracy.

[0259] (2) During the electromagnetic conversion process, nonlinear factors such as saturation effect and changes in friction resistance of valve core movement will have a significant impact on the performance of the system. These factors are often difficult to accurately describe using traditional mathematical models, so traditional control methods may encounter difficulties in dealing with these problems. The residual backtracking mechanism can more effectively cope with these challenges by using historical prediction errors to correct the intermediate vectors and adaptively adjusting the error feedback coefficient matrix B to compensate for the effects of these nonlinear factors. This mechanism enables the model to maintain high prediction accuracy and control performance when facing complex and dynamically changing working conditions.

[0260] (3) The residual backtracking mechanism improves the robustness and adaptability of the model by reducing the accumulation of prediction errors and adaptively adjusting the correction amount. Robustness refers to the ability of the model to maintain stable performance when facing changes in input data or noise interference. Adaptability refers to the ability of the model to quickly adjust its parameters to adapt to new situations or unknown environments. The residual backtracking mechanism corrects the intermediate vector by using historical prediction errors and adaptively adjusts the correction amount by learning the error feedback coefficient matrix B, so that the model can make more reasonable predictions and corrections when facing different situations, thereby improving the robustness and adaptability of the model.

[0261] In this embodiment, regarding step S4, as Figure 5 As shown, the decoding layer processes: the corrected intermediate vector C' i , the hidden state of the previous time step, and the prediction result of the decoder are input into the bidirectional Bi-GRU network of the decoding layer; in each gated recurrent unit, the embedded ADRC model is also integrated to process the input to generate accurate control signals; the output data sequence (i.e., the control electrical signal of the voice coil motor) is gradually generated and output to the actual control system.

[0262] Specifically, step S400, decoding layer processing:

[0263] (1) Input processing: ;

[0264] Among them, C' i is the corrected intermediate vector, h decoder, i-1 is the hidden state at the previous time step, is the decoder’s prediction result of the previous time step. decoder,i is the input vector of the decoder at the i-th time step;

[0265] This design takes into account the combination of historical information (hidden state) and current correction information (intermediate vector), as well as the impact of the previous prediction results on the current prediction, which helps to enhance the model's understanding and prediction capabilities for time series data.

[0266] (2) Bidirectional Bi-GRU network processing:

[0267] ;

[0268] Among them, h decoder, i-1 Initialization is performed through the future hidden state. The form of the Bi-GRU is the same as steps S100 to S102 of the first embodiment, so it is described in a general form, except that a decoding operation is required in this step instead of an encoding operation.

[0269] Specifically, in step S401, in each gated recurrent unit (GRU), the embedded ADRC model is integrated to process the input: ;

[0270] Among them, X GRU,i represents the input in the gated recurrent unit, h ADRC,i It represents the hidden state generated by the ADRC model, and its form is as shown in the third embodiment.

[0271] Then further update the state of the gated recurrent unit using:

[0272] ;

[0273] Among them, f represents the state update function of the GRU unit, including:

[0274] ;

[0275] ;

[0276] ;

[0277] ;

[0278] Among them, x t is the input vector for the current time step. is the hidden state at the previous time step. t is the update gate vector, which determines how much information from the previous time step should be retained by the hidden state of the current time step, and how much new information from the candidate hidden state should be received. t is the reset gate vector, which is used to control the influence of the hidden state of the previous time step on the calculation of the candidate hidden state of the current time step. is a candidate hidden state, indicating what the new hidden state should be if the update gate is not considered at the current time step. t is the updated hidden state of the current time step. σ is the sigmoid activation function, which is used to compress the value of the gate vector between 0 and 1. is the hyperbolic tangent activation function used to compute candidate hidden states. ⊙ represents the element-wise multiplication (Hadamard product) of vectors. z , W r and W h is the weight matrix corresponding to the input vector. z , U r and U h is the weight matrix corresponding to the hidden state of the previous time step. z 、b r and b h is the bias vector.

[0279] Specifically, step S402 generates an output data sequence ;

[0280] Among them, W out and b out are the weights and biases of the output layer, is the predicted output of the decoder at the i-th time step (i.e., the control electrical signal of the voice coil motor).

[0281] Specifically, step S403, output to the actual control system: output the prediction of the entire sequence Output to the actual control system (such as PLC), you can achieve "early prediction, early control", to achieve precise control of the valve core position. Fig. 9 shown.

[0282] It can be understood that through the above steps, the decoding layer can generate more accurate and robust control signals, effectively compensating for the saturation effect in the electromagnetic conversion process and the influence of nonlinear factors such as the change in friction resistance of the valve core movement. The introduction of the embedded ADRC model enables the model to adaptively adjust the control parameters and improve the accuracy and adaptability of the model predictive control. The use of the bidirectional Bi-GRU network enhances the model's understanding and prediction capabilities of time series data, further improving the control performance.

[0283] Embodiment 2: Figure 6 As shown, this embodiment will further provide a training method for the bidirectional Bi-GRU-ADRC neural network in Example 1, and the process includes:

[0284] P1. Model training and optimization: Use the training data set to train the model and update the model parameters through the back propagation algorithm. Monitor the model training process, including the change of loss function and accuracy index, and optimize and adjust the model. Perform cross-validation and testing to evaluate the generalization ability and performance of the model.

[0285] P2. Data preparation: Load the training dataset D consisting of historical data. The dataset should contain the input data sequence S and the corresponding target prediction output. sequence.

[0286] P3, model initialization: Initialize the weight matrices W and U (these matrices are used in the input-hidden and hidden-hidden connections of Bi-GRU); initialize the weight matrix W of the update gate u and U u ; Initialize other necessary bias items; Initialize matrix R d ×T ; Initialize the Adam optimizer.

[0287] P4, training process:

[0288] (1) Forward propagation: For each batch of data, forward propagation is performed through the bidirectional Bi-GRU network. Calculate the activation value z of the update gate u and reset the gate activation value z r Based on these activation values ​​and input data, the hidden state is updated. Then the output and loss function value of the model are calculated.

[0289] (2) Back propagation: Based on the loss function value, the gradient is calculated through the back propagation algorithm. The optimizer is used to update the model parameters (including the weight matrix and bias terms).

[0290] (3) Monitor the training process: Record the loss function value and accuracy index of each training round. Visualize these indicators to monitor the training progress and performance of the model. Adjust the learning rate and batch size hyperparameters as needed.

[0291] P5. Model optimization and adjustment:

[0292] Apply techniques such as L1, L2 regularization or dropout to prevent the model from overfitting. Find the best hyperparameter combination through grid search, random search or Bayesian optimization. Adjust the structural parameters of the Bi-GRU network such as the number of layers and hidden units based on the performance of the model and observations during training.

[0293] P6. Cross-validation and testing: Use methods such as K-fold cross-validation to evaluate the generalization ability of the model. Based on the results of cross-validation, further adjust the model and optimize hyperparameters. Evaluate the performance of the model on an independent test dataset. Calculate and report the evaluation metrics of accuracy, recall, and F1 score. If the model performance meets the requirements, deploy it to the actual application. Continuously monitor and optimize the model based on feedback from the actual application.

[0294] Among them, the MATLAB execution program architecture of the bidirectional Bi-GRU-ADRC neural network as described in Example 1 is as follows:

[0295] % Define the architecture of the bidirectional Bi-GRU-ADRC neural network

[0296] classdef BiGRU_ADRC_NN<handle

[0297] properties

[0298] inputSize

[0299] hiddenSize

[0300] outputSize

[0301] numLayers

[0302] bidirectional

[0303] ADRCModel

[0304] end

[0305] methods

[0306] function obj = BiGRU_ADRC_NN(inputSize, hiddenSize, outputSize,numLayers, bidirectional)

[0307] obj.inputSize = inputSize;

[0308] obj.hiddenSize = hiddenSize;

[0309] obj.outputSize = outputSize;

[0310] obj.numLayers = numLayers;

[0311] obj.bidirectional = bidirectional;

[0312] obj.ADRCModel = createADRCModel();

[0313] end

[0314] function layer = createBiGRULayer(hiddenSize, bidirectional)

[0315] layer = gruLayer(hiddenSize, ...

[0316] 'OutputMode', 'sequence', ...

[0317] 'Bidirectional', bidirectional);

[0318] end

[0319] function ADRCModel = createADRCModel()

[0320] % TD, ESO, NLSEF

[0321] ADRCModel.TD = createTrackingDifferentiator();

[0322] ADRCModel.ESO = createExtendedStateObserver();

[0323] ADRCModel.NLSEF = createNonlinearStateErrorFeedback();

[0324] end

[0325] function net = createNetwork(obj)

[0326] layers = [ ...

[0327] sequenceInputLayer(obj.inputSize)

[0328] obj.createBiGRULayer(obj.hiddenSize, obj.bidirectional)

[0329] fullyConnectedLayer(obj.outputSize)

[0330] regressionLayer];

[0331] net = layerGraph(layers);

[0332] net = dlnetwork(net);

[0333] end

[0334] end

[0335] end

[0336] Among them, the implementation of TD, ESO and NLSEF is exemplified as follows:

[0337] function TD = createTrackingDifferentiator()

[0338] % Initialization parameters

[0339] TD.r = 1; % Fast factor

[0340] TD.h = 0.01; % filter factor

[0341] % Define the differentiator function

[0342] TD.differentiate = @(v, v_last, t) v_last + TD.h * (-TD.r * (v - v_last) - sign(v - v_last) * (abs(v - v_last)>TD.h));

[0343] end

[0344] function ESO = createExtendedStateObserver()

[0345] % Initialization parameters

[0346] ESO.L = [1; 1; 0.1]; % Observer gain

[0347] ESO.z = zeros(3, 1); % Initial state estimation

[0348] % Define observer update function

[0349] ESO.update = @(y, u) ESO.z + ESO.L .* (y - ESO.z(1));

[0350] end

[0351] function NLSEF = createNonlinearStateErrorFeedback()

[0352] % Initialization parameters

[0353] NLSEF.k = [1; 0.5]; % Control gain

[0354] NLSEF.b = 0.1; % Nonlinear function parameter

[0355] % Define nonlinear feedback function

[0356] NLSEF.feedback = @(e) -NLSEF.k(1) * e(1) - NLSEF.k(2) * sign(e(1)) *(abs(e(1))>NLSEF.b);

[0357] end

[0358] The purpose of the entire BiGRU_ADRC_NN class is to combine the bidirectional GRU neural network with the ADRC (Auto-Disturbance Rejection Control) technique. The bidirectional GRU is used to process sequence data, capture long-term dependencies in the time series, and output prediction or control signals. The ADRC component is used to enhance the robustness and adaptability of the system by generating a smooth reference trajectory by tracking the differentiator, estimating the system state using the extended state observer, and finally generating the control signal through nonlinear state error feedback. The constructor initializes the network parameters and the ADRC component. createBiGRULayer creates a bidirectional GRU layer. createADRCModel initializes the TD, ESO, and NLSEF components. createNetwork builds a neural network containing an input layer, a bidirectional GRU layer, a fully connected layer, and a regression layer. In this way, the BiGRU_ADRC_NN class combines the data processing capabilities of deep learning with the robustness of ADRC, and is suitable for control tasks that require high accuracy and strong robustness.

[0359] Furthermore, the training procedure of the above neural network is as follows:

[0360] % Initialize network parameters

[0361] inputSize = 1; % Assume that the input is a 1-dimensional electrical signal

[0362] hiddenSize = 50;

[0363] outputSize = 1; % The output is also a 1-dimensional electrical signal

[0364] numLayers = 1;

[0365] bidirectional = true;

[0366] % Create a neural network instance

[0367] net = BiGRU_ADRC_NN(inputSize, hiddenSize, outputSize, numLayers,bidirectional);

[0368] % Training data X and label Y

[0369] X = rand(100, 10, inputSize); % 100 sequences, 10 time steps per sequence, 1-dimensional input per time step

[0370] Y = rand(100, 10, outputSize); % Corresponding label

[0371] % Training options

[0372] options = trainingOptions('adam', ...

[0373] 'MaxEpochs', 100, ...

[0374] 'GradientThreshold', 1, ...

[0375] 'InitialLearnRate', 0.001, ...

[0376] 'LearnRateSchedule', 'piecewise', ...

[0377] 'LearnRateDropPeriod', 50, ...

[0378] 'LearnRateDropFactor', 0.2, ...

[0379] 'Verbose', false, ...

[0380] 'Plots', 'training-progress');

[0381] % Training network

[0382] net = trainNetwork(X, Y, layers(net), options);

[0383] function net = trainNetwork(X, Y, net, options)

[0384] % Get network parameters

[0385] layers = layers(net);

[0386] % Initialize training status

[0387] net.State = 'train';

[0388] % Training loop

[0389] for epoch = 1:options.MaxEpochs

[0390] % Traverse each batch of data

[0391] for i = 1:size(X, 1)

[0392] Xbatch = X(i, :, :);

[0393] Ybatch = Y(i, :, :);

[0394] % Forward propagation

[0395] [Ypred, state] = forward(layers, Xbatch, net.State, net.ADRCModel);

[0396] % Calculate loss

[0397] loss = mean(square(Ypred - Ybatch), 'all');

[0398] % Back propagation

[0399] [grads, state] = backward(layers, Ypred, Ybatch, state);

[0400] % Update parameters

[0401] net.Learnables.Value = net.Learnables.Value -options.InitialLearnRate * grads;

[0402] end

[0403] % Display training progress (optional)

[0404] disp(['Epoch ', num2str(epoch), ': Loss = ', num2str(loss)]);

[0405] % Learning rate adjustment (if set)

[0406] if mod(epoch, options.LearnRateDropPeriod) == 0

[0407] options.InitialLearnRate = options.InitialLearnRate *options.LearnRateDropFactor;

[0408] end

[0409] end

[0410] end

[0411] function [Ypred, state] = forward(layers, X, state, ADRCModel)

[0412] % Forward propagation process

[0413] % Initialize hidden state and output

[0414] hiddenState = zeros(size(X, 2), 2*layers(1).NumHiddenUnits); % Bidirectional GRU

[0415] Ypred = zeros(size(X, 2), size(layers(end), 2));

[0416] % Traverse each time step

[0417] for t = 1:size(X, 2)

[0418] % Get the input for the current time step

[0419] xt = X(:, t, :);

[0420] % Process input through TD

[0421] xt_td = ADRCModel.TD(xt);

[0422] % GRU layer forward propagation

[0423] [hiddenState(:, t), ~] = forward(layers(1), xt_td, hiddenState(:, t-1), 'sequence');

[0424] % Output layer forward propagation

[0425] Ypred(:, t, :) = predict(layers(end), hiddenState(:, t));

[0426] end

[0427] end

[0428] function [grads, state] = backward(layers, Ypred, Y, state)

[0429] % Back propagation process

[0430] % Initialize gradient

[0431] grads = cell(numel(layers), 1);

[0432] % Calculate the gradient of loss with respect to output

[0433] dY = Ypred - Y;

[0434] dLoss_dYpred = 2 * dY / size(Y, 'all');

[0435] % Back propagation to the output layer

[0436] grads{end} = dLoss_dYpred * layers(end).Weights' + layers(end).BiasGradient;

[0437] % Back propagation to the GRU layer

[0438] for i = numel(layers)-1:-1:1

[0439] grads{i} = backward(layers(i), dLoss_dYpred, state{i});

[0440] dLoss_dYpred = grads{i}(2); % pass gradient to the previous layer

[0441] end

[0442] end

[0443] In the above training program, a BiGRU_ADRC_NN class is defined to create and manage the architecture of the bidirectional Bi-GRU-ADRC neural network. The createBiGRULayer method is used to create a bidirectional GRU layer. The createADRCModel method is used to create and initialize the ADRC model, including TD, ESO, and NLSEF. The createNetwork method creates the entire neural network architecture based on the defined parameters.

[0444] The training method is to initialize the neural network instance and training data. Set training options such as optimizer, learning rate, and training rounds. Call the trainNetwork function to train the network. The training program includes forward propagation and backpropagation processes. In forward propagation, the input data is processed by TD and passed to the bidirectional GRU layer, and then the output layer generates the prediction result. In backpropagation, the gradient of the loss with respect to the output is calculated, and backpropagated layer by layer to update the network parameters. The training process also includes strategies such as learning rate adjustment to improve the training effect. The MAPE value detected by evaluating the performance of the model on an independent test dataset is as follows Figure 8 shown.

[0445] Embodiment 3: Figure 2 As shown, in the first embodiment, the core of the GRU unit is to integrate (embed) the ADRC model, and its specific implementation scheme is as follows:

[0446] (1) First, let’s clarify the traditional GRU unit form (shown in general form):

[0447] ;

[0448] Where σ is the sigmoid activation function, W z , W r and W is the weight matrix, is the hidden state at the previous moment, x t is the input at the current moment.

[0449] (2) The improvement of this specific implementation is that the ADRC model is embedded in the GRU unit, that is, the first term (update gate) and the second term (reset gate) of the above-mentioned traditional GRU unit form are changed to the following form; at the same time, the tracking differentiator TD is used to extract the change trend of the input signal, and its output is related to x t Together they serve as constraints for the GRU unit, namely:

[0450] ;

[0451] Among them, b z and b r It is a bias term. NLSEF represents nonlinear state error feedback, which is a key part in the ADRC model. It is combined with weights and biases after being processed by the sigmoid activation function. ESO represents the extended state observer, which is also a key component of the ADRC model. It is directly combined with weights, the hidden state of the previous moment, and the current input as a bias term.

[0452] Specific:

[0453] (1) NLSEF (nonlinear state error feedback) is used to estimate the error between the system output and the desired output and feed it back nonlinearly into the system to adjust the system behavior:

[0454] ;

[0455] Where e is the error between the system output and the desired output, k1 and k2 are gain coefficients, a is the nonlinear exponent, and sign(e) is the sign function of the error;

[0456] (2) The expression of ESO (Extended State Observer) is used to estimate the state of the system, including the system's output, input signal and its derivative information:

[0457] ;

[0458] in, is the system output, is an estimate of the system output, is an estimate of the rate of change of the system output, is an estimate of the unknown disturbance of the system.

[0459] (3) The expression of TD (tracking differentiator) is used to extract the input signal s i The changing trend of, that is, its velocity and acceleration information: ;

[0460] Among them, s it is the input signal value at time t, v t is the estimated value of the speed of the input signal at time t, a t is the estimated value of the acceleration of the input signal at time t. These estimates are obtained by calculating the difference of the input signal at adjacent times and its rate of change.

[0461] Embodiment 4: In step S101 of embodiment 1, x refis the reference state. For the scenario in which this solution is applied, that is, the system involving the target position control of the valve core, the most suitable task is usually to track the desired valve core position. Therefore, based on the first embodiment, this embodiment preferably sets x ref Set to the desired spool position signal, which can come from a preset trajectory, a real-time control instruction, or a target position calculated based on an optimization algorithm.

[0462] (1) Preset trajectory tracking: If the movement of the valve core needs to follow a preset trajectory, then x ref It can be directly obtained from the trajectory according to time t. Let the preset trajectory be P(t), then x ref (t)=P(t);

[0463] Wherein, P(t) is a Boolean function or a symbolic function about time t, which describes the position that the valve core should reach at different times.

[0464] (2) Real-time control command tracking: If the position of the valve core needs to be adjusted according to the real-time control command, then x ref It can be set to the currently received control command value. Assume the control command is C(t), then:

[0465] x ref (t)=C(t);

[0466] Among them, C(t) is the control instruction received at time t, which can be a constant (indicating that the target position remains unchanged) or a signal that changes with time.

[0467] (3) Optimization algorithm: In addition to conventional particle swarm optimization or iterative algorithm, this embodiment further refers to a concept of entropy weight and proposes an optimization implementation algorithm for the specific limitations of this scenario - by calculating the entropy value of each factor to determine the weight, thereby optimizing system performance:

[0468] (3.1) Obtain multiple control parameters or indicators (valve core position, speed, acceleration), which jointly affect the performance of the system. Use the entropy weight method to determine the weights of these parameters or indicators in the optimization algorithm, and then obtain the optimized target position O(t). For each parameter or indicator i, first calculate its entropy value H at different time points or states i : ;

[0469] Among them, p ij is the probability distribution of parameter i at the jth time point or state. If parameter i is continuous, it can be discretized first, or the probability density function can be used to approximate the entropy value.

[0470] (3.2) Calculate the weight of each parameter: According to the idea of ​​entropy weight method, the smaller the entropy value, the greater the discrete degree of the parameter and the more information it provides, so the weight in the optimization algorithm should also be greater. i Calculated as: ;

[0471] Here, the denominator is a normalization factor of the sum of all parameter weights.

[0472] (3.3) Calculate the optimized target position ;

[0473] Among them, f i (t) is the value or state of parameter i at time t.

[0474] In this embodiment, the entropy weight method determines the weights entirely based on the degree of variation of the data itself, avoiding the interference of subjective factors. This makes the optimization algorithm more objective and fair, and can more accurately reflect the actual role of each parameter or indicator in the system. Since the entropy weight method can dynamically adjust the weights of each parameter or indicator, the optimization algorithm can better adapt to changes in system parameters or external environment. This helps to improve the robustness and stability of the system. The weights determined by the entropy weight method can more accurately reflect the importance of each parameter or indicator, thereby avoiding wasting resources on unimportant parameters or indicators during the optimization process.

[0475] Embodiment 5: Figure 7 As shown, this embodiment further provides a hardware system of the bidirectional Bi-GRU-ADRC neural network as described in Embodiment 1:

[0476] The system mainly includes a processor, a memory connected to the processor, and possible other auxiliary hardware components (such as input / output interface, communication module, etc.). The processor is responsible for executing the program instructions stored in the memory to realize the function of the bidirectional Bi-GRU-ADRC neural network, thereby controlling the valve core position of the voice coil servo valve.

[0477] Specifically, the processor can be a general-purpose central processing unit (CPU) or a processor optimized for neural network processing, such as a neural network processor (NPU), a graphics processing unit (GPU), or a field programmable gate array (FPGA). For neural network applications that require high-performance computing tasks, NPU or GPU are usually more suitable because they provide higher parallel computing capabilities and lower latency.

[0478] Specifically, the processor is responsible for executing the forward propagation and back-propagation algorithms of the bidirectional Bi-GRU-ADRC neural network, processing input data, generating control signals, and communicating with external devices.

[0479] Test example:

[0480] 1. Experimental purpose:

[0481] This example aims to verify the performance of the bidirectional Bi-GRU-ADRC neural network in voice coil servo valve control. By comparing with the traditional ADRC algorithm and RBF-ADRC neural network, its superiority in processing the dynamic characteristics of the voice coil servo valve is analyzed.

[0482] 2. Experimental equipment and parameters

[0483] 2.1 Experimental Group

[0484] (1) A linear actuator was purchased from the market and loaded with a G761-3004B voice coil servo valve (MOOG).

[0485] (2) Parameter setting:

[0486] Pressure drop: 70 bar (1015 psi);

[0487] Rated no-load flow: 0Q;

[0488] Rated flow rate: nominal load flow rate LQ under rated current, rated pressure and specified pressure drop vp on the valve;

[0489] Oil source and its pressure: HV type hydraulic oil, 4.5MPa;

[0490] (3) Control algorithm: The bidirectional Bi-GRU-ADRC neural network described in Examples 1 to 4 is used to control the voice coil servo valve.

[0491] 2.2 Control Group A:

[0492] Equipment: Same as the experimental group.

[0493] Control Algorithm: The conventional ADRC algorithm is used to control the voice coil servo valve.

[0494] 2.3 Control Group B:

[0495] Equipment: Same as the experimental group.

[0496] Control Algorithm: The traditional RBF-ADRC neural network is used to perform control on the voice coil servo valve.

[0497] 3. Experimental methods

[0498] Artificial control conditions: The oil source pressure and flow rate fluctuations of the experimental group, control group A and control group B were artificially controlled to simulate the saturation effect produced in the electromagnetic conversion process of the voice coil motor and the change of friction resistance of the valve core movement.

[0499] Data recording: Manually calculate the control electrical signal value required to control the voice coil servo valve at each time step and draw a curve table such as Fig.10 shown.

[0500] Execution control: The experimental group, control group A and control group B each performed the task of controlling the voice coil servo valve, and recorded the change curve of the control electrical signal value at each time step, and also drew the progress Fig.10 For comparison.

[0501] (IV) Experimental results:

[0502] like Fig.10 As shown in the figure, the control electrical signal value of the experimental group is obviously closer to the actual value, showing higher control accuracy and stability. Although the control group B is better than the control group A, its control effect is still not as good as the experimental group.

[0503] The voice coil servo valves in the control group B and the experimental group were simulated by finite element method. The results are as follows: Fig.11 shown.

[0504] Control group B ( Fig.11 Part (A) of Figure 1): The RBF-ADRC neural network causes large fluctuations in system performance during the control process. The reason may be that the gain coefficient of the ESO is improperly adjusted, resulting in suboptimal system parameters, which in turn affects system performance. This instability causes greater stress on the flow path of the voice coil servo valve.

[0505] Experimental group ( Fig.11 (B) in the figure): Through the bidirectional Bi-GRU network, the model can simultaneously consider the forward and backward timing dependencies, thereby more accurately capturing the dynamic characteristics of the system. Its internal tracking differentiator, extended state observer, and nonlinear state error feedback mechanism accurately estimate and feedback control the system state, improving the accuracy and robustness of parameter tuning. This enables the model to work more stably in the face of system parameter changes or external disturbances, thereby subjecting the voice coil servo valve flow channel to less stress.

[0506] 5. Conclusion

[0507] Experimental results show that the bidirectional Bi-GRU-ADRC neural network performs well in voice coil servo valve control, and its control accuracy and stability are better than those of the traditional ADRC algorithm and RBF-ADRC neural network. The bidirectional Bi-GRU network improves the accuracy and robustness of parameter setting by simultaneously considering the forward and backward timing dependencies, as well as the accurate estimation and feedback control of the system state, so that the voice coil servo valve can work more stably when facing system parameter changes or external disturbances. Therefore, the bidirectional Bi-GRU-ADRC neural network has broad application prospects in voice coil servo valve control.

[0508] All the above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

[0509] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0510] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Claims

1. A voice coil servo valve core position control method based on ADRC, characterized in that: The following steps are included: S1, inputting the input data sequence S as the valve core target position electrical signal into the bidirectional Bi-GRU network of the encoding layer; in each gated recurrent unit integrated with the tracking differentiator TD, the extended state observer ESO and the nonlinear state error feedback NLSEF, extracting the temporal dependency in the input data sequence S from both the forward and backward directions, and generating a hidden state sequence H; In S1, the input data sequence ; Where T is the length of the time series, s i is the electrical signal of the i-th valve core target position; The internal calculation of the gated recurrent unit includes: Tracking Differentiator TD: TD(s t ) means to input s t As the input of the tracking differentiator TD; Extended State Observer ESO: ;ESO(h t-1 ,z t ) means to change the hidden state of the previous time step and the current TD output z t As the input of the extended state observer ESO; Nonlinear state error feedback NLSEF: ; Indicates that the current system state is estimated With reference state x ref The error between t As input for nonlinear state error feedback; Update Gate: ; Reset the gate: ; Candidate hidden states ; is the hyperbolic tangent activation function Update hidden state ; Where U is the weight matrix, σ is the sigmoid activation function, ⊙ is the element-wise multiplication, and x ref is the reference state, z t is the input s processed by the tracking differentiator TD at the current time step t t The output obtained after is the output of the extended state observer ESO; t is the output of the nonlinear state error feedback NLSEF; W u and U u is the weight matrix in the update gate; z u is the activation value of the update gate; z r is the activation value of the reset gate; We t is the weight matrix W and e t The matrix product between ; is the hidden state of the previous time step; W r and U r is the weight matrix in the reset gate; In S1, the execution steps of the bidirectional Bi-GRU network are: Compute the hidden state sequence from the forward direction: ; ; in, Represents the set of hidden state sequences obtained by forward calculation; Represents the hidden state vector obtained by forward calculation at time step t; GRU forward Represents the forward calculation function Compute the hidden state sequence from the backward direction: ; ; in, Represents the set of hidden state sequences obtained by backward calculation; Represents the backward calculation function; represents the backward hidden state of the next time step; Get the final hidden state sequence ; in, , [·;·] represents vector concatenation operation; h t represents the final hidden state vector at time step t; S2, clustering analysis is performed on the sequence L composed of the saturation effect generated in the electromagnetic conversion process of the voice coil motor and the change in the friction resistance of the valve core movement, a weight factor δ is generated according to the clustering result, and a weighted correction is performed on the hidden state sequence H to obtain a corrected hidden state sequence H'; In S2, the method for extracting the sequence L is: ; Then we get the feature vector sequence ; in, represents the i-th saturation effect and its corresponding friction resistance characteristic value at time step t, T is the length of the time series, and N is the total number of saturation effects and their corresponding friction resistance characteristic values; In S2, the cluster analysis method is an ordered clustering algorithm, and its process includes: Set up a separate cluster ; Define the distance measure between clusters d(C i , C j ), calculate the distance between all cluster pairs and find the cluster pair with the smallest distance ; Merge cluster pairs Form new clusters, update the cluster set and the distance matrix between clusters, and obtain the cluster label sequence , for each eigenvector f t Find the cluster C to which it belongs k And assign cluster label c t = k; Finally, we get the clustering label sequence C = {c1,c 2, ...,c T }; Among them, C0 represents the initial clustering set; C i and C j represents two clusters, d is the Euclidean distance or Manhattan distance, and K is the number of clusters; In S2, a weight factor sequence is formed according to the cluster label sequence C; first, a weight mapping function δ(c) is defined to map the cluster label c to the weight factor δ, satisfying δ(c)∈[0, 1]; then, the weight factor sequence is formed by mapping, and the process includes: For each cluster label c t , calculate its corresponding weight factor δ t =δ(c t ); Based on the existing K clusters and each cluster C k Contains k feature vectors, defining the cluster size n k = |C k |, where k=1,2,...,K; Define the total number of eigenvectors , and define the weight mapping function ; Among them, n k is cluster C k is the number of eigenvectors in; N is the total number of eigenvectors in all clusters; Get the weight factor sequence ; Among them, δ t is the cluster label c t The corresponding weight factor; In S2, the weighted correction is performed to obtain the corrected hidden state sequence : ; Among them, the tth corrected final hidden state vector ; S3, weighted summing the hidden state sequence H' is performed through the attention mechanism to generate an intermediate vector C i , and use the historical prediction error to compensate through the residual backtracking mechanism to generate the corrected intermediate vector C' i ; S4, the corrected intermediate vector C' i , the hidden state of the previous time step and the prediction result of the decoder are input into the bidirectional Bi-GRU network of the decoding layer, and an output data sequence as the control electrical signal of the voice coil motor is gradually generated based on the gated recurrent unit.

2. The method for controlling the position of a voice coil servo valve core according to claim 1, characterized in that: In S3, all hidden state matrices R output by the encoding layer are defined d×T : ; Among them, the output state S of the decoding layer at the i-th step is defined i ∈R d ; R d×T is a d×T matrix, where d is the dimension of the hidden state and T is the length of the sequence; The weight coefficient vector in the attention mechanism ; Among them, α i is the weight coefficient vector of the attention mechanism; The intermediate vector ; The residual backtracking mechanism is: ; in, is the historical forecast error vector; It means that this is an m-dimensional vector, where m is the dimension of the output; It is in The actual output of the time step; In the The predicted output vector for time steps; The least squares method calculates the error feedback coefficient matrix B and minimizes the residual sum of squares: ; in, Represents the square of the Euclidean distance; ┬ represents the matrix transpose operation; The error feedback coefficient and historical prediction error are used for compensation to generate the corrected intermediate vector C' i : ; in, Based on historical forecast errors The adjustment term calculated by and the error feedback coefficient matrix B.

3. The method for controlling the position of a voice coil servo valve core according to claim 2, characterized in that: In the S4, the processing method of the decoding layer is: enter: ; Among them, C' i is the corrected intermediate vector, h decoder, i-1 is the hidden state at the previous time step, is the decoder’s prediction result of the previous time step, x decoder,i is the input vector of the decoder at the i-th time step; The bidirectional Bi-GRU network processes: ; Among them, h decoder, i-1 Initialize with future hidden state; In each of the gated recurrent units, the embedded ADRC model is integrated to process the input: ; Among them, X GRU,i represents the input in the gated recurrent unit, h ADRC,i Represents the control signal or hidden state generated by the ADRC model.

4. The method for controlling the position of a voice coil servo valve core according to claim 3, characterized in that: In said S4, an output data sequence is generated ; Among them, W out and b out are the weights and biases of the output layer, is the predicted output of the decoder at the i-th time step, i.e., the control electrical signal of the voice coil motor.

5. The voice coil servo valve core position control system based on ADRC is characterized by: The system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory. When the program instructions are executed by the processor, the processor executes the voice coil servo valve core position control method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Electro-hydraulic proportional valve as well as position control system and method and fault prediction method thereof

    CN113431925A

  • Earthquake simulation vibration table control method and system based on LADRC

    CN114993591A