A clock synchronization method, device, driver and storage medium

By receiving and calculating the transmission duration and local time of the synchronization frame, the local clock of the drive is adjusted to achieve time synchronization, which solves the time base consistency problem in the multi-drive pitch system, ensures the stability of the control loop and the coordinated operation of the motor, and improves the safety of the wind turbine generator set.

CN122159992APending Publication Date: 2026-06-05YUANJIAN WIND POWER JIANGYINENVISION ENERGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YUANJIAN WIND POWER JIANGYINENVISION ENERGY CO LTD
Filing Date
2026-02-10
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In the multi-drive pitch system of wind turbine generators, due to factors such as the difference in crystal oscillator accuracy, temperature drift and cumulative error of the independent clock sources integrated in each drive, it is difficult to maintain the consistency of the time base, which affects the synchronization accuracy of the control loop, and in turn leads to problems such as uneven motor load distribution and increased vibration.

Method used

By receiving the synchronization frame sent by the first driver, the transmission duration and local time are obtained, the time difference is calculated, and the second local clock is adjusted according to the difference to achieve synchronization with the first local clock. Data transmission is carried out using a CAN communication bus, and the adjustment range is controlled by a preset duration threshold to ensure the stability of the control loop.

Benefits of technology

Time synchronization between different drives was achieved, ensuring the stability of the control loop, avoiding uneven load distribution and increased vibration of the motor, and improving the safe and stable operation of the wind turbine generator set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122159992A_ABST
    Figure CN122159992A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a clock synchronization method, device, driver and storage medium, wherein a first time difference value of a second local clock and a first local clock can be determined according to a first transmission time length of a first synchronization frame, a first current time of the first local clock and a second current time of the second local clock. Then, the second local clock can be adjusted according to the first time difference value, so that the second local clock and the first local clock realize time synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wind power generation technology, and in particular to a clock synchronization method, device, driver, and storage medium. Background Technology

[0002] In the multi-drive pitch system of a wind turbine generator, multiple independent drives control corresponding motors (such as permanent magnet synchronous motors). These motors are mechanically connected to the pitch bearings through a dedicated reduction gearbox, and together drive the same blade to achieve precise angle adjustment.

[0003] However, the independent clock sources integrated within each driver are difficult to maintain stable time reference consistency over the long term due to factors such as differences in crystal oscillator accuracy, temperature drift, and accumulated errors. When the clock synchronization accuracy (e.g., microsecond-level time synchronization accuracy) between distributed drivers cannot meet control requirements, it will directly lead to time deviations in the control loops (e.g., speed loop, position loop, and current loop) of multiple drivers. This will further trigger a chain reaction of problems such as uneven load distribution among multiple motors and increased vibration during blade rotation, threatening the safe and stable operation of the wind turbine generator set.

[0004] Therefore, how to achieve time synchronization between local clocks in different drivers has become a pressing technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a clock synchronization method, apparatus, driver, and storage medium that enable local clocks in different drivers to achieve time synchronization.

[0006] In a first aspect, embodiments of this application provide a clock synchronization method applied to a second driver, comprising: receiving a first synchronization frame sent by a first driver, the first synchronization frame including a first current time of a first local clock in the first driver; at the moment the first synchronization frame is received, obtaining a second current time of a second local clock, the second local clock being located in the second driver; obtaining a first transmission duration of the first synchronization frame; determining a first time difference between the second local clock and the first local clock based on the first transmission duration, the first current time, and the second current time; and adjusting the second local clock based on the first time difference to synchronize the second local clock with the first local clock.

[0007] Optionally, receiving the first synchronization frame sent by the first driver includes: receiving the first synchronization frame sent by the first driver via the CAN communication bus.

[0008] Optionally, obtaining the first transmission duration of the first synchronization frame includes: obtaining the baud rate of the CAN communication bus and the total number of bits included in the first synchronization frame; and determining the first transmission duration of the first synchronization frame based on the baud rate of the CAN communication bus and the total number of bits included in the first synchronization frame.

