JavaScript script-based method for calculating characteristic parameters of electromechanical equipment of pumped storage power station

By customizing feature extraction functions and calculation logic based on JavaScript scripts, the problem that feature extraction in the existing technology is incompatible with multiple business scenarios, and high compatibility and scalability feature parameter calculation is realized, which is suitable for pumped storage power stations and other power station types.

CN119512520APending Publication Date: 2025-02-25NANJING NARI WATER RESOURCES & HYDROPOWER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411608395.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing technology is difficult to compatible with multiple business scenarios, it is impossible to effectively extract multiple characteristic parameters in pumped storage power plants, and the algorithm expansion is not good.

Method used

Using a JavaScript script-based method, customizes feature extraction functions, describes the calculation logic of feature parameters through JavaScript scripts, supports time domain, frequency domain and time frequency feature extraction, and realizes automatic calculation and library of feature parameters through configuration files and task schedulers.

Benefits of technology

It realizes high compatibility and expansion of feature extraction algorithms, can be suitable for pumped storage power plants and other power plants types, and improves computing efficiency and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512520A_ABST
    Figure CN119512520A_ABST
Patent Text Reader

Abstract

The invention discloses a JavaScript script-based method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station. The method comprises the following steps of: (1) customizing a characteristic extraction function; (2) constructing a feature extraction script by using a Java language; (3) analyzing and executing the script file; (4) characteristic value storage; the method is not only suitable for pumped storage power stations, but also supports traditional hydropower stations, wind power stations, photoelectric stations, thermal power stations and the like, and has very high adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pumped storage power stations, and in particular to a method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript scripts. Background Art

[0002] Various characteristic parameters are usually applied in various business scenarios of daily production and operation of pumped storage power stations, such as unit status monitoring, unit fault diagnosis, unit degradation status assessment, unit status trend prediction, etc. Characteristic parameter extraction is the basis of the production and operation of pumped storage power stations.

[0003] There are also many methods for feature extraction, including time domain feature extraction, frequency domain feature extraction, and time-frequency feature extraction. Time domain feature extraction directly calculates and extracts features from the signal's time domain waveform data, including mean, variance, standard deviation, peak-to-peak value, etc. The main means of frequency domain feature extraction is spectrum analysis, which converts the more complex time domain and waveforms into simpler harmonics through Fourier transform for research. Frequency domain features include frequency mean, frequency center value, frequency root mean square, rotation frequency amplitude, rotation frequency integer multiple amplitude, and phase of each frequency component. The starting point of time-frequency domain analysis is to obtain a joint function of signal time and frequency. Time-frequency features include time-frequency distribution and time-frequency peaks, which can show the energy density or intensity of the signal in different time scales and frequency ranges; however, the results of feature extraction method research can only extract one type of features, which is not compatible with multiple business scenarios and is not friendly in terms of algorithm expansion. Summary of the invention

[0004] Purpose of the invention: The purpose of the present invention is to provide a method for calculating characteristic parameters of electromechanical equipment in a pumped-storage power station based on JavaScript scripts, and to study a feature extraction calculation program with strong compatibility and scalability, which can include various feature extraction methods to solve the problems existing in the background technology.

[0005] Technical solution: The method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript scripts described in the present invention comprises the following steps: (1) Custom feature extraction function; (2) Use Java language to build feature extraction scripts; (3) Parse the script file and execute it; (4) The characteristic values ​​are stored in the database.

[0006] Furthermore, in step (1), the feature extraction function includes taking the maximum value, taking the minimum value, taking the average value, statistical cumulative value, the number of changes from 0 to 1 per unit time, and the duration exceeding a certain limit; then it is solidified in the program and encapsulated into multiple feature extraction functions.

[0007] Furthermore, in step (2), the program has a built-in reserved character “$”, which allows the script to use the special syntax “$.” and “$()” to implement the call of the feature extraction function and the acquisition of the measurement point number; wherein the feature extraction script is used to describe the calculation logic for extracting feature parameters.

