A method, system, apparatus, and medium for accumulator piston displacement detection

By combining linear frequency modulated continuous wave radar with a long short-term memory network (LSTM) model, the accuracy and efficiency issues of accumulator piston displacement detection under extreme environments were solved, achieving efficient and intelligent piston displacement detection.

CN115824102BActive Publication Date: 2026-06-23NINGBO SPECIAL EQUIP INSPECTION & RES INST +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NINGBO SPECIAL EQUIP INSPECTION & RES INST
Filing Date
2022-12-19
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing methods for detecting accumulator piston displacement are difficult to achieve intelligent and efficient detection under high pressure and extreme environments. Furthermore, linear frequency modulated millimeter-wave radar ranging is susceptible to electromagnetic interference and errors, making it impossible to accurately determine the relationship between the difference frequency signal and the target distance.

Method used

A linear frequency modulated continuous wave radar is used to acquire the difference frequency signal, and a long short-term memory network (LSTM) model is used to train the accumulator piston distance detection model. The spectrum is generated by wavelet preprocessing and fast Fourier transform to determine the maximum amplitude spectral line and its adjacent frequency values, so as to achieve efficient detection of piston displacement.

Benefits of technology

It achieves accurate and efficient detection of accumulator piston displacement in complex environments, taking into account error factors, and possesses intelligence and high efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115824102B_ABST
    Figure CN115824102B_ABST
Patent Text Reader

Abstract

The application discloses an accumulator piston displacement detection method, system, device and medium, and relates to the technical field of displacement detection. The method comprises the following steps: detecting a target accumulator piston by using a linear frequency modulation continuous wave radar to obtain a to-be-detected difference frequency signal; generating a to-be-detected frequency spectrum diagram according to the to-be-detected difference frequency signal; determining a frequency value corresponding to a maximum amplitude spectrum line and frequency values corresponding to left and right adjacent spectrum lines of the maximum amplitude spectrum line from the to-be-detected frequency spectrum diagram to obtain a group of to-be-detected frequency values; inputting the to-be-detected frequency values into an accumulator piston distance detection model for detection to obtain a predicted distance between the target accumulator piston and the linear frequency modulation continuous wave radar; and the accumulator piston distance detection model is obtained based on long short-term memory network training. The accumulator piston displacement detection method provided by the application comprehensively considers various errors and has the advantages of high efficiency, accuracy and intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of displacement detection technology, and in particular to a method, system, device and medium for detecting the displacement of an accumulator piston. Background Technology

[0002] Accumulators, as pressure vessels for storing and releasing energy, are mainly used in hybrid vehicles, steel rolling mills, elevators, and excavators. They require repeated filling under high pressure and maintaining stable storage pressure. Therefore, safe, comprehensive, and efficient quality testing of accumulators is necessary. The liquid level information within the accumulator corresponds to the discharge flow rate, reflecting not only the accumulator's operating status but also system faults in hydraulic / pneumatic systems. The liquid level information is generally reflected by the piston displacement. Detecting the piston displacement within the accumulator is limited by harsh testing conditions such as extreme internal temperatures, high pressures, volatile materials, low visibility, and oil stains. Furthermore, the actual operating conditions of the accumulator itself are constantly changing. Therefore, accumulator piston displacement detection is challenging, and related research is limited.

[0003] Common liquid level measurement devices include buoyancy-based, piezoelectric sensor-based, ultrasonic echo, guided wave, and laser infrared types. Buoyancy-based devices are simple in principle and structure, but unsuitable for high-viscosity liquids; capacitive sensors have low installation requirements but are prone to false readings when exposed to adhering conductive liquids; waveguide sensors may be difficult to implement and maintain in applications requiring high sealing; optical sensors are limited in use in dusty, foggy, or rainy liquid media; and ultrasonic sensors are sensitive to changes in pressure and the transmission medium. Radar sensors, on the other hand, have a certain adaptability to extreme environments and offer non-contact measurement capabilities. Linear frequency modulated millimeter-wave radar, in particular, is small in size and high in accuracy, making it more suitable for the extreme operating environments inside accumulators.

[0004] However, existing radar ranging methods using linear frequency modulated (LFM) millimeter-wave radar suffer from several drawbacks. Firstly, achieving good LFM is difficult, affecting range resolution. Secondly, LFM is susceptible to electromagnetic interference, leading to false alarms. Thirdly, the processing of the difference frequency signal is subject to measurement accuracy errors caused by circuit and algorithmic issues. These include VCO nonlinearity errors, circuit delay hindrace sweep, quantization errors in the sampling circuit, and spectral estimation errors (specifically manifested as clutter interference, aliasing, spectral leakage, and picket fence effects). Furthermore, current radar ranging methods, such as Fourier transform, wavelet analysis, and instantaneous autocorrelation algorithms, often fail to accurately and quickly determine the relationship between the difference frequency signal and the target distance due to the complex nonlinear relationship between them.

