Dynamic weighing digital filtering method, system and device and storage medium

By adopting digital filtering methods in dynamic weighing systems, including continuous sampling, digitization, sliding average processing and FIR filter design, the problem of difficult for the system to meet high speed and high accuracy in complex environments is solved, and higher measurement accuracy and system adaptability are achieved.

CN120074446AInactive Publication Date: 2025-05-30SHENZHEN XUSHUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411992111.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When existing dynamic weighing systems deal with interference signals in complex environments, they are difficult to meet the actual production needs of high speed and high precision.

Method used

The dynamic weighing digital filtering method is adopted, and the interference signal is effectively suppressed through continuous sampling, digital operation, sliding average processing and FIR filter window function design, and smooth segment data are obtained to reflect the real weight of the object to be tested.

Benefits of technology

It improves measurement accuracy and system adaptability, and can optimize filtering effect by adjusting parameters in different dynamic weighing environments, improving the overall performance of the system and data processing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120074446A_ABST
    Figure CN120074446A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of weighing, in particular to a dynamic weighing digital filtering method, system and device and a storage medium, and the method comprises the steps: carrying out the continuous sampling of a weight value of a to-be-measured object at a fixed frequency in a dynamic weighing environment, thereby generating an analog signal sequence, performing digital operation on each analog signal in the analog signal sequence to obtain a digital signal; performing n (ngt; 1) times of moving average processing on the digital signal to obtain moving average data; designing an FIR (Finite Impulse Response) filter window function, and filtering the digital signal based on the FIR filter window function; and acquiring smooth segment data according to the data curve after the moving average processing and the filtering processing. The dynamic weighing method and the dynamic weighing device have the effect of improving the real-time performance and the accuracy of weighing in the dynamic weighing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of weighing technology, and particularly to a dynamic weighing digital filtering method, system, device, and storage medium. Background Art

[0002] Dynamic weighing technology has important application value in the packaging industry. Especially today with the continuous improvement of automation, how to achieve high-speed and high-accuracy dynamic weighing has become a key issue in many production links. Accurate dynamic weighing technology can not only improve production efficiency, but also ensure product quality and meet the needs of consumers. Therefore, for a weighing system, it is crucial to ensure the real-time and accuracy of the weighing process.

[0003] To ensure the real-time and accuracy during the weighing process, common methods currently used in dynamic weighing systems include, but are not limited to, directly using the original analog signal, simply filtering the analog signal output by the weighing sensor using simple filtering techniques such as first-order or second-order filters, or using a simple averaging method to process data to achieve preliminary signal noise reduction. However, although these methods can improve the quality of weighing data to a certain extent, they have obvious deficiencies in dealing with interference signals in complex environments and are difficult to meet the actual production requirements of coexisting high speed and high precision.

[0004] Therefore, based on the above problems, the existing technology still needs to be improved. Summary of the Invention

[0005] The purpose of this application is to provide a dynamic weighing digital filtering method, system, device, and storage medium, aiming to solve the problem of difficulty in meeting the actual production requirements of coexisting high speed and high precision.

[0006] The first purpose of this application is to provide a dynamic weighing digital filtering method, including: In a dynamic weighing environment, continuously sample the weight value of the item to be measured at a fixed frequency to generate an analog signal sequence, and perform digitization operations on each analog signal in the analog signal sequence to obtain a digitized signal; Perform n (n>1) times of moving average processing on the digitized signal to obtain moving average data; Design an FIR filter window function, and perform filtering processing on the digitized signal based on the FIR filter window function; Obtain smooth segment data according to the data curves after the moving average processing and the filtering processing.

[0007] By adopting the above technical solutions, the measurement accuracy can be improved. Through continuous sampling, digital operation, moving average processing, and the design of the window function of the FIR filter, interference signals can be effectively suppressed, and the smooth segment data obtained can better reflect the true weight of the item to be measured. The adaptability of the system is enhanced. By comprehensively considering various factors, the filtering effect can be optimized by adjusting relevant parameters in different dynamic weighing environments, and the parameters of the moving average processing and the FIR filter are adjustable, enabling flexible response to different situations. The overall performance of the system is improved. A complete data processing flow is formed from sampling to obtaining smooth segment data, optimizing the quality and efficiency of data processing, and in some application scenarios, real-time requirements may also be met.

[0008] In a possible implementation manner of the present application, the step of performing n (n>1) times of moving average processing on the digital signal includes: In a dynamic weighing environment, obtain the interference frequency of the interference signal generated by measuring the weight of the item to be measured; Based on the interference frequency, determine the size m of the sliding window, where the sliding window is the data range for performing moving average processing; Define the digital signal and the moving average data; The digital signal is {D 0 (k), D 0 (k + 1), ……, D 0 (k + m - 2), D 0 (k + m - 1)}, where D 0 (k) represents the signal value initially collected and digitized at the k-th sampling point position. k is the sampling point index, starting from an initial value and increasing sequentially at a fixed sampling frequency. m is the size of the sliding window, which determines the number of signal points participating in each moving average calculation; The moving average data is {D n (k), D n (k + 1), ……, D n (k + m - 2), D n (k + m - 1)}, where D n (k) represents the data value obtained after n times of moving average processing at the k-th sampling point position when the number of processing times is n. As n increases, the data will gradually become smoother, reducing the influence of noise and interference; When the number of processing times is n, calculate the data value obtained after n times of moving average processing at the k-th sampling point position. The calculation process is as follows: Among them, n represents the number of processing times, k is the sampling point index, and j is a variable ranging from 0 to m.

[0009] By adopting the above technical solution, the interference frequency is obtained and the size of the sliding window is determined based on this, so that the processing process can specifically consider the interference factors and improve the suppression effect on the interference signal. Defining the digital signal and the moving average data provides a basis for subsequent accurate calculation and analysis, and helps to better understand the data change process. Through a specific calculation process, the moving average data is calculated. As the number of processing times increases, the data gradually becomes smoother, effectively reducing the influence of noise and interference, thereby improving the accuracy and reliability of the measurement data and providing better data support for the dynamic weighing system.

[0010] In a possible implementation manner of the present application, the steps of designing the FIR filter window function and filtering the digital signal based on the FIR filter window function include: Obtain the unit sample response function, and the unit sample response function is: Where H d (e jω ) is the frequency response function of the filter; Obtain the requirement information for the transition band and the stop band, select the form of the transfer function, and estimate the window length N of the window function; Calculate the unit sample response h(n) of the filter, where ω(n) is the selected window function, and the calculation method is as follows: h(n) = h d ω(n) Judge whether the filter index meets the preset requirements; If the filter index meets the preset requirements, the designed filter frequency response is:

[0011] By adopting the above technical solution, obtaining the unit sample response function lays a foundation for subsequent calculations. This function is associated with the frequency response function of the filter and is a key element for understanding and designing the filter. By obtaining the requirement information for the transition band and the stop band to select the form of the transfer function and estimate the window length N, the performance of the filter can be customized according to actual needs, effectively suppressing the interference signal in a specific frequency range and improving the filtering effect. Calculating the unit sample response and judging whether the filter index meets the preset requirements ensure that the performance of the filter meets the expectations, so that the finally designed filter frequency response can meet the requirements of the dynamic weighing system for signal processing, further improving the accuracy and stability of the measurement and reducing the influence of noise and interference on the measurement results.