[0009] Optionally, adjusting the second local clock according to the first time difference to synchronize the second local clock with the first local clock includes: determining whether the first time difference is less than a preset duration threshold; and adjusting the second local clock according to the first time difference if the first time difference is less than or equal to the preset duration threshold to synchronize the second local clock with the first local clock.

[0010] Optionally, adjusting the second local clock according to the first time difference to synchronize the second local clock with the first local clock further includes: adjusting the second local clock according to the preset duration threshold to reduce the first time difference between the second local clock and the first local clock when the first time difference is greater than the preset duration threshold; receiving a second synchronization frame sent by a first driver, the second synchronization frame including a third current time of the first local clock in the first driver; obtaining a fourth current time of the second local clock at the moment the second synchronization frame is received; obtaining a second transmission duration of the second synchronization frame; determining a second time difference between the second local clock and the first local clock according to the second transmission duration, the third current time, and the fourth current time; and adjusting the second local clock according to the second time difference to synchronize the second local clock with the first local clock.

[0011] Optionally, adjusting the second local clock according to the first time difference to synchronize the second local clock with the first local clock further includes: adjusting the second local clock according to the preset duration threshold when the first time difference is greater than the preset duration threshold; determining a third time difference between the second local clock and the first local clock according to the first time difference and the preset duration threshold; and adjusting the second local clock according to the third time difference to synchronize the second local clock with the first local clock.

[0012] Optionally, before determining whether the first time difference is less than a preset duration threshold, the method further includes: obtaining the cycle duration and runtime of the control loop; calculating the difference between the cycle duration and runtime; and using the difference between the cycle duration and runtime as the preset duration threshold.

[0013] Secondly, embodiments of this application provide a clock synchronization device applied to a second driver and disposed within the second driver, comprising: a receiving module for receiving a first synchronization frame sent by a first driver, the first synchronization frame including a first current time of a first local clock in the first driver; a first acquiring module for acquiring a second current time of a second local clock located in the second driver at the moment the first synchronization frame is received; a second acquiring module for acquiring a first transmission duration of the first synchronization frame; a determining module for determining a first time difference between the second local clock and the first local clock based on the first transmission duration, the first current time, and the second current time; and an adjusting module for adjusting the second local clock based on the first time difference to synchronize the second local clock with the first local clock.

[0014] In a second aspect, embodiments of this application provide a driver, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the driver implements the method described in any one of the first aspects above.

[0015] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any one of the first aspects above.

[0016] Fourthly, embodiments of this application provide a multi-drive pitch system, including any of the drives described in the second aspect above.

[0017] Fifthly, embodiments of this application provide a wind turbine generator set, including any of the drivers described in the fourth aspect above.

[0018] This application provides a clock synchronization method, apparatus, driver, and storage medium. A first time difference between a second local clock and a first local clock is determined based on a first transmission duration of a first synchronization frame, a first current time of a first local clock, and a second current time of a second local clock. Then, the second local clock can be adjusted based on the first time difference to achieve time synchronization with the first local clock. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic flowchart of a clock synchronization method provided for an embodiment of this application; Figure 2 A flowchart illustrating a method for adjusting a second local clock provided in an embodiment of this application; Figure 3 Another flowchart illustrating a method for adjusting a second local clock provided for an embodiment of this application; Figure 4 Another flowchart illustrating a method for adjusting a second local clock provided for an embodiment of this application; Figure 5 A schematic diagram of a clock synchronization device provided for an embodiment of this application; Figure 6 This is a schematic diagram of a driver provided in an embodiment of this application. Detailed Implementation

[0021] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.

[0022] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.

[0023] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0024] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processors means two or more processors, multiple elements means two or more elements, etc.

[0025] This application provides a clock synchronization method, apparatus, driver, and storage medium that enable local clocks in different drivers to achieve time synchronization.