[0005] In summary, it is currently impossible to achieve intelligent and efficient detection of accumulator piston displacement. Summary of the Invention

[0006] The purpose of this invention is to provide a method, system, device, and medium for detecting the displacement of an accumulator piston, so as to achieve intelligent and efficient detection of the displacement of the accumulator piston.

[0007] To achieve the above objectives, the present invention provides the following solution:

[0008] A method for detecting the displacement of an accumulator piston, the method comprising:

[0009] The target accumulator piston is detected using a linear frequency modulated continuous wave radar to obtain the difference frequency signal to be measured;

[0010] Generate the spectrum diagram to be tested based on the difference frequency signal to be tested;

[0011] From the spectrum diagram to be measured, determine the frequency value corresponding to the spectral line with the largest amplitude and the frequency values ​​corresponding to the left and right adjacent spectral lines of the spectral line with the largest amplitude to obtain a set of frequency values ​​to be measured.

[0012] The measured frequency value is input into the accumulator piston distance detection model for detection, and the predicted distance between the target accumulator piston and the linear frequency modulated continuous wave radar is obtained; the accumulator piston distance detection model is obtained based on long short-term memory network training;

[0013] The displacement of the target accumulator piston is determined based on the predicted distance.

[0014] Optionally, the step of using a linear frequency modulated continuous wave radar measurement system to detect the target accumulator piston and obtain the difference frequency signal to be measured specifically includes:

[0015] The linear frequency modulated continuous wave radar transmits a first linear frequency modulated signal to the target accumulator piston and receives a second linear frequency modulated signal reflected by the target accumulator piston.

[0016] The difference frequency signal to be measured is generated based on the first linear frequency modulation signal and the second linear frequency modulation signal.

[0017] Optionally, the method for determining the accumulator piston distance detection model specifically includes:

[0018] Obtain a sample dataset; the sample dataset includes multiple sets of sample frequency values ​​when the target accumulator piston is in different positions, and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar;

[0019] Construct an initial long short-term memory network model;

[0020] The initial long short-term memory network model was trained using the sample dataset to obtain the accumulator piston distance detection model.

[0021] Optionally, training the initial long short-term memory network model using the sample dataset to obtain the accumulator piston distance detection model specifically includes:

[0022] The sample dataset is divided into n equal subsets using a combination of stratified sampling and simple random sampling; where n is an integer greater than 1.

[0023] Randomly select n-1 subsets from the n subsets of the sample data as the training sample set, and use the remaining subset as the test sample set;

[0024] The training sample set is input into the long short-term memory network model trained in the (k-1)th training iteration to obtain the long short-term memory network model trained in the kth iteration; where k is an integer starting from 1, and when k=1, the long short-term memory network model trained in the (k-1)th iteration is the initial long short-term memory network model.

[0025] The test sample set is input into the long short-term memory network model trained for the kth time for prediction, and the corresponding prediction accuracy is obtained.

[0026] Determine whether the prediction accuracy meets the set conditions, and obtain the determination result;

[0027] If the judgment result is negative, then adjust the long short-term memory network model trained for the kth time according to the prediction accuracy, update the value of k, and return to the step of "randomly selecting n-1 subsets from the n subsets of the sample data as training sample sets, and using the remaining subset as test sample sets".

[0028] If the judgment result is yes, then the long short-term memory network model trained for the kth time is determined as the accumulator piston distance detection model.

[0029] Optionally, the method of using stratified sampling combined with simple random sampling to divide the sample dataset into n equal subsets specifically includes:

[0030] The sample frequency values ​​in the sample dataset are stratified according to the magnitude of the true distance and divided into m initial data subsets; wherein each initial data subset includes n sample frequency values, where m and n are both integers greater than 0, and the value of m*n is equal to the total number of sample frequency values ​​in the sample dataset.

[0031] A set of sample frequency values ​​is randomly selected from the m initial data subsets and combined to obtain n sample data subsets.

[0032] Optionally, obtaining the sample dataset specifically includes:

[0033] Determine the frequency modulation parameters of the linear frequency modulated continuous wave radar; the frequency modulation parameters include: frequency modulation bandwidth, frequency modulation period, sampling frequency, and number of sampling points;

[0034] The linear frequency modulated continuous wave radar transmits linear frequency modulated detection signals to the target accumulator piston at different locations and receives the linear frequency modulated reflected signals reflected by the target accumulator piston.

