Discretization-based offshore wind power grid-connected system state probability prediction method and device

By discretizing the output power data of offshore wind farms and constructing a causal self-attention model, the problem of predicting the state of offshore wind power grid-connected systems was solved, achieving high-precision probabilistic prediction of system state and real-time risk assessment, thus ensuring the safety and reliability of the system.

CN118964892AActive Publication Date: 2024-11-15WUHAN UNIV

Patent Information

Application Number
CN202411108319.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-15
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively predict equipment status and faults in offshore wind power grid-connected systems. They lack high-precision status characterization and fault prediction methods, especially in complex marine environments where system fault diagnosis and remote monitoring technologies are inadequate.

Method used

A discretization-based method is used to preprocess the output power data of offshore wind farms, construct state transition chain data, and use a causal self-attention module to construct a probabilistic prediction model. By training and optimizing the model parameters, the system state probabilistic prediction and real-time risk assessment are realized.

Benefits of technology

It enables accurate probabilistic prediction of the status of offshore wind power grid-connected systems, provides real-time early warning, ensures the safe and reliable operation of the system, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964892A_ABST
    Figure CN118964892A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of electric power grids, and particularly relates to a discretization-based offshore wind power grid-connected system state probability prediction method and device, and the method comprises the steps: S1, preprocessing time sequence continuous data of the output power of an offshore wind power plant, carrying out discretization, and constructing state transition chain data; s2, constructing an offshore wind power grid-connected system state probability prediction model by a superposition causal self-attention module; s3, using the state transition chain data to train a state probability prediction model of the offshore wind power grid-connected system; and S4, according to the probability distribution corresponding to the state of the offshore wind power grid-connected system, completing state probability prediction. According to the method, offshore wind power real-time operation data is discretized and constructed into state transition chain data, then an offshore wind power probability prediction model is trained, the system state and probability are obtained through prediction, finally, sampling analysis is conducted on an output result, and the probability of any interval is determined; support is provided for risk assessment and real-time early warning of the offshore wind power system, and safe and reliable operation of the offshore wind power grid-connected system is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electric power grids, and in particular relates to a method and device for predicting the state probability of an offshore wind power grid-connected system based on discretization. Background Art

[0002] Offshore wind power grid-connected systems are playing an increasingly important role in the global renewable energy sector, especially in marine areas with rich wind resources. However, the operating environment of these systems has unique complexity, including extreme meteorological conditions and ocean characteristics, which places higher demands on the stability and safe operation of the system. Offshore wind power grid-connected systems and their equipment must adapt to the continuously changing marine environment, such as high temperature, high humidity, strong salt spray corrosion, and continuous vibration and ocean currents. In addition, the frequent occurrence of extreme weather events such as thunderstorms and typhoons increases the risk of system failure and damage. These factors not only accelerate equipment aging, but may also trigger complex failure chains, leading to instability of the entire system.

[0003] Due to the low accessibility of offshore wind power equipment, the maintenance and fault repair costs are significantly higher than onshore wind power systems. Therefore, it is particularly important to develop a method that can accurately predict the potential risks and performance changes of the grid-connected system. This prediction method needs to take into account the uncertainty and variability of the marine environment, be able to assess risks in real time and provide reliable data support to optimize the operation and maintenance strategy of the system. Current research mainly focuses on the internal factors of the equipment and the analysis of failure modes in the onshore environment, while the understanding of the equipment status and fault development mechanism in the special offshore environment is still limited. In addition, the fault diagnosis and remote monitoring technology of offshore wind power systems has not been fully developed, and there is a lack of high-precision state characterization and fault prediction methods for the marine environment. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention provides a method and device for predicting the state probability of an offshore wind power grid-connected system based on discretization. The present invention discretizes the real-time operation data of offshore wind power and constructs it into state transfer chain data, trains an offshore wind power probability prediction model, predicts the system state and probability, and finally samples and analyzes the output results to determine the probability of any interval; it provides support for risk assessment and real-time early warning of offshore wind power systems, and ensures the safe and reliable operation of offshore wind power grid-connected systems.

[0005] To achieve the above object, the present invention discloses the following technical solution:

[0006] A method for predicting the state probability of an offshore wind power grid-connected system based on discretization comprises the following steps:

[0007] S1: Preprocess the time series continuous data of the output power of the offshore wind farm, discretize it, and construct the state transfer chain data, which specifically includes the following sub-steps:

[0008] S11: Collected time series continuous data X of offshore wind farm output power t Perform preprocessing, use the first data symbol ERROR to replace abnormal data, and use the second data symbol NONE to fill missing data;

