Displacement sensor calibration method and device
By programming linear association rules and synchronous data acquisition, displacement sensors are automatically calibrated, solving the problems of time consumption and data misalignment in traditional calibration methods. This enables fast and accurate displacement sensor calibration, meeting the braking intent recognition requirements of the Onebox system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-27
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional displacement sensor calibration methods are cumbersome and time-consuming, which cannot meet the rapid calibration requirements of the Onebox braking system. Furthermore, manual operation can easily lead to data misalignment, affecting the accuracy of braking intent recognition.
The magnetic field angle and duty cycle are recorded using linear correlation rules. Displacement and duty cycle data are collected synchronously by an electric cylinder-driven push rod. A precise correlation system of magnetic field angle, duty cycle and actual displacement is constructed. Data verification and supplementary data collection are carried out during the automated calibration process to ensure the accuracy of the calibration relationship.
Significantly shorten calibration time, improve calibration accuracy, and ensure that the sensor outputs a precise PWM signal, providing reliable braking intention recognition data support for the Onebox system.
Smart Images

Figure CN121761818A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of sensor calibration, and in particular to a calibration method and apparatus for a displacement sensor. Background Technology
[0002] The development of automotive electronic control systems has placed higher demands on the reliability of key chassis components, among which the precise control of the braking system is directly related to driving safety. Onebox, as an integrated braking system, identifies the driver's braking intention by analyzing brake pedal displacement signals. Currently, the industry commonly uses pedal displacement sensors based on dual Hall effect chips, which measure pedal travel by detecting changes in the magnetic field of a permanent magnet.
[0003] In sensor manufacturing, calibration is a crucial step in ensuring measurement accuracy. Traditional calibration methods require operators to manually push the sensor push rod on a calibration bench using a specialized push rod device, sequentially collecting magnetic field strength data at discrete points throughout the entire stroke range. Subsequently, technicians must manually match the magnetic field strength at these discrete points with the corresponding mechanical stroke positions to establish the Hall effect chip output characteristic curve. This discrete-point calibration method not only requires repeated mechanical positioning and signal acquisition but also demands that operators strictly maintain the consistency of the data acquisition sequence. In practice, due to uncontrollable factors in manual operation, mismatches between data points and mechanical positions frequently occur, leading to deviations in the final characteristic curve. These deviations directly affect the sensor's output accuracy in real-vehicle applications, thereby reducing the accuracy of the Onebox system's judgment of braking intentions. Summary of the Invention
[0004] The purpose of this invention is to provide a calibration method and apparatus for displacement sensors to alleviate the technical problem of displacement sensors being unable to be calibrated quickly and accurately.
[0005] In a first aspect, the present invention provides a calibration method for a displacement sensor, comprising: In response to the user's control commands input through the graphical interface, the programmer is triggered to program the linear correlation rules of the magnetic field angle and duty cycle to the displacement sensor to be calibrated. Based on the linear correlation rule and the duty cycle output by the displacement sensor to be calibrated under the condition of generating actual displacement, the correlation between the magnetic field angle and the actual displacement is determined. The displacement sensor to be calibrated is calibrated based on the calibration relationship formed by the duty cycle, the magnetic field angle, and the actual displacement.
[0006] In an optional implementation, the step of triggering the programmer to program the linear correlation rules of the magnetic field angle and duty cycle to the displacement sensor to be calibrated, in response to a control command input by the user to the graphical interface, includes: In response to user interaction with the graphical interface, control commands are input to characterize the linear correlation rules of the magnetic field angle and duty cycle corresponding to each calibration point. Based on the control command, the programmer is triggered to program the linear association rules into the Hall chip of the displacement sensor to be calibrated.
[0007] In an optional implementation, the step of determining the correlation between the magnetic field angle and the actual displacement based on the linear correlation rule and the duty cycle output by the displacement sensor to be calibrated when the actual displacement occurs includes: The push rod connected to the displacement sensor to be calibrated is driven to generate actual displacement according to preset conditions. The duty cycle of the actual displacement is output using the Hall chip of the displacement sensor to be calibrated. Based on the linear correlation rule and the duty cycle, determine the magnetic field angles that are correlated when the actual displacement is generated.
[0008] In an optional implementation, the step of driving the push rod connected to the displacement sensor to be calibrated to generate actual displacement according to preset conditions includes: The electric cylinder pushes the push rod connected to the displacement sensor to be calibrated from the zero position to the maximum stroke position at a preset speed.
[0009] In an optional implementation, the step of calibrating the displacement sensor to be calibrated based on the calibration relationship formed by the duty cycle, the magnetic field angle, and the actual displacement includes: Based on the duty cycle, the correlation between the magnetic field angle and the actual displacement constitutes a calibration relationship; Based on the calibration relationship, the pedal displacement and duty cycle corresponding to the magnetic field angle of each calibration point are determined to obtain the calibration point data set. The difference between the push rod displacement collected by the push rod displacement sensor and the pedal displacement is compared with a preset displacement difference to verify the reliability of the calibration point data set. If the verification is successful, the calibration relationship and the calibration point data set will be burned into the Hall chip of the displacement sensor to be calibrated.
[0010] In an optional implementation, the method further includes: If the calibration point data group corresponding to the calibration relationship fails the verification, the nonlinear interval segment corresponding to the calibration point that failed the verification is traversed. When there is an abnormal trend in the magnetic field angle change of two adjacent actual displacement points, the magnetic field angle of the actual displacement point is collected again.
[0011] In an optional implementation, the step of traversing the nonlinear intervals corresponding to the calibration points that failed verification, and when there is an abnormal trend in the magnetic field angle change between two adjacent actual displacement points, to re-sample the magnetic field angle of the actual displacement points includes: The location of the calibration point data group that failed the verification is defined as a non-linear interval segment; When each pair of adjacent actual displacement points is generated in the nonlinear interval segment, the duty cycle output by the displacement sensor to be calibrated corresponds to the first magnetic field angle and the second magnetic field angle, respectively. Based on the first magnetic field angle and the second magnetic field angle, calculate the change trend of the magnetic field angle in the round-trip direction of each pair of adjacent actual displacement points; If the trend of the change in the magnetic field angle is inconsistent, the trend of the change in the magnetic field angle is identified as abnormal, and the magnetic field angle of the actual displacement point is collected again.
[0012] Secondly, the present invention provides a calibration device for a displacement sensor, comprising: The programming module, in response to the user's control commands input through the graphical interface, triggers the programmer to program the linear correlation rules of the magnetic field angle and duty cycle to the displacement sensor to be calibrated. The determination module determines the correlation between the magnetic field angle and the actual displacement based on the linear correlation rule and the duty cycle output by the displacement sensor to be calibrated when the actual displacement is generated. The calibration module calibrates the displacement sensor to be calibrated based on the calibration relationship formed by the duty cycle, the magnetic field angle, and the actual displacement.
[0013] Thirdly, the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the method as described in any of the foregoing embodiments.
[0014] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed, implements the method described in any of the foregoing embodiments.
[0015] This invention provides a calibration method and apparatus for a displacement sensor. By programming preset linear correlation rules and synchronously driving the acquisition of duty cycle and magnetic field angle under different displacement conditions, a precise correlation system of magnetic field angle, duty cycle, and actual displacement is constructed. This eliminates the cumbersome process of traditional manual point-by-point calibration, significantly shortening the calibration time to meet mass production requirements. Synchronous acquisition and abnormal supplementary acquisition avoid data misalignment, improving calibration accuracy. After the calibration relationship is solidified, the sensor can be directly installed in the vehicle to output a precise PWM signal, providing reliable data support for the Onebox system to accurately identify braking intentions.
[0016] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.
[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating a calibration method for a displacement sensor provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the application of a calibration method for a displacement sensor provided in an embodiment of the present invention. Figure 3 A flowchart illustrating another calibration method for a displacement sensor provided in an embodiment of the present invention; Figure 4 A schematic diagram of the functional modules of a calibration device for a displacement sensor provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware architecture of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Currently, there are two major technical problems in the existing technology: First, the traditional manual calibration process is cumbersome and time-consuming, which cannot meet the rapid calibration requirements of Onebox assembly mass production scenarios; Second, manually taking points one by one can easily lead to data sequence misalignment, reduce calibration accuracy, affect the accuracy of the brake pedal displacement sensor output signal, and thus interfere with the Onebox system's recognition of braking intention.
[0022] Based on this, the calibration method and apparatus for a displacement sensor provided in this embodiment of the invention can ensure that the sensor is compatible with the Onebox system's usage requirements, while ensuring calibration accuracy, by relying on the precise linear correlation between the magnetic field angle, PWM duty cycle and pedal travel displacement.
[0023] To facilitate understanding of this embodiment, a calibration method for a displacement sensor disclosed in this invention will first be described in detail; in practical applications, such as Figure 2 As shown, the Onebox braking system is equipped with a displacement sensor to be calibrated. The calibration and testing bench first programs the linear correlation rules into the Hall chip of the displacement sensor using a programmer, so that the Hall chip can convert the sensed magnetic field angle into a duty cycle PWM signal based on these rules. Then, the programmer is disconnected from the displacement sensor, and a data acquisition board is connected to the out1 and out2 ports of the Hall chip. The industrial control computer drives the electric cylinder to push the push rod at a preset speed. The push rod displacement sensor can detect the real-time actual displacement of the push rod. At the same time, the magnet moves along with the push rod. The Hall chip indirectly obtains the magnetic field angle by sensing the change in the magnet's position. Based on the aforementioned programmed linear correlation rules... Then, the out1 and out2 ports of the Hall chip to be calibrated output the duty cycle corresponding to the magnetic field angle; the acquisition board determines the correlation between the two based on this duty cycle and the actual displacement acquired by the rod displacement sensor; at this time, knowing the correlation between the duty cycle and the magnetic field angle, and the correlation between the duty cycle and the actual displacement, the correlation between the magnetic field angle and the actual displacement is determined, and the magnetic field angle-duty cycle-actual displacement is fed back to the industrial control computer as the calibration relationship. The industrial control computer then completes the sensor calibration based on this parameter. After the sensor is installed in the vehicle, it can directly output accurate brake pedal travel information to the Onebox assembly through the PWM signal to help the Onebox recognize the driver's braking intention.
[0024] Figure 1 This is a flowchart of a calibration method for a displacement sensor provided in an embodiment of the present invention.
[0025] Reference Figure 1 The calibration method for this displacement sensor includes: S102, in response to the user's control command input to the graphical interface, triggers the programmer to program the linear correlation rules of the magnetic field angle and duty cycle to the displacement sensor to be calibrated.
[0026] S104. Based on the linear correlation rule and the duty cycle of the displacement sensor output by the calibration position under the condition of actual displacement, determine the correlation between the magnetic field angle and the actual displacement.
[0027] S106 calibrates the displacement sensor to be calibrated based on the calibration relationship consisting of duty cycle, magnetic field angle, and actual displacement.
[0028] The embodiments of this invention adopt a three-step core process of rule pre-programming → association establishment → calibration solidification. Based on linear association rules, it links hardware acquisition and data conversion to construct a three-dimensional association system of magnetic field angle, duty cycle and actual displacement. It abandons the tedious operation of traditional manual point-by-point calibration, and relies on linear formulas to eliminate the need for frequent point selection. This not only improves calibration efficiency to meet mass production requirements, but also avoids data misalignment through standardized processes and ensures calibration accuracy.
[0029] For example, the first step is to prepare for calibration: select a brake pedal displacement sensor (pedal displacement stroke 42mm) equipped with two Hall effect chips and adapted to the Onebox system. Place the sensor housing into the special fixture of the calibration bench. After the operator manually places the housing into the equipment fixture, the sensor is pre-installed manually. Then, use a torque wrench (torque value preset to 15N·m) to tighten the fixing bolts to ensure that the assembly push rod is accurately at the zero position without offset or jamming.
[0030] Next, the linear correlation rule is programmed: The operator inputs control commands through the computer's graphical interface. The commands contain linear correspondence rules between magnetic field angles of 0°-360° and duty cycles of 0%-100%. After the computer responds to the commands, it triggers the programmer connected to it to synchronously program the linear correlation rule into the two Hall chips of the displacement sensor to be calibrated. After programming is completed, the host computer will prompt that programming is successful and disconnect the programmer from the sensor.
[0031] Next, the correlation is established: the electric cylinder driver program of the calibration bench is started, and the electric cylinder drives the push rod connected to the sensor at a preset speed (50mm / s) to smoothly push from the zero position to the maximum stroke (42mm); during this process, the data acquisition board collects two data in real time – the actual displacement data output by the push rod displacement sensor (accuracy 0.01mm), and the PWM duty cycle data output by the displacement sensor to be calibrated; based on the burned linear correlation rules, each set of collected duty cycles is converted into the corresponding magnetic field angle, and then a one-to-one correspondence between the magnetic field angle and the actual displacement is established.
[0032] Finally, the calibration is solidified: based on the collected duty cycle, the converted magnetic field angle, and the actual displacement data, a complete calibration relationship of duty cycle-magnetic field angle-actual displacement is constructed. This calibration relationship is then written into the sensor's storage module through the host computer software to complete the calibration.
[0033] Based on the foregoing embodiments, step S102 can be implemented in the following ways, including: In response to user interaction with the graphical interface, control commands are input to represent the linear correlation rules of the magnetic field angle and duty cycle corresponding to each calibration point; based on the control commands, the programmer is triggered to program the linear correlation rules into the Hall chip of the displacement sensor to be calibrated.
[0034] Here, the input and programming process of linear association rules is refined, the rule input requirements corresponding to the calibration points are clarified, and the rules are accurately programmed into the Hall chip. For example, the linear calibration design of the magnetic field angle and duty cycle corresponding to the 17 calibration points ensures that the sensor has basic data conversion capabilities; the standardized input and accurate storage of linear association rules are realized, providing a unified benchmark for subsequent data conversion, avoiding calibration errors caused by rule transmission or storage deviations, and ensuring the consistency of the data of the 17 calibration points.
[0035] For example, the host computer configuration is performed first: Open the calibration-specific host computer software and enter the rule configuration interface. This interface has 17 preset calibration point input fields (corresponding to n+1 sampling points after the magnetic field angle is divided into 16 equal parts). Each input field contains two parameter items: magnetic field angle and duty cycle, so as to realize the requirement of dividing the collected magnetic field angle into n equal parts and taking n+1 sampling points.
[0036] Next, input the control commands: According to the preset linear relationship (magnetic field angle 0°-360° corresponds to duty cycle 0%-100%), the operator sequentially inputs the corresponding parameters in the 17 calibration point input fields, namely calibration point 1 (magnetic field angle 0°, duty cycle 0%), calibration point 2 (magnetic field angle 22.5°, duty cycle 6.25%)... calibration point 17 (magnetic field angle 360°, duty cycle 100%). After inputting, click confirm to submit and generate the control commands.
[0037] Finally, the rule programming is performed: the host computer transmits the generated control commands to the programmer, the programmer establishes a communication connection with the Hall chip of the displacement sensor to be calibrated (the communication protocol is SPI), and writes the linear association rules point by point into the built-in EEPROM of the two Hall chips according to the calibration point sequence. During the programming process, the host computer displays the progress in real time (0%-100%). After programming is completed, the consistency between the stored data and the input rules is automatically verified. If the verification is successful, it will indicate that the rule programming is valid.
[0038] In some embodiments, step S104 may also be implemented by the following steps: The push rod connected to the displacement sensor to be calibrated is driven to generate actual displacement according to preset conditions; the duty cycle of the actual displacement is output by the Hall chip of the displacement sensor to be calibrated; and the magnetic field angle with correlation is determined based on the linear correlation rule and the duty cycle.
[0039] Here, driving the push rod connected to the displacement sensor to be calibrated according to preset conditions to produce actual displacement can be understood as controlling the electric cylinder to push the push rod connected to the displacement sensor to be calibrated from the zero position to the maximum stroke position at a preset speed.
[0040] This invention clarifies the driving conditions of actual displacement, the main body for collecting duty cycle, and the conversion logic of magnetic field angle, forming a complete link of displacement generation-data acquisition-angle conversion, realizing the synchronous acquisition of the relationship between displacement value and duty cycle; so as to achieve accurate correlation between actual displacement and magnetic field angle, providing real and effective basic data for the construction of subsequent calibration relationship, and ensuring the reliability of the correlation relationship; and realizes the conversion of magnetic field angle and pedal stroke displacement according to linear rule formula.
[0041] For example, the displacement is first generated by driving: the host computer sends a drive command to the electric cylinder controller, and the electric cylinder starts according to the preset conditions - initial speed 50mm / s, acceleration time 0.2s, uniformly moves to the maximum stroke (42mm) and then uniformly returns to the zero position. The push rod and the sensor are rigidly connected throughout the process, with no relative displacement, so as to achieve the purpose of controlling the electric cylinder to push the push rod from the zero position to the maximum stroke at a certain speed.
[0042] Next, duty cycle data is collected: the two Hall chips of the displacement sensor to be calibrated sense the changes in the magnetic field caused by the movement of the push rod in real time, and synchronously output the corresponding PWM duty cycle signal. The data acquisition board collects the duty cycle signal at a sampling frequency of 1kHz, removes high-frequency noise in the signal (using a low-pass filtering algorithm), and obtains the effective duty cycle data.
[0043] Finally, the magnetic field angle is determined: the collected effective duty cycle data is transmitted to the host computer, which calls the burned linear association rule and calculates the corresponding magnetic field angle point by point using the association formula α=3.6×σ (α is the magnetic field angle and σ is the duty cycle). At the same time, the actual displacement data corresponding to the magnetic field angle is recorded (synchronously collected by the push rod displacement sensor), and a temporary association data table of actual displacement-duty cycle-magnetic field angle is established.
[0044] Based on the aforementioned embodiments, the actuator for displacement drive is clearly defined as an electric cylinder, and the motion trajectory from the preset speed and zero position to the maximum stroke is limited, replacing the traditional manual push. This can meet the needs of rapid calibration for industrial mass production; avoid problems such as uneven displacement speed and stroke deviation caused by manual push, ensure the consistency and accuracy of actual displacement data, provide a stable physical basis for establishing correlation, and improve calibration efficiency.
[0045] For example, first, preset the electric cylinder parameters: configure the motion parameters through the electric cylinder controller, preset the speed to 50mm / s (which can be adjusted by the host computer according to the sensor model, with an adjustment range of 30-80mm / s), the motion mode to unidirectional uniform speed motion, the starting point to the zero position of the push rod (calibrated by the sensor zero position detection switch), and the ending point to the maximum stroke of the push rod (42mm, confirmed by both mechanical limit and displacement sensor), matching the 42mm displacement stroke setting of the pedal in the instruction manual.
[0046] Then, the displacement drive is executed: the host computer sends a start drive command to the electric cylinder controller, the electric cylinder drive motor drives the push rod to move smoothly at the preset speed, and the electric cylinder controller provides real-time feedback on the push rod position information (accuracy 0.05mm) during the movement. The host computer monitors the movement status in real time. If a speed deviation (exceeding ±5% of the preset speed) or position abnormality occurs, a pause command is immediately sent, and the system is restarted after troubleshooting.
[0047] In some embodiments, step S106 may be implemented by the following steps: Based on the duty cycle, the correlation between the magnetic field angle and the actual displacement constitutes the calibration relationship; according to the calibration relationship, the pedal displacement and duty cycle corresponding to the magnetic field angle of each calibration point are determined, and the calibration point data set is obtained; the difference between the push rod displacement and the pedal displacement collected by the push rod displacement sensor is compared with the preset displacement difference to verify the reliability of the calibration point data set; if the verification is successful, the calibration relationship and the calibration point data set are burned into the Hall chip of the displacement sensor to be calibrated.
[0048] This invention embodiment forms a calibration closed loop through four steps: constructing calibration relationships, generating calibration point data sets, reliability verification, and burning and solidifying the data. The verification is based on the displacement of the push rod. This achieves accurate solidification of the calibration relationships, eliminates abnormal data through the verification steps, and ensures that the sensor can output accurate PWM signals after being installed in the vehicle. This provides reliable support for the Onebox system to recognize braking intentions and meets the calibration accuracy requirements of the handover document.
[0049] For example, firstly, the calibration relationship is constructed: the host computer uses a linear fitting algorithm to construct a calibration relationship model of duty cycle-magnetic field angle-actual displacement based on a temporary associated data table, and clarifies the quantitative correspondence between the three. Based on the correlation formula of duty cycle and actual displacement σ=s×2.381 (s is the pedal displacement), and the aforementioned correlation between duty cycle and magnetic field angle, the correlation between magnetic field angle and actual displacement is established.
[0050] Next, a calibration point data set is generated: based on the magnetic field angles of 17 calibration points (0°-360°, interval 22.5°), the pedal displacement and duty cycle corresponding to each calibration point are calculated through the above calibration relationship, forming a calibration point data set (containing 17 sets of magnetic field angle-pedal displacement-duty cycle data). The magnetic field angles of the 17 calibration points are 0°-360°, and deltaα is 22.5°.
[0051] Next, reliability verification is performed: the actual displacement data collected by the push rod displacement sensor is called and the difference between it and the pedal displacement in the calibration point data group is calculated. The preset displacement difference threshold is 0.3mm. The difference of 17 calibration points is compared one by one. If all differences are ≤0.3mm, the calibration point data group is determined to be reliable; if there are differences exceeding the standard, the corresponding calibration point is marked and the abnormal handling process is entered.
[0052] Finally, the programming and solidification process is performed: After verification, the host computer writes the calibration relationship model and calibration point data set into the two Hall chips of the displacement sensor to be calibrated through the programmer. The storage address is 0x00-0x80. After programming, the integrity and accuracy of the stored data are checked again to ensure that no data is lost or tampered with before the calibration is filled in.
[0053] As an optional embodiment, if the calibration point data group corresponding to the calibration relationship fails the verification, the nonlinear interval segment corresponding to the calibration point that failed the verification is traversed. When there is an abnormal trend in the change of the magnetic field angle between two adjacent actual displacement points, the magnetic field angle of the actual displacement point is collected again.
[0054] In cases where verification fails, this invention locates nonlinear intervals and identifies anomalies by analyzing the trend of magnetic field angle changes. It then performs precise supplementary sampling instead of re-sampling the entire path, thus maintaining the core objective of rapid calibration as outlined in the technical disclosure. This avoids the need for full-path recalibration due to local anomalies, significantly saving calibration time. Simultaneously, supplementary sampling corrects abnormal data, ensuring calibration accuracy and further improving mass production compatibility.
[0055] For example, firstly, the nonlinear interval segment is located: the host computer analyzes and verifies the distribution of the calibration points that failed, defines the displacement interval where two or more consecutive calibration points failed as the nonlinear interval segment (such as 0-3mm, 40-42mm), and marks the start and end displacement values of the interval segment in the interface.
[0056] Secondly, analyze the trend of change: extract the magnetic field angle data of all adjacent actual displacement points in the nonlinear interval, calculate the change of magnetic field angle of each pair of adjacent points (the angle of the later point minus the angle of the previous point), and form a trend sequence. If the change of a pair of adjacent points differs from the average change of the interval by more than ±30%, it is determined that there is an abnormal trend of change at the adjacent points.
[0057] Finally, abnormal point re-sampling is performed: the host computer sends a re-sampling command to the electric cylinder controller and data acquisition board, controls the electric cylinder to move precisely to the displacement position corresponding to the abnormal point (positioning accuracy 0.02mm), pauses for 0.1s and then collects the duty cycle data of the displacement point, converts it into magnetic field angle, replaces the original abnormal data, and after the re-sampling is completed, the calibration point data group is regenerated and verified again.
[0058] As an optional embodiment, the step of traversing the nonlinear interval segment corresponding to the calibration point that failed verification in the aforementioned embodiment, and when there is an abnormal trend in the change of the magnetic field angle between two adjacent actual displacement points, to supplement the magnetic field angle of the actual displacement point can be achieved through the following steps, including: The location of the calibration point data group that failed verification is defined as a nonlinear interval segment; the first magnetic field angle and the second magnetic field angle corresponding to the duty cycle output by the displacement sensor to be calibrated are obtained for each pair of adjacent actual displacement points in the nonlinear interval segment; based on the first magnetic field angle and the second magnetic field angle, the magnetic field angle change trend in the round-trip direction of each pair of adjacent actual displacement points is calculated; if the magnetic field angle change trend is inconsistent, the magnetic field angle change trend is identified as abnormal, and the magnetic field angle of the actual displacement point is supplemented.
[0059] This invention refines the definition of nonlinear intervals, obtains magnetic field angles, calculates round-trip trends, and establishes anomaly judgment logic. By comparing round-trip trends, it accurately identifies hidden anomalies. Compared to unidirectional trend analysis, round-trip trend comparison can more accurately identify anomalies caused by mechanical jamming or magnetic field interference, further improving the reliability of supplementary data, ensuring calibration accuracy, and enhancing the robustness of the solution.
[0060] For example, firstly, define the nonlinear interval segment: explicitly define the displacement range of the single or multiple calibration points that failed the verification (centered on the calibration point displacement, extending 0.5mm before and after) as the nonlinear interval segment to ensure coverage of abnormal associated areas.
[0061] Next, the reciprocating magnetic field angles are obtained: the electric cylinder is controlled to move from the starting point to the ending point (forward direction) of the nonlinear interval segment at a preset speed (30mm / s), and the duty cycle of each pair of adjacent actual displacement points is collected and converted into the first magnetic field angle sequence; then the electric cylinder returns from the ending point to the starting point (backward direction), and the duty cycle of the same adjacent actual displacement points is collected and converted into the second magnetic field angle sequence.
[0062] Next, calculate the forward and backward trends: calculate the first magnetic field angle change trend (Δα1=α1back-α1front) for each pair of adjacent points in the forward direction and the corresponding second magnetic field angle change trend (Δα2=α2front-α2back) in the backward direction.
[0063] Finally, anomalies are identified and supplementary data is collected: Compare Δα1 and Δα2 of each pair of adjacent points. If the difference between the two exceeds 0.5° or the direction of change is opposite, the magnetic field angle change trend of the pair of adjacent points is identified as abnormal. Control the electric cylinder to accurately position the displacement position corresponding to the abnormal point, collect duty cycle data 3 times, take the average value to convert it into magnetic field angle, update it to the calibration point data group, and re-verify after completing the supplementary data collection until all calibration points pass the verification.
[0064] Figure 3 A flowchart illustrating another calibration method for a displacement sensor provided in an embodiment of the present invention.
[0065] Reference Figure 3The operator manually places the housing into the equipment fixture, manually pre-installs the sensor, and manually tightens the sensor fixing bolts using a torque wrench; connects the programmer to the computer hardware; configures the host computer parameters, linearly calibrates the magnetic field angles at 17 points according to the duty cycle value of 0%-100%, and programs them into the chip; disconnects the programmer, uses a board to collect the sensor's PWM output duty cycle, controls the electric cylinder to push the push rod from zero position to the maximum stroke at a certain speed, and simultaneously collects the relationship between the displacement value and the duty cycle; converts the relationship between the magnetic field angle and the pedal stroke displacement according to the correlation formula corresponding to the linear rule; the magnetic field angles at the 17 calibration points are 0°-360°, and deltaα is 22.5°. Based on the above relationship, the expected duty cycle corresponding to each calibration point is calculated and entered into the calibration.
[0066] In some embodiments, such as Figure 4 As shown, an embodiment of the present invention provides a calibration device for a displacement sensor, comprising: The programming module, in response to the user's control commands input through the graphical interface, triggers the programmer to program the linear correlation rules of the magnetic field angle and duty cycle to the displacement sensor to be calibrated. The determination module determines the correlation between the magnetic field angle and the actual displacement based on the linear correlation rule and the duty cycle output by the displacement sensor to be calibrated when the actual displacement is generated. The calibration module calibrates the displacement sensor to be calibrated based on the calibration relationship formed by the duty cycle, the magnetic field angle, and the actual displacement.
[0067] The present invention provides an embodiment for implementing an electronic device. In this embodiment, the electronic device may be, but is not limited to, a personal computer (PC), a laptop computer, a monitoring device, a server, or other computer device with analysis and processing capabilities.
[0068] As an exemplary embodiment, see [reference]. Figure 5 The electronic device 110 includes a communication interface 111, a processor 112, a memory 113, and a bus 114. The processor 112, the communication interface 111, and the memory 113 are connected via the bus 114. The memory 113 is used to store a computer program that supports the processor 112 in executing the above-described method. The processor 112 is configured to execute the program stored in the memory 113.
[0069] The machine-readable storage medium mentioned in this article can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0070] Non-volatile media can be non-volatile memory, flash memory, storage drives (such as hard disk drives), any type of storage disk (such as optical discs, DVDs, etc.), or similar non-volatile storage media, or combinations thereof.
[0071] It is understood that the specific operation methods of each functional module in this embodiment can be referred to the detailed description of the corresponding steps in the above method embodiment, and will not be repeated here.
[0072] The computer-readable storage medium provided in the embodiments of the present invention stores a computer program. When the computer program code is executed, it can implement the method described in any of the above embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0074] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms installation, connection, and linking should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0075] In the description of this invention, it should be noted that the terms center, up, down, left, right, vertical, horizontal, inner, and outer, indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms first, second, and third are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0076] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention.
Claims
1. A method of calibrating a displacement sensor, characterized by, The method comprises the following steps: In response to the control instruction input by the user for the graphical interface, the linear association rule of the magnetic field angle and the duty cycle is burned into the displacement sensor to be calibrated by triggering the burner; According to the linear association rule and the duty cycle output by the displacement sensor to be calibrated under the condition of generating actual displacement, the association relationship between the magnetic field angle and the actual displacement is determined; Based on the calibration relationship constituted by the duty cycle, the magnetic field angle and the actual displacement, the displacement sensor to be calibrated is calibrated.
2. The method of claim 1, wherein, The step of triggering the burner to burn the linear association rule of the magnetic field angle and the duty cycle into the displacement sensor to be calibrated in response to the control instruction input by the user for the graphical interface comprises: In response to the user's interaction with the graphical interface, input the control instruction for representing the linear association rule of the magnetic field angle and the duty cycle corresponding to each calibration point; Based on the control instruction, the burner is triggered to burn the linear association rule into the Hall chip of the displacement sensor to be calibrated.
3. The method of claim 1, wherein, The step of determining the association relationship between the magnetic field angle and the actual displacement according to the linear association rule and the duty cycle output by the displacement sensor to be calibrated under the condition of generating actual displacement comprises: Drive the push rod connected with the displacement sensor to be calibrated to generate actual displacement under the preset condition; Output the duty cycle under the condition of generating the actual displacement by the Hall chip of the displacement sensor to be calibrated; Based on the linear association rule and the duty cycle, the magnetic field angle associated with the current generation of the actual displacement condition is determined.
4. The method of claim 3, wherein, The step of driving the push rod connected with the displacement sensor to be calibrated to generate actual displacement under the preset condition comprises: Control the electric cylinder to drive the push rod connected with the displacement sensor to be calibrated from zero position to the maximum stroke at a preset speed.
5. The method of claim 1, wherein, The step of calibrating the displacement sensor to be calibrated based on the calibration relationship constituted by the duty cycle, the magnetic field angle and the actual displacement comprises: The association relationship between the duty cycle, the magnetic field angle and the actual displacement constitutes the calibration relationship; According to the calibration relationship, the magnetic field angle corresponding to the pedal displacement and the duty cycle of each calibration point is determined, and the calibration point data group is obtained; Compare the difference between the push rod displacement collected by the push rod displacement sensor and the pedal displacement with the preset displacement difference to verify the reliability of the calibration point data group; If the verification is passed, the calibration relationship and the calibration point data group are burned into the Hall chip of the displacement sensor to be calibrated.
6. The method according to claim 1 or 5, characterized in that, The method further comprises: If the calibration point data group corresponding to the calibration relationship fails to pass the verification, the non-linear interval segment corresponding to the calibration point which fails to pass the verification is traversed, and when the magnetic field angle change trend of adjacent two actual displacement points is abnormal, the magnetic field angle of the actual displacement point is supplemented.
7. The method of claim 5, wherein, The step of traversing the non-linear interval segment corresponding to the calibration point which fails to pass the verification, and supplementing the magnetic field angle of the actual displacement point when the magnetic field angle change trend of adjacent two actual displacement points is abnormal, comprises: Define the position of the calibration point data group which fails to pass the verification as a non-linear interval segment; Obtaining the first magnetic field angle and the second magnetic field angle corresponding to the duty cycle output by the displacement sensor to be calibrated respectively under the condition that each pair of adjacent actual displacement points in the nonlinear interval segment is generated; Based on the first magnetic field angle and the second magnetic field angle, the magnetic field angle change trend in the back-and-forth direction of each pair of adjacent actual displacement points is calculated respectively; If the magnetic field angle change trends are inconsistent, the magnetic field angle change trends are identified as abnormal, and the magnetic field angle of the actual displacement point is supplemented.
8. A calibration device for a displacement sensor, characterized by Comprise: The burning module, in response to the control instruction input by the user for the graphical interface, triggers the burning of the linear association rule of the magnetic field angle and the duty cycle to the displacement sensor to be calibrated by the burning device; The determination module determines the association relationship between the magnetic field angle and the actual displacement according to the linear association rule and the duty cycle output by the displacement sensor to be calibrated under the condition that the actual displacement is generated; The calibration module calibrates the displacement sensor to be calibrated based on the calibration relationship constituted by the duty cycle, the magnetic field angle and the actual displacement.
9. An electronic device, comprising: The readable storage medium stores a computer program, and the computer program is executed to realize the method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program, and the computer program is executed to realize the method in any one of claims 1-7.