Abnormality detection method for distributed power supply access unit
By constructing simulation models and LSTM models of photovoltaic inverters, the problem of high cost of anomaly detection in distributed power supply access units is solved, achieving efficient and low-complexity anomaly detection that is adaptable to multiple communication protocols.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGXIA LGG INSTR CO LTD
- Filing Date
- 2024-08-30
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, anomaly detection of distributed power access units relies on custom hardware, which leads to high costs and increased system complexity, making it difficult to adapt to diverse communication protocols.
A simulation model of a photovoltaic inverter is constructed, and feature vectors are trained using an LSTM model. Through consistency testing of data read by the distributed power supply access unit and the host computer, abnormal states of inverter data and on/off control are determined, reducing reliance on hardware equipment.
It reduces the cost and system complexity of anomaly detection, improves detection efficiency and scalability to adapt to new protocols, and ensures system stability and high performance.
Smart Images

Figure CN119106381B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic equipment testing technology, and in particular to an anomaly detection method for distributed power supply access units. Background Technology
[0002] With the continuous growth of global demand for renewable energy, photovoltaic (PV) power generation, as a clean and sustainable energy solution, is rapidly expanding in both scope and scale. As a key component of PV power generation systems, PV inverters are responsible for converting the direct current (DC) generated by solar panels into alternating current (AC) for grid use or direct power supply to end users. However, due to the existence of numerous PV inverter manufacturers in the market, each manufacturer may employ different communication protocols to enable the inverter to interact with the grid or other smart devices, leading to protocol diversity and complexity.
[0003] This diversity of protocols is particularly prominent in distributed generation (DG) grid-connected units (GRPs). GRPs need to be able to communicate effectively with photovoltaic (PV) inverters using various different protocols to monitor, control, and optimize power generation. However, due to the complexity and variety of communication protocols used or compatible with inverters, GRPs can easily malfunction. In practice, a GRP may not fully meet or adapt to the various communication protocols of the connected inverter system, potentially leading to communication difficulties between the inverter and the grid. Therefore, it is necessary to test the communication conversion function of the GRP to ensure that it can perform communication conversion correctly and accurately, thereby guaranteeing the stable operation and high efficiency of the PV system.
[0004] Traditional anomaly detection for distributed power supply units often relies on customizing hardware for each communication protocol. However, due to the diverse and complex range of communication protocols compatible with and applicable to inverters, customizing hardware for each protocol is costly and increases system complexity. Furthermore, with the continuous addition of new protocols, the cost of detection and system complexity will only increase further. Summary of the Invention
[0005] In view of this, and to address the above shortcomings, it is necessary to propose an anomaly detection method for distributed power supply access units in order to reduce the anomaly detection cost and system complexity of distributed power supply access units.
[0006] In a first aspect, the present invention provides an anomaly detection method for a distributed power supply access unit, the anomaly detection method comprising:
[0007] A simulation model of a photovoltaic inverter is pre-built; wherein the simulation model includes at least two types of photovoltaic inverters, and each type of photovoltaic inverter corresponds to a communication protocol;
[0008] The simulation model is read using a distributed power supply access unit;
[0009] For each type of photovoltaic inverter, based on the consistency between the photovoltaic inverter data read from the simulation model using the distributed power access unit and the corresponding photovoltaic inverter data directly read from the host computer, the inverter data and inverter on / off control of the distributed power access unit are tested.
[0010] Based on the inverter data and inverter on / off control test results of the distributed power access unit for various types of photovoltaic inverters, the abnormal state of the distributed power access unit is determined.
[0011] Preferably, the pre-built simulation model of the photovoltaic inverter includes:
[0012] Through the main station system, historical photovoltaic inverter data of at least two types of photovoltaic inverters over a period of time is collected from the photovoltaic grid.
[0013] The historical photovoltaic inverter data is preprocessed to obtain preprocessed photovoltaic inverter data;
[0014] The preprocessed photovoltaic inverter data is used to construct features to obtain a time series feature vector;
[0015] Based on the LSTM model, iterative training is performed using the time series feature vectors and communication protocol to obtain a simulation model containing at least two types of photovoltaic inverters.
[0016] Preferably, the step of collecting historical photovoltaic inverter data from the photovoltaic grid for at least two types of photovoltaic inverters over a period of time via the master station system includes:
[0017] The main station system sends a data acquisition command to the concentrator, which then sends the command to the target photovoltaic inverter from which historical photovoltaic inverter data is to be acquired. The historical photovoltaic inverter data includes: voltage, current, power, temperature, and messages.
[0018] in,
[0019] After receiving the data acquisition instruction, the target photovoltaic inverter packages the historical photovoltaic inverter data into a data frame and sends the data frame to the master station system; wherein, the data frame includes a data header and the actual data, and the data header includes a CRC check code obtained by processing all the data;
[0020] After receiving the data frame, the master station system parses the data and verifies the CRC checksum; and obtains the corresponding historical photovoltaic inverter data from the data frame with successful CRC verification.
[0021] Preferably, the feature construction of the preprocessed photovoltaic inverter data includes:
[0022] For each type of photovoltaic inverter, for each type of historical photovoltaic inverter data, the data identifier of the historical photovoltaic inverter data is combined with the corresponding logical address to obtain the combined feature;
[0023] By utilizing the combined characteristics of various historical photovoltaic inverters under the same photovoltaic inverter, a feature vector is constructed to obtain the time series feature vector corresponding to the photovoltaic inverter.
[0024] Preferably, the LSTM-based model is iteratively trained using the time-series feature vectors and the communication protocol, including:
[0025] Initialize the input gate, output gate, forget gate, and cell states;
[0026] Forward propagation calculation is performed by sequentially calculating the activation values of the input gate, forget gate, and output gate using the time series feature vector;
[0027] The model is trained by calculating the gradient of the loss function with respect to the network parameters based on the backpropagation algorithm, and a preliminary simulation model is obtained.
[0028] The primary simulation model is subjected to reliability testing to obtain the simulation model.
[0029] Preferably, the activation value of the input gate is calculated using the following formula:
[0030] i t =σ(W xi ·X t +W hi ·h t-1 +W ci ·C t-1 +b i )
[0031] Among them, i t Let W be the activation value of the input gate, σ(·) be the activation function, and W be the activation value of the input gate. xi X is the time series feature vector t The weight matrix W to the input gate hi The hidden state h of the previous time step t-1 The weight matrix W to the input gate ci The cell state C of the previous time step t-1 The weight matrix to the input gate, b i This is the bias term for the input gate;
[0032] The activation value of the forget gate is calculated using the following formula:
[0033] f t =σ(W xf ·X t +W hf ·h t-1 +W cf ·C t-1 +b f )
[0034] Among them, f t W is the activation value of the forget gate. xf The hidden state X of the previous time step t The weight matrix W for the forget gate hf The hidden state h of the previous time step t-1 The weight matrix W for the forget gate cf The cell state C of the previous time step t-1 The weight matrix to the forget gate, b f For the bias term of the forget gate;
[0035] The activation value of the output gate is calculated using the following formula:
[0036] o t =σ(W xo ·X t +W ho ·h t-1 +W co ·C t-1 +b o )
[0037] Among them, o t W is the activation value of the output gate. xo The hidden state X of the previous time step t The weight matrix W to the output gate ho The hidden state h of the previous time step t-1 The weight matrix W to the output gate co The cell state C of the previous time step t-1 The weight matrix to the output gate, b o This is the bias term for the output gate.
[0038] Preferably, the step of testing the inverter data of the distributed power access unit based on the consistency between the photovoltaic inverter data read from the simulation model by the distributed power access unit and the corresponding photovoltaic inverter data directly read from the host computer includes:
[0039] Step S301: Using the distributed power access unit, read the first inverter data of the first photovoltaic inverter among the at least two types of photovoltaic inverters from the simulation model;
[0040] Step S302: Use the host computer to directly read the second inverter data of the first photovoltaic inverter;
[0041] Step S303: Determine whether the data from the first inverter and the data from the second inverter are consistent;
[0042] Step S304: If the data of the first inverter and the data of the second inverter are consistent, then proceed to step S305; otherwise, the distributed power access unit fails to test the data of the first photovoltaic inverter.
[0043] Step S305: Use the distributed power access unit to modify the inverter parameters of the first photovoltaic inverter to the test inverter data;
[0044] Step S306: Use the host computer to directly read the third inverter data of the first photovoltaic inverter;
[0045] Step S307: Determine whether the data of the third inverter is consistent with the data of the test inverter;
[0046] Step S308: If the data of the third inverter is consistent with the data of the test inverter, the distributed power access unit has successfully tested the data of the first photovoltaic inverter; otherwise, it has failed.
[0047] Preferably, the test of the inverter on / off control of the distributed power access unit based on the consistency between the photovoltaic inverter data read from the simulation model by the distributed power access unit and the corresponding photovoltaic inverter data directly read by the host computer includes:
[0048] Step S309: Use the distributed power access unit to control the first photovoltaic inverter to start up;
[0049] Step S310: Directly read the first operating status of the first photovoltaic inverter using the host computer;
[0050] Step S311: Determine whether the first operating state is the power-on state;
[0051] Step S312: If the first operating state is the power-on state, then execute step S313; otherwise, the distributed power access unit fails the power-on / off control test for the first photovoltaic inverter.
[0052] Step S313: Use the distributed power access unit to control the first photovoltaic inverter to shut down;
[0053] Step S314: Directly read the second operating status of the first photovoltaic inverter using the host computer;
[0054] Step S315: Determine whether the second operating state is a power-off state;
[0055] Step S316: If the second operating state is the shutdown state, the power supply access unit successfully performs the power-on / off control test on the first photovoltaic inverter; otherwise, it fails.
[0056] Preferably, determining the abnormal state of the distributed power access unit based on the inverter data and inverter on / off control test results for each type of photovoltaic inverter includes:
[0057] For any type of photovoltaic inverter, if at least one of the tests conducted by the distributed power access unit (DPU) for that type of photovoltaic inverter—the inverter data test and the inverter power-on / off control test—fails, then there is an anomaly in the communication between the DPU and that type of photovoltaic inverter.
[0058] In a second aspect, the present invention also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements any of the methods described in the first aspect.
[0059] As described in the above technical solution, when detecting anomalies in the distributed power access unit, this solution first pre-constructs a simulation model of the photovoltaic inverter. This simulation model can simulate at least two types of photovoltaic inverters, and each type of photovoltaic inverter corresponds to a communication protocol. Then, the distributed power access unit reads the simulation model. Furthermore, for each type of photovoltaic inverter, based on the consistency between the inverter data indirectly read by the distributed power access unit and the inverter data directly read by the host computer, the inverter data and inverter on / off control of the distributed power access unit are tested. The abnormal state of the distributed power access unit can then be determined based on the test results. Therefore, this solution constructs a simulation model capable of simulating photovoltaic inverters of various communication protocol types. Then, for each type of photovoltaic inverter simulated by the simulation model, the inverter data and inverter on / off control are tested. This allows it to determine whether the photovoltaic inverter of the corresponding data type can communicate normally with the distributed power access unit, i.e., whether the distributed power access unit is compatible with the communication protocol of the corresponding photovoltaic inverter, thereby determining whether the distributed power access unit has a communication anomaly corresponding to a certain communication protocol. Therefore, this solution eliminates the need for customized hardware for each communication protocol, significantly reducing the cost of anomaly detection in distributed power supply units. Furthermore, since this solution can be implemented on a single computing device, adding a simulation model to recognize new protocol types only requires adjusting the model's recognition type, without increasing the complexity of the detection system. Thus, this solution effectively reduces the cost and system complexity of anomaly detection in distributed power supply units. Attached Figure Description
[0060] Figure 1 This is a flowchart of an anomaly detection method for a distributed power access unit provided in an embodiment of the present invention. Detailed Implementation
[0061] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] like Figure 1 As shown, the present invention provides an anomaly detection method for a distributed power supply access unit, which may include the following steps:
[0063] Step 1: Pre-build a simulation model of the photovoltaic inverter; wherein the simulation model includes at least two types of photovoltaic inverters, and each type of photovoltaic inverter corresponds to a communication protocol;
[0064] Step 2: Use the distributed power supply access unit to read the simulation model;
[0065] Step 3: For each type of photovoltaic inverter, based on the consistency between the photovoltaic inverter data read from the simulation model using the distributed power access unit and the corresponding photovoltaic inverter data read directly from the host computer, test the inverter data and inverter on / off control of the distributed power access unit.
[0066] Step 4: Based on the inverter data and inverter on / off control test results of the distributed power access unit for various types of photovoltaic inverters, determine the abnormal state of the distributed power access unit.
[0067] In this embodiment, a simulation model of a photovoltaic (PV) inverter containing various communication protocol types was constructed. Then, tests were performed on the inverter data and inverter on / off control for each PV inverter simulated by the model, thereby determining whether the PV inverter of the corresponding data type can communicate normally with the distributed power access unit (DPU), i.e., whether the DPU is compatible with the corresponding PV inverter's communication protocol. This allows for the determination of whether the DPU exhibits communication anomalies for a particular communication protocol. This solution eliminates the need to customize corresponding hardware for each communication protocol, significantly reducing the cost of DPU anomaly detection. Furthermore, since this solution can be implemented on a single computing device, adding new protocol types only requires increasing the simulation model's recognition type, without increasing the complexity of the detection system. Therefore, this solution solves the problem of high testing costs and low testing efficiency caused by the need for multiple PV inverter hardware sets when verifying the protocol adaptability of DPUs. Moreover, this solution ensures scalability for adding PV inverters with new communication protocols.
[0068] For step 1, a simulation model of the photovoltaic inverter is pre-built;
[0069] Since different inverters adapt to or support different communication protocols, and the distributed power access unit (DPU) acts as a device for converting the inverter's communication protocol and interacting with it, it must be compatible with various communication protocols supported by different inverters. However, testing the DPU's compatibility with various inverter communication protocols is costly due to the large number of protocols available, requiring customized hardware for each protocol. Furthermore, the cost and system complexity increase with the addition of new protocols. Therefore, this step considers constructing a simulation model of photovoltaic (PV) inverters. This model should be able to simulate at least two types of PV inverters, each corresponding to a specific communication protocol. By using this simulation model to simulate PV inverters with various communication protocols, the DPU can be tested for compatibility by verifying its ability to communicate normally with the PV inverter using that protocol. This process helps determine if the DPU has any communication protocol compatibility issues.
[0070] Specifically, step 1, when pre-constructing the simulation model of the photovoltaic inverter, may include the following steps:
[0071] Step S101: Collect historical photovoltaic inverter data for at least two types of photovoltaic inverters from the photovoltaic grid over a certain period of time through the main station system;
[0072] Step S102: Preprocess the historical photovoltaic inverter data to obtain preprocessed photovoltaic inverter data;
[0073] Step S103: Perform feature construction on the preprocessed photovoltaic inverter data to obtain a time series feature vector;
[0074] Step S104: Based on the LSTM model, iterative training is performed using time series feature vectors and communication protocols to obtain a simulation model containing at least two types of photovoltaic inverters.
[0075] For step S101, when collecting historical photovoltaic inverter data of at least two types of photovoltaic inverters over a period of time from the photovoltaic grid through the main station system, it can be achieved in the following way:
[0076] The main station system sends a data acquisition command to the concentrator, which then sends the command to the target photovoltaic inverter from which historical photovoltaic inverter data is to be acquired. The historical photovoltaic inverter data includes: voltage, current, power, temperature, and messages.
[0077] in,
[0078] After receiving the data acquisition command, the target photovoltaic inverter packages the historical photovoltaic inverter data into a data frame and sends the data frame to the master station system. The data frame includes a data header and the actual data. The data header includes a CRC checksum obtained by processing all the data.
[0079] After receiving the data frame, the master station system parses the data and verifies the CRC checksum; and retrieves the corresponding historical photovoltaic inverter data from the data frame with successful CRC verification.
[0080] In this embodiment, the master station sends an information frame containing a request to execute a task to the concentrator. The concentrator then distributes the request to the IoT meter equipped with the photovoltaic interaction module, and finally sends a command to the photovoltaic inverter. Upon receiving the command, the photovoltaic inverter reports key parameters such as voltage, current, power, temperature, and message information to the master station. Specifically, after receiving the command, the photovoltaic inverter first collects its operating status and performance data, and then packages the collected data into a data frame. This data frame includes a header and the actual data. The header typically contains metadata such as frame length, type, and CRC checksum. Further, within the header, the inverter calculates the CRC checksum, which is obtained by performing specific mathematical operations on all data in the data frame to ensure data integrity during transmission. The inverter then sends the data frame containing the header and actual data to the master station. This process is completed through a communication protocol, ensuring accurate data transmission. After receiving the data uploaded by the photovoltaic inverter, the master station first needs to parse the received data frame, which typically involves removing the header to read the contained actual data information. The CRC checksum in the data header can verify and detect errors that may occur during data transmission; therefore, the CRC checksum in the data header is checked first. If the CRC check fails, it indicates that the data frame may have been corrupted during transmission, and the master station will ignore this data frame. If the CRC check succeeds, the actual data in the data frame can be extracted as historical photovoltaic inverter data.
[0081] For step S102, it considers preprocessing the historical photovoltaic inverter data to obtain preprocessed photovoltaic inverter data. For example, the data of the photovoltaic inverter under the working state is visualized and analyzed, and data cleaning technology is used to transform the data to a uniform scale by means of Z-score standardization and min-max normalization.
[0082] For step S103, consider constructing features from the preprocessed photovoltaic inverter data to obtain a time-series feature vector. Specifically, this can be achieved as follows:
[0083] For each type of photovoltaic inverter, for each type of historical photovoltaic inverter data, the data identifier of the historical photovoltaic inverter data is combined with the corresponding logical address to obtain the combined feature;
[0084] By utilizing the combined characteristics of various historical photovoltaic inverters under the same photovoltaic inverter, a feature vector is constructed to obtain the time series feature vector corresponding to the photovoltaic inverter.
[0085] In this embodiment, the preprocessed historical photovoltaic inverter data is enhanced by feature construction and combination. In the protocol parsing, the OI data identifier of the data packet is combined with the corresponding logical address to identify the specific communication protocol.
[0086] For example, the data identifier OI for reading inverter voltage is 40060200, and the corresponding logical address is 0x60003. Combined, this forms the feature {0x60003, 40060200}, representing the read inverter voltage command corresponding to that logical address. Further, a time series feature vector X_t = [V_t, I_t, P_t, T_t, S_t…] is constructed, where V_t is the voltage at time t, I_t is the current at time t, P_t is the power at time t, T_t is the temperature at time t, and S_t is the logical address, etc.
[0087] Furthermore, the time series feature vectors can be further standardized.
[0088] For step S104, it considers using an LSTM model, employing the obtained time-series feature vectors and communication protocols for iterative training, to obtain a simulation model capable of simulating at least two types of photovoltaic inverters. Specifically, step S104 can be implemented as follows:
[0089] Initialize the input gate, output gate, forget gate, and cell states;
[0090] Forward propagation calculations are performed by sequentially calculating the activation values of the input gate, forget gate, and output gate using time series feature vectors.
[0091] The model is trained by calculating the gradient of the loss function with respect to the network parameters based on the backpropagation algorithm, and a preliminary simulation model is obtained.
[0092] The initial simulation model is subjected to reliability testing to obtain the final simulation model.
[0093] In this embodiment, when training the simulation model based on LSTM, the parameters are first initialized, such as the input gate, output gate, forget gate, and unit states, etc., to initialize each parameter in the model to constants, and then forward propagation is performed. During forward propagation, the activation value of the input gate can be calculated using i. t =σ(Wxi ·X t +W hi ·h t-1 +W ci ·C t-1 +b i The result is obtained through calculation. Where i t Let W be the activation value of the input gate, σ(·) be the activation function, and W be the activation value of the input gate. xi X is the time series feature vector t The weight matrix W to the input gate hi The hidden state h of the previous time step t-1 The weight matrix W to the input gate ci The cell state C of the previous time step t-1 The weight matrix to the input gate, b i This is the bias term for the input gate; at each moment, the information input from the input layer first passes through the input gate, and the opening and closing of the input gate determines whether information will be input into the memory cell at that moment.
[0094] When calculating the activation value of the forget gate, it can be done through f t =σ(W xf ·X t +W hf ·h t-1 +W cf ·C t-1 +b f The result is obtained through calculation. Where f t W is the activation value of the forget gate. xf The hidden state X of the previous time step t The weight matrix W for the forget gate hf The hidden state h of the previous time step t-1 The weight matrix W for the forget gate cf The cell state C of the previous time step t-1 The weight matrix to the forget gate, b f This is the bias term of the forget gate; at any given moment, the value in the memory cell will undergo a process of whether it is forgotten, which is controlled by this gate. If the memory cell is forgotten, the value will be cleared.
[0095] When calculating the activation value of the output gate, it can be done through o t =σ(W xo ·X t +W ho ·h t-1 +W co ·C t-1 +b o ) is calculated. Where, o t W is the activation value of the output gate. xoThe hidden state X of the previous time step t The weight matrix W to the output gate ho The hidden state h of the previous time step t-1 The weight matrix W to the output gate co The cell state C of the previous time step t-1 The weight matrix to the output gate, b o This is the bias term for the output gate. Whether information is output from the memory cell at any given moment depends on the output gate. The whole process involves first passing through the input gate to see if there is any information input, then determining whether the forget gate should select to forget the information in the memory cell, and finally passing through the output gate to determine whether to output the information at this moment.
[0096] Similar to traditional RNNs, LSTM networks rely on backpropagation to calculate the gradient of the loss function with respect to the network parameters during training. However, the gate units in LSTMs increase the complexity of gradient calculation. To address this, weighted backpropagation can be used. This method enhances the influence of the gate unit's gradient on the overall gradient by adjusting the weights of the gate unit's gradient. Specifically, the output of the gate unit is multiplied by its input to generate a weight factor, which is then applied to the gradient of the gate unit. This effectively simplifies the gradient calculation process in LSTM networks.
[0097] Furthermore, the validation set can be used to test the reliability of the trained LSTM model, and a new photovoltaic inverter whose data was not used in the training LSTM model can be connected to it, so as to continuously optimize and improve the model.
[0098] For step 2, the simulation model is read using the distributed power supply access unit;
[0099] After training the simulation model, we consider using transfer learning to dynamically switch the photovoltaic inverter communication protocol based on the trained LSTM model and software, thereby simulating the real installation scenario of the distributed power access unit.
[0100] For step 3, for each type of photovoltaic inverter, based on the consistency between the photovoltaic inverter data read from the simulation model by the distributed power access unit and the corresponding photovoltaic inverter data directly read by the host computer, the inverter data and inverter on / off control of the distributed power access unit are tested.
[0101] In this step, we will test the interaction of the distributed power supply access unit with the inverter data and the control of the inverter's on / off state.
[0102] When testing the inverter data of a distributed power supply unit, the following steps may be included:
[0103] Step S301: Using the distributed power supply access unit, read the first inverter data of the first photovoltaic inverter in at least two types of photovoltaic inverters from the simulation model;
[0104] Step S302: Use the host computer to directly read the second inverter data of the first photovoltaic inverter;
[0105] Step S303: Determine whether the data from the first inverter and the data from the second inverter are consistent;
[0106] Step S304: If the data of the first inverter and the data of the second inverter are consistent, then proceed to step S305; otherwise, the distributed power access unit fails to test the data of the first photovoltaic inverter.
[0107] Step S305: Use the distributed power supply access unit to modify the inverter parameters of the first photovoltaic inverter to the test inverter data;
[0108] Step S306: Use the host computer to directly read the third inverter data of the first photovoltaic inverter;
[0109] Step S307: Determine whether the data from the third inverter is consistent with the data from the test inverter;
[0110] Step S308: If the data of the third inverter is consistent with the data of the test inverter, the distributed power access unit has successfully tested the data of the first photovoltaic inverter; otherwise, it has failed.
[0111] In this embodiment, the simulation model can simulate the current photovoltaic inverter. After the simulated photovoltaic inverter is connected to the distributed power access unit (DPU), the DPU reads the inverter data of the photovoltaic inverter, and it can also directly read the inverter data of the photovoltaic inverter through the host computer. If the inverter data read through the DPU and the inverter data directly read by the host computer are consistent, it indicates that the current photovoltaic inverter can perform normal data interaction with the DPU; if they are inconsistent, it indicates that the DPU cannot adapt to the communication protocol of the current photovoltaic inverter, and the two cannot perform normal data interaction, thus the inverter data test of the DPU fails.
[0112] When the inverter data read through the distributed power access unit (DPU) is consistent with the inverter data read directly from the host computer, the DPU is used to further modify the inverter parameters of the photovoltaic inverter to the test inverter data. Then, the host computer is used again to directly read the third inverter data of the photovoltaic inverter. If the read third inverter data is consistent with the modified test inverter data, it means that the parameters of the photovoltaic inverter can be adjusted through the DPU, and the test is successful. However, if the read third inverter data is inconsistent with the modified test inverter data, it means that the parameters of the photovoltaic inverter cannot be adjusted through the DPU, indicating a communication protocol compatibility issue, and the test fails.
[0113] When testing the inverter switching control of a distributed power supply unit, the following steps may be included:
[0114] Step S309: Use the distributed power supply access unit to control the first photovoltaic inverter to start up;
[0115] Step S310: Directly read the first operating status of the first photovoltaic inverter using the host computer;
[0116] Step S311: Determine whether the first running state is the power-on state;
[0117] Step S312: If the first operating state is the power-on state, then execute step S313; otherwise, the power supply access unit fails the power-on / off control test for the first photovoltaic inverter.
[0118] Step S313: Use the distributed power supply access unit to control the first photovoltaic inverter to shut down;
[0119] Step S314: Directly read the second operating status of the first photovoltaic inverter using the host computer;
[0120] Step S315: Determine whether the second operating state is the power-off state;
[0121] Step S316: If the second operating state is the shutdown state, the power supply access unit's power-on / off control test for the first photovoltaic inverter is successful; otherwise, it is unsuccessful.
[0122] In this embodiment, after testing the inverter data of the distributed power supply access unit, the power supply access unit's control over the inverter's on / off operation can also be tested. Specifically, the distributed power supply access unit can control the photovoltaic inverter to start up, and then the host computer can directly read the operating status of the photovoltaic inverter. By determining whether the operating status read by the host computer is "on," it can be determined whether the distributed power supply access unit can normally control the current photovoltaic inverter's start-up. Furthermore, if the start-up test is successful, the shutdown test is then performed.
[0123] It should be noted that inverter data testing and inverter power-on / off testing can not only be performed simultaneously to determine the abnormal state of the distributed power supply access unit, but in some embodiments, only one of the two can be tested.
[0124] For step 104, based on the inverter data and inverter on / off control test results of the distributed power access unit for each type of photovoltaic inverter, the abnormal state of the distributed power access unit is determined.
[0125] In this step, after completing the tests on inverter data and inverter on / off control for various types of photovoltaic inverters, the abnormal state of the distributed power access unit is determined based on the test results. Specifically, for any type of photovoltaic inverter, if at least one of the tests—the inverter data test and the inverter on / off control test—fails, then the distributed power access unit's communication with that type of photovoltaic inverter is abnormal.
[0126] In this embodiment, if the inverter data test or inverter power-on / off control test of a certain type of photovoltaic inverter fails, it indicates that the distributed power access unit cannot effectively adapt to the communication protocol corresponding to the photovoltaic inverter, thus indicating that the distributed power access unit has an anomaly of being unable to adapt to this communication protocol.
[0127] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the methods in any of the embodiments of the specification.
[0128] This specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any of the embodiments of the specification.
[0129] In summary, the anomaly detection method for a distributed power supply access unit provided by this invention has at least the following beneficial effects:
[0130] 1. This solution utilizes an LSTM deep learning model to effectively process sequential data such as voltage, current, and power, and capture time dependencies, thereby more accurately simulating various types of photovoltaic inverters. Feature enhancement and data preprocessing operations help improve data quality, thus enhancing the model's predictive ability and detection efficiency.
[0131] 2. Generally, adaptive anomaly detection for distributed power supply (DPSU) units involves preparing multiple types of photovoltaic inverters and other hardware devices, which is complex and difficult to implement, leading to inaccurate anomaly detection results. This solution uses LSTM deep learning to train a simulation model and utilizes various simulated photovoltaic inverters to test DPSU units. By combining hardware and software, it reduces hardware costs and testing time, and improves testing efficiency.
[0132] 3. This solution enables transfer learning, which improves the speed and accuracy of the simulation model's adaptation to new protocols and ensures the system's scalability.
[0133] 4. Compared with the LSTM algorithm commonly used for fault diagnosis, the GRU in this scheme reduces two gating signals, lowers computational complexity, and improves the real-time performance of model anomaly detection.
[0134] 5. This solution can archive and analyze detected abnormal data, generate statistical reports and improvement suggestions, which helps to continuously optimize the system and improve overall performance and reliability.
[0135] The device embodiments provided by the present invention are based on the same inventive concept as the method embodiments in this specification. For details, please refer to the description in the method embodiments of this specification, which will not be repeated here.
[0136] The modules or units in the device of this invention can be merged, divided, and deleted according to actual needs. The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the processes of the above embodiments and making equivalent changes according to the claims of this invention still fall within the scope of the invention.
Claims
1. A method for anomaly detection in a distributed power supply access unit, characterized in that, The anomaly detection method includes: A simulation model of a photovoltaic inverter is pre-built; wherein the simulation model includes at least two types of photovoltaic inverters, and each type of photovoltaic inverter corresponds to a communication protocol; The simulation model is read using a distributed power supply access unit; For each type of photovoltaic inverter, based on the consistency between the photovoltaic inverter data read from the simulation model using the distributed power access unit and the corresponding photovoltaic inverter data directly read from the host computer, the inverter data of the distributed power access unit is tested, and the inverter on / off control is tested based on the operating status of the photovoltaic inverter read from the host computer. Based on the test results of inverter data and inverter on / off control for various types of photovoltaic inverters by the distributed power access unit, the abnormal state of the distributed power access unit is determined. The pre-built simulation model of the photovoltaic inverter includes: Through the main station system, historical photovoltaic inverter data of at least two types of photovoltaic inverters over a period of time is collected from the photovoltaic grid. The historical photovoltaic inverter data is preprocessed to obtain preprocessed photovoltaic inverter data; The preprocessed photovoltaic inverter data is used to construct features to obtain a time series feature vector; Based on the LSTM model, the simulation model containing at least two types of photovoltaic inverters is obtained by iterative training using the time series feature vectors.
2. The anomaly detection method for a distributed power supply access unit according to claim 1, characterized in that, The process of collecting historical photovoltaic inverter data from the photovoltaic grid for at least two types of photovoltaic inverters over a period of time via the main station system includes: The main station system sends a data acquisition command to the concentrator, which then sends the command to the target photovoltaic inverter from which historical photovoltaic inverter data is to be acquired. The historical photovoltaic inverter data includes: voltage, current, power, temperature, and messages. in, After receiving the data acquisition instruction, the target photovoltaic inverter packages the historical photovoltaic inverter data into a data frame and sends the data frame to the master station system; wherein, the data frame includes a data header and the actual data, and the data header includes a CRC check code obtained by processing all the data; After receiving the data frame, the master station system parses the data and verifies the CRC checksum; and obtains the corresponding historical photovoltaic inverter data from the data frame with successful CRC verification.
3. The anomaly detection method for a distributed power supply access unit according to claim 1, characterized in that, The feature construction of the preprocessed photovoltaic inverter data includes: For each type of photovoltaic inverter, for each type of historical photovoltaic inverter data, the data identifier of the historical photovoltaic inverter data is combined with the corresponding logical address to obtain the combined feature; By utilizing the combined characteristics of various historical photovoltaic inverters under the same photovoltaic inverter, a feature vector is constructed to obtain the time series feature vector corresponding to the photovoltaic inverter.
4. The anomaly detection method for a distributed power supply access unit according to claim 1, characterized in that, The LSTM-based model uses the time-series feature vectors for iterative training, including: Initialize the input gate, output gate, forget gate, and cell states; Forward propagation calculation is performed by sequentially calculating the activation values of the input gate, forget gate, and output gate using the time series feature vector; The model is trained by calculating the gradient of the loss function with respect to the network parameters based on the backpropagation algorithm, and a preliminary simulation model is obtained. The primary simulation model is subjected to reliability testing to obtain the simulation model.
5. The anomaly detection method for a distributed power supply access unit according to claim 4, characterized in that, The activation value of the input gate is calculated using the following formula: ; in, This is the activation value of the input gate. For activation function, Time series feature vector The weight matrix to the input gate, The hidden state of the previous time step The weight matrix to the input gate, The cell state of the previous time step The weight matrix to the input gate, This is the bias term for the input gate; The activation value of the forget gate is calculated using the following formula: ; in, The activation value for the forget gate. The hidden state of the previous time step The weight matrix to the forget gate, The hidden state of the previous time step The weight matrix to the forget gate, The cell state of the previous time step The weight matrix to the forget gate, For the bias term of the forget gate; The activation value of the output gate is calculated using the following formula: ; in, This is the activation value of the output gate. The hidden state of the previous time step The weight matrix to the output gate, The hidden state of the previous time step The weight matrix to the output gate, The cell state of the previous time step The weight matrix to the output gate, This is the bias term for the output gate.
6. The anomaly detection method for a distributed power supply access unit according to claim 1, characterized in that, The test of the inverter data of the distributed power access unit based on the consistency between the photovoltaic inverter data read from the simulation model by the distributed power access unit and the corresponding photovoltaic inverter data directly read from the host computer includes: Step S301: Using the distributed power access unit, read the first inverter data of the first photovoltaic inverter among the at least two types of photovoltaic inverters from the simulation model; Step S302: Use the host computer to directly read the second inverter data of the first photovoltaic inverter; Step S303: Determine whether the data from the first inverter and the data from the second inverter are consistent; Step S304: If the data of the first inverter and the data of the second inverter are consistent, then proceed to step S305; otherwise, the distributed power access unit fails to test the data of the first photovoltaic inverter. Step S305: Use the distributed power access unit to modify the inverter parameters of the first photovoltaic inverter to the test inverter data; Step S306: Use the host computer to directly read the third inverter data of the first photovoltaic inverter; Step S307: Determine whether the data of the third inverter is consistent with the data of the test inverter; Step S308: If the data of the third inverter is consistent with the data of the test inverter, the distributed power access unit has successfully tested the data of the first photovoltaic inverter; otherwise, it has failed.
7. The anomaly detection method for a distributed power supply access unit according to claim 6, characterized in that, The test of the inverter on / off control of the distributed power access unit based on the consistency between the photovoltaic inverter data read from the simulation model by the distributed power access unit and the corresponding photovoltaic inverter data directly read from the host computer includes: Step S309: Use the distributed power access unit to control the first photovoltaic inverter to start up; Step S310: Directly read the first operating status of the first photovoltaic inverter using the host computer; Step S311: Determine whether the first operating state is the power-on state; Step S312: If the first operating state is the power-on state, then execute step S313; otherwise, the distributed power access unit fails the power-on / off control test for the first photovoltaic inverter. Step S313: Use the distributed power access unit to control the first photovoltaic inverter to shut down; Step S314: Directly read the second operating status of the first photovoltaic inverter using the host computer; Step S315: Determine whether the second operating state is a power-off state; Step S316: If the second operating state is the shutdown state, the power supply access unit successfully performs the power-on / off control test on the first photovoltaic inverter; otherwise, it fails.
8. The anomaly detection method for a distributed power supply access unit according to claim 7, characterized in that, The determination of abnormal states of the distributed power access unit based on inverter data and inverter on / off control test results for various types of photovoltaic inverters includes: For any type of photovoltaic inverter, if at least one of the tests conducted by the distributed power access unit (DPU) for that type of photovoltaic inverter—the inverter data test and the inverter power-on / off control test—fails, then there is an anomaly in the communication between the DPU and that type of photovoltaic inverter.
9. A computing device, comprising a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, it implements the method as described in any one of claims 1-8.