[0009] S12: Discretize the time series continuous data, determine the discrete level N of the time series continuous data, and convert the time series continuous data X t Discretize into time series discrete data X d The formula is:

[0010]

[0011] Among them, x t is an element in the time series continuous data; x d is an element in the time series discrete data; x max is the maximum value of the time series continuous data; x min is the minimum value of time series continuous data; is the operation of rounding down to an integer; N is the discrete series of time series continuous data; ∈ is the discretization parameter;

[0012] S13: Encode the first data symbol ERROR and the second data symbol NONE into discrete series N and N+1 of time-series continuous data respectively to obtain state transfer chain data X c ;

[0013] S2: Superimpose the causal self-attention module to construct the offshore wind power grid-connected system state probability prediction model, which specifically includes the following sub-steps:

[0014] S21: Build a single causal self-attention module including a multi-head attention mechanism submodule and a layer normalization and residual connection submodule; the multi-head attention mechanism submodule is:

[0015]

[0016] Among them, MuHe(Q,K,V) is the output of the multi-head attention mechanism submodule; Q is the query element; K is the key element; V is the value element; is the vector concatenation operation; W o is the parameter matrix required for linear transformation after splicing; n is the number of mapping subspaces; head i Output result of the attention mechanism in the i-th semantic subspace, i∈1,2…n;

[0017] The layer normalization and residual connection submodules are:

[0018] out=LaNo(Add(Q+MuHe(Q,K,V)));

[0019] Among them, out is the output of the layer normalization and residual connection submodule; LaNo is the layer normalization function; Add is the residual connection function;

[0020] S22: Position encoding is performed on each causal self-attention module constructed in step S21 to maintain the time series information of the discrete time series data; the position encoding uses a combination of a sine function and a cosine function to generate a unique position code for each data in the discrete time series data, and the generation method is:

[0021]

[0022] Among them, PE(pos,2j) is the odd position encoding of time series discrete data; PE(pos,2j+1) is the even position encoding of time series discrete data; pos is the extraction position of time series discrete data; j is the dimension index of the offshore wind power grid-connected system state probability prediction model; d model The dimensions of the probability prediction model for offshore wind power grid-connected system status;

[0023] S23: By stacking the single causal self-attention module in step S21, according to the time series discrete data X to be processed c The length of the sequence is L max , stack L max A causal self-attention module is used to construct a probability prediction model for the offshore wind power grid-connected system state;

[0024] S3: Using the state transfer chain data obtained in step S1 to train the offshore wind power grid-connected system state probability prediction model obtained in step S2, specifically including the following sub-steps:

[0025] S31: Obtain the state transfer chain data X in step S1 c , construct state transfer chain data samples and divide them into training set data samples and validation set data samples;

[0026] S32: Train the offshore wind power grid-connected system state probability prediction model in batches, input the training set data samples, and use the gradient descent method to optimize the parameter matrix W of the offshore wind power grid-connected system state probability prediction model in step S2 o ; The mixed cross entropy mean square error loss function used is:

[0027]

[0028] Among them, Loss is the mixed cross entropy mean square error loss function; λ is the weight coefficient; is the probability distribution corresponding to the offshore wind power grid-connected system state; y i is the true value of the training set data sample; for y i The value after serialization; for The probability distribution after continuous processing; L max X is the discrete time series data c The length of the sequence;

[0029] S33: using the validation set data samples to verify the prediction accuracy of the offshore wind power grid-connected system state probability prediction model in step S2, and using the test set data samples to predict the state probability of the offshore wind power grid-connected system, and determine the probability distribution corresponding to the state of the offshore wind power grid-connected system;

[0030] S4: According to the probability distribution corresponding to the state of the offshore wind power grid-connected system, complete the state probability prediction;

[0031] The probability distribution corresponding to the offshore wind power grid-connected system state in step S3 is obtained as follows: The total number of statistical probability sampling values ​​N s and the number of target probability sampling values ​​n s , the probability of calculating the target interval of the offshore wind power grid-connected system state is:

[0032]

[0033] Where P is the probability of the target interval of the offshore wind power grid-connected system state; n s is the number of target probability sampling values; N s is the total number of probability sampling values.

[0034] Preferably, in step S11, the collected time series continuous data X of the output power of the offshore wind farm is t Preprocessing is performed, which specifically includes the following sub-steps:

[0035] S111: Through the monitoring system of offshore wind farms, real-time continuous data on power output operation sequence is collected t =[x1,x2,…,x t ];

[0036] S112: Check the collected time series continuous data, regard the data beyond the preset quantitative measurement range as abnormal data, and replace it with the first data symbol ERROR;

