Virtual power plant time service method, device and equipment and storage medium
By using the main aggregation control unit to generate second pulse signals and clustering algorithms to correct clock residuals in the virtual power plant, the time synchronization problem in the virtual power plant is solved, high-precision time synchronization is achieved, maintenance costs and complexity are reduced, and maintenance costs are improved. Power system stability.
Patent Information
- Application Number
- CN202410656259.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-10
AI Technical Summary
In a virtual power plant, the accumulation of clock errors in power system equipment leads to time synchronization problems, affecting the stability and security of the power system. Moreover, the maintenance and replacement of GPS devices is difficult and costly, affecting the normal operation of the power plant.
The main aggregation control unit in the virtual power plant generates second pulse signals for time synchronization, and uses a clustering algorithm to determine the clock residual data and correct it to reduce time synchronization errors caused by factors such as time delays and achieve high-precision time synchronization.
It achieves high-precision time synchronization between aggregated control units in the virtual power plant, reduces the cost and complexity of GPS device maintenance and replacement, and improves the operating efficiency and stability of the power system.
Smart Images

Figure CN118631376A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of virtual power plants, and in particular to a timing method, device, equipment and storage medium for a virtual power plant. Background Art
[0002] At present, with the advancement of science and technology and the expansion of application fields, people's demand for high-precision time synchronization technology is also increasing; among them, in the power system, it is necessary to coordinate the accurate time of various devices and sensors to ensure the stability and reliability of the power grid. Therefore, the research on high-precision time synchronization technology is of great significance to the development of the power system. The improvement of the power system and the realization of power grid dispatching automation can effectively improve the operating efficiency and reliability of the power system. However, due to the influence of various complex environmental factors such as temperature changes and electromagnetic interference, the built-in clocks of most devices in the field equipment of the power system are difficult to maintain long-term accuracy. During the long-term operation of these devices, the clock errors will gradually accumulate, making the time synchronization problem between devices increasingly prominent.
[0003] The inaccuracy of time and the lack of synchronization not only affect the normal operation and monitoring of the power system, but also may pose a potential threat to the safety and stability of the power system. Therefore, in order to ensure the stable operation and efficient management of the power system, effective measures must be taken to solve the problems of inaccurate equipment clocks and time synchronization. In order to achieve efficient and accurate centralized control and management of each site in the power system, it is particularly important to build a time synchronization network. The core of this network is to provide a unified and highly accurate system clock for the power system to ensure that the clocks of each site within the entire system are synchronized. By achieving clock synchronization, we can ensure that the data collection, processing, transmission and response between each site are highly consistent in time, thereby effectively improving the operating efficiency and stability of the power system. In the operation of the virtual power plant, the aggregation control unit plays a vital role. The aggregation control unit needs to ensure accurate time synchronization between each unit to achieve efficient energy management and optimization.
[0004] However, if a large number of GPS (Global Positioning System) devices and equipment are used as time references between these aggregated control units, although the accuracy of time can be ensured to a certain extent, this method has significant limitations. This is because the maintenance, replacement or upgrade of GPS devices and equipment may become quite difficult and expensive. Among them, due to the scale and complexity of virtual power plants, the number of GPS devices involved may be quite large. Therefore, any operation related to equipment replacement or upgrade will be a huge project, which will not only require a large amount of capital investment, but may also affect the normal operation of the power plant. Summary of the invention
[0005] The present invention provides a virtual power plant timing method, device, equipment and storage medium to solve the problem of poor timing scheme of virtual power plant.
[0006] In a first aspect, the present invention provides a virtual power plant timing method, comprising:
[0007] Generate a first second pulse signal using a first local clock of a master aggregation control unit in a virtual power plant, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit synchronized with a preset timing device;
[0008] Determine a second local clock of the slave aggregation control unit by synchronizing the slave aggregation control unit using the first second pulse signal, and determine clock residual data of the slave aggregation control unit using the first local clock and the second local clock;
[0009] A clustering algorithm and the clock residual data are used to determine a clock correction value of the slave aggregation control unit, and the second local clock is corrected using the clock correction value.
[0010] In a second aspect, the present invention provides a virtual power plant timing device, comprising:
[0011] A pulse-per-second signal generating module, configured to generate a first pulse-per-second signal using a first local clock of a master aggregation control unit in a virtual power plant, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit synchronized with a preset timing device;
[0012] a residual data determination module, configured to determine a second local clock of the slave aggregation control unit by synchronizing the slave aggregation control unit using the first pulse per second signal, and determine clock residual data of the slave aggregation control unit using the first local clock and the second local clock;
[0013] A clock correction module is used to determine the clock correction value of the slave aggregation control unit by using a clustering algorithm and the clock residual data, and to correct the second local clock by using the clock correction value.
[0014] In a third aspect, the present invention provides an electronic device, the electronic device comprising:
[0015] at least one processor;
[0016] and a memory communicatively coupled to the at least one processor;
[0017] Among them, the memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the virtual power plant timing method of the first aspect mentioned above.
[0018] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the virtual power plant timing method of the first aspect when executed.
[0019] The virtual power plant timing scheme provided by the present invention uses the first local clock of the main aggregation control unit in the virtual power plant to generate a first second pulse signal, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit that is time synchronized with a preset timing device, and the slave aggregation control unit is synchronized and timed by using the first second pulse signal to determine the second local clock of the slave aggregation control unit, and the clock residual data of the slave aggregation control unit is determined by using the first local clock and the second local clock, and the clock correction value of the slave aggregation control unit is determined by using a clustering algorithm and the clock residual data, and the second local clock is corrected by using the clock correction value. By adopting the above technical scheme, the slave aggregation control unit is time synchronized by using the master aggregation control unit that has been time synchronized with the preset timing device, and the local clock of each slave aggregation control unit is corrected by using the clustering algorithm and the residual data after time synchronization, which further reduces the timing error caused by factors such as time delay between aggregation control units, and realizes high-precision timing between aggregation control units in the virtual power plant.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0022] Figure 1 is a flow chart of a virtual power plant timing method provided according to Embodiment 1 of the present invention;
[0023] Figure 2 This is a virtual power plant architecture diagram provided according to the first embodiment of the present invention;
[0024] Figure 3is a flow chart of a virtual power plant timing method provided according to Embodiment 2 of the present invention;
[0025] Figure 4 This is a schematic diagram of a synchronization process provided according to Embodiment 2 of the present invention;
[0026] Figure 5 This is a structural schematic diagram of a virtual power plant timing device provided according to Embodiment 3 of the present invention;
[0027] Figure 6 It is a schematic diagram of the structure of an electronic device provided according to Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In the description of the present invention, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are an "or" relationship. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1A flowchart of a virtual power plant timing method is provided for embodiment 1 of the present invention. This embodiment is applicable to the situation where timing is performed on control units in a virtual power plant that require time synchronization. The method can be executed by a virtual power plant timing device. The virtual power plant timing device can be implemented in the form of hardware and / or software. The virtual power plant timing device can be configured in an electronic device. The electronic device can be composed of two or more physical entities or one physical entity.
[0032] like Figure 1 As shown, a virtual power plant timing method provided in the first embodiment of the present invention specifically includes the following steps:
[0033] S101. Generate a first second pulse signal using a first local clock of a master aggregation control unit in a virtual power plant, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit that is synchronized with a preset timing device.
[0034] Figure 2 This is a diagram of a virtual power plant architecture. Figure 2 As shown, the virtual power plant may include multiple aggregation control units and at least one main aggregation control unit. The main aggregation control unit is an aggregation control unit that performs time synchronization with a preset timing device, such as a satellite. The local clock of the main aggregation control unit may be used to generate a clock frequency signal, and then the clock frequency signal may be used to generate a first PPS (Pulse Per Second) signal.
[0035] S102: Determine a second local clock of the slave aggregation control unit by synchronizing the slave aggregation control unit using the first pulse per second signal, and determine clock residual data of the slave aggregation control unit using the first local clock and the second local clock.
[0036] In this embodiment, the first second pulse signal can be used to generate a time synchronization message, and then the message can be used to time the aggregation control unit to achieve time synchronization between the master aggregation control unit and the slave aggregation control unit. After time synchronization, the second local clock of the slave aggregation control unit can be determined. Due to reasons such as time delay, there is still a deviation between the first local clock of the master aggregation control unit and the second local clock of the slave aggregation control unit after time synchronization. The clock residual data of each slave aggregation control unit can be determined based on the first local clock and the second local clock.
[0037] S103: Determine a clock correction value of the slave aggregation control unit using a clustering algorithm and the clock residual data, and use the clock correction value to correct the second local clock.
[0038] In this embodiment, the clock residual data can be clustered using a clustering algorithm according to the mutual distance between the clock residual data, so that a plurality of cluster residual sets can be obtained, wherein each cluster residual set contains a plurality of clock residual data. The target data can be determined from each cluster residual set respectively, and the target data can be used to correct the second local clock associated with the corresponding cluster residual set through software or hardware. The benefit of such a setting is that the workload is greatly reduced compared to adjusting the local clock of the slave aggregation control unit corresponding to each residual data individually. Among them, in each cluster residual set, the target data can be the specified data in the cluster residual set, such as the central data in the cluster residual set, and the difference between the target data and the clock residual data can represent the typical level of time deviation in the cluster residual set.
[0039] The virtual power plant timing method provided by the embodiment of the present invention uses the first local clock of the master aggregation control unit in the virtual power plant to generate a first second pulse signal, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit that is time synchronized with a preset timing device, and the slave aggregation control unit is synchronized and timed by using the first second pulse signal to determine the second local clock of the slave aggregation control unit, and the clock residual data of the slave aggregation control unit is determined by using the first local clock and the second local clock, and the clock correction value of the slave aggregation control unit is determined by using a clustering algorithm and the clock residual data, and the second local clock is corrected by using the clock correction value. The technical solution of the embodiment of the present invention uses the master aggregation control unit that has been time synchronized with the preset timing device to synchronize the slave aggregation control unit, and after time synchronization, the local clock of each slave aggregation control unit is corrected by using a clustering algorithm and residual data, which further reduces the timing error caused by factors such as delay between aggregation control units, and realizes high-precision timing between aggregation control units in the virtual power plant.
[0040] Optionally, the preset timing device includes a Beidou satellite.
[0041] Specifically, the preset timing device may be a device with a high-precision clock and a time synchronization function, such as a Beidou satellite, etc. The main aggregation control unit may be configured with a GPS device, which may synchronize time with a Beidou satellite.
[0042] Embodiment 2
[0043] Figure 3 A flowchart of a virtual power plant timing method provided in the second embodiment of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and a specific method for timing the units in the virtual power plant is given.
[0044] Optionally, the clock correction value of the slave aggregation control unit is determined by using a clustering algorithm and the clock residual data, including: normalizing the clock residual data to obtain data to be processed, and determining the number of residual clusters according to the data to be processed; based on the number of residual clusters, generating residual clusters of the data to be processed by using a K-means clustering algorithm; determining the residual cluster center data of each residual cluster from the data to be processed, and for each residual cluster center data, determining the current residual cluster center data as the clock correction value of the slave aggregation control unit associated with the residual cluster where the current residual cluster center data is located. The advantage of such a setting is that the normalized residual data is divided into different residual cluster groups by using a K-means clustering algorithm, and the respective clock correction value is determined for each residual cluster group, so that the local clock of the slave aggregation control unit can be adjusted more accurately, especially in a complex network environment, which helps to improve the overall time synchronization accuracy, and the workload is further reduced compared to adjusting the local clock of the slave aggregation control unit corresponding to each residual data separately.
[0045] Optionally, the method of synchronizing the slave aggregation control unit with the first second pulse signal to determine the second local clock of the slave aggregation control unit includes: acquiring the clock frequency signal of the slave aggregation control unit, and determining the second second pulse signal of the slave aggregation control unit with the clock frequency signal; correcting the clock frequency signal of the slave aggregation control unit with the first second pulse signal and the second second pulse signal to obtain a clock frequency correction signal; determining the timestamp of the clock synchronization message with the clock frequency correction signal and the second second pulse signal, and synchronizing with the master aggregation control unit with the timestamp to determine the second local clock of the slave aggregation control unit. The advantage of such a setting is that the second pulse signal is used to achieve fast and accurate synchronization of the slave aggregation control unit.
[0046] like Figure 3 As shown, a virtual power plant timing method provided by Embodiment 2 of the present invention specifically includes the following steps:
[0047] S201. Generate a first second pulse signal using the first local clock of the main aggregation control unit in the virtual power plant.
[0048] S202: Acquire a clock frequency signal of the slave aggregation control unit, and use the clock frequency signal to determine a second pulse signal of the slave aggregation control unit.
[0049] Specifically, the (second) second pulse signal of the slave aggregation control unit may be generated using the clock frequency signal of the slave aggregation control unit.
[0050] S203: Use the first pulse per second signal and the second pulse per second signal to correct the clock frequency signal of the slave aggregation control unit to obtain a clock frequency correction signal.
[0051] Specifically, according to the difference between the first pulse per second signal and the second pulse per second signal, the clock frequency signal from the aggregation control unit may be corrected to obtain a clock frequency correction signal.
[0052] Optionally, the method of using the first second pulse signal and the second second pulse signal to correct the clock frequency signal of the slave aggregation control unit to obtain a clock frequency correction signal includes: using the first second pulse signal to determine the first operating time of the master aggregation control unit, and using the second second pulse signal to determine the second operating time of the slave aggregation control unit; and using the quotient of the first operating time and the second operating time to correct the clock frequency signal of the slave aggregation control unit to obtain a clock frequency correction signal.
[0053] Exemplarily, the method for determining the clock frequency correction signal includes:
[0054]
[0055] Among them, R s is the frequency signal to be corrected (i.e., the clock frequency signal from the aggregation control unit), R s ' is the corrected frequency signal (i.e. clock frequency correction signal), ΣΔTm i is the first running time, ΣΔTs i For the second running time.
[0056] S204: Determine the timestamp of the clock synchronization message using the clock frequency correction signal and the second second pulse signal, and synchronize with the master aggregation control unit using the timestamp to determine the second local clock of the slave aggregation control unit.
[0057] Specifically, the clock frequency correction signal after frequency multiplication and the second second pulse signal can be used to generate the timestamp of the clock synchronization message. By using this timestamp to perform multiple synchronizations with the main aggregation control unit, the time synchronization of the main aggregation control unit and the slave aggregation control unit can be achieved, and the second local clock of the slave aggregation control unit can be determined after synchronization.
[0058] Optionally, the use of the timestamp to synchronize with the main aggregation control unit to determine the second local clock of the slave aggregation control unit includes: using the precise time protocol and the timestamp to perform multiple rounds of synchronization to obtain the relative time error of each round of synchronization, and determining the second local clock of the slave aggregation control unit based on the relative time error. The advantage of this setting is that the main aggregation control unit is used as the master clock in the precise time protocol, and the clock signal is synchronized with the slave aggregation control unit, so as to achieve high-precision synchronization and achieve the purpose of unified time reference in the power system.
[0059] Specifically, the working principle of the Precision Time Protocol (PTP) is as follows: use the best master clock algorithm to select an accurate clock source as the best master clock, then exchange message information, and use the local clock synchronization algorithm to periodically synchronize and modify all clocks in the network. Since the time recorded by the master clock (i.e., the local clock of the master aggregation control unit) and the slave clock (i.e., the local clock of the slave aggregation control unit) is also required during message transmission, they must be unified on a time axis for calculation. The relative error between the master clock and the slave clock time axis at a certain absolute moment (i.e., the relative time error between the master and slave clocks) can be recorded as offset. Based on PTP, each slave clock can synchronize the time of the slave clock with the master clock by exchanging synchronization messages with the master clock. The above synchronization process can be divided into two stages: the offset measurement stage and the delay measurement stage. The offset measurement stage includes measuring the time offset between the master clock and the slave clock, and eliminating these offsets on the slave clock. The delay measurement stage includes determining the delay of message transmission between the master clock and the slave clock.
[0060] For example, Figure 4 Figure 1 is a schematic diagram of a synchronization process. Figure 2 As shown, the offset measurement stage specifically includes:
[0061] At every set time interval, the master clock will send a (clock) synchronization message to the slave clock and record the time t1 when the message is sent. When the slave clock receives the message, it will immediately record the current time t2. Among them:
[0062] ms_diff = t2 - t1
[0063] ms_diff = offset + ms_delay
[0064] offset = t slave -t master
[0065] ms_diff is the difference between t1 and t2, ms_delay is the network delay of the clock synchronization message between the master clock and the slave clock, and offset is the master clock time t master With the slave clock t slave The relative error between them is the relative time error.
[0066] The delay measurement phase specifically includes: when the slave clock needs to measure the network delay ms_delay, it can send a delay request message to the master clock and record the current time t3 when the delay request message is sent. The master clock immediately records the current time t4 when receiving the delay request message. Among them:
[0067] sm_diff = t4 - t3
[0068] sm_diff=-offset+sm_delay
[0069] Usually, the network delay is equal, that is, the network delay for sending and receiving messages is equal, so sm_delay = ms_delay
[0070] It can be determined that:
[0071] offset=[(t2-t1)-(t4-t3)] / 2
[0072] sm_diff is the difference between t4 and t3, and sm_delay is the network delay of the delay request message between the master clock and the slave clock.
[0073] As the synchronization process proceeds, the relative time error offset can be used to continuously correct the slave clock, and the corrected slave clock can be used for the next round of time synchronization. After multiple rounds of synchronization, the offset between the master clock and the slave clock can be gradually reduced, improving the time synchronization accuracy.
[0074] S205: Determine clock residual data of the slave aggregation control unit by using the first local clock and the second local clock.
[0075] Specifically, the error that still exists between the first local clock and the second local clock can be used as a clock residual.
[0076] S206: Normalize the clock residual data to obtain data to be processed, and determine the number of residual clusters according to the data to be processed.
[0077] Specifically, the number of residual clusters may be preset according to the distribution of the data to be processed.
[0078] Optionally, determining the number of residual clusters based on the data to be processed includes: determining the total distortion degree of different preset initial numbers of residual clusters based on the Euclidean distance between the data to be processed and the center of the preset residual cluster; determining the target distortion degree from the total distortion degree according to the elbow rule, and determining the preset initial number of residual clusters corresponding to the target distortion degree as the number of residual clusters.
[0079] Exemplary methods for determining the total distortion degree include:
[0080]
[0081] Where D(k) is the total distortion degree when the number of initial residual clusters is preset to k, k = 1, 2, ..., kmax, n is the total number of data to be processed, x i is the i-th data to be processed, and C is the center of the preset residual cluster μ j The set composed of ||x i -μ j || is the Euclidean distance between the i-th data to be processed and the j-th preset residual cluster center, j = 1, 2, ..., jmax. The number of preset residual cluster centers is consistent with the number of initial residual clusters. A graph of D(k) versus k can be plotted, and the "elbow" in the graph can be determined according to the Elbow Method, that is, the k value at which the rate of decline of D(k) begins to slow down. This k value is the optimal k, that is, the number of residual clusters.
[0082] S207 . Based on the number of residual clusters, generate residual clusters of the data to be processed using a K-means clustering algorithm.
[0083] S208, determining the residual cluster center data of each residual cluster from the data to be processed, and for each residual cluster center data, determining the current residual cluster center data as the clock correction value of the associated slave aggregation control unit of the residual cluster where the current residual cluster center data is located.
[0084] Specifically, the process of determining the clock correction value includes the following two steps:
[0085] Step (1) preset the initial cluster center of each residual cluster, use the K-means clustering algorithm to determine the distance between the data to be processed and each initial cluster center, and distribute the data to be processed to the set where each initial cluster center is located to form a residual cluster. Among them, the Euclidean distance can be used as a similarity measure, and the sum of squared errors (Sum of Squared Error, SSE) can be used as an objective function to measure the clustering quality. By determining the minimization objective function, the residual clusters can be generated according to the distance of the data to be processed from the initial cluster center;
[0086] Step (2) updates the cluster center of each residual cluster through an iterative algorithm until the cluster center of the residual cluster no longer changes. At this time, the data to be processed corresponding to the cluster center is the residual cluster center data, thereby obtaining a clock correction value.
[0087] S209: Correct the second local clock using the clock correction value.
[0088] The virtual power plant timing method provided in the embodiment of the present invention utilizes second pulse signals to realize fast and accurate timing of slave aggregation control units, and determines residual data after timing. The normalized residual data is divided into different residual cluster groups by utilizing the K-means clustering algorithm, and the respective clock correction values are determined for each residual cluster group, so that the local clock of the slave aggregation control unit can be adjusted more accurately, especially in a complex network environment, which helps to improve the overall time synchronization accuracy. Compared with adjusting the local clock of the slave aggregation control unit corresponding to each residual data individually, the workload is further reduced.
[0089] Embodiment 3
[0090] Figure 5 This is a schematic diagram of the structure of a virtual power plant timing device provided in the third embodiment of the present invention. Figure 5 As shown, the device includes: a pulse per second signal generating module 301, a residual data determining module 302 and a clock correction module 303, wherein:
[0091] A pulse-per-second signal generating module, configured to generate a first pulse-per-second signal using a first local clock of a master aggregation control unit in a virtual power plant, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit synchronized with a preset timing device;
[0092] a residual data determination module, configured to determine a second local clock of the slave aggregation control unit by synchronizing the slave aggregation control unit using the first pulse per second signal, and determine clock residual data of the slave aggregation control unit using the first local clock and the second local clock;
[0093] A clock correction module is used to determine the clock correction value of the slave aggregation control unit by using a clustering algorithm and the clock residual data, and to correct the second local clock by using the clock correction value.
[0094] The virtual power plant timing device provided in the embodiment of the present invention uses a master aggregation control unit that has been synchronized with a preset timing device to synchronize the slave aggregation control units, and uses a clustering algorithm and residual data to correct the local clock of each slave aggregation control unit after time synchronization, thereby further reducing the timing error between the aggregation control units caused by factors such as time delay, and realizing high-precision timing between the aggregation control units in the virtual power plant.
[0095] Optionally, the clock correction module includes:
[0096] A residual cluster number determination unit, configured to perform normalization processing on the clock residual data to obtain data to be processed, and determine the number of residual clusters according to the data to be processed;
[0097] A residual cluster determination unit, configured to generate residual clusters of the data to be processed by using a K-means clustering algorithm based on the number of residual clusters;
[0098] A clock correction value determination unit is used to determine the residual cluster center data of each residual cluster from the data to be processed, and for each residual cluster center data, determine the current residual cluster center data as the clock correction value of the associated slave aggregation control unit of the residual cluster where the current residual cluster center data is located.
[0099] Optionally, determining the number of residual clusters based on the data to be processed includes: determining the total distortion degree of different preset initial numbers of residual clusters based on the Euclidean distance between the data to be processed and the center of the preset residual cluster; determining the target distortion degree from the total distortion degree according to the elbow rule, and determining the preset initial number of residual clusters corresponding to the target distortion degree as the number of residual clusters.
[0100] Optionally, the residual data determination module includes:
[0101] a second pulse signal generating unit, configured to obtain a clock frequency signal of the slave aggregation control unit, and determine a second second pulse signal of the slave aggregation control unit using the clock frequency signal;
[0102] a clock frequency correction signal determining unit, configured to correct the clock frequency signal of the slave aggregation control unit by using the first pulse per second signal and the second pulse per second signal to obtain a clock frequency correction signal;
[0103] The local clock determination unit is used to use the clock frequency correction signal and the second second pulse signal to determine the timestamp of the clock synchronization message, and use the timestamp to synchronize with the main aggregation control unit to determine the second local clock of the slave aggregation control unit.
[0104] Optionally, the method of using the first second pulse signal and the second second pulse signal to correct the clock frequency signal of the slave aggregation control unit to obtain a clock frequency correction signal includes: using the first second pulse signal to determine the first operating time of the master aggregation control unit, and using the second second pulse signal to determine the second operating time of the slave aggregation control unit; and using the quotient of the first operating time and the second operating time to correct the clock frequency signal of the slave aggregation control unit to obtain a clock frequency correction signal.
[0105] Optionally, using the timestamp to synchronize with the master aggregation control unit to determine the second local clock of the slave aggregation control unit includes: using the precise time protocol and the timestamp to perform multiple rounds of synchronization to obtain a relative time error in each round of synchronization, and determining the second local clock of the slave aggregation control unit based on the relative time error.
[0106] Optionally, the preset timing device includes a Beidou satellite.
[0107] The virtual power plant timing device provided in the embodiment of the present invention can execute the virtual power plant timing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0108] Embodiment 4
[0109] Figure 6 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0110] like Figure 6As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0111] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0112] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 41 executes the various methods and processes described above, such as a virtual power plant timing method.
[0113] In some embodiments, the virtual power plant timing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the virtual power plant timing method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the virtual power plant timing method in any other appropriate manner (e.g., by means of firmware).
[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0116] The computer device provided above can be used to execute the virtual power plant timing method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0117] Embodiment 5
[0118] In the context of the present invention, a computer-readable storage medium may be a tangible medium, wherein the computer-executable instructions, when executed by a computer processor, are used to perform a virtual power plant timing method, the method comprising:
[0119] Generate a first second pulse signal using a first local clock of a master aggregation control unit in a virtual power plant, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit synchronized with a preset timing device;
[0120] Determine a second local clock of the slave aggregation control unit by synchronizing the slave aggregation control unit using the first second pulse signal, and determine clock residual data of the slave aggregation control unit using the first local clock and the second local clock;
[0121] A clustering algorithm and the clock residual data are used to determine a clock correction value of the slave aggregation control unit, and the second local clock is corrected using the clock correction value.
[0122] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by an instruction execution system, device or equipment or used with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0123] The computer device provided above can be used to execute the virtual power plant timing method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0124] It is worth noting that in the embodiment of the above-mentioned virtual power plant timing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0125] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A virtual power plant timing method, characterized in that: include: Generate a first second pulse signal using a first local clock of a master aggregation control unit in a virtual power plant, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit synchronized with a preset timing device; Determine a second local clock of the slave aggregation control unit by synchronizing the slave aggregation control unit using the first second pulse signal, and determine clock residual data of the slave aggregation control unit using the first local clock and the second local clock; A clustering algorithm and the clock residual data are used to determine a clock correction value of the slave aggregation control unit, and the second local clock is corrected using the clock correction value.
2. The method according to claim 1, characterized in that The determining the clock correction value of the slave aggregation control unit by using a clustering algorithm and the clock residual data includes: Normalizing the clock residual data to obtain data to be processed, and determining the number of residual clusters according to the data to be processed; Based on the number of residual clusters, a K-means clustering algorithm is used to generate residual clusters of the data to be processed; The residual cluster center data of each residual cluster is determined from the data to be processed, and for each residual cluster center data, the current residual cluster center data is determined as the clock correction value of the slave aggregation control unit associated with the residual cluster where the current residual cluster center data is located.
3. The method according to claim 2, characterized in that The determining the number of residual clusters according to the data to be processed includes: Determining the total distortion degree of different preset initial residual cluster numbers according to the Euclidean distance between the data to be processed and the preset residual cluster center; A target distortion degree is determined from the total distortion degree according to the elbow rule, and a preset initial residual cluster number corresponding to the target distortion degree is determined as the residual cluster number.
4. The method according to any one of claims 1 to 3, characterized in that The step of synchronizing the slave aggregation control unit by using the first pulse per second signal to determine the second local clock of the slave aggregation control unit includes: Acquire a clock frequency signal of the slave aggregation control unit, and determine a second pulse signal of the slave aggregation control unit by using the clock frequency signal; Using the first pulse-per-second signal and the second pulse-per-second signal, the clock frequency signal of the slave aggregation control unit is corrected to obtain a clock frequency correction signal; The clock frequency correction signal and the second second pulse signal are used to determine the timestamp of the clock synchronization message, and the timestamp is used to synchronize with the master aggregation control unit to determine the second local clock of the slave aggregation control unit.
5. The method according to claim 4, characterized in that The method of correcting the clock frequency signal of the slave aggregation control unit by using the first pulse per second signal and the second pulse per second signal to obtain a clock frequency correction signal includes: Determine a first operating time of the master aggregation control unit using the first pulse-per-second signal, and determine a second operating time of the slave aggregation control unit using the second pulse-per-second signal; The clock frequency signal of the slave aggregation control unit is corrected using the quotient of the first running time and the second running time to obtain a clock frequency correction signal.
6. The method according to claim 4, characterized in that The using the timestamp to synchronize with the master aggregation control unit to determine the second local clock of the slave aggregation control unit includes: Multiple rounds of synchronization are performed using the precise time protocol and the timestamp to obtain a relative time error in each round of synchronization, and the second local clock of the slave aggregation control unit is determined according to the relative time error.
7. The method according to claim 1, characterized in that The preset timing equipment includes Beidou satellite.
8. A virtual power plant timing device, characterized in that: include: A pulse-per-second signal generating module, configured to generate a first pulse-per-second signal using a first local clock of a master aggregation control unit in a virtual power plant, wherein the virtual power plant includes a slave aggregation control unit and the master aggregation control unit synchronized with a preset timing device; a residual data determination module, configured to determine a second local clock of the slave aggregation control unit by synchronizing the slave aggregation control unit using the first pulse per second signal, and determine clock residual data of the slave aggregation control unit using the first local clock and the second local clock; A clock correction module is used to determine the clock correction value of the slave aggregation control unit by using a clustering algorithm and the clock residual data, and to correct the second local clock by using the clock correction value.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the virtual power plant timing method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the virtual power plant timing method according to any one of claims 1 to 7 when executed.