[0012] In a possible implementation manner of the present application, the steps of obtaining the requirement information for the transition band and the stop band and selecting the form of the transfer function include: Obtain and analyze the frequency characteristics of the interference signal and the useful signal; Determine the type of the filter according to the frequency characteristic; Based on the type of the filter, obtain a first frequency range for the filter to transition from the passband to the stopband, and a second frequency range of the signal that the filter needs to suppress; Determine the form of the transfer function through the first frequency range and the second frequency range.

[0013] By adopting the above technical solution, the frequency characteristics of the interference signal and the useful signal are obtained and analyzed, which enables an in-depth understanding of the signal environment and provides a key basis for the design of the filter. Determining the type of the filter according to the frequency characteristic ensures that the filter can target different types of signals and improve the effectiveness of filtering. Obtaining the frequency range from the passband to the stopband and the frequency range of the signal that needs to be suppressed, and determining the form of the transfer function through these two ranges, can accurately design the filter to achieve good filtering effect in the required frequency range, effectively suppress the interference signal, ensure the integrity of the useful signal, and thus improve the measurement accuracy and reliability of the dynamic weighing system.

[0014] In a possible implementation manner of the present application, the steps of estimating the window length N of the window function include: Determine the required frequency resolution according to the discrimination accuracy requirement of the dynamic weighing system for different frequency signals; Determine the smooth transition requirement information from the passband to the stopband according to the transition band characteristic requirement; Based on the stopband attenuation requirement, determine the window length required to suppress the interference signal of a specific frequency; By analyzing the passband ripple requirement, determine that the selection of the window length N will not cause excessive ripple of the passband signal and thus affect the accuracy of the weight signal; Use the frequency resolution formula to combine the required frequency resolution and the fixed frequency to preliminarily calculate the range of the window length N; Perform simulation or actual tests on filters with different window lengths to obtain frequency response characteristic indexes including passband gain, stopband attenuation, and transition band width; Adjust the window length N according to the test results until the performance requirements of the dynamic weighing system are met, including requirements in aspects such as passband ripple, stopband attenuation, and transition band width; Analyze the influence of different window lengths N on the computational complexity; Combined with the real-time requirement of the dynamic weighing system, ensure that the selected window length N will not cause too long computational delay and thus affect the response speed of the system; On the premise of meeting the frequency characteristic and filter performance requirements, select the smallest window length N to reduce the computational complexity and improve the real-time performance of the system.

[0015] By adopting the above technical solution, key information such as the required frequency resolution, transition band characteristics, stopband attenuation, and passband ripple is determined according to various requirements, enabling the determination of the window length N to comprehensively consider the system's requirements for processing different frequency signals and ensuring the accuracy and reliability of the filtering effect. The window length N is calculated by formulas and adjusted through tests to meet the performance requirements of the dynamic weighing system in terms of passband ripple, stopband attenuation, and transition band width, effectively improving the filter's ability to suppress interference signals and the fidelity of useful signals. Analyze the impact of the window length on the computational complexity and select an appropriate window length in combination with the real-time requirement, reducing the computational complexity while ensuring the filtering performance, improving the real-time performance of the system, and enabling the dynamic weighing system to operate more efficiently and accurately.

[0016] In a possible implementation manner of this application, the steps of determining whether the filter indexes meet the preset requirements include: calculating the gain values at each frequency point in the passband. If the gain values are within the preset passband gain index and deviation range, the filter indexes meet the preset requirements. Calculating the difference between the maximum and minimum gain values in the passband. If the difference is less than or equal to the preset passband ripple index, the filter indexes meet the preset requirements. Calculating the frequency response amplitude values at each frequency point in the stopband. If the frequency response amplitude value at a certain frequency point in the stopband is less than or equal to the preset stopband attenuation index, the filter indexes meet the preset requirements. Determining the edge frequencies of the passband and the stopband, calculating the transition band width. If the transition band width is less than or equal to the preset transition band width index, the filter indexes meet the preset requirements.

[0017] By adopting the above technical solution, through the calculation and comparison of the gain values at each frequency point in the passband, the gain difference, and the frequency response amplitude values in the stopband, the performance of the filter in the passband and the stopband can be accurately evaluated, ensuring that the filter has an appropriate gain and small ripple in the passband and can effectively attenuate interference signals in the stopband, thereby improving the accuracy and reliability of the filtering effect. The determination of the edge frequencies of the passband and the stopband and the calculation and comparison of the transition band width enable the transition band characteristics of the filter to meet the preset requirements, ensuring a smooth transition between different frequency regions of the filter, further enhancing the stability and effectiveness of the entire filtering process, providing better signal processing for the dynamic weighing system, and improving the accuracy and stability of the measurement.

[0018] In a possible implementation manner of this application, the method further includes: Using the obtained smoothed segment data for subsequent weight calculation, item classification, or quality monitoring operations of the dynamic weighing system; adjusting and optimizing the system parameters according to the actual situation during the filtering process and the final data processing results.

[0019] By adopting the above technical solution, the smooth segment data is used for weight calculation, item classification or quality monitoring operations, making full use of the advantages of the processed data, improving the accuracy and reliability of these subsequent operations, and providing better data support for various applications of the dynamic weighing system. Adjusting and optimizing the system parameters according to the filtering process and results can enable the system to better adapt to different weighing environments and item characteristics, further improve the filtering effect and the overall performance of the system, ensure that the system always maintains a good working state, extend the service life of the system, and at the same time reduce the measurement errors caused by environmental changes or item differences, improving the practicability and adaptability of the dynamic weighing system.

[0020] The second object of this application is to provide a dynamic weighing digital filtering system, which includes: Digital signal generation module: In a dynamic weighing environment, continuously sample the weight value of the item to be measured at a fixed frequency to generate an analog signal sequence, and perform digitalization operations on each analog signal in the analog signal sequence to obtain digital signals; Moving average data acquisition module: Perform n (n>1) times of moving average processing on the digital signals to obtain moving average data; Filtering processing module: Design an FIR filter window function, and perform filtering processing on the digital signals based on the FIR filter window function; Smooth segment data acquisition module: Obtain smooth segment data according to the data curves after the moving average processing and the filtering processing.

[0021] By adopting the above technical solution, the measurement accuracy can be improved. Through continuous sampling, digitalization operations, moving average processing, and the design of the FIR filter window function, interference signals can be effectively suppressed, and the obtained smooth segment data can better reflect the true weight of the item to be measured. The adaptability of the system is enhanced. Considering various factors, the filtering effect can be optimized by adjusting relevant parameters in different dynamic weighing environments, and the parameters of the moving average processing and the FIR filter are adjustable, enabling flexible response to different situations. The overall performance of the system is improved. A complete data processing process is formed from sampling to obtaining smooth segment data, optimizing the quality and efficiency of data processing, and in some application scenarios, real-time requirements may also be met.

[0022] The third object of this application is to provide a dynamic weighing digital filtering device, which includes: A memory and a processor, and a computer program capable of being loaded and executed by the processor for the above-mentioned dynamic weighing digital filtering method is stored on the memory.

[0023] The fourth object of this application is to provide a storage medium.

[0024] The fourth above-mentioned application objective of this application is achieved through the following technical solutions: A storage medium, in which a computer program capable of being loaded and executed by a processor for the above-mentioned dynamic weighing digital filtering method is stored.