[0008] Furthermore, step (2) is as follows: first, the unit active power measurement point number is obtained through the "$()" syntax, and then the custom function is called through the "$." syntax to obtain the 0 o'clock of the day. The first step of the calculation logic is to call the getHisData function to obtain all active power data of the day, the second step is to call the sum function for accumulation, the third step is to convert the result into "ten thousand degrees" units through division operation, and finally call the setValue function to store it in the database.

[0009] Furthermore, in step (3), the parsing script is specifically as follows: the configuration file allows a script to be configured and applied to different units; the configuration file is implemented using Excel, wherein a DEF page is defined to configure the measurement point information and constant information applied in the feature script, and then a script page is defined to configure the extracted feature parameters and feature script.

[0010] Furthermore, in step (3), when parsing the configuration file, firstly, all the measuring point numbers and characteristic parameter point numbers and their names are parsed according to the unit number to form a point number table; then the script and its execution cycle are read and packaged as a script execution task; the "$('measurement point name')" syntax is used in the script to obtain the measuring point number, and the unit number is mapped from the point number table and converted into a specific measuring point number.

[0011] Furthermore, in step (3), the script execution is specifically as follows: tasks are divided according to the script execution cycle, and scripts with the same cycle are divided into the same task; then a task scheduler is defined to parse the cron expression and trigger the task execution at a scheduled time; wherein, when the script task is executed, the JavaScript engine is used to execute the script, and the JavaScript engine calls the custom feature extraction function by identifying the reserved character "$".

[0012] Furthermore, step (4) is specifically as follows: define a storage queue and multiple storage threads, write the storage task into the queue when the script executes the storage operation, and the storage thread periodically scans the tasks in the queue to execute the storage operation.

[0013] An electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, any one of the methods for calculating characteristic parameters of electromechanical equipment in a pumped-storage power station based on JavaScript scripts is implemented.

[0014] A storage medium described in the present invention stores a computer program, and when the computer program is executed by a processor, it implements any one of the methods for calculating characteristic parameters of electromechanical equipment in a pumped-storage power station based on JavaScript scripts.

[0015] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: (1) Compared with the traditional method, the present invention implements the configuration and calculation of the feature extraction algorithm through JavaScript scripts, which is easier to use and has higher computational efficiency; (2) The present invention is not only applicable to pumped storage power stations, but also supports traditional hydropower stations, wind power, photovoltaic and thermal power stations, and has very high adaptability. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a data flow diagram of the present invention; Figure 2 It is the feature extraction process of the present invention; Figure 3 It is a typical feature extraction script of the present invention; Figure 4 It is the configuration file DEF page of the present invention; Figure 5 It is the configuration file script page of the present invention; Figure 6 It is a schematic diagram of queue storage of the present invention. DETAILED DESCRIPTION

[0017] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0018] like Figure 1 As shown, an embodiment of the present invention provides a method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript scripts, comprising the following steps: S1 custom feature extraction function. Common algorithms used in feature extraction include taking the maximum value, taking the minimum value, taking the average value, counting the cumulative value, the number of changes from 0 to 1 per unit time, the duration of exceeding a certain limit, etc. These algorithms are usually complex to implement. They are solidified in the program and encapsulated into feature extraction functions. When called, they directly query the data and complete the calculation, and then return the final calculation result.

[0019] S2 writes feature extraction scripts. Feature extraction scripts are used to describe the calculation logic for extracting feature parameters. They are written in JavaScript syntax. The program has a built-in reserved character "$", which allows the script to use special syntax "$." and "$()" to call feature extraction functions and obtain measurement point numbers. Figure 2-3As shown in the figure, the script calculates the characteristic parameters of the daily power generation by accumulating the active power of the unit per second. First, the unit active power measurement point number is obtained through the "$()" syntax, and then the custom function is called through the "$." syntax to obtain the 0 o'clock of the day. The first step of the calculation logic is to call the getHisData function to obtain all the active power data of the day, the second step is to call the sum function for accumulation, the third step is to convert the result into "ten thousand degrees" units through division operation, and finally call the setValue function to store it in the database.