[0026] This application provides a clock synchronization method, which can be executed by a second driver, such as... Figure 1 As shown, the clock synchronization method may specifically include the following steps: S11, receive a first synchronization frame sent by the first driver, the first synchronization frame including the first current time of the first local clock in the first driver.

[0027] Specifically, the first driver and the second driver are communicatively connected. The first driver may include a processor, and the processor may include a counter. The local clock in the first driver (i.e., the first local clock) is typically driven by a high-precision clock source (such as a crystal oscillator), and the clock pulses are accumulated by the counter.

[0028] The processor can read the current count value in the counter and determine the current time of the first local clock (i.e., the first current time) based on the current count value and the period duration of the system clock pulse. Then, the first driver can generate a timestamp including the first current time and send a synchronization frame including the timestamp (i.e., the first synchronization frame) to the second driver. In this way, the second driver can receive the first synchronization frame including the first current time sent by the first driver.

[0029] In one specific implementation, the first and second drivers can communicate via a Controller Area Network (CAN) bus. Specifically, the CAN bus is a serial communication protocol bus used for real-time applications. It uses twisted-pair cables to transmit signals and is one of the most widely used fieldbuses in the world.

[0030] S12, at the moment the first synchronization frame is received, the second current moment of the second local clock is obtained, the second local clock is located in the second driver.

[0031] Specifically, the second driver may include a processor, and the processor may include a counter. When the second driver receives the first synchronization frame, the processor may read the current count value in the counter and determine the current time (i.e., the second current time) of the local clock (i.e., the second local clock) based on the current count value and the period of the system clock pulse.

[0032] S13, obtain the first transmission duration of the first synchronization frame.

[0033] In this step, the processor in the second driver can obtain the transmission duration of the first synchronization frame (i.e., the first transmission duration). Specifically, when the first driver and the second driver are connected via a CAN communication bus, after receiving the first synchronization frame, the processor in the second driver can parse the total number of bits included in the first synchronization frame and, in conjunction with the preset baud rate of the CAN communication bus, calculate the transmission duration of the first synchronization frame. Specifically, the first transmission duration is equal to the total number of bits in the first synchronization frame divided by the preset baud rate of the CAN communication bus.

[0034] It should be noted that baud rate describes the number of symbols transmitted per unit of time, and the unit is baud. When using a CAN communication bus, each symbol typically corresponds to 1 bit; therefore, in these scenarios, baud rate is often equated with bit rate. Users can configure the baud rate value according to their actual needs.

[0035] S14, determine the first time difference between the second local clock and the first local clock based on the first transmission duration, the first current time, and the second current time.

[0036] In this step, the processor in the second driver can parse the first synchronization frame to obtain the first current time. Then, by subtracting the first current time and the first transmission duration from the second current time, a first time difference can be determined. This first time difference represents the time difference between the second local clock and the first local clock. For example, a first time difference of td indicates that the second local clock lags behind the first local clock by a duration of td. More specifically, if td = 0, it indicates that the second local clock is completely synchronized with the first local time.

[0037] S15, adjust the second local clock according to the first time difference to synchronize the second local clock with the first local clock.

[0038] In this step, the processor in the second driver can adjust the count value of its counter based on the first time difference, thereby synchronizing the second local clock with the first local clock. Specifically, the processor can divide the first time difference by the system clock cycle to calculate the count difference between the counters in the two drivers. Then, after obtaining the current count value in the counter of the second driver, the processor in the second driver can subtract the aforementioned count difference from the current count value to obtain a new count value. Next, the processor in the second driver can write this new count value into the counter of the second driver, thereby making the count values ​​of the counters in the two drivers consistent, that is, achieving the effect of synchronizing the time of the first local clock and the second local clock.

[0039] It should be noted that when there are two or more drivers, one driver can use the above method to synchronize the clocks of all the other drivers, thereby achieving the technical effect of synchronizing the clocks of all drivers. For example, in the case of one master driver and three slave drivers, the three slave drivers can use the aforementioned method to achieve time synchronization with the master driver.