[0025] In summary, this application includes at least one of the following beneficial technical effects: 1. By performing multiple moving average processes on digital signals, the influence of noise and interference signals can be effectively reduced, and the accuracy of weighing data can be improved; 2. Designing the FIR filter window function and filtering the digital signal can further improve the smoothness and accuracy of weighing data on the premise of ensuring real-time performance; 3. Obtaining smooth segment data by combining the data curves of moving average processing and filtering processing makes the weight calculation, item classification, and quality monitoring of the dynamic weighing system more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a schematic flowchart of a dynamic weighing digital filtering method provided by an embodiment of this application; Figure 2 is a schematic virtual structure diagram of a dynamic weighing digital filtering system provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts shall fall within the protection scope of this application.

[0028] In addition, the term "and / or" in this document is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, unless otherwise specified.

[0029] The following further describes the embodiments of this application in detail with reference to the accompanying drawings of the specification.

[0030] An embodiment of this application provides a dynamic weighing digital filtering method. Referring to Figure 1 , the main process of the method is described as follows: S1: In a dynamic weighing environment, continuously sample the weight value of the item to be measured at a fixed frequency to generate a sequence of analog signals, and perform digitization operations on each analog signal in the sequence of analog signals to obtain digitized signals; Among them, in a dynamic weighing environment, for example, a conveyor belt transports the item to be weighed, and the item to be weighed is weighed. According to the characteristics of the dynamic weighing environment and the nature of the item to be measured, select a suitable sensor for weight value sampling. For example, for small items with high precision requirements, a strain gauge sensor can be selected; for large items or situations with a large weight change range, a load cell can be selected. These sensors should have sufficient accuracy and sensitivity to accurately obtain the weight change information of the item. Determine a suitable fixed sampling frequency according to the dynamic characteristics of the weighing system and the required measurement accuracy. Generally speaking, if the weight of the item changes rapidly, a higher sampling frequency is required to capture the rapid weight change; if the weight of the item is relatively stable, a lower sampling frequency may be sufficient. At the same time, also consider the subsequent data processing capabilities and real-time requirements, and avoid too high a sampling frequency resulting in excessive data volume and increasing the processing burden.

[0031] Use an analog-to-digital converter (ADC) to perform digitization operations on the acquired sequence of analog signals. The resolution of the ADC should be selected according to the measurement accuracy requirements. A higher resolution can represent the value of the analog signal more precisely, but it will also increase the cost and the complexity of data processing. During the digitization process, the ADC needs to be correctly configured and calibrated to ensure that the digitized signal can accurately reflect the characteristics of the original analog signal.

[0032] S2: Perform n (n>1) times of moving average processing on the digitized signals to obtain moving average data; Among them, in a dynamic weighing environment, through the analysis of historical data, experimental tests or with the help of spectrum analysis tools, obtain the interference frequency of the interference signal generated by measuring the weight of the item to be measured. For example, if periodic fluctuations are found during the weighing process, the frequency corresponding to the fluctuations can be determined through spectrum analysis, which is the interference frequency. Based on the obtained interference frequency, determine the size m of the moving window. Generally speaking, if the interference frequency is low, the size of the moving window can be appropriately increased to better smooth the interference signal; if the interference frequency is high, a smaller size of the moving window is required to avoid distortion of the useful signal due to excessive smoothing. At the same time, also consider the computational complexity and real-time requirements, and avoid too large a window size increasing the computational amount and processing time.

[0033] According to the defined digitized signal and moving average data format, perform moving average calculation. For each sampling point k, when the number of processing times is n (n>1), according to the formula Calculate the sliding average data. During the calculation process, it is necessary to pay attention to the data index range and boundary condition processing to ensure the accuracy of the calculation results.

[0034] S3: Design the FIR filter window function, and filter the digital signal based on the FIR filter window function; Among them, according to the theory and design requirements of the filter, obtain the unit sample response function This function is the basis of filter design, and it is associated with the frequency response function H d (e jω ) is associated. By performing appropriate transformations and processing on it, a filter that meets the requirements can be obtained.

[0035] The selection of the transfer function form and the estimation of the window function window length include: 1. Obtain and analyze the frequency characteristics of the interference signal and the useful signal. By performing spectral analysis on the sampled data, determine the frequency ranges where the interference signal and the useful signal are located, as well as their frequency distribution and intensity characteristics. 2. Determine the type of filter according to the results of the frequency characteristic analysis. For example, if the interference signal is mainly concentrated in the high-frequency band and the useful signal is in the low-frequency band, a low-pass filter can be selected; if the interference signal and the useful signal overlap in different frequency bands, a band-pass or band-stop filter may be required. 3. Based on the selected filter type, obtain the first frequency range for the filter to transition from the passband to the stopband, and the second frequency range for the signal that the filter needs to suppress. The determination of these ranges needs to consider the frequency characteristics of the interference signal and the protection requirements of the useful signal. 4. Through the first frequency range and the second frequency range, select the form of the transfer function and estimate the window length N of the window function. When selecting the form of the transfer function, the performance requirements of the filter, such as passband ripple, stopband attenuation, and transition band width, need to be considered; when estimating the window length N, factors such as frequency resolution, computational complexity, and real-time requirements need to be comprehensively considered. The unit sample response calculation and filter index judgment include: 1. Calculate the unit sample response h(n) of the filter, according to the formula h(n) = h dω(n), where ω(n) is the selected window function. During the calculation process, it is necessary to ensure the correct selection and application of the window function, as well as the accuracy of the calculation results. 2. Determine whether the filter specifications meet the preset requirements. Calculate the gain values at each frequency point within the passband. If the gain values are within the preset passband gain specifications and deviation range; calculate the difference between the maximum and minimum gain values within the passband. If the difference is less than or equal to the preset passband ripple specification; calculate the frequency response amplitude values at each frequency point within the stopband. If the frequency response amplitude value at a certain frequency point within the stopband is less than or equal to the preset stopband attenuation specification; determine the passband and stopband edge frequencies, calculate the transition band width. If the transition band width is less than or equal to the preset transition band width specification, then the filter specifications meet the preset requirements. If the requirements are not met, parameters such as the transfer function form or the window length of the window function need to be adjusted, recalculated, and judged until the requirements are met.

[0036] If the filter specifications meet the preset requirements, the designed filter frequency response is Use this filter to filter the digital signal. Transform the input digital signal through the frequency response function of the filter to obtain the filtered signal. During the filtering process, attention needs to be paid to the data format and processing order to ensure the correct implementation of the filtering process.

[0037] S4: Obtain the smooth segment data according to the data curve after the moving average processing and the filtering processing.

[0038] Among them, analyze the data curve after the moving average processing and the filtering processing. Observe the shape, trend, and fluctuation of the data curve, and determine the relatively stable and less fluctuating parts in the data curve. These parts may be potential areas of the smooth segment data. According to the analysis results of the data curve, extract the smooth segment data. The start and end positions of the smooth segment data can be determined by setting certain thresholds or rules. For example, a fluctuation amplitude threshold can be set. If the fluctuation amplitude of a certain segment of data is less than this threshold, then this segment of data is extracted as the smooth segment data. During the extraction process, it is necessary to ensure that the extracted data can accurately reflect the weight characteristics of the measured item and avoid extracting incorrect data segments.