[0020] Step 3: Parse the script file. Figure 4-5 As shown in the figure, the feature extraction script is configured in the file. For the feature extraction of pumped storage power stations, usually a set of extraction algorithms needs to be adapted to multiple units at the same time, so the configuration file needs to allow one script to be configured for different units. The configuration file is implemented using Excel, which defines the DEF page to configure the measurement point information and constant information used in the feature script, and defines the script page to configure the extracted feature parameters and feature scripts.

[0021] The DEF page defines the measuring points for script application. The INPUT_NAME column defines the monitoring measuring point name, and the INPUT_XX column is respectively assigned to the measuring point number of different units. The script page defines the calculated characteristic parameter point number, script execution cycle, and feature extraction script. The NAME column and ID column are respectively configured with the characteristic parameter name and point number; the REPLACE column is configured with the unit number, and the unit number is identified by %%=XX. When the measuring point number is obtained by the measuring point name in the script, the configured unit number corresponds to the INPUT_XX column of the DEF page; START_COND defines the script task execution cycle, which is described by cron expression; the SCRIPT page defines the feature extraction script.

[0022] When parsing the configuration file, first parse the correspondence between all the measuring point numbers and characteristic parameter point numbers and their names according to the unit number to form a point number table; then read the script and its execution cycle, and package it into a script execution task; use the "$('measurement point name')" syntax in the script to obtain the measuring point number, map it from the point number table according to the unit number, and convert it into a specific measuring point number.

[0023] S4 script execution. When the script is executed, due to the large number of tasks, tasks are divided according to the script execution cycle, and scripts with the same cycle are divided into the same task. Define a task scheduler, parse cron expressions, and trigger task execution at a scheduled time. When the script task is executed, the JavaScript engine is used to execute the script. The JavaScript engine will call the custom feature extraction function by identifying the reserved character "$".

[0024] S5 characteristic values ​​are stored in the database. Figure 6As shown in the figure, in the script, the feature value is assigned and stored in the database by calling the setValue function. However, the feature extraction program usually calculates a large number of feature parameters at the same time, and data storage is frequently performed. In order to reduce the pressure on the main thread and the database, a storage queue and multiple storage threads are defined. When the script executes the storage operation, the storage task is written to the queue, and the storage thread periodically scans the tasks in the queue to perform the storage operation.

[0025] Specific examples: S1. In the Jixi Pumped Storage Power Station, 10 watt temperature sensors are installed on the upper guide bearing. We place the point numbers of these 10 watt temperature sensors in the unit monitoring system into the calculation script definition page.

[0026] S2. After the calculation script is started, the calculation script is executed every 5 minutes, and each time the information of all watt temperature sensors in the past 5 minutes of the unit monitoring data is obtained according to the 16 point numbers configured in the definition page. As shown in Table 1 Table 1 time Measuring point number Temperature average value 2023 / 6 / 1 0:00 Measuring point 1 38.424 2023 / 6 / 1 0:00 Measuring point 2 39.281 2023 / 6 / 1 0:00 Measuring point 3 38.152 2023 / 6 / 1 0:00 Measuring point 4 38.076 2023 / 6 / 1 0:00 Measuring point 5 38.005 2023 / 6 / 1 0:00 Measuring point 6 37.763 2023 / 6 / 1 0:00 Measuring point 7 37.805 2023 / 6 / 1 0:00 Measuring point 8 38.088 2023 / 6 / 1 0:00 Measuring point 9 38.851 2023 / 6 / 1 0:00 Measuring point 10 38.098 S3. According to the function, calculate the maximum temperature of the watt, the point number corresponding to the maximum temperature of the watt, the minimum temperature of the watt, the point number corresponding to the minimum temperature of the watt, and the difference between the maximum and minimum temperature of the watt. As shown in Table 2 Table 2 S4. Write the calculation results into the eigenvalue database.