[0035] Based on the linear frequency modulated detection signal and the linear frequency modulated reflection signal corresponding to the target accumulator piston at each position, a set of sample frequency values ​​and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar are determined respectively.

[0036] For the target accumulator piston at any position, the process of determining the sample frequency value and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar specifically includes:

[0037] A sample difference frequency signal is generated based on the linear frequency modulated detection signal and the linear frequency modulated reflection signal;

[0038] Generate a sample spectrum diagram based on the sample difference frequency signal;

[0039] From the sample spectrum diagram, determine the frequency value corresponding to the maximum amplitude spectral line and the frequency values ​​corresponding to the left and right adjacent spectral lines of the maximum amplitude spectral line to obtain a set of sample frequency values;

[0040] The true distance between the target accumulator piston and the linear frequency modulated continuous wave radar corresponding to the sample frequency value is determined based on the sample difference frequency signal and the frequency modulation parameter.

[0041] Optionally, generating the spectrum diagram based on the difference frequency signal to be measured specifically includes:

[0042] The difference frequency signal to be measured is subjected to wavelet preprocessing and fast Fourier transform processing to obtain the spectrum diagram of the difference frequency signal to be measured.

[0043] A system for detecting the displacement of an accumulator piston, the system comprising:

[0044] The difference frequency signal acquisition module is used to detect the target accumulator piston using a linear frequency modulated continuous wave radar to obtain the difference frequency signal to be measured.

[0045] The spectrum generation module is used to generate a spectrum diagram of the target frequency signal based on the target difference frequency signal.

[0046] The frequency value determination module is used to determine the frequency value corresponding to the maximum amplitude spectral line and the frequency values ​​corresponding to the left and right adjacent spectral lines of the maximum amplitude spectral line from the spectrum diagram to be measured, so as to obtain a set of frequency values ​​to be measured.

[0047] The distance detection module is used to input the frequency value to be measured into the accumulator piston distance detection model for detection, and to obtain the predicted distance between the target accumulator piston and the linear frequency modulated continuous wave radar; the accumulator piston distance detection model is obtained based on long short-term memory network training;

[0048] The displacement determination module is used to determine the displacement of the target accumulator piston based on the predicted distance.

[0049] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor running the computer program to cause the electronic device to perform the above-described method for detecting the displacement of an accumulator piston.

[0050] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for detecting the displacement of an accumulator piston.

[0051] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0052] The accumulator piston displacement detection method provided by this invention acquires the difference frequency signal of the target accumulator piston using a linear frequency modulated continuous wave radar. It then utilizes a Long Short-Term Memory (LSTM) network to obtain the implicit relationship between the difference frequency signal and the piston distance. This allows for the accurate and efficient prediction of the distance between the target accumulator piston and the linear frequency modulated continuous wave radar using an accumulator piston distance detection model trained on an LSTM network, thereby determining the displacement of the target accumulator piston. This accumulator piston displacement detection method is an innovative application of LSTM networks in displacement detection, comprehensively considering various errors and possessing the advantages of high efficiency, accuracy, and intelligence. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 A flowchart of the accumulator piston displacement detection method provided by the present invention;

[0055] Figure 2 A detailed flowchart of the accumulator piston displacement detection method provided in this embodiment of the invention;

[0056] Figure 3 A flowchart illustrating the organization and partitioning of the sample dataset provided in this embodiment of the invention;

[0057] Figure 4 A flowchart illustrating the modeling process of the accumulator piston distance detection model provided in an embodiment of the present invention;

[0058] Figure 5 This is a schematic diagram of the network structure of the initial long short-term memory network provided in an embodiment of the present invention;

[0059] Figure 6 A block diagram of the accumulator piston displacement detection system provided by the present invention.

[0060] Symbol explanation:

[0061] Difference frequency signal acquisition module—1, spectrum generation module—2, frequency value determination module—3, distance detection module—4, displacement determination module—5. Detailed Implementation

[0062] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0063] The purpose of this invention is to provide a method, system, device, and medium for detecting the displacement of an accumulator piston, so as to achieve intelligent and efficient detection of the displacement of the accumulator piston.

[0064] In existing technologies, radar ranging is mostly achieved using digital signal analysis methods such as Fourier transform, wavelet analysis, and instantaneous autocorrelation algorithms. These methods are all mathematical, and deep learning algorithms are rarely applied to difference frequency signal processing. Because the difference frequency signal contains hidden target distance information, the frequency values ​​corresponding to the largest amplitude spectral line and its adjacent amplitude spectral lines in the difference frequency signal spectrum have a complex nonlinear relationship with the target distance. Current analytical or nonlinear fitting methods cannot derive the corresponding model. LSTM networks, however, solve the problem of information transmission in long-term sequences by controlling the addition or discarding of information through "gates," possessing long-term memory capabilities and mitigating the gradient explosion problem to some extent. Currently, LSTM networks are commonly used in stock prediction, text classification, fault diagnosis, and speech recognition, but their application in displacement detection is relatively rare.