[0039] Specifically, in some possible embodiments, the steps of performing n (n>1) times of moving average processing on the digital signal include: In a dynamic weighing environment, obtain the interference frequency of the interference signal generated by measuring the weight of the item to be measured; Based on the interference frequency, determine the size m of the sliding window, and the sliding window is the data range used for performing the moving average processing; Define the digital signal and the moving average data; The digital signal is {D 0 (k), D 0 (k + 1), ……, D 0 (k + m - 2), D 0 (k + m - 1)}, where D 0 (k) represents the signal value initially collected and digitized at the k-th sampling point position. k is the sampling point index, starting from an initial value and increasing sequentially at a fixed sampling frequency. m is the sliding window size, which determines the number of signal points participating in each moving average calculation; The moving average data is {D n (k), D n (k + 1), ……, D n (k + m - 2), D n (k + m - 1)}, where D n (k) represents the data value obtained after n times of moving average processing at the k-th sampling point position when the number of processing times is n. As n increases, the data will gradually become smoother, reducing the influence of noise and interference; When the number of processing times is n, calculate the data value obtained after n times of moving average processing at the k-th sampling point position. The calculation process is as follows: where n represents the number of processing times, k is the sampling point index, and j is a variable ranging from 0 to m.

[0040] Among them, in a dynamic weighing environment, a high-precision data acquisition device is used to continuously monitor the signal changes during the weight measurement of the item to be measured. Record the weight signal data for a period of time, including information such as the amplitude and timestamp of the signal. Perform spectral analysis on the recorded weight signal data. Algorithms such as the fast Fourier transform (FFT) can be used to convert the time-domain signal into a frequency-domain signal. By analyzing the spectral distribution of the frequency-domain signal, determine the frequency components of the possible interference signals. According to the spectral analysis results, identify the frequency components different from the weight signal of the item to be measured. These components may be interference signals caused by environmental factors (such as mechanical vibration, electromagnetic interference, etc.). Determine the main frequency or frequency range of the interference signal as the interference frequency.

[0041] According to the characteristics of the interference frequency, theoretical analysis is carried out to determine the approximate range of the sliding window size m. Generally speaking, if the interference frequency is low, it means that the change of the interference signal is relatively slow, and a larger sliding window is required to smooth out the interference signal. On the contrary, if the interference frequency is high and the interference signal changes rapidly, a smaller sliding window is needed to avoid distortion of the useful signal caused by excessive smoothing. Through a series of experiments, adjust the sliding window size m and observe the effect of the data after moving average processing. Different values of m can be selected to perform moving average processing on the same digitized signal, and then compare the difference between the processed data and the original signal. For example, indicators such as the variance and root mean square error of the processed data can be calculated to evaluate the filtering effect under different m values. According to the experimental results, select a sliding window size m that can effectively suppress the interference signal and better retain the characteristics of the useful signal.

[0042] The digitized signal {D 0 (k), D 0 (k + 1), ……, D 0 (k + m - 2), D 0 (k + m - 1)}, where D 0 (k) represents the signal value initially collected and digitized at the k-th sampling point position. Here, k is the sampling point index, starting from an initial value and increasing sequentially at a fixed sampling frequency. The signal value D 0 (k) is the digital value obtained by analog-to-digital conversion of the analog weight signal, reflecting the weight measurement result of the item to be measured at this sampling moment. The moving average data {D n (k), D n (k + 1), ……, D n (k + m - 2), D n (k + m - 1)}, where D n (k) represents the data value obtained after n times of moving average processing at the k-th sampling point position when the number of processing times is n. As the number of processing times n increases, the data will gradually become smoother because the moving average processing can effectively reduce the influence of noise and interference. The calculation of the moving average data is based on a certain range of digitized signals, and this range is determined by the sliding window size m.

[0043] When the number of processing times is n, the calculation formula for the data value obtained after n times of moving average processing at the k-th sampling point position is Here, n represents the number of processing times, k is the sampling point index, and j is a variable ranging from 0 to m. The meaning of this formula is that at the n-th processing, the moving average data value of the k-th sampling point is equal to the sum of all data values from the k-th sampling point to the k + m - 1-th sampling point at the previous processing (n - 1 times) divided by the sliding window size m.

[0044] Calculation steps: First, for the first processing (n = 1), the moving average data value is equal to the original digitized signal value, i.e., D 1 (k) = D 0 (k). For subsequent processing times n > 1, iterative calculations are performed according to the calculation formula. Starting from the second sampling point (k = 1), the moving average data value of each sampling point is calculated in turn. For each sampling point k, the m data values of the previous processing are added together, i.e., D n-1 (k), D n-1 (k + 1),..., D n-1 (k + m - 1), and then divided by m to obtain the moving average data value D n (k) of this sampling point under the current processing times. During the calculation process, boundary conditions need to be noted. When the sampling point is close to the beginning or end of the data sequence, there may not be enough m data points available. In this case, special processing methods can be adopted, such as using partial data for calculation or using padding values, etc., to ensure the accuracy of the calculation.

[0045] Specifically, in some possible embodiments, the steps of designing an FIR filter window function and filtering the digitized signal based on the FIR filter window function include: Obtain the unit impulse response function, and the unit impulse response function is: where H d (e jω ) is the frequency response function of the filter; Obtain the requirement information for the transition band and stop band, select the form of the transfer function, and estimate the window length N of the window function; Calculate the unit impulse response h(n) of the filter, where ω(n) is the selected window function, and the calculation method is as follows: h(n) = h d ω(n) Judge whether the filter index meets the preset requirements; If the filter index meets the preset requirements, the designed filter frequency response is:

[0046] Among them, the unit impulse response function is an important part of filter design and is closely related to the frequency response function of the filter. When designing an FIR filter, the unit impulse response function determines the response characteristics of the filter to different input signals. By analyzing and deriving the frequency response function of the filter, the unit impulse response function can be obtained. Specifically, according to the design requirements of the filter, such as passband, stopband characteristics, transition band width, etc., the expression of the frequency response function can be determined, and then the unit impulse response function can be obtained through methods such as inverse Fourier transform. For example, if the frequency response function of the filter is known as H d (e jω ), the unit impulse response function can be obtained through inverse Fourier transform

[0047] First, analyze the interference signals and useful signals in the dynamic weighing environment. By methods such as spectral analysis, the frequency range, intensity and other characteristics of the interference signals and useful signals can be determined. For example, use the fast Fourier transform (FFT) to convert the digital signal into the frequency domain and observe the distribution of the interference signals and useful signals in the frequency domain

[0048] According to the characteristics of the interference signals and useful signals, determine the transition band and stopband requirement information of the filter. The transition band refers to the transition region of the filter from the passband to the stopband, and the stopband refers to the frequency range where the interference signals need to be suppressed. For example, if the interference signals are mainly concentrated in a certain specific frequency range, this frequency range can be determined as the stopband, and the width of the transition band can be determined according to the needs

[0049] According to the transition band and stopband requirement information, select an appropriate transfer function form. Common transfer function forms of FIR filters include rectangular window, Hanning window, Hamming window, etc. Different transfer function forms have different frequency response characteristics and can be selected according to specific filtering requirements. For example, if a narrower transition band and higher stopband attenuation are required, a transfer function form with better performance such as the Hamming window can be selected

[0050] The window length N of the window function has an important impact on the performance of the filter. Generally speaking, a larger window length can provide better frequency selectivity and stopband attenuation, but at the same time, it will increase the computational complexity and delay. The window length N of the window function can be estimated by the following method: determined according to the frequency resolution requirement: The frequency resolution refers to the minimum frequency interval that the filter can distinguish. The window length N can be determined according to the required frequency resolution and the sampling frequency. For example, if the required frequency resolution is △f and the sampling frequency is f s , then the window length N = f s / △f