[0027] S5. Analyze whether there is any abnormality in the tile temperature system data based on the calculation results. When the maximum tile temperature at a certain time point is greater than the alarm value, you can query the maximum value point number at the same time point to quickly locate the source of the abnormality. S6. Finally, the calculated information is input into the database by calling the storage function.

[0028] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, it implements any one of the methods for calculating characteristic parameters of electromechanical equipment in a pumped-storage power station based on JavaScript scripts.

[0029] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements any one of the methods for calculating characteristic parameters of electromechanical equipment in a pumped-storage power station based on JavaScript scripts.

Claims

1. A method for calculating characteristic parameters of electromechanical equipment in a pumped storage power station based on JavaScript scripts, characterized in that: The following steps are involved: (1) Custom feature extraction function; (2) Use Java language to build feature extraction scripts; (3) Parse the script file and execute it; (4) The characteristic values ​​are stored in the database.

2. A method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript script according to claim 1, characterized in that: In step (1), the feature extraction function includes taking the maximum value, taking the minimum value, taking the average value, statistical cumulative value, the number of changes from 0 to 1 per unit time, and the duration exceeding a certain limit; then it is solidified in the program and encapsulated into multiple feature extraction functions.

3. The method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript script according to claim 1, characterized in that: In step (2), the program has a built-in reserved character "$", which allows the script to use the special syntax "$." and "$()" to call the feature extraction function and obtain the measurement point number; among them, the feature extraction script is used to describe the calculation logic for extracting feature parameters.

4. A method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript script according to claim 3, characterized in that: Step (2) is as follows: first, use the "$()" syntax to obtain the unit's active power measurement point number, then use the "$." syntax to call the custom function to obtain the 0 o'clock of the day. The first step in the calculation logic is to call the getHisData function to obtain all active power data of the day. The second step is to call the sum function for accumulation. The third step is to convert the result into "10,000 degrees" units through division operations, and finally call the setValue function to store it in the database.

5. The method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript script according to claim 1, characterized in that: In step (3), the script is parsed as follows: the configuration file allows a script to be configured and applied to different units; the configuration file is implemented using Excel, wherein a DEF page is defined to configure the measurement point information and constant information applied in the feature script, and then a script page is defined to configure the extracted feature parameters and feature script.

6. A method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript script according to claim 5, characterized in that: In step (3), when parsing the configuration file, firstly, all the measuring point numbers and characteristic parameter point numbers and their names are parsed according to the unit number to form a point number table; then the script and its execution cycle are read and packaged into a script execution task; the "$('measurement point name')" syntax is used in the script to obtain the measuring point number, and the unit number is mapped from the point number table and converted into a specific measuring point number.

7. A method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript script according to claim 1, characterized in that: In step (3), the script execution is specifically as follows: tasks are divided according to the script execution cycle, and scripts with the same cycle are divided into the same task; then a task scheduler is defined to parse the cron expression and trigger the task execution at a fixed time; when the script task is executed, the JavaScript engine is used to execute the script, and the JavaScript engine calls the custom feature extraction function by identifying the reserved character "$".

8. The method for calculating characteristic parameters of electromechanical equipment of a pumped storage power station based on JavaScript script according to claim 1, characterized in that: Step (4) is as follows: define a warehouse entry queue and multiple warehouse entry threads. When the script executes the warehouse entry operation, the warehouse entry task is written into the queue. The warehouse entry thread periodically scans the tasks in the queue to execute the warehouse entry operation.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into the processor, a method for calculating characteristic parameters of electromechanical equipment in a pumped-storage power station based on JavaScript script according to any one of claims 1 to 8 is implemented.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, a method for calculating characteristic parameters of electromechanical equipment in a pumped-storage power station based on JavaScript script according to any one of claims 1 to 8 is implemented.