[0037] S113: Check the collected time-series continuous data, locate missing data, and use the second data symbol NONE to fill the time-series continuous data.

[0038] Preferably, the discrete level N of the time series continuous data is determined in step S12, specifically:

[0039] Perform statistical analysis on the collected time series continuous data, draw a data distribution histogram, and mark the maximum value x of the time series continuous data max and the minimum value x min , determine the discrete series N of time series continuous data as:

[0040]

[0041] Where N is the discrete series of continuous time series data; δ is the width of each discrete interval that does not exceed a given precision; x max is the maximum value of the time series continuous data; x min It is the minimum value of continuous time series data.

[0042] Preferably, the multi-head attention mechanism in step S21 needs to construct a mapping subspace, specifically:

[0043] The three basic computational elements in the multi-head attention mechanism are query element Q, key element K, and value element V, which are mapped to the semantic subspace as follows:

[0044]

[0045] Among them, W i Q W is the parameter matrix used to map the query element Q to the i-th semantic subspace; i K is the parameter matrix used to map the key element K to the i-th semantic subspace; W i V Q is the parameter matrix used to map the value element V to the i-th semantic subspace; i is the i-th semantic subspace of the query element Q; K i is the i-th semantic subspace of key element K; V i is the i-th semantic subspace of the value element V;

[0046] The attention mechanism in each semantic subspace is:

[0047]

[0048] Among them, head i is the output result of the attention mechanism in the i-th semantic subspace; mask is the causal time parameter; Attention is the attention mechanism function; Softmax is the normalized exponential function; d k is the semantic subspace K i The dimension of the vector; T is the transpose operation.

[0049] Preferably, the position coding in step S22 can make the coding of each attention module unique, and adjacent positions have continuous coding, so that the offshore wind power grid-connected system state probability prediction model can capture the relative relationship between positions.

[0050] Preferably, the state transfer chain data sample is constructed in step S31, specifically:

[0051] In the state transfer chain data X c In the process, the length of L is extracted successively. max For each subsequence, set L max -1 data point as input data sample Input; set L max data points as target data samples Target; the input data samples Input and the target data samples Target constitute the state transfer chain data samples.

[0052] Preferably, in step S4, the number of probability sampling values ​​N is counted s and the number of target probability sampling values ​​n s , specifically including the following sub-steps:

[0053] S41: Output probability of offshore wind power grid-connected system state probability prediction model Sampling each discretization interval, where Represents the probability that the output corresponding to the i-th position falls within the first discretization interval;

[0054] S42: Within the discretization interval, uniform distribution sampling is used to obtain the discretization interval sampling parameters:

[0055]

[0056] in, is the discretization interval sampling parameter; a i is the upper limit of the i-th interval after discretization; b i is the lower limit of the i-th interval after discretization; rand() is a random number between [0,1) generated using uniform distribution;

[0057] S43: Repeat steps S41 and S42 to obtain the number N of probability sampling values s Discretization interval sampling parameters Count the number of target probability sampling values ​​n that fall within the set target interval [c, d] s .

[0058] The second aspect of the present invention proposes a prediction device based on a discrete offshore wind power grid-connected system state probability prediction method, which includes: a data acquisition module, a preprocessing module and a model prediction module;

[0059] The data acquisition module is used to collect real-time continuous data of the offshore wind power grid-connected system;

[0060] The preprocessing module is used to clean the real-time continuous data, replace abnormal data, fill missing data, and construct the real-time continuous data into state transfer chain data using a discretization method;

[0061] The model prediction module is used to input the state transfer chain data into a pre-trained offshore wind power grid-connected system state probability prediction model to obtain the operating state and probability of the offshore wind power grid-connected system at the next moment.

[0062] The third aspect of the present invention proposes a computer-readable storage medium, in which a computer program is stored. When the computer program is running, the device where the computer-readable storage medium is located controls to execute the discrete-based offshore wind power grid-connected system state probability prediction method.

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

[0064] (1) The present invention preprocesses the collected time series continuous data of the output power of the offshore wind farm and discretizes it, discretizing the time series continuous data into time series discrete data; and replaces and supplements the abnormal and missing data, thereby obtaining true and reliable data that can reflect the operation status of the offshore wind power grid-connected system.

[0065] (2) The present invention builds a single causal self-attention module through a multi-head attention mechanism module, layer normalization and residual connection module, uses a combination of sine function and cosine function to generate a unique position code for each data in the time series discrete data to maintain the time series information of the time series discrete data, and finally stacks a single causal self-attention module to construct an offshore wind power grid-connected system state probability prediction model.

