Electric bicycle sensing test method based on control gesture association and system thereof

CN122590960APending Publication Date: 2026-08-18XIANGJIN TIANJIN CYCLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610469177.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-10
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]然而,现有电动自行车传感测试方法及系统在姿态模拟、数据同步、关联分析及异常判定等环节仍存在诸多不足,难以满足高精度、标准化的测试需求,制约了电动自行车传感器测试的智能化、规范化发展,因此,亟需一种能够精准控制测试姿态、实现数据同步关联、科学判定传感器异常的测试方案

Benefits of technology

[0016] Compared with existing technologies, the present invention has the following advantages: 1. The sensor installation and acquisition module enables precise docking between the sensor under test and the test part of the vehicle body. Combined with the synchronous acquisition design of the data acquisition unit and the attitude detection unit, it ensures that the sensor feedback data and attitude parameters are acquired synchronously under different test attitudes. The data synchronization and processing module solves the problems of data misalignment, missing data and asynchrony in traditional testing by uniform timestamp calibration, linear interpolation to complete missing data and eliminate synchronization abnormal data. It ensures the integrity, time consistency and accuracy of the dataset and provides data support for subsequent correlation analysis and model construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122590960A_ABST
    Figure CN122590960A_ABST
Patent Text Reader

Abstract

The application discloses a control gesture correlation-based electric bicycle sensing test method and system, which realizes accurate testing and abnormal diagnosis through cooperation of various modules. The sensor installation and collection module realizes accurate docking of the sensor and the vehicle body, and guarantees synchronous acquisition of data and attitude parameters; the data synchronization and processing module solves the data misplacement problem through timestamp calibration, interpolation completion and abnormal elimination, and provides reliable data support. The correlation logic and data driving module combines multiple algorithms to mine correlation relationships and construct a sensor trust relationship model, and the dynamic weight adjustment of the deviation calling and weighting calculation module is matched, so that the accuracy of abnormal judgment is improved. The system supports model incremental updating and multi-working-condition adaptation, the main control unit realizes full-process automation, and standardized design guarantees test repeatability. The abnormal judgment module adopts double-checking logic to avoid misjudgment, and synchronously records abnormal information, so that it is convenient to trace back and rectify, and the test requirements of multiple vehicle models and multiple scenes are fully met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electric bicycle testing technology, and in particular to a sensing test method and system for electric bicycles based on control posture correlation. Background Technology

[0002] As electric bicycles become the mainstream mode of transportation for short-distance travel in urban and rural areas, their driving safety and stability are receiving increasing attention. Sensors, as core components for the safety control and status monitoring of electric bicycles, directly determine the vehicle's handling precision, fault warning capabilities, and driving safety based on their performance. During actual operation, electric bicycles encounter various complex postures, such as level riding, uphill and downhill driving, and turning. Under different postures, parameters such as vehicle tilt, pitch, and center of gravity shift dynamically change, thus affecting the sensor's feedback accuracy and data reliability.

[0003] To ensure the testing quality of electric bicycle sensors, it is necessary to simulate various postures under actual driving scenarios in a laboratory environment. Accurate collection and analysis of sensor feedback data under different postures are crucial for evaluating sensor performance, reliability, and adaptability. Currently, the industry is gradually adopting sensor testing platforms for electric bicycle sensor testing. The core objective is to achieve accurate sensor data collection and anomaly detection by simulating actual driving postures, providing data support for sensor performance optimization, fault diagnosis, and vehicle safety design.

[0004] However, existing electric bicycle sensor testing methods and systems still have many shortcomings in terms of attitude simulation, data synchronization, correlation analysis, and anomaly judgment, making it difficult to meet the requirements of high-precision and standardized testing. This restricts the intelligent and standardized development of electric bicycle sensor testing. Therefore, there is an urgent need for a testing solution that can accurately control the test attitude, realize data synchronization and correlation, and scientifically judge sensor anomalies. Summary of the Invention

[0005] To achieve the above objectives, one of the technical solutions adopted by the present invention is: a sensing test method for electric bicycles based on control attitude correlation, the method comprising:

[0006] The electric bicycle under test is fixed on the sensing test platform, and the sensor is installed on the electric bicycle under test. The sensing test platform is equipped with a variety of preset test postures, and the actuators of the posture adjustment mechanism of the electric bicycle sensing test platform are adjusted through posture adjustment strategy to make the posture of the electric bicycle under test reach the preset value and remain stable. Under each preset test posture, feedback data from each sensor and parameter data under different postures are collected synchronously, and a sensor posture and parameter association dataset is formed through a data synchronization strategy. Based on the sensor attitude and parameter association dataset, the association relationship of feedback data of each sensor under different preset test attitudes is determined by the association logic strategy, and a sensor trust relationship model is constructed by the data-driven strategy. Real-time feedback data under each preset test posture will be input into the sensor trust relationship model, and parameter deviation factor and correlation logic fit factor will be obtained through deviation call strategy; The parameter deviation factor and the correlation logic fit factor are processed by a dynamic weighting algorithm to obtain a comprehensive judgment factor; When the comprehensive judgment factor of a certain sensor is greater than a preset threshold, the corresponding sensor is abnormal.

[0007] Furthermore, the attitude adjustment strategy includes: The current posture data of the electric bicycle under test is collected in real time by sensors, and the collection frequency is consistent with the collection frequency of sensor feedback data to ensure the time synchronization between posture data and sensor data. The real-time acquired attitude data is compared with the standard parameters of the preset test attitude, and the deviation value of each attitude data is calculated. If the real-time deviation value is greater than the attitude deviation judgment threshold, the adjustment data of the adjustment actuator is determined through offline debugging of the closed-loop adjustment algorithm, so as to adjust the actuator of the attitude adjustment mechanism and gradually reduce the attitude deviation. The system determines whether the deviation values ​​within a preset number of consecutive sampling periods are all within the attitude deviation judgment threshold. If the threshold is met, the attitude is determined to have reached the preset value and remained stable, and the adjustment is stopped. If the threshold is not met, the closed-loop adjustment continues until the attitude is stable, thus avoiding attitude fluctuations from affecting the accuracy of sensor data acquisition.

[0008] Furthermore, the data synchronization strategy includes: When the attitude adjustment mechanism reaches the preset attitude and stabilizes, a unified timestamp is added to the attitude parameters collected at this time and the feedback data from each sensor. If sensor feedback data or attitude parameters are missing at a certain sampling time, linear interpolation is used to interpolate the data from two adjacent sampling times to ensure that each timestamp corresponds to a complete set of attitude parameters and sensor feedback data. Calculate the acquisition time difference between the attitude parameters and the sensor feedback data at the same timestamp. If the acquisition time difference is greater than the time synchronization error threshold, it is determined to be a synchronization anomaly, and the data set is removed. After the data has been calibrated with timestamps, aligned with data, and checked for anomalies, it is sorted and organized according to the preset test posture. A correlation structure is established between posture type, posture parameters, sensor feedback data, and timestamps to form a sensor posture and parameter correlation dataset.

[0009] Furthermore, the association logic strategy includes: pass The criteria perform outlier removal and normalization on the data in the sensor attitude and parameter association dataset; By combining the Pearson correlation coefficient analysis algorithm and the mutual information algorithm, the feedback data of different sensors under the same preset test posture are processed to obtain the correlation between pairs of sensors and the correlation between sensor feedback data and posture parameters. Based on the correlation degree calculation results, effective association rules are determined; Cross-validation is used to divide the association dataset into a training set and a validation set. Association rules are extracted using the training set and the accuracy of the rules is verified using the validation set. If the accuracy of a rule verification is greater than the confidence threshold, the association rule is retained. If the accuracy is less than the confidence threshold, the association calculation parameters are readjusted and the rules are extracted again until the accuracy requirement is met.

[0010] Furthermore, the data-driven strategy includes: The sensor attitude and parameter association dataset is divided into training set, validation set and test set according to a preset ratio; The model is constructed using the support vector machine algorithm, with attitude parameters and sensor feedback data as input features, and association rules extracted by the association logic strategy and reasonable parameter ranges as output features. The trained model is optimized based on the validation set data. The prediction accuracy of the model on the validation set is calculated. If the prediction accuracy is less than the preset accuracy value, the support vector machine algorithm parameters are adjusted, and effective rules in the association rule base are added. The model is then retrained. The optimized model is validated using test set data. If the model's prediction accuracy is greater than the preset accuracy value, the model is deemed to have been successfully built and stored in the database of the test platform.

[0011] Furthermore, the biased invocation strategy includes: For the real-time feedback data of a single sensor under a certain preset test posture, the mean and standard deviation of the parameters of the sensor under the corresponding posture are called in the sensor trust relationship model to calculate the absolute deviation, relative deviation and the degree of deviation exceeding the range. The sensor correlation degree obtained from the correlation logic strategy assigns dynamic weights to the absolute deviation, relative deviation, and the degree of deviation exceeding the range. If the sensor correlation degree is greater than the maximum value of the threshold range, the weight of the relative single parameter deviation is increased and the weight of the absolute deviation is decreased; if the correlation degree is less than the minimum value of the threshold range, the weight of the degree of deviation exceeding the range is increased. The parameter deviation factor is obtained by combining the absolute deviation, relative deviation, and the degree of deviation exceeding the range with dynamic weights and summing them.