[0065] Therefore, addressing the shortcomings and difficulties of the existing technologies, this invention provides a method, system, device, and medium for detecting accumulator piston displacement based on LSTM and Linear Frequency Modulated Continuous Wave (LFMCW) radar. By acquiring the difference frequency signal through LFMCW radar and utilizing an LSTM network to obtain the implicit relationship between the difference frequency signal and piston displacement, this innovative application of LSTM networks in displacement detection comprehensively considers various errors and possesses the advantages of accuracy, efficiency, and intelligence.

[0066] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0067] Example 1

[0068] like Figure 1 As shown, the present invention provides a method for detecting the displacement of an accumulator piston, the method comprising:

[0069] Step 110: Use linear frequency modulated continuous wave radar to detect the piston of the target accumulator and obtain the difference frequency signal to be measured.

[0070] Step 120: Generate a spectrum diagram based on the difference frequency signal to be measured. Preferably, the difference frequency signal to be measured is subjected to wavelet preprocessing and fast Fourier transform processing to obtain the spectrum diagram corresponding to the difference frequency signal to be measured.

[0071] Step 130: Determine the frequency value corresponding to the maximum amplitude spectral line and the frequency values ​​corresponding to the left and right adjacent spectral lines of the maximum amplitude spectral line from the spectrum to be measured to obtain a set of frequency values ​​to be measured.

[0072] Step 140: Input the frequency value to be measured into the accumulator piston distance detection model for detection, and obtain the predicted distance between the target accumulator piston and the linear frequency modulated continuous wave radar; the accumulator piston distance detection model is obtained based on long short-term memory network training.

[0073] Step 150: Determine the displacement of the target accumulator piston based on the predicted distance.

[0074] Furthermore, the method for determining the accumulator piston distance detection model specifically includes:

[0075] Step 101: Obtain a sample dataset; the sample dataset includes multiple sets of sample frequency values ​​when the target accumulator piston is in different positions, as well as the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar.

[0076] Step 102: Construct the initial Long Short-Term Memory (LSTM) network model. Specifically, the LTM network algorithm is used for modeling. The input layer of the network has 3 nodes, representing the 3 input frequency values, and the output layer has 1 node, representing the distance between the piston and the radar. The number of hidden layers and nodes are continuously adjusted during later training based on the prediction accuracy. In addition, this invention also adds dropout technology to the LTM network layer.

[0077] Step 103: Train the initial long short-term memory network model using the sample dataset to obtain the accumulator piston distance detection model.

[0078] Step 101 specifically includes:

[0079] 1.1 Determine the frequency modulation parameters of the linear frequency modulated continuous wave radar; the frequency modulation parameters include: frequency modulation bandwidth, frequency modulation period, sampling frequency, and number of sampling points.

[0080] 1.2. The linear frequency modulated continuous wave radar transmits linear frequency modulated detection signals to the target accumulator piston at different locations and receives the linear frequency modulated reflected signals reflected by the target accumulator piston.

[0081] 1.3. Based on the linear frequency modulated detection signal and the linear frequency modulated reflection signal corresponding to the target accumulator piston at each position, determine a set of sample frequency values ​​and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar.

[0082] For the target accumulator piston at any position, the process of determining the sample frequency value and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar specifically includes:

[0083] 1.3.1 Generate a sample difference frequency signal based on the linear frequency modulated detection signal and the linear frequency modulated reflection signal.

[0084] 1.3.2 Generate a sample spectrum diagram based on the sample difference frequency signal.

[0085] 1.3.3 Determine the frequency value corresponding to the maximum amplitude spectral line and the frequency values ​​corresponding to the left and right adjacent spectral lines of the maximum amplitude spectral line from the sample spectrum to obtain a set of sample frequency values.

[0086] 1.3.4. Determine the true distance between the target accumulator piston and the linear frequency modulated continuous wave radar corresponding to the sample frequency value based on the sample difference frequency signal and the frequency modulation parameter.

[0087] Preferably, step 103 specifically includes:

[0088] 3.1. Using a combination of stratified sampling and simple random sampling, the sample dataset is divided into n sample data subsets; where n is an integer greater than 1.

[0089] Preferably, before step 3.1, the method further includes: reducing the data in the sample dataset by an appropriate factor so that each data point becomes a decimal not exceeding 1.