[0051] Determine the corresponding window function according to the previously selected transfer function form. For example, if the Hanning window is selected as the transfer function form, the corresponding window function is where N is the window length. According to the unit sample response function and the selected window function ω(n), calculate the unit sample response h(n) of the filter = h d ω(n). The specific calculation method can be derived and calculated according to the expression of the unit sample response function and the form of the window function.

[0052] According to the requirements of the dynamic weighing system, determine the preset requirements of the filter. These requirements can include indicators such as passband gain, passband ripple, stopband attenuation, transition band width, etc. For example, it can be required that the passband gain fluctuates within a certain range, the stopband attenuation reaches a certain decibel number, and the transition band width does not exceed a certain value, etc. According to the design parameters and unit sample response of the filter, calculate the various indicators of the filter. For example, the passband gain, passband ripple, stopband attenuation, transition band width, etc. can be calculated by analyzing the frequency response function of the filter. The specific calculation method can be derived and calculated according to the theory and formulas of the filter. Compare the calculated filter indicators with the preset requirements to determine whether the filter meets the preset requirements. If all the indicators of the filter are within the range of the preset requirements, it is considered that the filter indicators meet the requirements; otherwise, the design parameters of the filter need to be adjusted and redesigned and recalculated until the requirements are met.

[0053] If the filter indicators meet the preset requirements, the frequency response of the filter can be designed according to the unit sample response and design parameters of the filter. The frequency response of the filter can be obtained by performing a Fourier transform on the unit sample response. The designed filter frequency response can be used to filter the digital signal to obtain the filtered signal.

[0054] Specifically, in some possible embodiments, the steps of obtaining the requirement information for the transition band and stop band and selecting the form of the transfer function include: Obtain and analyze the frequency characteristics of the interference signal and the useful signal; Determine the type of filter according to the frequency characteristics; Based on the type of the filter, obtain the first frequency range for the filter to transition from the passband to the stop band, and the second frequency range for the signal that the filter needs to suppress; Determine the form of the transfer function through the first frequency range and the second frequency range.

[0055] Among them, in a dynamic weighing environment, a suitable sensor is used to collect the weight signal of the item to be measured, and the collected signal is preprocessed. The preprocessing can include operations such as removing the DC component and filtering to improve the quality and reliability of the signal. The preprocessed signal is subjected to spectral analysis to obtain the frequency characteristics of the interference signal and the useful signal. Spectral analysis can use algorithms such as the Fast Fourier Transform (FFT) to convert the time-domain signal into a frequency-domain signal, thereby obtaining the frequency distribution of the signal. The frequency characteristics of the interference signal and the useful signal, including information such as the frequency range, amplitude, and phase, are extracted from the spectral analysis results. These frequency characteristics will provide a basis for determining the filter type and parameters in the subsequent steps.

[0056] Common filter types include low-pass filters, high-pass filters, band-pass filters, and band-stop filters, etc. A low-pass filter allows low-frequency signals to pass through while suppressing high-frequency signals; a high-pass filter, on the contrary, allows high-frequency signals to pass through while suppressing low-frequency signals; a band-pass filter allows signals within a specific frequency range to pass through while suppressing signals of other frequencies; a band-stop filter blocks signals within a specific frequency range from passing through. According to the frequency characteristics of the interference signal and the useful signal, a suitable filter type is selected. If the interference signal is mainly concentrated in the high-frequency band and the useful signal is in the low-frequency band, a low-pass filter can be selected; if the interference signal is mainly concentrated in the low-frequency band and the useful signal is in the high-frequency band, a high-pass filter can be selected; if the useful signal is within a specific frequency range and the interference signal is in other frequency ranges, a band-pass filter or a band-stop filter can be selected.

[0057] According to the filter type, the definitions of the passband and the stopband are determined. The passband refers to the frequency range that the filter allows to pass through, and the stopband refers to the frequency range that the filter suppresses. For example, for a low-pass filter, the passband refers to the range of frequencies below a certain cut-off frequency, and the stopband refers to the range of frequencies above the cut-off frequency. According to the filter type and design requirements, the first frequency range for the filter to transition from the passband to the stopband is determined. This frequency range is usually called the transition band, which is the transition region between the passband and the stopband. The width of the transition band determines the frequency selectivity of the filter. The narrower the transition band, the better the frequency selectivity of the filter. According to the frequency characteristics of the interference signal, the second frequency range in which the filter needs to suppress the signal is determined. This frequency range usually corresponds to the frequency range of the interference signal. The design goal of the filter is to suppress the interference signal as much as possible within this frequency range while maintaining the integrity of the useful signal.

[0058] Common transfer function forms include rectangular window, Hanning window, Hamming window, etc. Different transfer function forms have different frequency response characteristics and can be selected according to specific filtering requirements. Based on the first frequency range (transition band) and the second frequency range (the range where signals need to be suppressed), an appropriate transfer function form is selected. Generally speaking, if a narrower transition band and higher stopband attenuation are required, a transfer function form with better performance, such as Hamming window, can be selected; if the requirements for the transition band width and stopband attenuation are not high, a simple transfer function form, such as rectangular window, can be selected. According to specific filtering requirements, the parameters of the selected transfer function form are adjusted. For example, for the Hamming window, parameters such as the length and coefficient of the window function can be adjusted to meet different transition band width and stopband attenuation requirements. Parameter adjustment can be carried out through methods such as experiments or theoretical analysis to find the optimal combination of transfer function parameters.

[0059] Specifically, in some possible embodiments, the steps for estimating the window length N of the window function include: Determine the required frequency resolution according to the discrimination accuracy requirements of the dynamic weighing system for different frequency signals; Based on the transition band characteristic requirements, determine the smooth transition demand information from the passband to the stopband; Based on the stopband attenuation requirements, determine the window length required to suppress specific frequency interference signals; By analyzing the passband ripple requirements, determine that the selection of the window length N will not cause excessive fluctuations in the passband signal, thus affecting the accuracy of the weight signal; Use the frequency resolution formula to combine the required frequency resolution and the fixed frequency to preliminarily calculate the range of the window length N; Simulate or actually test filters with different window lengths to obtain frequency response characteristic indexes including passband gain, stopband attenuation, and transition band width; Adjust the window length N according to the test results until the performance requirements of the dynamic weighing system are met, including requirements in aspects such as passband ripple, stopband attenuation, and transition band width; Analyze the influence of different window lengths N on the computational complexity; Combined with the real-time requirements of the dynamic weighing system, ensure that the selected window length N will not cause excessive computational delay, thus affecting the response speed of the system; On the premise of meeting the frequency characteristics and filter performance requirements, select the smallest window length N to reduce the computational complexity and improve the real-time performance of the system.

[0060] First of all, it is necessary to clarify the requirements for the dynamic weighing system to distinguish different frequency signals in different application scenarios. For example, in some high-precision weighing scenarios, it may be necessary to accurately distinguish the frequency signals corresponding to small weight changes; in some scenarios with relatively low accuracy requirements, the accuracy requirements for frequency distinction can be appropriately reduced. Understand the meaning of frequency resolution, that is, the minimum frequency interval between two adjacent frequency components that can be distinguished. The higher the frequency resolution, the stronger the system's ability to distinguish signals of different frequencies. Calculate the required frequency resolution based on the accuracy requirements and parameters such as the system's sampling frequency. For example, if the system's sampling frequency is f s , the minimum frequency interval that can be distinguished is △f, then the required frequency resolution can be obtained by the formula △f=f s / N, where N is the window length. By adjusting the value of N, different frequency resolution requirements can be met.

