A performance monitoring method, device and equipment of a photovoltaic power station and a storage medium
By defining a multiple linear regression model using the TiDB library and Python's statsmodels library, and combining it with a MySQL client to manage photovoltaic power plant data, the problems of subjective error and diverse data formats in photovoltaic power plant performance monitoring were solved. This enabled unified management of electrical data and automatic prediction of performance anomalies, thereby improving operation and maintenance efficiency.
Patent Information
- Application Number
- CN202510088077.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-01-21
AI Technical Summary
Current photovoltaic power plant performance monitoring relies on manual visual judgment and manual meter reading analysis, which is prone to subjective experience errors and has a variety of data formats, making it difficult to manage and analyze in a unified manner.
The TiDB library is used to manage the electrical data of the photovoltaic power plant. A multiple linear regression model is defined using the statsmodels library in Python. The least squares method is used to solve the prediction model. Data is imported and queried using a MySQL client to generate a summary table of future power generation and mark data with abnormal performance.
It enables comprehensive management and unified analysis of electrical data of photovoltaic power plants, reduces subjective experience errors, improves operation and maintenance efficiency, can automatically predict equipment performance anomalies, avoids manual intervention, and the data format is uniform, making it easy to manage and query.
Smart Images

Figure CN119652254B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of solar energy industry, and in particular to a performance monitoring method, device and equipment of a photovoltaic power station and a storage medium. BACKGROUND
[0002] A photovoltaic power station is a facility that uses solar energy to generate electricity. It converts solar energy into electrical energy through special materials such as crystalline silicon panels and electronic components such as inverters, and is connected to the power grid to deliver power to the grid. Photovoltaic power stations are green energy projects encouraged by the state, with characteristics of cleanliness, environmental protection and renewable energy. Photovoltaic power stations are widely used in various situations, including providing power for unpowered areas, solar consumer electronics (such as solar chargers, solar streetlights, etc.), and grid-connected power generation. With the advancement of technology and policy support, photovoltaic power generation will play an important role in the future energy structure.
[0003] The performance monitoring of a photovoltaic power station is usually determined by a series of manual visual inspections to determine whether the external mechanical performance of the electrical equipment is perfect, and manual meter reading and calculations to determine whether the internal electronic performance of the electrical equipment is normal. Finally, the comprehensive performance of the electrical equipment is comprehensively judged. For example, the visual inspection checks the appearance of the photovoltaic components, supports, cables and other components to confirm that there is no damage, deformation, corrosion, etc. Ensure that the power station site is clean and there is no shadow blocking the photovoltaic components;Component performance testing uses instruments to measure the electrical performance of photovoltaic components, such as open-circuit voltage, short-circuit current, maximum power point voltage and current, etc. to detect whether there are hidden cracks, black patches and other defects inside the components;Inverter performance testing checks the operating state of the inverter, including output voltage, current, frequency, power factor and other parameters. Verify the protection functions of the inverter, such as overload protection, short circuit protection, island protection, etc. to ensure normal operation;Array output detection monitors the output power of the entire photovoltaic array and compares it with the theoretical value to evaluate the power generation efficiency of the system;Grid performance testing checks the connection of the photovoltaic power station to the grid to ensure that the voltage, frequency, phase sequence and other parameters of the grid connection point meet the grid requirements. Monitor the power factor, harmonic content and other power quality parameters of the power station.
[0004] As can be seen from the above, the performance monitoring method described above relies on manual visual judgment and manual meter reading analysis. Although subsequent electronic performance analysis can be analyzed with the help of external detection instruments, it is inevitable to add subjective experience errors. At the same time, the data obtained by manual meter reading has many types and styles, which is not conducive to subsequent data operations such as analysis operation planning, backup operation, etc. which require unified analysis and management of data. The diversified manual data format needs to be summarized and uniformly operated in the actual analysis process to adapt to the subsequent analysis software, which is time-consuming and laborious, and the obtained data has subjective experience errors. SUMMARY
[0005] The main objective of this application is to provide a method, device, equipment, and storage medium for monitoring the performance of photovoltaic power plants, in order to solve the problems of subjective experience errors and diverse data formats in the performance analysis of photovoltaic power plants in the prior art.
[0006] To achieve the above objectives, this application provides the following technical solution:
[0007] A performance monitoring method for a photovoltaic power station, the photovoltaic power station comprising a plurality of photovoltaic arrays, a DC distribution cabinet electrically connected to each photovoltaic array, an inverter electrically connected to the DC distribution cabinet, an AC distribution cabinet electrically connected to the inverter, and a step-up substation electrically connected to the AC distribution cabinet, the performance monitoring method comprising:
[0008] Step S1: Obtain several DC electrical data, several inverter electrical data, several AC electrical data, several boost electrical data, and several power generation data of the DC distribution cabinet, the inverter, the AC distribution cabinet, and the boost substation based on a preset natural time period;
[0009] Step S2: All DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data are managed through the TiDB library to obtain a power plant data summary table based on several preset natural time periods.
[0010] Step S3: Define a multiple linear regression model for all power generation data and all DC electrical data, all inverter electrical data, all AC electrical data, and all step-up electrical data using the statsmodels library of Python. The multiple linear regression model has a reserved data import interface.
[0011] Step S4: Connect to the TiDB database and data import interface via a MySQL client signal to import the power plant data summary table into the multiple linear regression model;
[0012] Step S5: Solve the multiple linear regression model using the least squares method to obtain the prediction model;
[0013] Step S6: Predict several future power generation data based on a preset number of future prediction steps using the prediction model;
[0014] Step S7: Import all future power generation data and the corresponding future times of all future power generation into the TiDB database through the MySQL client and generate a summary table of future power generation.
[0015] Step S8: Search the future power generation summary table for power generation data that are less than or equal to a preset power generation threshold using the MySQL client;
[0016] Step S9: Mark power generation data that is less than or equal to a preset power generation threshold as abnormal performance data.
[0017] As a further improvement to this application, in step S2, all DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data are managed through the TiDB library to obtain a power plant data summary table based on several preset natural time periods, including:
[0018] Step S21: Build the global environment variable file for the TiDB library using the TiUP component manager;
[0019] Step S22: Generate a TiDB cluster in the global environment variable file using the playground command of the TiUP component manager;
[0020] Step S23: Connect to the TiDB cluster via the MySQL client signal;
[0021] Step S24: Create a first blank database in the TiDB cluster using the SQL creation statement of the MySQL client. The database has all electrical data as the row dimension and the number of all preset natural time periods as the column dimension. All electrical data includes all DC electrical data, all inverter electrical data, all AC electrical data, all step-up electrical data, and all power generation data.
[0022] Step S25: Import all electrical data into the first blank database using the SQL import statement of the MySQL client to form the power plant data summary table.
[0023] As a further improvement to this application, step S7 involves importing all future power generation data and the corresponding future times of all future power generation into the TiDB database via the MySQL client and generating a future power generation summary table, including:
[0024] Step S71: Create a second blank database in the TiDB cluster using the SQL creation statement of the MySQL client, with the number of all preset natural time periods as the row dimension and the future power generation as the single column dimension.
[0025] Step S72: Import all future power generation data into the second blank database using the SQL import statement of the MySQL client to form the future power generation summary table.
[0026] As a further improvement to this application, in step S3, a multiple linear regression model is defined using Python's statsmodels library, relating all power generation data to all DC electrical data, all inverter electrical data, all AC electrical data, and all step-up electrical data. This multiple linear regression model has a reserved data import interface, including:
[0027] Step S31: Define the DC electrical data, inverter electrical data, AC electrical data, and boost electrical data with the same preset natural time period as a set of independent variables;
[0028] Step S32: Define the power generation data of the same preset natural time period as the dependent variable of the set of independent variables, and define the dependent variable of the same preset natural time period and all independent variables as a set of linear regression relationships.
[0029] Step S33: Perform standard normalization on all linear regression relationships;
[0030] Step S34, according to equation (1), define all linear regression relationships as the multiple linear regression model:
[0031] (1);
[0032] in, For the first A dependent variable with a pre-defined natural time period. The number of all preset natural time periods. The intercept for all linear regression relationships is given. The linear regression coefficients for all DC electrical data are... The linear regression coefficients for all inverter electrical data are... The linear regression coefficients for all AC electrical data are... The linear regression coefficients for all boost electrical data are... For the first DC electrical data with a preset natural time period. For the first Inverter electrical data for a preset natural time period, For the first AC electrical data with a preset natural time period, For the first The boost electrical data for a preset natural time period For all linear regression relationships, let be the random error.
[0033] Step S35: Reserve the data import interface at the beginning of the code of the multiple linear regression model using the Flask framework of Python.
[0034] As a further improvement to this application, step S5 involves solving the multiple linear regression model using the least squares method to obtain a prediction model, including:
[0035] Step S51: Solve for all linear regression coefficients using the least squares method according to equation (2):
[0036] (2);
[0037] in, for The estimated value, ,correspond , , , , For a matrix of all independent variables, For matrix The transpose of the matrix;
[0038] Step S52: Substitute all the obtained regression coefficients into all linear regression relationships to obtain the prediction model.
[0039] As a further improvement to this application, step S2 involves managing all DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data through the TiDB library to obtain a power plant data summary table based on several preset natural time periods. This process then includes:
[0040] Step S10: Divide the power plant data summary table into several data sub-tables based on all preset natural time periods;
[0041] Step S20: Obtain the on-chain hash certificate for each data partition table using the SHA256 algorithm;
[0042] Step S30: Copy all on-chain hash credentials and save them locally to form a local hash credential based on a data partitioning table;
[0043] Step S40: Save all on-chain hash certificates to the external blockchain in order of age from oldest to newest according to all preset natural time periods;
[0044] Step S50: Based on the current local hash certificate, retrieve the on-chain hash certificate that matches the local hash certificate from the external blockchain;
[0045] Step S60: Determine whether the on-chain hash certificate has been successfully retrieved. If the on-chain hash certificate has not been successfully retrieved, proceed to step S70.
[0046] Step S70: Determine that either the on-chain hash certificate or the local hash certificate has been tampered with;
[0047] Step S80: Generate a data tampering signal and send it to the external monitoring terminal.
[0048] As a further improvement to this application, step S7 involves importing all future power generation data and the corresponding future times of all future power generation into the TiDB database via the MySQL client and generating a future power generation summary table. Following this, the process includes:
[0049] Step S100: Use the SQL query statements, SQL update statements, and SQL delete statements of the MySQL client to perform data query, data update, and data deletion on the power plant data summary table or the future power generation summary table;
[0050] Step S200: Generate a query record with a query timestamp and query content for each data query.
[0051] Step S300: Generate an update record with an update timestamp and update content for each data update;
[0052] Step S400: Generate a deletion record with a deletion timestamp and deleted content for each data deletion;
[0053] Step S500: Send all query records, all update records, and all delete records to the external monitoring terminal.
[0054] To achieve the above objectives, this application also provides the following technical solutions:
[0055] A performance monitoring device for a photovoltaic power plant, applied to the performance monitoring method described above, the performance monitoring device comprising:
[0056] The electrical data acquisition module is used to acquire several DC electrical data, several inverter electrical data, several AC electrical data, several boost electrical data based on a preset natural time period of the DC distribution cabinet, the inverter, the AC distribution cabinet, and the boost substation, as well as several power generation data of the photovoltaic power station based on the preset natural time period.
[0057] The electrical data management module is used to manage all DC electrical data, all inverter electrical data, all AC electrical data, all step-up electrical data, and all power generation data through the TiDB library, and obtain a power plant data summary table based on several preset natural time periods.
[0058] The linear regression definition module is used to define multiple linear regression models for all power generation data and all DC electrical data, all inverter electrical data, all AC electrical data, and all step-up electrical data using Python's statsmodels library. The multiple linear regression model has a reserved data import interface.
[0059] The electrical data import module is used to connect to the TiDB database and the data import interface via a MySQL client signal to import the power plant data summary table into the multiple linear regression model.
[0060] The linear regression solution module is used to solve the multiple linear regression model using the least squares method to obtain the prediction model.
[0061] The future power generation prediction module is used to predict several future power generation data based on a preset number of future prediction steps using the prediction model.
[0062] The future power generation data management module is used to import all future power generation data and the future time corresponding to all future power generation into the TiDB database through the MySQL client and generate a future power generation summary table.
[0063] The future power generation data retrieval module is used to search for power generation data that are less than or equal to a preset power generation threshold in the future power generation summary table through the MySQL client.
[0064] The performance anomaly data marking module is used to mark power generation data that is less than or equal to a preset power generation threshold as performance anomaly data.
[0065] To achieve the above objectives, this application also provides the following technical solutions:
[0066] An electronic device includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the performance monitoring method for a photovoltaic power station as described above.
[0067] To achieve the above objectives, this application also provides the following technical solutions:
[0068] A storage medium storing program instructions, which, when executed by a processor, enable the performance monitoring method for a photovoltaic power plant as described above.
[0069] This application acquires several DC electrical data points, several inverter electrical data points, several AC electrical data points, and several boost electrical data points based on a preset natural time period from DC distribution cabinets, inverters, AC distribution cabinets, and boost substations, as well as several power generation data points from a photovoltaic power station based on a preset natural time period. All DC electrical data, inverter electrical data, AC electrical data, boost electrical data, and power generation data are managed using the TiDB library to obtain a power station data summary table based on several preset natural time periods. The application also uses the Python statsmodels library to define the relationships between all power generation data and all DC electrical data, inverter electrical data, AC electrical data, and boost electrical data. The system employs a multiple linear regression model with a pre-defined data import interface. A MySQL client connects to the TiDB database and the data import interface to import the power plant data summary table into the multiple linear regression model. The model is then solved using the least squares method to obtain a prediction model. This prediction model is used to predict several future power generation data points based on a preset number of future prediction steps. All future power generation data and their corresponding future times are imported into the TiDB database via the MySQL client, generating a future power generation summary table. The MySQL client is used to search the future power generation summary table for power generation data that is less than or equal to a preset power generation threshold. Power generation data less than or equal to the preset threshold is marked as performance anomaly data. This application automatically acquires electrical data (such as voltage, current, power, frequency, etc.) from various electrical devices at regular intervals, and collects and manages all electrical data to form a traceable database. This not only facilitates direct access to various subsequent analysis software and algorithms through data interfaces, but also facilitates subsequent querying, tracing, and other access operations, resulting in comprehensive and effective management of the electrical data of the photovoltaic power station. Furthermore, this application directly integrates linear regression analysis into this database to achieve linear regression analysis of the performance of various electrical devices. The performance of each electrical device in the photovoltaic power station can then be determined by solving the linear regression model. The application employs a database-based approach for linear regression analysis, enabling unified management of the predicted results. By querying and filtering data showing anomalies in future power generation, abnormal equipment performance can be identified. This approach also achieves proactive monitoring of photovoltaic power plant electrical equipment, eliminating the need to wait for actual equipment failures. Compared to existing technologies, this application avoids subjective experience errors, and the entire process—from data acquisition and analysis to management and filtering—requires no manual intervention. Furthermore, the data format is standardized and manageable, allowing the resulting database to be directly applied to data needs in other scenarios, significantly improving the operation and maintenance efficiency of photovoltaic power plants. Attached Figure Description
[0070] Figure 1This is an electrical connection diagram of one embodiment of the photovoltaic power plant performance monitoring method of this application;
[0071] Figure 2 This is a flowchart illustrating the steps of one embodiment of the photovoltaic power plant performance monitoring method of this application;
[0072] Figure 3 This is a functional module diagram of one embodiment of the performance monitoring device for a photovoltaic power plant according to this application;
[0073] Figure 4 This is a schematic diagram of the structure of an embodiment of the electronic device of this application;
[0074] Figure 5 This is a schematic diagram of the structure of one embodiment of the storage medium of this application. Detailed Implementation
[0075] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0076] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0077] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0078] like Figure 1 As shown, Figure 1 This is a schematic diagram of the connection of various electrical devices in this embodiment. This embodiment provides an example of a performance monitoring method for a photovoltaic power station. In this embodiment, the photovoltaic power station includes several photovoltaic arrays, a DC distribution cabinet electrically connected to each photovoltaic array, an inverter electrically connected to the DC distribution cabinet, an AC distribution cabinet electrically connected to the inverter, and a step-up substation electrically connected to the AC distribution cabinet.
[0079] Preferably, the performance of energy storage devices can also be monitored and managed in a unified manner.
[0080] Specifically, see Figure 2 The performance monitoring method includes the following steps:
[0081] Step S1: Obtain several DC electrical data, several inverter electrical data, several AC electrical data, several boost electrical data, and several power generation data of the photovoltaic power station based on a preset natural time period from the DC distribution cabinet, inverter, AC distribution cabinet, and boost substation.
[0082] Preferably, due to the randomness of illumination, the preset natural time period can be set to 1 hour or half an hour.
[0083] Step S2 involves managing all DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data through the TiDB library to obtain a power plant data summary table based on several preset natural time periods.
[0084] Preferably, TiDB (Ti Distributed Database) is an open-source distributed relational database. TiDB is a hybrid (Hybrid Transactional and Analytical Processing, HTAP) distributed database that can simultaneously support online transaction processing (OLTP) and online analytical processing (OLAP). It possesses important features such as horizontal scaling or shrinking, financial-grade high availability, real-time HTAP, and cloud-native capabilities, and is compatible with the MySQL 5.7 protocol and ecosystem. TiDB is suitable for various scenarios with high availability and strong consistency requirements, especially performing exceptionally well in environments with large data volumes and high concurrency demands. It combines the best features of traditional RDBMS and NoSQL, and TiDB is compatible with MySQL, supports unlimited horizontal scaling, which is beneficial for the continuous expansion of additional electrical data in this embodiment, and possesses strong consistency and high availability.
[0085] Step S3: Define a multiple linear regression model for all power generation data and all DC electrical data, all inverter electrical data, all AC electrical data, and all step-up electrical data using Python's statsmodels library. The multiple linear regression model has a reserved data import interface.
[0086] Preferably, the definition of the multiple linear regression model and the reservation of the data import interface can be implemented through the following code framework:
[0087] import statsmodels.api as sm
[0088] import numpy as np
[0089] from flask import Flask, jsonify
[0090] app = Flask(__name__)
[0091] # Electrical Data
[0092] data={}
[0093] @app.route(' / users / <string:user_id> ', methods=['GET'])
[0094] def get_user(user_id):
[0095] if user_id in data:
[0096] return jsonify(data[user_id])
[0097] else:
[0098] 'User not found', 404
[0099] if __name__=='__main__':
[0100] app.run(debug=True)
[0101] #X is a matrix of independent variables, and y is a matrix of dependent variables.
[0102] X=np.array([[*,*,*],[*,*,*],[*,*,*]])
[0103] y = np.array([*,*,*])
[0104] # Create a model and fit it
[0105] model = sm.OLS(y, X).fit()
[0106] # Output model results
[0107] print(model.summary())
[0108] It is worth noting that the data for the independent and dependent variables are automatically populated by the MySQL client and do not require manual input.
[0109] It is worth noting that the above code is an example excerpt of the complete code; the above code is not the complete version and therefore cannot be run directly.
[0110] Step S4: Connect to the TiDB database and data import interface via the MySQL client signal to import the power plant data summary table into the multiple linear regression model.
[0111] Preferably, the multiple linear regression model can use LASSO regression.
[0112] Step S5: Solve the multiple linear regression model using the least squares method to obtain the prediction model.
[0113] Step S6: Predict several future power generation data based on a preset number of future prediction steps using a prediction model.
[0114] Step S7: Import all future power generation data and the corresponding future times of all future power generation into the TiDB database through the MySQL client and generate a summary table of future power generation.
[0115] Step S8: Search the future power generation summary table using the MySQL client for power generation data that are less than or equal to the preset power generation threshold.
[0116] Preferably, MySQL databases use the WHERE clause in SQL statements to filter data based on conditions, thereby performing precise queries for the required data. MySQL supports various filtering functions, including logical operator filtering, fuzzy search, NULL value filtering, and range filtering.
[0117] Preferably, the specific method for MySQL data filtering is as follows:
[0118] Logical operator filtering: MySQL supports logical operators such as AND, OR, and NOT, which can be used to combine multiple conditions for complex queries.
[0119] Fuzzy search: Use the LIKE and REGEXP operators for fuzzy matching. LIKE is used for fuzzy matching, while REGEXP is used for regular expression matching.
[0120] NULL value filtering: Use the IS NULL and IS NOT NULL operators to filter NULL values.
[0121] Range filtering: Use the BETWEEN and IN operators to filter field values by range.
[0122] Step S9: Mark power generation data that is less than or equal to a preset power generation threshold as abnormal performance data.
[0123] Preferably, since the prediction results have the characteristic of randomness in illumination, the preset power generation threshold can be set as a proportional value, such as 80%, that is, if the predicted power generation at a certain moment is less than 80% of the normal value, then the performance is judged to be abnormal.
[0124] Further, in step S2, all DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data are managed through the TiDB database to obtain a power plant data summary table based on several preset natural time periods, including:
[0125] Step S21: Build the global environment variable file for the TiDB library using the TiUP component manager.
[0126] Step S22: Generate a TiDB cluster in the global environment variable file using the playground command of the TiUP component manager.
[0127] Preferably, the most basic TiDB test cluster typically consists of 2 TiDB instances, 3 TiKV instances, 3 PD instances, and an optional TiFlash instance. A basic test cluster can be quickly built using TiUP Playground.
[0128] Preferably, the above-mentioned TiDB instance, TiKV instance, PD instance, and TiFlash instance can be implemented using the following commands:
[0129] [root@worker2 tidb]# tiup playground v7.5.0 --db 2 --pd 3 --kv 3.
[0130] It is worth noting that TiUP requires setting the absolute path to the Shell profile file. Before executing the source command ([root@worker2 tidb]# source / root / .bash_profile), you need to modify ${your_shell_profile} to the actual location of the Shell profile data file.
[0131] Step S23: Connect to the TiDB cluster via MySQL client signals.
[0132] Preferably, the MySQL client can connect to the TiDB cluster using the following command:
[0133] [root@worker2 tidb]# mysql --host 127.0.0.1 --port 4000 -u root.
[0134] It is worth noting that you need to look up and replace the host address yourself.
[0135] Step S24: Create a first blank database in the TiDB cluster using the SQL creation statement of the MySQL client. The database has all electrical data as the row dimension and the number of all preset natural time periods as the column dimension. All electrical data includes all DC electrical data, all inverter electrical data, all AC electrical data, all step-up electrical data, and all power generation data.
[0136] Preferably, the SQL creation statement is:
[0137] mysql>CREATE DATABASE IF NOT EXISTS 'tidb'.
[0138] As can be seen, the dimension of the first blank database is 5×n, the leftmost column is each preset natural time period, and the second to fifth columns from the left are the four electrical data mentioned above.
[0139] Step S25: Import all electrical data into the first blank database using the SQL import statement of the MySQL client to form a power plant data summary table.
[0140] Preferably, the SQL import statement is:
[0141] The statement `INSERT INTO tidb VALUES(1,2,3,4)` means adding the numbers 1, 2, 3, and 4 from the data (1,2,3,4) to the first empty database in the order of the four headers of table 1.
[0142] Further, in step S7, all future power generation data and the corresponding future times are imported into the TiDB database using a MySQL client, and a future power generation summary table is generated, including:
[0143] Step S71: Create a second blank database in the TiDB cluster using the SQL creation statement of the MySQL client. The database has the number of all preset natural time periods as the row dimension and the future power generation as the single column dimension.
[0144] Step S72: Import all future power generation data into the second blank database using the SQL import statement of the MySQL client to form a summary table of future power generation data.
[0145] Preferably, the principle of step S7 and its sub-steps is the same as that of step S2 and its sub-steps.
[0146] Further, in step S3, using Python's statsmodels library, a multiple linear regression model is defined to compare all power generation data with all DC electrical data, all inverter electrical data, all AC electrical data, and all step-up electrical data. The multiple linear regression model has a reserved data import interface, including:
[0147] Step S31: Define the DC electrical data, inverter electrical data, AC electrical data, and boost electrical data with the same preset natural time period as a set of independent variables.
[0148] Step S32: Define the power generation data of the same preset natural time period as the dependent variable of a set of independent variables, and define the dependent variable of the same preset natural time period and all independent variables as a set of linear regression relationships.
[0149] Step S33: Standardize all linear regression relationships.
[0150] Preferably, this embodiment uses a zero-mean normalization (Z-score standardization) method, which standardizes the original data by giving it the mean and standard deviation. The processed data conforms to a standard normal distribution, i.e., the mean is 0 and the standard deviation is 1.
[0151] Step S34, according to equation (1), define all linear regression relationships as a multiple linear regression model:
[0152] (1).
[0153] in, For the first A dependent variable with a pre-defined natural time period. The number of all preset natural time periods. The intercept for all linear regression relationships is given. The linear regression coefficients for all DC electrical data are... The linear regression coefficients for all inverter electrical data are... The linear regression coefficients for all AC electrical data are... The linear regression coefficients for all boost electrical data are... For the first DC electrical data with a preset natural time period. For the first Inverter electrical data for a preset natural time period, For the first AC electrical data with a preset natural time period, For the first The boost electrical data for a preset natural time period Let be the random error of all linear regression relationships.
[0154] Step S35: Reserve a data import interface at the beginning of the code for the multiple linear regression model using the Flask framework in Python.
[0155] Preferably, Python comes with the DB-API database programming interface specification, which defines a set of database programming interface standards, enabling developers to use a unified method to connect to and manipulate different types of databases. The latest version is PEP249, which defines a series of interfaces and behaviors that allow Python programs to easily interact with databases.
[0156] Preferably, commonly used database adapters include MySQL-python, psycopg2 (for PostgreSQL), and cx_Oracle (for Oracle databases). Besides using native database adapters to connect to the database, many developers also prefer to use ORM (Object-Relational Mapping) frameworks, such as SQLAlchemy and DjangoORM. ORM frameworks provide a more object-oriented approach to database operations, allowing developers to represent and manipulate data in the database using classes and objects instead of writing SQL statements.
[0157] Further, in step S5, the multiple linear regression model is solved using the least squares method to obtain the prediction model, including:
[0158] Step S51: Solve for all linear regression coefficients using the least squares method according to equation (2):
[0159] (2).
[0160] in, for The estimated value, ,correspond , , , , For a matrix of all independent variables, For matrix The transpose of .
[0161] Preferably, .
[0162] Step S52: Substitute all the obtained regression coefficients into all linear regression relationships to obtain the prediction model.
[0163] Preferably, it can be achieved through the square of the residuals. Test the significance of the prediction model; if If so, it indicates that the prediction model has strong significance; if If so, it indicates that the significance of the prediction model is generally low; if If the result is negative, it indicates that the predictive model has poor significance, and the significance of the predictive model is positively linearly correlated with the squared residuals.
[0164] Further, in step S2, all DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data are managed through the TiDB database to obtain a power plant data summary table based on several preset natural time periods. This includes:
[0165] Step S10: Divide the power plant data summary table into several data sub-tables based on all preset natural time periods.
[0166] Step S20: Obtain the on-chain hash certificate for each data partition table using the SHA256 algorithm.
[0167] Preferably, the SHA256 algorithm is a sub-algorithm of SHA-2. SHA-2 is an abbreviation of Secure Hash Algorithm 2, a standard cryptographic hash function algorithm. SHA-2 can be further divided into six different algorithm standards: SHA224, SHA256, SHA384, SHA512, SHA512 / 224, and SHA512 / 256. These variants share a consistent basic structure, with only minor differences in the length of the generated digest and the number of iterations. SHA-256 is a hash function, also known as a hash algorithm, a method for creating a small digital "fingerprint" from any type of data. A hash function compresses a message or data into a digest, reducing the data size and fixing the data format. The function scrambles and mixes the data to recreate a fingerprint called a hash value. A hash value is typically represented by a short string of random letters and numbers. For any message of any length, SHA256 will generate a 256-bit hash value called a message digest. This message digest is equivalent to an array of 32 bytes, usually represented by a 64-bit hexadecimal string.
[0168] Step S30: Copy all on-chain hash credentials and save them locally to form a local hash credential based on a data partition table.
[0169] Preferably, power plant data is of paramount importance, and on-chain hash credentials and local hash credentials can guarantee the authenticity of the data.
[0170] Step S40: Save all on-chain hash credentials to the external blockchain in order of age from oldest to newest according to all preset natural time periods.
[0171] Preferably, one hour or half an hour can be used as a storage node, and the chain span of the on-chain hash certificate can be realized by using the chain span of natural time.
[0172] Step S50: Based on the current local hash certificate, retrieve the on-chain hash certificate that matches the local hash certificate from the external blockchain.
[0173] Step S60: Determine whether the on-chain hash certificate has been successfully retrieved. If the on-chain hash certificate has not been successfully retrieved, proceed to step S70.
[0174] Step S70: Determine whether one of the on-chain hash certificate or the local hash certificate has been tampered with.
[0175] Step S80: Generate a data tampering signal and send it to the external monitoring terminal.
[0176] Preferably, the hash certificate involves storing the hash value of the file content on the blockchain. This hash value, often referred to as the file's digital fingerprint, is obtained by performing a hash operation on the file content. Since hash values are relatively finite in length—for example, the SHA256 hash of tens of thousands of words of data is only 256 characters—storing such a long content on the blockchain is effortless. The hash certificate method can be used to verify whether the file content has been tampered with. For instance, the hash value of the original text is stored on the blockchain. When the file is retrieved again, its content is hashed. If it matches the content stored on the chain, the content is considered trustworthy and has not been tampered with. If the hash value is different, the content is considered tampered with and no longer trustworthy. This prevents malicious virus injection into the data. Power plants can store the digital fingerprints of the electrical data they acquire on the blockchain. Users can verify the digital fingerprints of software downloaded from different channels; if changes are found, the software may have been infected with viruses or Trojans and is no longer secure.
[0177] Further, in step S7, all future power generation data and the corresponding future times are imported into the TiDB database using a MySQL client, and a future power generation summary table is generated. This includes:
[0178] Step S100: Use SQL query statements, SQL update statements, and SQL delete statements from the MySQL client to perform data query, data update, and data deletion on the power plant data summary table or future power generation summary table.
[0179] Step S200: Generate a query record with a query timestamp and query content for each data query.
[0180] Step S300: Generate an update record with an update timestamp and update content for each data update.
[0181] Step S400: Generate a deletion record with a deletion timestamp and deleted content for each data deletion.
[0182] Step S500: Send all query records, all update records, and all delete records to the external monitoring terminal.
[0183] Preferably, the SQL query statement is:
[0184] mysql>SELECT * FROM tidb.
[0185] The statement `SELECT * FROM tidb WHERE id<10;` means to query data with a sequence number less than 10.
[0186] The SQL update statement is:
[0187] mysql>UPDATE tidb SET (3)='35kV' WHERE id=3; The meaning of this statement is to replace the data in the 3rd column with the serial number 3 with "35kV".
[0188] The SQL delete statement is:
[0189] The statement `DELETE FROM tidb WHERE id=2;` in mysql> means deleting the entire row of data with the sequence number 2.
[0190] It should be noted that the above statements are only examples and are not intended to limit the fixed format of the statements. Other SQL call statements can also be used to directly call the database in this embodiment.
[0191] This embodiment acquires several sets of DC electrical data, inverter electrical data, AC electrical data, and boost electrical data from DC distribution cabinets, inverters, AC distribution cabinets, and boost substations based on a preset natural time period, as well as several sets of power generation data from a photovoltaic power station based on a preset natural time period. All DC electrical data, inverter electrical data, AC electrical data, boost electrical data, and power generation data are managed using the TiDB library to obtain a power station data summary table based on several preset natural time periods. The Python statsmodels library is used to define the relationships between all power generation data and all DC electrical data, inverter electrical data, AC electrical data, and boost electrical data. The system uses a multiple linear regression model with a reserved data import interface. A MySQL client is used to connect to the TiDB database and the data import interface to import the power plant data summary table into the multiple linear regression model. The model is then solved using the least squares method to obtain a prediction model. This prediction model is used to predict several future power generation data points based on a preset number of future prediction steps. All future power generation data points and their corresponding future times are imported into the TiDB database via the MySQL client to generate a future power generation summary table. The MySQL client is used to search the future power generation summary table for power generation data points that are less than or equal to a preset power generation threshold. Power generation data points less than or equal to the preset power generation threshold are marked as performance anomalies. This embodiment automatically acquires electrical data (such as voltage, current, power, frequency, etc.) from various electrical devices at regular intervals, and collects and manages all electrical data to form a traceable database. This not only facilitates direct access to various subsequent analysis software and algorithms through data interfaces, but also facilitates subsequent querying, tracing, and other access operations, resulting in comprehensive and effective management of the electrical data of the photovoltaic power station. Furthermore, this embodiment directly integrates linear regression analysis into this database to achieve linear regression analysis of the performance of various electrical devices. The performance of each electrical device in the photovoltaic power station can then be determined by solving the linear regression model. This embodiment uses a database for linear regression analysis, allowing the predicted results to be managed uniformly. By querying and filtering data showing abnormal future power generation, it's possible to identify equipment performance anomalies. This also enables proactive monitoring of photovoltaic power plant electrical equipment, eliminating the need to wait for actual equipment failures. Compared to existing technologies, this embodiment avoids subjective experience errors, and the entire process—from data acquisition and analysis to management and filtering—requires no manual intervention. Furthermore, the data format is standardized and can be managed uniformly. The resulting database can be directly applied to data needs in other scenarios, significantly improving the operation and maintenance efficiency of photovoltaic power plants.
[0192] like Figure 3As shown, this embodiment provides an example of a performance monitoring device for a photovoltaic power station. In this embodiment, the performance monitoring device is applied to the performance monitoring method described in the above embodiment.
[0193] Specifically, the performance monitoring device includes, in sequence, an electrical data acquisition module 1, an electrical data management module 2, a linear regression definition module 3, an electrical data import module 4, a linear regression solution module 5, a future power generation prediction module 6, a future power generation data management module 7, a future power generation data retrieval module 8, and a performance anomaly data marking module 9.
[0194] The electrical data acquisition module 1 is used to acquire several DC electrical data, several inverter electrical data, several AC electrical data, and several boost electrical data based on a preset natural time period from DC distribution cabinets, inverters, AC distribution cabinets, and boost substations, as well as several power generation data from photovoltaic power plants based on a preset natural time period. The electrical data management module 2 is used to manage all DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data through the TiDB library, obtaining a power plant data summary table based on several preset natural time periods. The linear regression definition module 3 is used to define multiple linear regression models for all power generation data and all DC electrical data, all inverter electrical data, all AC electrical data, and all boost electrical data using Python's statsmodels library. The multiple linear regression model reserves data... According to the import interface; the electrical data import module 4 is used to connect to the TiDB database and the data import interface through the MySQL client signal to import the power plant data summary table into the multiple linear regression model; the linear regression solution module 5 is used to solve the multiple linear regression model using the least squares method to obtain the prediction model; the future power generation prediction module 6 is used to predict several future power generation data based on the preset future prediction steps through the prediction model; the future power generation data management module 7 is used to import all future power generation data and the future time corresponding to all future power generation into the TiDB database through the MySQL client and generate a future power generation summary table; the future power generation data retrieval module 8 is used to search for power generation data less than or equal to a preset power generation threshold in the future power generation summary table through the MySQL client; the performance anomaly data marking module 9 is used to mark power generation data less than or equal to the preset power generation threshold as performance anomaly data.
[0195] Furthermore, the electrical data management module 2 specifically includes a first electrical data management sub-module, a second electrical data management sub-module, a third electrical data management sub-module, a fourth electrical data management sub-module, and a fifth electrical data management sub-module that are electrically connected in sequence; the first electrical data management sub-module is electrically connected to the electrical data acquisition module 1, and the fifth electrical data management sub-module is electrically connected to the linear regression definition module 3.
[0196] The first electrical data management submodule is used to build the global environment variable file of the TiDB library through the TiUP component manager; the second electrical data management submodule is used to generate the TiDB cluster in the global environment variable file through the playground command of the TiUP component manager; the third electrical data management submodule is used to connect to the TiDB cluster through MySQL client signals; the fourth electrical data management submodule is used to create a first blank database in the TiDB cluster through the SQL creation statement of the MySQL client, with all electrical data as the row dimension and the number of all preset natural time periods as the column dimension, all electrical data including all DC electrical data, all inverter electrical data, all AC electrical data, all step-up electrical data, and all power generation data; the fifth electrical data management submodule is used to import all electrical data into the first blank database through the SQL import statement of the MySQL client to form a power plant data summary table.
[0197] Furthermore, the future power generation data management module 7 specifically includes a first future power generation data management sub-module and a second future power generation data management sub-module that are electrically connected in sequence; the first future power generation data management sub-module is electrically connected to the future power generation prediction module 6, and the second future power generation data management sub-module is electrically connected to the future power generation data retrieval module 8.
[0198] The first future power generation data management submodule is used to create a second blank database in the TiDB cluster using SQL creation statements from the MySQL client. The database has the number of all preset natural time periods as the row dimension and the future power generation as the single column dimension. The second future power generation data management submodule is used to import all future power generation into the second blank database using SQL import statements from the MySQL client, forming a future power generation summary table.
[0199] Furthermore, the linear regression definition module 3 specifically includes a first linear regression definition submodule, a second linear regression definition submodule, a third linear regression definition submodule, a fourth linear regression definition submodule, and a fifth linear regression definition submodule that are electrically connected in sequence; the first linear regression definition submodule is electrically connected to the electrical data management module 2, and the fifth linear regression definition submodule is electrically connected to the electrical data import module 4.
[0200] The first linear regression definition submodule is used to define DC electrical data, inverter electrical data, AC electrical data, and boost electrical data with the same preset natural time period as a set of independent variables.
[0201] The second linear regression definition submodule is used to define the power generation data of the same preset natural time period as the dependent variable of a set of independent variables, and to define the dependent variable of the same preset natural time period and all independent variables as a set of linear regression relationships.
[0202] The third linear regression definition submodule is used to perform standard normalization on all linear regression relationships.
[0203] The fourth linear regression definition submodule is used to define all linear regression relationships as a multiple linear regression model according to equation (1):
[0204] (1).
[0205] in, For the first A dependent variable with a pre-defined natural time period. The number of all preset natural time periods. The intercept for all linear regression relationships is given. The linear regression coefficients for all DC electrical data are... The linear regression coefficients for all inverter electrical data are... The linear regression coefficients for all AC electrical data are... The linear regression coefficients for all boost electrical data are... For the first DC electrical data with a preset natural time period. For the first Inverter electrical data for a preset natural time period, For the first AC electrical data with a preset natural time period, For the first The boost electrical data for a preset natural time period Let be the random error of all linear regression relationships.
[0206] The fifth linear regression definition submodule is used to reserve a data import interface at the beginning of the code for a multiple linear regression model using the Flask framework in Python.
[0207] Furthermore, the linear regression solution module 5 specifically includes a first linear regression solution module and a second linear regression solution module that are electrically connected in sequence; the first linear regression solution module is electrically connected to the electrical data import module 4, and the second linear regression solution module is electrically connected to the future power generation prediction module 6.
[0208] The first linear regression solution module is used to solve all linear regression coefficients using the least squares method according to equation (2):
[0209] (2).
[0210] in, for The estimated value, ,correspond , , , , For a matrix of all independent variables, For matrix The transpose of .
[0211] The second linear regression solution module is used to substitute all the obtained regression coefficients into all linear regression relationships to obtain the prediction model.
[0212] Furthermore, the performance monitoring device also includes a power plant data summary table splitting module, an on-chain hash certificate acquisition module, a local hash certificate acquisition module, an on-chain hash certificate storage module, a hash certificate matching module, a hash certificate judgment module, a hash certificate tampering judgment module, and a tampering signal generation and transmission module, which are connected in sequence and electrically. The power plant data summary table splitting module is electrically connected to the electrical data management module 2, or to the fifth electrical data management sub-module of the electrical data management module 2.
[0213] The system includes the following modules: a power plant data summary table splitting module, which splits the power plant data summary table into several data sub-tables based on all preset natural time periods; an on-chain hash certificate acquisition module, which obtains the on-chain hash certificate for each data sub-table using the SHA256 algorithm; a local hash certificate acquisition module, which copies all on-chain hash certificates and saves them locally, forming a local hash certificate based on each data sub-table; an on-chain hash certificate storage module, which saves all on-chain hash certificates to an external blockchain in order of age according to all preset natural time periods; a hash certificate matching module, which retrieves the on-chain hash certificate that matches the local hash certificate from the external blockchain based on the current local hash certificate; a hash certificate judgment module, which determines whether the on-chain hash certificate was successfully retrieved; a hash certificate tampering judgment module, which determines that either the on-chain hash certificate or the local hash certificate has been tampered with if the on-chain hash certificate was not successfully retrieved; and a tampering signal generation and sending module, which generates a data tampering signal and sends it to an external monitoring terminal.
[0214] Furthermore, the performance monitoring device also includes a database maintenance module, a database query record generation module, a database update record generation module, a database deletion record generation module, a database maintenance record sending module, and a database maintenance record sending module, which are connected in sequence and electrically. The database maintenance module is electrically connected to the future power generation data management module 7, or to the second future power generation data management submodule of the future power generation data management module 7.
[0215] The database maintenance module is used to query, update, and delete data in the power plant data summary table or future power generation summary table using SQL query, SQL update, and SQL delete statements from the MySQL client. The database query record generation module generates a query record with a query timestamp and query content for each data query. The database update record generation module generates an update record with an update timestamp and update content for each data update. The database deletion record generation module generates a deletion record with a deletion timestamp and deletion content for each data deletion. The database maintenance record sending module sends all query records, all update records, and all deletion records to the external monitoring terminal.
[0216] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. For the preferred, extended, limited, exemplified and principle explanation parts of this embodiment, please refer to the above embodiment. This embodiment will not repeat them.
[0217] This embodiment acquires several sets of DC electrical data, inverter electrical data, AC electrical data, and boost electrical data from DC distribution cabinets, inverters, AC distribution cabinets, and boost substations based on a preset natural time period, as well as several sets of power generation data from a photovoltaic power station based on a preset natural time period. All DC electrical data, inverter electrical data, AC electrical data, boost electrical data, and power generation data are managed using the TiDB library to obtain a power station data summary table based on several preset natural time periods. The Python statsmodels library is used to define the relationships between all power generation data and all DC electrical data, inverter electrical data, AC electrical data, and boost electrical data. The system uses a multiple linear regression model with a reserved data import interface. A MySQL client is used to connect to the TiDB database and the data import interface to import the power plant data summary table into the multiple linear regression model. The model is then solved using the least squares method to obtain a prediction model. This prediction model is used to predict several future power generation data points based on a preset number of future prediction steps. All future power generation data points and their corresponding future times are imported into the TiDB database via the MySQL client to generate a future power generation summary table. The MySQL client is used to search the future power generation summary table for power generation data points that are less than or equal to a preset power generation threshold. Power generation data points less than or equal to the preset power generation threshold are marked as performance anomalies. This embodiment automatically acquires electrical data (such as voltage, current, power, frequency, etc.) from various electrical devices at regular intervals, and collects and manages all electrical data to form a traceable database. This not only facilitates direct access to various subsequent analysis software and algorithms through data interfaces, but also facilitates subsequent querying, tracing, and other access operations, resulting in comprehensive and effective management of the electrical data of the photovoltaic power station. Furthermore, this embodiment directly integrates linear regression analysis into this database to achieve linear regression analysis of the performance of various electrical devices. The performance of each electrical device in the photovoltaic power station can then be determined by solving the linear regression model. This embodiment uses a database for linear regression analysis, allowing the predicted results to be managed uniformly. By querying and filtering data showing abnormal future power generation, it's possible to identify equipment performance anomalies. This also enables proactive monitoring of photovoltaic power plant electrical equipment, eliminating the need to wait for actual equipment failures. Compared to existing technologies, this embodiment avoids subjective experience errors, and the entire process—from data acquisition and analysis to management and filtering—requires no manual intervention. Furthermore, the data format is standardized and can be managed uniformly. The resulting database can be directly applied to data needs in other scenarios, significantly improving the operation and maintenance efficiency of photovoltaic power plants.
[0218] like Figure 4As shown, this embodiment provides an embodiment of an electronic device. In this embodiment, the electronic device 10 includes a processor 101 and a memory 102 coupled to the processor 101.
[0219] The memory 102 stores program instructions for implementing the photovoltaic power plant performance monitoring method of any of the above embodiments.
[0220] The processor 101 is used to execute program instructions stored in the memory 102 to monitor the performance of the photovoltaic power plant.
[0221] The processor 101 can also be referred to as a CPU (Central Processing Unit). The processor 101 may be an integrated circuit chip with data processing capabilities. The processor 101 can also be a general-purpose processor, a digital data processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.
[0222] Furthermore, Figure 5 This is a schematic diagram of the structure of a storage medium according to an embodiment of this application. The storage medium 11 of this embodiment stores program instructions 111 capable of implementing all the above methods. These program instructions 111 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0223] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0224] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0225] The specific embodiments of this application have been described in detail above, but they are only examples, and this application is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications or substitutions to this application are also within the scope of this application. Therefore, all equivalent changes, modifications, and improvements made without departing from the spirit and principles of this application should be covered within the scope of this application.
Claims
1. A performance monitoring method for a photovoltaic power station, the photovoltaic power station comprising a plurality of photovoltaic arrays, a DC distribution cabinet electrically connected to each photovoltaic array, an inverter electrically connected to the DC distribution cabinet, an AC distribution cabinet electrically connected to the inverter, and a step-up substation electrically connected to the AC distribution cabinet, characterized in that, The performance monitoring method includes: Step S1: Obtain several DC electrical data, several inverter electrical data, several AC electrical data, several boost electrical data, and several power generation data of the DC distribution cabinet, the inverter, the AC distribution cabinet, and the boost substation based on a preset natural time period; Step S2: All DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data are managed through the TiDB library to obtain a power plant data summary table based on several preset natural time periods. Step S3: Define a multiple linear regression model for all power generation data and all DC electrical data, all inverter electrical data, all AC electrical data, and all step-up electrical data using the statsmodels library of Python. The multiple linear regression model has a reserved data import interface. Step S4: Connect to the TiDB database and data import interface via a MySQL client signal to import the power plant data summary table into the multiple linear regression model; Step S5: Solve the multiple linear regression model using the least squares method to obtain the prediction model; Step S6: Predict several future power generation data based on a preset number of future prediction steps using the prediction model; Step S7: Import all future power generation data and the corresponding future times of all future power generation into the TiDB database through the MySQL client and generate a summary table of future power generation. Step S8: Search the future power generation summary table for power generation data that are less than or equal to a preset power generation threshold using the MySQL client; Step S9: Mark power generation data that is less than or equal to a preset power generation threshold as abnormal performance data; Step S2 involves managing all DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data through the TiDB database to obtain a power plant data summary table based on several preset natural time periods, including: Step S21: Build the global environment variable file for the TiDB library using the TiUP component manager; Step S22: Generate a TiDB cluster in the global environment variable file using the playground command of the TiUP component manager; Step S23: Connect to the TiDB cluster via the MySQL client signal; Step S24: Create a first blank database in the TiDB cluster using the SQL creation statement of the MySQL client. The database has all electrical data as the row dimension and the number of all preset natural time periods as the column dimension. All electrical data includes all DC electrical data, all inverter electrical data, all AC electrical data, all step-up electrical data, and all power generation data. Step S25: Import all electrical data into the first blank database using the SQL import statement of the MySQL client to form the power plant data summary table.
2. The performance monitoring method according to claim 1, characterized in that, Step S7: Import all future power generation data and the corresponding future times for all future power generation into the TiDB database using the MySQL client and generate a future power generation summary table, including: Step S71: Create a second blank database in the TiDB cluster using the SQL creation statement of the MySQL client, with the number of all preset natural time periods as the row dimension and the future power generation as the single column dimension. Step S72: Import all future power generation data into the second blank database using the SQL import statement of the MySQL client to form the future power generation summary table.
3. The performance monitoring method according to claim 1, characterized in that, Step S3: Define multiple linear regression models for all power generation data and all DC electrical data, all inverter electrical data, all AC electrical data, and all step-up electrical data using Python's statsmodels library. These multiple linear regression models have a reserved data import interface, including: Step S31: Define the DC electrical data, inverter electrical data, AC electrical data, and boost electrical data of the same preset natural time period as a set of independent variables; Step S32: Define the power generation data of the same preset natural time period as the dependent variable of the set of independent variables, and define the dependent variable of the same preset natural time period and all independent variables as a set of linear regression relationships. Step S33: Perform standard normalization on all linear regression relationships; Step S34, according to equation (1), define all linear regression relationships as the multiple linear regression model: (1); in, For the first A dependent variable with a pre-defined natural time period. The number of all preset natural time periods. The intercept for all linear regression relationships is given. The linear regression coefficients for all DC electrical data are... The linear regression coefficients for all inverter electrical data are... The linear regression coefficients for all AC electrical data are... The linear regression coefficients for all boost electrical data are... For the first DC electrical data with a preset natural time period. For the first Inverter electrical data for a preset natural time period, For the first AC electrical data with a preset natural time period, For the first The boost electrical data for a preset natural time period For all linear regression relationships, let be the random error. Step S35: Reserve the data import interface at the beginning of the code of the multiple linear regression model using the Flask framework of Python.
4. The performance monitoring method according to claim 3, characterized in that, Step S5: Solve the multiple linear regression model using the least squares method to obtain the prediction model, including: Step S51: Solve for all linear regression coefficients using the least squares method according to equation (2): (2); in, for The estimated value, ,correspond , , , , For a matrix of all independent variables, For matrix The transpose of the matrix; Step S52: Substitute all the obtained regression coefficients into all linear regression relationships to obtain the prediction model.
5. The performance monitoring method according to claim 1, characterized in that, Step S2 involves managing all DC electrical data, all inverter electrical data, all AC electrical data, all boost electrical data, and all power generation data through the TiDB database to obtain a power plant data summary table based on several preset natural time periods. This includes: Step S10: Divide the power plant data summary table into several data sub-tables based on all preset natural time periods; Step S20: Obtain the on-chain hash certificate for each data partition table using the SHA256 algorithm; Step S30: Copy all on-chain hash credentials and save them locally to form a local hash credential based on a data partitioning table; Step S40: Save all on-chain hash certificates to the external blockchain in order of age from oldest to newest according to all preset natural time periods; Step S50: Based on the current local hash certificate, retrieve the on-chain hash certificate that matches the local hash certificate from the external blockchain; Step S60: Determine whether the on-chain hash certificate has been successfully retrieved. If the on-chain hash certificate has not been successfully retrieved, proceed to step S70. Step S70: Determine that either the on-chain hash certificate or the local hash certificate has been tampered with; Step S80: Generate a data tampering signal and send it to the external monitoring terminal.
6. The performance monitoring method according to claim 1, characterized in that, Step S7: Import all future power generation data and the corresponding future times for all future power generation into the TiDB database using the MySQL client and generate a future power generation summary table. This includes: Step S100: Use the SQL query statements, SQL update statements, and SQL delete statements of the MySQL client to perform data query, data update, and data deletion on the power plant data summary table or the future power generation summary table; Step S200: Generate a query record with a query timestamp and query content for each data query. Step S300: Generate an update record with an update timestamp and update content for each data update; Step S400: Generate a deletion record with a deletion timestamp and deleted content for each data deletion; Step S500: Send all query records, all update records, and all delete records to the external monitoring terminal.
7. A performance monitoring device for a photovoltaic power station, which is applied to the performance monitoring method as described in any one of claims 1 to 6, characterized in that, The performance monitoring device includes: The electrical data acquisition module is used to acquire several DC electrical data, several inverter electrical data, several AC electrical data, several boost electrical data based on a preset natural time period of the DC distribution cabinet, the inverter, the AC distribution cabinet, and the boost substation, as well as several power generation data of the photovoltaic power station based on the preset natural time period. The electrical data management module is used to manage all DC electrical data, all inverter electrical data, all AC electrical data, all step-up electrical data, and all power generation data through the TiDB library, and obtain a power plant data summary table based on several preset natural time periods. The linear regression definition module is used to define multiple linear regression models for all power generation data and all DC electrical data, all inverter electrical data, all AC electrical data, and all step-up electrical data using Python's statsmodels library. The multiple linear regression model has a reserved data import interface. The electrical data import module is used to connect to the TiDB database and the data import interface via a MySQL client signal to import the power plant data summary table into the multiple linear regression model. The linear regression solution module is used to solve the multiple linear regression model using the least squares method to obtain the prediction model. The future power generation prediction module is used to predict several future power generation data based on a preset number of future prediction steps using the prediction model. The future power generation data management module is used to import all future power generation data and the future time corresponding to all future power generation into the TiDB database through the MySQL client and generate a future power generation summary table. The future power generation data retrieval module is used to search for power generation data that are less than or equal to a preset power generation threshold in the future power generation summary table through the MySQL client. The performance anomaly data marking module is used to mark power generation data that is less than or equal to a preset power generation threshold as performance anomaly data.
8. An electronic device, characterized in that, The method includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the performance monitoring method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores program instructions, which, when executed by a processor, enable the performance monitoring method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Algorithm for automatically extracting and identifying photovoltaic abnormal faults
CN119202970A
KR20240045832A