A speed sampling calculation method for variable counting clock

By dynamically adjusting the clock cycle and frequency division/multiplication settings in real time, combined with machine learning models, the problem of insufficient adaptability and accuracy of traditional speed measurement technology in different speed ranges is solved, and high precision and high accuracy under complex working conditions are achieved. Adaptable speed measurement significantly improves the accuracy of measurement and the automation level of the system.

CN118626752BActive Publication Date: 2024-10-01NEW UNITED GROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411102969.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-10-01
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

Traditional speed measurement technology has insufficient adaptability and accuracy in different speed ranges, making it difficult to meet the high accuracy and flexibility requirements of modern industrial systems, especially under complex dynamic conditions.

Method used

By dynamically adjusting the clock cycle and frequency division/multiplication settings in real time, using machine learning models (such as random forests or neural networks) to predict optimal parameters, optimizing rotation speed measurement, and combining data preprocessing and feature extraction to automatically identify and respond to the environment and equipment change.

Benefits of technology

It significantly improves the accuracy and adaptability of rotational speed measurement, reduces errors, enhances the automation level of the system, and ensures efficient and reliable measurement results under various operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626752B_ABST
    Figure CN118626752B_ABST
Patent Text Reader

Abstract

The present application relates to the field of industrial measurement, and discloses a speed sampling and calculation method of a variable counting clock, comprising the following steps: S1, collecting pulse signals generated by a speed sensor, and recording the timestamp, ambient temperature, load and speed of each pulse, and performing preprocessing; S2, extracting features from the preprocessed data; S3, using a machine learning model to predict the optimal clock cycle and frequency division / multiplication settings based on the extracted features; S4, dynamically adjusting the clock cycle and frequency division / multiplication settings according to real-time measurement data to optimize the accuracy of speed measurement; S5, outputting the adjusted speed value. The present invention can accurately adapt to different mechanical operating conditions, environmental changes, load changes and wide range changes in sensor ratio by dynamically adjusting the clock cycle and frequency division / multiplication settings in real time, thereby significantly improving the accuracy and convenience of speed measurement and simplifying the speed calculation strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of industrial measurement, in particular to a rotation speed sampling and calculation method of a variable counting clock. Background Art

[0002] In industrial applications, speed measurement is a key link in monitoring and controlling the performance of mechanical equipment. Traditional speed measurement technology mainly relies on the timing counting method (frequency measurement method) and the fixed number timing method (period measurement method). These two methods each have their applicable speed range and limitations. The frequency measurement method performs well in the high-speed range because enough pulses can be captured in a shorter time, thereby improving the accuracy of the measurement. However, at low speeds, the number of pulses decreases, resulting in increased uncertainty in the measurement results. Relatively speaking, the period measurement method is more accurate at low speeds because it calculates the speed by measuring a single or several pulse cycles over a longer period of time, but at high speeds, due to the extremely short period, this method is easily interfered by noise and has limited accuracy.

[0003] The main problem with these methods is that they have poor adaptability and flexibility at different speeds. For example, in high-speed measurements, data overflow or loss may occur due to a too short measurement cycle, while in low-speed measurements, a long measurement cycle may result in insufficient data updates, affecting the system's response speed to state changes. In addition, these traditional methods often require the determination of measurement strategies and equipment configurations at the beginning of system design. Once set, it is difficult to adapt to various changes that may occur during the production process, such as large changes in the number of sensor teeth in different applications, equipment wear, load changes, and environmental impacts.

[0004] As modern industry's requirements for equipment performance monitoring accuracy and system adaptability continue to increase, traditional speed measurement technology faces more and more challenges. Especially in situations where complex dynamic conditions and high precision are required, these methods often fail to meet the needs of modern industrial systems. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a rotational speed sampling and calculation method with a variable counting clock, which solves the problems of insufficient adaptability and accuracy of traditional rotational speed measurement methods in different speed ranges. By dynamically adjusting the clock cycle and the frequency division / multiplication settings in real time, different counting clocks for rotational speed calculation are generated, providing a rotational speed measurement solution that can maintain high accuracy and high adaptability under various operating conditions.

[0006] To achieve the above purpose, the present invention is implemented by the following technical scheme: a speed sampling calculation method of a variable counting clock, comprising the following steps:

[0007] Collect the pulse signals generated by the speed sensor, record the timestamp, ambient temperature, load and speed of each pulse, and perform preprocessing;

[0008] Extracting features from the preprocessed data, the features including pulse frequency change rate, average pulse interval, ambient temperature change rate, load change rate, and sensor tooth number change;