[0040] In another implementation, the master driver can also use the aforementioned method to achieve time synchronization with any of the slave drivers. In yet another implementation, the slave driver can also use the aforementioned method to achieve time synchronization with another slave driver.

[0041] In some embodiments of this application, such as Figure 2 As shown, when executing step S15, the second driver can specifically perform the following sub-steps: S151, determine whether the first time difference is less than a preset duration threshold.

[0042] In this step, the processor in the second driver can determine whether the first time difference is less than a preset duration threshold. The preset duration threshold can be the maximum allowable adjustment value, and the user can set the size of the preset duration threshold according to their actual needs.

[0043] S152, if the first time difference is less than or equal to the preset duration threshold, adjust the second local clock according to the first time difference so that the second local clock is synchronized with the first local clock.

[0044] In this step, the processor in the second driver can directly adjust the time of the second local clock according to the first time difference if the first time difference is less than or equal to a preset duration threshold, thereby synchronizing the time of the second local clock with the first local clock. This method ensures that the time adjustment range of the second local clock does not exceed the preset duration threshold.

[0045] In one example, the application scenario of this application embodiment is a scenario where two electric motors are coaxially driven, and these two motors are driven by a first driver and a second driver, respectively. Specifically, coaxial drive of two electric motors refers to a system architecture in which the output shafts of two independent electric motors are coaxially connected to the same mechanical spindle, and collaboratively drive the rotation of the spindle. In a more specific application scenario, the first driver and the second driver can drive the blades to rotate through two reduction gearboxes and a pitch bearing. The first driver can be the master driver, and the second driver can be the slave driver.

[0046] Both the first and second drivers operate control loops (position loop, speed loop, or current loop). If their clocks are not synchronized, their control loops cannot achieve synchronization, thus affecting the stability of the control system. To address this, the processor in the second driver can obtain the cycle length and runtime of the control loop (i.e., the actual required runtime of the control loop), calculate the difference between them, and use this difference as a preset duration threshold. By controlling the adjustment of the second local clock to not exceed the preset duration threshold, it can be ensured that the actual runtime of the control loop is greater than the runtime of the control loop, avoiding insufficient runtime and ensuring the normal operation of the control loop in the second driver, thereby preventing any impact on the stability of the control system.

[0047] When there are two or more motors, the number of drivers is the same as the number of motors. In this case, the method for synchronizing the control loops of each driver is similar to that described above, and will not be elaborated here.

[0048] If the aforementioned first time difference is greater than the aforementioned preset duration threshold, directly adjusting the time of the second local clock based on this first time difference will result in an excessively large adjustment. Continuing with the previous example, the preset duration threshold is equal to the difference between the cycle length and runtime of the control loop in the second driver. If the first time difference is greater than this preset duration threshold, directly adjusting the time of the second local clock in the second driver based on this first time difference will result in insufficient actual runtime of the control loop in the second driver. This will cause the control loop in the second driver to malfunction, affecting the stability of the control system.

[0049] To avoid the aforementioned technical problems, such as Figure 3 As shown, when executing step S15, the second driver may perform the following sub-steps: S153A, when the first time difference is greater than the preset duration threshold, the second local clock is adjusted according to the preset duration threshold to reduce the first time difference between the second local clock and the first local clock.

[0050] Specifically, if the first time difference is greater than a preset duration threshold, the processor in the second driver can adjust the time of the second local clock using the preset duration threshold, thereby reducing the first time difference between the second local clock and the first local clock. For example, if the first time difference is td, the preset duration threshold is t1, and td is greater than t1, then the second processor can adjust the time of the second local clock according to t1, thereby reducing the first time difference.

[0051] S154A, receive a second synchronization frame sent by the first driver, the second synchronization frame including the third current time of the first local clock in the first driver.

[0052] S155A: Upon receiving the second synchronization frame, obtain the fourth current time of the second local clock.

[0053] S156A, obtain the second transmission duration of the second synchronization frame.