[0012] Furthermore, the biased invocation strategy also includes: The real-time feedback data of the sensor under test in the current preset test posture is matched with the association rules of the corresponding posture in the association rule library. The rule matching algorithm is used to calculate the matching degree between the real-time data combination and each association rule. The average value of the matching degree of all association rules is taken as the rule matching comprehensive degree. The Pearson correlation coefficient between the sensor under test and the feedback data of related sensors is calculated in real time under the current attitude. The correlation coefficient is compared with the preset correlation coefficient range of the sensor trust relationship model to calculate the correlation deviation rate. Based on the rule matching comprehensiveness and correlation deviation rate, the correlation logical fit factor is calculated.

[0013] Furthermore, dynamic weighting algorithms include: Based on the type of preset test posture, set the initial weights of the parameter deviation factor and the initial weights of the correlation logic fit factor; Calculate the weight adjustment coefficient based on real-time test data; If the parameter deviation factor is greater than the weight adjustment coefficient, the percentage of the initial weight of the parameter deviation factor is increased, and the percentage of the initial weight of the correlation logic fit factor is decreased to the same percentage; if the correlation logic fit factor is greater than the weight adjustment coefficient, the percentage of the initial weight of the correlation logic fit factor is increased, and the percentage of the initial weight of the parameter deviation factor is decreased to the same percentage. The comprehensive judgment factor is obtained by multiplying the dynamically adjusted weights by the corresponding factors and summing the results.

[0014] Furthermore, the method also includes: if the comprehensive judgment factor is greater than a preset threshold, then determining whether the comprehensive judgment factor within a consecutive preset number of sampling periods is greater than the preset threshold; if so, confirming that the sensor is abnormal; if only the comprehensive judgment factor of a single sampling period is greater than the preset threshold, then re-collecting data and recalculating the comprehensive judgment factor.

[0015] One technical solution adopted by this invention is: an electric bicycle sensing test system based on control attitude correlation, characterized in that the system is applicable to the above-mentioned electric bicycle sensing test method based on control attitude correlation, and the system includes: The sensor installation and acquisition module includes a sensor group to be tested and a data acquisition unit. The sensor group to be tested is installed on the corresponding test parts of the electric bicycle to be tested and is used to collect feedback data of braking pressure, wheel speed, steering angle, acceleration and damping force of the electric bicycle under different test postures. The data acquisition unit is electrically connected to each sensor to be tested and the posture detection unit, and synchronously collects feedback data and posture parameter data from each sensor. The data synchronization and processing module is electrically connected to the sensor installation and acquisition module and is used to execute the data synchronization strategy. The data synchronization and processing module includes a timestamp calibration unit, a data alignment unit, and an anomaly verification unit. The association logic and data-driven module is electrically connected to the data synchronization and processing module and is used to execute association logic strategies and data-driven strategies. The association logic and data-driven module includes an association logic processing unit and a model building and storage unit. The deviation invocation and weighted calculation module is electrically connected to the correlation logic and data-driven module and the sensor installation and acquisition module. It is used to execute the deviation invocation strategy and dynamic weighting algorithm. The deviation invocation and weighted calculation module includes a deviation calculation unit, a fit degree calculation unit and a dynamic weighting unit. The anomaly detection module, which is electrically connected to the deviation call and weighted calculation module, is used to execute the anomaly detection logic; The main control and interaction module is electrically connected to the sensor installation and acquisition module, the data synchronization and processing module, and the anomaly detection module, respectively, and is used to realize the collaborative work of each module, command issuance, and data interaction; the main control and interaction module includes a main control unit and a human-machine interaction unit.

[0016] Compared with existing technologies, the present invention has the following advantages: 1. The sensor installation and acquisition module enables precise docking between the sensor under test and the test part of the vehicle body. Combined with the synchronous acquisition design of the data acquisition unit and the attitude detection unit, it ensures that the sensor feedback data and attitude parameters are acquired synchronously under different test attitudes. The data synchronization and processing module solves the problems of data misalignment, missing data and asynchrony in traditional testing by uniform timestamp calibration, linear interpolation to complete missing data and eliminate synchronization abnormal data. It ensures the integrity, time consistency and accuracy of the dataset and provides data support for subsequent correlation analysis and model construction.

[0017] 2. The association logic and data-driven module has multiple built-in algorithm modules, through... The criteria eliminate outliers and normalize data to remove dimensional differences. By combining Pearson correlation coefficient and mutual information algorithm, the linear and nonlinear correlations between sensors and between sensors and attitude parameters are comprehensively explored. A reliable association rule base is formed through cross-validation. The sensor trust relationship model built based on the support vector machine algorithm can evaluate the reliability of sensor data, breaking through the limitations of single parameter judgment. By combining the deviation call and weighted calculation module with dynamic weight adjustment, the calculation of comprehensive judgment factors is realized, improving the scientificity and accuracy of anomaly judgment.

[0018] 3. The model building and storage unit supports online calling and incremental updates of sensor trust relationship models, which can flexibly adapt to the testing needs of different vehicle models and different types of sensors without the need to repeatedly build the test system; the dynamic weighting unit dynamically adjusts the weights according to the preset test posture type, which fits the test characteristics of different working conditions such as level driving, uphill and downhill, and turning, ensuring that the weight allocation matches the real-time test scenario; the human-computer interaction unit supports test parameter setting, real-time monitoring and manual intervention.

[0019] 4. The main control unit adopts a controller to coordinate the collaborative work of various modules and realize the fully automated operation of attitude adjustment, data acquisition, synchronous processing, model calling, and anomaly judgment. The system ensures good repeatability of test results under different test scenarios through standardized module design, data processing flow and anomaly judgment logic.

[0020] 5. The anomaly detection module adopts the logic of single-cycle over-limit triggering resampling and continuous over-limit confirmation of anomalies, effectively avoiding misjudgments caused by instantaneous interference; when an anomaly is confirmed, the abnormal sensor number, type, corresponding attitude and data are recorded simultaneously, which facilitates subsequent anomaly cause tracing and rectification. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating the electric bicycle sensing test method based on control attitude correlation according to the present invention.

[0022] Figure 2 This is a schematic diagram of the module connection of the electric bicycle sensing test system based on control attitude correlation according to the present invention. Detailed Implementation

[0023] The technical solutions of the electric bicycle sensing test method and system based on control attitude correlation provided by the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0024] Example 1 like Figure 1 As shown, an electric bicycle sensing test method based on control attitude correlation is described. The method includes: fixing the electric bicycle under test on the sensing test platform and installing the sensor on the electric bicycle under test.

[0025] In this embodiment, the electric bicycle under test is fixed to the sensing test platform using a special fixing clamp. During the fixing process, it is ensured that the center of gravity of the electric bicycle is aligned with the attitude adjustment center of the test platform to avoid attitude adjustment errors caused by loose fixing or center of gravity shift. At the same time, according to the test requirements, the corresponding sensor is installed in the preset position of the electric bicycle under test. During installation, it is ensured that the sensor is firmly connected to the bicycle body and that the sensor's acquisition direction is consistent with the test requirements to avoid installation deviations affecting data acquisition accuracy. After installation, the sensor is initialized and calibrated to ensure that the sensor is in normal working condition.

[0026] The method also includes: equipping the sensing test platform with multiple preset test postures, and adjusting the actuators of the posture adjustment mechanism of the electric bicycle sensing test platform through a posture adjustment strategy, so that the posture of the electric bicycle under test reaches the preset value and remains stable.

[0027] Specifically, the sensor testing platform is pre-equipped with various typical preset test postures, covering the postures of electric bicycles during actual operation, such as horizontal riding, uphill riding, downhill riding, and turning / tilting postures. Each preset test posture corresponds to standardized posture parameters, including core parameters such as vehicle tilt angle, pitch angle, and vehicle height. During testing, the posture adjustment mechanism actuators of the electric bicycle sensor testing platform, such as servo motors and hydraulic push rods, are driven by a posture adjustment strategy to gradually adjust the posture of the testing platform, thereby causing changes in the posture of the electric bicycle under test. Ultimately, the posture of the electric bicycle under test reaches the standard parameters of the preset test posture and remains stable, providing a stable posture environment for sensor data acquisition.

[0028] Furthermore, the attitude adjustment strategy includes: collecting the current attitude data of the electric bicycle under test in real time through sensors, with the collection frequency consistent with the sensor feedback data collection frequency, to ensure the time synchronization between attitude data and sensor data.

[0029] Specifically, attitude sensors such as gyroscopes and accelerometers installed on electric bicycles are used to collect real-time attitude data of the electric bicycle under test. The collected data includes the tilt angle of the bicycle body. Pitch angle Vehicle center of gravity offset These are key parameters. To ensure the time synchronization of attitude data and sensor feedback data, the acquisition frequency of attitude data is strictly kept consistent with the acquisition frequency of sensor feedback data. Attitude data and sensor feedback data are acquired synchronously once to avoid time differences caused by inconsistent acquisition frequencies, thereby preventing data misalignment from affecting adjustment accuracy.

[0030] The real-time acquired attitude data is compared with the standard parameters of the preset test attitude, and the deviation value of each attitude data is calculated to determine the degree of deviation between the current attitude and the preset attitude.