[0009] Based on the extracted features, a machine learning model is used to predict the optimal clock period and division / multiplication settings;

[0010] Dynamically adjusting the clock period and frequency division / multiplication settings according to real-time measurement data to optimize the accuracy of speed measurement;

[0011] Output the adjusted speed value.

[0012] Preferably, the machine learning model is a random forest or a neural network.

[0013] Preferably, the step of dynamically adjusting the clock period and frequency division / multiplication settings according to the real-time measurement data further comprises:

[0014] Determine real-time speed and the speed predicted by the machine learning model ;

[0015] Calculate the error rate between the real-time speed and the predicted speed:

[0016]

[0017] in, Indicates the ratio of the difference between the predicted speed and the actual speed;

[0018] Adjust the clock period based on the calculated error rate , the adjustment formula is:

[0019]

[0020] in, represents the adjusted clock period, represents the clock period before adjustment, It is a preset adjustment coefficient used to control the adjustment range;

[0021] If the resulting new clock cycle If the resulting measurement error still exceeds the predetermined tolerance range, repeat the steps until the error rate is within an acceptable range.

[0022] Preferably, the step of dynamically adjusting the clock period and frequency division / multiplication settings according to the real-time measurement data further comprises:

[0023] According to the real-time speed and the speed predicted by the machine learning model Calculate pulse measurement error;

[0024] Calculate the error ratio and use it to determine the adjustment amount for frequency division / multiplication :

[0025]

[0026] in, Indicates the frequency division or frequency multiplication adjustment amount. is the sensitivity parameter;

[0027] application Adjust the current frequency division / multiplication settings;

[0028] If the obtained measurement error still does not meet expectations, repeat the steps until the error meets the predetermined standard.

[0029] Preferably, the pulse frequency change rate, average pulse interval, ambient temperature change rate and load change rate are as follows:

[0030] The pulse frequency change rate is calculated as follows:

[0031]

[0032] in, Indicates at time The number of pulses, and is the timestamp of the continuous pulses;

[0033] Average pulse interval, calculates the average of all measured pulse intervals:

[0034]

[0035] in, is the total number of pulses in the measurement period;

[0036] Ambient temperature change rate, calculate the change in ambient temperature between two consecutive measurements:

[0037]

[0038] in, and are the values ​​of two consecutive measurements;

[0039] The load change rate is calculated in the same way as the ambient temperature change rate.

[0040] Preferably, the characteristics also include the average value and standard deviation of the historical rotation speed trend.

[0041] Preferably, the training of the machine learning model includes:

[0042] The machine learning model is trained using the training set data, and the model parameters are optimized by minimizing the speed prediction error. The objective function of the speed prediction error is defined as:

[0043]

[0044] in, is the number of samples in the training set, is the model at time point The predicted speed value, is the actual measured speed value.

[0045] The present invention also provides a speed sampling and calculation device for a variable counting clock, comprising:

[0046] A data collection unit configured to collect and record a pulse signal generated by the speed sensor;

[0047] a data processing unit configured to preprocess the collected pulse signals and extract features from the preprocessed data;

[0048] a machine learning unit configured to train a machine learning model using a historical data set and predict optimal clock cycle and division / multiplication settings based on real-time data;

[0049] A control unit configured to dynamically adjust a clock period and a frequency division / multiplication setting according to the prediction result;

[0050] The output unit is configured to output the adjusted speed value.

[0051] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the above method is implemented.

[0052] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.

[0053] The present invention provides a speed sampling calculation method of a variable counting clock. It has the following beneficial effects:

[0054] 1. The present invention can accurately adapt to different mechanical operating conditions and environmental changes by dynamically adjusting the clock cycle and frequency division / multiplication settings in real time, thereby significantly improving the accuracy of speed measurement. The machine learning model is used to predict the optimal settings based on real-time data to ensure that the measurement parameters are always kept in the best state, thereby reducing errors and improving the reliability of data and the accuracy of measurement results.

[0055] 2. The present invention can automatically identify and respond to different operating conditions and environmental changes. Through the prediction and real-time parameter adjustment mechanism of the machine learning model, the adaptability of the system is greatly enhanced. Whether in the case of changes in ambient temperature, load or other external conditions, the system can automatically make necessary adjustments to maintain the efficiency and accuracy of the measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0057] Figure 2 A schematic diagram of clock cycle configuration of the present invention;

[0058] Figure 3 It is a schematic diagram of the structure of the device of the present invention;

