Equipment control method and system based on deep learning
By introducing a dual-dimensional adaptive attention weighting mechanism in both the time and frequency domains, the attention weights of compressor features at different time scales are dynamically calculated, solving the problem of not being able to identify differences in feature influence in existing technologies, and achieving accurate prediction and stable control of compressor valve opening.
Patent Information
- Application Number
- CN202610070393.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-04-14
AI Technical Summary
Existing compressor control methods cannot effectively identify and distinguish the differences in the impact of different characteristics on time trends when facing complex operating conditions, resulting in valve opening prediction deviations, making it difficult to meet the requirements of high-precision control, and may even lead to equipment failure or safety accidents.
A deep learning-based device control method is adopted. Through a dual-dimensional adaptive attention weight partitioning mechanism in the time and frequency domains, the attention weights of features at different time scales are dynamically calculated. Training samples are constructed by combining weighted feature information within multiple time windows, and a multi-scale prediction model is used for integrated decision-making.
It significantly improves the accuracy of valve opening prediction and the robustness of compressor control under complex operating conditions, making compressor control more precise and stable.
Smart Images

Figure CN121857322A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of compressor control technology, and in particular to a device control method and system based on deep learning. Background Technology
[0002] In the field of industrial control, especially in complex nonlinear, multivariable coupled systems such as compressors, traditional PID control methods and model predictive control methods based on fixed parameters are widely used. However, the control performance of these existing control methods is often limited when faced with complex operating conditions such as inlet pressure fluctuations, changes in gas composition, liquid content, wax deposition, hydrogen embrittlement, and rapid loading and unloading.
[0003] The core problem with existing control methods is that when their predictive models perform time-series data analysis, the attention weighting of historical data usually depends solely on the time interval between the data point and the current sampling time. This simple weighting mechanism cannot effectively identify and distinguish the essential differences in the time trend of the impact of different features (such as flow rate, temperature, vibration, etc.) on the final control objective (such as valve opening). That is, some features mainly show short-term effects, while others show long-term cumulative effects.
[0004] Furthermore, existing valve opening prediction models in control methods, such as those based on Long Short-Term Memory (LSTM) networks, while capable of handling time-series data, employ gating mechanisms (e.g., forget gates) that apply a uniform attention weighting strategy to all features. This results in insufficient attention to historical data for long-term trend features, leading to low attention weights, while overemphasizing historical data for short-term trend features. This static attention mechanism ignores the inherent time-frequency differences among various features, ultimately causing significant deviations in the valve opening predictions. This makes it difficult to meet the demands of high-precision control under complex operating conditions and may even trigger equipment failures or safety accidents. Summary of the Invention
[0005] To meet the high-precision control requirements of compressors under complex operating conditions, achieve accurate prediction of compressor valve opening, and overcome the shortcomings of existing control methods that cannot identify the differences in the impact of different compressor characteristics on different time trends, this invention provides a deep learning-based equipment control method and system, the technical solution of which is as follows: In a first aspect, the present invention provides a device control method based on deep learning, the steps of which include: acquiring historical normal sequences of multiple features of compressors of the same model; synchronously acquiring current operating sequences of various features of the compressor to be controlled in real time; preprocessing to obtain historical feature datasets and current feature datasets; performing dimensionality reduction processing on the historical feature datasets to obtain multiple principal components and time scales corresponding to each principal component; calculating the attention weights of each feature at each time scale; dividing the historical feature datasets and current feature datasets at each time scale to obtain several historical fusion windows and current fusion windows at each time scale; calculating the fusion value of each feature in each dimension within the historical fusion window and the current fusion window based on the attention weights; constructing fusion samples based on the fusion values to obtain historical fusion sample sets and current fusion samples at each time scale; constructing a prediction model and training it using the historical fusion sample set to obtain an effective prediction model at each time scale; and calculating the comprehensive valve opening value at the next sampling time based on the current fusion samples and the effective prediction model at each time scale.
[0006] Preferably, multiple sensors corresponding to different characteristics of the compressor are deployed. Each sensor synchronously collects operational data of various characteristics at the same sampling frequency and synchronously collects the valve opening sequence of the compressor from the compressor's control device. A compressor with a normal operating history and the same model as the compressor to be controlled is selected as a reference device. The operational data sequence of various characteristics of the reference device within a preset time period is taken as the historical normal sequence of the corresponding characteristic. The operational data sequence of various characteristics of the compressor to be controlled from the start of operation to the current sampling time is taken as the current operational sequence of the corresponding characteristic. The historical normal sequence and the current operational sequence of each characteristic are standardized. The set of historical normal sequences of each characteristic after processing is taken as the historical feature dataset, and the set of current operational sequences of each characteristic after processing is taken as the current feature dataset.
[0007] Preferably, the historical feature dataset is subjected to dimensionality reduction and projection processing to obtain multiple principal components and their corresponding projection vectors. Fourier transform is performed on each projection vector to obtain the corresponding spectrogram. The reciprocal of the frequency with the largest amplitude in each spectrogram is used as the corresponding time scale. The historical feature dataset is divided using a sliding window method, and the target scale, target feature, and target window are arbitrarily selected respectively. The absolute values of the Pearson correlation coefficients between the target feature and other features within the target window are calculated and accumulated. The accumulated values are back-mapped using the natural exponential function to obtain the first degree of independence. The spectrograms corresponding to the historical sequence segments of each feature within the target window are obtained. Based on the amplitude, the Euclidean distances between the target feature and other features are calculated and accumulated to obtain the second degree of independence. Similarly, the first and second degrees of independence of the target feature within each window at the target scale are obtained.
[0008] Preferably, based on the spectrum diagrams corresponding to the historical sequence segments of each feature within the target window, the standard deviation of the frequency amplitude of the target feature within the target window and the mean of the standard deviation of the frequency amplitude of each feature within the target window are calculated. The ratio between the standard deviation of the target feature frequency amplitude and the mean of the standard deviation is used as the frequency domain difference degree. The product of the frequency domain difference degree and the corresponding second degree of independence is used as the weighted frequency domain difference degree of the target feature within the target window. The sum of the weighted frequency domain difference degree and the corresponding first degree of independence is used as the attention component of the target feature within the target window. Similarly, the attention component of the target feature within each window at the target scale is obtained. Based on the number of windows divided at the target scale, the mean of the attention component within each window is calculated, and its mean is used as the attention weight of the target feature at the target scale. Similarly, the attention weight of each feature at each time scale is obtained.
[0009] Preferably, any sampling time in the historical feature dataset is selected as the target time. Based on the length of the target scale, the historical feature dataset is divided into multiple historical fusion windows from the target time forward, and the historical fusion windows corresponding to each sampling time at each time scale are obtained sequentially. Similarly, the current sampling time is selected as the target time, and several current fusion windows corresponding to the current sampling time at each time scale are obtained. For the historical fusion windows corresponding to the target time at the target scale, any one of the historical fusion windows is selected as the target fusion window. The historical fusion window containing the target time or the current fusion window is selected as the first fusion window. Any dimension in the first fusion window is selected as the target dimension. The number of dimensions is equal to the length of the historical fusion window. Fourier transform is performed on the historical fusion window and the current fusion window to obtain the corresponding spectrogram.
[0010] Preferably, based on the amplitude of the frequency in the spectrogram, the Euclidean distance between the target fusion window and the first fusion window for each identical feature is calculated and accumulated, and the accumulated value is used as the first isolation degree of the target fusion window; based on the spectrogram component corresponding to the target feature in the spectrogram of the target fusion window, the absolute difference between the reciprocal of the frequency corresponding to the largest amplitude and the target scale is calculated, and the absolute difference is back-mapped using the natural exponential function, and the mapped value is used as the frequency similarity; the amplitude of the frequency corresponding to the target scale is extracted as the target frequency amplitude, the average value of the difference between the target frequency amplitude and the amplitude of the other frequencies in the spectrogram component is calculated, and the natural exponential function is used for forward mapping, and the mapped value is used as the amplitude similarity; the product between the frequency similarity and the amplitude similarity is used as the first fusion confidence of the target feature in the target fusion window, and the first fusion confidence of the target feature in each historical fusion window is obtained similarly.
[0011] Preferably, based on the historical fusion window corresponding to the target time at the target scale, the interval length between the center of the target fusion window and the center of the first fusion window is calculated. The natural exponential function is used to reverse map the product between the interval length and the first degree of isolation of the target fusion window. The mapped value is used as the fusion weight of the target fusion window. The product between the value of the target feature in the target dimension and its fusion weight in the target fusion window is used as the weighted fusion value. The weighted fusion values of the target feature in the target dimension in each historical fusion window are accumulated. The product between the accumulated value and the corresponding attention weight is used as the fusion value of the target feature in the target dimension. The fusion values of each feature at the target time in each dimension are calculated in turn. Similarly, based on the spectrum of the current fusion window, the fusion values of each feature at the current sampling time in each dimension are calculated.
[0012] Preferably, based on the historical fusion windows corresponding to the target time at the target scale, the mean of the first fusion confidence of the target features within each historical fusion window is calculated, and the ratio between the first fusion confidence and its mean is used as the confidence weight; the product of the target feature value in the target dimension and the corresponding confidence weight in the target fusion window is used as the confidence weighted value; the natural exponential function is used to reverse map the interval length between the center of the target fusion window and the center of the first fusion window, and the product of the mapped value and the confidence weighted value is used as the confidence weighted fusion value; the confidence weighted fusion values of the target features in the target dimension within each historical fusion window are accumulated, and the product of the accumulated value and the corresponding attention weight is used as the fusion value of the target features in the target dimension; the fusion values of each feature at the target time in each dimension are calculated sequentially; similarly, based on the spectrum of the current fusion window, the fusion values of each feature at the current sampling time in each dimension are calculated.
[0013] Preferably, the current fusion samples at each time scale are input into the corresponding effective prediction model to obtain the valve opening prediction values at each time scale at the next sampling time; the first fusion confidence of each feature within each current fusion window at the target scale is extracted, and the mean of the first fusion confidence of each feature is calculated respectively. The cumulative value of the mean of the first fusion confidence of each feature is used as the second fusion confidence of the current fusion sample at the target scale. Similarly, the second fusion confidence of the current fusion sample at each time scale is obtained. The value of the second fusion confidence is normalized by summation normalization to obtain the normalized second fusion confidence of the current fusion sample at each time scale; the cumulative value of the product between the valve opening prediction value at each time scale and the corresponding normalized second fusion confidence is used as the comprehensive valve opening value at the next sampling time.
[0014] Secondly, the present invention provides a deep learning-based device control system for implementing the aforementioned deep learning-based device control method, comprising: a processor, a memory, a communication interface, a data acquisition device, and a compressor control device. The processor stores computer program instructions for implementing the aforementioned deep learning-based device control method, and the communication interface is communicatively connected to the data acquisition device and the compressor control device.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention effectively overcomes the shortcomings of existing technologies that ignore the differences in long-term and short-term effects between different features due to the uniform division of attention weights by introducing an adaptive attention weight partitioning mechanism in both the time and frequency domains. Specifically, this invention extracts multiple time scales through dimensionality reduction and Fourier transform, and dynamically calculates the attention weights of features based on their independence and periodicity at specific scales, thereby avoiding the neglect of long-term trend features or the over-reliance on short-term trend features. Furthermore, this invention constructs training samples by fusing weighted feature information from multiple time windows, enhancing the representativeness of the prediction model's input data and the robustness of the prediction. Finally, by adopting a multi-scale prediction model and performing integrated decision-making based on fusion confidence, this invention significantly improves the accuracy of valve opening prediction and the control robustness of the compressor under complex operating conditions, making the control of the compressor more precise and stable under complex nonlinear and multivariate coupled operating conditions. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating an implementation of a deep learning-based device control method according to an embodiment of the present invention. Figure 2 This is a structural block diagram of a device control system based on deep learning according to an embodiment of the present invention. Detailed Implementation
[0017] The technical features of the present invention will be further described in detail below with reference to the accompanying drawings so that those skilled in the art can understand them.
[0018] A device control method based on deep learning, the implementation process is as follows: Figure 1 As shown, the specific implementation steps are as follows: Step S1: Obtain the historical normal sequence of multiple features of the same model compressor, and synchronously collect the current running sequence of various features of the compressor to be controlled in real time. Preprocess to obtain the historical feature dataset and the current feature dataset.
[0019] Specifically, multiple sensors corresponding to different characteristics of the compressor are deployed. Each sensor synchronously collects operational data of various characteristics at the same sampling frequency, and simultaneously collects the valve opening sequence of the compressor from the compressor's control device. A compressor with a normal operating history and the same model as the compressor to be controlled is selected as a reference device. The operational data sequence of various characteristics of the reference device within a preset time period is taken as the historical normal sequence of the corresponding characteristic. The operational data sequence of various characteristics of the compressor to be controlled from the start of operation to the current sampling time is taken as the current operational sequence of the corresponding characteristic. The historical normal sequence and the current operational sequence of each characteristic are standardized. The set of historical normal sequences of each characteristic after processing is taken as the historical feature dataset, and the set of current operational sequences of each characteristic after processing is taken as the current feature dataset.
[0020] In the real-time control of compressor equipment, since the compressor is a nonlinear time-varying system, its different characteristics exhibit complex long-term and short-term trends during operation. The real-time control of the compressor is closely related to the changing trends of its various characteristics. In order to collect data on various characteristics, multiple sensors need to be deployed on the compressor. Pressure sensors collect pressure characteristic data sequences at the compressor inlet and outlet, thermocouple sensors collect temperature characteristic data sequences at the compressor inlet and outlet, flow meters collect flow characteristic data sequences at the compressor outlet, accelerometers collect vibration characteristic data sequences of the compressor bearings, and encoders collect speed characteristic data sequences of the compressor main motor. The preset time period for collecting historical normal sequences, i.e., the duration of historical data collection, needs to be set based on the actual application scenario, usually set to one complete operating cycle of the compressor, such as 1 hour. The sampling frequency of each sensor is the same, such as 0.5Hz, that is, each sensor samples once every 2 seconds, and the interval between adjacent sampling times is 2 seconds. The purpose of data standardization is to unify the scale of various characteristic data to facilitate subsequent comparison and calculation between different characteristics.
[0021] Step S2: Perform dimensionality reduction on the historical feature dataset to obtain multiple principal components and the time scales corresponding to each principal component, and calculate the attention weights of each feature at each time scale.
[0022] In the compressor control process, due to the dynamic characteristics of the compressor operating system, the impact of different features on valve opening varies in terms of short-term and long-term trends. For example, short-term changes in flow rate and vibration amplitude have a significant impact on valve opening, while long-term cumulative changes in inlet and outlet temperatures have a significant impact. Current technologies typically use forget gates to assign attention weights to data from different time periods. However, forget gates treat all features with the same degree of forgetting, ignoring the differences in the impact of different features on valve opening over different time trends. Features with a strong long-term trend are prone to having their historical time-series data ignored, resulting in a low attention weight, while features with a strong short-term trend are more likely to have a weaker long-term trend. Large features, whose historical time-series data are overemphasized, lead to significant deviations in the valve opening predicted by the model, making the compressor prone to serious accidents. Therefore, in order to overcome the shortcomings of existing technologies that ignore the differences in the long-term and short-term effects between different features due to the uniform division of attention weights, this step introduces an adaptive attention weight division mechanism with two dimensions in the time and frequency domains. By performing dimensionality reduction analysis on the historical feature dataset, the main periodic change trends can be obtained. Then, based on the different components in the frequency domain, the various features of the compressor can be obtained at multiple time scales. By using the time scale to slide the historical feature dataset, the attention weights of each feature at multiple time scales can be adaptively obtained.
[0023] Specifically, PCA (Principal-Component Analysis, a classic linear dimensionality reduction method) is used to reduce the dimensionality of the historical feature dataset, resulting in multiple principal components. These components are then projected onto the historical feature dataset to obtain projection vectors for each principal component. Fourier transforms are performed on the projection vectors of each principal component to obtain the spectrograms of each projection vector. The reciprocal of the frequency with the largest amplitude in each spectrogram is taken as the time scale corresponding to the projection vector. Any time scale is selected as the target scale, and the size of the target scale is set as the window length. A sliding window method is used to divide the historical feature dataset, with a sliding step size of 1. The historical normal sequences of each feature in the historical feature dataset are divided into multiple windows of the same number and length.
[0024] Among them, PCA dimensionality reduction method finds the direction with the largest variance in the data and projects high-dimensional features into a low-dimensional space, thereby reducing the number of features and preserving as much original information as possible. It is widely used in tasks such as feature compression, visualization, and noise reduction.
[0025] Furthermore, an arbitrary feature is selected as the target feature, and an arbitrary window is selected as the target window. Based on the target window, the historical normal sequences of each feature are extracted to obtain the historical sequence segments of each feature within the target window. The absolute values of the Pearson correlation coefficients between the target feature and the historical sequence segments of the other features within the target window are calculated sequentially. The accumulated values of each absolute value are back-mapped using the natural exponential function, and the mapped value is used as the first degree of independence of the target feature within the target window. Fourier transforms are performed on the historical sequence segments of each feature within the target window to obtain the spectrum diagrams corresponding to the historical sequence segments of each feature. Based on the amplitudes in the spectrum diagrams, the Euclidean distances between the target feature and the other features are calculated sequentially, and the accumulated values of each Euclidean distance are used as the second degree of independence of the target feature within the target window. Similarly, the first and second degrees of independence of the target feature within each window at the target scale are obtained.
[0026] Furthermore, based on the spectrum diagrams corresponding to the historical sequence segments of each feature within the target window, the standard deviation of the frequency amplitude of the target feature within the target window, and the mean of the standard deviation of the frequency amplitude of each feature within the target window are calculated. The ratio between the standard deviation of the target feature frequency amplitude and the mean of the standard deviation is used as the frequency domain difference degree. The product of the frequency domain difference degree and the corresponding second degree of independence is used as the weighted frequency domain difference degree of the target feature within the target window. The sum of the weighted frequency domain difference degree and the corresponding first degree of independence is used as the attention component of the target feature within the target window. Similarly, the attention components of the target feature within each window at the target scale are obtained. Based on the number of windows divided at the target scale, the mean of the attention components within each window is calculated, and its mean is used as the attention weight of the target feature at the target scale. Similarly, the attention weights of each feature at each time scale are obtained by traversing each feature and all time scales.
[0027] Wherein, the attention weight of the k-th feature at the j-th time scale is The calculation formula is as follows: In the formula, n represents the number of windows divided at the j-th time scale. This indicates that the k-th feature at the j-th time scale is in the th order. The first degree of independence within a window, This indicates that the k-th feature at the j-th time scale is in the th order. The second degree of independence within a window, This indicates that the k-th feature at the j-th time scale is in the th order. The standard deviation of the frequency amplitude within a window Indicates that the features of each item at the j-th time scale are in the th time scale. The mean of the standard deviation of the frequency amplitude within each window.
[0028] Because highly coupled features contain repetitive information, the prediction results of the prediction model may not be accurate enough. The first degree of independence analyzes the difference between the target feature and other features in the time domain. The larger the first degree of independence, the less correlated the target feature is with other features in the time domain within the corresponding window, and the more unique and noteworthy the information contained in the target feature. The second degree of independence analyzes the difference between the target feature and other features in the frequency domain. The larger the second degree of independence, the greater the difference between the frequency components of the target feature and other features in the corresponding window, the greater the difference in periodic patterns between the features, and the more unique and noteworthy the information contained in the target feature. The standard deviation of the frequency amplitude measures the difference in frequency distribution in the frequency domain. The larger the standard deviation, the stronger the periodic component of the target feature at the target scale, and the larger its attention weight should be.
[0029] Step S3: Divide the historical feature dataset and the current feature dataset at each time scale to obtain several historical fusion windows and current fusion windows at each time scale.
[0030] In the compressor control process, existing technologies directly input compressor feature data over a period of time into a prediction model to predict valve opening values. The prediction model uses a gating mechanism to update data at different time scales by forgetting, ignoring the long-term and short-term trend differences in the influence of different features on valve opening. This results in poor model training and learning performance and large prediction bias. This step divides the data in the historical feature dataset before any sampling time into windows, so that subsequent steps can analyze the long-term and short-term trends of each feature by the differences in the frequency domain components of different features within the window.
[0031] Specifically, any sampling time in the historical feature dataset is selected as the target time. Data up to and including the target time in the historical feature dataset is extracted to obtain target time sequence segments for each feature. Based on the length of the target scale, the target time sequence segments for each feature are divided into multiple equal-length historical fusion windows from the target time forward, resulting in multiple historical fusion windows corresponding to the target time at the target scale. When the data length is insufficient, the nearest neighbor imputation method is used to fill in missing values. All sampling times in each time scale and the historical feature dataset are traversed to obtain the historical fusion window corresponding to each sampling time at each time scale. Similarly, the current sampling time is used as the target time, and the current feature dataset is segmented to obtain several current fusion windows corresponding to the current sampling time at each time scale.
[0032] In addition, both the historical fusion window and the current fusion window are matrices containing various features. For the historical fusion window corresponding to the target time at the target scale, any one of the historical fusion windows is selected as the target fusion window. The historical fusion window or the current fusion window containing the target time is selected as the first fusion window. Any dimension in the first fusion window is selected as the target dimension. The number of dimensions is equal to the length of the historical fusion window. Fourier transform is performed on the historical fusion window and the current fusion window to obtain the corresponding spectrum.
[0033] Step S4: Combine attention weights to calculate the fusion value of each feature in each dimension within the historical fusion window and the current fusion window.
[0034] Specifically, the first embodiment of the fusion value calculation process is as follows: Based on the frequency amplitudes in the spectrum of historical fusion windows, the Euclidean distances between identical features within the target fusion window and the first fusion window are calculated and accumulated, with the accumulated value used as the first degree of isolation of the target fusion window. The interval length between the center of the target fusion window and the center of the first fusion window is calculated, and the product of the interval length and the first degree of isolation of the target fusion window is inversely mapped using the natural exponential function. This mapped value is used as the fusion weight of the target fusion window. The product of the target feature value in the target dimension within the target fusion window and the fusion weight of the target fusion window is used as the target feature value in the target dimension within the target fusion window. The weighted fusion value is calculated based on the number of historical fusion windows corresponding to the target time at the target scale. The weighted fusion values of the target features in the target dimension within each historical fusion window are accumulated. The product of the accumulated value and the corresponding attention weight is used as the fusion value of the target features in the target dimension within the first fusion window corresponding to the target time at the target scale. The fusion values of each feature in each dimension within the first fusion window corresponding to the target time at the target scale are calculated in turn. Similarly, based on the amplitude of the frequency in the spectrum of the current fusion window, the fusion values of each feature in each dimension within the first fusion window corresponding to the current sampling time at the target scale are calculated.
[0035] In the first embodiment, the fusion value of the k-th feature at the target scale in the l-th dimension within the first fusion window corresponding to the target time is... The calculation formula is as follows: In the formula, This represents the attention weight of the k-th feature at the target scale, and m represents the number of historical fusion windows corresponding to the target time step at the target scale. This represents the interval length between the center of the i-th historical fusion window corresponding to the target time and the center of the first fusion window corresponding to the target time at the target scale. This indicates the first degree of isolation of the i-th historical fusion window corresponding to the target time at the target scale. This represents the value of the k-th feature in the l-th dimension within the l-th historical fusion window corresponding to the target time at the target scale. This represents the fusion weight of the i-th historical fusion window. This represents the natural exponential function.
[0036] The first degree of isolation of the target fusion window measures the similarity between the target fusion window and the first fusion window corresponding to the target time. The greater the first degree of isolation, the less similar the two historical fusion windows are. The greater the difference between the change trend contained in the target fusion window and the first fusion window corresponding to the target time, the smaller the impact of the target fusion window on the valve opening prediction result of the next time step of the target time.
[0037] Furthermore, in the second embodiment of the fusion value calculation, the calculation process is as follows: Based on the spectrogram of the target fusion window, the spectrogram components corresponding to the target features are extracted. The absolute difference between the reciprocal of the frequency corresponding to the largest amplitude in the spectrogram component corresponding to the target feature and the target scale is calculated. The natural exponential function is used to perform a reverse mapping on the absolute difference, and the mapped value is used as the frequency similarity of the target features within the target fusion window. Based on the frequency magnitude corresponding to the target scale, the amplitude of the frequency corresponding to the target scale is extracted from the spectrogram component corresponding to the target feature as the target frequency amplitude. The average difference between the target frequency amplitude and the amplitudes of other frequencies in the spectrogram component corresponding to the target feature is calculated. The natural exponential function is used to perform a forward mapping on the average value, and the mapped value is used as the amplitude similarity of the target features within the target fusion window. The product between the frequency similarity and the amplitude similarity is used as the first fusion confidence of the target features within the target fusion window. The historical fusion windows corresponding to the target time at the target scale are traversed to obtain the first fusion confidence of the target features within each historical fusion window and their mean is calculated. The ratio between the first fusion confidence of the target features within the target fusion window and the mean of the first fusion confidence is used as the confidence weight.
[0038] Subsequently, the product of the target feature value in the target dimension and the corresponding confidence weight in the target fusion window is used as the confidence weight value. The natural exponential function is used to reverse map the interval length between the center of the target fusion window and the center of the first fusion window. The product of the mapped value and the confidence weight value is used as the confidence weighted fusion value of the target feature in the target dimension within the target fusion window. Based on the number of historical fusion windows corresponding to the target time at the target scale, the confidence weighted fusion values of the target feature in the target dimension within each historical fusion window are accumulated. The product of the accumulated value and the corresponding attention weight is used as the fusion value of the target feature in the target dimension within the first fusion window corresponding to the target time at the target scale. Similarly, the fusion values of each feature in each dimension within the first fusion window corresponding to the target time at the target scale are obtained.
[0039] In the second embodiment, the fusion value of the k-th feature at the target scale in the l-th dimension within the first fusion window corresponding to the target time is... The calculation formula is as follows: In the formula, This represents the attention weight of the k-th feature at the target scale, and m represents the number of historical fusion windows corresponding to the target time step at the target scale. This represents the interval length between the center of the i-th historical fusion window corresponding to the target time and the center of the first fusion window corresponding to the target time at the target scale. This represents the first fusion confidence score of the k-th feature within the i-th historical fusion window corresponding to the target time at the target scale. This represents the mean of the first fusion confidence scores of the k-th feature within each historical fusion window corresponding to the target time at the target scale. This represents the value of the k-th feature in the l-th dimension within the l-th historical fusion window corresponding to the target time at the target scale. This represents the natural exponential function.
[0040] The first fusion confidence level measures the similarity between the frequency components of the target features within the corresponding historical fusion window and the target scale. The higher the first fusion confidence level, the more the changing trend of the target features within the corresponding historical fusion window conforms to the periodic trend of the target scale, and the greater the contribution of the corresponding historical fusion window to the fusion value.
[0041] Step S5: Construct fusion samples based on fusion values to obtain historical fusion sample sets and current fusion samples at each time scale. Construct a prediction model and train it using the historical fusion sample set to obtain an effective prediction model at each time scale.
[0042] Specifically, a fusion data matrix is constructed by fusing the fusion values of various features at the target scale across all dimensions at the target time. This fusion data matrix is used as the historical fusion sample at the target time at the target scale. Similarly, the historical fusion samples at each sampling time at the target scale in the historical feature dataset are obtained, as well as the current fusion sample of the compressor to be controlled at the current sampling time at the target scale. This yields the historical fusion sample set and the current fusion sample at each time scale. An LSTM (Long-Short-Term-Memory) model is used to construct a prediction model. The prediction model is trained based on the historical fusion sample set and valve opening sequence at each time scale. The mean squared error is used as the loss function, and the trained prediction model is used as the effective prediction model, thus obtaining the effective prediction model at each time scale.
[0043] During training, the prediction model takes as input the historical fusion sample corresponding to a certain sampling time and outputs the valve opening value at the next sampling time in the valve opening sequence. Meanwhile, the valve opening value corresponding to the first sampling time in the valve opening sequence and the historical fusion sample corresponding to the last sampling time in the historical fusion sample set do not participate in the training of the prediction model.
[0044] Step S6: Based on the current fused samples and effective prediction models at each time scale, calculate the comprehensive valve opening value at the next sampling time.
[0045] Due to the dynamic characteristics of the compressor operating system, the changing trends of different features before the current sampling time do not completely match the time trend at the target scale. The first fusion confidence of each feature in the current fusion sample at different time scales has certain differences. Therefore, this step obtains the second fusion confidence used to weight the prediction results by using the first fusion confidence of different features in the current fusion sample corresponding to the current sampling time. Thus, by combining the weighted prediction results at each time scale, a relatively accurate comprehensive valve opening value for the next sampling time is obtained.
[0046] Specifically, the current fusion samples at each time scale are input into the corresponding effective prediction model to obtain the predicted valve opening values at each time scale at the next sampling time. The first fusion confidence of each feature within each current fusion window at the target scale is extracted, and the mean of the first fusion confidence of each feature is calculated. The cumulative value of the mean of the first fusion confidence of each feature is used as the second fusion confidence of the current fusion sample at the target scale. Similarly, the second fusion confidence of the current fusion sample at each time scale is obtained. The value of the second fusion confidence is normalized by summation normalization to obtain the normalized second fusion confidence of the current fusion sample at each time scale. The cumulative value of the product between the predicted valve opening value at each time scale and the corresponding normalized second fusion confidence is used as the comprehensive valve opening value. The comprehensive valve opening value is used as the valve opening value of the compressor to be controlled at the next sampling time, thereby outputting the corresponding control command to the compressor control device to realize the real-time control and adjustment of the valve opening of the compressor to be controlled.
[0047] The formula for calculating the overall valve opening value is as follows: In the formula, R represents the overall valve opening value of the compressor to be controlled at the next sampling time, and N represents the total number of time scales. Let represent the normalized second fusion confidence of the current fusion sample at the j-th time scale. This represents the predicted valve opening value at the j-th time scale.
[0048] This invention also discloses a deep learning-based device control system for implementing the aforementioned deep learning-based device control method, the system structure of which is as follows: Figure 2 As shown, the device includes: a processor, a memory, a communication interface, a data acquisition device, and a compressor control device. The processor stores computer program instructions for implementing the aforementioned deep learning-based device control method. The communication interface is communicatively connected to the data acquisition device and the compressor control device. The data acquisition device includes a pressure sensor and a thermocouple sensor for acquiring compressor inlet and outlet pressure and temperature characteristic data, respectively; a flow meter for acquiring compressor outlet flow characteristic data; an acceleration sensor for acquiring compressor bearing vibration characteristic data; and an encoder for acquiring compressor main motor speed characteristic data. The compressor control device executes control commands to adjust the compressor's operating state.
[0049] The embodiments included in this invention are merely descriptions of preferred embodiments of the invention and are not limited to the precise structures described above and shown in the accompanying drawings. Various modifications and changes can be made without departing from the scope of protection. Any variations and improvements made by those skilled in the art to the technical solutions of this invention without departing from the design concept of this invention should fall within the scope of protection of this invention.
Claims
1. A device control method based on deep learning, characterized in that: The historical normal sequence of multiple features of the same model compressor is obtained, and the current running sequence of various features of the compressor to be controlled is collected in real time. The historical feature dataset and the current feature dataset are preprocessed. The historical feature dataset is dimensionality reduced to obtain multiple principal components and the time scale corresponding to each principal component. The attention weight of each feature at each time scale is calculated. The historical feature dataset and the current feature dataset are divided at each time scale to obtain several historical fusion windows and current fusion windows at each time scale; the fusion value of each feature in each dimension within the historical fusion window and the current fusion window is calculated by combining the attention weights. Based on the fusion value, fusion samples are constructed to obtain historical fusion sample sets and current fusion samples at each time scale. A prediction model is constructed and trained using the historical fusion sample set to obtain an effective prediction model at each time scale. Based on the current fusion samples and the effective prediction model at each time scale, the comprehensive valve opening value at the next sampling time is calculated.
2. The device control method based on deep learning according to claim 1, characterized in that, The preprocessing process yields historical and current feature datasets, including: deploying multiple sensors corresponding to different features of the compressor; each sensor synchronously collecting operational data for each feature at the same sampling frequency; synchronously collecting the valve opening sequence of the compressor from the compressor's control device; selecting a compressor with a normal operating history and the same model as the compressor to be controlled as a reference device; using the operational data sequence of the reference device for each feature within a preset time period as the historical normal sequence of the corresponding feature; and using the operational data sequence of the compressor to be controlled from the start of operation to the current sampling time as the current operational sequence of the corresponding feature; standardizing the historical normal sequences and current operational sequences of each feature; using the set of processed historical normal sequences of each feature as the historical feature dataset; and using the set of processed current operational sequences of each feature as the current feature dataset.
3. The device control method based on deep learning according to claim 2, characterized in that, The calculation of attention weights for each feature at each time scale includes: performing dimensionality reduction and projection processing on the historical feature dataset to obtain multiple principal components and their corresponding projection vectors; performing Fourier transform on each projection vector to obtain the corresponding spectrogram; and taking the reciprocal of the frequency with the largest amplitude in each spectrogram as the corresponding time scale; dividing the historical feature dataset using a sliding window approach, and arbitrarily selecting the target scale, target feature, and target window; sequentially calculating and accumulating the absolute values of the Pearson correlation coefficients between the target feature and other features within the target window; using the natural exponential function to perform a reverse mapping on the accumulated values to obtain the first degree of independence; obtaining the spectrograms corresponding to the historical sequence segments of each feature within the target window; sequentially calculating and accumulating the Euclidean distances between the target feature and other features based on the amplitude to obtain the second degree of independence; similarly, obtaining the first and second degrees of independence of the target feature within each window at the target scale.
4. The device control method based on deep learning according to claim 3, characterized in that, The calculation of attention weights for each feature at each time scale further includes: calculating the standard deviation of the frequency amplitude of the target feature within the target window and the mean of the standard deviations of the frequency amplitudes of each feature within the target window based on the spectrum corresponding to the historical sequence segments of each feature within the target window; using the ratio between the standard deviation of the target feature frequency amplitude and the mean of the standard deviations as the degree of frequency domain difference; using the product between the degree of frequency domain difference and the corresponding second degree of independence as the weighted degree of frequency domain difference of the target feature within the target window; using the sum of the weighted degree of frequency domain difference and the corresponding first degree of independence as the attention component of the target feature within the target window; similarly obtaining the attention component of the target feature within each window at the target scale; calculating the mean of the attention component within each window based on the number of windows divided at the target scale; using the mean as the attention weight of the target feature at the target scale; similarly obtaining the attention weights for each feature at each time scale.
5. The device control method based on deep learning according to claim 3, characterized in that, The step of dividing the historical feature dataset and the current feature dataset at each time scale includes: selecting any sampling time in the historical feature dataset as the target time; dividing the historical feature dataset from the target time forward into multiple historical fusion windows based on the length of the target scale; obtaining the historical fusion window corresponding to each sampling time at each time scale; similarly, taking the current sampling time as the target time, dividing it into several current fusion windows corresponding to the current sampling time at each time scale; for the historical fusion window corresponding to the target time at the target scale, selecting any one of the historical fusion windows as the target fusion window; taking the historical fusion window containing the target time or the current fusion window as the first fusion window; selecting any dimension in the first fusion window as the target dimension, the number of dimensions being equal to the length of the historical fusion window; and performing a Fourier transform on the historical fusion window and the current fusion window to obtain the corresponding spectrogram.
6. The device control method based on deep learning according to claim 5, characterized in that, The calculation process of the fusion value includes: calculating and accumulating the Euclidean distance between the target fusion window and the first fusion window based on the amplitude of the frequency in the spectrum graph, and using the accumulated value as the first isolation degree of the target fusion window; calculating the absolute difference between the reciprocal of the frequency corresponding to the largest amplitude and the target scale based on the spectrum graph component corresponding to the target feature in the spectrum graph of the target fusion window, and performing a reverse mapping on the absolute difference using the natural exponential function, and using the mapped value as the frequency similarity; extracting the amplitude of the frequency corresponding to the target scale as the target frequency amplitude, calculating the average value of the difference between the target frequency amplitude and the amplitude of the other frequencies in the spectrum graph component, and performing a forward mapping using the natural exponential function, and using the mapped value as the amplitude similarity; and using the product of the frequency similarity and the amplitude similarity as the first fusion confidence of the target feature in the target fusion window, and similarly obtaining the first fusion confidence of the target feature in each historical fusion window.
7. The device control method based on deep learning according to claim 6, characterized in that, The calculation process of the fusion value further includes: calculating the interval length between the center of the target fusion window and the center of the first fusion window based on the historical fusion window corresponding to the target time at the target scale; using the natural exponential function to perform a reverse mapping between the product of the interval length and the first degree of isolation of the target fusion window; using the mapped value as the fusion weight of the target fusion window; using the product between the value of the target feature in the target dimension and its fusion weight in the target fusion window as the weighted fusion value; accumulating the weighted fusion values of the target feature in the target dimension within each historical fusion window; using the product between the accumulated value and the corresponding attention weight as the fusion value of the target feature in the target dimension; and sequentially calculating the fusion values of each feature at the target time in each dimension; similarly, based on the spectrum of the current fusion window, calculating the fusion values of each feature at the current sampling time in each dimension.
8. The device control method based on deep learning according to claim 6, characterized in that, The calculation process of the fusion value further includes: calculating the mean of the first fusion confidence of the target features within each historical fusion window based on the historical fusion window corresponding to the target time at the target scale, and using the ratio between the first fusion confidence and its mean as the confidence weight; using the product between the value of the target feature in the target dimension and the corresponding confidence weight in the target fusion window as the confidence weighted value; using the natural exponential function to perform a reverse mapping on the interval length between the center of the target fusion window and the center of the first fusion window, and using the product between the mapping value and the confidence weighted value as the confidence weighted fusion value; accumulating the confidence weighted fusion values of the target features in the target dimension within each historical fusion window, and using the product between the accumulated value and the corresponding attention weight as the fusion value of the target features in the target dimension, and sequentially calculating the fusion values of each feature at the target time in each dimension; similarly, based on the spectrum of the current fusion window, calculating the fusion values of each feature at the current sampling time in each dimension.
9. A device control method based on deep learning according to claim 7 or 8, characterized in that, The calculation of the comprehensive valve opening value at the next sampling time includes: inputting the current fusion sample at each time scale into the corresponding effective prediction model to obtain the predicted valve opening value at each time scale at the next sampling time; extracting the first fusion confidence of each feature within each current fusion window at the target scale, and calculating the mean of the first fusion confidence of each feature respectively, and using the cumulative value of the mean of the first fusion confidence of each feature as the second fusion confidence of the current fusion sample at the target scale, and similarly obtaining the second fusion confidence of the current fusion sample at each time scale, and normalizing the value of the second fusion confidence by using a summation normalization method to obtain the normalized second fusion confidence of the current fusion sample at each time scale; and using the cumulative value of the product between the predicted valve opening value at each time scale and the corresponding normalized second fusion confidence as the comprehensive valve opening value at the next sampling time.
10. A device control system based on deep learning, characterized in that: It includes a processor, a memory, a communication interface, a data acquisition device, and a compressor control device. The processor stores computer program instructions for implementing the deep learning-based device control method according to any one of claims 1 to 9. The communication interface is communicatively connected to the data acquisition device and the compressor control device.