[0031] Specifically, let the real-time acquisition value of a certain attitude parameter be... The preset standard value corresponding to this attitude parameter is Then the real-time deviation value of this attitude parameter The calculation formula is: , in, For the first Each attitude parameter in Real-time deviation value at any given moment; For the first Each attitude parameter in Real-time acquired values ​​at any given time, including the tilt angle and pitch angle The unit is °, and the centroid offset is... The unit is mm; For the first The preset standard values ​​for each attitude parameter.

[0032] To comprehensively assess the overall attitude deviation, a comprehensive attitude deviation value is introduced. The weighted summation method is used for calculation, and the formula is: , in, for The overall attitude deviation value at any given time; For the first The weighting coefficients for each attitude parameter are set according to the degree of influence of different attitude parameters on sensor testing, and the weighting coefficients satisfy the following: ; The total number of attitude parameters involved in the deviation calculation is typically... .

[0033] If the real-time deviation value is greater than the attitude deviation judgment threshold, the adjustment data of the adjustment actuator is determined through offline debugging of the closed-loop adjustment algorithm, so as to adjust the actuator of the attitude adjustment mechanism and gradually reduce the attitude deviation.

[0034] Specifically, a preset attitude deviation judgment threshold is set. The comprehensive attitude deviation value calculated in real time With threshold Compare them.

[0035] like This indicates that the current posture of the electric bicycle deviates too much from the preset value. It is necessary to determine the adjustment data of the attitude adjustment mechanism's actuators through offline debugging of the closed-loop adjustment algorithm, thereby driving the actuators to gradually reduce the posture deviation. The closed-loop adjustment algorithm uses a PID control algorithm, and its adjustment amount... The calculation formula is: , in, for Adjustment amount at any given time; This is a proportional coefficient, determined through offline debugging, used to adjust the deviation response speed. The larger the value, the faster the deviation response, but too large a value can lead to attitude fluctuations; This is the integral coefficient, in units of 1 / s, used to eliminate steady-state deviations. The larger the value, the faster the steady-state deviation is eliminated, but too large a value can lead to overshoot. These are differential coefficients, measured in seconds (s), used to suppress overshoot and improve attitude stability. The larger the value, the better the overshoot suppression effect, but too large a value will lead to a slow response; for arrive The integral of the overall attitude deviation value at each moment is used to accumulate the deviation and eliminate steady-state error; The derivative of the overall attitude deviation value is used to reflect the rate of change of the deviation and suppress overshoot.

[0036] Determined through offline debugging , , The optimal value is determined to ensure a smooth reduction in attitude deviation during adjustment, avoiding overshoot or slow response. The actuator adjusts according to the amount of adjustment. The action drives the attitude adjustment mechanism to adjust the attitude of the test platform, thereby changing the attitude of the electric bicycle and adjusting the overall attitude deviation value. Gradually decrease.

[0037] The system determines whether the deviation values ​​within a preset number of consecutive sampling periods are all within the attitude deviation judgment threshold. If the threshold is met, the attitude is determined to have reached the preset value and remained stable, and the adjustment is stopped. If the threshold is not met, the closed-loop adjustment continues until the attitude is stable, thus avoiding attitude fluctuations from affecting the accuracy of sensor data acquisition.

[0038] Specifically, to avoid the impact of posture fluctuations on the accuracy of sensor data acquisition, it is necessary to determine whether the electric bicycle's posture has reached a preset value and remained stable. This involves setting a preset number of consecutive... Determine continuity Comprehensive attitude deviation value within each sampling period Do they all meet the requirements? .

[0039] If this condition is met, it is determined that the electric bicycle's posture has reached the preset test posture standard value and remains stable, and posture adjustment is immediately stopped, entering the sensor data acquisition stage; if this condition is not met, the above closed-loop adjustment steps continue to be executed until continuous The deviation values ​​within each sampling period are all within the threshold range, ensuring that the attitude is stable before sensor data is collected. This fundamentally avoids sensor data distortion caused by attitude fluctuations and ensures the accuracy and reliability of test results.

[0040] In this embodiment, various preset test postures closely resemble real-world driving scenarios, covering typical conditions such as level, uphill / downhill, and turning. Each posture corresponds to standardized parameters. Combining a closed-loop feedback adjustment strategy and a PID algorithm, precise posture adjustment and stable maintenance are achieved. By acquiring posture data in real time, accurately calculating deviations, and dynamically adjusting in a closed loop, followed by continuous sampling to verify posture stability, sensor data distortion caused by posture fluctuations is effectively avoided. This ensures that the test data closely matches actual usage scenarios, improving the authenticity and reference value of the test results. It also guarantees that the acquisition frequency of posture data and sensor feedback data is consistent, solving the problems of data misalignment and asynchrony in traditional testing, and providing data support for subsequent data association and model construction.

[0041] The method also includes: simultaneously collecting feedback data from each sensor and parameter data under different postures in each preset test posture, and forming a sensor posture and parameter association dataset through a data synchronization strategy.

[0042] Furthermore, the data synchronization strategy includes adding a unified timestamp to the attitude parameters collected at this time and the feedback data from each sensor when the attitude adjustment mechanism reaches a preset attitude and stabilizes.

[0043] Specifically, after the attitude adjustment mechanism reaches the preset attitude and remains stable, the data synchronization acquisition process is initiated, and each set of data collected at this time, including the tilt angle, is recorded. Pitch angle Center of gravity offset Attitude parameters such as velocity Braking signal strength Add a unified timestamp to the feedback data from each sensor. Timestamp Using the Unix timestamp format ensures that attitude parameters and sensor feedback data acquired at the same time correspond to a unique timestamp, laying the foundation for subsequent data alignment. Furthermore, the frequency of timestamp generation is synchronized with the data acquisition frequency. Maintain consistency, that is, after each data collection cycle. This generates a new timestamp, achieving a precise correspondence between the timestamp and the collection period.

[0044] If sensor feedback data or attitude parameters are missing at a certain sampling time, linear interpolation is used to interpolate the data from two adjacent sampling times to ensure that each timestamp corresponds to a complete set of attitude parameters and sensor feedback data.

[0045] Specifically, the linear interpolation method calculates the supplementary data for missing times by linearly fitting the data from two adjacent valid sampling times.

[0046] Suppose a certain attitude parameter or sensor feedback data occurs at two adjacent valid sampling times. and The corresponding values ​​are respectively and Then the missing moment Supplementary data The calculation formula is: , in, For missing moments Supplementary data, with units consistent with the corresponding data types; , Missing time points The timestamps of two adjacent valid sampling times, in seconds, must satisfy the following conditions: ; , These are the corresponding valid times. , The collected valid data, units and Consistent; To ensure that the rate of data change reflects the trend of data change between two adjacent valid moments, the interpolated data closely matches the actual data change pattern.

[0047] If consecutive missing data exceeds the preset sampling period within a certain time period, interpolation will no longer be performed to supplement the data, and the data in that time period will be deemed invalid to avoid excessive interpolation errors affecting the quality of the dataset.

[0048] Calculate the acquisition time difference between the attitude parameters and the sensor feedback data at the same timestamp. If the acquisition time difference is greater than the time synchronization error threshold, it is determined to be a synchronization anomaly, and the data set is discarded.

[0049] Specifically, to further ensure data synchronization, it is necessary to verify the time difference between the attitude parameters and sensor feedback data at each timestamp. Let's assume the same timestamp... Below, the actual acquisition time of the attitude parameters is The actual acquisition time of the feedback data from a certain sensor is The unit for both is seconds (s), then the time difference between the two acquisitions is... The calculation formula is: , in, The time difference between the acquisition of attitude parameters and feedback data from a certain sensor at the same timestamp is expressed in seconds, reflecting the degree of synchronization between the two. For state parameters at timestamps The corresponding actual acquisition time, in seconds, is generated from the acquisition records of the attitude sensor; For a sensor's feedback data in timestamp The corresponding actual acquisition time, in seconds, is generated from the acquisition records of the corresponding sensor.

[0050] Preset time synchronization error threshold The unit is seconds (s), set according to the required testing accuracy. The calculated acquisition time difference... With threshold Comparison: If If the data set is found to be abnormally synchronized, it will be removed; otherwise... If the data is found to be synchronized successfully, it will be retained for subsequent correlation and processing.

[0051] After the data has been calibrated with timestamps, aligned with data, and checked for anomalies, it is sorted and organized according to the preset test posture. A correlation structure is established between posture type, posture parameters, sensor feedback data, and timestamps to form a sensor posture and parameter correlation dataset.

[0052] Specifically, the attitude types include level driving, uphill at 30°, etc.; the attitude parameters are: , , The sensor feedback data includes the collected values ​​from various types of sensors, along with timestamps. This association structure establishes a one-to-one correspondence between attitude type, attitude parameters, and sensor feedback data. Ultimately, it integrates data subsets from all preset test attitudes to form a complete sensor attitude and parameter association dataset. This dataset can be directly used for subsequent sensor performance analysis, such as error analysis of sensors under different attitudes and research on the influence of attitude parameters on sensor feedback data, providing data support for the performance optimization of electric bicycle sensors.

[0053] In this embodiment, the data synchronization strategy first achieves precise alignment between attitude parameters and sensor feedback data through unified timestamp calibration. Using the Unix timestamp format ensures that all types of data collected at the same time correspond to a unique identifier. Combined with precise matching of timestamps and collection frequency, this completely solves the pain points of data misalignment and asynchrony in traditional testing, guaranteeing data temporal consistency and laying the foundation for subsequent analysis of the correlation between attitude parameters and sensor data.

