Dynamic filtering weighing method of filling machine and storage medium
By dynamically adjusting the vibration rate of the vibration plate and the cutoff frequency of the low-pass filter in the tea filling machine, the problem of weight fluctuations in the tea filling machine at different blanking stages is solved, and the filling accuracy is improved.
Patent Information
- Application Number
- CN202411346933.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-17
AI Technical Summary
The weight fluctuation problem of tea filling machines in the fast and slow blanking stages, especially in low-performance MCU environments, existing filtering methods are difficult to adapt to changes in different jitter frequencies, resulting in a decrease in filling accuracy.
The dynamic filter weighing method is used to control the vibration rate of the vibration disk and the cutoff frequency of the low-pass filter, and the filter parameters are switched in the coarse and fine scale stages respectively to adapt to the jitter frequency changes at different stages and ensure filling accuracy.
In the rough weight stage, quickly respond to large weight changes, and achieve precise fine adjustments in the fine weight stage to ensure the accuracy and stability of the final filling weight.
Smart Images

Figure CN119142583A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of automatic control technology, and in particular to a dynamic filtering weighing method and a storage medium for a filling machine. Background Art
[0002] At present, tea filling machines generally face the problem of weight fluctuation in the fast and slow feeding stages during the weighing process. Especially when using low-performance MCUs with limited computing power, it becomes more challenging to accurately control the tea filling amount. At present, the fast and slow feeding stages of tea filling are generally achieved by designing different jitter frequencies, but the existing filtering methods are often difficult to adapt to the jitter frequency changes in different stages, resulting in a decrease in filling accuracy. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a dynamic filtering weighing method and a storage medium for a filling machine to improve the filling accuracy.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0005] A dynamic filtering weighing method for a filling machine comprises the following steps:
[0006] S1, controlling the vibration plate to vibrate at a first rate so that the tea leaves fall into the weighing plate;
[0007] S2, continuously collect the weight data of the scale sensor and perform low-pass filtering;
[0008] The cut-off frequency of the low-pass filter is a preset first frequency;
[0009] S3, continuously calculating the weight difference between the weight data after filtering and the target weight, and when the weight difference is less than the rough weighing threshold, adjusting the vibration plate to vibrate at a second rate, and adjusting the cutoff frequency of the low-pass filter to a preset second frequency, wherein the second frequency is less than the first frequency;
[0010] S4. When the weight difference is less than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
[0011] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0012] A storage medium having a computer program stored thereon, wherein when the computer program is executed, the following steps are implemented:
[0013] S1, controlling the vibration plate to vibrate at a first rate so that the tea leaves fall into the weighing plate;
[0014] S2, continuously collect the weight data of the scale sensor and perform low-pass filtering;
[0015] The cut-off frequency of the low-pass filter is a preset first frequency;
[0016] S3, continuously calculating the weight difference between the weight data after filtering and the target weight, and when the weight difference is less than the rough weighing threshold, adjusting the vibration plate to vibrate at a second rate, and adjusting the cutoff frequency of the low-pass filter to a preset second frequency, wherein the second frequency is less than the first frequency;
[0017] S4. When the weight difference is less than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
[0018] The beneficial effects of the present invention are as follows: a dynamic filtering weighing method and storage medium for a filling machine of the present invention adopts a low-pass filter to set a higher cut-off frequency in the rough weighing stage to quickly respond to large weight changes, and switches the filter to a lower cut-off frequency in the fine weighing stage to adapt to precise fine-tuning, and can adapt to changes in jitter frequency at different stages, thereby ensuring the accuracy of the final filling weight. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of a dynamic filtering weighing method of a filling machine according to an embodiment of the present invention;
[0020] Figure 2 This is a specific flow chart of a dynamic filtering weighing method for a filling machine according to an embodiment of the present invention;
[0021] Figure 3 This is an example diagram of a filling machine using a dynamic filtering weighing method for a filling machine according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0023] Please refer to Figures 1 to 3 , a dynamic filtering weighing method for a filling machine, comprising the steps of:
[0024] S1, controlling the vibration plate to vibrate at a first rate so that the tea leaves fall into the weighing plate;
[0025] S2, continuously collect the weight data of the scale sensor and perform low-pass filtering;
[0026] The cut-off frequency of the low-pass filter is a preset first frequency;
[0027] S3, continuously calculating the weight difference between the weight data after filtering and the target weight, and when the weight difference is less than the rough weighing threshold, adjusting the vibration plate to vibrate at a second rate, and adjusting the cutoff frequency of the low-pass filter to a preset second frequency, wherein the second frequency is less than the first frequency;
[0028] S4. When the weight difference is less than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
[0029] From the above description, it can be seen that the beneficial effects of the present invention are: a dynamic filtering weighing method and storage medium of a filling machine of the present invention adopts a low-pass filter to set a higher cutoff frequency in the rough weighing stage to quickly respond to large weight changes, and switches the filter to a lower cutoff frequency in the fine weighing stage to adapt to precise fine-tuning, and can adapt to the changes in jitter frequency at different stages, thereby ensuring the accuracy of the final filling weight.
[0030] Furthermore, step S3 also includes the steps of:
[0031] S31. Adjust the vibration amplitude of the vibration plate according to the weight difference, wherein the vibration amplitude is negatively correlated with the weight difference.
[0032] From the above description, it can be seen that the vibration amplitude of the vibration plate is fine-tuned according to the filtered weight signal, so as to finely control the falling speed and weight of the tea leaves.
[0033] Furthermore, step S4 is specifically as follows:
[0034] If the weight difference for a preset number of consecutive times is smaller than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
[0035] As can be seen from the above description, by judging the weight difference for a preset number of times continuously, it is ensured that the deviation between the weight of the tea leaves and the target weight is within a predetermined range, thereby further ensuring the accuracy.
[0036] Furthermore, the weight data is collected and obtained in the form of ADC sampling values;
[0037] The low-pass filtering process specifically performs low-pass filtering on the ADC sampling values.
[0038] From the above description, we can know that the weight value is reflected in the form of ADC sampling value, which directly reflects the voltage value of the measured physical quantity, and the voltage value is the basis for calculating the weight value. Through filtering and fine-tuning processing, the measurement accuracy and stability can be improved, making the final weight value more accurate.
[0039] Furthermore, the first frequency is 5 Hz, and the second frequency is 2 Hz.
[0040] It can be seen from the above description that the first frequency is 5 Hz and the second frequency is 2 Hz, as a specific embodiment of the present invention.
[0041] A storage medium having a computer program stored thereon, wherein when the computer program is executed, the following steps are implemented:
[0042] S1, controlling the vibration plate to vibrate at a first rate so that the tea leaves fall into the weighing plate;
[0043] S2, continuously collect the weight data of the scale sensor and perform low-pass filtering;
[0044] The cut-off frequency of the low-pass filter is a preset first frequency;
[0045] S3, continuously calculating the weight difference between the weight data after filtering and the target weight, and when the weight difference is less than the rough weighing threshold, adjusting the vibration plate to vibrate at a second rate, and adjusting the cutoff frequency of the low-pass filter to a preset second frequency, wherein the second frequency is less than the first frequency;
[0046] S4. When the weight difference is less than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
[0047] From the above description, it can be seen that the beneficial effects of the present invention are: a dynamic filtering weighing method and storage medium of a filling machine of the present invention adopts a low-pass filter to set a higher cutoff frequency in the rough weighing stage to quickly respond to large weight changes, and switches the filter to a lower cutoff frequency in the fine weighing stage to adapt to precise fine-tuning, and can adapt to the changes in jitter frequency at different stages, thereby ensuring the accuracy of the final filling weight.
[0048] Furthermore, step S3 also includes the steps of:
[0049] S31. Adjust the vibration amplitude of the vibration plate according to the weight difference, wherein the vibration amplitude is negatively correlated with the weight difference.
[0050] From the above description, it can be seen that the vibration amplitude of the vibration plate is fine-tuned according to the filtered weight signal, so as to finely control the falling speed and weight of the tea leaves.
[0051] Furthermore, step S4 is specifically as follows:
[0052] If the weight difference for a preset number of consecutive times is smaller than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
[0053] As can be seen from the above description, by judging the weight difference for a preset number of times continuously, it is ensured that the deviation between the weight of the tea leaves and the target weight is within a predetermined range, thereby further ensuring the accuracy.
[0054] Furthermore, the weight data is collected and obtained in the form of ADC sampling values;
[0055] The low-pass filtering process specifically performs low-pass filtering on the ADC sampling values.
[0056] From the above description, we can know that the weight value is reflected in the form of ADC sampling value, which directly reflects the voltage value of the measured physical quantity, and the voltage value is the basis for calculating the weight value. Through filtering and fine-tuning processing, the measurement accuracy and stability can be improved, making the final weight value more accurate.
[0057] Furthermore, the first frequency is 5 Hz, and the second frequency is 2 Hz.
[0058] It can be seen from the above description that the first frequency is 5 Hz and the second frequency is 2 Hz, as a specific embodiment of the present invention.
[0059] The present invention discloses a dynamic filtering weighing method and storage medium for a filling machine, which are suitable for product filling weighing, such as tea filling weighing, and are particularly suitable for tea filling weighing of a tea filling machine with a low-performance MCU.
[0060] Please refer to Figures 1 to 3 , Embodiment 1 of the present invention is:
[0061] A dynamic filtering weighing method for a filling machine comprises the following steps:
[0062] In this embodiment, the target weight value is preset, and the threshold ranges for the rough weighing and the fine weighing are initialized.
[0063] S1. Control the vibration plate to vibrate at a first rate to make the tea leaves fall into the weighing plate.
[0064] In this embodiment, reference can be made to Figure 3 , control the vibration plate to vibrate quickly, so that the tea leaves fall quickly into the weighing plate. The first rate is based on actual needs to achieve a relatively fast vibration rate.
[0065] S2, continuously collect the weight data of the scale sensor and perform low-pass filtering;
[0066] The weight data is collected and obtained in the form of ADC sampling values;
[0067] The low-pass filtering process specifically performs low-pass filtering on the ADC sampling values.
[0068] In this embodiment, the data of the scale sensor, that is, the ADC sampling value thereof, is collected to monitor the change in the amount of tea in real time, and a low-pass filter is used for filtering.
[0069] The cut-off frequency of the low-pass filter is a preset first frequency. In this embodiment, the first frequency is 5 Hz. In other equivalent embodiments, the first frequency can be adjusted according to actual needs.
[0070] S3. Continuously calculate the weight difference between the weight data after filtering and the target weight. When the weight difference is less than the rough weighing threshold, adjust the vibration plate to vibrate at a second rate, and adjust the cutoff frequency of the low-pass filter to a preset second frequency, which is less than the first frequency.
[0071] In this embodiment, when the weight data is close to a certain range of the weight data, that is, the weight difference between the weight data and the target weight is less than the rough weighing threshold (in this embodiment, the rough weighing threshold is set to 5g, which can be adjusted according to actual needs in other equivalent embodiments), the fine weighing stage is entered. At this time, the cutoff frequency of the low-pass filter is adjusted to the second frequency, and the second frequency is less than the first frequency. In this embodiment, the second frequency is 2Hz, which can be adjusted according to actual needs in other equivalent embodiments.
[0072] In this embodiment, the ADC sampling value is V[ADC], the filtered value after stabilization in the first stage (rough weighing stage) is V[FILTER1], and the filtered value in the second stage (fine weighing stage) is V[FILTER2]. The second stage will implement the ADC sampling value V[ADC]-V[FILTER1] as the input value of the second stage filter, and the final weight value is V[FILTER1]+V[FILTER2], realizing precise fine-tuning.
[0073] Step S3 also includes the steps of:
[0074] S31. Adjust the vibration amplitude of the vibration plate according to the weight difference, wherein the vibration amplitude is negatively correlated with the weight difference.
[0075] In this embodiment, the vibration amplitude of the vibration plate is fine-tuned according to the filtered weight signal, and the falling speed and weight of the tea leaves are precisely controlled.
[0076] In this embodiment, the vibration amplitude of the vibration plate is a first amplitude in the rough weighing stage, and after entering the fine weighing stage, the vibration amplitude is adjusted to a second amplitude.
[0077] S4, when the weight difference is less than the fine weighing threshold, controlling the vibration plate to stop vibrating;
[0078] Step S4 is specifically as follows:
[0079] If the weight difference for a preset number of consecutive times is smaller than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
[0080] In this embodiment, when the measured values are stabilized within ±0.2g of the target weight for several consecutive times, the filling is terminated and the sealing process is started.
[0081] Embodiment 2 of the present invention is:
[0082] A storage medium stores a computer program thereon, and when the computer program is executed, the steps in the dynamic filtering weighing method of a filling machine in the above embodiment 1 are implemented.
[0083] In summary, the present invention provides a dynamic filtering weighing method and storage medium for a filling machine. In the rough weighing stage, a low-pass filter is used to set a higher cutoff frequency to quickly respond to large weight changes. In the fine weighing stage, the filter is switched to a lower cutoff frequency to adapt to precise fine-tuning. It can adapt to the changes in jitter frequency at different stages, thereby ensuring the accuracy of the final filling weight.
[0084] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A dynamic filtering weighing method for a filling machine, characterized in that: Includes steps: S1, controlling the vibration plate to vibrate at a first rate so that the tea leaves fall into the weighing plate; S2, continuously collect the weight data of the scale sensor and perform low-pass filtering; The cut-off frequency of the low-pass filter is a preset first frequency; S3, continuously calculating the weight difference between the weight data after filtering and the target weight, and when the weight difference is less than the rough weighing threshold, adjusting the vibration plate to vibrate at a second rate, and adjusting the cutoff frequency of the low-pass filter to a preset second frequency, wherein the second frequency is less than the first frequency; S4. When the weight difference is less than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
2. A dynamic filtering weighing method for a filling machine according to claim 1, characterized in that: Step S3 also includes the steps of: S31. Adjust the vibration amplitude of the vibration plate according to the weight difference, wherein the vibration amplitude is negatively correlated with the weight difference.
3. The dynamic filtering weighing method of a filling machine according to claim 1, characterized in that: Step S4 is specifically as follows: If the weight difference for a preset number of consecutive times is smaller than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
4. The dynamic filtering weighing method of a filling machine according to claim 1, characterized in that: The weight data is collected and obtained in the form of ADC sampling values; The low-pass filtering process specifically performs low-pass filtering on the ADC sampling values.
5. The dynamic filtering weighing method of a filling machine according to claim 1, characterized in that: The first frequency is 5 Hz, and the second frequency is 2 Hz.
6. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the following steps are implemented: S1, controlling the vibration plate to vibrate at a first rate so that the tea leaves fall into the weighing plate; S2, continuously collect the weight data of the scale sensor and perform low-pass filtering; The cut-off frequency of the low-pass filter is a preset first frequency; S3, continuously calculating the weight difference between the weight data after filtering and the target weight, and when the weight difference is less than the rough weighing threshold, adjusting the vibration plate to vibrate at a second rate, and adjusting the cutoff frequency of the low-pass filter to a preset second frequency, wherein the second frequency is less than the first frequency; S4. When the weight difference is less than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
7. A storage medium according to claim 6, characterized in that: Step S3 also includes the steps of: S31. Adjust the vibration amplitude of the vibration plate according to the weight difference, wherein the vibration amplitude is negatively correlated with the weight difference.
8. A storage medium according to claim 6, characterized in that: Step S4 is specifically as follows: If the weight difference for a preset number of consecutive times is smaller than the fine weighing threshold, the vibration plate is controlled to stop vibrating.
9. A storage medium according to claim 6, characterized in that: The weight data is collected and obtained in the form of ADC sampling values; The low-pass filtering process specifically performs low-pass filtering on the ADC sampling values.
10. A storage medium according to claim 6, characterized in that: The first frequency is 5 Hz, and the second frequency is 2 Hz.
Citation Information
Patent Citations
Method and device for gravimetric dosing bulk and flowable material
CN101501461A
Feeding control method and device for dry-mixed mortar production line and feeding system
CN103660036A
Control system and method for packing, filling and batching control
CN106292555A
Weighing detection method, device, system and equipment and storage medium
CN115683295A
Automatic weighing device feeding by vibrating
CN202379099U
