Electrical automatic control method and system
By collecting data in the electrical cabinet and using the LSTM model to predict temperature rise, and optimizing the cooling fan control with the multi-objective ant colony algorithm, the problem of large temperature fluctuations in the existing electrical cabinet heat dissipation control methods is solved, and more stable temperature control and longer equipment life are achieved.
Patent Information
- Application Number
- CN202510201014.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-02-24
AI Technical Summary
The existing electrical cabinet heat dissipation control method fails to fully consider the dynamic change law of the internal temperature of the electrical cabinet and the impact of load, resulting in large temperature fluctuations, affecting the working performance and reliability of electrical components.
By collecting temperature data and load current data, using wavelet transformation and Kalman filtering algorithm for preprocessing, a temperature rise compensation model based on long and short-term memory neural network (LSTM) is established to predict the temperature rise in the electrical cabinet, and the control strategy of the cooling fan is optimized through the multi-objective ant colony algorithm.
It effectively reduces unnecessary start and stop of the cooling fan, improves the stability of the internal temperature of the electrical cabinet, extends the service life of the cooling system, and achieves energy-saving operation while ensuring the temperature control effect.
Smart Images

Figure CN119668126B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electrical control, and in particular to an electrical automatic control method and system. Background Art
[0002] In order to prevent the internal temperature of the electrical cabinet from being too high, air cooling is usually used to dissipate heat from the electrical cabinet. At present, the most common way to dissipate heat from the electrical cabinet is to install a cooling fan on the top or side of the electrical cabinet, and the heat inside the electrical cabinet is discharged through the rotation of the cooling fan. However, there are some problems that need to be solved in the traditional electrical cabinet heat dissipation control method.
[0003] First, most existing electrical cabinet cooling controls use timed start-stop or temperature threshold control, which means starting the cooling fan at a set time interval or when the temperature exceeds a set threshold, and stopping the cooling fan when the temperature drops below the set threshold. This control method does not fully consider the dynamic change of the temperature inside the electrical cabinet and the impact of the load, which can easily lead to large temperature fluctuations inside the electrical cabinet, affecting the working performance and reliability of electrical components.
[0004] Secondly, due to the lack of prediction of the temperature rise trend of the electrical cabinet, the existing heat dissipation control method is difficult to accurately determine the optimal start and stop timing and speed adjustment strategy of the cooling fan. Heat dissipation is often not timely or excessive, resulting in frequent start and stop of the cooling fan, which not only reduces the heat dissipation effect, but also increases the energy consumption of the cooling system and shortens the service life of the cooling fan. Summary of the invention
[0005] In view of the problem of frequent start and stop of the cooling fan of the electrical cabinet in the prior art, the present application provides an electrical automatic control method and system, which pre-processes the temperature data and load current data respectively, and then establishes a temperature rise compensation model based on the long short-term memory neural network LSTM to predict the temperature rise in the electrical cabinet. On this basis, a multi-objective optimization function including the temperature rise deviation and the number of starts and stops of the cooling fan is set, and an improved multi-objective ant colony algorithm is used to solve it, and the optimal control strategy of the cooling fan is obtained, etc., to reduce unnecessary starts and stops of the cooling fan and extend the service life of the cooling system.
[0006] The purpose of this application is achieved through the following technical solutions.
[0007] One aspect of the present application provides an electrical automatic control method, including: collecting temperature data inside an electrical cabinet through a temperature sensor, and collecting load current data of the electrical cabinet through a current sensor; denoising the temperature data using a wavelet transform algorithm; filtering the load current data using a Kalman filter algorithm; using the denoised temperature data and the filtered load current data as input, and establishing a temperature rise compensation model based on a long short-term memory neural network (LSTM), the output of the temperature rise compensation model being a predicted value of the temperature rise in the electrical cabinet; setting a multi-objective function for temperature rise control in the electrical cabinet, the multi-objective function including: minimizing the deviation between the maximum value of the temperature in the electrical cabinet and the predicted value of the temperature rise; minimizing the number of starts and stops of a cooling fan; using a multi-objective ant colony algorithm to solve the problem based on the predicted value of the temperature rise and the set multi-objective function, and obtaining an optimal control strategy for the cooling fan, the control strategy including the start and stop times and speed adjustment value of the cooling fan; and controlling the start and stop and speed adjustment of the cooling fan according to the optimal control strategy of the cooling fan.
[0008] Furthermore, a wavelet transform algorithm is used to denoise the temperature data, including: normalizing the collected temperature data; performing Fourier transform on the normalized temperature data, and setting the number of wavelet decomposition layers according to the sampling frequency and signal spectrum of the temperature data; performing wavelet decomposition on the normalized temperature data using the Symlets wavelet family to obtain wavelet coefficients of each layer; performing threshold processing on the wavelet coefficients of each layer to obtain denoised wavelet coefficients; and performing wavelet reconstruction on the denoised wavelet coefficients to obtain denoised temperature data.
[0009] Furthermore, threshold processing is performed on the wavelet coefficients of each layer, including: calculating the standard deviation of the wavelet coefficients of each layer; calculating the threshold of the wavelet coefficients of each layer based on the standard deviation and a preset proportional factor; wherein the proportional factor has a value range of 1.5 to 3.5; calculating the kurtosis of the wavelet coefficients of each layer; adjusting the threshold based on the kurtosis and a preset adjustment factor to obtain an adjusted threshold; wherein the adjustment factor has a value range of 0.5 to 1.5; comparing the absolute value of the wavelet coefficients of each layer with the adjusted threshold of the corresponding layer, setting the wavelet coefficients less than the threshold to zero, and obtaining the denoised wavelet coefficients.
[0010] Furthermore, a temperature rise compensation model is established based on the long short-term memory neural network LSTM, including: aligning the denoised temperature data and the filtered load current data to obtain aligned temperature-current data pairs; setting the number of input layer nodes, hidden layer nodes and output layer nodes of the LSTM neural network to establish the LSTM neural network structure; randomly dividing the aligned temperature-current data pairs into training data sets and verification data sets; using the training data sets to train the LSTM neural network, and during the training process, using the stochastic gradient descent algorithm to update the weights of the LSTM neural network, and using the mean square error as the loss function; using the verification data set to verify the trained LSTM neural network to obtain the temperature rise compensation model; inputting the denoised temperature data and the filtered load current data into the temperature rise compensation model to obtain the predicted value of the temperature rise in the electrical cabinet.
[0011] Furthermore, a multi-objective function for temperature rise control in the electrical cabinet is set, and the multi-objective function includes: , where x is the control strategy of the cooling fan, including the start and stop time and speed adjustment value of the cooling fan; is the deviation between the maximum value of the temperature in the electrical cabinet and the predicted value of the temperature rise, expressed as: ,in, is the actual temperature value in the electrical cabinet at the i-th moment, is the predicted value of temperature rise of the temperature rise compensation model at the i-th moment, , n is the number of sampling moments of temperature data; is the number of starts and stops of the cooling fan, expressed as: ,in, is the speed adjustment value of the cooling fan in the jth control cycle, is the speed adjustment value of the cooling fan in the j-1th control cycle, , m is the number of control cycles; sign (*) is the sign function, when hour, ,when hour, ,when hour, ; The cooling fan speed changes from 0 to non-0 or from non-0 to 0, which is regarded as one start and stop, so divide it by 2 to get the actual number of starts and stops of the cooling fan.
[0012] Furthermore, a multi-objective ant colony algorithm is used to solve the problem and obtain the optimal control strategy of the cooling fan, including: initializing the parameters of the multi-objective ant colony algorithm, the parameters of the multi-objective ant colony algorithm include the number of ants M, the maximum number of iterations , pheromone importance factor α, heuristic function importance factor β and pheromone evaporation coefficient ρ; the constraints of the cooling fan control strategy x, including the start and stop time of the cooling fan Constraints and cooling fan speed adjustment value Constraints , converted into heuristic information of the ant colony algorithm, and the transition probability function of the ant colony algorithm is constructed , which represents the probability that ant k moves from the i-th position to the j-th position at the t-th iteration; and randomly generates the initial solution of M ants, and calculates the initial objective function value of each ant's corresponding solution and ; According to the current position of the ant, the next position of the ant is updated through the state transition rule, including: according to the optional start and stop time range and speed adjustment value range of the cooling fan, the current position of the ant is mapped to the solution space of the cooling fan control strategy x, and the start and stop time corresponding to the current position of the ant is obtained and speed adjustment value feasible solution; in the neighborhood of the ant's current position, according to the constraints of the cooling fan control strategy x, a dimensionality reduction sampling strategy is adopted to randomly generate a set of alternative solutions that meet the constraints. Each alternative solution contains a feasible start and stop time. and speed adjustment value , and calculate the transition probability of each alternative solution ; According to the transition probability of alternative solutions , using a Pareto advantage-based selection strategy to select the start and stop time corresponding to the next position from the alternative solutions and speed adjustment value , so that the alternative solution is in the multi-objective function and The distribution on the Pareto frontier is more uniform, and it is more likely to choose a non-dominated solution; the start and stop times of and speed adjustment value As a feasible solution of the cooling fan control strategy x corresponding to the next position of the ant, substitute it into the multi-objective function and calculate the objective function value corresponding to the current ant position and ; According to the current ant's objective function value and , using the Pareto dominance relationship, compare the current ant position with the solutions in the non-dominated solution set. If the current solution is not dominated by any solution, add it to the non-dominated solution set, and remove the solutions dominated by the current solution in the non-dominated solution set; according to the non-dominated solution set, use the global pheromone update rule to update the transition probability function Pheromone concentration in , and save the current non-dominated solution to an external archive; the expression of the global pheromone update rule is: ; where ρ is the pheromone evaporation coefficient, is the pheromone increment from the ith position to the jth position at the tth iteration, The expression is: Among them, Q is the pheromone increment constant, is the objective function value corresponding to the solution constructed by ant k at the tth iteration, M is the number of ants; determine whether the current number of iterations t is less than the maximum number of iterations If yes, set t=t+1 and return to continue iterative optimization; if not, stop the iteration and select the current non-dominated solution set from the external archive as the Pareto optimal solution set output.
[0013] Furthermore, the transition probability function The expression is: ,in, is the pheromone concentration from the ith position to the jth position at the tth iteration, is the heuristic information from the i-th position to the j-th position, α is the pheromone importance factor, β is the heuristic function importance factor, is the set of allowed transfer positions of ant k’s current position.
[0014] Another aspect of the present application also provides an electrical automatic control system for executing an electrical automatic control method of the present application.
[0015] Compared with the prior art, the advantages of this application are:
[0016] The temperature data and load current data of the electrical cabinet are collected by temperature sensors and current sensors, and the data are preprocessed by wavelet transform and Kalman filter algorithm, which can effectively remove the noise interference in the temperature data, improve the signal-to-noise ratio of the load current data, provide high-quality input data for the subsequent establishment of the temperature rise compensation model, and improve the accuracy of temperature rise prediction. Among them, the wavelet transform can perform localized analysis of the signal in both the time domain and the frequency domain, and perform multi-scale decomposition of the temperature data, so as to better capture the non-stationary characteristics of the temperature data. The Kalman filter algorithm can adjust the noise statistical characteristics online and adaptively by recursively estimating the optimal value of the state variable, and has a good filtering effect on the load current data.
[0017] On the basis of the temperature rise compensation model, a multi-objective optimization function including the temperature rise deviation and the number of starts and stops of the cooling fan is set, and the improved multi-objective ant colony algorithm is used for solving it. It is possible to control the temperature inside the electrical cabinet while taking into account the energy-saving operation of the cooling system. Traditional temperature control methods for electrical cabinets usually only consider a single temperature target, ignoring the energy waste caused by the frequent start and stop of the cooling fan. The multi-objective optimization model proposed in this application quantifies the temperature rise control deviation and the number of starts and stops of the fan, unifies the temperature control performance and energy-saving performance into the same framework for optimization, and can obtain the optimal control strategy for the cooling fan. On the premise of ensuring that the temperature inside the electrical cabinet meets the requirements, the number of starts and stops of the cooling fan is minimized, thereby extending the service life of the cooling system.
[0018] The dimensionality reduction sampling strategy and the selection strategy based on Pareto advantage are introduced into the multi-objective ant colony algorithm, which can effectively handle multi-objective optimization problems and accelerate the convergence speed of the algorithm. Since the optimization of the cooling fan control strategy is a multi-objective, multi-constrained, nonlinear combination optimization problem, the direct use of the traditional ant colony algorithm is prone to fall into the local optimum and the convergence speed is slow. By re-encoding the solution space through the dimensionality reduction sampling strategy, the scale of the problem can be reduced and the "dimensionality curse" problem can be alleviated. At the same time, in the ant search process, the selection of ant positions based on Pareto advantage can enhance the exploration ability of the algorithm, avoid premature convergence, and finally solve the Pareto optimal solution set, providing decision makers with a variety of cooling control solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is an exemplary flow chart of an electrical automatic control method according to the present application;
[0020] Figure 2 is an exemplary flow chart of denoising temperature data according to the present application;
[0021] Figure 3 is an exemplary flow chart of filtering load current data according to the present application;
[0022] Figure 4 is an exemplary flow chart for obtaining the predicted value of temperature rise in an electrical cabinet according to the present application. DETAILED DESCRIPTION
[0023] The method and system provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0024] like Figure 1 and Figure 2 As shown, the temperature data inside the electrical cabinet is collected through the temperature sensor, and the load current data of the electrical cabinet is collected through the current sensor; several temperature sensors are installed at different positions inside the electrical cabinet, such as , where n is the number of temperature sensors. These temperature sensors collect temperature data at different locations inside the electrical cabinet to obtain a set of temperature data sequences , where t represents the sampling time. The temperature sensor can be a thermocouple, thermal resistor or digital temperature sensor, etc., and the appropriate temperature measurement range and accuracy can be selected according to actual needs. At the same time, a current sensor, such as a current transformer or a Hall current sensor, is installed at the entrance of the electrical cabinet to collect the total load current data of the electrical cabinet. The current sensor monitors the load current changes of the electrical cabinet in real time and obtains a set of load current data sequences. ,in, Indicates the load current value at time t. The sampling frequency of the temperature sensor and current sensor can be set according to actual needs. Usually, a sampling interval of 1 to 10 minutes is selected to obtain sufficient data samples while avoiding data redundancy and storage pressure. The collected temperature data and load current data are aggregated and synchronized through the data acquisition module to obtain a set of time-aligned data samples. , as the input for subsequent data preprocessing and temperature rise compensation modeling. Among them, the data acquisition module can use industrial control computers, data acquisition cards or dedicated data acquisition instruments, etc., and select appropriate hardware platforms and communication protocols according to site conditions to ensure the real-time, reliability and stability of data acquisition.
[0025] The wavelet transform algorithm is used to denoise the temperature data and normalize the collected temperature data. Assume that the original temperature data sequence is , where n is the number of temperature sensors and t is the sampling time. For each temperature sensor i (i=1, 2, ..., n), the collected temperature data Ti (t) is normalized to obtain the normalized temperature data , the calculation formula is as follows: ;in, and Respectively represent the minimum and maximum values of the temperature data collected by the i-th temperature sensor. Normalization can unify temperature data of different ranges into the range of [0, 1], which is convenient for subsequent data processing and analysis. Data preprocessing: Normalize the collected temperature data, map the temperature value into the range of [0, 1], and obtain the normalized temperature data sequence , where N is the number of temperature data points. Normalization can eliminate the dimensionality of temperature data, making it easier to perform wavelet decomposition and feature extraction. Temperature data sequence: Normalize the collected temperature data to obtain a normalized temperature data sequence , where N is the number of temperature data points. Normalization maps the temperature values to the interval [0, 1], eliminating the dimension effect of the temperature data. Fourier transform: The normalized temperature data sequence Perform discrete Fourier transform (DFT). The Fourier transform formula is: , where k is the index of the frequency point, The Fourier transform transforms the time domain signal Convert to frequency domain signal X(k) to get the spectrum characteristics of temperature signal. Spectral characteristics analysis: Amplitude spectrum of frequency domain signal X(k) Represents the amplitude distribution of the temperature signal at different frequency points. Phase spectrum of the frequency domain signal X(k) It represents the phase distribution of the temperature signal at different frequency points. According to the amplitude spectrum and phase spectrum, the frequency components, dominant frequency, periodic characteristics, etc. of the temperature signal can be analyzed. Sampling frequency and Nyquist frequency: Assume that the sampling frequency of the temperature data is fs, that is, the temperature data is collected every second. According to the Nyquist sampling theorem, in order to avoid spectrum aliasing, the highest frequency of the temperature signal cannot exceed the Nyquist frequency. In the frequency domain signal X(k), the actual frequency corresponding to the frequency point k is ,in, For positive frequencies, Corresponds to negative frequencies.
[0026] Wavelet decomposition achieves localized representation of signals in the time domain and frequency domain through multi-scale analysis. The selection of the number of wavelet decomposition layers m requires a trade-off between time resolution and frequency resolution. A higher number of decomposition layers m provides higher frequency resolution but lower time resolution; a lower number of decomposition layers m provides higher time resolution but lower frequency resolution. Data length constraint: The number of wavelet decomposition layers m is constrained by the number of temperature data points N and satisfies . With each layer of wavelet decomposition, the data length is halved. In order to ensure that the data length after each layer of decomposition is at least 1, the number of decomposition layers m cannot exceed log2(N). For example, if the number of temperature data points N=1024, the maximum number of decomposition layers m does not exceed log2(1024)=10. Frequency range coverage: Wavelet decomposition divides the temperature signal into a low-frequency approximate signal and a high-frequency detail signal. The frequency range of the low-frequency approximate signal after the mth layer of decomposition should cover the main frequency components of the temperature signal. By analyzing the spectral characteristics of the temperature signal, determine the frequency range where the main frequency components are located, and select the appropriate number of decomposition layers m so that the frequency range of the mth layer of low-frequency approximate signal covers this frequency range.
[0027] Select the Symlets wavelet family (symN) as the wavelet basis function, where N is the wavelet order, such as sym4, sym6, sym8, etc. The Symlets wavelet family is a modified version of the Daubechies wavelet family (dbN) with better symmetry and smoothness. Wavelet function of the Symlets wavelet family and scale function They are all compactly supported functions, and the length of the support interval is 2N-1. The Symlets wavelet family is an orthogonal wavelet basis function that satisfies the orthogonality condition: ,in, is the KroneckerDelta function. Orthogonality ensures the independence between wavelet basis functions, making the wavelet transform have energy preservation characteristics. The Symlets wavelet family has approximate symmetry, and the wavelet function The scaling function is approximately symmetric about the center point. The center point is approximately antisymmetric. Sym4 to Sym8 achieve a good balance between time-frequency localization and regularity, and can effectively extract the time-frequency features of the temperature signal.
[0028] Multi-scale decomposition: Symlets wavelet is used to decompose the normalized temperature data series Perform m-layer wavelet decomposition. Each layer of decomposition is passed through a low-pass filter The signal is filtered and downsampled by a high-pass filter g(n) to obtain low-frequency approximate coefficients and high-frequency detail coefficients. Wavelet decomposition decomposes the signal at different scales through iteration to extract the multi-scale time-frequency characteristics of the signal. The first layer of decomposition: The normalized temperature data sequence Through a low pass filter and high pass filter Filtering and downsampling. Low pass filter Extract the low-frequency component of the signal, high-pass filter Extract the high-frequency components of the signal. Get the first-layer low-frequency approximation coefficients and the first layer high frequency detail coefficient , the length is half of the original signal length. Second layer decomposition: The first layer low frequency approximation coefficients Pass through a low pass filter again and high pass filter Filter and downsample. Get the second layer low-frequency approximation coefficients and the second layer high frequency detail coefficient , the lengths are The second layer of decomposition further extracts the multi-scale features of the low-frequency approximate signal based on the first layer of decomposition. Multi-layer decomposition: Repeat the above process for the m-1th layer of low-frequency approximate coefficients Filter and downsample to obtain the m-th layer low-frequency approximate coefficients and the mth layer high frequency detail coefficient . Perform m-layer decomposition to obtain the wavelet coefficients of each layer , extract the time-frequency characteristics of the temperature signal at different scales. The length of the wavelet coefficient decreases exponentially, and the length of the wavelet coefficient of the mth layer is the length of the original signal. .
[0029] Low frequency approximation coefficient: Low frequency approximation coefficient of the first layer Represents the low-frequency trend and main features of temperature data, and contains most of the energy information. The low-frequency approximation coefficient reflects the overall change trend and basic shape of the temperature signal, corresponding to the low-frequency component of the signal. The low-frequency approximation coefficient usually has a larger amplitude and lower frequency, indicating the main energy distribution of the signal. High-frequency detail coefficient: Layer 1 high-frequency detail coefficient Represents the high-frequency details and noise components of temperature data, including rapid changes and spike information. The high-frequency detail coefficient reflects the local fluctuations and detail characteristics of the temperature signal, corresponding to the high-frequency components of the signal. The high-frequency detail coefficient usually has a smaller amplitude and a higher frequency, indicating the detail information and noise interference of the signal. Multi-scale detail coefficient: High-frequency detail coefficients from the 2nd layer to the mth layer Represents the high-frequency detail information of temperature data at different scales. The high-frequency detail coefficients of different layers correspond to the detail information in different frequency ranges, and the frequency range decreases layer by layer. The high-level detail coefficients represent the fine structure and local features of the signal, and the low-level detail coefficients represent the coarse structure and global features of the signal.
[0030] Statistical features: Perform statistical analysis on the wavelet coefficients of each layer and calculate their mean, variance, energy and other characteristic quantities. The mean of the wavelet coefficient reflects the average level of the coefficients of this layer, the variance reflects the degree of dispersion of the coefficients of this layer, and the energy reflects the importance of the coefficients of this layer. Statistical features can quantitatively describe the distribution characteristics of the wavelet coefficients and are used for feature extraction and pattern recognition. Time-frequency characteristics: The wavelet coefficients of different layers reflect the time-frequency characteristics of temperature data in different frequency ranges. The low-frequency approximate coefficients represent the low-frequency trend and main features of the signal, and the high-frequency detail coefficients represent the high-frequency details and local features of the signal. By analyzing the time-frequency distribution of wavelet coefficients of different layers, the time-frequency localization characteristics of the temperature signal at different scales can be revealed. Feature extraction: low-frequency approximate coefficients It is usually used to extract the overall trend and basic shape of temperature data and reflect the main characteristics of the signal. It is used to extract local fluctuations and abnormal points of temperature data and reflect the detailed characteristics of the signal. By selecting appropriate wavelet coefficients and statistical features, the characteristic vector of the temperature signal can be constructed for pattern recognition and fault diagnosis. Signal reconstruction: Wavelet coefficients are not only used for feature extraction, but also for signal reconstruction. Through the inverse wavelet transform, the wavelet coefficients of each layer are combined and synthesized to reconstruct the original temperature signal. Signal reconstruction can verify the effectiveness of wavelet decomposition, and can also achieve signal denoising and compression.
[0031] Perform threshold processing on the wavelet coefficients of each layer to obtain the denoised wavelet coefficients. The specific steps are as follows: Calculate the standard deviation of the wavelet coefficients of each layer . According to the standard deviation and the preset scale factor α, the threshold of the wavelet coefficients of each layer is calculated The value range of the proportional factor α is 1.5 to 3.5 and can be adjusted according to actual conditions. The threshold calculation formula is as follows: ; Calculate the kurtosis of wavelet coefficients at each layer , Kurtosis reflects the sharpness of the signal distribution and can be used to measure the sparsity of wavelet coefficients. According to the kurtosis and the preset adjustment factor β, the threshold is adjusted to obtain the adjusted threshold Among them, the value range of the adjustment factor β is 0.5 to 1.5, which can be adjusted according to the actual situation. The adjusted threshold calculation formula is as follows: ; The wavelet coefficients of each layer The absolute value of the corresponding layer and the adjusted threshold Compare and set the wavelet coefficients less than the threshold to zero to obtain the denoised wavelet coefficients . , where k is the index of the wavelet coefficient. and Perform m-layer wavelet reconstruction to obtain the denoised temperature data sequence Wavelet reconstruction is achieved by inversely transforming the low-frequency approximation coefficients and the denoised high-frequency detail coefficients. , can restore the temperature signal after denoising, effectively suppress the noise interference in the temperature data, and improve the quality of the signal. Wavelet transform can adapt well to the non-stationary characteristics of temperature data by analyzing the signal in both the time domain and the frequency domain.
[0032] like Figure 3 As shown, the Kalman filter algorithm is used to filter the load current data; a state space model of the load current data is established, and the load current is used as a state variable , taking the measured value of the current sensor as the observed variable The state space model is as follows: State equation: ;Observation equation: ; Where A is the state transfer matrix, B is the process noise input matrix, H is the observation matrix, is the process noise, To observe noise. According to the historical statistical characteristics of the load current data, the initial parameters of the Kalman filter algorithm are set, and the historical load current data within a certain time range is collected to form a data set. , where N is the number of samples of historical data. Based on the historical data, an autoregressive model of the load current is constructed with an order of p. The autoregressive model describes the time correlation of the load current and can be used to fit the state transfer matrix. The form of the autoregressive model is as follows: ,in, is the autoregression coefficient, is the white noise term.
[0033] Using the least squares method, estimate the coefficients of the autoregressive model The least squares estimation minimizes the residual sum of squares and finds the coefficient value that minimizes the residual sum of squares. The designed regression matrix X and observation vector Y are as follows: ; ; The solution of the least squares estimate is: ,in, is the autoregressive coefficient vector. Based on the estimated autoregressive coefficients, the state transfer matrix is constructed The state variable is , then the state transfer matrix The form is: According to the physical characteristics of the load current, the observation matrix is set . It is usually possible to observe that the value is equal to the first component of the state variable, that is, Then the observation matrix The form is: . Calculate the one-step forecast residuals for historical data , where x(t|t-1) is the state prediction value at time t, which can be calculated recursively through the state transfer equation. The noise of the load current data is Gaussian white noise, then the noise covariance matrix is a diagonal matrix, and the diagonal elements are the noise variance. We can use the residual sequence To estimate the process noise variance and the observation noise variance , where N is the number of samples of historical data and p is the order of the autoregressive model. The estimation formula is: , , where m is the sample mean of the residual sequence. Then the process noise covariance matrix and the observation noise covariance matrix It can be expressed as: , ,in, is a p-order unit matrix. Through the above steps, we can estimate the initial parameters of the Kalman filter algorithm based on the historical statistical characteristics of the load current data, including the state transfer matrix , observation matrix , process noise covariance matrix and the observation noise covariance matrix These initial parameters reflect the time correlation, observation mechanism and noise statistical characteristics of the load current data, provide reasonable prior information for the Kalman filter algorithm, and help improve the accuracy and convergence speed of the filter estimation.
[0034] In each sampling cycle, the parameters of the Kalman filter algorithm are adaptively adjusted according to the currently collected load current data. Specifically, it includes: calculating the current collected load current data z(t) and the filtering result of the previous sampling cycle The residual e(t) of According to the mean of the residual sequence and variance , using the exponential weighted average method, update the process noise covariance matrix Q(t) and the observation noise covariance matrix R(t). The update formula is as follows: ; ; Where α and β are exponential weighting coefficients, ranging from 0 to 1, which can be adjusted according to actual conditions. B is the control input matrix in the state transfer matrix A, and H is the observation matrix. Calculate the autocorrelation coefficient of the residual sequence : ,in, is the time delay, ranging from 0 to t-1. ρ(τ) reflects the correlation of the residual sequence under different time delays. The Yule-Walker equation is solved according to the autocorrelation coefficient to estimate the coefficient of the autoregressive model: , solving the above linear equations, we can get the autoregressive coefficient vector The time correlation length L of the load current data reflects that the current load current value is significantly correlated with the load current values at the previous L moments. Determine the time correlation length L of the load current data and calculate the autocorrelation coefficient of the residual sequence : The residual sequence obtained according to the previous steps , calculate its autocorrelation coefficient : ,in, is the time delay, ranging from 0 to t-1. m is the mean of the residual sequence. is the horizontal axis, the autocorrelation coefficient As the vertical axis, draw the autocorrelation coefficient of the residual sequence. Observe the decay characteristics of the autocorrelation coefficient with time delay. Determine the threshold of the time correlation length L: Set a threshold , when the autocorrelation coefficient When the first decay falls below the threshold, the corresponding delay order is This is the estimated value of the time correlation length L. Threshold It can be selected based on experience or actual needs, and is generally between 0.1 and 0.3. ,when hour, ,and hour, , then L=10 can be estimated. This means that the current load current value is significantly correlated with the load current values of the previous 10 moments. Determine L through stationarity test: In addition to the autocorrelation coefficient attenuation characteristics, the value of L can also be determined through stationarity test. The specific steps are as follows: Perform ADF (Augmented Dickey-Fuller) unit root test to determine whether it is stable. If it is stable, L=0, indicating that the current load current value has no significant correlation with the previous value. If the residual sequence is not stable, perform first-order difference on it to obtain the difference sequence ,in, . Perform an ADF test on the differential sequence. If it is stable, L=1, indicating that the current load current value is significantly correlated with the value at the previous moment. d. If the differential sequence is still not stable, continue to perform higher-order differences until the differential sequence is stable. The differential order at this time is the estimated value of the time correlation length L. According to the L estimate obtained by the autocorrelation coefficient attenuation characteristics and the stability test, the final time correlation length L is determined comprehensively. The larger value of the L estimate obtained by the two methods can be taken as the final value to better reflect the time correlation of the load current data.
[0035] According to the time correlation length L, the autoregressive model of the state variable x(t) is constructed, and the state transfer matrix A(t) and the observation matrix H(t) are updated in real time using the least squares method. Input data: load current observation value sequence , the residual sequence , calculated from the Kalman filter's estimated value and observed value. Determine the time correlation length L: Calculate the autocorrelation coefficient of the residual sequence , where τ is the time delay. Plot the autocorrelation coefficient and observe The decay characteristics of τ. Set the threshold ,when First decay to When the following, the corresponding τ is the estimated value of L. Perform an ADF stationarity test on the residual sequence. If it is stationary, L=0; otherwise, perform a difference until the difference sequence is stationary, and the difference order is another estimated value of L. Determine the final L value by combining the autocorrelation coefficient decay characteristics and the results of the stationarity test. Construct an autoregressive model for the state variable x(t): Define the state variable , including the load current values at the current moment and the previous L-1 moments. By incorporating the historical load current values into the state variables, the time correlation of the load current can be characterized, providing a basis for predicting future load currents. Establish an autoregressive model: , where A(t) is the L-order state transfer matrix and w(t) is the process noise. The state transfer matrix A(t) is an L-order square matrix whose elements are the coefficients of the autoregressive model. The autoregressive model describes the relationship between the state variable x(t) and its past values. The linear relationship between them reflects the time evolution law of the load current. The structure of A(t) is similar to the initial state transfer matrix A0, but the order is L and needs to be updated in real time according to the latest residual sequence. Process noise Represents the random disturbance of load current, which is the factor that causes the load current to deviate from the deterministic autoregressive model. In the electrical automatic control system, process noise may come from load fluctuations, environmental interference, measurement errors, etc. Introducing process noise into the state equation can improve the adaptability and robustness of the autoregressive model to load current changes.
[0036] Use the least squares method to update the state transfer matrix A(t): select the data of the most recent M moments, construct the state matrix X and the observation vector Y: . Solve A(t) using least squares estimation: , where X' represents the transpose of X, express The inverse matrix of A(t). This is repeated in each sampling cycle, and A(t) is updated in real time. The state matrix X contains the state variables of the last M moments, and the observation vector Y contains the load current observations at the corresponding moments. Through least squares estimation, the value of A(t) that minimizes the sum of squared estimation errors can be found, so that the autoregressive model can be adapted to the latest load current data. Update the observation matrix H(t): The observation value z(t) is usually equal to the first component of the state variable, that is, z(t) = I(t). Define the observation matrix , so that the first component of the state variable directly corresponds to the observed value. The observation matrix H(t) describes the relationship between the state variable and the observed value. Assume that the observed value z(t) is the load current value I(t) at the current moment, so . This means that the first component of the state variable directly corresponds to the observed value, while the other components do not directly affect the observed value. Apply the updated model parameters for Kalman filtering: Use the updated state transfer matrix A(t) and observation matrix H(t) to construct an adaptive Kalman filter. Perform state prediction and estimation to obtain the filtered value and predicted value of the load current. Calculate the residual between the filtered value and the observed value for the next sampling period.
[0037] The state transfer matrix A(t) and observation matrix H(t) are updated in real time, and the Kalman filter value and predicted value of the load current are obtained. According to the time correlation of the load current data, the state space model is adaptively constructed, and the model parameters are updated in real time using the least squares method. This data-driven modeling method can effectively capture the dynamic characteristics of the load current and improve the estimation and prediction performance of the Kalman filter. At the same time, by updating the model parameters in real time, it can adapt to the non-stationarity of the load current data and enhance the adaptability and robustness of the algorithm. According to the Kalman filter algorithm with adjusted parameters, the filtering result of the current sampling period is calculated and used as the initial state estimate of the next sampling period. The filtering steps are executed cyclically until the load current data of all sampling periods are processed. Specifically, input data: load current observation value sequence , where z(t)=I(t), the updated state transfer matrix A(t) and observation matrix H(t), the initial state estimate x(0|0) and the initial state estimate covariance matrix P(0|0), the process noise covariance matrix Q(t) and the observation noise covariance matrix R(t).
[0038] According to the Kalman filter algorithm after adjusting the parameters, calculate the filtering result of the current sampling period: Prediction step: state prediction value ,in, It represents the state prediction value obtained at time t based on the state estimation value at time t-1, which corresponds to the load current prediction value in electrical automatic control. State prediction covariance matrix ,in, It represents the state prediction covariance matrix obtained at time t based on the state estimation covariance matrix at time t-1, reflecting the uncertainty of the state prediction value. Q(t) is the process noise covariance matrix, which represents the randomness of the load current change. Update step: Kalman gain , where K(t) represents the Kalman gain at time t, which determines the degree of correction of the observed value to the state estimate. R(t) is the observation noise covariance matrix, which represents the uncertainty of the load current measurement. State estimate ,in, Represents the predicted value of the state based on the observed value z(t) at time t The state estimation value obtained after correction corresponds to the load current filtering value in the electrical automatic control. The state estimation covariance matrix ,in, Represents the covariance matrix of the state prediction based on the observation value z(t) at time t The state estimation covariance matrix obtained after correction reflects the uncertainty of the state estimation value. I is the unit matrix.
[0039] The Kalman filter step is executed cyclically: the state estimate of the current sampling period is As the initial state estimate for the next sampling period Repeat step S34 until all the load current data of the sampling period are processed. Obtain the filtered load current data sequence ,in Indicates the load current filter value at time t, where T is the total number of sampling cycles. Output data: The filtered load current data sequence , the state estimation covariance matrix of each sampling period , which reflects the uncertainty of the filtering result. The load current observation value is filtered and predicted using the adaptive Kalman filtering algorithm. In each sampling period, the state prediction value and Kalman gain at the current moment are calculated based on the updated model parameters and the filtering result at the previous moment, and the state prediction value is corrected in combination with the observation value at the current moment to obtain the state estimation value at the current moment, that is, the filtering value of the load current. At the same time, the uncertainty of the filtering result can be quantified through the state estimation covariance matrix, which provides a reference for subsequent control decisions.
[0040] like Figure 4 As shown, the denoised temperature data and the filtered load current data are used as input, and a temperature rise compensation model is established based on the long short-term memory neural network LSTM. The output of the temperature rise compensation model is the predicted value of the temperature rise in the electrical cabinet. Step S41: Align the denoised temperature data and the filtered load current data. De-noise the collected temperature data to obtain a denoised temperature data sequence , where N is the number of temperature data points. The collected load current data is filtered to obtain the filtered load current data sequence , where M is the number of current data points. Confirm whether the number of data points of the temperature data sequence and the current data sequence is equal, that is, determine whether N is equal to M. If N is not equal to M, it means that the sampling time of the temperature data and the current data is not completely consistent, and interpolation processing is required. If N is less than M, select the temperature data sequence As an interpolation object, the current data series As the reference sequence. If N is greater than M, the current data sequence is selected As an interpolation object, the temperature data series As the reference sequence. For each data point in the interpolation object, find the data point with the closest timestamp in the reference sequence as the interpolation point. For example, for the temperature data point , find the current data point with the closest timestamp in the current data series ,but for The interpolation points are selected according to the number of interpolation points and the smoothness of the data.
[0041] The polynomial order k is usually chosen not to exceed half the number of interpolation points, i.e. , to avoid the problem of overfitting. According to the selected interpolation points and polynomial order k, a system of equations for polynomial interpolation is constructed. Let the interpolation polynomial be , where x is the timestamp, are the polynomial coefficients. For each interpolation point , substituting it into the polynomial , we get the equation: The constructed system of equations contains k+1 equations, and the unknowns are polynomial coefficients . The polynomial interpolation equations are solved numerically to obtain the polynomial coefficients The commonly used numerical methods include Gaussian elimination method, LU decomposition method, etc., and the appropriate solution algorithm is selected according to the scale and sparsity of the equation system. Using the polynomial coefficients obtained by the solution, construct the interpolation polynomial For the time point that needs to be interpolated in the interpolation object , substituting it into the interpolation polynomial , calculate the value of the interpolation point The interpolation point value That is, the interpolation object at the time point The calculated interpolation point value is inserted into the original interpolation object data sequence to obtain an interpolation result that is consistent with the number of reference sequence data points. If the temperature data sequence is an interpolation object, the interpolation result is ,in is the estimated temperature value obtained by interpolation. If the current data series is an interpolation object, the interpolation result is ,in is the estimated current value obtained by interpolation. The interpolated temperature data series and current data series are matched one by one according to the timestamps to generate temperature-current data pairs. The data pairs are in the form of , where L is the number of data points after interpolation, Each data pair Indicates that at time point i, the temperature of the system is The load current is .
[0042] Set the number of input layer nodes, hidden layer nodes, and output layer nodes of the LSTM neural network to establish the LSTM neural network structure. The number of input layer nodes is determined according to the dimension of the temperature-current data pair, usually 2 (temperature and current). The number of hidden layer nodes is a hyperparameter and needs to be adjusted according to the complexity of the data and the modeling requirements. The appropriate number of hidden layer nodes can be selected by cross-validation or empirical formulas. For example, the number of hidden layer nodes can be set to 50. The number of output layer nodes is 1, indicating the predicted temperature rise value. The structure of the LSTM neural network can be expressed as: input layer (2 nodes) -> LSTM hidden layer (50 nodes) -> output layer (1 node). The aligned temperature-current data pairs are randomly divided into training data sets and validation data sets. The commonly used division ratio is 80% of the data as the training set and 20% of the data as the validation set. Assuming that there are N aligned temperature-current data pairs, the training set size is 0.8N and the validation set size is 0.2N. When dividing specifically, a random sampling method can be used to extract 0.8N data pairs from N data pairs without replacement as the training set, and the remaining 0.2N data pairs as the validation set.
[0043] The LSTM neural network is trained using the training data set, and the trained LSTM neural network is verified using the verification data set to obtain the temperature rise compensation model. During the training process, the stochastic gradient descent algorithm is used to update the weights of the LSTM neural network. The stochastic gradient descent algorithm calculates the gradient of the loss function with respect to the weight, and adjusts the weight along the direction of the gradient descent to minimize the loss function. The mean square error is used as the loss function, that is, the mean of the sum of the squares of the difference between the predicted temperature rise value and the actual temperature rise value. Suppose the i-th sample in the training data set is The corresponding actual temperature rise is , the prediction output of the LSTM model is , then the mean square error loss function is: , where n is the number of samples in the training set. In each training iteration, a small batch (such as 32) of training samples is randomly selected, its loss function and gradient are calculated, and the weights of the LSTM model are updated. Repeat the iteration until the loss function converges or the preset number of iterations is reached. The trained LSTM model is verified using the validation data set, and the mean square error on the validation set is calculated. The performance indicators on the validation set can be used to evaluate the generalization ability of the model and select the optimal model parameters. After training and verification, the final temperature rise compensation model is obtained, and its weights have been adjusted to the optimal state. The denoised temperature data and the filtered load current data are input into the temperature rise compensation model to obtain the predicted temperature rise value in the electrical cabinet. Assume that the denoised temperature at the current moment is , the filter current is , then the input of the temperature rise compensation model is . Pass the input to the trained LSTM model and obtain the output of the model through forward propagation calculation. , which is the predicted value of temperature rise in the electrical cabinet at time t. The predicted temperature rise value can be used to evaluate the real-time thermal state of the electrical cabinet, adjust the load or heat dissipation strategy in time, and prevent damage or failure of electrical components due to overheating. At the same time, the predicted temperature rise value can also be used as a reference for thermal design and life assessment to optimize the structure and layout of the electrical cabinet. A multi-objective function for temperature rise control in the electrical cabinet is set. The multi-objective function includes: minimizing the deviation between the maximum temperature in the electrical cabinet and the predicted temperature rise value; minimizing the number of starts and stops of the cooling fan. The mathematical expression of the multi-objective function is: , where x is the control strategy of the cooling fan, including the start and stop time and speed adjustment value of the cooling fan.
[0044] Objective Function Indicates the deviation between the maximum value of the temperature in the electrical cabinet and the predicted value of the temperature rise: ,in, is the actual temperature value in the electrical cabinet at the i-th moment, is the temperature rise prediction value of the temperature rise compensation model at the i-th moment obtained in step S4, , n is the number of sampling moments of temperature data. In the embodiment of the present application, the temperature in the electrical cabinet is sampled once per minute for 10 minutes, then n=10. The actual temperature values at these 10 moments are recorded, respectively:
[0045] ;
[0046] The temperature rise prediction values of the temperature rise compensation model at these 10 moments are:
[0047] , .but The calculation process is: ,
[0048] therefore, Objective function Indicates the number of times the cooling fan is started and stopped: ,in, is the speed adjustment value of the cooling fan in the jth control cycle, is the speed adjustment value of the cooling fan in the j-1th control cycle, , m is the number of control cycles. sign (*) is the sign function. The speed of the cooling fan changes from 0 to non-0 or from non-0 to 0, which is regarded as one start and stop, so the actual number of starts and stops of the cooling fan is obtained by dividing by 2. In the embodiment of the present application, the control cycle of the cooling fan is 1 minute, and it is controlled continuously for 10 cycles. The speed adjustment values of each cycle are recorded, which are: .but The calculation process is:
[0049] Therefore, in the embodiment, the number of starts and stops of the cooling fan is 1.5 times. Through the above steps, a multi-objective optimization model for temperature rise control in the electrical cabinet is established. Objective function It measures the maximum deviation between the actual temperature in the electrical cabinet and the predicted temperature rise under the heat dissipation control strategy x, reflecting the accuracy and effect of temperature control. The frequency of cooling fan start and stop is measured, which reflects the stability of the control strategy and the energy consumption level. The task of multi-objective optimization is to minimize the number of cooling fan starts and stops while meeting the temperature control accuracy requirements to achieve the goal of energy saving and efficiency improvement.
[0050] According to the temperature rise prediction value and the set multi-objective function, the multi-objective ant colony algorithm is used to solve and obtain the optimal control strategy of the cooling fan. The control strategy includes the start and stop time and speed adjustment value of the cooling fan; the parameters of the multi-objective ant colony algorithm are set, including the number of ants M: it represents the number of ants searching simultaneously in the algorithm, which is related to the parallelism and search ability of the algorithm. Maximum number of iterations : represents the termination condition of the algorithm, i.e. the maximum number of iterations, which is related to the convergence speed of the algorithm. Pheromone importance factor α: represents the importance of pheromone in the ant transfer probability, which is related to the global search capability of the algorithm. Heuristic function importance factor β: represents the importance of heuristic information in the ant transfer probability, which is related to the local search capability of the algorithm. Pheromone evaporation coefficient ρ: represents the evaporation speed of pheromone, which is related to the search transfer and convergence speed of the algorithm. Determine the constraints of the cooling fan control strategy, including the start and stop time of the cooling fan The range [0, T] and the speed adjustment value of the cooling fan Range . Convert the constraints of the cooling fan control strategy into heuristic information: , mapping it from [0, T] to [0, 1], where 0 represents the earliest start and stop time and 1 represents the latest start and stop time. The mapped value is used as heuristic information The larger the value, the closer the start and stop time is to the constraint boundary, and the lower the probability that the ant will choose this time. , and change it from Mapped to the interval [0, 1], 0 represents the minimum speed , 1 means the maximum speed The mapped value is used as heuristic information The larger the value, the closer the speed adjustment value is to the constraint boundary, and the lower the probability that the ant will choose this speed. Constructing the transition probability function: It represents the probability that ant k will transfer from position i to position j at the tth iteration. The construction of the transfer probability function needs to consider two factors: pheromone concentration and heuristic information . Pheromone concentration It reflects the experience accumulated by the ant from the i-th position to the j-th position in the previous iteration. The larger the value, the higher the probability that the path will be selected. It represents the prior knowledge of transferring from the i-th position to the j-th position, that is, the influence of constraints on the ant's choice.
[0051] Transition probability function The expression is: ; Among them, α is the pheromone importance factor, β is the heuristic information importance factor, is the set of allowed transfer positions of ant k's current location. Randomly generate initial solutions: Randomly generate initial solutions for M ants. Each ant's solution contains a set of start and stop times and speed adjustment values for the cooling fan. For each ant, randomly select a time from the start and stop time constraint range [0, T] as the start and stop time of the initial solution. For each ant, randomly adjust the speed value from the constraint range Select a value from the initial solution as the speed adjustment value . The randomly generated start and stop times and speed adjustment value Combined into a complete cooling fan control strategy as the initial solution for an ant. Repeat the above steps until the initial solutions of M ants are generated. Calculate the initial objective function value: For the initial solution generated by each ant, you need to calculate its corresponding objective function value and Objective function It represents the heat dissipation performance, which can be calculated based on the temperature rise prediction value and the cooling fan control strategy. The specific calculation method depends on the physical model of the system and the heat transfer process. represents the energy consumption, which can be calculated based on the power and running time of the cooling fan. The specific calculation method depends on the energy consumption model of the cooling fan. Substitute the initial solution of each ant into the objective function and In the calculation, the corresponding heat dissipation performance and energy consumption values are obtained. After obtaining the objective function value corresponding to each ant's initial solution, the subsequent iterative optimization process can be carried out.
[0052] In the iterative optimization phase, each ant updates its next position according to the state transition rule based on its current position until the maximum number of iterations is reached. In the ant position mapping and neighborhood alternative solution generation phase, ant position mapping: The solution space of the cooling fan control strategy consists of the start and stop time and speed adjustment value It consists of two dimensions. Start and stop time The value range is [0, T], where T is the total working time of the cooling fan. Speed adjustment value The value range is ,in and are the minimum and maximum speeds of the cooling fan, respectively. The position of the ant can be represented as a two-dimensional vector (x, y), where x represents the start and stop time dimension and y represents the speed adjustment value dimension. The mapping function needs to convert the ant's position coordinates (x, y) into the corresponding start and stop time. and speed adjustment value For the start and stop time dimension, a linear mapping function can be used: , maps x values in the interval [0, 1] to values in the interval [0, T] For the speed adjustment value dimension, a linear mapping function can be used: , maps the y values in the interval [0, 1] to In the interval Through the above mapping function, the current position of the ant (x, y) is converted into the corresponding start and stop time and speed adjustment value , and get a feasible solution. Generation of alternative solutions in the neighborhood: Ant position mapping: Map the ant position to the solution space of the cooling fan control strategy. The solution space consists of two dimensions: the start and stop time dimension and the speed adjustment value dimension. The start and stop time dimension represents the start and stop time of the cooling fan, and the value range is [0, T], where T is the control period. The speed adjustment value dimension represents the speed adjustment value of the cooling fan, and the value range is ,in, and are the minimum and maximum speed adjustment values respectively. The position of the ant can be represented as a two-dimensional vector ,in is the current start and stop time, is the current speed adjustment value. Neighborhood definition: According to the characteristics and constraints of the cooling fan control strategy optimization problem, define the neighborhood of the ant's current position. For the start-stop time dimension, define the neighborhood as the current time The neighborhood can be expressed as , where Δt is the size of the time neighborhood. For the speed adjustment value dimension, the neighborhood is defined as the current speed The neighborhood can be expressed as , where Δv is the size of the velocity neighborhood. The selection of the neighborhood size requires a balance between exploration capability and convergence speed, and the appropriate value can be determined through experiments and experience.
[0053] The Latin Hypercube Sampling (LHS) method is used to generate alternative solutions in the neighborhood. The time neighborhood is divided into: for the start and stop time dimension, the time neighborhood is divided into Divide into n non-overlapping intervals. The interval division can adopt an equal division strategy to divide the time neighborhood into n sub-intervals of equal length. The boundary points of the sub-intervals can be expressed as: The length of each subinterval is , expressed as The sub-interval division method can be adjusted according to the characteristics of the problem, such as unequal division or logarithmic division. Speed neighborhood division: For the speed adjustment value dimension, the speed neighborhood Divide into m non-overlapping intervals. The interval division also adopts the equal division strategy, dividing the velocity neighborhood into m sub-intervals of equal length. The boundary points of the sub-intervals can be expressed as: The length of each subinterval is , expressed as The division method of subintervals can be adjusted according to the characteristics of the problem, such as unequal division or logarithmic division. Random sampling: Randomly sample a moment in each time subinterval. ,in . The generation of can be achieved by generating a random number in the corresponding sub-interval. The generation of random numbers can adopt probability distributions such as uniform distribution and normal distribution. The appropriate distribution is selected according to the characteristics of the problem. For each speed sub-interval, a speed adjustment value is also randomly sampled. ,in . The generation method and Similarly, a random number is generated in the corresponding subinterval. The random sampling process ensures that there is only one sampling point in each subinterval, ensuring the uniform distribution of sampling points in all dimensions. Sampling point combination: The time obtained by sampling and speed adjustment value Combine to generate two-dimensional sampling points The combination process is to perform Cartesian product operations on sampling points of different dimensions to generate all possible combinations. A total of n×m two-dimensional sampling points are generated, and each sampling point represents an alternative solution. The combination of sampling points can be done in a systematic way, such as loop traversal or recursive generation, to ensure that all possible combinations are generated.
[0054] Alternative solution generation: The generated two-dimensional sampling points are used as alternative solutions, and each sampling point corresponds to a combination of start and stop time and speed adjustment value. The number of alternative solutions is n×m, covering different value combinations in the time neighborhood and speed neighborhood. The generated alternative solutions are distributed in the solution space, and can explore different combinations of start and stop time and speed adjustment value more evenly. The generation process of alternative solutions can be parallelized to improve computational efficiency. The LHS method generates relatively evenly distributed alternative solutions by sampling independently in each dimension and combining sampling points of different dimensions. Compared with the traditional random sampling method, the LHS method can more effectively cover the solution space, reduce the dimension of the search space, and improve sampling efficiency. The generated alternative solutions provide a good initial solution set for the search of the ant colony algorithm, which helps to accelerate the convergence of the algorithm and improve the quality of the solution. At the same time, the sampling process of the LHS method can be flexibly adjusted according to the characteristics of the problem, such as the distribution of sampling points, the division method of sub-intervals, etc., to adapt to different optimization problems. Constraint processing: For each alternative solution, a start and stop time falling in the corresponding interval is randomly generated. and speed adjustment value . Make sure the generated and Satisfy constraints, such as start and stop times The value range is [0, T]. Speed adjustment value The value range is . Other constraints related to the problem, such as start-stop frequency limits, speed change rate limits, etc. Perform feasibility checks on the generated alternative solutions to ensure that they meet all constraints. If the alternative solution does not meet the constraints, it can be repaired or regenerated until a feasible solution is obtained. Alternative solution evaluation: Evaluate the generated alternative solutions and calculate the objective function value of each alternative solution. The objective function can be a performance indicator related to the problem, such as heat dissipation effect and energy consumption. According to the objective function value, the alternative solutions are sorted or selected for subsequent transfer probability calculation and solution update.
[0055] Calculation of transition probability of alternative solutions: For each alternative solution, calculate its transition probability , represents the probability that the kth ant will transfer from the current position i to the alternative solution j' at the tth iteration. The calculation of the transfer probability takes into account two factors: pheromone concentration and heuristic information . Pheromone concentration It reflects the experience accumulated by the ants at the previous location and can be updated based on the objective function value obtained by the ants at the previous location. For the cooling fan control strategy optimization problem, the pheromone concentration can be associated with the cooling performance and energy consumption objective function values corresponding to the alternative solutions. The better the cooling performance and the lower the energy consumption of the alternative solution, the higher the pheromone concentration at the corresponding location should be to attract more ants to move to that location. The prior knowledge of the position can be calculated based on the matching degree between the alternative solution and the problem constraints. For the cooling fan control strategy optimization problem, the heuristic information can be associated with the feasibility and superiority of the alternative solution. The heuristic information of the corresponding position of the alternative solution that meets the constraints and is on the Pareto front should be high to guide the ants to transfer to a better solution. The calculation formula can be in the following form: ;in, represents the set of all alternative solutions in the neighborhood of the kth ant’s current position i, α and β are the importance parameters of pheromone and heuristic information respectively. Selection strategy based on Pareto advantage: select the start and stop time corresponding to the next position from the alternative solutions and speed adjustment value , as the moving direction of the kth ant at the tth iteration. A selection strategy based on Pareto advantage is adopted, considering the distribution of alternative solutions on the Pareto front of multiple objective functions. The Pareto front is a solution set consisting of non-dominated solutions, in which there is no domination relationship between any two solutions. For the cooling fan control strategy optimization problem, the solution on the Pareto front represents a solution that has advantages in both the cooling performance and energy consumption objective functions. The selection strategy aims to make the alternative solutions more evenly distributed on the Pareto front and more likely to select non-dominated solutions to balance the optimization of multiple objective functions.
[0056] The tournament selection method can be used to implement the Pareto dominance selection strategy: a certain number of solutions (such as 2 or 4) are randomly selected from the set of alternative solutions as tournament participants. The tournament participants are compared pairwise to determine the Pareto dominance relationship between them. If there is a solution that dominates all other solutions, then the solution is selected as the winner of the tournament. If there is no dominated solution, then a random solution is selected from the non-dominated solutions as the winner. Repeat multiple rounds of tournament selection until the final winning solution is selected as the next position of the kth ant. Through tournament selection, non-dominated solutions on the Pareto front can be preferentially selected from the alternative solutions, and random selection can be made between non-dominated solutions to maintain the diversity of solutions. Through the above technical solutions of alternative solution transition probability calculation and Pareto dominance-based selection strategy, ants can be guided to conduct effective search and transfer in the solution space and move towards a better cooling fan control strategy. The design of pheromone concentration and heuristic information combined with problem characteristics can better reflect the quality and feasibility of the solution. The Pareto advantage selection strategy helps to balance the optimization of multiple objective functions and obtain a set of Pareto optimal solutions that have advantages in both heat dissipation performance and energy consumption. and speed adjustment value As the feasible solution of the cooling fan control strategy corresponding to the next position of the ant. Substitute the feasible solution into the multi-objective function and calculate the objective function value corresponding to the current ant position and Objective function Indicates the heat dissipation performance, and can be evaluated by indicators such as heat sink temperature, thermal resistance, etc. Objective function To represent energy consumption, indicators for evaluating energy consumption, such as power and energy, can be used. The calculation method of the heat dissipation performance and energy consumption objective function can be determined based on the physical model and mathematical formula of the specific problem. The calculation of the objective function value needs to consider the impact of the start and stop time and speed adjustment value of the cooling fan on the heat dissipation performance and energy consumption. Simulation tools or experimental test methods can be used to obtain heat dissipation performance and energy consumption data under different control strategies as the basis for calculating the objective function value.
[0057] Update of non-dominated solution set: Use the Pareto dominance relationship to compare the current ant position with the solutions in the non-dominated solution set. The Pareto dominance relationship is defined as follows: solution A dominates solution B if and only if solution A is better than or equal to solution B in all objective functions and is strictly better than solution B in at least one objective function. If the solution at the current position is not dominated by any solution in the non-dominated solution set, it is added to the non-dominated solution set. At the same time, the solutions dominated by the solution at the current position are removed from the non-dominated solution set. In this way, the non-dominated solution set is continuously updated and maintained, excellent solutions are retained, and dominated solutions are eliminated. The update process of the non-dominated solution set can use efficient data structures and algorithms, such as Fast Non-dominated Sorting, to reduce computational overhead. Pheromone update: According to the non-dominated solution set, the transition probability function is updated using the global pheromone update rule. Pheromone concentration in The pheromone update rule takes into account two aspects: pheromone evaporation and pheromone increment. Pheromone evaporation means that the pheromone concentration will gradually decay over time, simulating the volatilization process of pheromones in nature. The pheromone increment is related to the objective function value of the ant at that position. The better the objective function value, the greater the pheromone increment. The global pheromone update rule can be in the following form: ; where ρ is the pheromone evaporation coefficient, is the pheromone increment, which is related to the objective function value of the solution in the non-dominated solution set. The calculation of the pheromone increment can consider the quality score S (A) of the solution in the non-dominated solution set. and quantity, giving better solutions a larger pheromone reward. Update pheromone increment: .
[0058] External archive update: Save the non-dominated solutions obtained in the current iteration to the external archive. The external archive is used to save all non-dominated solutions found during the algorithm iteration process for subsequent analysis and selection. The update of the external archive needs to consider the size limit of the archive and the diversity of solutions. An archiving strategy based on crowding distance can be adopted to give priority to retaining solutions with high crowding distance to maintain the diversity of the solution set. When the external archive reaches the set size limit, a crowding distance-based pruning strategy can be used to remove solutions with low crowding distance to control the size of the archive. Iteration termination condition judgment: Determine whether the current number of iterations t has reached the maximum number of iterations . If the maximum number of iterations is not reached, the iterative optimization process continues, returns to the ant position mapping stage, and starts a new round of search. If the maximum number of iterations is reached, the iteration is stopped and the result output stage is entered. In addition to the maximum number of iterations, other termination conditions can also be set, such as the degree of convergence of the objective function value, the calculation time limit, etc., to flexibly control the operation of the algorithm. The calculation of the objective function value is combined with the physical model and evaluation indicators of the problem to provide a basis for the quality assessment of the solution. The update of the non-dominated solution set and the maintenance of external archives ensure the retention of excellent solutions and the maintenance of diversity. The update of pheromones guides ants to search and learn effectively in the solution space.
[0059] In the specific embodiment of the present application, the parameters of the multi-objective ant colony algorithm are initialized, the number of ants M=50, the maximum number of iterations , pheromone importance factor α=1, heuristic function importance factor β=2 and pheromone evaporation coefficient ρ=0.5. Convert the constraints of the cooling fan control strategy x into the heuristic information of the ant colony algorithm and construct the transition probability function . Cooling fan start and stop time The constraints are Minutes, cooling fan speed adjustment value The constraints are RPM. Randomly generate initial solutions for M=50 ants. The initial solution for each ant includes the start / stop state and speed value at 10 moments. For example, the initial solution for ant k is: Calculate the initial objective function value of each ant's corresponding solution and , for example, the initial solution of ant k corresponds to , .
[0060] According to the current position of the ant, the next position of the ant is updated through the state transition rule. Take the case of ant k in the tth iteration as an example: the start and stop times corresponding to the current position of ant k are Minutes, speed adjustment value is RPM; In the neighborhood of the current position of ant k, according to the constraint and , using the dimensionality reduction sampling strategy, randomly generate 3 groups of alternative solutions: Alternative solution 1: , ; Alternative solution 2: , ; Alternative solution 3: , ; and calculate the transition probability of each alternative solution , for example, the transition probability of alternative solution 1 is 0.4, the transition probability of alternative solution 2 is 0.3, and the transition probability of alternative solution 3 is 0.3; c. According to the transition probability of the alternative solutions, the selection strategy based on Pareto advantage is adopted, and finally alternative solution 1 is selected as the control strategy corresponding to the next position of ant k, that is, , ; d. and Substitute into the multi-objective function and calculate the objective function value corresponding to the current ant k position. ; e. Set the objective function value of the current ant k and Compare with the solutions in the non-dominated solution set. If the current solution is not dominated by any solution, add it to the non-dominated solution set. Based on the non-dominated solution set, use the global pheromone update rule to update the transition probability function. Pheromone concentration in The current non-dominated solution set contains 5 solutions, and the objective function value of each solution is They are: ; Set the pheromone increment constant Q = 10, and calculate the pheromone increment from the i-th position to the j-th position according to the global pheromone update rule : ; The pheromone concentration from the i-th position to the j-th position before the t-th iteration , then according to the global pheromone update rule, the updated pheromone concentration for: ; Save the current non-dominated solution set to an external archive.
[0061] Determine whether the current number of iterations t is less than the maximum number of iterations If yes, set t=t+1 and return to continue iterative optimization; if no, stop the iteration and select the current non-dominated solution set from the external archive as the Pareto optimal solution set output. After 100 iterations, 10 Pareto optimal solutions were obtained from the external archive. Each optimal solution contains the start and stop status and speed adjustment value of the cooling fan at 10 moments, as well as the corresponding objective function value. and , for example: Optimal solution 1: ; ;......; ; , ; Optimal solution 2: ; ;......; ; , ;......;Optimal solution 10: ; ;......; ; , Engineers can select the appropriate cooling fan control strategy from the Pareto optimal solution set according to actual needs and preferences, which can not only meet the requirements of temperature control accuracy in the electrical cabinet, but also minimize the number of starts and stops of the cooling fan, thereby achieving the purpose of energy saving and efficiency improvement.
[0062] According to the optimal control strategy of the cooling fan, control the start and stop and speed adjustment of the cooling fan. Select the appropriate cooling fan model, considering the fan size, air volume, noise and other parameters to meet the cooling requirements and system limitations. The cooling fan should have controllable start and stop and speed adjustment functions, usually using PWM (pulse width modulation) or DC (direct current) control. PWM control adjusts the fan speed by changing the pulse width, and DC control adjusts the fan speed by changing the supply voltage. Select a cooling fan that supports the required control method and ensure that its electrical parameters are compatible with the controller. Select a suitable cooling fan controller, such as a microcontroller, embedded controller, etc. The controller should have sufficient I / O interfaces for connecting the cooling fan and other sensors and actuators. The controller should have sufficient computing power and storage space to run the cooling fan control algorithm and store related data. According to the control method of the cooling fan (PWM or DC), select a controller with the corresponding output interface. Design the communication interface between the cooling fan controller and the host computer or other devices. The communication interface can use standard protocols such as UART, I2C, SPI, etc., or industrial buses such as CAN, Modbus, etc. The communication interface should support the functions of parameter configuration, status monitoring and fault diagnosis of the cooling fan control strategy. According to the system architecture and requirements, select the appropriate communication interface and protocol, and perform reliability design. According to the optimal control strategy of the cooling fan, implement the corresponding control algorithm.
[0063] The control algorithm should dynamically adjust the start and stop and speed of the cooling fan according to the cooling demand and system status. The control algorithm can adopt classic control methods such as rule-based, fuzzy logic, PID, etc., or intelligent control methods such as optimization, adaptive, and prediction. The control algorithm should consider the dynamic characteristics of the cooling fan and the constraints of the system, such as start and stop frequency limits, speed change rate limits, etc. Implement the control algorithm in the controller, and perform parameter tuning and performance verification. Control the start and stop of the cooling fan according to the output of the control algorithm. Start and stop control can be implemented through the digital I / O interface of the controller, and the power supply of the cooling fan is controlled by high and low levels or switch quantities. Start and stop control should consider the start and stop characteristics of the cooling fan, such as starting current, stop inertia, etc., to avoid impact on the system. If necessary, soft start or soft stop technology can be used to smooth the start and stop process by gradually changing the supply voltage or PWM duty cycle. Adjust the speed of the cooling fan according to the output of the control algorithm. For PWM control, the speed of the cooling fan is adjusted by changing the duty cycle of the PWM signal. For DC control, the speed of the cooling fan is adjusted by changing the supply voltage. Speed adjustment should consider the speed-air volume characteristics of the cooling fan and the cooling requirements of the system, and select the appropriate adjustment range and step. Speed adjustment should be smooth and continuous, avoiding sudden changes or oscillations to ensure the stability and reliability of the system.
Claims
1. An electrical automatic control method, characterized in that: include: The temperature data inside the electrical cabinet is collected through the temperature sensor, and the load current data of the electrical cabinet is collected through the current sensor; The temperature data is denoised using wavelet transform algorithm; The Kalman filter algorithm is used to filter the load current data; The denoised temperature data and filtered load current data are used as input, and a temperature rise compensation model is established based on the long short-term memory neural network LSTM. The output of the temperature rise compensation model is the predicted value of the temperature rise in the electrical cabinet. Set the multi-objective function for temperature rise control in the electrical cabinet. The multi-objective function includes: Minimize the deviation between the maximum value of the temperature in the electrical cabinet and the predicted value of temperature rise; Minimize the number of times the cooling fan starts and stops; According to the temperature rise prediction value and the set multi-objective function, the multi-objective ant colony algorithm is used to solve and obtain the optimal control strategy of the cooling fan. The control strategy includes the start and stop time and speed adjustment value of the cooling fan. According to the optimal control strategy of the cooling fan, control the start and stop and speed adjustment of the cooling fan; A temperature rise compensation model is established based on the long short-term memory neural network LSTM, including: Align the denoised temperature data and the filtered load current data to obtain an aligned temperature-current data pair; Set the number of input layer nodes, hidden layer nodes, and output layer nodes of the LSTM neural network to establish the LSTM neural network structure; The aligned temperature-current data pairs are randomly divided into training data sets and validation data sets; The LSTM neural network is trained using the training data set. During the training process, the stochastic gradient descent algorithm is used to update the weights of the LSTM neural network, and the mean square error is used as the loss function. The trained LSTM neural network is verified using the verification data set to obtain a temperature rise compensation model. The denoised temperature data and filtered load current data are input into the temperature rise compensation model to obtain the predicted value of the temperature rise in the electrical cabinet.
2. The electrical automatic control method according to claim 1, characterized in that: The temperature data is denoised using the wavelet transform algorithm, including: Normalize the collected temperature data; Perform Fourier transform on the normalized temperature data, set the number of wavelet decomposition layers according to the sampling frequency and signal spectrum of the temperature data; use the Symlets wavelet family to perform wavelet decomposition on the normalized temperature data to obtain the wavelet coefficients of each layer; Perform threshold processing on the wavelet coefficients of each layer to obtain the denoised wavelet coefficients; The denoised wavelet coefficients are reconstructed by wavelet to obtain the denoised temperature data.
3. The electrical automatic control method according to claim 2, characterized in that: Threshold processing is performed on the wavelet coefficients of each layer, including: Calculate the standard deviation of the wavelet coefficients of each layer; Calculate the threshold of each layer's wavelet coefficients based on the standard deviation and the preset scaling factor, where the scaling factor ranges from 1.5 to 3.5; Calculate the kurtosis of the wavelet coefficients of each layer; The threshold is adjusted according to the kurtosis and the preset adjustment factor to obtain an adjusted threshold; wherein the adjustment factor has a value range of 0.5 to 1.5; The absolute value of the wavelet coefficients of each layer is compared with the adjusted threshold of the corresponding layer, and the wavelet coefficients smaller than the threshold are set to zero to obtain the denoised wavelet coefficients.
4. The electrical automatic control method according to claim 2, characterized in that: The Kalman filter algorithm is used to filter the load current data, including: Establish a state space model of load current data, taking load current as the state variable and the measured value of the current sensor as the observed variable; According to the historical statistical characteristics of the load current data, the initial parameters of the Kalman filter algorithm are set, and the initial parameters include the state transfer matrix, the observation matrix, the process noise covariance matrix and the observation noise covariance matrix; In each sampling period, the parameters of the Kalman filter algorithm are adaptively adjusted according to the currently collected load current data; According to the Kalman filter algorithm after adjusting the parameters, the Kalman gain, state estimation value and state estimation covariance matrix of the current sampling period are calculated to obtain the filtering result of the current sampling period; The filtering result of the current sampling period is used as the initial state estimation value of the next sampling period, and the filtering step is repeated until the load current data of all sampling periods are processed to obtain the filtered load current data.
5. The electrical automatic control method according to claim 4, characterized in that: Adaptively adjust the parameters of the Kalman filter algorithm, including: Calculate the residual between the currently collected load current data and the filtering result of the previous sampling period to obtain a residual sequence; According to the mean and variance of the residual sequence, the process noise covariance matrix and the observation noise covariance matrix are updated by using the exponential weighted average method; Calculate the autocorrelation coefficient of the residual sequence, solve the Yule-Walker equation based on the autocorrelation coefficient, and obtain the time correlation length of the load current data; According to the time correlation length, the autoregressive model of the state variables is constructed, and the state transfer matrix and the observation matrix are updated using the least squares method.
6. The electrical automatic control method according to claim 1, characterized in that: Set the multi-objective function of temperature rise control in the electrical cabinet. The multi-objective function is: , where x is the control strategy of the cooling fan, including the start and stop time and speed adjustment value of the cooling fan; is the deviation between the maximum value of the temperature in the electrical cabinet and the predicted value of the temperature rise, expressed as: ,in, is the actual temperature value in the electrical cabinet at the i-th moment, is the predicted value of temperature rise of the temperature rise compensation model at the i-th moment, , n is the number of sampling moments of temperature data; is the number of starts and stops of the cooling fan, expressed as: ,in, is the speed adjustment value of the cooling fan in the jth control cycle, is the speed adjustment value of the cooling fan in the j-1th control cycle, , m is the number of control cycles; and is a symbolic function, when hour, ,when hour, ,when hour, ; The speed of the cooling fan changes from 0 to non-0 or from non-0 to 0, which is regarded as one start and stop, so divide it by 2 to get the actual number of starts and stops of the cooling fan.
7. The electrical automatic control method according to claim 6, characterized in that: The optimal control strategy of the cooling fan is obtained, including: Initialize the parameters of the multi-objective ant colony algorithm, which include the number of ants M, the maximum number of iterations , pheromone importance factor α, heuristic function importance factor β and pheromone evaporation coefficient ρ; The constraints of the cooling fan control strategy x, including the start and stop times of the cooling fan Constraints and cooling fan speed adjustment value Constraints , converted into heuristic information of the ant colony algorithm, and the transition probability function of the ant colony algorithm is constructed , which represents the probability that ant k moves from the i-th position to the j-th position at the t-th iteration; and randomly generates the initial solution of M ants, and calculates the initial objective function value of each ant's corresponding solution and ; According to the current position of the ant, the next position of the ant is updated through the state transition rule; According to the non-dominated solution set, the transition probability function is updated using the global pheromone update rule. Pheromone concentration in , and save the current non-dominated solution to an external archive; the expression of the global pheromone update rule is: , where ρ is the pheromone evaporation coefficient, is the pheromone increment from the ith position to the jth position at the tth iteration, The expression is: , where Q is the pheromone increment constant, is the objective function value corresponding to the solution constructed by ant k at the tth iteration, and M is the number of ants; Determine whether the current number of iterations t is less than the maximum number of iterations If yes, set t=t+1 and return to continue iterative optimization; if not, stop the iteration and select the current non-dominated solution set from the external archive as the Pareto optimal solution set output.
8. The electrical automatic control method according to claim 7, characterized in that: Transition probability function The expression is: ,in, is the pheromone concentration from the ith position to the jth position at the tth iteration, is the heuristic information from the i-th position to the j-th position, α is the pheromone importance factor, β is the heuristic function importance factor, is the set of allowed transfer positions of ant k’s current position.
Citation Information
Patent Citations
Over-temperature early warning method based on inverter radiator temperature prediction
CN112910288A
Indirect Thermal Fan Control
US20130018523A1