[0059] Figure 4 It is a schematic diagram of the computer device structure of the present invention.

[0060] Among them, 100, data collection unit; 200, data processing unit; 300, machine learning unit; 400, control unit; 500, output unit; 40, computer equipment; 41, processor; 42, memory; 43, storage medium. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.

[0062] Please refer to the attached Figure 1 -Attached Figure 2 The embodiment of the present invention provides a speed sampling calculation method of a variable counting clock, comprising the following steps:

[0063] S1. Collect the pulse signal generated by the speed sensor, record the timestamp, ambient temperature, load and speed of each pulse, and perform preprocessing

[0064] Step S1 is the preliminary stage of the present invention, which involves data collection and preprocessing, which is the key basis for ensuring the accuracy of subsequent analysis. In this step, the pulse signal is first collected by a high-precision speed sensor, and the ambient temperature, load and speed data related to each pulse are synchronously recorded. The accurate collection of these data is crucial to achieve subsequent accurate data analysis and speed prediction.

[0065] In this embodiment, a speed sensor is first configured to collect pulse signals generated by various mechanical components (such as motors or turbines). Each pulse is associated with a specific timestamp, which records the specific time point when the pulse occurred. In addition, the data recorded synchronously with each pulse also includes the ambient temperature and load conditions at the time, as well as the actual speed value directly measured by the sensor. The comprehensive collection of these data provides the necessary input for the accurate calculation of the speed.

[0066] After the data is collected, it is preprocessed to ensure data quality and prepare a clean, reliable data set for feature extraction and subsequent analysis. The preprocessing step includes removing noise and outliers, which is usually achieved through digital filtering techniques, such as using Kalman filtering or moving average filtering methods. These filtering methods can effectively smooth the data series and remove random fluctuations that may be introduced by sensor errors, environmental interference, or operational errors.

[0067] By implementing this step, we can ensure that the collected data is accurate and reliable before entering the next step of feature extraction and machine learning model training. This not only improves the measurement and prediction accuracy of the entire system, but also greatly reduces the errors that may occur in subsequent steps, laying a solid foundation for the entire speed sampling calculation method.

[0068] S2. Extract features from the preprocessed data, including pulse frequency change rate, average pulse interval, ambient temperature change rate, and load change rate.

[0069] After collecting and preprocessing the data, step S2 extracts key features from the cleansed data. These features are crucial for subsequent machine learning models because they directly affect the model's prediction accuracy and efficiency. The feature extraction in this step aims to identify the most informative indicators from multidimensional data, which will serve as input to the prediction model.

[0070] In this embodiment, based on the preprocessed data obtained in step S1, this step will perform the following feature extraction on each sampling point:

[0071] Pulse frequency change rate, this feature measures the speed of rotation by calculating the change in the number of pulses between adjacent timestamps. The formula is:

[0072]

[0073] in, Indicates at time The number of pulses, and The calculation is the timestamp of continuous pulses. This calculation reflects the instantaneity and dynamics of speed changes and is particularly important for capturing rapidly changing speeds.

[0074] The average pulse interval provides the overall stability and average level of the speed by calculating the average pulse interval in all measurement intervals. The formula is:

[0075]

[0076] in, is the total number of pulses within the measurement period, which helps analyze speed fluctuations on a longer time scale.

[0077] Ambient temperature change rate ( ) and load change rate, which are obtained by calculating the change in ambient temperature and load between consecutive measurement points. The temperature change rate is calculated as:

[0078]

[0079] in, and These are the values ​​of two consecutive measurements.

[0080] The calculation for the rate of change of load is similar. These characteristics are critical to identifying the potential impact of external environmental conditions on the speed measurement.

[0081] Sensor tooth count change is obtained by calculating the change in the number of teeth on the sensor gear between consecutive measurement points. This feature can help detect physical changes caused by gear wear or damage, which is important for maintaining the health of the equipment and predicting potential failures.

[0082] By extracting these features, this step ensures that the machine learning model in the subsequent steps receives input data with high relevance and predictive value. This approach not only improves the prediction accuracy of the model, but also enhances the generalization ability of the model under different working conditions. The successful execution of feature extraction is the key link to achieve efficient and accurate speed prediction, and provides a solid foundation for the optimization and accuracy of the entire speed sampling calculation method.

[0083] S3. Based on the extracted features, use the machine learning model to predict the optimal clock cycle and frequency division / multiplication settings