[0090] 3.2 Randomly select n-1 subsets from the n subsets of the sample data as the training sample set, and use the remaining subset as the test sample set.

[0091] 3.3 Input the training sample set into the long short-term memory network model trained for the (k-1)th time to obtain the long short-term memory network model trained for the kth time; where k is an integer starting from 1, and when k=1, the long short-term memory network model trained for the (k-1)th time is the initial long short-term memory network model.

[0092] Specifically, training the long short-term memory network model includes: randomly initializing the network weights, and then continuously updating the weights and bias terms based on the training sample set data until the prediction error reaches the minimum value, thereby completing the training and optimization of the long short-term neural network model.

[0093] 3.4 Input the test sample set into the long short-term memory network model trained for the kth time for prediction to obtain the corresponding prediction accuracy.

[0094] Preferably, the prediction accuracy in this invention uses the mean squared error (RMSE). The closer the RMSE is to 0, the more accurate the prediction result, i.e., the higher the prediction accuracy. The formula for calculating prediction accuracy is as follows:

[0095]

[0096] In the formula, x i This represents the distance from the true value of the i-th data group in the test sample set. Let represent the distance prediction value of the i-th data group in the test sample set, and P represent the total number of data groups in the test sample set.

[0097] 3.5 Determine whether the prediction accuracy meets the set conditions and obtain the judgment result.

[0098] 3.6 If the judgment result is negative, adjust the long short-term memory network model trained for the kth time according to the prediction accuracy, update the value of k, and return to step 3.2.

[0099] 3.7 If the judgment result is yes, then the long short-term memory network model trained for the kth time is determined as the accumulator piston distance detection model.

[0100] The following detailed explanation of each of the above steps is based on a specific embodiment.

[0101] like Figure 2 As shown, the accumulator piston displacement detection method based on LSTM for LFMCW radar provided by this invention is implemented through the following steps:

[0102] Step 1: Determine the frequency modulation bandwidth B, frequency modulation period T, and sampling frequency f of the LFMCW radar measurement system. s Parameters such as the number of sampling points N are included. The radar's modulation signal generator produces a linear frequency modulated (LFM) signal, which is transmitted via the radio frequency transmitting antenna. This LFM pulse is reflected by the piston in the accumulator, generating a reflected LFM signal received by the receiving antenna. The mixer combines the transmitted and received signals to generate a difference frequency signal. After difference frequency signal processing and AD sampling, the signal is displayed on the computer via a microcontroller. Taking a sawtooth wave as an example, assuming the frequency of the transmitted sawtooth wave is f... s The frequency of the reflected wave is f r The distance between the target and the radar is R, and the time delay between the transmitted and received waves is t. d Without considering the Doppler effect and parasitic amplitude modulation, the frequency f of the difference between the transmitted and received waves at any given time is:

[0103] f = f s -f r

[0104] t d =2R / c

[0105] In the formula, c represents the speed of light, and the target distance R can be calculated as follows:

[0106]

[0107] Step 2: Use LFMCW radar to acquire the difference frequency signal when the accumulator piston is in different positions. Let the distance between the piston and the radar be x, then the distance range is x. s ~x e The distance gradient at different locations is Δx.

[0108] Step 3: Wavelet preprocessing and Fast Fourier Transform (FFT) processing of the difference frequency signal. First, based on the characteristics of the difference frequency signal, spectral layer filtering is performed to determine the wavelet function and the number of decomposition layers. Then, an N-point FFT spectral analysis is performed on the preprocessed difference frequency signal. Through FFT analysis, the acquired difference frequency signal is converted from the time domain to the frequency domain, thereby obtaining the spectrum of the difference frequency signal at different distances.

[0109] Step 4: Organize and divide the accumulator piston displacement detection dataset. First, find the maximum amplitude spectral line A and its left and right adjacent spectral lines B and C from the spectrum diagrams of the difference frequency signals at different distances. The corresponding frequency values ​​of the three spectral lines are f. a f b f c Then, different distances x correspond to a set of frequencies f. a f b f c We treat all the data as a set S, i.e., the sample dataset, and use a combination of stratified sampling and simple random sampling to divide the sample dataset.

[0110] The method employs a combination of stratified sampling and simple random sampling to divide the sample dataset into n equal subsets. Specifically, this involves: stratifying the frequency values ​​of each group in the sample dataset according to their true distance, and dividing them into m initial subsets; each initial subset includes n frequency values, where m and n are both integers greater than 0, and the value of m*n equals the total number of frequency values ​​in the sample dataset; and then randomly selecting a set of frequency values ​​from each of the m initial subsets to combine them, resulting in n subsets.