[0061] The transition band is the transition area from the passband to the stopband of the filter, and its characteristics include the width of the transition band and the smoothness of the transition. The narrower the transition band width, the better the frequency selectivity of the filter, but it may increase the computational complexity; the smoothness of the transition affects the signal processing effect of the filter, and a too steep transition may cause signal distortion. According to the actual application requirements of the dynamic weighing system, determine the smooth transition requirement information from the passband to the stopband. For example, if the system has high requirements for signal smoothness, the transition band can be relatively wide and the transition can be smooth; if the system has high requirements for frequency selectivity, the transition band width can be appropriately reduced, but care should be taken to avoid a too steep transition. Quantify the requirements for transition band characteristics by setting specific indicators, such as the maximum value of the transition band width, the slope limit of the transition, etc. These indicators will serve as an important basis for the subsequent determination of the window length N.

[0062] Analyze the interference signals that may exist in the dynamic weighing system to determine their characteristics such as frequency range and strength. Understanding the characteristics of the interference signal helps determine the stopband attenuation requirements of the filter to effectively suppress the interference signal. Determine the attenuation requirements of the filter in the stopband based on the strength of the interference signal and the system's requirements for interference suppression. For example, if the interference signal is strong, a higher stopband attenuation may be required to effectively suppress the interference; if the system has a high tolerance for interference, the stopband attenuation requirements can be appropriately reduced. Based on the stopband attenuation requirements and the selected filter type, calculate the window length required to suppress interference signals of a specific frequency through theoretical analysis or empirical formulas. Different filter types and stopband attenuation requirements correspond to different window length calculation methods. For example, some common filter design formulas can be used to estimate the required window length.

[0063] Passband ripple refers to the variation of the signal amplitude within the passband of the filter. If the passband ripple is too large, it may affect the accuracy of the weight signal, resulting in errors in the weighing results. According to the requirements of the dynamic weighing system for the accuracy of the weight signal, the allowable range of the passband ripple is determined. For example, the maximum value of the passband ripple can be set as a certain percentage of the signal amplitude, or an absolute amplitude value can be set as the limit of the passband ripple. Through theoretical analysis or experimental testing, the influence of different window lengths N on the passband ripple is studied. Generally speaking, the larger the window length, the smaller the passband ripple may be, but at the same time, it will also increase the computational complexity and delay. Therefore, a suitable window length needs to be found that can meet the requirements of the passband ripple without overly increasing the computational burden.

[0064] Use the previously determined frequency resolution formula △f = f s / N, where f s is the fixed sampling frequency of the system, and △f is the required frequency resolution. By substituting the known sampling frequency and the required frequency resolution, a preliminary calculation formula for the window length N can be obtained. According to different accuracy requirements and frequency resolutions, multiple possible window length values can be calculated to determine the preliminary range of the window length N. For example, a minimum acceptable frequency resolution can be determined first, and the corresponding lower limit of the window length can be calculated; then a maximum acceptable frequency resolution can be determined, and the corresponding upper limit of the window length can be calculated to obtain the preliminary range of the window length N.

[0065] Build an analog or actual dynamic weighing test environment, including sensors, signal acquisition devices, and filters, etc. Ensure that the test environment can accurately simulate the actual application scenario to obtain reliable test results. Within the preliminary determined window length range, select multiple different window length values for testing. The window length can be selected according to a certain step size or specific values to comprehensively understand the influence of different window lengths on the filter performance. Test filters with different window lengths to obtain frequency response characteristic indexes such as passband gain, stopband attenuation, and transition band width. Devices such as spectrum analyzers can be used to measure the frequency response of the filter, or these indexes can be obtained through software simulation. Record the frequency response characteristic indexes corresponding to each window length for subsequent analysis and comparison.

[0066] Analyze the test results for different window lengths, and compare the gaps between indicators such as passband gain, stopband attenuation, transition band width, and passband ripple and the system performance requirements. Determine which indicators do not meet the requirements and how to adjust the window length to improve these indicators. According to the analysis of the test results, gradually adjust the window length N. An iterative approach can be adopted, adjusting a small step size each time and then retesting until all performance indicators meet the system requirements. During the adjustment process, comprehensively consider the mutual influence between different indicators to avoid sacrificing other indicators to meet one indicator. After finding a window length N that meets all the system performance requirements, conduct a final verification test. Ensure that in the actual application scenario, the filter at this window length can work stably and reliably and can meet the requirements for weight signal processing in the dynamic weighing system.

[0067] Understand the meaning of computational complexity, that is, the time and resources required to execute the filter calculations. Computational complexity is usually related to the window length N. The larger the window length, the higher the computational complexity may be. Study the specific influencing factors of different window lengths N on computational complexity, including the number of multiplication and addition operations, storage requirements, etc. For example, for a FIR filter, the window length N determines the number of filter coefficients, thus affecting the computational complexity. Consider the impact of computational complexity on the real-time performance and resource occupancy of the dynamic weighing system. If the computational complexity is too high, it may lead to a slower system response speed, affecting the real-time performance of weighing; at the same time, it may also occupy too much computational resources, affecting the stability and reliability of the system.

[0068] Clarify the real-time requirements of the dynamic weighing system, that is, the time limit from collecting the weight signal to outputting the filtered result. Different application scenarios may have different real-time requirements. For example, in the weighing application on a high-speed production line, a fast response speed is required to ensure production efficiency. Study the relationship between the window length N and the computational delay. Generally speaking, the larger the window length, the longer the calculation time of the filter may be, resulting in an increase in computational delay. By analyzing this relationship, a maximum acceptable window length can be determined to meet the real-time requirements of the system. If the window length N is large and causes too long a computational delay, consider optimizing the calculation method to improve the computational efficiency of the filter. For example, fast algorithms, parallel computing and other technologies can be adopted to reduce the calculation time; or the filter can be simplified in design, sacrificing performance to a certain extent in exchange for a faster calculation speed.

[0069] When determining the window length N, it is necessary to comprehensively consider various requirements such as frequency characteristics, filter performance, computational complexity, and real-time performance. Ensure that the selected window length can meet the system's requirements for frequency selectivity, stopband attenuation, passband ripple, etc., and will not lead to excessive computational complexity and long computational delays. On the premise of meeting all requirements, select the smallest window length N. This can minimize the computational complexity, improve the real-time performance of the system, and at the same time reduce the storage requirements and the occupation of computational resources. Conduct a final verification test on the selected minimum window length to ensure that it can work stably and reliably in practical applications and meet the performance requirements of the dynamic weighing system. If problems are found in practical applications, further adjustments and optimizations can be made as needed.

[0070] Specifically, in some possible embodiments, the steps of determining whether the filter index meets the preset requirements include: calculating the gain values at each frequency point in the passband. If the gain values are within the preset passband gain index and deviation range, the filter index meets the preset requirements; Calculating the difference between the maximum and minimum gain values in the passband. If the difference is less than or equal to the preset passband ripple index, the filter index meets the preset requirements; Calculating the frequency response amplitude values at each frequency point in the stopband. If the frequency response amplitude value at a certain frequency point in the stopband is less than or equal to the preset stopband attenuation index, the filter index meets the preset requirements; Determining the edge frequencies of the passband and the stopband, calculating the transition band width. If the transition band width is less than or equal to the preset transition band width index, the filter index meets the preset requirements.