[0054] S157A, based on the second transmission duration, the third current time, and the fourth current time, determine the second time difference between the second local clock and the first local clock.

[0055] S158A, adjust the second local clock according to the second time difference to synchronize the second local clock with the first local clock.

[0056] Specifically, steps S154A to S158A are implemented in the same way as steps S11 to S15 described above, and the relevant details can be found in the preceding description. Using this implementation, after adjusting the second local clock, the time difference between the second and first local clocks (i.e., the second time difference) can be determined. Then, the same method can be used to further adjust the time of the second local clock, thereby achieving time synchronization between the second and first local clocks.

[0057] In this embodiment, the time of the second local clock is adjusted iteratively. When the time difference between the second and first local clocks exceeds a preset duration threshold, the time of the second local clock is adjusted according to the preset duration threshold to reduce the time difference. This process is repeated until the time difference is less than the preset duration threshold. At this point, the time difference is used to adjust the time of the second local clock, achieving time synchronization. By employing multiple time adjustments, each adjustment increment is less than or equal to the preset duration threshold, preventing insufficient actual runtime of the control loop and ensuring the normal operation of the control loop in the second driver, thus avoiding impacts on the stability of the control system.

[0058] In addition to the above implementation methods, to avoid the problem of excessive adjustment of the second local clock, such as Figure 4 As shown, when executing step S15, the second driver may also execute the following sub-steps: S153B, if the first time difference is greater than the preset duration threshold, adjust the second local clock according to the preset duration threshold.

[0059] Specifically, if the first time difference is greater than a preset duration threshold, the processor in the second driver can adjust the time of the second local clock using the preset duration threshold, thereby reducing the first time difference between the second local clock and the first local clock. For example, if the first time difference is td, the preset duration threshold is t1, and td is greater than t1, then the second processor can adjust the time of the second local clock according to t1, thereby reducing the first time difference.

[0060] S154B, based on the first time difference and the preset duration threshold, determine the third time difference between the second local clock and the first local clock.

[0061] In this step, the processor in the second driver can determine a new time difference (i.e., a third time difference) between the second local clock and the first local clock based on the first time difference td and the preset duration threshold t1. Specifically, after adjusting the first time difference using the preset duration threshold t1, the new time difference (i.e., the third time difference) is tdn = td - t1.

[0062] S155B, adjust the second local clock according to the third time difference to synchronize the second local clock with the first local clock.

[0063] In this embodiment, the processor in the second driver can adjust the counter value in the processor according to the third time difference, thereby synchronizing the time of the second local clock and the first local clock. The implementation method is the same as that of step S15 described above, and will not be detailed here.

[0064] In this embodiment, the time of the second local clock is adjusted iteratively. When the time difference between the second and first local clocks exceeds a preset duration threshold, the time of the second local clock is adjusted according to the preset duration threshold to reduce the time difference. This process is repeated until the time difference is less than the preset duration threshold. At this point, the time difference is used to adjust the time of the second local clock, achieving time synchronization. By employing multiple time adjustments, each adjustment increment is less than or equal to the preset duration threshold, preventing insufficient actual operating time of the control loop and ensuring the normal operation of the control loop in the second driver, thus avoiding impacts on the stability of the control system.

[0065] The difference between this embodiment and the previous embodiment lies only in the method of determining the time difference between the second local clock and the first local clock after adjusting the second local clock. Specifically, in the previous embodiment, the processor of the second driver can execute steps S154A to S158A to determine the time difference between the second local clock and the first local clock. In this embodiment, the processor of the second driver can directly determine the new time difference between the second local clock and the first local clock (i.e., the third time difference) based on the original time difference (i.e., the first time difference) and a preset duration threshold.

