A method for identification and dynamic error correction of an electromagnetic force compensation weighing module
By establishing a second-order dynamic model and a frequency sweep excitation signal for the electromagnetic force compensation weighing module, dynamic parameters are identified in real time, and a dynamic error compensation model is constructed. This solves the problems of long measurement cycles and difficulty in eliminating errors in dynamic measurements using the electromagnetic force compensation weighing module, and achieves high-precision mass measurement at high efficiency and low cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-16
- Publication Date
- 2026-07-24
Smart Images

Figure CN122448339A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision measurement and automatic control technology, and in particular to a method for identifying and dynamically correcting the error of an electromagnetic force-compensated weighing module. Background Technology
[0002] Electromagnetic force compensation weighing modules generate electromagnetic force by adjusting the coil current, balancing it with the weight of the object being measured, thereby achieving mass measurement. During actual measurement, when the object is loaded or unloaded, the weighing system will produce a vibration response, typically exhibiting a dynamic process with overshoot, oscillation, and attenuation characteristics.
[0003] Existing measurement methods typically select steady-state current for mass calculation after the system has fully stabilized. While this approach ensures measurement accuracy, it suffers from long measurement cycles and low efficiency. Furthermore, some methods reduce the impact of vibration through filtering or averaging, but these methods cannot fundamentally eliminate dynamic errors.
[0004] In addition, existing dynamic compensation methods are mostly used for vibration suppression, dynamic tracking or stability improvement in servo control systems. They are usually achieved through velocity feedforward, acceleration feedforward or state feedback. Their main goal is to reduce control error and improve the dynamic response of the system.
[0005] However, the aforementioned methods rarely address dynamic measurement errors in electromagnetic force-compensated weighing modules, and the system's dynamic parameters typically rely on empirical tuning or offline calibration, making it difficult to adapt to varying operating conditions. This limits the effectiveness of dynamic compensation in high-precision mass measurement. Therefore, it is necessary to propose a method capable of identifying the system's dynamic characteristics online and utilizing these characteristics to correct measurement errors. Summary of the Invention
[0006] The purpose of this invention is to provide a method for identifying and dynamically correcting the error of an electromagnetic force compensation weighing module.
[0007] To achieve the above objectives, the present invention is implemented according to the following technical solution: This invention includes the following steps: S1. Establish a dynamic model of the weighing system of the electromagnetic force compensation weighing module, and convert the weighing system into a second-order dynamic system; S2. Apply a sweep frequency excitation signal to the electromagnetic drive system and collect the input signal and output response signal of the weighing system; S3. Calculate the system frequency response characteristics based on the input signal and the output response signal; S4. Identify the dynamic parameters of the weighing system based on the frequency response characteristics, wherein the dynamic parameters include at least the natural frequency and the damping ratio; S5. Construct a dynamic error compensation model based on the dynamic parameters; S6. Real-time acquisition of displacement signals of the weighing system, and calculation of velocity and acceleration signals based on the displacement signals; S7. Calculate the dynamic compensation current based on the velocity signal and acceleration signal; S8. The dynamic compensation current is superimposed on the measured current to obtain the compensation current; S9. Calculate the mass of the object being measured based on the compensation current.
[0008] Further, in step S1, the dynamic model of the weighing system is:
[0009] in For displacement, For velocity quantity, To accelerate measurement, For the damping ratio, The natural angular frequency, The electromagnetic force coefficient, The input current is used to drive the coil.
[0010] Furthermore, in step S2, the frequency sweep excitation signal is a sinusoidal frequency sweep signal whose frequency changes continuously with time, or a segmented frequency sweep signal that changes step by step according to a preset frequency point.
[0011] Furthermore, in step S3, the system frequency response characteristics include amplitude frequency characteristics and phase frequency characteristics.
[0012] Further, in step S4, the natural frequency is determined based on the resonant peak position of the frequency response characteristics, and the damping ratio is determined based on the half-power bandwidth method, phase response method, or curve fitting method.
[0013] Further, in step S5, the method for constructing the dynamic error compensation model includes: Given the equivalent second-order dynamic equation of the weighing system ,in For equivalent quality, The electromagnetic force coefficient, Let be the displacement at time s. Let be the velocity at time s. Let be the acceleration measure at time s. The damping coefficient is... For equivalent stiffness, For the damping ratio, The natural angular frequency, For driving current, It is the acceleration due to gravity. The mass of the object being measured; Define the theoretical initial value compensation coefficient: , ;in This is the theoretical initial value for the speed compensation coefficient. This represents the theoretical initial value of the acceleration compensation coefficient; The Grey Wolf Optimization Algorithm is introduced to fine-tune the replenishment coefficient offline, minimizing the difference between the measured and actual values: the best solution in the current population is designated as the leader, and the second-best and third-best solutions are designated as followers, given the Grey Wolf position vector. By setting the boundary around the initial theoretical value, the search range is narrowed. , Minimizing the quality error after compensation is taken as the objective function. Update the location of the gray wolves. The leader and followers are determined based on fitness values, and the population positions are updated hierarchically. The process is iterated until the termination condition is met, and the optimal compensation coefficient is output. , ;in The distance between the gray wolf and its prey. , A random number between 0 and 1. Let be the prey position vector in the t-th iteration. This represents the current iteration number. The number of sampling points. For standard weight mass, The preset deviation coefficient, For speed compensation coefficient, For acceleration compensation coefficient, For sampling point index, Let j be the time corresponding to the j-th sampling point. Let j be the measured current at the j-th sampling time. Let be the gray wolf's position vector in the (t+1)th iteration. Let be the convergence factor for the t-th iteration. The optimal speed compensation coefficient is... The optimal acceleration compensation coefficient; The optimal compensation coefficient , Substitute the values to construct a dynamic error compensation model. ,in For dynamic compensation of current.
[0014] Furthermore, in step S7, the dynamic compensation current satisfies: ,in For speed compensation coefficient, For acceleration compensation coefficient, For the damping ratio, The natural angular frequency, This is the electromagnetic force coefficient.
[0015] Furthermore, in step S8, the compensation current satisfies: ,in To measure current, To compensate for the current, This is a dynamic compensation current; the dynamic compensation current is only used to correct the measurement results.
[0016] Furthermore, the mass of the object being measured is calculated based on the balance between electromagnetic force and gravity according to the compensation current.
[0017] The beneficial effects of this invention are: This invention provides a method for identifying and dynamically correcting the error of an electromagnetic force-compensated weighing module. Compared with existing technologies, this invention has the following technical advantages: This invention acquires the system's frequency response characteristics through frequency sweep identification and identifies dynamic parameters such as the system's natural frequency and damping ratio online. Compared to traditional empirical settings or offline calibration methods, it can more accurately reflect the current operating status of the equipment and improve the accuracy and adaptability of the compensation model. Based on the identified dynamic parameters, a compensation model is constructed to correct dynamic errors caused by inertial and damping effects during loading or unloading in real time. It can obtain high-precision measurement results even when system vibration has not fully decayed. Mass calculation can be performed without waiting for the weighing system to fully stabilize, significantly shortening the waiting time for a single measurement and improving the continuous weighing efficiency of the weighing module. It is particularly suitable for applications such as rapid detection and batch weighing. It is mainly implemented through software algorithms, requiring only existing displacement sensors and control circuits to collect signals without adding additional mechanical structures or dedicated hardware, resulting in low implementation costs and easy upgrades to existing electromagnetic force compensation electronic balance products. It has good versatility, allowing for re-sweeping identification and updating of compensation parameters according to different ranges and structural forms of electromagnetic force compensation weighing modules. It is applicable to various equipment models and has good promotional value. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the steps of an electromagnetic force compensation weighing module identification and dynamic error correction method according to the present invention. Figure 2 This is a schematic diagram of a dynamic compensation structure in one of the embodiments of this specification. Detailed Implementation
[0019] The present invention will be further described below through specific embodiments. The illustrative embodiments and descriptions herein are used to explain the present invention, but are not intended to limit the present invention.
[0020] The present invention provides a method for identifying and dynamically correcting the error of an electromagnetic force compensation weighing module, comprising the following steps: like Figure 1 As shown, this embodiment includes the following steps: S1. Establish a dynamic model of the weighing system of the electromagnetic force compensation weighing module, and convert the weighing system into a second-order dynamic system; In actual evaluation, the electromagnetic force compensation weighing module is placed under normal operating conditions. After power-on preheating and zero-point calibration, a frequency sweep test is conducted under no-load conditions. The frequency sweep excitation signal is input to the electromagnetic actuator through the drive control module. The frequency sweep range can be set to 0.5Hz to 20Hz, and the frequency step size can be set according to the system resolution requirements. Each frequency point is maintained for a certain duration to ensure that the system response reaches a stable sampling state. The excitation current amplitude should be controlled within a range that does not affect the safe operation of the mechanism and does not produce nonlinear saturation. During the frequency sweep process, the input current signal and the displacement response signal of the weighing mechanism are simultaneously acquired. The displacement signal can be obtained by a photoelectric position sensor, an inductive displacement sensor, or other high-resolution detection devices. The sampling frequency should be several times higher than the system's highest analysis frequency to meet the accuracy requirements of frequency domain analysis. The acquired data, after filtering, denoising, and time synchronization processing, is used for subsequent frequency response calculations. S2. Apply a sweep frequency excitation signal to the electromagnetic drive system and collect the input signal and output response signal of the weighing system; S3. Calculate the system frequency response characteristics based on the input signal and the output response signal; S4. Identify the dynamic parameters of the weighing system based on the frequency response characteristics, wherein the dynamic parameters include at least the natural frequency and the damping ratio; In practical evaluation, based on the amplitude ratio and phase difference between the input and output signals at each frequency point, the system's amplitude-frequency response curve and phase-frequency response curve are established. By analyzing the resonant peak position, bandwidth range, and phase change trend, the system's natural frequency, damping ratio, and dynamic response characteristic parameters can be identified. This identification process can be implemented using curve fitting, least squares estimation, or frequency domain identification algorithms to improve the accuracy and stability of parameter identification. S5. Construct a dynamic error compensation model based on the dynamic parameters; In actual evaluation, dynamic compensation coefficients are calculated based on the identified system parameters and the dynamic model of the weighing system. and A dynamic compensation model was established, which is used to characterize the additional effects of inertial and damping terms on the measured current during the system's motion. S6. Real-time acquisition of displacement signals of the weighing system, and calculation of velocity and acceleration signals based on the displacement signals; S7. Calculate the dynamic compensation current based on the velocity signal and acceleration signal; S8. The dynamic compensation current is superimposed on the measured current to obtain the compensation current; In the actual weighing process, the displacement signal of the weighing mechanism is collected in real time, and the velocity signal and acceleration signal are obtained by numerical differentiation, state observer or filtering estimation method. The velocity signal and acceleration signal are substituted into the dynamic compensation model to calculate the dynamic compensation current, and then superimposed and corrected with the real-time measured current to obtain the compensated measured current value. S9. Calculate the mass of the object being measured based on the compensation current; In practical evaluation, this invention is used for mass measurement when the vibration of the weighing system has not completely decayed, so as to shorten the measurement time and improve the measurement efficiency. The system frequency response is obtained by frequency sweep excitation, and the inherent frequency is further identified. and damping ratio This is used to establish a subsequent dynamic compensation model, thereby improving measurement accuracy and shortening the stabilization waiting time; The frequency sweep excitation signal is ,in Assigning values as incentives, It is a frequency function that varies with time; The system frequency response function is The amplitude is The natural frequency is determined by the peak value of the amplitude-frequency curve. Damping ratio calculated using the half-power bandwidth method ; According to the dynamic equation of the weighing system, the driving current I needs to overcome the system's inertial force, damping force and restoring force simultaneously in order to maintain the dynamic balance of the weighing mechanism. When the system is in ideal static equilibrium, the displacement velocity and acceleration Both are close to zero, at which point the driving current is mainly used to balance the gravitational component corresponding to the mass being measured.
[0021] During the dynamic adjustment process as the system approaches equilibrium after the object being measured is loaded or unloaded, when the weighing mechanism still exhibits slight displacement and velocity... and acceleration At this time, the driving current additionally includes a dynamic component to overcome the inertial and damping terms. This dynamic component causes the measured current to deviate from the true static measurement value, thus forming a dynamic error. The compensation current is preferably calculated and corrected when the system is basically balanced and only minor vibrations exist.
[0022] In this embodiment, in step S1, the dynamic model of the weighing system is:
[0023] in For displacement, For velocity quantity, To accelerate measurement, For the damping ratio, The natural angular frequency, The electromagnetic force coefficient, The input current is used to drive the coil.
[0024] In this embodiment, in step S2, the frequency sweep excitation signal is a sinusoidal frequency sweep signal whose frequency changes continuously with time, or a segmented frequency sweep signal that changes step by step according to a preset frequency point.
[0025] In this embodiment, in step S3, the system frequency response characteristics include amplitude frequency characteristics and phase frequency characteristics.
[0026] In this embodiment, in step S4, the natural frequency is determined based on the resonant peak position of the frequency response characteristics, and the damping ratio is determined based on the half-power bandwidth method, phase response method, or curve fitting method.
[0027] In this embodiment, step S5, the method for constructing the dynamic error compensation model, includes: Given the equivalent second-order dynamic equation of the weighing system ,in For equivalent quality, The electromagnetic force coefficient, Let be the displacement at time s. Let be the velocity at time s. Let be the acceleration measure at time s. The damping coefficient is... For equivalent stiffness, For the damping ratio, The natural angular frequency, For driving current, It is the acceleration due to gravity. The mass of the object being measured; Define the theoretical initial value compensation coefficient: , ;in This is the theoretical initial value for the speed compensation coefficient. This represents the theoretical initial value of the acceleration compensation coefficient; The Grey Wolf Optimization Algorithm is introduced to fine-tune the replenishment coefficient offline, minimizing the difference between the measured and actual values: the optimal solution of the current population is designated as the leader, and the second-best and third-best solutions are designated as followers, given the Grey Wolf position vector. By setting the boundary around the initial theoretical value, the search range is narrowed. , Minimizing the quality error after compensation is taken as the objective function. Update the location of the gray wolves. The leader and followers are determined based on fitness values, and the population positions are updated hierarchically. The process is iterated until the termination condition is met, and the optimal compensation coefficient is output. , ;in The distance between the gray wolf and its prey. , A random number between 0 and 1. Let be the prey position vector in the t-th iteration. This represents the current iteration number. The number of sampling points. For standard weight mass, The preset deviation coefficient, For speed compensation coefficient, For acceleration compensation coefficient, For sampling point index, Let j be the time corresponding to the j-th sampling point. Let j be the measured current at the j-th sampling time. Let be the gray wolf's position vector in the (t+1)th iteration. Let be the convergence factor for the t-th iteration. The optimal speed compensation coefficient is... The optimal acceleration compensation coefficient; The optimal compensation coefficient , Substitute the values to construct a dynamic error compensation model. ,in For dynamic compensation of current.
[0028] In this embodiment, in step S7, the dynamic compensation current satisfies: ,in For speed compensation coefficient, For acceleration compensation coefficient, For the damping ratio, The natural angular frequency, This is the electromagnetic force coefficient.
[0029] In this embodiment, in step S8, the compensation current satisfies: ,in To measure current, To compensate for the current, This is a dynamic compensation current; the dynamic compensation current is only used to correct the measurement results.
[0030] In this embodiment, the mass of the object being measured is calculated based on the balance between electromagnetic force and gravity according to the compensation current. ;in To compensate for the current, It is the electromagnetic force coefficient; In practical evaluation, dynamic compensation is only used to correct measurement results and does not participate in the closed-loop control process. Comparative tests are conducted under conditions of system vibration caused by loading, unloading, or external disturbances. The measurement response process, including stabilization time, output fluctuation amplitude, and measurement error, is recorded for both cases with and without the compensation method of this invention. Test results show that using the method of this invention can significantly reduce the impact of dynamic oscillations on measurement results, shorten the stabilization time, and improve weighing efficiency and measurement accuracy.
[0031] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for identifying and dynamically correcting the error of an electromagnetic force-compensated weighing module, characterized in that, Includes the following steps: S1. Establish a dynamic model of the weighing system of the electromagnetic force compensation weighing module, and convert the weighing system into a second-order dynamic system; S2. Apply a sweep frequency excitation signal to the electromagnetic drive system and collect the input signal and output response signal of the weighing system; S3. Calculate the system frequency response characteristics based on the input signal and the output response signal; S4. Identify the dynamic parameters of the weighing system based on the frequency response characteristics, wherein the dynamic parameters include at least the natural frequency and the damping ratio; S5. Construct a dynamic error compensation model based on the dynamic parameters; S6. Real-time acquisition of displacement signals of the weighing system, and calculation of velocity and acceleration signals based on the displacement signals; S7. Calculate the dynamic compensation current based on the velocity signal and acceleration signal; S8. The dynamic compensation current is superimposed on the measured current to obtain the compensation current; S9. Calculate the mass of the object being measured based on the compensation current.
2. The method for identifying and dynamically correcting the error of an electromagnetic force compensation weighing module according to claim 1, characterized in that, In step S1, the dynamic model of the weighing system is: ; in For displacement, For velocity quantity, To accelerate measurement, For the damping ratio, The natural angular frequency, The electromagnetic force coefficient, The input current is used to drive the coil.
3. The method for identifying and dynamically correcting errors in an electromagnetic force compensation weighing module according to claim 1, characterized in that, In step S2, the frequency sweep excitation signal is a sinusoidal frequency sweep signal whose frequency changes continuously with time, or a segmented frequency sweep signal that changes step by step according to a preset frequency point.
4. The method for identifying and dynamically correcting errors in an electromagnetic force compensation weighing module according to claim 1, characterized in that, In step S3, the system frequency response characteristics include amplitude frequency characteristics and phase frequency characteristics.
5. The method for identifying and dynamically correcting the error of an electromagnetic force compensation weighing module according to claim 1, characterized in that, In step S4, the natural frequency is determined based on the resonant peak position of the frequency response characteristics, and the damping ratio is determined based on the half-power bandwidth method, phase response method, or curve fitting method.
6. The method for identifying and dynamically correcting the error of an electromagnetic force compensation weighing module according to claim 1, characterized in that, Step S5, the method for constructing the dynamic error compensation model, includes: Given the equivalent second-order dynamic equation of the weighing system ,in For equivalent quality, The electromagnetic force coefficient, Let be the displacement at time s. Let be the velocity at time s. Let be the acceleration measure at time s. The damping coefficient is... For equivalent stiffness, For the damping ratio, The natural angular frequency, For driving current, It is the acceleration due to gravity. The mass of the object being measured; Define the theoretical initial value compensation coefficient: , ;in This is the theoretical initial value for the speed compensation coefficient. This represents the theoretical initial value of the acceleration compensation coefficient; The Grey Wolf Optimization Algorithm is introduced to fine-tune the replenishment coefficient offline, minimizing the difference between the measured and actual values: the best solution in the current population is designated as the leader, and the second-best and third-best solutions are designated as followers, given the Grey Wolf position vector. By setting the boundary around the initial theoretical value, the search range is narrowed. , Minimizing the quality error after compensation is taken as the objective function. Update the location of the gray wolves. The leader and followers are determined based on fitness values, and the population positions are updated hierarchically. The process is iterated until the termination condition is met, and the optimal compensation coefficient is output. , ;in The distance between the gray wolf and its prey. , A random number between 0 and 1. Let be the prey position vector in the t-th iteration. This represents the current iteration number. The number of sampling points. For standard weight mass, The preset deviation coefficient, For speed compensation coefficient, For acceleration compensation coefficient, For sampling point index, Let j be the time corresponding to the j-th sampling point. Let J be the measured current at the j-th sampling time. Let be the gray wolf's position vector in the (t+1)th iteration. Let be the convergence factor for the t-th iteration. The optimal speed compensation coefficient is... The optimal acceleration compensation coefficient; The optimal compensation coefficient , Substitute the values to construct a dynamic error compensation model. ,in For dynamic compensation of current.
7. The method for identifying and dynamically correcting the error of an electromagnetic force compensation weighing module according to claim 1, characterized in that, In step S7, the dynamic compensation current satisfies: ,in For speed compensation coefficient, For acceleration compensation coefficient, For the damping ratio, The natural angular frequency, This is the electromagnetic force coefficient.
8. The method for identifying and dynamically correcting the error of an electromagnetic force compensation weighing module according to claim 1, characterized in that, In step S8, the compensation current satisfies: ,in To measure current, To compensate for the current, This is a dynamic compensation current; the dynamic compensation current is only used to correct the measurement results.
9. The method for identifying and dynamically correcting the error of an electromagnetic force compensation weighing module according to claim 1, characterized in that, The mass of the object being measured is calculated based on the balance between electromagnetic force and gravity using the compensation current.