[0111] Specifically, such as Figure 3 As shown, the steps for partitioning the sample dataset using a combination of stratified sampling and simple random sampling are as follows:

[0112] (1) Divide the set S into m equal subsets based on the distance between them. i ,i=1,2,…m.

[0113] (2) Randomly select a set of data from the m subsets in sequence to form a new n subset T. j ,j=1,2,…n.

[0114] Furthermore, the present invention also provides a method for estimating the accuracy of an algorithm, specifically including:

[0115] (1) Take n-1 portions of the n sample data subsets as training data and the remaining portion as test data to conduct experiments.

[0116] (2) Evaluate the prediction accuracy of the LSTM neural network model. In this embodiment, the root mean square error (RMSE) is used as the evaluation index. The closer the RMSE is to 0, the more accurate the prediction result.

[0117] (3) Calculate the prediction accuracy of n trials and use the average of the results as an estimate of the algorithm's accuracy.

[0118] Step 5: Preprocess the selected data and use the LSTM algorithm for modeling.

[0119] like Figure 4 As shown, the steps for preprocessing the selected data and modeling it using the LSTM algorithm are as follows:

[0120] (1) Reduce the data in the sample dataset by an appropriate factor so that it becomes a decimal no more than 1.

[0121] (2) Using the LSTM neural network algorithm for modeling, the initial LSTM network model obtained is as follows: Figure 5 As shown, the network's input layer has three nodes, representing three input frequency values; the output layer has one node, representing the distance between the piston and the radar; the number of hidden layers and the number of nodes in each layer are continuously adjusted according to the prediction accuracy; the hidden layers include LSTM layers, and preferably, the initial LSTM network model uses dropout technology in its LSTM layers. Dropout technology is a technique where, during the training process, a portion of the neural network units (see...) are dropped out at a certain ratio. Figure 5 The white neural network units (in the original network) are temporarily discarded, which is equivalent to simplifying the original neural network. The final formula for the initial long short-term memory network model is as follows:

[0122] x=F(f a ,f b ,f c )

[0123] (3) The network weights are randomly initialized, and then the weights and bias terms are continuously updated according to the training set data until the error reaches the minimum value, thus completing the training and optimization of the LTSM model.

[0124] (4) Input the test set data into the trained LSTM model (i.e., the detection model) to obtain the prediction accuracy of the model.

[0125] (5) Repeat steps (2)-(4) in step five, continuously adjust the network structure of the model (specifically the number of hidden layers and the number of nodes in each layer), and compare the prediction accuracy of different structure models until the LSTM model with the best prediction accuracy is obtained.

[0126] Step Six: Calibrate the position of the accumulator piston by acquiring the difference frequency signal using LFMCW radar, and process the difference frequency signal to obtain the frequency value f. a f b f c Substitute the LSTM model established in step five into the output predicted distance x. P .

[0127] The process of acquiring difference frequency signals using an LFMCW radar when displacement detection of the target accumulator piston specifically includes: transmitting a first linear frequency modulated (LFM) signal to the target accumulator piston using the LFM radar, and receiving a second LFM signal reflected by the target accumulator piston; generating a difference frequency signal to be measured based on the first and second LFM signals. The subsequent processing of the difference frequency signal to be measured is similar to the process of processing sample data during model training, and will not be elaborated here.

[0128] Example 2

[0129] To implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, a system for detecting the displacement of an accumulator piston is provided below. For example... Figure 6 As shown, the system includes:

[0130] The difference frequency signal acquisition module 1 is used to detect the piston of the target accumulator using a linear frequency modulated continuous wave radar to obtain the difference frequency signal to be measured.

[0131] The spectrum generation module 2 is used to generate a spectrum diagram of the target frequency based on the target difference frequency signal.

[0132] The frequency value determination module 3 is used to determine the frequency value corresponding to the maximum amplitude spectral line and the frequency values ​​corresponding to the left and right adjacent spectral lines of the maximum amplitude spectral line from the spectrum to be measured, so as to obtain a set of frequency values ​​to be measured.

[0133] The distance detection module 4 is used to input the frequency value to be measured into the accumulator piston distance detection model for detection, so as to obtain the predicted distance between the target accumulator piston and the linear frequency modulated continuous wave radar; the accumulator piston distance detection model is obtained by training based on a long short-term memory network.

[0134] The displacement determination module 5 is used to determine the displacement of the target accumulator piston based on the predicted distance.

[0135] Example 3

[0136] This invention also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the accumulator piston displacement detection method of Embodiment 1. The electronic device may be a server.

[0137] In addition, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for detecting the displacement of the accumulator piston in Embodiment 1.