[0066] (3) The present invention uses state transfer chain data to train the offshore wind power grid-connected system state probability prediction model, uses the gradient descent method to optimize the parameter matrix of the offshore wind power grid-connected system state probability prediction model, and completes the probability distribution output of the offshore wind power grid-connected system state; completes the offshore wind power grid-connected system state probability prediction according to the probability distribution corresponding to the offshore wind power grid-connected system state; evaluates the offshore wind power system risk and conducts real-time early warning to ensure the safe and reliable operation of the offshore wind power grid-connected system.

[0067] (4) The present invention can accurately extract probability information from the collected time-series continuous data of the offshore wind power grid-connected system and give the confidence level of any interval; while the traditional method based on continuous values, using the mean square error loss function, cannot directly learn the probability information of the data, and when faced with data with strong randomness, it is impossible to obtain the probability result; the interval prediction method can only give an interval with a specified confidence level, and cannot estimate the confidence level of any interval. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 It is a control block diagram of the offshore wind power grid-connected system state probability prediction method based on discretization of the present invention;

[0069] Figure 2 A line graph of the collected raw sea wind data of the present invention;

[0070] Figure 3 It is a local comparison diagram of the discretization of sea breeze data of the present invention;

[0071] Figure 4 This is a comparison diagram of the effects of applying the loss function of the present invention. DETAILED DESCRIPTION

[0072] The exemplary embodiments, features and aspects of the present invention will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0073] The present invention provides a method for predicting the state probability of an offshore wind power grid-connected system based on discretization. Figure 1 As shown, the time series continuous data of the output power of the offshore wind farm is pre-processed, discretized, and the state transfer chain data is constructed; the causal self-attention module is superimposed to construct the state probability prediction model of the offshore wind power grid-connected system; the state transfer chain data is used to train the state probability prediction model of the offshore wind power grid-connected system; according to the probability distribution corresponding to the state of the offshore wind power grid-connected system, the state probability prediction is completed; which includes:

[0074] Step S1: pre-process the time series continuous data of the output power of the offshore wind farm, discretize it, and construct the state transfer chain data.

[0075] like Figure 2 The figure shows a line graph of the collected raw sea wind data of the present invention, which is the actual raw data of a wind farm collected for one year according to an embodiment of the present invention, and the sampling frequency is one power point every 15 minutes.

[0076] Step S11: collect the time series continuous data X of the output power of the offshore wind farm t Preprocessing is performed, which specifically includes the following sub-steps:

[0077] Step S111: Collect the continuous data of power output operation sequence in real time through the monitoring system of the offshore wind farm t =[x1,x2,…,x t ].

[0078] Step S112: Check the collected time-series continuous data, regard the data beyond the preset quantitative measurement range as abnormal data, and replace it with the first data symbol ERROR.

[0079] Step S113: Check the collected time-series continuous data, locate missing data, and use the second data symbol NONE to fill the time-series continuous data.

[0080] The embodiment of the present invention can train abnormal data and missing data in the time series continuous data collected from the offshore wind power grid-connected system together with normal data after simple identification and marking, without further filling. At the same time, the probability prediction model can provide pre-training models for more tasks.

[0081] Step S12: discretize the time series continuous data and determine the discrete level N of the time series continuous data; perform statistical analysis on the collected time series continuous data, draw a data distribution histogram, and mark the maximum value x of the time series continuous data. max and the minimum value x min , determine the discrete series N of time series continuous data as:

[0082]

[0083] Where N is the discrete series of continuous time series data; δ is the width of each discrete interval that does not exceed a given precision; x max is the maximum value of the time series continuous data; x min It is the minimum value of continuous time series data.

[0084] The time series continuous data X t Discretize into time series discrete data X d for:

[0085]

[0086] Among them, x t is an element in the time series continuous data; x d is an element in the time series discrete data; x max is the maximum value of the time series continuous data; x min is the minimum value of time series continuous data; is the rounding down operation; N is the discrete level of time series continuous data; ∈ is the discretization parameter.

[0087] like Figure 3 The figure shows a local comparison diagram of the discretization of the sea breeze data of the present invention, which indicates that there is a slight error after the data is discretized and re-continuized, and this partial error has little effect on the overall data accuracy.

[0088] Step S13: Encode the first data symbol ERROR and the second data symbol NONE into discrete series N and N+1 of time-series continuous data respectively, and obtain the state transfer chain data X c .

[0089] Step S2: superimpose the causal self-attention module to construct a probability prediction model for the offshore wind power grid-connected system state.

[0090] Step S21: Build a single causal self-attention module, including: multi-head attention mechanism and two sub-modules of layer normalization and residual connection; the multi-head attention mechanism requires the construction of a mapping subspace, specifically:

[0091] The three basic computational elements in the multi-head attention mechanism are query element Q, key element K, and value element V, which are mapped to the semantic subspace as follows:

[0092]

[0093] Among them, W i Q W is the parameter matrix used to map the query element Q to the i-th semantic subspace; i K is the parameter matrix used to map the key element K to the i-th semantic subspace; W i V Q is the parameter matrix used to map the value element V to the i-th semantic subspace; i is the i-th semantic subspace of the query element Q; K i is the i-th semantic subspace of key element K; V i is the i-th semantic subspace of the value element V.

[0094] The attention mechanism in each semantic subspace is:

[0095]

[0096] Among them, head i is the output result of the attention mechanism in the i-th semantic subspace; mask is the causal time parameter; Attention is the attention mechanism function; Softmax is the normalized exponential function; d k is the semantic subspace K i The dimension of the vector; T is the transpose operation.

[0097] Then the outputs of multiple subspaces are concatenated to obtain the multi-head attention mechanism submodule:

[0098]

[0099] Among them, MuHe)Q,K,V) is the output of the multi-head attention mechanism submodule; Q is the query element; K is the key element; V is the value element; is the vector concatenation operation; W o is the parameter matrix required for linear transformation after splicing; n is the number of mapping subspaces; head i Output result of the attention mechanism in the i-th semantic subspace, i∈1,2…n.

[0100] The layer normalization and residual connection submodules are:

[0101] out=LaNo(Add(Q+MuHe(Q,K,V)));

[0102] Among them, out is the output of the layer normalization and residual connection submodule; LaNo is the layer normalization function; Add is the residual connection function.

[0103] Step S22: Position-encode each attention module constructed in step S21 to maintain the timing information of the discrete time data; it can also make the encoding of each attention module unique, and adjacent positions have continuous encoding, so that the offshore wind power grid-connected system state probability prediction model can capture the relative relationship between positions.

[0104] Position encoding uses a combination of sine and cosine functions to generate a unique position code for each data in the time series discrete data. The generation method is:

[0105]

[0106] Among them, PE(pos,2j) is the odd position encoding of time series discrete data; PE(pos,2j+1) is the even position encoding of time series discrete data; pos is the extraction position of time series discrete data; j is the dimension index of the offshore wind power grid-connected system state probability prediction model; d model Dimensions of the offshore wind power grid-connected system state probability prediction model.

[0107] Step S23: By stacking the single causal self-attention module in step S21, the learning ability of the offshore wind power grid-connected system state probability prediction model for complex data dynamics is enhanced, and it can process complex information and extract deeper data features, thereby improving the performance and stability of the offshore wind power grid-connected system state probability prediction model.

[0108] According to the time series discrete data X to be processedc The length of the sequence is L max , stack L max A causal self-attention module is used to construct a probability prediction model for the offshore wind power grid-connected system state.

[0109] Step S3: Use the state transition chain data to train the offshore wind power grid-connected system state probability prediction model.

[0110] Step S31: Obtain the state transfer chain data X in step S1 c , construct the state transfer chain data sample, and then divide it into training set data sample and validation set data sample according to 8:2; the construction process of the state transfer chain data sample is: in the state transfer chain data X c In the process, the length of L is extracted successively. max For each subsequence, set L max -1 data point as input data sample Input; set L max data points as target data samples Target; the input data samples Input and the target data samples Target constitute the state transfer chain data samples.

[0111] Step S32: training the offshore wind power grid-connected system state probability prediction model in batches, inputting training set data samples, and using the gradient descent method to optimize the parameter matrix W of the offshore wind power grid-connected system state probability prediction model in step S2 o ; The mixed cross entropy mean square error loss function used is:

[0112]

[0113] Among them, Loss is the mixed cross entropy mean square error loss function; λ is the weight coefficient; is the probability distribution corresponding to the offshore wind power grid-connected system state; y i is the true value of the training set data sample; for y i The value after serialization; for The probability distribution after continuous processing; L max X is the discrete time series data c The length of the sequence.

[0114] like Figure 4 The figure shows the effect comparison of the application loss function of the present invention. It can be seen that after using the hybrid loss function, the convergence speed of the data is significantly accelerated; in the above formula and i They are all one-hot encoding; the specific probability distribution formula after serial processing is:

[0115]

[0116] Among them, argmax() is the index of the maximum value of the matrix;

[0117] Step S33: Use the validation set data samples to verify the prediction accuracy of the offshore wind power grid-connected system state probability prediction model in step S2, and use the test set data samples to predict the state probability of the offshore wind power grid-connected system to determine the probability distribution corresponding to the offshore wind power grid-connected system state.