[0084] After extracting the features, step S3 trains and uses a machine learning model using these features to predict the optimal clock cycle and frequency division / multiplication settings. Through the application of the machine learning model, the system can adaptively select the optimal measurement parameters according to the real-time changing conditions, thereby improving the accuracy and efficiency of the speed measurement.

[0085] In this embodiment, based on the feature data extracted from step S2, this step will use a machine learning model for training and prediction. The specific steps are as follows:

[0086] Division of training set and test set: First, divide the preprocessed data into training set and test set, generally 80% of the data is used for training and 20% of the data is used for testing. This ensures that the model can learn the characteristics of the data during training and verify its predictive ability during testing.

[0087] Model selection: Choose an appropriate machine learning model, such as random forest, support vector machine (SVM), or neural network. These models excel in handling complex nonlinear relationships and multidimensional features.

[0088] Model training: Use the training set data to train the model and optimize the model parameters by minimizing the speed prediction error. The optimization objective function is defined as:

[0089]

[0090] in, is the number of samples in the training set, is the model at time point The predicted speed value, is the actual measured speed value. By minimizing the loss function, the parameters of the machine learning model (such as weights and biases) are adjusted to better fit the data. This optimization ensures that the model can accurately predict the speed, thereby reducing the difference between the actual speed and the predicted speed.

[0091] Model validation: Use the test set data to validate the model's prediction performance, and evaluate the model's accuracy and robustness by calculating indicators such as mean square error (MSE). If the prediction error is within an acceptable range, the model can be considered to have been successfully trained.

[0092] Real-time prediction: In actual applications, the trained machine learning model is used to predict the optimal clock cycle based on the feature data extracted in real time. The prediction process can dynamically respond to environmental and load changes to provide optimal measurement parameters.

[0093] Through these steps, the machine learning model can effectively learn from historical data and real-time features, predict the clock cycle and frequency division / multiplication settings that are most suitable for the current working conditions, and generate different counting clocks for speed calculation. This not only improves the automation level of the system, but also significantly improves the accuracy and stability of speed measurement, ensuring that the system can provide high-quality measurement results under various complex working conditions.

[0094] S4. Dynamically adjust the clock cycle and frequency division / multiplication settings based on real-time measurement data to optimize the accuracy of speed measurement

[0095] After the machine learning model successfully predicts the optimal clock period and frequency division / multiplication settings, step S4 dynamically adjusts these settings based on real-time measurement data. This dynamic adjustment process ensures that the system can continuously optimize the measurement parameters to cope with real-time changing working conditions and improve the accuracy and response speed of speed measurement.

[0096] In this embodiment, according to the prediction results obtained from the machine learning model and the real-time measurement data, this step implements the dynamic adjustment of the clock cycle And frequency division / multiplication settings to optimize the accuracy of speed measurement. The specific steps are as follows:

[0097] Real-time data monitoring: The system continuously monitors the actual measured speed And the speed predicted by the machine learning model These data provide instant feedback on the speed measurement under current operating conditions.

[0098] Calculate the error rate: Calculate the error rate between the predicted speed and the actual speed based on real-time data. The formula is:

[0099]

[0100] The error rate reflects the accuracy of the current forecast and serves as the basis for adjusting parameters.

[0101] Adjust the clock cycle: adjust the clock cycle according to the error rate The adjustment formula is:

[0102]

[0103] in, represents the adjusted clock period, represents the clock period before adjustment, It is a preset adjustment coefficient used to control the adjustment range. This adjustment ensures that the clock cycle can adapt to the current speed change, thereby improving the measurement accuracy.

[0104] Frequency division / multiplication setting adjustment: According to the adjusted clock cycle The frequency division / multiplication settings are adjusted dynamically based on the real-time measurement data. The frequency division / multiplication settings are further adjusted based on the error rate to optimize the measurement parameters. The adjustment formula is:

[0105]

[0106] in, Indicates the frequency division or frequency multiplication adjustment amount. The sensitivity parameter is used to control the adjustment amount. The adjusted frequency division / multiplication setting ensures that the clock period is within the appropriate range to avoid over- or under-adjustment.

[0107] Loop feedback adjustment: Real-time monitoring of the adjusted system performance. If the measurement error still exceeds the predetermined range, repeat the above calculation and adjustment steps until the error rate is within the acceptable range. This feedback control mechanism ensures that the system can automatically optimize the measurement parameters under various changing conditions and maintain high accuracy and stability.

[0108] Through dynamic adjustment steps, the system can respond to changes in working conditions in real time and optimize measurement parameters. This adaptive adjustment mechanism not only improves the accuracy and stability of speed measurement, but also enhances the system's adaptability under various complex working conditions, ensuring that high-quality speed data can be provided in any situation.