[0138] In summary, this invention provides a novel and intelligent method for detecting the piston displacement of an accumulator. Addressing the complex testing conditions inside the accumulator, it employs a miniaturized, non-contact, and easily maintained linear frequency modulated continuous wave radar to collect the difference frequency signal between the piston and the radar at different positions for subsequent training. During spectrum analysis, the difference frequency signal is first preprocessed using wavelet analysis, and then the spectrum diagram of the difference frequency signal is obtained using FFT analysis. The frequency values ​​corresponding to the maximum amplitude spectrum line and its adjacent amplitude spectrum lines are used as input data, and the corresponding piston distance is used as output data. The dataset is organized and divided, an LSTM prediction model is established, and the LSTM model is trained and optimized using the dataset, ultimately achieving intelligent and efficient detection of the accumulator piston displacement.

[0139] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0140] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting the displacement of an accumulator piston, characterized in that, The method includes: The target accumulator piston is detected using a linear frequency modulated continuous wave radar to obtain the difference frequency signal to be measured; Generate the spectrum diagram to be tested based on the difference frequency signal to be tested; From the spectrum diagram to be measured, determine the frequency value corresponding to the spectral line with the largest amplitude and the frequency values ​​corresponding to the left and right adjacent spectral lines of the spectral line with the largest amplitude to obtain a set of frequency values ​​to be measured. The frequency value to be measured is input into the accumulator piston distance detection model for detection to obtain the predicted distance between the target accumulator piston and the linear frequency modulated continuous wave radar. The accumulator piston distance detection model is trained based on a long short-term memory network. The method for determining the accumulator piston distance detection model specifically includes: acquiring a sample dataset; the sample dataset includes multiple sets of sample frequency values ​​when the target accumulator piston is in different positions and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar; constructing an initial long short-term memory network model; specifically, using the long short-term memory network algorithm for modeling, the number of nodes in the input layer of the network corresponds to the number of input frequency values, the output layer has 1 node, representing the distance between the piston and the radar, and the number of hidden layers and nodes are continuously adjusted in later training according to the prediction accuracy; and dropout technology is added to the long short-term memory network layer; the initial long short-term memory network model is trained using the sample dataset to obtain the accumulator piston distance detection model. The acquisition of the sample dataset specifically includes: determining the frequency modulation parameters of the linear frequency modulated continuous wave radar; the frequency modulation parameters include: frequency modulation bandwidth, frequency modulation period, sampling frequency, and number of sampling points; using the linear frequency modulated continuous wave radar to transmit linear frequency modulated detection signals to the target accumulator piston at different positions, and receiving the linear frequency modulated reflected signals reflected by the target accumulator piston; based on the linear frequency modulated detection signals and the linear frequency modulated reflected signals corresponding to the target accumulator piston at each position, determining a set of sample frequency values ​​and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar; For the target accumulator piston at any position, the process of determining the sample frequency value and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar specifically includes: generating a sample difference frequency signal based on the linear frequency modulated detection signal and the linear frequency modulated reflection signal; generating a sample spectrum diagram based on the sample difference frequency signal; determining the frequency value corresponding to the maximum amplitude spectral line and the frequency values ​​corresponding to the left and right adjacent spectral lines of the maximum amplitude spectral line from the sample spectrum diagram to obtain a set of sample frequency values; and determining the true distance between the target accumulator piston and the linear frequency modulated continuous wave radar corresponding to the sample frequency value based on the sample difference frequency signal and the frequency modulation parameter. The displacement of the target accumulator piston is determined based on the predicted distance.

2. The method for detecting the piston displacement of an accumulator according to claim 1, characterized in that, The method of using linear frequency modulated continuous wave radar to detect the piston of a target energy storage device and obtain the difference frequency signal to be measured specifically includes: The linear frequency modulated continuous wave radar transmits a first linear frequency modulated signal to the target accumulator piston and receives a second linear frequency modulated signal reflected by the target accumulator piston. The difference frequency signal to be measured is generated based on the first linear frequency modulation signal and the second linear frequency modulation signal.

3. The method for detecting the piston displacement of an accumulator according to claim 1, characterized in that, The step of training the initial long short-term memory network model using the sample dataset to obtain the accumulator piston distance detection model specifically includes: The sample dataset is divided into n equal subsets using a combination of stratified sampling and simple random sampling. Where n is an integer greater than 1; Randomly select n-1 subsets from the n subsets of the sample data as the training sample set, and use the remaining subset as the test sample set; The training sample set is input into the long short-term memory network model trained in the (k-1)th training iteration to obtain the long short-term memory network model trained in the kth iteration; where k is an integer starting from 1, and when k=1, the long short-term memory network model trained in the (k-1)th iteration is the initial long short-term memory network model. The test sample set is input into the long short-term memory network model trained for the kth time for prediction, and the corresponding prediction accuracy is obtained. Determine whether the prediction accuracy meets the set conditions, and obtain the determination result; If the judgment result is negative, then adjust the long short-term memory network model trained for the kth time according to the prediction accuracy, update the value of k, and return to the step of "randomly select n-1 subsets from the n subsets of the sample data as training sample sets, and use the remaining subset as test sample sets". If the judgment result is yes, then the long short-term memory network model trained for the kth time is determined as the accumulator piston distance detection model.