[0118] Step S4: According to the probability distribution corresponding to the state of the offshore wind power grid-connected system, complete the state probability prediction.

[0119] The probability distribution corresponding to the offshore wind power grid-connected system state in step S3 is obtained as follows: The total number of statistical probability sampling values ​​N s and the number of target probability sampling values ​​n s , specifically including the following sub-steps:

[0120] Step S41: Based on the output probability of the offshore wind power grid-connected system state probability prediction model Sampling each discretization interval, where Represents the probability that the output corresponding to the i-th position falls within the first discretization interval.

[0121] Step S42: Using uniform distribution sampling inside the discretization interval, the sampling parameters of the discretization interval are obtained as follows:

[0122]

[0123] in, is the discretization interval sampling parameter; a i is the upper limit of the i-th interval after discretization; b i is the lower limit of the i-th interval after discretization; rand() uses a uniform distribution to randomly generate random numbers between [0,1).

[0124] Step S43: Repeat steps S41 and S42 to obtain the number of probability sampling values ​​N s Discretization interval sampling parameters Count the number of target probability sampling values ​​n that fall within the set target interval [c, d] s .

[0125] The probability of calculating the target interval of the offshore wind power grid-connected system state is:

[0126]

[0127] Where P is the probability of the target interval of the offshore wind power grid-connected system state; n s is the number of target probability sampling values; N s is the total number of probability sampling values.

[0128] As shown in Table 1, it is a schematic diagram of the predicted network probability output of an embodiment of the present invention, indicating the Tok-5 predicted value and probability of an output location, which can prove that the results of this method in predicting the state probability of offshore wind power grid-connected system are accurate and can meet actual needs.

[0129] Table 1 Top 5 tokens and their probability output results

[0130] Encoded value value Probability / % 24 44.2318 19.14 25 46.2527 19.1216 27 50.2943 13.7265 26 48.2735 9.1949 28 52.3151 9.0475

[0131] The second aspect of the embodiment of the present invention proposes a prediction device based on a discrete offshore wind power grid-connected system state probability prediction method, which includes: a data acquisition module, a preprocessing module and a model prediction module.

[0132] The data acquisition module is used to collect real-time continuous data of the offshore wind power grid-connected system.

[0133] The preprocessing module is used to clean the real-time continuous data, replace abnormal data, fill in missing data, and apply discretization methods to construct the real-time continuous data into state transfer chain data.

[0134] The model prediction module is used to input the state transfer chain data into a pre-trained offshore wind power grid-connected system state probability prediction model to obtain the operating state and probability of the offshore wind power grid-connected system at the next moment.

[0135] A third aspect of an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute a method for predicting the state probability of an offshore wind power grid-connected system.

[0136] The embodiment of the present invention also provides a computer device. The computer device includes: a processor, a memory, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the aforementioned method in the embodiment is implemented. To avoid repetition, it is not described here one by one. Alternatively, when the computer program is executed by the processor, the functions of each model / unit in the device in the embodiment are implemented. To avoid repetition, it is not described here one by one. The computer device is a computing device such as a desktop computer, a notebook, a handheld computer, a server, and a cloud server. The computer device includes, but is not limited to, a processor and a memory. It is understood by those skilled in the art that it includes more or less components than shown in the figure, or combines certain components, or different components, for example, the computer device also includes input and output devices, network access devices, and buses. The processor is a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. A general purpose processor is a microprocessor or the processor can also be any conventional processor. A memory is an internal storage unit of a computer device, such as a hard disk or memory of a computer device. A memory can also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, or a flash card (Flash Card) equipped on a computer device. Further, the memory also includes an internal storage unit of a computer device and an external storage device. The memory is used to store computer programs and other programs and data required by the computer device. The memory can also be used to temporarily store data that has been output or is to be output.

[0137] The present invention has the following beneficial effects: the embodiment of the present invention preprocesses and discretizes the collected time-series continuous data of the output power of the offshore wind farm, and obtains data that can reflect the actual operation status of the offshore wind power grid-connected system; constructs a state probability prediction model of the offshore wind power grid-connected system by stacking single causal self-attention modules, and uses state transfer chain data to train the state probability prediction model of the offshore wind power grid-connected system, completes the optimization of the parameter matrix of the state probability prediction model of the offshore wind power grid-connected system, obtains the probability distribution output of the state of the offshore wind power grid-connected system, and completes the state probability prediction of the offshore wind power grid-connected system; realizes risk assessment and real-time early warning of the offshore wind power system, and through analysis of the embodiments, it can be proved that the present invention can ensure the safe and reliable operation of the offshore wind power grid-connected system.

