A full-automatic electronic scale high-precision detection system
By combining the automatic height measurement module and the control module, and utilizing infrared ranging and temperature and humidity compensation technology, the problem of inaccurate height measurement in the automatic detection system of electronic scales is solved, realizing high-precision automatic detection and stable operation of electronic scales.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DALIAN JINMA WEIGHING APP CO LTD
- Filing Date
- 2026-06-04
- Publication Date
- 2026-07-03
Smart Images

Figure CN122329468A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automatic weighing technology, specifically to a high-precision detection system for a fully automatic electronic scale. Background Technology
[0002] Electronic scales are precision instruments that use the principle of electromagnetic force balance or strain gauge technology to measure mass. Regular calibration of electronic scales is essential to ensure the accuracy and reliability of weighing results, especially in scenarios requiring high precision. The automatic testing device for electronic scales needs to be able to precisely interact with the scale under test using a robotic arm to perform verification items including zeroing accuracy, off-center loading, weighing, repeatability, discrimination threshold, and weighing after tare.
[0003] The most critical step is to accurately place the standard weights at the designated positions on the weighing pan. However, due to the wide variety of electronic scale models, their sizes, shapes, and especially the height of the weighing pan from the platform vary. If the automated detection system cannot accurately measure this critical height parameter, the robotic arm will place the weights at an error height. Placing them too low will cause collisions, while placing them too high will cause them to fall off, resulting in verification failure or even damage to the equipment. Summary of the Invention
[0004] To address the aforementioned technical problems, the purpose of this application is to provide a high-precision detection system for fully automatic electronic scales, and the specific technical solution adopted is as follows: This application proposes a high-precision detection system for fully automatic electronic scales, the system including an automatic height measurement module and a control module, which is built into an automatic detection device for electronic platform scales; The automatic height measurement module includes an infrared ranging device, a temperature and humidity sensor, a microprocessor unit, and a data transmission unit configured at the end of the robotic arm. It is used to acquire the compensated height value of the electronic scale pan relative to the calibration platform in real time before placing the weights, and transmit this value to the control module. The method for acquiring the compensated height value is as follows: When using an infrared ranging device to measure the height of an electronic scale, all received reflected signals are converted from analog to digital to obtain the original measurement values, and the degree of dispersion is measured to obtain a volatility evaluation index. The difference between the volatility evaluation index and the preset threshold is compared to classify the filtering modes, and the window length of the original measurement value is set according to the different filtering modes to smooth the original measurement value. Substitute all the filtered raw measurement values into the pre-stored calibration curve to obtain several preliminary distance values, and use the average of all preliminary distance values as the raw distance reading of the infrared ranging device. By using the distance errors measured within different temperature and humidity ranges, a temperature and humidity compensation model is constructed to determine the distance after compensation of the original distance reading of the infrared ranging device. The control module is used to issue control commands to the robotic arm based on the compensated height value, control the robotic arm, and place the weight after reaching the target height.
[0005] Preferably, the components of the device include a movable frame, a robotic arm, a weight storage, and a calibration platform.
[0006] Preferably, the method for dividing the filtering modes is as follows: When the volatility evaluation index is less than or equal to the preset threshold, the system enters steady-state mode. Conversely, when the volatility evaluation index exceeds the preset threshold, it enters transient mode; when the volatility evaluation index returns to below the preset threshold, it switches back to steady-state mode.
[0007] Preferably, the method for setting the window length for filtering the original measurement value based on different filtering modes is as follows: Steady-state mode: Compare the difference between the volatility evaluation index and the preset threshold, and set the window length for filtering the original measurement values in segments; Transient mode: By evaluating the rate of change of the signal-to-noise ratio of the reflected signal corresponding to the original measurement value relative to its adjacent previously received reflected signal, the attenuation factor when the original measurement value is exponentially weighted by EWMA is determined to adjust the original measurement value; and by combining the sum of the changes of all original measurement values before and after correction and the volatility evaluation index, the window length of the original measurement value after correction in transient mode is calculated.
[0008] Preferably, the method for setting the window length when filtering the original measurement values in steady-state mode is as follows: Calculate the absolute value of the difference between the baseline value and all original measurements within the buffer zone, and perform clustering segmentation after obtaining all absolute values of the differences; the number of segments is the number of clusters plus 1; Obtain the center of each cluster and sort them in ascending order according to the size of their original measurements. Determine the inflection points of the corresponding positions in ascending order of the sorting results. For the first segment: when the absolute value of the difference between the original measurement value and the reference value is less than or equal to the first inflection point, the window length for filtering the original measurement value is the preset maximum window length. For the last segment: when the absolute value of the difference between the original measurement value and the reference value is greater than or equal to the last inflection point, the window length for filtering the original measurement value is the preset minimum window length. For the i-th segment excluding the first and last segments: when the absolute value of the difference between the original measurement value and the reference value is greater than the (i-1)-th inflection point and less than the i-th inflection point, the window length for filtering the original measurement value is the result of a negative linear mapping of the range of the maximum and minimum values of the preset window length for the absolute value of the difference between the original measurement value and the reference value.
[0009] Preferably, the reference value is the mean of all original measurements within the buffer zone.
[0010] Preferably, the attenuation factor when the original measurement value in the transient mode is subjected to EWMA exponential weighting is obtained by nonlinear mapping of the preset basic quantity when adjusting the attenuation factor by the signal-to-noise ratio change rate.
[0011] Preferably, the window length for filtering the raw measurement values in the transient mode is negatively correlated with the sum of the volatility evaluation index and the change amount.
[0012] Preferably, the sum of the changes is determined by the sum of the absolute values of the differences between all the original measurements before and after the correction.
[0013] Preferably, the temperature and humidity compensation model is obtained by collecting the error between the known altitude and the original distance reading of the infrared ranging device within different temperature and humidity ranges, and then training the model using a neural network.
[0014] This application has at least the following beneficial effects: This application utilizes a fully automatic testing system for electronic scales to automatically test various calibration items for different models. It is convenient to operate and flexible in application. Based on an automatic height measurement module and a control module, this application can meet the automatic height measurement requirements of electronic scales of different specifications. Furthermore, based on the fluctuation and interference levels of the reflected signals received by the infrared ranging device during the electronic scale's testing process, a dual-mode smoothing filter is established to ensure the accuracy of the equivalent received power. A temperature and humidity compensation mechanism is also used to compensate for the original distance reading of the infrared ranging device, resulting in the final electronic scale height measurement result. This avoids collisions or weight loss caused by height measurement errors when the robotic arm places weights due to varying heights of the weighing pan from the platform, thus maintaining the fully automatic testing process of the electronic scale. Attached Figure Description
[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a block flowchart of a fully automatic high-precision electronic scale detection system provided in one embodiment of this application; Figure 2 This is a flowchart illustrating a method for obtaining a compensated height value in an automatic height measurement module provided in one embodiment of this application. Detailed Implementation
[0017] To further illustrate the technical means and effects adopted by this application to achieve the intended purpose of the invention, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a fully automatic electronic scale high-precision detection system proposed in this application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0019] The following is in conjunction with the appendix Figure 1 This application provides a detailed description of the specific solution for a fully automatic high-precision electronic scale detection system.
[0020] As attached Figure 1 As shown, the fully automatic detection system for electronic scales in this application includes an automatic height measurement module and a control module, which are built into the automatic detection device for electronic platform scales.
[0021] 1) Automatic height measurement module The automatic height measurement module includes an infrared ranging device, a temperature and humidity sensor, a microprocessor unit, and a data transmission unit configured at the end of the robotic arm. It is used to obtain the compensated height value of the electronic scale pan relative to the calibration platform in real time before placing the weights.
[0022] The infrared ranging device consists of an infrared emitting tube and a receiving tube. It automatically measures the height of the electronic scale by emitting infrared pulse signals of a specific frequency and receiving reflected signals. The temperature and humidity sensor is used to collect temperature and humidity data in the detection environment and then establish temperature and humidity compensation. The microcontroller unit is used to process the measurement signal to obtain the accurate height value after compensation. The data transmission unit transmits the compensated height value to the control module.
[0023] 2) Control Module The control module is used to issue control commands to the robotic arm based on the compensated height value, and to control the robotic arm to place the weight after reaching the target height.
[0024] The control module consists of a receiving unit, a control unit, and an adjustment unit. The receiving unit receives the height value output by the automatic height measurement module. The control unit generates a control signal based on the received height value using a built-in control algorithm. The adjustment unit adjusts the height of the robot arm when placing weights according to the control signal.
[0025] First, the control unit generates a control signal based on a built-in control algorithm, such as a PID control algorithm. The adjustment unit then adjusts the height of the robotic arm's picking and placing of weights based on the control signal. The control command generation process involves comparing the height value received by the receiving unit with the set value, calculating the error, and using the PID control algorithm to generate a PWM wave as the control signal based on the error. The height adjustment process involves receiving the control signal and driving a servo motor or stepper motor to adjust the height of the robotic arm's joints or end effector through a reducer and transmission mechanism.
[0026] Next, after the robotic arm places the weights on the electronic scale, it performs various tests on the scale, including but not limited to weighing accuracy testing; repeatability testing; off-center load error testing; and software function verification. The specific testing process is as follows: Weighing accuracy testing: The robotic arm repeatedly grasps and places standard weights for multi-point testing, covering the typical range from the minimum weighing value to the maximum weighing capacity. By comparing the actual displayed value with the mass of the standard weights, it is determined whether the indication error meets the requirements of JJG539-2016 "Verification Procedure for Digital Indicating Scales"; Repeatability test: Under the same environmental conditions, weigh the same weight at least 5 times consecutively, and record the maximum and minimum difference between the indicated values. If the difference between the indicated values is within the repeatability error range allowed by the standard, the stability of the electronic scale is qualified; otherwise, it is unqualified. Off-center loading error detection: A robotic arm is used to place standard weights at the four corners and the center of the weighing pan to verify the consistency of weighing in different areas; Software function verification: For electronic scales with intelligent functions such as data storage and unit switching, the robotic arm places the weights on the electronic scale and then tests the menu operation response speed, power failure data retention capability, and communication interface transmission accuracy in turn to ensure that the human-machine interaction meets the design requirements.
[0027] 3) Automatic detection device for electronic platform scales The main components of the automatic testing device for electronic platform scales include a movable frame, a robotic arm, a weight storage, and a calibration platform.
[0028] The entire frame is designed as a movable, box-like structure, integrating the robotic arm, testing platform, and weight storage unit inside. Equipped with casters at the bottom, it is easily transportable. The robotic arm has a maximum load capacity of 6kg, enabling it to smoothly and accurately load weights onto the electronic scale platform. The weights in the weight storage unit range in weight from 100mg to 5kg and are arranged in a stackable configuration to meet the testing requirements of various weighing points.
[0029] In this application, a flowchart of the method for obtaining the compensated height value for the automatic height measurement module is attached. Figure 2 As shown, specifically: S1, when the infrared ranging device is used to measure the height of the electronic scale, all the received reflected signals are converted from analog to digital to obtain the original measurement value.
[0030] An infrared ranging device mounted on a robotic arm consists of an infrared transmitter and receiver. It automatically measures the height of electronic scales by emitting infrared pulse signals of a specific frequency and receiving the reflected signals to meet the calibration requirements of scales of different specifications. However, during infrared height measurement, because the surface of the electronic scale is usually a mirror or a high-gloss metal surface, the infrared pulse signal generates second-order reflected harmonics during reflection, resulting in a large amount of nonlinear noise received by the sensor receiver. Simultaneously, the high reflectivity of the metal surface may cause the reflected signal intensity to exceed the linear range of the sensor, causing signal saturation and severely affecting the ranging accuracy. Furthermore, changes in temperature and humidity in the detection environment can also affect the transmission and reception of infrared pulse signals. Therefore, this application uses an optimized moving average filtering method (MAF) to correct and compensate for the original measurement value calculated from the received reflected signal, obtaining a more accurate height measurement result to ensure that the automatic height measurement requirements of the electronic scale are met during automatic detection.
[0031] The core idea of optimizing moving average filtering is to de-fix the filter parameters and dynamically adjust them according to the real-time characteristics of the signal. A large window can effectively smooth high-frequency random noise and improve the stability of the reading, but it will lead to a slow system response, large time delay, and inability to quickly track the real changes in height. A small window responds quickly, but has poor noise suppression capabilities and poor accuracy of the output results, which cannot meet the requirements of precise weight placement by the robotic arm when testing electronic scales of different specifications.
[0032] First, the microcontroller amplifies and filters the analog signal output from the receiving tube, then converts it into a digital value using an analog-to-digital converter (ADC) within the MCU. This digital value serves as the raw measurement, characterizing the received signal power. Specifically, the infrared transmitter is controlled to emit an infrared pulse signal with a fixed drive current. The receiving tube has a built-in demodulation circuit that outputs an analog signal corresponding to the reflected signal intensity. This analog signal is amplified by an operational amplifier (LM358 in this embodiment) and then converted into a digital signal by an analog-to-digital converter (ADC0809 in this embodiment). The equivalent received power of the received signal is then obtained, which is the raw measurement value.
[0033] In the formula, This indicates that the ADC samples the received signal to obtain the peak voltage. This represents the encoded value output by the ADC; This represents the ADC reference voltage; n is the number of bits in the ADC. This information can be obtained from the product data of the infrared ranging device, based on historical experience. The value is 3.3 volts, and n is 12.
[0034] Indicates the equivalent received power of the received signal; This represents the feedback resistor of the amplifier; This indicates the gain factor of the amplifier.
[0035] Furthermore, this application performs digital filtering on the original measured values to suppress random noise. This is achieved by optimizing the moving average filtering method, and the specific process includes steps S2-S4: S2, the volatility evaluation index is obtained by measuring the dispersion of all original measurements.
[0036] To ensure the stability of height measurement on electronic scales, the MCU typically sets up a buffer and a loop counter for each measurement, enabling multiple transmissions and receptions within a short period: the MCU triggers the drive circuit to transmit an infrared pulse signal; it receives the reflected signal, the ADC converts and calculates the original measurement value, and stores it in the buffer; the counter increments by 1, and the transmission and reception are repeated until the preset number of samplings is reached. The preset number of samplings varies slightly depending on the model of the infrared sensor, but is generally 20-50 times; after sampling, the data in the buffer is filtered.
[0037] For any given electronic scale height measurement, the original measured value of the reflected signal is calculated for each measurement. The dispersion of all the original measured values is measured, and the measurement result is used as a volatility evaluation index. The higher the dispersion, the larger the volatility evaluation index, and the more severe the interference to the reflected signal during the height measurement. The smaller the dispersion, the smaller the volatility evaluation index, and the less severe the interference to the reflected signal.
[0038] In this application, one way to measure the degree of dispersion is through statistical indicators such as variance, coefficient of variation, and range; another way is to write an anomaly detection algorithm, such as outlier detection (LOF) or stable random forest (RRCF), into the microcontroller unit, and calculate the anomaly score of all the original measurements through the anomaly detection algorithm. The larger the mean of the anomaly score, the higher the degree of dispersion.
[0039] S3 compares the difference between the volatility evaluation index and the preset threshold to classify the filtering mode.
[0040] When the volatility evaluation index is less than or equal to a preset threshold, the received reflected signal is considered relatively stable and almost unaffected by interference, and the system enters steady-state mode, where a larger window for labeled moving average filtering can be used. Conversely, when the volatility evaluation index is greater than the preset threshold, the received reflected signal is considered to have undergone drastic changes, and the system switches to transient mode for small window filtering. Once the signal stabilizes again, i.e., the volatility evaluation index returns to below the preset threshold, the system switches back to steady-state mode.
[0041] The threshold is obtained by taking measurements of each model of electronic scale under different environments using the same infrared ranging device within its permissible operating environmental parameters, statistically analyzing the variance of all raw measurements, or by analyzing the anomaly detection algorithm used for the corresponding volatility evaluation index to obtain the mean of the anomaly scores of all raw measurements as the threshold, and using the mean of all raw measurements as the benchmark value. It should be noted that the method of obtaining the threshold must be consistent with the method of measuring the dispersion of the volatility evaluation index described above.
[0042] S4 sets the window length for filtering the original measurement value based on different filtering modes, so as to perform smooth filtering on the original measurement value.
[0043] Steady-state mode: The received reflected signal is relatively stable in steady-state mode, and the interference encountered by the electronic scale during height measurement is small. This application compares the difference between the volatility evaluation index and the preset threshold, sets the window length for filtering the original measurement value in segments, realizes fine-grained filtering in a single mode, and ensures that even when the reflected signal is relatively stable, more accurate dynamic adjustment can be achieved.
[0044] Specifically, this application calculates the absolute value of the difference between the baseline value and all original measurements within the buffer. After obtaining all absolute values of the difference, clustering is performed. Clustering methods include, but are not limited to, K-means, AP, and DBSCAN. The center points of all obtained clusters are arranged in ascending order (assuming there are m clusters), resulting in m inflection points. From this, a piecewise function of m+1 segments is constructed. Taking m=2 as an example, the first and second elements in the sorting result are used as the first inflection point r1 and the second inflection point r2, respectively. That is, the inflection points are determined according to the sorting result from smallest to largest. It should be noted that the inflection points are used to construct the piecewise function. The purpose of the piecewise function is to achieve different degrees of window division based on the difference magnitude, that is, to achieve more refined filtering.
[0045] For the first segment: when the absolute value of the difference between the original measurement value and the reference value is less than or equal to the first inflection point, the window length for filtering the original measurement value is the preset maximum window length. For the last segment: when the absolute value of the difference between the original measurement value and the reference value is greater than or equal to the last inflection point, the window length for filtering the original measurement value is the preset minimum window length. For the i-th segment excluding the first and last segments: when the absolute value of the difference between the original measurement value and the reference value is greater than the (i-1)-th inflection point and less than the i-th inflection point, the window length for filtering the original measurement value is the result of a negative linear mapping of the range of the maximum and minimum values of the preset window length for the absolute value of the difference between the original measurement value and the reference value.
[0046] Specifically, in this embodiment, taking m=2 as an example, the window length for filtering the k-th original measurement value is... The calculation method is as follows: In the formula, This represents the absolute value of the difference between the k-th original measurement and the reference value. , These represent the preset maximum and minimum window lengths, respectively. This represents the maximum change in window length (i.e., the maximum value). -Minimum value ), round represents the floor function, where, The value range is usually set to [10, 20]. The value range is usually set to [3,7]. In this embodiment, , The values are set to 15 and 7 respectively. In other embodiments, the values of the maximum and minimum can be adjusted appropriately.
[0047] Transient mode: In transient mode, the received reflected signal changes drastically. Not only is a small filtering window required, but the impact of the drastic change on the reflected signal at different times also needs to be considered. Accordingly, this application determines the attenuation factor when EWMA is exponentially weighted by evaluating the signal-to-noise ratio of the reflected signal corresponding to the original measurement value, so as to dynamically correct the original measurement value and achieve a low-latency and accurate response.
[0048] The more severe the interference, the worse the accuracy of the calculated original measurement value, the greater the degree of reliance on historical data to correct the original measurement value, and the smaller the attenuation factor should be; the milder the interference, the higher the accuracy of the calculated original measurement value, the less reliance on historical data should be, and the larger the attenuation factor should be.
[0049] Specifically, during each infrared pulse signal transmission interval, ambient noise signals are collected, and the noise voltage at each sampling point is obtained using multi-point sampling. The effective value of the noise voltage is calculated based on the noise voltages at all sampling points. Then, the signal-to-noise ratio (SNR) of the reflected signal corresponding to the original measurement value is calculated by combining this SNR with the original measurement value and the amplifier's feedback resistor. Taking the reflected signal corresponding to the k-th original measurement value as an example: In the formula, This represents the effective value of the noise voltage corresponding to the emitted infrared pulse signal when the k-th original measurement value is obtained. L is the preset number of sampling points, which can be set by the implementer according to the actual situation. Let be the noise voltage at the i-th sampling point. Let L be the average noise voltage of the L sampling points; This represents the signal-to-noise ratio of the reflected signal corresponding to the k-th original measurement value. R represents the peak voltage obtained by the ADC from sampling the reflected signal corresponding to the k-th original measurement value; R represents the feedback resistance of the amplifier.
[0050] In addition, to prevent the calculation from being invalid due to the signal-to-noise ratio of the previously received reflected signal in the denominator being zero, the denominator... A preset minimum positive constant needs to be superimposed. This embodiment is for The value is 0.001.
[0051] Furthermore, the signal-to-noise ratio (SNR) of all received reflected signals is obtained respectively, and the attenuation factor when performing EWMA exponential weighting on the original measured value is adjusted based on the rate of change of the SNR of each received reflected signal compared to the previous received reflected signal. The rate of change is the ratio of the difference between the SNR of each received reflected signal and the SNR of the previous received reflected signal to the SNR of the previous received reflected signal.
[0052] Furthermore, based on the attenuation factor applied during EWMA exponential weighting of the original measurements, the adjustment process for the k-th original measurement is as follows: In the formula, , These represent the k-th and (k-1)-th corrected original measurements, respectively. This represents the raw measurement value of the k-th received reflected signal output by the ADC in the MCU.
[0053] It should be noted that for k=1, that is, the original measurement value of the first reflected signal received in the buffer is not corrected.
[0054] Preferably, in this application, the attenuation factor when the original measured value is exponentially weighted by EWMA is obtained by nonlinearly mapping a preset basic quantity used to adjust the attenuation factor based on the signal-to-noise ratio change rate. Optionally, the nonlinear mapping can be achieved through exponential mapping, function mapping, or other methods, which are not limited or elaborated here.
[0055] Specifically, in this embodiment, the attenuation factor when the k-th original measurement is subjected to EWMA exponential weighting The calculation formula is: In the formula, This represents the attenuation factor when the k-th raw measurement is weighted by the EWMA exponent. The initial value for the attenuation factor is [0.05, 0.25], and in this embodiment it is set to 0.15. This represents the preset basic value when adjusting the attenuation factor, taking into account the actual scenario where the electronic scale is subjected to multiple influencing factors during automatic detection. The value is set to [0.05, 0.15], and in this embodiment, it is 0.1. Represents the hyperbolic tangent function. This represents the rate of change of the signal-to-noise ratio of the reflected signal corresponding to the k-th original measurement value relative to its adjacent previously received reflected signal; This represents the preset scaling factor, used to control whether the linear segment in the tanh function curve can cover the main range of the rate of change of the reflected signal-to-noise ratio, so that the dynamically adjusted attenuation factor is closer to the degree of interference of the reflected signal in the short time during the height measurement process; in this embodiment, the scaling factor is set to 2, because the tanh function is approximately linearly distributed in the range [0,2], and the normalized range is (0,1); norm represents the normalization function, and this embodiment uses Min-Max normalization.
[0056] Furthermore, after obtaining all the corrected original measurements, the sum of the changes in all the original measurements before and after the correction is calculated. The larger the sum of the changes, the greater the interference in the data within the entire buffer zone, and the smaller the filtering window should be.
[0057] One way to calculate the sum of changes is to calculate the sum of the absolute values of the differences between the original measurements before and after the correction; another way is to calculate the ratio of the absolute value of the difference between the original measurements before and after the correction to the value before the correction, and to use the sum of all such ratios as the sum of changes.
[0058] Furthermore, this application calculates the window length for filtering the original measurement value in transient mode based on the volatility evaluation index and the sum of the changes, which is used to cope with the selection of the filter window size when the received reflected signal changes drastically, so as to achieve an accurate response with low latency.
[0059] Preferably, the window length for filtering the raw measurements in the transient mode is negatively correlated with the sum of the volatility evaluation index and the change. It is understood that a negative correlation means that the dependent variable decreases as the independent variable increases, and vice versa, and this is determined by the actual application; this application does not impose any special restrictions.
[0060] Specifically, in this embodiment, the window length for filtering the original measurement value corrected in transient mode is... The calculation formula is: In the formula, This indicates the function to maximize the value, preventing the window from being too small and losing its filtering effect. `round` indicates the function to round down. `N` represents the initial window length for filtering the original measurement values in transient mode; in this embodiment, an empirical value of 10 is used. This represents an exponential function with base to the natural constant, and the function value is constrained to the range (0,1). This represents the sum of changes. The larger the sum of changes, the greater the interference in the data throughout the buffer, and the smaller the filter window should be. This represents the difference between the volatility assessment index and a preset threshold. The larger the difference, the more severe the disturbance; the smaller the index value, the smaller the window. This is a preset scaling factor used to smooth the rate of exponential decay.
[0061] Finally, for each raw measurement value within the buffer, the raw measurement value is smoothed and filtered based on the window length calculated for the corresponding different modes to obtain the filtered raw measurement value for each received signal.
[0062] S5, substitute all the filtered raw measurement values into the pre-stored calibration curve to obtain several preliminary distance values, and use the average of all preliminary distance values as the raw distance reading of the infrared ranging device.
[0063] Furthermore, based on all the filtered raw measurement values collected within the buffer zone, and according to the characteristics of the infrared ranging device, all the filtered raw measurement values are substituted into the pre-stored calibration curve to obtain several preliminary distance values, and the average of all preliminary distance values is used as the raw distance reading of the infrared ranging device.
[0064] The pre-stored calibration curve has the original measurement value on the horizontal axis and the distance on the vertical axis. It is obtained by fitting the original measurement value and distance at different heights in an interference-free experimental environment for the electronic scale model under test.
[0065] S6, by using the distance error measured within different temperature and humidity ranges, constructs a temperature and humidity compensation model to determine the distance after compensation of the original distance reading of the infrared ranging device.
[0066] First, in a controlled testing environment, an electronic scale of known height d is placed stationary. Based on the operating environment requirements of the electronic scale, a preset temperature and humidity range is established; here, temperature T is set to 10℃-40℃, and humidity H is set to 20%-80%. By continuously adjusting the temperature and humidity, the initial distance reading d0 of the infrared ranging device is recorded at different temperature and humidity levels (T, H). The difference between d0 and the known height d is then calculated. As a measurement error, several sets of test data are obtained. ; Secondly, a compensation function is fitted using mathematical fitting, or a high-precision compensation model U is trained using a machine learning model, so that... Data fitting and training machine learning models are common techniques in the field of data processing, and the specific process will not be elaborated here.
[0067] The mathematical fitting methods include, but are not limited to, multiple linear regression and multinomial fitting; the machine learning models include, but are not limited to, random forest, XGBoost, and neural network models, and this application does not impose any special restrictions on them.
[0068] Subsequently, during the automatic height measurement of the electronic scale, based on the actual temperature data... Humidity data Substituting these values into the compensation function (model) U, we obtain the compensation amounts for temperature and humidity. .
[0069] Subsequently, the compensation amount based on the reflection intensity Temperature and humidity compensation The final compensated distance value is obtained, which is the automatic height measurement result D of the electronic scale. .in, This indicates the initial distance reading of the infrared ranging device when the electronic scale under test is automatically measured.
[0070] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0071] It should be noted that, unless otherwise specified and limited, terms such as “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a circuit structure, article, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such article or device. Without further limitations, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the article or device that includes said element. Furthermore, the term “and / or” as used herein includes any and all combinations of one or more of the associated listed items.
[0072] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not invented in this application.
[0073] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A fully automatic high-precision detection system for electronic scales, characterized in that, The system includes an automatic height measurement module and a control module, which are built into the automatic detection device of the electronic platform scale; The automatic height measurement module includes an infrared ranging device, a temperature and humidity sensor, a microprocessor unit, and a data transmission unit configured at the end of the robotic arm. It is used to acquire the compensated height value of the electronic scale pan relative to the calibration platform in real time before placing the weights, and transmit this value to the control module. The method for acquiring the compensated height value is as follows: When using an infrared ranging device to measure the height of an electronic scale, all received reflected signals are converted from analog to digital to obtain the original measurement values, and the degree of dispersion is measured to obtain a volatility evaluation index. The difference between the volatility evaluation index and the preset threshold is compared to classify the filtering modes, and the window length of the original measurement value is set according to the different filtering modes to smooth the original measurement value. Substitute all the filtered raw measurement values into the pre-stored calibration curve to obtain several preliminary distance values, and use the average of all preliminary distance values as the raw distance reading of the infrared ranging device. By using the distance errors measured within different temperature and humidity ranges, a temperature and humidity compensation model is constructed to determine the distance after compensation of the original distance reading of the infrared ranging device. The control module is used to issue control commands to the robotic arm based on the compensated height value, control the robotic arm, and place the weight after reaching the target height.
2. The fully automatic high-precision detection system for electronic scales as described in claim 1, characterized in that, The device consists of a movable frame, a robotic arm, a weight storage, and a calibration platform.
3. The fully automatic high-precision detection system for electronic scales as described in claim 1, characterized in that, The method for dividing the filtering modes is as follows: When the volatility evaluation index is less than or equal to the preset threshold, the system enters steady-state mode. Conversely, when the volatility evaluation index exceeds the preset threshold, it enters transient mode; when the volatility evaluation index returns to below the preset threshold, it switches back to steady-state mode.
4. The fully automatic high-precision detection system for electronic scales as described in claim 3, characterized in that, The method for setting the window length for filtering the original measurement value based on different filtering modes is as follows: Steady-state mode: Compare the difference between the volatility evaluation index and the preset threshold, and set the window length for filtering the original measurement values in segments; Transient mode: By evaluating the rate of change of the signal-to-noise ratio of the reflected signal corresponding to the original measurement value relative to its adjacent previously received reflected signal, the attenuation factor when the original measurement value is exponentially weighted by EWMA is determined, so as to adjust the original measurement value; By combining the sum of changes in all original measurements before and after correction with volatility evaluation indicators, the window length for filtering the corrected original measurements in transient mode is calculated.
5. The fully automatic high-precision detection system for electronic scales as described in claim 4, characterized in that, The method for setting the window length when filtering raw measurement values in steady-state mode is as follows: Calculate the absolute value of the difference between the baseline value and all original measurements within the buffer zone, and perform clustering segmentation after obtaining all absolute values of the differences; the number of segments is the number of clusters plus 1; Obtain the center of each cluster and sort them in ascending order according to the size of their original measurements. Determine the inflection points of the corresponding positions in ascending order of the sorting results. For the first segment: when the absolute value of the difference between the original measurement value and the reference value is less than or equal to the first inflection point, the window length for filtering the original measurement value is the preset maximum window length. For the last segment: when the absolute value of the difference between the original measurement value and the reference value is greater than or equal to the last inflection point, the window length for filtering the original measurement value is the preset minimum window length. For the i-th segment excluding the first and last segments: when the absolute value of the difference between the original measurement value and the reference value is greater than the (i-1)-th inflection point and less than the i-th inflection point, the window length for filtering the original measurement value is the result of a negative linear mapping of the range of the maximum and minimum values of the preset window length for the absolute value of the difference between the original measurement value and the reference value.
6. The fully automatic high-precision detection system for electronic scales as described in claim 5, characterized in that, The baseline value is the mean of all original measurements within the buffer zone.
7. The fully automatic high-precision detection system for electronic scales as described in claim 4, characterized in that, The attenuation factor when the original measurement value in the transient mode is weighted by EWMA exponential weighting is obtained by nonlinear mapping of the preset basic quantity when adjusting the attenuation factor by the signal-to-noise ratio change rate.
8. The fully automatic high-precision detection system for electronic scales as described in claim 4, characterized in that, The window length for filtering the raw measurements in the transient mode is negatively correlated with the volatility evaluation index and the sum of the changes.
9. The fully automatic high-precision detection system for electronic scales as described in claim 8, characterized in that, The sum of the changes is determined by the sum of the absolute values of the differences between all the original measurements before and after the correction.
10. The fully automatic high-precision detection system for electronic scales as described in claim 1, characterized in that, The temperature and humidity compensation model obtains the compensation model by collecting the error between the known altitude and the original distance reading of the infrared ranging device within different temperature and humidity ranges, and then training it with a neural network.