[0054] Secondly, the dual verification mechanism of supplementing missing data with linear interpolation and removing outdated synchronization data effectively ensures the integrity and accuracy of the dataset. Linear interpolation closely follows the data variation patterns, avoiding analytical biases caused by missing data; synchronization time difference verification eliminates outdated data from asynchronous collections, preventing invalid data from affecting subsequent research and ensuring the high quality and reliability of the correlated dataset.

[0055] Furthermore, the associated dataset, categorized and organized according to preset attitudes, establishes a one-to-one correspondence between attitude type, attitude parameters, and sensor feedback data, clearly presenting the sensor's operating status under different attitudes and providing convenient support for subsequent sensor performance analysis. With this dataset, sensor error analysis under different attitudes and research on the influence of attitude on sensor data can be quickly conducted, providing direct data basis for sensor performance optimization and fault diagnosis.

[0056] The method also includes: determining the correlation relationship of feedback data of each sensor under different preset test postures based on the sensor attitude and parameter association dataset, and constructing a sensor trust relationship model through a data-driven strategy; Furthermore, the association logic strategy includes: through The criteria perform outlier removal and normalization on the data in the sensor attitude and parameter association dataset.

[0057] Specifically, The criteria are based on the normal distribution of the data, setting the normal range of the data as the mean ± 3 times the standard deviation. Data exceeding this range are considered outliers and are discarded. Let the sample dataset of a certain sensor feedback data or attitude parameters be... ,in Calculate the sample mean of the dataset given the number of samples of this data type. and sample standard deviation The formulas are as follows: , , in, This is the mean of the sample dataset, with units consistent with the corresponding data type; The standard deviation of the sample dataset, in units of 1 and 2. Consistency reflects the degree of dispersion in the data; For the first Each sample data point has a unit consistent with its corresponding data type. The number of samples; The number of degrees of freedom is used to correct for the bias of the sample standard deviation, making the calculation results more consistent with the population standard deviation.

[0058] If a certain sample data satisfy If the value is an outlier, the sample is considered an outlier and is removed; if If the result is negative, it is considered normal data and retained for subsequent processing.

[0059] By combining the Pearson correlation coefficient analysis algorithm and the mutual information algorithm, the feedback data of different sensors under the same preset test posture are processed to obtain the correlation between pairs of sensors and the correlation between sensor feedback data and posture parameters.

[0060] Specifically, the Pearson correlation coefficient is used to measure the degree of linear association between two variables, with a value ranging from -1 to 1. The closer the absolute value of the correlation coefficient is to 1, the stronger the linear association; the closer it is to 0, the weaker the linear association. Let the sample datasets of the two variables be... and ,in Given the sample size (dimensionless), the Pearson correlation coefficient between the two is... The calculation formula is: , in, For variables With variables The Pearson correlation coefficient is dimensionless and ranges from [-1, 1]. It is positively correlated. It is negatively correlated. Related to wireless connectivity; , For the first of two variables One sample data; , The mean of the two variable sample datasets; For the sample size, and The sample size is consistent in the criteria.

[0061] Mutual information is used to measure the degree of nonlinear association between two variables, compensating for the Pearson correlation coefficient's limitation of only reflecting linear associations. A higher mutual information value indicates a stronger association between the two variables, with a value range of [0, +∞). The specific formula is: , in, This represents the mutual information value between variables X and Y, expressed in bits. Let variable X take a discrete value The marginal probability, with a value range of [0,1]; Let variable Y take a certain discrete value The marginal probability, with a value range of [0,1]; Take the variable X Variable Y takes The joint probability of , with values ​​ranging from [0,1].

[0062] The final correlation degree is obtained by combining the Pearson correlation coefficient and the mutual information value. The weighted summation method is used for calculation, and the formula is as follows: , in, The final correlation degree between variables X and Y, with a value range of [0,1]. , Let be the weighting coefficient, satisfying ; is the absolute value of the Pearson correlation coefficient, ranging from [0,1]. The maximum value of mutual information, in bits, has a value of , The number of discrete values ​​that a variable can take is used to normalize the mutual information values ​​to the [0,1] interval.

[0063] Based on the correlation degree calculation results, effective association rules are determined.

[0064] Specifically, based on the above correlation calculation results, a preset correlation threshold is set. If the final correlation between two variables If a valid association exists between the two, the corresponding association rule is extracted; if If the two are not related, then the association rule is not extracted.

[0065] Cross-validation is used to divide the association dataset into a training set and a validation set. Association rules are extracted using the training set and the accuracy of the rules is verified using the validation set. If the accuracy of a rule verification is greater than the confidence threshold, the association rule is retained. If the accuracy is less than the confidence threshold, the association calculation parameters are readjusted and the rules are extracted again until the accuracy requirement is met.

[0066] Specifically, cross-validation is used to randomly divide the sensor attitude and parameter association dataset into a training set and a validation set, typically in a 7:3 ratio. The training set is used to extract association rules, and the validation set is used to verify the accuracy of these rules. Let the number of samples in the validation set that conform to the association rules be... The total number of samples in the validation set is The validation accuracy of the association rule is... The calculation formula is: , in, This represents the validation accuracy of the association rule, with a value range of [0%, 100%]. The higher the accuracy, the more reliable the association rule.

[0067] Preset reliability threshold The calculated verification accuracy and Comparison: If If the association rule is valid, it will be retained; otherwise... If the correlation calculation parameters are incorrect, it indicates that the parameters need to be readjusted, the correlation degree needs to be recalculated, and the correlation rules need to be extracted until the verification accuracy meets the requirements.

[0068] In this embodiment, the association logic strategy is implemented through... The criteria complete outlier removal and normalization of the data, accurately filtering invalid data based on the normal distribution characteristics of the data, effectively avoiding the interference of outliers on correlation analysis. Simultaneously, normalization eliminates differences in parameter dimensions, ensuring the accuracy and rationality of subsequent correlation calculations, laying a high-quality data foundation for correlation mining. Secondly, a combination of Pearson correlation coefficient and mutual information algorithm is used, taking into account both linear and nonlinear correlation analysis, overcoming the limitations of a single algorithm. This allows for comprehensive and accurate calculation of the correlation between sensors and between sensors and attitude parameters, clearly defining the correlation relationships between various data, and solving the pain points of traditional correlation analysis being one-sided and inaccurate. Furthermore, the dual mechanism of correlation threshold screening and cross-validation ensures the effectiveness and reliability of the correlation rules. Cross-validation divides the training and validation sets, and the correlation rules are dynamically adjusted based on accuracy verification, avoiding the introduction of invalid rules and providing a scientific and reliable correlation basis for the construction of the sensor trust relationship model. Finally, the construction of the sensor trust relationship model transforms the correlation rules into quantifiable trust evaluation standards, breaking the limitations of traditional sensor reliability judgment relying on experience, and providing standardized model support for subsequent data reliability assessment and anomaly detection. In summary, this strategy and model further enhance the scientific rigor and accuracy of the testing methods, providing more valuable reference for sensor performance optimization and fault diagnosis, and contributing to the intelligent upgrade of electric bicycle sensor testing.

[0069] Furthermore, the data-driven strategy includes dividing the sensor attitude and parameter association dataset into a training set, a validation set, and a test set according to a preset ratio.

[0070] Specifically, the sensor pose and parameter association dataset, processed by the association logic strategy, is divided into training, validation, and test sets according to a preset ratio for model training, optimization, and validation, ensuring the independence and representativeness of the datasets. A commonly used ratio is 6:2:2, and random sampling is used during the partitioning process to avoid model bias caused by uneven data distribution. The training set is used for model training, with input and output features labeled based on effective association rules extracted using the association logic strategy. The validation set is used for optimizing model parameters and supplementing the rule base. The test set is used for final performance validation of the model, ensuring its generalization ability.

[0071] The model is constructed using the support vector machine algorithm, with attitude parameters and sensor feedback data as input features, and association rules extracted by the association logic strategy and reasonable parameter ranges as output features.

[0072] Specifically, the input features of the model are attitude parameters and feedback data from each sensor, all of which are dimensionless data after normalization. The output features of the model are the effective association rules extracted by the association logic strategy, as well as the reasonable value range of each parameter, which are used to determine whether the sensor feedback data conforms to the association rules under the current attitude, and thus evaluate the reliability of the sensors.

[0073] The core of the Support Vector Machine (SVM) algorithm is to find the optimal classification hyperplane to classify sensor data with different trust levels. Its objective function is: , The constraints are: , , .

[0074] in, The normal vector of the hyperplane has the same dimension as the input feature. The intercept of the hyperplane; These are slack variables, taking values ​​in the range [0, +∞). The penalty coefficient is... The larger the value, the heavier the penalty for misclassified samples, and the more prone the model is to overfitting. The smaller the value, the stronger the model's generalization ability, but the classification accuracy may decrease; The number of samples in the training set; For the first The input feature vector of each training sample; For the first Labels of each training sample; Normal vector The square of the second norm.

[0075] The trained model is optimized based on the validation set data. The prediction accuracy of the model on the validation set is calculated. If the prediction accuracy is less than the preset accuracy value, the support vector machine algorithm parameters are adjusted, and effective rules in the association rule base are added. The model is then retrained.