[0138] The embodiments described above are only descriptions of the preferred implementation modes of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A method for predicting the state probability of offshore wind power grid-connected system based on discretization, characterized in that , which includes the following steps: S1: Preprocess the time series continuous data of the output power of the offshore wind farm, discretize it, and construct the state transfer chain data, which specifically includes the following sub-steps: S11: Collected time series continuous data X of offshore wind farm output power t Perform preprocessing, use the first data symbol ERROR to replace abnormal data, and use the second data symbol NONE to fill missing data; S12: Discretize the time series continuous data, determine the discrete level N of the time series continuous data, and convert the time series continuous data X t Discretize into time series discrete data X d The formula is: Among them, x t is an element in the time series continuous data; x d is an element in the time series discrete data; x max is the maximum value of the time series continuous data; x min is the minimum value of time series continuous data; is the operation of rounding down to an integer; N is the discrete series of time series continuous data; ∈ is the discretization parameter; S13: Encode the first data symbol ERROR and the second data symbol NONE into discrete series N and N+1 of time-series continuous data respectively to obtain state transfer chain data X c ; S2: Superimpose the causal self-attention module to construct the offshore wind power grid-connected system state probability prediction model, which specifically includes the following sub-steps: S21: Build a single causal self-attention module including a multi-head attention mechanism submodule and a layer normalization and residual connection submodule; the multi-head attention mechanism submodule is: Among them, MuHe(Q,K,V) is the output of the multi-head attention mechanism submodule; Q is the query element; K is the key element; V is the value element; is the vector concatenation operation; W o is the parameter matrix required for linear transformation after splicing; n is the number of mapping subspaces; head i Output result of the attention mechanism in the i-th semantic subspace, i∈1,2…n; The layer normalization and residual connection submodules are: out=LaNo(Add(Q+MuHe(Q,K,V))); Among them, out is the output of the layer normalization and residual connection submodule; LaNo is the layer normalization function; Add is the residual connection function; S22: Position encoding is performed on each causal self-attention module constructed in step S21 to maintain the time series information of the discrete time series data; the position encoding uses a combination of a sine function and a cosine function to generate a unique position code for each data in the discrete time series data, and the generation method is: Among them, PE(pos,2j) is the odd position encoding of time series discrete data; PE(pos,2j+1) is the even position encoding of time series discrete data; pos is the extraction position of time series discrete data; j is the dimension index of the offshore wind power grid-connected system state probability prediction model; d model The dimensions of the probability prediction model for offshore wind power grid-connected system status; S23: By stacking the single causal self-attention module in step S21, according to the time series discrete data X to be processed c The length of the sequence is L max , stack L max A causal self-attention module is used to construct a probability prediction model for the offshore wind power grid-connected system state; S3: Using the state transition chain data obtained in step S1 to train the offshore wind power grid-connected system state probability prediction model obtained in step S2, specifically including the following sub-steps: S31: Obtain the state transfer chain data X in step S1 c , construct state transfer chain data samples and divide them into training set data samples and validation set data samples; S32: Train the offshore wind power grid-connected system state probability prediction model in batches, input the training set data samples, and use the gradient descent method to optimize the parameter matrix W of the offshore wind power grid-connected system state probability prediction model in step S2 o ; The mixed cross entropy mean square error loss function used is: Among them, Loss is the mixed cross entropy mean square error loss function; λ is the weight coefficient; is the probability distribution corresponding to the offshore wind power grid-connected system state; y i is the true value of the training set data sample; for y i The value after serialization; for The probability distribution after continuous processing; L max X is the discrete time series data c The length of the sequence; S33: using the validation set data samples to verify the prediction accuracy of the offshore wind power grid-connected system state probability prediction model in step S2, and using the test set data samples to predict the state probability of the offshore wind power grid-connected system, and determine the probability distribution corresponding to the state of the offshore wind power grid-connected system; S4: According to the probability distribution corresponding to the state of the offshore wind power grid-connected system, complete the state probability prediction; The probability distribution corresponding to the offshore wind power grid-connected system state in step S3 is obtained as follows: The total number of statistical probability sampling values ​​N s and the number of target probability sampling values ​​n s , the probability of calculating the target interval of the offshore wind power grid-connected system state is: Where P is the probability of the target interval of the offshore wind power grid-connected system state; n s is the number of target probability sampling values; N s is the total number of probability sampling values.