[0071] Among them, according to the design requirements of the filter, the frequency range of the passband is clarified. For example, for a low-pass filter, the passband may be from 0 Hz to a certain cut-off frequency f c . Within the passband frequency range, a series of uniformly distributed frequency points are generated. The number of frequency points can be determined according to the required accuracy and computational resources. For example, a frequency point can be selected every certain frequency interval, such as starting from 0 Hz, selecting a frequency point every 1 Hz until the cut-off frequency f c . For each frequency point, calculate the gain value of the filter at that frequency point. The gain value can be calculated by substituting the frequency point into the frequency response function of the filter. Compare the calculated gain value of each frequency point with the preset passband gain index and deviation range. If the gain values of all frequency points are within the preset passband gain index and deviation range, it is considered that the gain of the filter in the passband meets the requirements.

[0072] Based on calculating the gain values at each frequency point within the passband, determine the maximum and minimum gains within the passband. The maximum and minimum values can be found by traversing the gain values of all passband frequency points. Calculate the difference between the maximum and minimum gains within the passband. Compare the calculated difference with a preset passband ripple index. If the difference is less than or equal to the preset passband ripple index, it is considered that the ripple of the filter within the passband meets the requirements.

[0073] According to the design requirements of the filter, clarify the frequency range of the stopband. For example, for a low-pass filter, the stopband may be from the cut-off frequency f c to infinite frequency. Within the stopband frequency range, generate a series of uniformly distributed frequency points. The number of frequency points can be determined according to the required accuracy and computing resources. For each frequency point, calculate the magnitude value of the frequency response of the filter at that frequency point. The magnitude value of the frequency response can be calculated by substituting the frequency point into the frequency response function of the filter and then taking the absolute value. Compare the calculated magnitude value of the frequency response at each frequency point with a preset stopband attenuation index. If the magnitude value of the frequency response at a certain frequency point within the stopband is less than or equal to the preset stopband attenuation index, it is considered that the attenuation of the filter within the stopband meets the requirements.

[0074] According to the design requirements of the filter, determine the edge frequencies of the passband and the stopband. For a low-pass filter, the passband edge frequency is usually the cut-off frequency f c , and the stopband edge frequency can be determined according to the requirements of stopband attenuation. The transition band width is the difference between the passband edge frequency and the stopband edge frequency. Compare the calculated transition band width with a preset transition band width index. If the transition band width is less than or equal to the preset transition band width index, it is considered that the transition band of the filter meets the requirements.

[0075] Specifically, in some possible embodiments, the method further includes: Use the obtained smoothed segment data for subsequent weight calculation, item classification, or quality monitoring operations of the dynamic weighing system; adjust and optimize the system parameters according to the actual situation during the filtering process and the final data processing results.

[0076] Among them, the obtained smoothed segment data is used in operations such as subsequent weight calculation, item classification, or quality monitoring of the dynamic weighing system.

[0077] Before performing weight calculation, calibrate the data in the smooth segment. This can be done by comparing with a known standard weight or using a calibration coefficient to adjust the data to ensure the accuracy of weight calculation. Select an appropriate weight calculation algorithm according to specific application requirements and data characteristics. For example, the average method, median method, weighted average method, etc. can be used to process the data in the smooth segment to obtain the final weight value. Conduct error analysis on the weight calculation result to evaluate its accuracy and reliability. The error distribution can be analyzed by comparing with the actual weight or using statistical methods to determine whether further adjustment of the algorithm or parameters is needed.

[0078] During the process of item classification, extract the features related to item classification from the data in the smooth segment. These features can include physical features such as weight, size, shape, etc., and can also include dynamic features such as the frequency characteristics and fluctuation conditions of the signal. Select an appropriate classification algorithm and classify the items according to the extracted features. Common classification algorithms include decision trees, support vector machines, neural networks, etc. The classification accuracy can be improved by training the classification model using the data of items with known categories for learning. Verify the classification result to ensure its accuracy and reliability. The classification result can be verified by manual inspection, comparison with other classification methods, or using the feedback information in the actual application scenario.

[0079] During the process of item quality monitoring, set corresponding quality indicators according to specific product quality requirements. These indicators can include weight range, dimensional tolerance, surface quality, etc. Use the data in the smooth segment to monitor the product quality in real time. Quality problems can be detected in a timely manner by comparing with the set quality indicators, and corresponding measures can be taken for treatment. Analyze the quality monitoring data to understand the changing trends and patterns of product quality. Potential quality problems can be discovered by statistical analysis, trend analysis, etc., and preventive measures can be taken to improve the stability and reliability of product quality.

[0080] Among them, adjust and optimize the system parameters according to the actual situation in the filtering process and the final data processing result. Analyze the data in the smooth segment after filtering to evaluate the filtering effect. The filtering effect can be judged by observing indicators such as the fluctuation situation of the data, the noise level, and the clarity of the signal. Check the performance indicators of the dynamic weighing system, such as measurement accuracy, response speed, stability, etc. These indicators can be determined through actual tests or comparison with standard equipment. Determine the system parameters that need to be adjusted and their adjustment directions according to the evaluation results of the filtering effect and system performance. For example, if the filtering effect is not ideal, consider adjusting the parameters of the filter, such as the window length, cut-off frequency, etc.; if the system performance does not meet the requirements, consider adjusting the sampling frequency, data processing algorithm, etc.

[0081] Adjust the direction according to the determined parameters and manually adjust the system parameters. The system parameters can be adjusted by modifying the system configuration file, adjusting the hardware settings, or using the software interface. During the adjustment process, it is necessary to gradually try different parameter values and observe their effects on the filtering effect and system performance to find the optimal parameter combination. Alternatively, for some complex systems, an automatic adjustment algorithm can be considered to optimize the system parameters. These algorithms can automatically search for the optimal parameter combination according to the preset objective function and constraint conditions. For example, optimization algorithms such as genetic algorithms and simulated annealing algorithms can be used to automatically adjust the system parameters.

[0082] After adjusting the system parameters, retest to verify the effect of the parameter adjustment. The same methods as those for parameter evaluation can be used to re-evaluate the filtering effect and system performance to ensure that the adjusted parameters can meet the requirements of practical applications. According to the test results, continue to adjust and optimize the system parameters until the best filtering effect and system performance are achieved. In practical applications, the system parameters can also be adjusted and optimized regularly according to the changing environment and requirements to maintain the stability and reliability of the system.

[0083] Another embodiment of the present application provides a dynamic weighing digital filtering system. Among them, refer to Figure 2 A dynamic weighing digital filtering system includes: Digital signal generation module 100: In a dynamic weighing environment, continuously sample the weight value of the item to be measured at a fixed frequency to generate an analog signal sequence, and perform digitalization operations on each analog signal in the analog signal sequence to obtain digital signals; Moving average data acquisition module 200: Perform n (n>1) times of moving average processing on the digital signal to obtain moving average data; Filtering processing module 300: Design an FIR filter window function and perform filtering processing on the digital signal based on the FIR filter window function; Smoothing segment data acquisition module 400: Obtain smoothing segment data according to the data curves after the moving average processing and the filtering processing.

[0084] The dynamic weighing digital filtering system provided in this embodiment can implement the steps of the foregoing embodiment due to the functions of its respective modules and the logical connections between them, and thus can achieve the same technical effects as the foregoing embodiment. For the principle analysis, refer to the relevant descriptions of the steps of the foregoing dynamic weighing digital filtering method, which will not be repeated here.

[0085] An embodiment of the present application further provides a dynamic weighing digital filtering device, including a memory and a processor. A computer program capable of being loaded and executed by the processor for the above-mentioned dynamic weighing digital filtering method is stored on the memory.