[0076] Specifically, the trained support vector machine model is optimized based on the validation set data, and the prediction accuracy of the model on the validation set is calculated. The calculation method is consistent with the accuracy of association rule validation, that is... ,in The number of samples in the validation set that match the model's predictions. To verify the total sample size, the model prediction accuracy was preset. ,Will and Comparison: like If the model's performance does not meet the requirements, the parameters of the support vector machine algorithm need to be adjusted. At the same time, effective association rules in the association rule base should be added. Then, the model should be retrained using the training set, and the above optimization process should be repeated until the model's prediction accuracy on the validation set meets the preset requirements.

[0077] The optimized model is validated using test set data. If the model's prediction accuracy is greater than the preset accuracy value, the model is deemed to have been successfully built and stored in the database of the test platform.

[0078] Specifically, the optimized sensor trust relationship model is validated using test set data, and the model's prediction accuracy on the test set is calculated. The calculation method is consistent with the validation set accuracy. If If the model is deemed successful, it can accurately assess the reliability of the sensors based on attitude parameters and sensor feedback data, and can be used for subsequent sensor performance testing and anomaly warning; if If the model fails to meet the requirements, the process must return to the model optimization stage, further adjusting the algorithm parameters and association rule base, retraining and validating until the requirements are met. Once the model is successfully built, it is stored in the database of the electric bicycle sensor testing platform for direct access during subsequent testing, enabling real-time trust assessment and fault diagnosis of sensor data.

[0079] In this embodiment, the data-driven strategy uses random sampling to divide the associated dataset into training, validation, and test sets in a 6:2:2 ratio. This ensures the independence and representativeness of each dataset, effectively avoids model bias caused by uneven data distribution, and provides a scientific and reasonable basis for data partitioning for model training, optimization, and validation, laying the foundation for model accuracy.

[0080] Secondly, a support vector machine algorithm is used to build the model. The normalized attitude parameters and sensor feedback data are used as inputs, and the association rules and reasonable range of parameters are used as outputs. The model achieves accurate classification of sensor trust level by finding the optimal classification hyperplane, which takes into account the classification accuracy and generalization ability of the model and avoids the pain points of traditional algorithms such as overfitting or inaccurate classification.

[0081] Furthermore, through a dual verification mechanism of validation set optimization and test set validation, combined with parameter adjustment and association rule supplementation, model performance is continuously improved. By dynamically adjusting parameters such as penalty coefficients and improving the association rule base, the model's prediction accuracy is ensured to meet preset requirements, guaranteeing the model's reliability and practicality, and enabling accurate assessment of sensor trust levels.

[0082] The method further includes: inputting real-time feedback data under various preset test postures into the sensor trust relationship model, and obtaining parameter deviation factors and correlation logic fit factors through a deviation invocation strategy. The deviation invocation strategy consists of two parts: parameter deviation factor calculation and correlation logic fit factor calculation. The parameter deviation factor is used to quantify the degree of deviation between the real-time feedback data of a single sensor and the preset parameters of the model, while the correlation logic fit factor is used to quantify the degree of fit between the real-time data and the correlation rules and related sensor data. The two parts work together to comprehensively reflect the reliability of the sensor feedback data.

[0083] Furthermore, the biased invocation strategy includes: For the real-time feedback data of a single sensor under a certain preset test posture, the mean and standard deviation of the sensor parameters under the corresponding posture are called in the sensor trust relationship model to calculate the absolute deviation, relative deviation and the degree of deviation exceeding the range.

[0084] In the sensor trust relationship model, the average value of the historical qualified sample parameters of the sensor corresponding to the current preset test posture is invoked. and parameter standard deviation .in, and All data are calculated based on historical qualified sample data for that pose during model training, and the units are consistent with the original units of the sensor feedback data. If the model stores normalized data, then... and It is a dimensionless value, and its dimensions are consistent with those of the real-time feedback data.

[0085] Let the real-time feedback data of the sensor under the current preset test posture be: Calculate the absolute deviation respectively Relative deviation And the degree of deviation exceeding the range .

[0086] absolute deviation The formula used to reflect the absolute deviation between real-time data and the model's preset mean is: , in, This is the absolute deviation; Provides real-time feedback data from the sensors; This represents the average parameter value of the sensor in this posture within the model.

[0087] relative deviation This formula is used to reflect the relative deviation of real-time data from the model's preset mean, avoiding misjudgments due to differences in parameter magnitudes. , in, This represents the relative deviation, with a value range of [0, +∞). The larger the value, the greater the degree of relative deviation. This is the absolute deviation; This represents the average parameter value of the sensor in this posture within the model; It is a small constant, taking the value of , used to avoid The occurrence of a denominator of 0 does not affect the accuracy of the deviation calculation.

[0088] The degree to which the deviation exceeds the range This is used to reflect the extent to which real-time data exceeds the model's preset normal range. The model's preset normal range is... , For the coefficient, its formula is: , in, This represents the degree to which the deviation exceeds the range. It is dimensionless and ranges from [0, +∞). When the real-time data is within the normal range, When the value exceeds the range, the larger the value, the more severe the exceedance. This is the range coefficient, dimensionless, usually with a value of 2, used to define the preset normal range of the model; This represents the standard deviation of the sensor parameters in this pose within the model, in units of 1 / 2π / 2. Consistent; , , The meaning is the same as before. Used to avoid a denominator of 0.

[0089] The sensor correlation degree obtained from the correlation logic strategy assigns dynamic weights to the absolute deviation, relative deviation, and the degree of deviation exceeding the range. If the sensor correlation degree is greater than the maximum value of the threshold range, the weight of the relative single parameter deviation is increased and the weight of the absolute deviation is decreased; if the correlation degree is less than the minimum value of the threshold range, the weight of the degree of deviation exceeding the range is increased.

[0090] The correlation between this sensor and other sensors and attitude parameters is obtained based on the correlation logic strategy. The values ​​range [0,1] and assign dynamic weights to the three deviation indicators mentioned above, with the weight coefficients satisfying the following conditions: , , The weights for absolute deviation, relative deviation, and the degree to which the deviation exceeds the range are respectively determined, and the specific weighting rules are as follows: (1) The preset correlation threshold range is ,in This represents the minimum value of the correlation threshold. This is the maximum value of the association threshold, which is consistent with the association threshold range in the association rule determination stage; (2) If This indicates that the sensor has a high correlation with other parameters, and its data deviation is mainly reflected in relative fluctuations. Therefore, the weight of relative deviation should be increased and the weight of absolute deviation should be decreased. (3) If This indicates that the sensor has a low correlation with other parameters and strong data independence. It is necessary to focus on whether it exceeds the normal range, and therefore increase the weight of the deviation exceeding the range value. (4) If This indicates that the correlation of the sensor is within a reasonable range, and a balanced weight allocation is adopted.

[0091] The parameter deviation factor is obtained by combining the absolute deviation, relative deviation, and the degree of deviation exceeding the range with dynamic weights and summing them.

[0092] Specifically, the parameter deviation factor is obtained by multiplying the three deviation indicators by their corresponding dynamic weights and then summing the results. The formula is: , in, The parameter deviation factor has a value range of [0,1]. The larger the value, the greater the deviation between the real-time sensor data and the preset parameters of the model, and the lower the data reliability. The dynamic weighting coefficient represents the absolute deviation. The absolute deviation between the real-time feedback data of a single sensor and the mean value of the model's preset parameters; This represents the maximum absolute deviation of the sensor among historical qualified samples under the current preset test posture. The dynamic weighting coefficient for the relative deviation; The relative deviation of real-time feedback data from a single sensor; The dynamic weighting coefficient for the degree to which the deviation exceeds the range; This is a value indicating the degree to which the real-time feedback data from a single sensor deviates from the model's preset normal range.

[0093] at the same time, This parameter is used to normalize the absolute deviation, ensuring that its dimensions are consistent with those of the relative deviation and the degree to which the deviation exceeds the range. After mapping all three to the [0,1] interval, they are multiplied and summed with the corresponding dynamic weights to finally obtain a dimensionless parameter deviation factor with a value range of [0,1]. This enables a quantitative assessment of the reliability of real-time data from a single sensor, laying the foundation for subsequent calculation of correlation logic fit factors and overall sensor trust assessment.

[0094] Furthermore, the biased invocation strategy also includes: The real-time feedback data of the sensor under test in the current preset test posture is matched with the association rules of the corresponding posture in the association rule library. The rule matching algorithm is used to calculate the matching degree between the real-time data combination and each association rule. The average value of the matching degree of all association rules is taken as the rule matching comprehensive degree.

[0095] Specifically, the system calls upon all valid association rules extracted from the association logic strategy that correspond to the current preset test posture and include the sensor; this set is denoted as the rule set. ,in, The number of valid association rules, Simultaneously, real-time feedback data from all relevant sensors that have a valid correlation with this sensor are retrieved and recorded as the relevant data set. ,in, The number of relevant sensors, This ensures that all accessed data is processed by a data synchronization strategy and is consistent with the timestamp of the current real-time sensor data.