2. The offshore wind power grid-connected system state probability prediction method based on discretization according to claim 1 is characterized by: In step S11, the collected time series continuous data X of the output power of the offshore wind farm is t Preprocessing is performed, which specifically includes the following sub-steps: S111: Through the monitoring system of offshore wind farms, real-time continuous data on power output operation sequence is collected t =[x1,x2,…,x t ]; S112: Check the collected time series continuous data, regard the data beyond the preset quantitative measurement range as abnormal data, and replace it with the first data symbol ERROR; S113: Check the collected time-series continuous data, locate missing data, and use the second data symbol NONE to fill the time-series continuous data.

3. The method for predicting the state probability of an offshore wind power grid-connected system based on discretization according to claim 1 is characterized by: In step S12, the discrete level N of the time series continuous data is determined, specifically: Perform statistical analysis on the collected time series continuous data, draw a data distribution histogram, and mark the maximum value x of the time series continuous data max and the minimum value x min , determine the discrete series N of time series continuous data as: Where N is the discrete series of continuous time series data; δ is the width of each discrete interval that does not exceed a given precision; x max is the maximum value of the time series continuous data; x min It is the minimum value of continuous time series data.

4. The method for predicting the state probability of an offshore wind power grid-connected system based on discretization according to claim 1 is characterized in that: The multi-head attention mechanism in step S21 requires the construction of a mapping subspace, specifically: The three basic computational elements in the multi-head attention mechanism are query element Q, key element K, and value element V, which are mapped to the semantic subspace as follows: Among them, W i Q W is the parameter matrix used to map the query element Q to the i-th semantic subspace; i K is the parameter matrix used to map the key element K to the i-th semantic subspace; W i V Q is the parameter matrix used to map the value element V to the i-th semantic subspace; i is the i-th semantic subspace of the query element Q; K i is the i-th semantic subspace of key element K; V i is the i-th semantic subspace of the value element V; The attention mechanism in each semantic subspace is: Among them, head i is the output result of the attention mechanism in the i-th semantic subspace; mask is the causal time parameter; Attention is the attention mechanism function; Softmax is the normalized exponential function; d k is the semantic subspace K i The dimension of the vector; T is the transpose operation.

5. The method for predicting the state probability of an offshore wind power grid-connected system based on discretization according to claim 1 is characterized in that: In step S31, a state transfer chain data sample is constructed, specifically: In the state transfer chain data X c In the process, the length of L is extracted successively. max For each subsequence, set L max -1 data point as input data sample Input; set L max data points as target data samples Target; the input data samples Input and the target data samples Target constitute the state transfer chain data samples.

6. The offshore wind power grid-connected system state probability prediction method based on discretization according to claim 1 is characterized by: The number of statistical probability sampling values ​​N in step S4 s and the number of target probability sampling values ​​n s , specifically including the following sub-steps: S41: Output probability of offshore wind power grid-connected system state probability prediction model Sampling each discretization interval, where Represents the probability that the output corresponding to the i-th position falls within the first discretization interval; S42: Within the discretization interval, uniform distribution sampling is used to obtain the discretization interval sampling parameters: in, is the discretization interval sampling parameter; a i is the upper limit of the i-th interval after discretization; b i is the lower limit of the i-th interval after discretization; rand() is a random number between [0,1) generated using uniform distribution; S43: Repeat steps S41 and S42 to obtain the number N of probability sampling values s Discretization interval sampling parameters Count the number of target probability sampling values ​​n that fall within the set target interval [c, d] s .

7. A prediction device according to any one of claims 1 to 6, characterized in that: It includes: Data acquisition module, preprocessing module and model prediction module; The data acquisition module is used to collect real-time continuous data of the offshore wind power grid-connected system; The preprocessing module is used to clean the real-time continuous data, replace abnormal data, fill missing data, and construct the real-time continuous data into state transfer chain data using a discretization method; The model prediction module is used to input the state transfer chain data into a pre-trained offshore wind power grid-connected system state probability prediction model to obtain the operating state and probability of the offshore wind power grid-connected system at the next moment.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed, controls the device where the computer-readable storage medium is located to execute the discrete-time offshore wind power grid-connected system state probability prediction method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multi-head self-attention offshore wind power ultra-short time power prediction method of integrated lifting mode

    CN116050621A

  • Capacitance compensation optimization system and method for short-time power fluctuation in wind power plant

    CN117674179A

  • Generative adversarial multi-head attention neural network self-learning method for aero-engine data reconstruction

    WO2024087129A1

Cited By

  • Multi-task risk assessment method for offshore wind power grid-connected system

    CN119539490A

  • A multi-task risk assessment method for offshore wind power grid-connected system

    CN119539490B

  • Multi-task risk assessment method for sea wind grid-connected system based on human feedback reinforcement learning

    CN119647945A