Time synchronization method and device
Fitting the received signal of the communication system through the least squares method, building a loss function and optimizing it to determine the time correction parameters, solving the problem of low time synchronization accuracy in the existing technology, achieving high-precision time synchronization, and enhancing the system's reliance Awesome and reliability.
Patent Information
- Application Number
- CN202411704653.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-11
AI Technical Summary
The time synchronization accuracy of existing communication systems is not high, and is affected by hardware characteristics and external interference. It requires additional synchronization equipment, which is costly.
The received signal is fitted by the least squares method, and the loss function between the ideal received signal waveform curve and the fitted correction curve is constructed. The loss function is optimized to determine the parameters of the fitted correction curve. Based on this, the time correction parameters are determined to improve time synchronization. Accuracy.
It effectively improves the time synchronization accuracy of the communication system, enhances the robustness and reliability of the system, and does not require additional synchronization equipment, avoiding increasing costs.
Smart Images

Figure CN119420446A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a time synchronization method and device. Background Art
[0002] Time synchronization has an important impact on the performance of communication systems. For example, time deviation in financial systems may lead to errors in transaction order, and time deviation in power dispatching systems may lead to scheduling errors. Factors that affect the accuracy of system time synchronization include hardware characteristics, external interference, etc. How to improve the time synchronization accuracy of communication systems is a technical problem that needs to be solved in this field. Summary of the invention
[0003] In view of this, an object of the embodiments of the present application is to provide a time synchronization method and device to solve the time synchronization problem of a communication system.
[0004] Based on the above purpose, an embodiment of the present application provides a time synchronization method, including:
[0005] Determine the ideal waveform curve of the received signal at the receiving end according to the transmitted signal at the transmitting end and the preset communication theoretical model;
[0006] After the transmitting end sends the transmitting signal, an actual receiving signal of the receiving end is obtained, and the actual receiving signal is sampled to obtain a plurality of actual data points;
[0007] Fitting multiple actual data points according to the linear least square method to obtain a fitting correction curve;
[0008] Constructing a loss function according to the ideal received signal waveform curve and the fitting correction curve;
[0009] With the goal of minimizing the loss function, the loss function is solved according to a preset optimization method to obtain the fitting curve parameters corresponding to the minimum loss function;
[0010] Determining the optimal fitting correction curve according to the fitting curve parameters;
[0011] The time correction parameters are determined based on a plurality of actual data points and the best fitting correction curve.
[0012] Optionally, the time correction parameters are determined based on a plurality of actual data points and the best fitting correction curve, including:
[0013] Determine, according to the amplitude of each actual data point, a corresponding correction data point on the optimal fitting correction curve;
[0014] The time correction parameter corresponding to the actual data point is determined according to the difference between the actual data point and the correction data point, and the sampling interval.
[0015] Optionally, determining the corresponding correction data point on the optimal fitting correction curve according to the amplitude of each actual data point includes:
[0016] If the determined correction data point is not unique, the correction data point closest to the actual data point is selected as the final correction data point.
[0017] Optionally, determining the time correction parameter corresponding to the actual data point according to the difference between the actual data point and the corrected data point, and the sampling interval, includes:
[0018] The product of the difference and the sampling interval is calculated, and the product result is used as the time correction parameter corresponding to the actual data point.
[0019] Optionally, after determining the time correction parameter corresponding to the actual data point, the method further includes:
[0020] The difference between the timestamp of the actual data point and the time correction parameter is calculated, and the difference is used as the corrected timestamp of the actual data point.
[0021] Optionally, the loss function is the sum of squares of residuals of all data points between the ideal received signal waveform curve and the fitted correction curve.
[0022] The embodiment of the present application also provides a time synchronization device, including:
[0023] An ideal curve determination module is used to determine an ideal waveform curve of a received signal at a receiving end according to a transmitted signal at a transmitting end and a preset communication theoretical model;
[0024] An acquisition module, used for acquiring an actual received signal of a receiving end after the transmitting end sends the transmission signal, sampling the actual received signal, and obtaining a plurality of actual data points;
[0025] A fitting curve generation module is used to fit multiple actual data points according to the linear least square method to obtain a fitting correction curve;
[0026] A construction module, used to construct a loss function according to the ideal received signal waveform curve and the fitting correction curve;
[0027] A solution module is used to solve the loss function according to a preset optimization method with the goal of minimizing the loss function, and obtain the fitting curve parameters corresponding to the minimum loss function;
[0028] An optimal fitting curve generating module is used to determine the optimal fitting correction curve according to the fitting curve parameters;
[0029] The time correction module is used to determine the time correction parameters according to a plurality of actual data points and the best fitting correction curve.
[0030] Optionally, the time correction module is used to determine the corresponding corrected data point on the optimal fitting correction curve based on the amplitude of each actual data point; and determine the time correction parameter corresponding to the actual data point based on the difference between the actual data point and the corrected data point, and the sampling interval.
[0031] Optionally, the time correction module is used to select a correction data point closest to the actual data point as the final correction data point when it is determined that the determined correction data point is not unique.
[0032] Optionally, the time correction module is used to calculate the product of the difference and the sampling interval, and use the product result as the time correction parameter corresponding to the actual data point.
[0033] From the above, it can be seen that the time synchronization method and device provided in the embodiment of the present application accurately fit the actual received signal through the least squares method, construct a loss function of the error between the ideal received signal waveform curve and the fitting correction curve, and determine that the fitting correction curve can minimize the residual error with the actual received signal by continuously optimizing the loss function. The timestamp of the actual data point is time compensated based on the optimal fitting correction curve, which can effectively improve the time synchronization accuracy of the communication system, improve the robustness and reliability of the system, and does not require additional configuration of synchronization equipment, and will not increase additional costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 A schematic diagram of a method flow of an embodiment of the present application;
[0036] Figure 2 A schematic diagram of the time correction principle of an embodiment of the present application;
[0037] Figure 3 A schematic diagram of the structure of an optical communication system according to an embodiment of the present application;
[0038] Figure 4A schematic diagram of time deviation caused by time jitter in some embodiments;
[0039] Figure 5 A schematic diagram showing a comparison between a received signal waveform curve and a fitting correction curve according to an embodiment of the present application;
[0040] Figure 6 for Figure 5 A partial enlarged schematic diagram of
[0041] Figure 7 This is a block diagram of the device structure of an embodiment of the present application;
[0042] Figure 8 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0044] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0045] As described in the background technology section, time synchronization plays an important role in communication systems. Time synchronization methods in related technologies, such as the PTP time synchronization method, achieve time synchronization by exchanging timestamps between master and slave devices. However, due to various factors such as hardware characteristics and external interference, the time accuracy is not high, and additional time synchronization equipment needs to be configured, which is costly.
[0046] In view of this, the present application provides a time synchronization method, which constructs a fitting correction curve based on the least squares method, and determines the optimal parameters of the fitting correction curve that are close to the ideal waveform curve based on the gap between the ideal received signal waveform curve and the fitting correction curve. The time correction parameters used for time synchronization are determined based on the actual received signal and the optimal fitting correction curve, which can effectively improve the accuracy of time synchronization.
[0047] The technical solution of the present application is further described in detail below through specific embodiments.
[0048] like Figure 1 As shown, the embodiment of the present application provides a time synchronization method, including:
[0049] S101: Determine an ideal received signal waveform curve at a receiving end according to a transmitted signal at a transmitting end and a preset communication theoretical model;
[0050] In this embodiment, firstly, based on the communication theory model, according to the transmission signal of the transmitting end and the channel model of the specific communication system, the ideal receiving signal waveform curve that can be received after the transmission signal is transmitted to the receiving end through the channel model is determined, under the condition that only the theoretical delay in the communication theory model is considered and the influence of hardware and external complex environment is not considered. The ideal receiving signal waveform curve is an ideal receiving signal waveform curve with delay that takes into account the theoretical delay. Among them, the communication system can be an optical communication system, a wireless communication system, a satellite communication system, etc., and the application scenario is not limited to an application system involving data communication implemented based on any communication system, and the specific communication system and application scenario are not specifically limited.
[0051] S102: After the transmitting end sends the transmission signal, the receiving end obtains the actual reception signal, samples the actual reception signal, and obtains a plurality of actual data points;
[0052] In this embodiment, in actual application, the transmitting end sends a transmission signal, which is received by the receiving end after being transmitted through the channel. The receiving end receives the actual reception signal, samples the actual reception signal at a predetermined sampling rate, obtains multiple actual data points arranged in order of sampling time, and performs signal recovery based on the multiple actual data points.
[0053] S103: fitting multiple actual data points according to the linear least square method to obtain a fitting correction curve;
[0054] In this embodiment, after the receiving end obtains multiple actual data points through sampling, the multiple actual data points are fitted according to the linear least squares method to obtain an initial fitting correction curve. In some embodiments, the fitting correction curve is obtained by linear fitting of a fourth-order polynomial, and the corresponding expression is:
[0055] f(x)=p1x 4 +p1x 3 +p3x 2 +p4x+p5 (1)
[0056] Among them, p1, p2, p3, p4, and p5 are the fitting curve parameters to be solved, and f(x) is the amplitude corresponding to the data point x. In practical applications, a fitting curve function of appropriate order can be constructed according to the specific communication system, application scenario, and other factors to achieve better fitting effect.
[0057] S104: constructing a loss function according to the ideal received signal waveform curve and the fitting correction curve;
[0058] In this embodiment, a loss function is constructed based on the ideal received signal and the actual received signal. The loss function is the square sum of all data point residuals between the ideal received signal waveform curve and the fitted correction curve, and is expressed as:
[0059]
[0060] Among them, f1(x i ) is the amplitude of the ith actual data point, f(x i ) is the amplitude of the i-th ideal data point, and n is the number of data points. The ideal received signal and the actual received signal are sampled at the same sampling rate to obtain the same number of data points. The loss function is constructed based on the difference between the amplitude of each data point on the ideal received signal waveform curve and the amplitude of the corresponding data point on the fitted correction curve.
[0061] S105: With the goal of minimizing the loss function, solving the loss function according to a preset optimization method to obtain fitting curve parameters corresponding to the minimum loss function;
[0062] S106: Determine the optimal fitting correction curve according to the fitting curve parameters;
[0063] In this embodiment, after constructing the loss function, the loss function is solved according to the optimization algorithm with the goal of minimizing the loss function, and the fitting curve parameters that minimize the loss function are obtained. In some methods, the loss function shown in formula (2) can be derived, and the fitting curve parameters p1, p2, p3, p4, and p5 that minimize the loss function are obtained by continuously optimizing the derivative order, the fitting order, etc., and then the fitting curve parameters are substituted into the expression of the fitting correction curve to obtain the optimal fitting correction curve.
[0064] S107: Determine a time correction parameter according to a plurality of actual data points and the optimal fitting correction curve.
[0065] In this embodiment, after determining the optimal fitting correction curve, the time correction parameters for time synchronization can be determined based on the optimal fitting correction curve according to each actual data point on the actual received signal. Determining the time correction parameters includes:
[0066] According to the amplitude of each actual data point, determine the corresponding correction data point on the optimal fitting correction curve;
[0067] The time correction parameter corresponding to the actual data point is determined according to the difference between the actual data point and the corrected data point, as well as the sampling interval.
[0068] In this embodiment, the optimal fitting correction curve represents the correspondence between the correction data point and the amplitude of the correction data point. In order to determine the time correction parameter, the correction data point corresponding to the amplitude on the optimal fitting correction curve is determined according to the amplitude of the actual data point. That is, the amplitude of the actual data point is substituted into the expression of the optimal fitting correction curve to determine the position of the corresponding correction data point. According to the difference between the actual data point and the correction data point, as well as the sampling interval of the received signal, the time correction parameter of the actual data point is calculated and determined.
[0069] like Figure 2 , 4 As shown, affected by various factors, the ideal receiving signal waveform curve ( Figure 2 The data points on the ideal signal curve (i.e., the ideal received signal waveform curve with time delay) and the actual received signal curve ( Figure 2 There is a time deviation between corresponding data points on the curve (denoted as the received signal curve in the figure), the optimal fitting correction curve determined by the least squares method is close to the ideal received signal waveform curve, there is a time deviation between the data points on the fitting correction curve and the corresponding data points on the actual received signal, the amplitude of the actual data point (for example, the maximum amplitude) is substituted into the expression of the fitting correction curve, and the position of the corrected data point x1 corresponding to the amplitude on the fitting correction curve is obtained, the difference Δx between the corrected data point and the actual data point is calculated, the product of the difference and the sampling interval is calculated, and the product result is used as the time correction parameter Δt of the actual data point, and the timestamp of the actual data point is corrected according to the time correction parameter to obtain the accurate timestamp of the actual data point after correction.
[0070] For example, the position of the actual data point is the 100th data point. According to the amplitude of the actual data point, the position of the corrected data point corresponding to the amplitude on the fitted correction curve is determined to be the 95th data point. The difference between the actual data point and the corrected data point is 5. The signal is sampled at a sampling frequency of 1 GHz, and the sampling interval is 1 nanosecond. The product of the difference and the sampling interval is calculated to obtain a time correction parameter of 5 nanoseconds.
[0071] Afterwards, the difference between the timestamp of the actual data point and the corresponding time correction parameter is calculated, and the difference is used as the corrected timestamp of the actual data point. rec, then the time correction parameter is subtracted from the timestamp, and the result is the corrected timestamp of the actual data point. The corrected timestamp is close to the time when the sender sends the same data point, thereby achieving time synchronization between the sender and the receiver, and improving the accuracy of time synchronization. According to the above method, the time correction is performed on each actual data point of the received signal, and the receiver can obtain a received signal that is synchronized with the sender, thereby improving the accuracy of time synchronization between the sender and the receiver.
[0072] In some embodiments, determining the corresponding correction data point on the optimal fitting correction curve according to the amplitude of each actual data point includes:
[0073] If the determined correction data point is not unique, the correction data point closest to the actual data point is selected as the final correction data point.
[0074] In this embodiment, considering that the correction data point determined on the fitted correction curve may not be unique according to the amplitude of the actual data point, that is, the same amplitude may correspond to multiple correction data points, in order to determine a unique correction data point, one of the correction data points that is closest to the position of the actual data point is selected from the multiple correction data points as the correction data point corresponding to the actual data point.
[0075] like Figure 3 As shown, in some embodiments, the method of the present application is applied to an optical communication system, and the theoretical delay of the optical communication system is the delay that takes the transmission distance into consideration. The transmitting end injects the optical signal output by the light source into the modulator, and the modulator modulates the intensity of the optical signal according to the modulation signal generated by the signal source. In order to ensure the stability of the modulated optical signal output by the modulator, a bias controller is used to apply a dynamically controlled bias to the modulator to avoid the influence of changes in environmental factors on the modulator working point; the modulated optical signal is transmitted to the receiving end through the optical fiber quantum channel. The receiving end and the local oscillator light output by another identical light source are connected to the beam splitter together, and stable interference occurs. The two outputs of the beam splitter are respectively matched in intensity by two adjustable attenuators, and then fed to the detector; the oscilloscope collects the output signal of the detector, and the signal source and the oscilloscope are triggered by the same clock source to ensure the clock synchronization between the transmitting end and the receiving end.
[0076] like Figure 5 , 6As shown, the actual received signal of the receiving end is sampled to obtain multiple actual data points, and the multiple actual data points are fitted according to the linear least squares method to obtain a fitting correction curve. According to the ideal received signal waveform curve of the optical communication system (i.e., the ideal received signal waveform curve with time delay) and the fitting correction curve, a corresponding loss function is constructed, and the optimal fitting curve parameters are determined by solving the loss function to obtain the optimal fitting correction curve. For each actual data point, the corresponding time correction parameter is determined based on the optimal fitting correction curve, and the timestamp of the actual data point is corrected according to the time correction parameter. After correction, a timestamp consistent with the sending end is obtained, thereby realizing time synchronization of the optical communication system and improving the accuracy of time synchronization. It has been verified that time synchronization according to the scheme of this application can achieve nanosecond time synchronization accuracy.
[0077] The time synchronization method provided in the embodiment of the present application breaks through the limitations of traditional time synchronization technology, accurately fits the actual received signal through the least squares method, constructs a loss function of the error between the ideal received signal waveform curve and the fitting correction curve, and determines that the fitting correction curve can minimize the residual error with the actual received signal by continuously optimizing the loss function. The timestamps of the actual data points are time compensated based on the optimal fitting correction curve, which can effectively improve the time synchronization accuracy of the communication system; the use of the least squares method for fitting can improve the robustness and reliability of the system, especially in complex situations such as noise interference and measurement uncertainty, and can provide estimation results with higher robustness to achieve effective compensation for time deviations; moreover, there is no need to configure additional synchronization equipment, and no additional cost is added.
[0078] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0079] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0080] like Figure 7As shown, an embodiment of the present application provides a time synchronization device, including:
[0081] An ideal curve determination module is used to determine an ideal waveform curve of a received signal at a receiving end according to a transmitted signal at a transmitting end and a preset communication theoretical model;
[0082] An acquisition module, used for acquiring an actual received signal of a receiving end after the transmitting end sends the transmission signal, sampling the actual received signal, and obtaining a plurality of actual data points;
[0083] A fitting curve generation module is used to fit multiple actual data points according to the linear least square method to obtain a fitting correction curve;
[0084] A construction module, used to construct a loss function according to the ideal received signal waveform curve and the fitting correction curve;
[0085] A solution module is used to solve the loss function according to a preset optimization method with the goal of minimizing the loss function, and obtain the fitting curve parameters corresponding to the minimum loss function;
[0086] An optimal fitting curve generating module is used to determine the optimal fitting correction curve according to the fitting curve parameters;
[0087] The time correction module is used to determine the time correction parameters according to a plurality of actual data points and the best fitting correction curve.
[0088] In some embodiments, the time correction module is used to determine the corresponding correction data point on the optimal fitting correction curve based on the amplitude of each actual data point; and determine the time correction parameter corresponding to the actual data point based on the difference between the actual data point and the correction data point, and the sampling interval.
[0089] In some embodiments, the time correction module is used to select a correction data point closest to the actual data point as the final correction data point when it is determined that the determined correction data point is not unique.
[0090] In some embodiments, the time correction module is used to calculate the product of the difference and the sampling interval, and use the product result as the time correction parameter corresponding to the actual data point.
[0091] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0092] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0093] Figure 8 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0094] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0095] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0096] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0097] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0098] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0099] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0100] The electronic device of the above embodiment is used to implement the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0101] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0102] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0103] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0104] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0105] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present disclosure.
Claims
1. A time synchronization method, characterized in that: include: Determine the ideal waveform curve of the received signal at the receiving end according to the transmitted signal at the transmitting end and the preset communication theoretical model; After the transmitting end sends the transmitting signal, an actual receiving signal of the receiving end is obtained, and the actual receiving signal is sampled to obtain a plurality of actual data points; Fitting multiple actual data points according to the linear least square method to obtain a fitting correction curve; Constructing a loss function according to the ideal received signal waveform curve and the fitting correction curve; With the goal of minimizing the loss function, the loss function is solved according to a preset optimization method to obtain the fitting curve parameters corresponding to the minimum loss function; Determining the optimal fitting correction curve according to the fitting curve parameters; The time correction parameters are determined based on a plurality of actual data points and the best fitting correction curve.
2. The method according to claim 1, characterized in that Based on multiple actual data points and the best fitting correction curve, the time correction parameters are determined, including: Determine, according to the amplitude of each actual data point, a corresponding correction data point on the optimal fitting correction curve; The time correction parameter corresponding to the actual data point is determined according to the difference between the actual data point and the correction data point, and the sampling interval.
3. The method according to claim 2, characterized in that Determining the corresponding correction data point on the optimal fitting correction curve according to the amplitude of each actual data point includes: If the determined correction data point is not unique, the correction data point closest to the actual data point is selected as the final correction data point.
4. The method according to claim 2, characterized in that: Determining the time correction parameter corresponding to the actual data point according to the difference between the actual data point and the corrected data point, and the sampling interval, includes: The product of the difference and the sampling interval is calculated, and the product result is used as the time correction parameter corresponding to the actual data point.
5. The method according to claim 4, characterized in that After determining the time correction parameter corresponding to the actual data point, the method further includes: The difference between the timestamp of the actual data point and the time correction parameter is calculated, and the difference is used as the corrected timestamp of the actual data point.
6. The method according to claim 1, characterized in that The loss function is the sum of squares of residuals of all data points between the ideal received signal waveform curve and the fitted correction curve.
7. A time synchronization device, characterized in that: include: An ideal curve determination module is used to determine an ideal waveform curve of a received signal at a receiving end according to a transmitted signal at a transmitting end and a preset communication theoretical model; An acquisition module, used for acquiring an actual received signal of a receiving end after the transmitting end sends the transmission signal, sampling the actual received signal, and obtaining a plurality of actual data points; A fitting curve generation module is used to fit multiple actual data points according to the linear least square method to obtain a fitting correction curve; A construction module, used to construct a loss function according to the ideal received signal waveform curve and the fitting correction curve; A solution module is used to solve the loss function according to a preset optimization method with the goal of minimizing the loss function, and obtain the fitting curve parameters corresponding to the minimum loss function; An optimal fitting curve generating module is used to determine the optimal fitting correction curve according to the fitting curve parameters; The time correction module is used to determine the time correction parameters according to a plurality of actual data points and the best fitting correction curve.
8. The device according to claim 7, characterized in that The time correction module is used to determine the corresponding correction data point on the optimal fitting correction curve according to the amplitude of each actual data point; And according to the difference between the actual data point and the corrected data point, and the sampling interval, the time correction parameter corresponding to the actual data point is determined.
9. The device according to claim 8, characterized in that The time correction module is used to select a correction data point closest to the actual data point as the final correction data point when it is determined that the determined correction data point is not unique.
10. The device according to claim 7, characterized in that The time correction module is used to calculate the product of the difference and the sampling interval, and use the product result as the time correction parameter corresponding to the actual data point.