4. The method for detecting the piston displacement of an accumulator according to claim 3, characterized in that, The method employing stratified sampling combined with simple random sampling divides the sample dataset into n equal subsets, specifically including: The sample frequency values ​​in the sample dataset are stratified according to their true distance and divided into m initial data subsets; each initial data subset includes n sample frequency values, where m and n are both integers greater than 0, and m The value of n is equal to the total number of sample frequency values ​​in the sample dataset; A set of sample frequency values ​​is randomly selected from the m initial data subsets and combined to obtain n sample data subsets.

5. The method for detecting the piston displacement of an accumulator according to claim 1, characterized in that, The step of generating the spectrum diagram to be measured based on the difference frequency signal to be measured specifically includes: The difference frequency signal to be measured is subjected to wavelet preprocessing and fast Fourier transform processing to obtain the spectrum diagram of the difference frequency signal to be measured.

6. A system for detecting the displacement of an accumulator piston, characterized in that, The method for detecting the piston displacement of an accumulator according to any one of claims 1-5, wherein the system comprises: The difference frequency signal acquisition module is used to detect the target accumulator piston using a linear frequency modulated continuous wave radar to obtain the difference frequency signal to be measured. The spectrum generation module is used to generate a spectrum diagram of the target frequency signal based on the target difference frequency signal. The frequency value determination module is used to determine the frequency value corresponding to the maximum amplitude spectral line and the frequency values ​​corresponding to the left and right adjacent spectral lines of the maximum amplitude spectral line from the spectrum diagram to be measured, so as to obtain a set of frequency values ​​to be measured. A distance detection module is used to input the frequency value to be measured into the accumulator piston distance detection model for detection, thereby obtaining the predicted distance between the target accumulator piston and the linear frequency modulated continuous wave radar. The accumulator piston distance detection model is trained based on a long short-term memory network. The method for determining the accumulator piston distance detection model specifically includes: acquiring a sample dataset; the sample dataset includes multiple sets of sample frequency values ​​when the target accumulator piston is in different positions and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar; constructing an initial long short-term memory network model; specifically, using the long short-term memory network algorithm for modeling, the number of nodes in the input layer of the network corresponds to the number of input frequency values, the output layer has one node representing the distance between the piston and the radar, and the number of hidden layers and nodes are continuously adjusted in later training according to the prediction accuracy; and adding dropout technology to the long short-term memory network layer; using the sample dataset to train the initial long short-term memory network model to obtain the accumulator piston distance detection model. The acquisition of the sample dataset specifically includes: determining the frequency modulation parameters of the linear frequency modulated continuous wave radar; the frequency modulation parameters include: frequency modulation bandwidth, frequency modulation period, sampling frequency, and number of sampling points; using the linear frequency modulated continuous wave radar to transmit linear frequency modulated detection signals to the target accumulator piston at different positions, and receiving the linear frequency modulated reflected signals reflected by the target accumulator piston; based on the linear frequency modulated detection signals and the linear frequency modulated reflected signals corresponding to the target accumulator piston at each position, determining a set of sample frequency values ​​and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar; For the target accumulator piston at any position, the process of determining the sample frequency value and the corresponding true distance between the target accumulator piston and the linear frequency modulated continuous wave radar specifically includes: generating a sample difference frequency signal based on the linear frequency modulated detection signal and the linear frequency modulated reflection signal; generating a sample spectrum diagram based on the sample difference frequency signal; determining the frequency value corresponding to the maximum amplitude spectral line and the frequency values ​​corresponding to the left and right adjacent spectral lines of the maximum amplitude spectral line from the sample spectrum diagram to obtain a set of sample frequency values; and determining the true distance between the target accumulator piston and the linear frequency modulated continuous wave radar corresponding to the sample frequency value based on the sample difference frequency signal and the frequency modulation parameter. The displacement determination module is used to determine the displacement of the target accumulator piston based on the predicted distance.

7. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the method for detecting the displacement of an accumulator piston as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method for detecting the displacement of an accumulator piston as described in any one of claims 1 to 5.