[0086] An embodiment of the present application further provides a storage medium, in which a computer program capable of being loaded and executed by the processor for the above-mentioned dynamic weighing digital filtering method is stored.

[0087] Since the computer program in the storage medium provided in this embodiment, after being loaded and run on the processor, will implement the steps of the foregoing embodiments, it can achieve the same technical effects as the foregoing embodiments. For the principle analysis, reference can be made to the relevant descriptions of the method steps in the foregoing, and details will not be repeated here.

[0088] The storage medium includes, for example: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.

[0089] The steps of the method or algorithm described in combination with the embodiments disclosed in this article can be implemented directly by hardware, software modules executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.

[0090] In the description of this specification, the description referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0091] In addition, the features defined by terms "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. It is only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features.

[0092] Accordingly, any process or method description in a flowchart or described otherwise herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logical function or process. Moreover, the scope of the preferred embodiments of the present invention includes additional implementations, where functions may be executed in a substantially simultaneous manner or in a reverse order according to the involved functions, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0093] The embodiments of this specific implementation manner are all preferred embodiments of this application, and do not limit the protection scope of this application accordingly. Therefore, all equivalent changes made according to the structure, shape, and principle of this application shall be covered within the protection scope of this application.

Claims

1. A dynamic weighing digital filtering method, characterized in that: include: In a dynamic weighing environment, the weight value of the object to be measured is continuously sampled at a fixed frequency to generate an analog signal sequence, and each analog signal in the analog signal sequence is digitized to obtain a digitized signal; Performing n (n>1) sliding average processing on the digitized signal to obtain sliding average data; Designing an FIR filter window function, and performing filtering processing on the digitized signal based on the FIR filter window function; According to the data curve after the sliding average processing and the filtering processing, smooth segment data is obtained.

2. A dynamic weighing digital filtering method according to claim 1, characterized in that: The step of performing n (n>1) sliding average processing on the digitized signal comprises: In a dynamic weighing environment, obtaining an interference frequency of an interference signal generated by measuring the weight of the object to be measured; Based on the interference frequency, determine the size m of the sliding window, where the sliding window is a data range for performing sliding average processing; defining the digitized signal and the sliding average data; The digitized signal is {D0(k), D0(k+1), ..., D0(k+m-2), D0(k+m-1)}, where D0(k) represents the signal value initially collected and digitized at the kth sampling point position, k is the sampling point index, k starts from a certain initial value and increases in sequence according to a fixed sampling frequency, and m is the sliding window size, which determines the number of signal points participating in each sliding average calculation; The sliding average data is {D n (k),D n (k+1), ..., D n (k+m-2), D n (k+m-1)}, where D n (k) represents the data value obtained after n sliding average processing at the kth sampling point when the number of processing times is n. As n increases, the data will gradually become smoother, reducing the influence of noise and interference; When the number of processing times is n, the data value obtained after n times of sliding average processing at the kth sampling point is calculated. The calculation process is as follows: Among them, n represents the number of processing times, k is the sampling point index, and j is a variable ranging from 0 to m.

3. A dynamic weighing digital filtering method according to claim 1, characterized in that: Designing an FIR filter window function, and filtering the digitized signal based on the FIR filter window function comprises: Obtain a unit sampling response function, the unit sampling response function is: Among them, H d (e jω ) is the frequency response function of the filter; Obtain the required information on the transition band and stop band, select the form of the transfer function, and estimate the window length N of the window function; Calculate the unit sample response of the filter h(n), where ω(n) is the selected window function, as follows: h(n)=h d ω(n) Determine whether the filter index meets the preset requirements; If the filter index meets the preset requirements, the designed filter frequency is:

4. A dynamic weighing digital filtering method according to claim 3, characterized in that: The steps to obtain the required information for the transition band and stop band and select the form of the transfer function include: Acquire and analyze the frequency characteristics of interference signals and useful signals; Determining the type of filter according to the frequency characteristics; Based on the type of the filter, obtaining a first frequency range in which the filter transitions from a passband to a stopband, and a second frequency range in which the filter needs to suppress a signal; The transfer function form is determined by the first frequency range and the second frequency range.

5. A dynamic weighing digital filtering method according to claim 4, characterized in that: The steps of estimating the window length N of the window function include: Determine the required frequency resolution based on the dynamic weighing system's requirements for different frequency signals' discrimination accuracy; According to the requirements of transition band characteristics, determine the smooth transition requirement information from passband to stopband; Based on the stopband attenuation requirements, determine the window length required to suppress interference signals at specific frequencies; By analyzing the passband fluctuation requirements, it is determined that the selection of the window length N will not cause excessive fluctuation of the passband signal and thus affect the accuracy of the weight signal; The range of the window length N is preliminarily calculated by using a frequency resolution formula in combination with the required frequency resolution and the fixed frequency; filters with different window lengths are simulated or actually tested to obtain frequency response characteristic indicators including passband gain, stopband attenuation and transition band width; Adjust the window length N according to the test results until the performance requirements of the dynamic weighing system are met, including requirements on passband fluctuation, stopband attenuation, and transition band width. Analyze the impact of different window lengths N on computational complexity; Combined with the real-time requirements of the dynamic weighing system, ensure that the selected window length N does not cause excessive calculation delays and thus affect the system's response speed; Under the premise of meeting the frequency characteristics and filter performance requirements, the minimum window length N is selected to reduce the computational complexity and improve the real-time performance of the system.

6. A dynamic weighing digital filtering method according to claim 3, characterized in that: The steps of judging whether the filter index meets the preset requirements include: Calculate the gain value of each frequency point in the passband. If the gain value is within the preset passband gain index and deviation range, the filter index meets the preset requirements. Calculate the difference between the maximum and minimum gain in the passband. If the difference is less than or equal to a preset passband fluctuation index, the filter index meets the preset requirements. Calculate the frequency response amplitude value of each frequency point in the stop band. If the frequency response amplitude value of a certain frequency point in the stop band is less than or equal to the preset stop band attenuation index, the filter index meets the preset requirements. The edge frequencies of the passband and the stopband are determined, and the transition band width is calculated. If the transition band width is less than or equal to a preset transition band width index, the filter index meets the preset requirements.

7. A dynamic weighing digital filtering method according to claim 1, characterized in that: The method further comprises: The obtained smooth segment data is used for subsequent weight calculation, item classification or quality monitoring operations of the dynamic weighing system; According to the actual situation during the filtering process and the final data processing results, the system parameters are adjusted and optimized.

8. A dynamic weighing digital filtering system, characterized in that: include: Digital signal generation module: in a dynamic weighing environment, continuously samples the weight value of the object to be measured at a fixed frequency to generate an analog signal sequence, and performs a digital operation on each analog signal in the analog signal sequence to obtain a digital signal; Sliding average data acquisition module: performs n (n>1) sliding average processing on the digitized signal to obtain sliding average data; Filter processing module: designing an FIR filter window function, and performing filtering processing on the digitized signal based on the FIR filter window function; Smooth segment data acquisition module: acquires smooth segment data according to the data curve after the sliding average processing and the filtering processing.

9. A dynamic weighing digital filtering device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute any one of the dynamic weighing digital filtering methods of claims 1-7.

10. A storage medium, characterized in that: The computer program is stored which can be loaded by a processor and executes any one of the dynamic weighing digital filtering methods according to claims 1-7.