[0066] This application also provides a clock synchronization device, such as... Figure 5 As shown, the clock synchronization device 5 is disposed in the second driver and includes: a receiving module 51, used to receive a first synchronization frame sent by the first driver, the first synchronization frame including a first current time of a first local clock in the first driver; a first acquisition module 52, used to acquire a second current time of a second local clock located in the second driver at the moment the first synchronization frame is received; a second acquisition module 53, used to acquire a first transmission duration of the first synchronization frame; a determining module 54, used to determine a first time difference between the second local clock and the first local clock based on the first transmission duration, the first current time, and the second current time; and an adjusting module 55, used to adjust the second local clock based on the first time difference to synchronize the second local clock with the first local clock.

[0067] Optionally, the receiving module 51 is specifically used to receive the first synchronization frame sent by the first driver via the CAN communication bus.

[0068] Optionally, the second acquisition module 53 is specifically used to acquire the baud rate of the CAN communication bus and the total number of bits included in the first synchronization frame; and to determine the first transmission duration of the first synchronization frame based on the baud rate of the CAN communication bus and the total number of bits included in the first synchronization frame.

[0069] Optionally, the adjustment module 55 is specifically used to determine whether the first time difference is less than a preset duration threshold; if the first time difference is less than or equal to the preset duration threshold, the second local clock is adjusted according to the first time difference so that the second local clock is synchronized with the first local clock.

[0070] Optionally, the adjustment module 55 is further configured to: when the first time difference is greater than the preset duration threshold, adjust the second local clock according to the preset duration threshold to reduce the first time difference between the second local clock and the first local clock; receive a second synchronization frame sent by the first driver, the second synchronization frame including the third current time of the first local clock in the first driver; at the moment the second synchronization frame is received, obtain the fourth current time of the second local clock; obtain the second transmission duration of the second synchronization frame; determine the second time difference between the second local clock and the first local clock according to the second transmission duration, the third current time, and the fourth current time; and adjust the second local clock according to the second time difference to synchronize the second local clock with the first local clock.

[0071] Optionally, the adjustment module 55 is further configured to, when the first time difference is greater than the preset duration threshold, adjust the second local clock according to the preset duration threshold; determine a third time difference between the second local clock and the first local clock according to the first time difference and the preset duration threshold; and adjust the second local clock according to the third time difference to synchronize the second local clock with the first local clock.

[0072] Optionally, the clock synchronization device 5 further includes a calculation module, which is used to obtain the cycle length and runtime of the control loop; calculate the difference between the cycle length and runtime; and use the difference between the cycle length and runtime as a preset duration threshold.

[0073] The clock synchronization device 5 provided in this application embodiment can execute the method executed by the second driver in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0074] like Figure 6 As shown in the embodiments of this application, a driver is also provided. The driver includes a memory and a processor. The memory is used to store a computer program. When the computer program is executed by the processor, the clock synchronization method described above can be implemented. For details, please refer to the description of the foregoing embodiments.

[0075] Specifically, at the hardware level, the driver may include a processor, an internal bus, and memory. The memory may include main memory and non-volatile memory. The processor reads the corresponding computer program from the non-volatile memory into main memory and then executes it. Those skilled in the art will understand that... Figure 6 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned driver. For example, the driver may also include a... Figure 6 The components shown may include more or fewer components, such as other processing hardware like a GPU (Graphics Processing Unit) or external communication ports. Of course, this application does not exclude other implementation methods besides software implementations, such as logic devices or a combination of hardware and software.

[0076] In this embodiment, the processor may include a central processing unit (CPU) or a graphics processing unit (GPU), and may also include other microcontrollers, logic gates, integrated circuits, or appropriate combinations thereof with logic processing capabilities. The memory described in this embodiment can be a storage device for storing information. In digital systems, a device capable of storing binary data can be a memory; in integrated circuits, a circuit without physical form but with storage function can also be a memory, such as RAM or FIFO; in a system, a storage device with physical form can also be called a memory. In implementation, this memory can also be implemented using a cloud storage method; the specific implementation method is not limited in this specification.

[0077] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the clock synchronization method described above.

[0078] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the clock synchronization method described above.

[0079] This application also provides a multi-drive pitch system, including any of the aforementioned drives.