[0096] Rule fit is used to quantify the degree of fit between the current real-time feedback data from the sensor and the corresponding valid association rule, denoted as . For rule sets Each association rule in ,in Determine the current real-time data from the sensor. Whether it conforms to the constraints of the rule, and then combine that with the rule's validation accuracy. The rule fit is calculated using a weighted summation method, and the specific formula is as follows: , in, This represents the rule fit degree in the logical fit factor, with a value range of [0,1]. For the first The validation accuracy of the valid association rules, with a value range of [0%, 100%]; The coefficient is used for judgment, and its value is either 1 or 0. If the current real-time data from the sensor... Conforms to the The scope of constraints of the association rule, then ,otherwise ; To include the number of valid association rules for the current sensor, if Then set By default, its rule fit is at a medium level.

[0097] The Pearson correlation coefficient between the sensor under test and the feedback data of relevant sensors under the current attitude is calculated in real time, and compared with the correlation coefficient range preset by the sensor trust relationship model to calculate the correlation deviation rate.

[0098] Specifically, data coordination degree is used to quantify the degree of coordination and matching between the current real-time feedback data of the sensor and the real-time data of related sensors, denoted as The correlation degree between the current sensor and each related sensor is calculated based on the correlation logic strategy. ,in, The value range is [0,1]. The data synergy is calculated by combining the real-time data from relevant sensors with the corresponding association rules. The specific formula is as follows: , in, The data synergy degree in the logical fit factor is defined, with a value range of [0,1]. For the current sensor and the first The correlation degree of each related sensor, with a value range of [0,1]; The coefficient for collaborative judgment takes a value of 1 or 0. If the first... If the real-time data from each relevant sensor conforms to the constraints of its corresponding valid association rule, then... ,otherwise ; The number of related sensors that have a valid correlation with the current sensor, if Then set By default, its data coordination level is at a medium level.

[0099] Based on the rule matching comprehensiveness and correlation deviation rate, the correlation logical fit factor is calculated.

[0100] Specifically, rule fit and data synergy The correlation logic fit factor is obtained by using a weighted summation method. The specific formula is as follows: , in, This is the logical fit factor, with a value range of [0,1]. This is the weighting coefficient for rule fit, with a value range of [0.4, 0.6]. The weighting coefficients for data synergy satisfy... This value is matched with the rule fit weight coefficient, and is usually set to 0.5 to achieve a balance between rule fit and data collaboration. 、 The meaning is the same as before, and the value range is [0,1].

[0101] In this embodiment, the deviation retrieval strategy accurately calls upon historical qualified sample parameters stored in the model. Absolute deviation, relative deviation, and the degree to which deviation exceeds the range are calculated using scientific formulas, taking into account both absolute deviation and relative fluctuations. A small constant is introduced to avoid computational loopholes, and normalization processing eliminates dimensional differences, ensuring the accuracy and rationality of deviation calculation and laying the foundation for constructing parameter deviation factors. The correlation degree obtained based on the association logic strategy is assigned dynamic weights. The weight ratio of the three deviation indicators is dynamically adjusted according to the sensor correlation degree, aligning with the characteristics of sensors with different correlation levels. This avoids the one-sided deviation assessment caused by a single weight, achieving targeted and flexible deviation assessment. Through the dual calculation of rule fit and data synergy, the degree of fit between sensor data and association rules and related sensor data is comprehensively quantified, taking into account both rule matching and data synergy. This overcomes the limitations of single-dimensional assessment and can comprehensively reflect the reliability of sensor data.

[0102] The method also includes: processing the parameter deviation factor and the correlation logic fit factor through a dynamic weighting algorithm to obtain a comprehensive judgment factor.

[0103] Furthermore, dynamic weighting algorithms include: Based on the type of preset test posture, set the initial weights of the parameter deviation factor and the initial weights of the correlation logic fit factor.

[0104] Specifically, based on the type of the current preset test posture and the characteristics of the sensor data under that posture, initial weights for the parameter deviation factor and the correlation logic fit factor are set. The deviation and correlation characteristics of the sensor data differ under different preset test postures; therefore, the initial weights need to be configured specifically. The core constraint is that the sum of the two initial weights is 1 to ensure the rationality of the weight allocation, as detailed below: Let the initial weights of the parameter deviation factors be... The initial weights of the logical fit factors are: Both satisfy the following constraints: , in, The initial weights for the parameter deviation factor; The initial weights for the logical fit factors.

[0105] The specific configuration rules are determined in conjunction with the preset test posture types, tailored to the needs of actual test scenarios: (1) Stable working conditions such as horizontal driving and constant speed driving: The sensor data fluctuates little and the correlation is stable. The equal weight configuration is adopted to balance the two dimensions of parameter deviation and correlation fit. (2) Pitch attitude conditions such as uphill and downhill: Sensor data are greatly affected by attitude parameters, and parameter deviation has a more significant impact on data reliability. Therefore, the initial weight of the parameter deviation factor should be increased. (3) Complex working conditions such as turning and tilting: The correlation between sensor data is more critical for reliability judgment, and the reference value of the correlation logic fit is higher. Therefore, the initial weight of the correlation logic fit factor should be increased.

[0106] Calculate the weight adjustment coefficient based on real-time test data.

[0107] Specifically, based on real-time test data under the current preset test posture, combined with parameter deviation factors... and logical fit factor Real-time values ​​are used to calculate the weight adjustment coefficient. This coefficient is used to determine whether, in the current test scenario, the focus should be on parameter deviation or correlation fit to evaluate the reliability of sensor data. It serves as the core threshold for dynamic weight adjustment, and the calculation formula is as follows: , in, For weight adaptive adjustment coefficients; This represents the parameter deviation factor at the current moment. For the current moment, the logical fit factor is used; The smoothing bias coefficient has a value range of [0.4, 0.6]. When parameter deviation factor The larger the value, or the more logically consistent the correlation factor. The smaller the value, the higher the weighting adjustment coefficient. The larger the coefficient, the more likely subsequent weight adjustments will strengthen the influence of the parameter deviation factor; conversely, the smaller the adjustment coefficient, the more likely it will strengthen the influence of the correlation logic fit factor, achieving a precise match between weight adjustments and real-time data status.

[0108] If the parameter deviation factor is greater than the weight adjustment coefficient, the percentage of the initial weight of the parameter deviation factor is increased, and the percentage of the initial weight of the correlation logic fit factor is decreased. If the correlation logic fit factor is greater than the weight adjustment coefficient, the percentage of the initial weight of the correlation logic fit factor is increased, and the percentage of the initial weight of the parameter deviation factor is decreased.

[0109] Specifically, preset a fixed adjustment step percentage Based on parameter deviation factor, correlation logical fit factor and weight adjustment coefficient Based on the comparison results, an adaptive adjustment of the weights is performed, increasing the weight of one factor while decreasing the weight of another factor by the same percentage, ensuring that the sum of the two weights remains 1 after the adjustment. The specific adjustment rules are as follows: (1) If the parameter deviation factor is significantly larger, i.e. This indicates that the main anomalies in the current sensor data originate from parameter deviations. Therefore, the weight of the parameter deviation factor needs to be increased to strengthen its influence in the overall judgment, while the weight of the correlation logic fit factor needs to be decreased. The specific correction formula is as follows: , (2) If the correlation logical fit factor is significantly low, i.e. the data fit is poor, the corresponding judgment condition is: This indicates that the main anomalies in the current sensor data originate from correlation failures. Therefore, it is necessary to increase the weight of the correlation logic fit factor to strengthen its influence in comprehensive judgment, while simultaneously reducing the weight of the parameter deviation factor. The specific correction formula is as follows: , (3) If neither of the above two judgment conditions is met, i.e. and This indicates that the parameter deviation and correlation fit of the current sensor data are within the normal range, and no weight adjustment is needed. The initial weights should remain unchanged. , Simultaneously, boundary constraints must be set during the weight adjustment process to ensure that the adjusted weights always remain within the [0,1] interval, avoiding unreasonable situations where the weights are negative or greater than 1. That is, if the adjusted weights are negative... Then force setting , If corrected Then force setting , If the corrected weights are within the range [0,1], then the corrected result remains unchanged, always satisfying the condition. .

[0110] The comprehensive judgment factor is obtained by multiplying the dynamically adjusted weights by the corresponding factors and summing the results.

[0111] The dynamically corrected parameter deviation factor weight , correlation logical fit factor weight , respectively with the corresponding parameter deviation factor Logical fit factor Multiply the two products, then sum the products to obtain the comprehensive judgment factor. The calculation formula is: , in, As a comprehensive judgment factor; The weights of the parameter deviation factor after dynamic correction; The weights of the dynamically adjusted correlation logic fit factors; , All are dimensionless factors calculated using the deviation call strategy.

[0112] When the comprehensive judgment factor of a certain sensor is greater than a preset threshold, the corresponding sensor is abnormal.

[0113] In this embodiment, the algorithm sets specific initial weights based on the characteristics of different preset test postures such as level driving, uphill / downhill driving, and turning, taking into account both parameter deviation and correlation fit to avoid biased judgments caused by a single weight. Equal weighting is used for stable driving conditions, parameter deviation factors are emphasized for pitch conditions, and correlation logic fit factors are emphasized for complex turning conditions, ensuring that the initial weights accurately match the actual test scenarios and providing a reasonable benchmark for subsequent dynamic corrections.

