Electronic analytical balance and method for mass detection using an electronic analytical balance
Patent Information
- Application Number
- CN202310972752.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-03
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-08-03
AI Technical Summary
[0007]本公开提供了一种电子分析天平以及利用电子分析天平进行质量检测的方法,以至少解决现有技术中存在的电子分析天平的数据处理响应速度慢,容易被其他干扰带偏从而精度不够的技术问题
[0011]然后在对待测对象的质量进行测量时,利用该卡尔曼滤波器对电子分析天平生成的脉宽值进行修正。从而通过这种方式,可以利用卡尔曼滤波器有效提高电子分析天平的测量精度。由于卡尔曼滤波器的状态空间方程是根据利用自回归模型构建的,并且自回归模型的系数又是根据反映电子分析天平的系统误差的误差值序列确定的。因此,通过这种方式构建的卡尔曼滤波器能够有效地排除电子分析天平的系统误差的困扰。并且利用卡尔曼滤波器只需要记录上一次修正的修正值进行迭代即可得到本次的修正值,因此能够提高电子分析天平的响应速度。从而解决了现有技术中存在的电子分析天平的数据处理响应速度慢,容易被其他干扰带偏从而精度不够的技术问题。
Smart Images

Figure CN117053904B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quality or weight detection technology, and in particular to an electronic analytical balance and a method for quality detection using an electronic analytical balance. Background Technology
[0002] An electronic analytical balance is a high-precision mass measurement instrument used in scientific research, industry, and defense. It measures the mass of an object by utilizing the principle of balancing electromagnetic torque and gravitational torque. Current sensors generally employ an integrated molding process with hinge mechanisms, meeting engineering requirements at the million-scale level. However, they suffer from slow response speed and insufficient accuracy in signal processing.
[0003] Data processing in electronic analytical balances commonly employs the sliding window averaging filtering method, which is very simple and effective. To improve the signal-to-noise ratio, the filtering window is typically set quite long. However, an excessively long filtering window results in a very slow system response time. If other interferences are present, they can skew the average filtering result, causing a "trend term" component to appear in the signal base. Due to a lack of sufficient prior information, the intensity and timing of interference are random, making these trend term components difficult to filter out.
[0004] Common signal filtering methods do not fully utilize the architecture and intrinsic characteristics of the measurement system. If the system's transfer function can be obtained, the numerical processing of the measurement results is relatively simple. Whether it's the sensor itself, the balance detection component, or the circuit processing section, establishing an accurate mathematical model is inherently difficult. Even if a precise system equation is established, deviations in stray distributed parameters such as resistance and capacitance, as well as the rated parameters, are difficult to control.
[0005] Classical transfer function identification methods include frequency domain methods and time domain methods. Modern identification methods include hierarchical identification, coupled identification, auxiliary model identification, and multi-innovation identification. Because electronic analytical balances have mandatory protection for the beam output amplitude, the response data is difficult to measure. Furthermore, the accuracy of the measurement data itself is limited. Therefore, the parameters derived using these identification methods to describe the system equations are very inaccurate, far less precise than the data obtained through sliding window averaging filtering.
[0006] There is currently no effective solution to the technical problems of slow data processing response speed and susceptibility to interference that affect the accuracy of electronic analytical balances in the existing technology. Summary of the Invention
[0007] This disclosure provides an electronic analytical balance and a method for quality inspection using the electronic analytical balance, so as to at least solve the technical problems of slow data processing response speed and easy deviation by other interference in the prior art, resulting in insufficient accuracy of electronic analytical balances.
[0008] According to one aspect of this application, a method for quality inspection using an electronic analytical balance is provided, comprising: acquiring a first pulse width value sequence Z generated by the electronic analytical balance and related to the quality of an object under test; correcting the pulse width measurement values of the first pulse width value sequence Z using a pre-set Kalman filter to obtain a corrected estimate value corresponding to the pulse width measurement value; and determining the quality of the object under test based on the corrected estimate value. The Kalman filter is constructed by: determining an error value sequence S reflecting the systematic error of the electronic analytical balance; determining the autoregressive coefficients corresponding to the error value sequence S, and constructing a first autoregressive model based on the autoregressive coefficients, the first autoregressive model being used to estimate the pulse width value generated by the electronic analytical balance corresponding to the quality of the object under test; and constructing a state-space equation based on the first autoregressive model, and constructing the Kalman filter based on the state-space equation.
[0009] According to another aspect of this application, an electronic analytical balance is provided, comprising: a balance mechanism, a pulse width modulation (PWM) signal circuit, an electromagnetic coil drive circuit, and a metering circuit; wherein the metering circuit includes a counter and a microprocessor, wherein the counter counts according to the PWM signal to determine a count value corresponding to the pulse width of the PWM signal, and the microprocessor determines the mass of the load on the weighing pan based on the count value. The microprocessor is configured to: acquire a first pulse width value sequence Z generated by the electronic analytical balance related to the mass of the object under test; correct the pulse width measurement values of the first pulse width value sequence Z using a pre-set Kalman filter to obtain a corrected estimate value corresponding to the pulse width measurement value; and determine the mass of the object under test based on the corrected estimate value, wherein the Kalman filter is constructed in the following manner. Determine the error value sequence S reflecting the systematic error of the electronic analytical balance; determine the autoregressive coefficients corresponding to the error value sequence S, and construct a first autoregressive model based on the autoregressive coefficients. The first autoregressive model is used to estimate the pulse width value generated by the electronic analytical balance corresponding to the mass of the object under test; construct a state-space equation based on the first autoregressive model, and construct a Kalman filter based on the state-space equation.
[0010] According to the technical solution of this embodiment, firstly, the autoregressive coefficients are determined based on the error value sequence reflecting the systematic error of the electronic analytical balance. Then, an autoregressive model is constructed based on the autoregressive coefficients to estimate the pulse width value corresponding to the mass of the object to be measured generated by the electronic analytical balance. Then, the state-space equation is constructed using the autoregressive model, and a Kalman filter is constructed based on the state-space equation.
[0011] Then, when measuring the mass of the object under test, the pulse width value generated by the electronic analytical balance is corrected using this Kalman filter. In this way, the measurement accuracy of the electronic analytical balance can be effectively improved using the Kalman filter. Since the state-space equation of the Kalman filter is constructed using an autoregressive model, and the coefficients of the autoregressive model are determined based on the error value sequence reflecting the systematic error of the electronic analytical balance, the Kalman filter constructed in this way can effectively eliminate the influence of systematic errors in the electronic analytical balance. Furthermore, using the Kalman filter only requires recording the correction value of the previous correction and iterating to obtain the current correction value, thus improving the response speed of the electronic analytical balance. This solves the technical problems of slow data processing response speed and susceptibility to interference, resulting in insufficient accuracy, in existing electronic analytical balances.
[0012] Furthermore, the experiment estimated the equation parameters and noise intensity using offline data, verifying the stationarity of the measurement data with a significance level as low as 0.001. The parameter estimation plus Kalman filtering hybrid method was compared with the commonly used sliding window filtering method; the new method showed significantly improved smoothness and stability, with a measurement standard deviation of 30% of the original method, linearity reaching 6.7 × 10^(-5), and a response time as low as 10% lower than the original method. Analysis of the output data can identify non-stationary noise interference during the measurement process, such as airflow and vibration.
[0013] The above and other objects, advantages and features of this application will become more apparent to those skilled in the art from the following detailed description of specific embodiments of this application in conjunction with the accompanying drawings. Attached Figure Description
[0014] The following sections will describe some specific embodiments of this application in detail by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or components. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:
[0015] Figure 1 This is a schematic perspective view of an electronic analytical balance according to an embodiment of this application;
[0016] Figure 2 and Figure 3 A flowchart illustrating a method for quality inspection using an electronic analytical balance according to an embodiment of this application is shown.
[0017] Figure 4A This diagram illustrates a segmented accumulation operation on a pulse width value sequence according to an embodiment of this application.
[0018] Figure 4BThis diagram illustrates the operation of moving average filtering on a segmented cumulative value sequence.
[0019] Figure 4C This diagram illustrates the process of processing the pulse width mean sequence to generate an error value sequence.
[0020] Figure 5A This diagram illustrates the distribution of pulse width values corresponding to the pulse width value sequence Y.
[0021] Figure 5B This diagram illustrates the distribution of the filtered mean corresponding to the pulse width mean sequence R.
[0022] Figure 5C A schematic diagram is shown showing the residual sequence calculated using the pulse width mean sequence of a 20g weight and the estimated value sequence estimated by the first autoregressive model.
[0023] Figure 6A A schematic diagram is shown showing how to obtain the corresponding segmented accumulated value sequence ZP by segmenting and accumulating the pulse width value sequence Z related to the test object;
[0024] Figure 6B A schematic diagram is shown of applying moving mean filtering to the segmented cumulative value sequence ZP associated with the object under test;
[0025] Figure 6C A schematic diagram is shown illustrating the calculation of the corresponding sample mean for each sample data segment of the pulse width mean sequence ZR;
[0026] Figure 7A The graph shows the correction value obtained by Kalman filtering in the case of 0g (i.e., disk 911 is empty), as well as a comparison graph of sliding window filtering and Kalman filtering.
[0027] Figure 7B The graph shows the correction value obtained by Kalman filtering when weighing a 10g sample, as well as a comparison graph of sliding window filtering and Kalman filtering.
[0028] Figure 7C The graphs showing the correction values obtained by Kalman filtering when weighing a 20g sample, and the comparison graphs of sliding window filtering and Kalman filtering are presented; and
[0029] Figure 7D The graph shows the correction values obtained by Kalman filtering when weighing a 30g sample, as well as a comparison graph of sliding window filtering and Kalman filtering. Detailed Implementation
[0030] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0031] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0034] Figure 1 This is a schematic perspective view of an electronic analytical balance according to an embodiment of this application. (Reference) Figure 1 As shown, the electronic analytical balance includes a balance mechanism 910, a pulse width modulation signal circuit 920, an electromagnetic coil drive circuit 930, and a metering circuit 940.
[0035] The balance mechanism 910 includes a weighing pan 911, an electromagnetic balance sensor 912 connected to the weighing pan 911, a light-emitting diode 914, photosensitive diodes 915a and 915b, and a photoelectric conversion circuit 917. The crossbeam 913 of the electromagnetic balance sensor 912 is connected to a light-shielding plate 918, which is positioned between the light-emitting diode 914 and the photosensitive diodes 915a and 915b to block the light emitted by the light-emitting diode 914. Furthermore, the photosensitive diodes 915a and 915b, together with the photoelectric conversion circuit 917, constitute a photoelectric detection circuit.
[0036] The pulse width modulation (PWM) signal circuit 920 includes a PID controller 921, a sawtooth wave generator 922, and a comparator 923, all connected to the photoelectric conversion circuit 917. The outputs of the PID controller 921 and the sawtooth wave generator 922 are respectively connected to the input of the comparator 923. Thus, the comparator 923 outputs a PWM signal related to the output voltage of the PID controller 921.
[0037] The electromagnetic coil drive circuit 930 includes a transistor 931 and a constant current source 932. The base of transistor 931 is connected to the output of comparator 923, receiving a pulse-width modulation (PWM) signal output by comparator 923. The emitter of transistor 931 is connected to one end of the coil 916 of the electromagnetic balance sensor 912, and the collector of transistor 931 and the constant current source 932 are connected to the other end of coil 916. Therefore, by controlling the switching on and off of transistor 931 using the PWM signal, the current supplied by the constant current source 932 to coil 916 can be controlled.
[0038] The metering circuit 940 includes a counter 941 and a microprocessor 942 connected to the counter 941. The counter 941 counts according to the width of the pulse-width modulation signal, and the microprocessor 942 calculates the mass of the load on the weighing pan 911 based on the count value of the counter 941.
[0039] Specifically, when a load is placed on the weighing pan 911, the light-shielding plate 918 moves upward. This causes phototubes 915a and 915b to receive light from the light-emitting diode 914 and generate a changing current signal. This signal is converted into a differential signal by the photoelectric conversion circuit 917 and then input to the PID controller 921. The PID controller 921 performs PID adjustment on the differential signal output from the photoelectric conversion circuit 917 and outputs a corresponding voltage signal. This voltage signal is compared with a sawtooth wave signal generated by the sawtooth wave generator 922, and a comparator 923 generates a corresponding pulse width modulation (PWM) signal. The PWM signal controls the switching on and off of the transistor 931. When the transistor 931 is off, the constant current source 932 outputs current to the coil 916; when the transistor 931 is on, the constant current source 932 stops outputting current to the coil 916. Thus, the average current output to the coil 916 is controlled by the PWM signal.
[0040] The energized coil 916 generates a downward electromagnetic force under the influence of the air gap magnetic field of the permanent magnet, causing the light-shielding plate 918 to move downwards. Simultaneously, the integral element of the PID controller 921 causes the output voltage to continuously increase, resulting in a wider pulse width modulation signal driving a larger current output to the coil 916, thus continuously driving the light-shielding plate 918 downwards. When the light-shielding plate 918 completely blocks the light-emitting diode 914 and photosensitive diodes 915a and 915b, the differential signal generated by the photoelectric conversion circuit 917 becomes zero. Therefore, the output voltage of the PID controller 921 no longer changes, and the pulse width modulation signal also no longer changes. Consequently, the current output to the coil 916 no longer changes, and the balance mechanism 910 reaches equilibrium.
[0041] Counter 941 counts according to the pulse width modulation signal to determine the count value corresponding to the pulse width of the pulse width modulation signal, and microprocessor 942 determines the mass of the load on weighing pan 911 according to the count value.
[0042] Based on the aforementioned electronic analytical balance, a method for quality inspection using an electronic analytical balance is proposed. This method can be implemented, for example, by a microprocessor 942. Figure 2 A flowchart of the method is shown. (Reference) Figure 2 As shown, the method includes:
[0043] S202: Obtain the k-th pulse width measurement value z of the pulse width value sequence Z related to the mass of the test object generated by the electronic analytical balance. k ;
[0044] S204: Using a pre-set Kalman filter, the k-th pulse width measurement value z... k After correction, the value of the kth pulse width measurement z is obtained. k The corresponding corrected estimate x k ;as well as
[0045] S206 Based on the corrected estimate x k Determine the quality of the object to be tested.
[0046] Among them, reference Figure 3 As shown, the Kalman filter is constructed in the following way:
[0047] S302: Determine the error value sequence S reflecting the systematic error of the electronic analytical balance;
[0048] S304: Determine the autoregressive coefficients corresponding to the error value sequence S, and construct a first autoregressive model based on the autoregressive coefficients. The first autoregressive model is used to predict the pulse width value generated by the electronic analytical balance corresponding to the mass of the object to be measured; and
[0049] S306: Construct the state-space equation based on the first autoregressive model, and construct the Kalman filter based on the state-space equation.
[0050] Specifically, according to this embodiment, several samples with standard mass are first selected, such as weights with masses of 10g, 20g, and 30g.
[0051] Then, a sample is selected, for example, a 10g weight is placed on the weighing pan 911 of the electronic analytical balance, so that the electronic analytical balance generates (e.g., a counter or CPLD 941) a pulse width value sequence Y = {y1, y2, y3, ...} corresponding to the mass of the weight, and the error value sequence S = {s1, s2, s3, ...} reflecting the systematic error of the electronic analytical balance is determined based on the pulse width value sequence Y (S302).
[0052] Then, determine the autoregressive coefficients d1 to d2 corresponding to the error value sequence S. p , so that:
[0053] s t =d1s t-1 +d2s t-2 +...+d p s t-p (1)
[0054] Where p is the order of the autoregressive model.
[0055] Then, from the p autoregressive coefficients d1 to d2 p According to predetermined rules, select g autoregressive coefficients d1 to d2. g Then, using the g autoregressive coefficients d1~d g An autoregressive model (i.e., the first autoregressive model) is constructed to estimate the pulse width value generated by the electronic analytical balance corresponding to the mass of the object to be measured (S304).
[0056] Specifically, this autoregressive model can be used to estimate the pulse width values in the pulse width value sequence corresponding to the quality of the object under test, such that:
[0057] h t =d1h t-1 +d2h t-2 +...+d g h t-g (2)
[0058] The sequence H = {h1,h2,h3,....} is a sequence of pulse width estimates generated by the autoregressive model to estimate the pulse width value corresponding to the quality of the object under test.
[0059] Then, a state-space equation is constructed based on the autoregressive model, and a Kalman filter (S306) is constructed based on the state-space equation. The specific form of the Kalman filter will be explained in detail later.
[0060] After constructing the Kalman filter, when the object to be weighed needs to be weighed, it is placed on the weighing pan 911 of the electronic analytical balance. The microprocessor 942 then acquires the k-th pulse width measurement z from the pulse width value sequence Z (Z = {z1, z2, z3, ...}) generated by the electronic analytical balance, which is related to the mass of the object to be weighed. k (S202)
[0061] Then, the microprocessor 942 applies the z-filter constructed above. k Make corrections to obtain the result with z k The corresponding corrected estimate x k (S204)
[0062] Then the microprocessor 942 adjusts the value x based on the corrected estimate. k The mass value w corresponding to the mass of the object to be measured is calculated. k (S206)
[0063] As described in the background section, the data processing of electronic analytical balances commonly employs the sliding window averaging filtering method. This method is very simple and effective, and to improve the signal-to-noise ratio, the filtering window is generally set to be quite long. An excessively long filtering window results in a very slow system response time. If other interferences are present, they will skew the average filtering result, causing a "trend term" component to appear in the signal base. Due to a lack of sufficient prior information, the intensity and timing of the interference are random, making these trend term components difficult to filter out.
[0064] Common signal filtering methods do not fully utilize the architecture and intrinsic characteristics of the measurement system. If the system's transfer function can be obtained, the numerical processing of the measurement results is relatively simple. Whether it's the sensor itself, the balance detection component, or the circuit processing section, establishing an accurate mathematical model is inherently difficult. Even if a precise system equation is established, deviations in stray distributed parameters such as resistance and capacitance, as well as the rated parameters, are difficult to control.
[0065] Classical transfer function identification methods include frequency domain methods and time domain methods. Modern identification methods include hierarchical identification, coupled identification, auxiliary model identification, and multi-innovation identification. Because electronic analytical balances have mandatory protection for the beam output amplitude, the response data is difficult to measure. Furthermore, the accuracy of the measurement data itself is limited. Therefore, the parameters derived using these identification methods to describe the system equations are very inaccurate, far less precise than the data obtained through sliding window averaging filtering.
[0066] In view of this, according to the technical solution of this embodiment, firstly, the autoregressive coefficients are determined based on the error value sequence reflecting the systematic error of the electronic analytical balance. Then, an autoregressive model is constructed based on the autoregressive coefficients to estimate the pulse width value corresponding to the mass of the object to be measured generated by the electronic analytical balance. Then, the state space equation is constructed using the autoregressive model, and a Kalman filter is constructed based on the state space equation.
[0067] Then, when measuring the mass of the object under test, the pulse width value generated by the electronic analytical balance is corrected using this Kalman filter. In this way, the measurement accuracy of the electronic analytical balance can be effectively improved using the Kalman filter. Since the state-space equation of the Kalman filter is constructed using an autoregressive model, and the coefficients of the autoregressive model are determined based on the error value sequence reflecting the systematic error of the electronic analytical balance, the Kalman filter constructed in this way can effectively eliminate the influence of systematic errors in the electronic analytical balance. Furthermore, using the Kalman filter only requires recording the correction value of the previous correction and iterating to obtain the current correction value, thus improving the response speed of the electronic analytical balance. This solves the technical problems of slow data processing response speed and susceptibility to interference, resulting in insufficient accuracy, in existing electronic analytical balances.
[0068] Optionally, the operation of determining the error value sequence S reflecting the systematic error of the electronic analytical balance includes: acquiring a pulse width value sequence Y corresponding to a reference mass generated by the electronic analytical balance in response to a sample with a reference mass, wherein each pulse width value in the pulse width value sequence Y corresponds to a reference mass; performing a segmented accumulation operation on the pulse width value sequence Y to obtain a corresponding segmented accumulation value sequence P; performing a moving average filter on the segmented accumulation value sequence P to determine the pulse width mean value sequence R corresponding to the segmented accumulation value sequence P; and determining the error value sequence S based on the pulse width mean value sequence R.
[0069] Specifically, Figures 4A to 4C A schematic diagram illustrating the processing of a pulse width value sequence according to this embodiment is shown. (Reference) Figure 4A As shown, according to this embodiment, for example, a 10g weight can be placed on the weighing pan 911 of the electronic analytical balance, thereby obtaining a pulse width value sequence Y = {y1, y2, ...} corresponding to the weight's mass. Figure 5A This diagram illustrates the distribution of pulse width values corresponding to the pulse width value sequence Y. The horizontal axis represents sample points, and the vertical axis represents the pulse width value count corresponding to each sample point.
[0070] Then, refer to Figure 4A As shown, the pulse width sequence Y is segmented and accumulated to obtain the corresponding segmented accumulated value sequence P = {p1, p2, p3, ...}.
[0071] See details Figure 4A As shown, the pulse width value sequence Y is divided into multiple data segments YP1, YP2, YP3, ... containing the same number of pulse width value samples. Then, the pulse width value samples in each data segment are summed to obtain the segment cumulative values p1, p2, p3, ... in the segment cumulative value sequence P.
[0072] in, Figure 5A A schematic diagram of the distribution of the segmented cumulative value sequence P is shown.
[0073] Then, refer to Figure 4B As shown, a moving average filter is applied to the segmented accumulated value sequence P to obtain the pulse width mean sequence R = {r1, r2, ...} corresponding to the segmented accumulated value sequence P. Specifically, the filtered mean r can be calculated using the following formula. i :
[0074]
[0075] Where m is the width of the mean filter sliding window.
[0076] in Figure 5B A schematic diagram of the distribution of the filtered mean corresponding to the pulse width mean sequence R is shown.
[0077] Thus, by means filtering, the resulting pulse width mean sequence R eliminates the random errors in the pulse width value sequence Y, retaining only the systematic errors associated with the electronic analytical balance.
[0078] Then, refer to Figure 4C As shown, an error value sequence S is generated based on the pulse width mean sequence R. Since the pulse width mean sequence R has already eliminated random errors, the error value sequence S generated from it can better eliminate the interference of random errors, thus more accurately reflecting the systematic error of the electronic analytical balance.
[0079] Optionally, the operation of determining the error value sequence S based on the pulse width mean sequence R includes: dividing every n filtered mean samples of the pulse width mean sequence R into a sample data segment, thereby forming multiple sample data segments N. j , where j is a natural number; for each sample data segment N j The average value is calculated from the first L filtered mean samples to determine the relationship with each sample data segment N. j The corresponding sample mean u j ; and calculate the difference between the filtered mean point in the pulse width mean sequence R and the sample mean of the corresponding sample data segment, thereby determining the error value sequence S.
[0080] Specifically, refer to Figure 4C As shown, after obtaining the pulse width mean sequence R = {r1, r2, ...}, every n filtered mean samples can be divided into a sample data segment. This results in multiple sample data segments N. j j = 1, 2, 3, ...
[0081] Then, refer to Figure 4C As shown, for the first L filtered mean samples of each data segment, the microprocessor 942 calculates the average value, thereby calculating the sample mean u corresponding to different data segments. j .
[0082] Then, refer to Figure 4C As shown, filtering can be applied to each mean sample r in the pulse width mean sequence R. i Subtract the sample mean u of the corresponding sample data segment j Thus, the error value sequence S is obtained.
[0083] Therefore, in this embodiment, each error value sample of the error value sequence S calculated in the above manner can reflect the systematic error of the electronic analytical balance.
[0084] Optionally, the operation of determining the autoregressive coefficients corresponding to the error value sequence S and constructing a first autoregressive model based on the autoregressive coefficients includes: constructing a second autoregressive model of order p based on the error value sequence S, wherein the second autoregressive model is used to predict the error value samples of the error value sequence S; determining the ratio of other order autoregressive coefficients to the first order autoregressive coefficient using the first order autoregressive coefficient of the second autoregressive model as a benchmark; and, if the number of other order autoregressive coefficients with a ratio less than a predetermined threshold is less than a predetermined threshold, using the autoregressive coefficients of the second autoregressive model as the autoregressive coefficients of the first autoregressive model, thereby constructing the first autoregressive model.
[0085] Specifically, after constructing the error value sequence S = {s1, s2, ...}, multiple autoregressive models of different orders (i.e., second autoregressive models) can be constructed based on the S sequence. The autoregressive model (of order p) is expressed as follows:
[0086] s t =d1s t-1 +d2s t-2 +...+d p s t-p (4)
[0087] Among them, d1~d p represents the autoregressive coefficients of this autoregressive model.
[0088] For example, in this embodiment, different autoregressive models (i.e., the second autoregressive model) are constructed with orders of 2, 3, 4, 5, and 6 respectively (i.e., p equals 2, 3, 4, 5, and 6 respectively):
[0089] s t =d1s t-1 +d2s t-2 ;
[0090] s t =d1s t-1 +d2s t-2 +d3s t-3 ;
[0091] s t =d1s t-1 +d2s t-2 +...+d4s t-4 ; ...
[0093] s t =d1s t-1 +d2s t-2 +...+d6s t-6 .
[0094] For example, the table below lists autoregressive models of different orders, with autoregressive coefficients d1 to d2. p The value:
[0095] Table 1
[0096]
[0097] For each autoregressive model, calculate the autoregressive coefficients d2 to d3. p The ratio between d1 and d2 is then used to start with the highest-order autoregressive model, for example, starting with an autoregressive model of order 6 (p=6), if we start from the second-order autoregressive coefficients to the p-th-order autoregressive coefficients d2~d1. p If the number of autoregressive coefficients whose ratio to the first-order autoregressive coefficient d1 is less than a first threshold (e.g., 1%) is greater than a second predetermined threshold (e.g., more than two), then the autoregressive model of that order is abandoned.
[0098] Then, for lower-order autoregressive models, the order is successively reduced and the above judgment is continued until the autoregressive coefficient with a ratio of less than 1% is less than two items (the order of which is denoted as g).
[0099] For example, in this embodiment, since there are more than two autoregressive coefficients in the 6th order autoregressive model whose ratio to the 1st order autoregressive coefficient (0.99961) is less than 1% (the ratios of coefficients 2 to 6 to coefficient 1 are all less than 1%), this model is abandoned, and the 5th order model is evaluated.
[0100] Since there are more than two autoregressive coefficients in the 5th order autoregressive model whose ratio to the 1st order autoregressive coefficient (0.99961) is less than 1% (the ratios of coefficients 2 to 5 to coefficient 1 are all less than 1%), this model is abandoned, and the 4th order model is evaluated.
[0101] Since there are more than two autoregressive coefficients in the 4th order autoregressive model whose ratio to the 1st order autoregressive coefficient (0.99962) is less than 1% (the ratios of coefficients 2 to 4 to coefficient 1 are all less than 1%), this model is abandoned, and the 3rd order model is evaluated.
[0102] Since there are more than two autoregressive coefficients in the order 3 model whose ratio to the first-order autoregressive coefficient (0.99962) is less than 1% (the ratios of coefficients 2-3 to coefficient 1 are all less than 1%), this model is abandoned, and the order 2 model is evaluated.
[0103] Since there is only one autoregressive coefficient in the autoregressive model of order 2 whose ratio to the first-order autoregressive coefficient (0.99962) is less than 1% (the ratio of coefficient 2 to coefficient 1 is less than 1%, but there are no other coefficients of higher order), the autoregressive coefficients of the autoregressive model of order 2 are selected.
[0104] Thus, the autoregressive coefficients d1 to d2 of the autoregressive model of order g are obtained through the above methods. g Then, based on the autoregressive coefficients d1 to d... g Determine the autoregressive coefficients of the first autoregressive model described above.
[0105] Specifically, in this embodiment, d is adjusted. g The size of d1+d2+…+d g =1. Therefore, the adjusted d1~d g As the autoregressive coefficients of the first autoregressive model. Specifically, in this embodiment, since d1 = 0.99962 and d2 = -3.849E-04 are taken, d2 is adjusted to d2 = 3.8E-04, so that d1 + d2 = 1.
[0106] This modification ensures that the Kalman filter built based on the autoregressive coefficient can accurately analyze the measurement data of the electronic analytical balance.
[0107] Optionally, the method further includes: obtaining a pulse width value sequence Y' corresponding to the second reference mass generated by the electronic analytical balance in response to the second sample having the second reference mass; and using the pulse width value sequence Y' corresponding to the second reference mass to verify the stationarity of the first autoregressive model.
[0108] Specifically, in determining the autoregressive coefficients d1 to d2 of the first autoregressive model... g Then, an autoregressive equation can be established based on the autoregressive coefficient. Then, a second sample with its second reference mass (e.g., 20g) is placed on the weighing pan 911 of the electronic analytical balance.
[0109] Therefore, based on the above autoregressive coefficients d1~d g And the pulse width value sequence corresponding to the mass of the second sample, generate the pulse width estimation value sequence related to the mass of the second sample, and thereby calculate the mass estimation value sequence corresponding to the second reference mass.
[0110] Then, the stationarity of the residual sequence corresponding to the quality estimate sequence is tested, and the autoregressive coefficients d1 to d2 are determined. g Whether it is qualified or not. In this way, the accuracy and stability of the first autoregressive model can be further guaranteed.
[0111] in Figure 5C A schematic diagram is shown illustrating the calculation of the residual sequence corresponding to the estimated value sequence from the first autoregressive model using the pulse width mean sequence of a 20g weight. Table 2 below shows the results of the residual stationarity test:
[0112] Table 2 shows the stationarity test of the AR estimation residuals.
[0113]
[0114] Further optionally, the operation of constructing the state-space equation based on the first autoregressive model includes: constructing the state-space equation based on the autoregressive coefficients d1 to dg of the first autoregressive model as follows:
[0115]
[0116] in,
[0117]
[0118] H = [1];
[0119] vector vx k For [r k r k-1 , ..., r k-g+1 ] T , where r k~r k-g+1 For the pulse width mean sequence R, the sequence data {r k r k-1 , ..., r k-g+1};
[0120] The M value depends on u k Sure.
[0121] For example, in this embodiment, since d1 = -0.99962 and d2 = 3.8E-04, therefore we take...
[0122] as well as
[0123] H = [1].
[0124] Furthermore, in this embodiment, since g = 2, the vector vx is taken in the state-space equation. k =[r k ,r k-1 ] T Among them, r k and r k-1 for Figure 4B and Figure 4C The sequence data {r} in the pulse width mean sequence R shown in the figure k r k-1 , ..., r k-g+1}
[0125] Furthermore, optionally, the method further includes: setting the noise variance Q of the state equation in the state space equation to 0; and determining the noise variance R of the output equation in the state space equation based on the standard deviation of the sample of the pulse width value sequence Y.
[0126] Specifically, in this embodiment, after constructing the state-space equation, the noise matrices Q and R are further determined. The noise Q is set to 0, and the noise R is determined based on the standard deviation of each pulse width value in the pulse width sequence Y.
[0127] Optionally, a pre-set Kalman filter is used to correct the pulse width measurement values of the first pulse width value sequence Z, thereby obtaining a corrected estimate x corresponding to the pulse width measurement values. k The operations include: performing a segmented accumulation operation on the first pulse width value sequence Z to obtain the corresponding first segmented accumulated value sequence ZP; performing a moving average filter on the first segmented accumulated value sequence ZP to determine the first pulse width mean value sequence ZR corresponding to the first segmented accumulated value sequence ZP; and dividing every n pulse width mean value samples of the first pulse width mean value sequence ZR into a sample data segment, thereby forming multiple first sample data segments ZN. j , where j is a natural number; for each first sample data segment ZN jThe average value of the first L pulse width samples is calculated to determine the value of each first sample data segment ZN. j The corresponding first sample mean zu j ; and using a pre-set Kalman filter, based on the first sample mean zu j The first pulse width mean zr of the first pulse width mean sequence ZR k After correction, the average value zr of the first pulse width is obtained. k The corresponding corrected estimate x k .
[0128] Specifically, refer to Figure 6A As shown, the microprocessor 942 can perform segmented accumulation operations on the pulse width value sequence Z to obtain the corresponding segmented accumulation value sequence ZP = {zp1, zp2, zp3, ...}.
[0129] Then, refer to Figure 6B As shown, the microprocessor 942 performs a moving average filter on the segmented accumulated value sequence ZP to obtain the pulse width mean sequence ZR = {zr1, zr2, ...} corresponding to the segmented accumulated value sequence ZP. Specifically, the filtered mean zr can be calculated using the following formula. i :
[0130]
[0131] Where m is the width of the mean filter sliding window.
[0132] Thus, by means filtering, the resulting pulse width mean sequence ZR eliminates the random errors in the pulse width value sequence Z, retaining only the systematic errors associated with the electronic analytical balance.
[0133] Then, refer to Figure 6C As shown, after obtaining the pulse width mean sequence ZR = {zr1, zr2, ...}, the microprocessor 942 can divide every n filtered mean samples into a sample data segment, thus forming multiple sample data segments ZN. j j = 1, 2, 3, ... Then, refer to... Figure 6C As shown, the microprocessor 942 can calculate the average value of the first L filtered mean samples of each data segment, thereby calculating the sample mean zu corresponding to different data segments. j .
[0134] Then, the microprocessor 942 uses the Kalman filter constructed by the state-space equation (5) to filter the mean zr of the pulse width mean sequence ZR. k Make corrections.
[0135] Specifically, for each filtered mean zri Construct the corresponding vector vx i =[zr i ,zr i-1 , ..., zr i-g-1 ] T According to this embodiment, since g=2, it is possible to apply the filter mean zr to each filter. i Construct the corresponding vector vx i =[zr i ,zr i-1 ] T .
[0136] Furthermore, refer to Figure 6C As shown, the filtered mean zr can be used as a basis for... i Determine the corresponding sample mean zu j That is, the mean value of the filter, zr. i The sample data segment ZN belongs to j The corresponding sample mean zu j (where j is determined by the filtered mean zr) i (Confirmed). And based on the filtered mean zr i The corresponding sample mean zu j Determine M in the state-space equation (5) (for example, the determined sample mean zu can be directly used). j As M).
[0137] Therefore, based on vx i The determined M is iterated continuously according to the state-space equation (5). This determines the mean zr of each sample. k The corresponding corrected estimate x k .
[0138] Therefore, based on the iterative formula of the Kalman filter constructed above, the microprocessor 942 can successively determine the correction value for the object under test, thereby drawing the corresponding curve.
[0139] in, Figure 7A The graph shows the correction value obtained by Kalman filtering in the case of 0g (i.e., disk 911 is empty), as well as a comparison graph of sliding window filtering and Kalman filtering.
[0140] Figure 7B The graph shows the correction values obtained by Kalman filtering when weighing a 10g sample, as well as a comparison graph of sliding window filtering and Kalman filtering.
[0141] Figure 7C The graph shows the correction values obtained by Kalman filtering when weighing a 20g sample, as well as a comparison graph of sliding window filtering and Kalman filtering.
[0142] Figure 7D The graph shows the correction values obtained by Kalman filtering when weighing a 30g sample, as well as a comparison graph of sliding window filtering and Kalman filtering.
[0143] Table 3 below shows a comparison of the standard deviations of filtered data for different samples:
[0144] Table 3: Comparison of Standard Deviations of Filtered Data for Different Samples
[0145]
[0146]
[0147] The method flow of the technical solution in this embodiment will be described in the following order:
[0148] S702: Place a sample with a reference mass (e.g., 10 g) on an electronic analytical balance;
[0149] S704: Obtain the pulse width value sequence Y corresponding to the reference quality;
[0150] S706: Perform a segmented accumulation operation on the pulse width value sequence Y to obtain the corresponding segmented accumulated value sequence P, and perform sliding window mean filtering on the segmented accumulated value sequence P to determine the corresponding pulse width mean sequence R.
[0151] S708: Determine the error value sequence S reflecting the systematic error of the electronic analytical balance based on the pulse width mean sequence R;
[0152] S710: Based on this error value sequence, determine the autoregressive coefficients d1 to d2 of multiple autoregressive models of different orders (e.g., orders 2 to 6). p (where p can take different orders);
[0153] S712: Based on the second-order and higher autoregressive coefficients d2~d in each autoregressive model... p The ratio of the first-order autoregressive coefficient d1 to the first-order autoregressive coefficient d1 determines the autoregressive coefficients d1~d1 used to estimate the pulse width of the test object. g ;
[0154] S714: For the highest-order autoregressive coefficient d among the determined autoregressive coefficients g Adjustments are made to make the autoregressive coefficients d1~d g The sum of these is equal to 1, and the adjusted autoregressive coefficients d1 to d2 are... g The autoregressive coefficients are used as the first autoregressive model for estimating the pulse width of the object under test.
[0155] S716: Using samples with different reference masses, the autoregressive coefficients d1 to d2 are analyzed. g The stability of the system is tested;
[0156] S718: Using the autoregressive coefficients d1~d g Construct the state-space equations and the corresponding Kalman filter;
[0157] S720: Determine the noise variance Q of the state equation and the noise variance R of the output equation in the state-space equation;
[0158] S722: Place the object to be tested on the weighing pan and use an electronic analytical balance to generate a pulse width value sequence ZR related to the mass of the object to be tested;
[0159] S724: Segment the pulse width value sequence Z to obtain the corresponding segmented accumulated value sequence ZP, and perform moving average filtering on the segmented accumulated value sequence ZP to determine the corresponding pulse width mean sequence ZR.
[0160] S726: Divide every n pulse width mean samples of the pulse width mean sequence ZR into a sample data segment, thereby forming multiple sample data segments ZN. j , where j is a natural number;
[0161] S728: For each sample data segment ZN j The average value of the first L pulse width samples is calculated to determine the value of each sample data segment ZN. j The corresponding sample mean zu j ;as well as
[0162] S730: Utilizes a Kalman filter, based on the sample mean zu j The pulse width mean zr of the pulse width mean sequence ZR k After correction, the mean pulse width zr is obtained. k The corresponding corrected estimate x k .
[0163] S732: Based on the corrected estimate x k To determine the quality of the object to be tested.
[0164] Furthermore, in this embodiment:
[0165] The microprocessor 942 is an STM32 microcontroller with a 72MHz clock frequency. The temperature-compensated crystal oscillator is a 3.3VTC XO with a clock frequency of 50MHz. A general-purpose FPGA chip is used for the pulse width measurement circuit. The microcontroller directly reads the FPGA chip's count values via the SPI interface to obtain real-time measurement data. Based on sample data analysis, a second-order state equation is chosen, with coefficients d1 = 0.99962, d2 = 0.00038, Q = 0, and R = 15.4.
[0166] Furthermore, according to a second aspect of this embodiment, an electronic analytical balance is provided, comprising: a balance mechanism 910, a pulse width modulation (PWM) signal circuit 920, an electromagnetic coil drive circuit 930, and a metering circuit 940, wherein the metering circuit 940 includes a counter 941 and a microprocessor 942, wherein the counter 941 counts according to the PWM signal to determine a count value corresponding to the pulse width of the PWM signal, and the microprocessor 942 determines the mass of the load on the weighing pan according to the count value. The microprocessor is configured to:
[0167] Obtain the k-th pulse width measurement z from the pulse width value sequence Z generated by the electronic analytical balance, which is related to the mass of the test object. k ;
[0168] Using a pre-set Kalman filter, the k-th pulse width measurement value z is... k After correction, the value of the kth pulse width measurement z is obtained. k The corresponding corrected estimate x k ;as well as
[0169] Based on the revised estimate x k The quality of the object under test is determined, and the Kalman filter is constructed in the following way:
[0170] Determine the error value sequence S that reflects the systematic error of the electronic analytical balance;
[0171] Determine the autoregressive coefficients corresponding to the error value sequence S, and construct a first autoregressive model based on the autoregressive coefficients. The first autoregressive model is used to estimate the pulse width value generated by the electronic analytical balance corresponding to the mass of the object under test; and
[0172] The state-space equation is constructed based on the first autoregressive model, and a Kalman filter is constructed based on the state-space equation.
[0173] In summary, according to the technical solution of this embodiment, the autoregressive coefficients are first determined based on the error value sequence reflecting the systematic error of the electronic analytical balance. Then, an autoregressive model is constructed based on the autoregressive coefficients to estimate the pulse width value corresponding to the mass of the object to be measured generated by the electronic analytical balance. The state-space equation is then constructed using the autoregressive model, and a Kalman filter is constructed based on the state-space equation.
[0174] Then, when measuring the mass of the object under test, the pulse width value generated by the electronic analytical balance is corrected using this Kalman filter. In this way, the measurement accuracy of the electronic analytical balance can be effectively improved using the Kalman filter. Since the state-space equation of the Kalman filter is constructed using an autoregressive model, and the coefficients of the autoregressive model are determined based on the error value sequence reflecting the systematic error of the electronic analytical balance, the Kalman filter constructed in this way can effectively eliminate the influence of systematic errors in the electronic analytical balance. Furthermore, using the Kalman filter only requires recording the correction value of the previous correction and iterating to obtain the current correction value, thus improving the response speed of the electronic analytical balance. This solves the technical problems of slow data processing response speed and susceptibility to interference, resulting in insufficient accuracy, in existing electronic analytical balances.
[0175] Furthermore, the experiment estimated the equation parameters and noise intensity using offline data, verifying the stationarity of the measurement data with a significance level as low as 0.001. The parameter estimation plus Kalman filtering hybrid method was compared with the commonly used sliding window filtering method; the new method showed significantly improved smoothness and stability, with a measurement standard deviation of 30% of the original method, linearity reaching 6.7 × 10^(-5), and a response time as low as 10% lower than the original method. Analysis of the output data can identify non-stationary noise interference during the measurement process, such as airflow and vibration.
[0176] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following drawings denote similar items; therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.
[0177] For ease of description, spatial relative terms such as "above," "on top of," "on the upper surface of," "above," etc., are used herein to describe the spatial positional relationship of a device or feature as shown in the figures to other devices or features. It should be understood that spatial relative terms are intended to encompass different orientations in use or operation beyond the orientation of the device as described in the figures. For example, if the device in the figures were inverted, a device described as "above" or "on top of" other devices or structures would subsequently be positioned as "below" or "under" other devices or structures. Thus, the exemplary term "above" can include both "above" and "below." The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatial relative descriptions used herein will be interpreted accordingly.
[0178] In the description of this disclosure, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is generally based on the orientation or positional relationship shown in the accompanying drawings and is only for the convenience of describing this disclosure and simplifying the description. Unless otherwise stated, these directional terms 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 on the scope of protection of this disclosure; the directional terms "inner" and "outer" refer to the inner and outer contours relative to the outline of each component itself.
[0179] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for quality inspection using an electronic analytical balance, characterized in that, include: Obtain the first pulse width value sequence Z generated by the electronic analytical balance, which is related to the mass of the object to be tested; Using a pre-set Kalman filter, the pulse width measurement value of the first pulse width value sequence Z is corrected to obtain the corrected estimate value corresponding to the pulse width measurement value; as well as The quality of the object under test is determined based on the corrected estimate, wherein the Kalman filter is constructed in the following manner: Determine the error value sequence S that reflects the systematic error of the electronic analytical balance; Determine the autoregressive coefficients corresponding to the error value sequence S, and construct a first autoregressive model based on the autoregressive coefficients. The first autoregressive model is used to estimate the pulse width value generated by the electronic analytical balance corresponding to the mass of the object under test; and The state-space equation is constructed based on the first autoregressive model, and the Kalman filter is constructed based on the state-space equation.
2. The method according to claim 1, characterized in that, Using a pre-set Kalman filter, the pulse width measurement values of the first pulse width value sequence Z are corrected to obtain a corrected estimate x corresponding to the pulse width measurement values. k The operations include: Perform a segmented accumulation operation on the first pulse width value sequence Z to obtain the corresponding first segmented accumulation value sequence ZP; Perform a moving average filter on the first segmented accumulated value sequence ZP to determine the first pulse width average sequence ZR corresponding to the first segmented accumulated value sequence ZP; The first pulse width mean sequence ZR is divided into n pulse width mean samples as a sample data segment, thereby forming multiple first sample data segments ZN. j , where j is a natural number; For each first sample data segment ZN j The average value of the first L pulse width samples is calculated to determine the value of each first sample data segment ZN. j The corresponding first sample mean zu j ;as well as Using a pre-set Kalman filter, based on the first sample mean zu j The first pulse width mean zr of the first pulse width mean sequence ZR j After correction, the average value zr of the first pulse width is obtained. j The corresponding corrected estimate.
3. The method according to claim 2, characterized in that, The operation of determining the error value sequence S reflecting the systematic error of the electronic analytical balance includes: Acquire a second pulse width value sequence Y generated by an electronic analytical balance in response to a first sample having a first reference mass, which corresponds to the first reference mass, wherein each pulse width value in the second pulse width value sequence Y corresponds to the first reference mass; Perform a segmented accumulation operation on the second pulse width value sequence Y to obtain the corresponding second segmented accumulation value sequence P; Perform moving average filtering on the second segmented accumulated value sequence P to determine the second pulse width average sequence R corresponding to the second segmented accumulated value sequence P; and The error value sequence S is determined based on the second pulse width mean sequence R.
4. The method according to claim 3, characterized in that, The operation of determining the error value sequence S based on the second pulse width mean sequence R includes: The second pulse width mean sequence R is divided into n pulse width mean samples as a sample data segment, thereby forming multiple second sample data segments N. j , where j is a natural number; For each second sample data segment N j The average value of the first L pulse width samples is calculated to determine the relationship with each second sample data segment N. j The corresponding sample mean u j ;as well as The difference between the pulse width mean point in the second pulse width mean sequence R and the sample mean of the corresponding second sample data segment is calculated to determine the error value sequence S.
5. The method according to claim 4, characterized in that, The operation of determining the autoregressive coefficients corresponding to the error value sequence S and constructing a first autoregressive model based on the autoregressive coefficients includes: Based on the error value sequence S, a second autoregressive model is constructed, which is used to predict the error value samples of the error value sequence S. Using the first-order autoregressive coefficient of the second autoregressive model as a benchmark, determine the ratios of other-order autoregressive coefficients to the first-order autoregressive coefficient; and If the number of other autoregressive coefficients whose ratio is less than a first predetermined threshold is less than a second predetermined threshold, the autoregressive coefficients of the first autoregressive model are determined based on the autoregressive coefficients of the second autoregressive model, thereby constructing the first autoregressive model.
6. The method according to claim 5, characterized in that, The operation of determining the autoregressive coefficients of the first autoregressive model based on the autoregressive coefficients of the second autoregressive model includes: Adjust the value of the highest-order autoregressive coefficient of the second autoregressive model so that the sum of the autoregressive coefficients of the second autoregressive model equals 1; and The adjusted autoregressive coefficients of the second autoregressive model are used as the autoregressive coefficients of the first autoregressive model.
7. The method according to claim 6, characterized in that, Also includes: Acquire the sequence of third pulse width values Y' generated by the electronic analytical balance in response to a second sample having a second reference mass, corresponding to the second reference mass; as well as The stationarity of the first autoregressive model is verified using the third pulse width value sequence Y' corresponding to the second reference quality.
8. The method according to claim 3, characterized in that, The operation of constructing the state-space equation based on the first autoregressive model includes: the autoregressive coefficients d1~d2 based on the first autoregressive model. g The state-space equations are constructed as follows: in, ;as well as ,and vector vx k For [r k r k-1 ,...,r k-g+1 ] T , where r k ~r k-g+1 For the sequence data {r} in the second pulse width mean sequence R k r k-1 ,...,r k-g+1 }, z k It is the kth pulse width measurement value in the pulse width value sequence related to the quality of the object under test.
9. The method according to claim 8, characterized in that, Also includes: Set the noise variance Q of the state equation in the state space equation to 0; as well as The noise variance of the output equation in the state-space equation is determined based on the standard deviation of the pulse width value sequence Y.
10. An electronic analytical balance, comprising: The balance mechanism, the pulse width modulation (PWM) signal circuit, the electromagnetic coil drive circuit, and the metering circuit, wherein the metering circuit includes a counter and a microprocessor, wherein the counter counts according to the PWM signal to determine a count value corresponding to the pulse width of the PWM signal, and the microprocessor determines the mass of the load on the weighing pan according to the count value, characterized in that the microprocessor is configured to: Obtain the first pulse width value sequence Z generated by the electronic analytical balance, which is related to the mass of the object to be tested; Using a pre-set Kalman filter, the pulse width measurements of the first pulse width value sequence Z are corrected to obtain corrected estimates corresponding to the pulse width measurements; and The quality of the object under test is determined based on the corrected estimate, wherein the Kalman filter is constructed in the following manner: Determine the error value sequence S that reflects the systematic error of the electronic analytical balance; Determine the autoregressive coefficients corresponding to the error value sequence S, and construct a first autoregressive model based on the autoregressive coefficients. The first autoregressive model is used to estimate the pulse width value generated by the electronic analytical balance corresponding to the mass of the object under test; and The state-space equation is constructed based on the first autoregressive model, and the Kalman filter is constructed based on the state-space equation.
Citation Information
Patent Citations
Time series analysis-based variable proportion self-adaptive federal filtering method
CN102252677A
High-pressure common rail system oil injection rule observation method based on Kalman filtering
CN115688621A