[0109] S5, output the adjusted speed value

[0110] After real-time dynamic adjustment, step S5 outputs the adjusted accurate speed value. This stage is the final output stage of the entire method, ensuring that all the results of the previous data collection, feature extraction, model prediction and dynamic adjustment can be output in the form of accurate speed values, providing reliable data support for practical applications.

[0111] In this embodiment, through the processing and optimization of the above steps, the system will output the adjusted speed value, and the specific implementation method is as follows:

[0112] Data integration: dynamically adjusted clock cycles The frequency division / multiplication settings are combined with the current actual measurement data to ensure the timing and parameter consistency of all data.

[0113] Speed ​​calculation: Use the latest adjusted parameters to calculate the final speed value. According to the circumference measurement method, the calculation formula is as follows:

[0114]

[0115] in, is the number of pulses, is the adjusted clock cycle. This formula ensures that the calculated speed value can reflect the actual speed situation, and the adjusted parameters can minimize the measurement error.

[0116] Output speed value: The calculated speed value is output to the display device or control system for use by the user or subsequent system. This output can be displayed in real time on the monitoring screen or transmitted to the data recording system for long-term trend analysis.

[0117] Abnormal detection and alarm: At the same time, the system should also include an abnormal detection mechanism. If the speed value is found to be out of the reasonable range or fluctuates abnormally during the calculation process, the system should be able to issue an alarm in time and record relevant data for users or maintenance personnel to check and handle.

[0118] Data storage and logging: All relevant calculation results and parameter adjustment logs are stored in the database for subsequent analysis and traceability. These data can not only be used to evaluate the long-term performance of the system, but also serve as the basis for further optimization and improvement.

[0119] Through these steps, the system can provide accurate speed measurement results under various operating conditions. This stage ensures that the results of all previous steps can be effectively converted into data support in practical applications, thereby improving the reliability and practicality of the entire system.

[0120] The present invention can optimize the accuracy and stability of speed measurement in real time under different working conditions by dynamically adjusting the clock cycle and frequency division / multiplication settings, combined with the predictive ability of the machine learning model. This method reduces manual intervention, improves the automation level of the system, and significantly enhances the accuracy and reliability of measurement. It is suitable for a variety of complex environments and application scenarios, and provides more reliable data support and more efficient measurement performance.

[0121] The rotation speed sampling and calculation device with a variable count clock described below and the rotation speed sampling and calculation method with a variable count clock described above can be referred to each other.

[0122] Please see attached Figure 3 The present invention also provides a speed sampling and calculating device of a variable counting clock, comprising:

[0123] The data collection unit 100 is configured to collect and record the pulse signal generated by the rotation speed sensor;

[0124] The data processing unit 200 is configured to pre-process the collected pulse signal and extract features from the pre-processed data;

[0125] A machine learning unit 300, configured to train a machine learning model using a historical data set and predict optimal clock cycles and frequency division / multiplication settings based on real-time data;

[0126] A control unit 400 configured to dynamically adjust the clock period and frequency division / multiplication settings according to the prediction results;

[0127] The output unit 500 is configured to output the adjusted rotation speed value.

[0128] The device of this embodiment can be used to execute the above method embodiment, and its principles and technical effects are similar, which will not be repeated here.

[0129] Please see attached Figure 4 The present invention further provides a computer device 40, comprising: a processor 41 and a memory 42, wherein the memory 42 stores a computer program executable by the processor, and when the computer program is executed by the processor, the above method is executed.

[0130] The present invention further provides a storage medium 43 on which a computer program is stored. When the computer program is run by the processor 41, the above method is executed.