[0114] The weight adjustment coefficient is calculated based on real-time test data. Combined with the real-time values ​​of the parameter deviation factor and the correlation logic fit factor, the weight ratio of these two factors is dynamically adjusted to achieve precise linkage between weights and data status. When parameter deviation is significant, its weight is strengthened; when correlation fit fails, the weight of the correlation logic fit factor is increased. This ensures that the judgment focus is dynamically adjusted according to data changes, avoiding the limitations of fixed weights.

[0115] By weighting and summing dynamic weights and corresponding factors, information from two dimensions—parameter deviation and correlation fit—is accurately integrated to comprehensively reflect the reliability of sensor data. This provides a scientific quantitative basis for anomaly detection, effectively avoids the limitations of single-dimensional judgment, further improves the accuracy and rigor of sensor anomaly detection, and provides support for test results.

[0116] Furthermore, the method also includes: if the comprehensive judgment factor is greater than a preset threshold, then determining whether the comprehensive judgment factor within a consecutive preset number of sampling periods is greater than the preset threshold; if so, confirming that the sensor is abnormal; if only the comprehensive judgment factor of a single sampling period is greater than the preset threshold, then re-collecting data and recalculating the comprehensive judgment factor.

[0117] Specifically, the comprehensive judgment factor calculated in the current sampling period , and the preset anomaly detection threshold By comparing the results, a preliminary assessment can be made to determine if there are any abnormalities in the sensors.

[0118] (1) If This indicates that the unreliability of the sensor's real-time data within the current sampling period has not reached the abnormal standard, and the sensor data for this sampling period is determined to be normal. The real-time data for the next period will continue to be collected, and the comprehensive judgment factor calculation and preliminary judgment process will be repeated. (2) If This indicates that the unreliability of the sensor's real-time data within the current sampling period exceeds the normal range, and an anomaly is initially determined. However, to avoid misjudgment caused by accidental interference such as instantaneous signal fluctuations or electromagnetic interference, the sensor anomaly is not directly confirmed, and the continuous sampling verification stage is entered.

[0119] In this embodiment, the judgment process uses a comprehensive judgment factor as the core indicator and combines it with a preset anomaly threshold to make a preliminary judgment in a single cycle. It clarifies the quantitative standards for normal and abnormal sensor data, breaks through the limitations of traditional anomaly judgment that relies on experience and lacks unified standards, makes anomaly judgment more objective and standardized, and ensures the scientific nature of the preliminary judgment.

[0120] To address the issue of single-cycle comprehensive judgment factors exceeding thresholds, a continuous sampling verification mechanism is introduced, effectively avoiding misjudgments caused by accidental factors such as instantaneous signal fluctuations and electromagnetic interference. By judging the state of the comprehensive judgment factors within a preset number of sampling periods, it distinguishes between accidental anomalies and persistent anomalies, significantly reducing the probability of misjudgment and ensuring the accuracy of anomaly detection.

[0121] Example 2 like Figure 2 As shown, an electric bicycle sensing test system based on control attitude correlation is described in Embodiment 1 above. This system is applicable to the electric bicycle sensing test method based on control attitude correlation described in Embodiment 1 above. The system includes: The sensor installation and acquisition module includes a sensor group to be tested and a data acquisition unit. The sensor group to be tested is installed on the corresponding test parts of the electric bicycle to be tested and is used to collect feedback data of braking pressure, wheel speed, steering angle, acceleration and damping force of the electric bicycle under different test postures. The data acquisition unit is electrically connected to each sensor to be tested and the posture detection unit, and synchronously collects feedback data and posture parameter data from each sensor.

[0122] The data synchronization and processing module is electrically connected to the sensor installation and acquisition module and is used to execute the data synchronization strategy. The data synchronization and processing module includes a timestamp calibration unit, a data alignment unit, and an anomaly verification unit.

[0123] Specifically, the timestamp calibration unit adds a unified timestamp to the collected attitude parameters and sensor feedback data when the attitude adjustment mechanism reaches a preset attitude and stabilizes, ensuring that the time base of all data is consistent. The data alignment unit uses linear interpolation to interpolate and supplement missing sensor feedback data or attitude parameters at the sampling time, ensuring that each timestamp corresponds to a complete set of attitude parameters and sensor feedback data. The anomaly verification unit calculates the time difference between the acquisition of attitude parameters and sensor feedback data at the same timestamp. If the time difference is greater than the time synchronization error threshold, it is determined to be a synchronization anomaly and the set of data is discarded.

[0124] The association logic and data-driven module is electrically connected to the data synchronization and processing module and is used to execute association logic strategies and data-driven strategies. The association logic and data-driven module includes an association logic processing unit and a model building and storage unit.

[0125] Specifically, the associated logic processing unit has a built-in... The criterion processing module, Pearson correlation coefficient analysis module, and mutual information algorithm module first perform outlier removal and normalization on the associated dataset. Then, they combine two algorithms to calculate the correlation degree between sensors and between sensors and attitude parameters. Based on the correlation degree, effective association rules are extracted, and cross-validation is used to verify the accuracy of the rules, forming a qualified association rule base. The model construction and storage unit adopts the support vector machine algorithm, using attitude parameters and sensor feedback data as input features, and association rules and reasonable parameter ranges as output features. The associated dataset is divided into training, validation, and test sets according to a preset ratio to complete model training, optimization, and validation. Qualified sensor trust relationship models are stored in the built-in database, and online model access and incremental updates are supported to adapt to the testing needs of different vehicle models and different sensors.

[0126] The deviation invocation and weighted calculation module is electrically connected to the correlation logic and data-driven module and the sensor installation and acquisition module. It is used to execute the deviation invocation strategy and dynamic weighting algorithm. The deviation invocation and weighted calculation module includes a deviation calculation unit, a fit degree calculation unit and a dynamic weighting unit.

[0127] Specifically, the deviation calculation unit calls preset parameters in the sensor trust relationship model to calculate the absolute deviation, relative deviation, and deviation exceeding the range value of the real-time feedback data of each sensor under test. Combined with the sensor correlation degree obtained by the correlation logic processing unit, dynamic weights are assigned and weighted summation is performed to obtain the parameter deviation factor. The fit calculation unit matches the real-time feedback data with the correlation rule base, calculates the rule matching comprehensiveness, and simultaneously calculates the sensor correlation deviation rate in real time. Combining these two factors, the correlation logic fit factor is obtained. The dynamic weighting unit sets initial weights according to the preset test posture type. Based on the comparison results of the real-time calculated parameter deviation factor, correlation logic fit factor, and weight adjustment coefficient, the weights are dynamically adjusted to ensure that the weight allocation fits the real-time test scenario. After weighted summation, a comprehensive judgment factor is obtained and transmitted to the anomaly judgment module.

[0128] The exception determination module is electrically connected to the deviation call and weighted calculation module and is used to execute the exception determination logic.

[0129] Specifically, the anomaly determination module compares the comprehensive judgment factor with a preset threshold. If the comprehensive judgment factor is greater than the preset threshold, it determines whether the comprehensive judgment factor within a consecutive preset number of sampling periods is greater than the preset threshold. If the condition is met, it confirms that the sensor is abnormal and records the abnormal sensor number, anomaly type, corresponding test posture, and abnormal data. If only a single sampling period exceeds the threshold, a re-acquisition command is triggered to avoid misjudgment.

[0130] The main control and interaction module is electrically connected to the sensor installation and acquisition module, the data synchronization and processing module, and the anomaly detection module, respectively, and is used to realize the collaborative work of each module, command issuance, and data interaction; the main control and interaction module includes a main control unit and a human-machine interaction unit.

[0131] Specifically, the main control unit adopts a controller with built-in execution programs for each strategy, enabling collaborative work, command issuance, and data interaction among modules. It precisely controls the entire process, including posture adjustment, data acquisition, model invocation, and anomaly detection, ensuring automation and standardization of the testing process. The human-machine interaction unit includes a touch screen and operation buttons, enabling the selection of preset test postures, setting of test parameters, real-time monitoring of the test process, viewing of anomaly information, and export of test reports. It also supports manual intervention in the test process, improving the system's practicality and operability.

[0132] In this embodiment, the sensor installation and acquisition module achieves synchronous acquisition of feedback data and attitude parameters. Combined with the data synchronization and processing module's timestamp calibration, linear interpolation completion, and outlier removal, the complete synchronization of the dataset is ensured, laying the foundation for subsequent analysis. The association logic and data-driven module uses a dual-algorithm approach to mine association rules between sensors and attitude parameters, constructing an incrementally updatable sensor trust relationship model. This overcomes the limitations of single-parameter judgment and reduces the probability of false positives and false negatives. The dynamic weighting unit can dynamically adjust weights according to the test posture. The model supports incremental updates, adapting to different vehicle models and sensors. Human-computer interaction design enhances ease of operation and lowers the barrier to entry. The main control unit coordinates the collaborative work of all modules, reducing manual intervention. Standardized processes ensure repeatable test results, significantly improving testing efficiency. The anomaly detection module employs rigorous logic to avoid false positives, synchronously records anomaly information for easy traceability, supports real-time monitoring and report export, adapts to the large-scale testing needs of enterprises, and contributes to the standardized development of the industry. The overall system balances accuracy, efficiency, and practicality, effectively reducing testing costs and ensuring sensor detection quality.