[0080] This application also provides a wind turbine generator set, including any of the aforementioned multi-drive pitch systems.

[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A clock synchronization method, characterized in that, Applied to the second drive, including: Receive a first synchronization frame sent by a first driver, the first synchronization frame including the first current time of a first local clock in the first driver; Upon receiving the first synchronization frame, the second current time of the second local clock is obtained, wherein the second local clock is located in the second driver; Obtain the first transmission duration of the first synchronization frame; Based on the first transmission duration, the first current time, and the second current time, determine the first time difference between the second local clock and the first local clock; The second local clock is adjusted according to the first time difference to synchronize the second local clock with the first local clock.

2. The clock synchronization method according to claim 1, characterized in that, The receiving of the first synchronization frame sent by the first driver includes: The system receives the first synchronization frame sent by the first driver via the CAN communication bus.

3. The clock synchronization method according to claim 2, characterized in that, The step of obtaining the first transmission duration of the first synchronization frame includes: Obtain the baud rate of the CAN communication bus and the total number of bits included in the first synchronization frame; The first transmission duration of the first synchronization frame is determined based on the baud rate of the CAN communication bus and the total number of bits included in the first synchronization frame.

4. The clock synchronization method according to claim 1, characterized in that, The step of adjusting the second local clock according to the first time difference to synchronize the second local clock with the first local clock includes: Determine whether the first time difference is less than a preset duration threshold; If the first time difference is less than or equal to the preset duration threshold, the second local clock is adjusted according to the first time difference to synchronize the second local clock with the first local clock.

5. The clock synchronization method according to claim 4, characterized in that, The step of adjusting the second local clock according to the first time difference to synchronize the second local clock with the first local clock further includes: If the first time difference is greater than the preset duration threshold, the second local clock is adjusted according to the preset duration threshold to reduce the first time difference between the second local clock and the first local clock. Receive a second synchronization frame sent by the first driver, the second synchronization frame including the third current time of the first local clock in the first driver; Upon receiving the second synchronization frame, obtain the fourth current time of the second local clock; Obtain the second transmission duration of the second synchronization frame; Based on the second transmission duration, the third current time, and the fourth current time, a second time difference between the second local clock and the first local clock is determined; The second local clock is adjusted according to the second time difference to synchronize the second local clock with the first local clock.

6. The clock synchronization method according to claim 4, characterized in that, The step of adjusting the second local clock according to the first time difference to synchronize the second local clock with the first local clock further includes: If the first time difference is greater than the preset duration threshold, the second local clock is adjusted according to the preset duration threshold; Based on the first time difference and the preset duration threshold, a third time difference between the second local clock and the first local clock is determined; The second local clock is adjusted according to the third time difference to synchronize the second local clock with the first local clock.

7. The clock synchronization method according to claim 4, characterized in that, Before determining whether the first time difference is less than a preset duration threshold, the method further includes: Obtain the cycle duration and runtime of the control loop; Calculate the difference between the cycle duration and the runtime; The difference between the cycle duration and the runtime is used as a preset duration threshold.

8. A clock synchronization device, characterized in that, Located in the second drive, including: The receiving module is configured to receive a first synchronization frame sent by the first driver, wherein the first synchronization frame includes the first current time of the first local clock in the first driver; The first acquisition module is used to acquire the second current time of the second local clock at the moment the first synchronization frame is received, wherein the second local clock is located in the second driver; The second acquisition module is used to acquire the first transmission duration of the first synchronization frame; The determining module is configured to determine a first time difference between the second local clock and the first local clock based on the first transmission duration, the first current time, and the second current time; An adjustment module is used to adjust the second local clock according to the first time difference, so that the second local clock is synchronized with the first local clock.

9. A driver, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the driver to implement the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.

11. A multi-drive pitch control system, characterized in that, Includes the driver as described in claim 9.

12. A wind turbine generator set, characterized in that, Including the multi-drive pitch system as described in claim 11.