[0131] Among them, the storage medium 43 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0132] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A speed sampling calculation method for a variable counting clock, characterized in that: The following steps are involved: Collect the pulse signals generated by the speed sensor, record the timestamp, ambient temperature, load and speed of each pulse, and perform preprocessing; Extracting features from the preprocessed data, the features including pulse frequency change rate, average pulse interval, ambient temperature change rate, and load change rate; Based on the extracted features, a machine learning model is used to predict the optimal clock period and division / multiplication settings; Dynamically adjusting the clock period and frequency division / multiplication settings according to real-time measurement data to optimize the accuracy of speed measurement; Output the adjusted speed value; The step of dynamically adjusting the clock period and the frequency division / multiplication settings according to the real-time measurement data also includes: Determine real-time speed and the speed predicted by the machine learning model ; Calculate the error rate between the real-time speed and the predicted speed: ; in, Indicates the ratio of the difference between the predicted speed and the actual speed; Adjust the clock period based on the calculated error rate , the adjustment formula is: ; in, represents the adjusted clock period, represents the clock period before adjustment, It is a preset adjustment coefficient used to control the adjustment range; If the resulting new clock cycle If the resulting measurement error still exceeds the predetermined tolerance range, the steps are repeated until the error rate falls within an acceptable range; The step of dynamically adjusting the clock period and the frequency division / multiplication settings according to the real-time measurement data also includes: According to the real-time speed and the speed predicted by the machine learning model Calculate pulse measurement error; Calculate the error ratio and use it to determine the adjustment amount for frequency division / multiplication : ; in, Indicates the frequency division or frequency multiplication adjustment amount. is the sensitivity parameter; application Adjust the current frequency division / multiplication settings; If the obtained measurement error still does not meet expectations, repeat the steps until the error meets the predetermined standard; The training of the machine learning model includes: The machine learning model is trained using the training set data, and the model parameters are optimized by minimizing the speed prediction error. The objective function of the speed prediction error is defined as: ; in, is the number of samples in the training set, The model at time point The predicted speed value, is the actual measured speed value; The step of outputting the adjusted speed value is calculated according to the cycle measurement method using the following formula: ; in, is the number of pulses, is the adjusted clock period.

2. The method for calculating the speed sampling of a variable counting clock according to claim 1, characterized in that: The machine learning model is a random forest or a neural network.

3. The method for calculating the speed sampling of a variable counting clock according to claim 1, characterized in that: The pulse frequency change rate, average pulse interval, ambient temperature change rate and load change rate are as follows: The pulse frequency change rate is calculated as follows: ; in, Indicates at time The number of pulses, and is the timestamp of the continuous pulses; Average pulse interval, calculates the average of all measured pulse intervals: ; in, is the total number of pulses in the measurement period; Ambient temperature change rate, calculate the change in ambient temperature between two consecutive measurements: ; in, and are the values ​​of two consecutive measurements; The load change rate is calculated in the same way as the ambient temperature change rate.

4. The method for calculating the speed sampling of a variable counting clock according to claim 3, characterized in that: The features also include the mean and standard deviation of the historical speed trend.

5. A speed sampling and calculation device of a variable counting clock, used to implement the method according to any one of claims 1 to 4, characterized in that: include: A data collection unit configured to collect and record a pulse signal generated by the speed sensor; a data processing unit configured to preprocess the collected pulse signals and extract features from the preprocessed data; a machine learning unit configured to train a machine learning model using a historical data set and predict optimal clock cycle and frequency division / multiplication settings based on real-time data; A control unit configured to dynamically adjust a clock period and a frequency division / multiplication setting according to the prediction result; an output unit configured to output an adjusted speed value; The step of dynamically adjusting the clock period and the frequency division / multiplication settings according to the real-time measurement data by the control unit comprises: Determine real-time speed and the speed predicted by the machine learning model ; Calculate the error rate between the real-time speed and the predicted speed: ; in, Indicates the ratio of the difference between the predicted speed and the actual speed; Adjust the clock period based on the calculated error rate , the adjustment formula is: ; in, represents the adjusted clock period, represents the clock period before adjustment, It is a preset adjustment coefficient used to control the adjustment range; If the resulting new clock cycle If the resulting measurement error still exceeds the predetermined tolerance range, the steps are repeated until the error rate falls within an acceptable range; The step of dynamically adjusting the clock period and the frequency division / multiplication settings according to the real-time measurement data by the control unit also includes: According to the real-time speed and the speed predicted by the machine learning model Calculate pulse measurement error; Calculate the error ratio and use it to determine the adjustment amount for frequency division / multiplication : ; in, Indicates the frequency division or frequency multiplication adjustment amount. is the sensitivity parameter; application Adjust the current frequency division / multiplication settings; If the obtained measurement error still does not meet expectations, repeat the steps until the error meets the predetermined standard; The training of the machine learning model includes: The machine learning model is trained using the training set data, and the model parameters are optimized by minimizing the speed prediction error. The objective function of the speed prediction error is defined as: ; in, is the number of samples in the training set, The model at time point The predicted speed value, is the actual measured speed value; The step of outputting the adjusted speed value by the output unit is calculated according to the cycle measurement method using the following formula: ; in, is the number of pulses, is the adjusted clock period.

6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.