[0133] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A method for sensing test of an electrically powered bicycle based on control attitude association, characterized in that, The method includes: The electric bicycle under test is fixed on the sensing test platform, and the sensor is installed on the electric bicycle under test. The sensing test platform is equipped with a variety of preset test postures, and the actuators of the posture adjustment mechanism of the electric bicycle sensing test platform are adjusted through posture adjustment strategy to make the posture of the electric bicycle under test reach the preset value and remain stable. Under each preset test posture, feedback data from each sensor and parameter data under different postures are collected synchronously, and a sensor posture and parameter association dataset is formed through a data synchronization strategy. Based on the sensor attitude and parameter association dataset, the association relationship of feedback data of each sensor under different preset test attitudes is determined by the association logic strategy, and a sensor trust relationship model is constructed by the data-driven strategy. Real-time feedback data under each preset test posture will be input into the sensor trust relationship model, and parameter deviation factor and correlation logic fit factor will be obtained through deviation call strategy; The parameter deviation factor and the correlation logic fit factor are processed by a dynamic weighting algorithm to obtain a comprehensive judgment factor; When the comprehensive judgment factor of a certain sensor is greater than a preset threshold, the corresponding sensor is abnormal.

2. The control gesture correlation-based electric bicycle sensing test method according to claim 1, wherein, The attitude adjustment strategy includes: The current posture data of the electric bicycle under test is collected in real time by sensors, and the collection frequency is consistent with the collection frequency of sensor feedback data to ensure the time synchronization between posture data and sensor data. The real-time acquired attitude data is compared with the standard parameters of the preset test attitude, and the deviation value of each attitude data is calculated. If the real-time deviation value is greater than the attitude deviation judgment threshold, the adjustment data of the adjustment actuator is determined through offline debugging of the closed-loop adjustment algorithm, so as to adjust the actuator of the attitude adjustment mechanism and gradually reduce the attitude deviation. The system determines whether the deviation values ​​within a preset number of consecutive sampling periods are all within the attitude deviation judgment threshold. If the threshold is met, the attitude is determined to have reached the preset value and remained stable, and the adjustment is stopped. If the threshold is not met, the closed-loop adjustment continues until the attitude is stable, thus avoiding attitude fluctuations from affecting the accuracy of sensor data acquisition.

3. The electric bicycle sensing test method based on control attitude correlation according to claim 2, characterized in that, The data synchronization strategy includes: When the attitude adjustment mechanism reaches the preset attitude and stabilizes, a unified timestamp is added to the attitude parameters collected at this time and the feedback data from each sensor. If sensor feedback data or attitude parameters are missing at a certain sampling time, linear interpolation is used to interpolate the data from two adjacent sampling times to ensure that each timestamp corresponds to a complete set of attitude parameters and sensor feedback data. Calculate the acquisition time difference between the attitude parameters and the sensor feedback data at the same timestamp. If the acquisition time difference is greater than the time synchronization error threshold, it is determined to be a synchronization anomaly, and the data set is removed. After the data has been calibrated with timestamps, aligned with data, and checked for anomalies, it is sorted and organized according to the preset test posture. A correlation structure is established between posture type, posture parameters, sensor feedback data, and timestamps, forming a sensor posture and parameter correlation dataset.

4. The electric bicycle sensing test method based on control attitude correlation according to claim 3, characterized in that, Association logic strategies include: pass The criteria perform outlier removal and normalization on the data in the sensor attitude and parameter association dataset; By combining the Pearson correlation coefficient analysis algorithm and the mutual information algorithm, the feedback data of different sensors under the same preset test posture are processed to obtain the correlation between pairs of sensors and the correlation between sensor feedback data and posture parameters. Based on the correlation degree calculation results, effective association rules are determined; Cross-validation is used to divide the association dataset into a training set and a validation set. Association rules are extracted using the training set and the accuracy of the rules is verified using the validation set. If the accuracy of a rule verification is greater than the confidence threshold, the association rule is retained. If the accuracy is less than the confidence threshold, the association calculation parameters are readjusted and the rules are extracted again until the accuracy requirement is met.

5. The electric bicycle sensing test method based on control attitude correlation according to claim 4, characterized in that, The data-driven strategy includes: The sensor attitude and parameter association dataset is divided into training set, validation set and test set according to a preset ratio; The model is constructed using the support vector machine algorithm, with attitude parameters and sensor feedback data as input features, and association rules extracted by the association logic strategy and reasonable parameter ranges as output features. The trained model is optimized based on the validation set data. The prediction accuracy of the model on the validation set is calculated. If the prediction accuracy is less than the preset accuracy value, the support vector machine algorithm parameters are adjusted, and effective rules in the association rule base are added. The model is then retrained. The optimized model is validated using test set data. If the model's prediction accuracy is greater than the preset accuracy value, the model is deemed to have been successfully built and stored in the database of the test platform.

6. The electric bicycle sensing test method based on control attitude correlation according to claim 5, characterized in that, Deviation invocation strategies include: For the real-time feedback data of a single sensor under a certain preset test posture, the mean and standard deviation of the parameters of the sensor under the corresponding posture are called in the sensor trust relationship model to calculate the absolute deviation, relative deviation and the degree of deviation exceeding the range. The sensor correlation degree obtained from the correlation logic strategy assigns dynamic weights to the absolute deviation, relative deviation, and the degree of deviation exceeding the range. If the sensor correlation degree is greater than the maximum value of the threshold range, the weight of the relative single parameter deviation is increased and the weight of the absolute deviation is decreased; if the correlation degree is less than the minimum value of the threshold range, the weight of the degree of deviation exceeding the range is increased. The parameter deviation factor is obtained by combining the absolute deviation, relative deviation, and the degree of deviation exceeding the range with dynamic weights and summing them.

7. The electric bicycle sensing test method based on control attitude correlation according to claim 6, characterized in that, The biased invocation strategy also includes: The real-time feedback data of each sensor under test in the current preset test posture is matched with the corresponding posture association rules in the association rule base. The rule matching algorithm is used to calculate the matching degree between the real-time data combination and each association rule. The average of the matching degrees of all association rules is taken as the rule matching comprehensive degree. The Pearson correlation coefficient between each sensor under test and the feedback data of related sensors is calculated in real time under the current attitude. The correlation coefficient is compared with the preset correlation coefficient range of the sensor trust relationship model to calculate the correlation deviation rate. Based on the rule matching comprehensiveness and correlation deviation rate, the correlation logical fit factor is calculated.

8. The electric bicycle sensing test method based on control attitude correlation according to claim 7, characterized in that, Dynamic weighting algorithms include: Based on the type of preset test posture, set the initial weights of the parameter deviation factor and the initial weights of the correlation logic fit factor; Calculate the weight adjustment coefficient based on real-time test data; If the parameter deviation factor is greater than the weight adjustment coefficient, the percentage of the initial weight of the parameter deviation factor is increased, and the percentage of the initial weight of the correlation logic fit factor is decreased to the same percentage; if the correlation logic fit factor is greater than the weight adjustment coefficient, the percentage of the initial weight of the correlation logic fit factor is increased, and the percentage of the initial weight of the parameter deviation factor is decreased to the same percentage. The comprehensive judgment factor is obtained by multiplying the dynamically adjusted weights by the corresponding factors and summing the results.

9. The electric bicycle sensing test method based on control attitude correlation according to claim 8, characterized in that, The method further includes: if the comprehensive judgment factor is greater than a preset threshold, then determining whether the comprehensive judgment factor within a consecutive preset number of sampling periods is greater than the preset threshold; if so, then confirming that the sensor is abnormal; if only the comprehensive judgment factor of a single sampling period is greater than the preset threshold, then re-collecting data and recalculating the comprehensive judgment factor.

10. An electric bicycle sensing and testing system based on control attitude correlation, characterized in that, This system is applicable to the electric bicycle sensing test method based on control attitude correlation as described in any one of claims 1-9, and the system comprises: The sensor installation and acquisition module includes a sensor group to be tested and a data acquisition unit. The sensor group to be tested is installed on the corresponding test parts of the electric bicycle to be tested and is used to collect feedback data of braking pressure, wheel speed, steering angle, acceleration and damping force of the electric bicycle under different test postures. The data acquisition unit is electrically connected to each sensor to be tested and the posture detection unit, and synchronously collects feedback data and posture parameter data from each sensor. The data synchronization and processing module is electrically connected to the sensor installation and acquisition module and is used to execute the data synchronization strategy. The data synchronization and processing module includes a timestamp calibration unit, a data alignment unit, and an anomaly verification unit. The association logic and data-driven module is electrically connected to the data synchronization and processing module and is used to execute association logic strategies and data-driven strategies. The association logic and data-driven module includes an association logic processing unit and a model building and storage unit. The deviation invocation and weighted calculation module is electrically connected to the correlation logic and data-driven module and the sensor installation and acquisition module. It is used to execute the deviation invocation strategy and dynamic weighting algorithm. The deviation invocation and weighted calculation module includes a deviation calculation unit, a fit degree calculation unit and a dynamic weighting unit. The anomaly detection module, which is electrically connected to the deviation call and weighted calculation module, is used to execute the anomaly detection logic; The main control and interaction module is electrically connected to the sensor installation and acquisition module, the data synchronization and processing module, and the anomaly detection module, respectively, and is used to realize the collaborative work of each module, command issuance, and data interaction; the main control and interaction module includes a main control unit and a human-machine interaction unit.