An online weighing method and system
Patent Information
- Application Number
- CN202311681447.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-12-07
AI Technical Summary
该方案的缺点是称量结果的精度会随着判定窗口的给定变化,窗口越长且阈值越小得到称重结果越精确但获值时间长,反之窗口越小且阈值越大很容易获得称重结果,但不精确
[0026] This invention calculates the slope of the weight values at all adjacent sampling times from multiple weight values obtained by sampling, and selects the endpoint value from all weight values based on the slope. This allows for accurate identification of the key points corresponding to the complete waveform during the fluctuation phase of the weighing data. Then, by calculating the average value of the complete waveform, a more accurate weight value is obtained. Compared with existing technologies, this invention improves efficiency and accuracy, while also increasing equipment productivity.
Smart Images

Figure CN117782280B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to weight measurement technology, and more particularly to an online weighing method and system. Background Technology
[0002] Online weighing is increasingly used in production lines. However, obtaining accurate weight values during the dynamic process of online weighing takes a considerable amount of time, which can affect equipment capacity. Therefore, both sampling and full weighing require a certain weighing speed, i.e., the speed of weight acquisition. Conventional online weighing solutions generally use the following two methods to obtain weight values:
[0003] (1) Delayed acquisition
[0004] To obtain an accurate weight, the material needs to stabilize after being placed on the scale, and the weight value from the load cell is obtained after a certain delay. The drawback of this method is that the delay time for each weighing is not fixed. In order to obtain an accurate weight every time, the delay time will be set to be very long, reducing the equipment's productivity.
[0005] (2) Steady-state acquisition
[0006] Steady-state acquisition involves defining a decision window and continuously judging whether the weight fluctuation exceeds a set threshold within that window's time range. If so, the weight is considered stable, and the load cell reading is taken as the weight of the object being weighed. The drawback of this method is that the accuracy of the weighing result varies with the given decision window. A longer window and a smaller threshold result in more accurate weighing but take longer to acquire the value. Conversely, a smaller window and a larger threshold make it easier to obtain a weighing result, but it is less accurate. Summary of the Invention
[0007] The technical problem to be solved by this invention is: in view of the technical problems existing in the prior art, this invention provides an online weighing method and system that can avoid spending too long waiting time to obtain accurate weight values due to weight value fluctuations, thereby improving equipment productivity.
[0008] To solve the above-mentioned technical problems, the technical solution proposed by this invention is as follows:
[0009] An online weighing method includes the following steps:
[0010] Obtain the weight value fed back by the weighing sensor at a specified sampling rate;
[0011] Calculate the slope of the weight values at all adjacent sampling times, and select the endpoint value from all weight values based on the slope.
[0012] Calculate the average of all endpoint values, or the average of all weight values between endpoint values, to obtain the weighing value.
[0013] Furthermore, before acquiring the weight value fed back by the load cell at a specified sampling rate, the process includes: listening to the weight value fed back by the load cell; if the weight value fed back by the load cell is 0, continuing to listen to the weight value fed back by the load cell until the weight value fed back by the load cell is greater than 0; after waiting for a first specified time period, the step of acquiring the weight value fed back by the load cell at a specified sampling rate is executed.
[0014] Furthermore, when obtaining the weight value fed back by the weighing sensor at a specified sampling rate, it includes: obtaining the weight value fed back by the weighing sensor within a second specified time period at a specified sampling rate.
[0015] Furthermore, when calculating the slope of the weight value at all adjacent sampling times, the method includes: subtracting the weight value of the previous adjacent sampling time from the weight value at the current sampling time to obtain a first difference, subtracting the previous adjacent sampling time from the current sampling time to obtain a second difference, and dividing the first difference by the second difference to obtain the slope of the weight value at adjacent sampling times.
[0016] Furthermore, when selecting an endpoint value from all weight values based on the slope, the method includes: if the slope between the weight value at the current sampling time and the weight value at the previous adjacent sampling time is positive, and the slope between the weight value at the current sampling time and the weight value at the next adjacent sampling time is negative, then the weight value at the current sampling time is the endpoint value.
[0017] Furthermore, before calculating the average of all endpoint values, or the average of all weight values between endpoint values, there is a step of filtering valid endpoint values, specifically including: determining whether an endpoint value is within a preset filtering window; if so, the endpoint value is a valid endpoint value.
[0018] Furthermore, when determining whether the endpoint value is within the preset filtering window, the following steps are included:
[0019] If the sampling time of the endpoint value is within the buffer time of the preset filtering window, and the weight value of the endpoint value satisfies the steady-state criterion of the preset filtering window, then the endpoint value is within the preset filtering window.
[0020] Furthermore, before calculating the average of all weight values between endpoint values, a step is included to filter out weight values with excessive fluctuations, specifically including:
[0021] Obtain all weight values between each pair of valid endpoint values;
[0022] Determine whether the magnitude of each weight value meets the steady-state criterion of the preset filtering window. If it does, retain the corresponding weight value; otherwise, delete the corresponding weight value.
[0023] Furthermore, the steady-state criterion of the preset filtering window specifically refers to the preset weight value range. The upper limit of the preset weight value range is the sum of the target weight and the weight deviation, and the upper limit of the preset weight value range is the difference between the target weight and the weight deviation, wherein the weight deviation is the product of the target weight and a specified ratio.
[0024] The present invention also proposes an online weighing system, including a filling and capping machine, which is programmed or configured to perform any of the online weighing methods described herein.
[0025] Compared with the prior art, the advantages of the present invention are as follows:
[0026] This invention calculates the slope of the weight values at all adjacent sampling times from multiple weight values obtained by sampling, and selects the endpoint value from all weight values based on the slope. This allows for accurate identification of the key points corresponding to the complete waveform during the fluctuation phase of the weighing data. Then, by calculating the average value of the complete waveform, a more accurate weight value is obtained. Compared with existing technologies, this invention improves efficiency and accuracy, while also increasing equipment productivity. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the weight fluctuation curve of an item after it has been weighed.
[0028] Figure 2 This is a flowchart of a method according to an embodiment of the present invention.
[0029] Figure 3 This is a distribution diagram of the sampling points in the weight fluctuation curve.
[0030] Figure 4 This is a schematic diagram of the weight fluctuation curve and its derivative curve.
[0031] Figure 5 This is a schematic diagram of the steady-state determination window in the weight fluctuation curve. Detailed Implementation
[0032] The present invention will be further described below with reference to the accompanying drawings and specific preferred embodiments, but this does not limit the scope of protection of the present invention.
[0033] Figure 1 This is a curve showing the fluctuation of the weight of an item after it has been weighed, where the horizontal axis represents time and the vertical axis represents the weight value. Figure 1 As shown, after an item is weighed, its weight will undergo an overshoot process, lasting for time T1. In this embodiment, the overshoot stage is referred to as stage T1. After stage T1, the weight will gradually fluctuate, lasting for time T2. In this embodiment, the fluctuating stage is referred to as stage T2. After stage T2, the weight will gradually stabilize, referred to as stage T3. It can be seen that if a stable weight value is required, at least time T1 plus T2 is needed.
[0034] To quickly obtain accurate weight values, this embodiment proposes an online weighing method that avoids excessive waiting time due to weight fluctuations, thereby improving equipment productivity. Figure 1 As shown, it includes the following steps:
[0035] S1) Obtain the weight value fed back by the weighing sensor at the specified sampling rate;
[0036] S2) Calculate the slope of the weight values at all adjacent sampling times, and select the endpoint value from all weight values according to the slope;
[0037] S3) Calculate the average of all endpoint values, or calculate the average of all weight values between endpoint values to obtain the weighing value.
[0038] Through the above steps, this embodiment can quickly find the complete waveform in the weight fluctuation curve after the item is weighed. At the same time, by calculating the average weight value in the complete waveform, an accurate weight value can be obtained, thereby improving the efficiency of obtaining the weight value.
[0039] The relevant steps are explained in detail below.
[0040] The method in this embodiment is completed in stage T2; therefore, the following steps are included before step S1:
[0041] Listen to the weight value fed back by the load cell. If the weight value fed back by the load cell is 0, continue to listen to the weight value fed back by the load cell until the weight value fed back by the load cell is greater than 0. After waiting for the first specified time (i.e., time T1), execute step S1.
[0042] In step S1 of this embodiment, obtaining the weight value fed back by the weighing sensor at a specified sampling rate includes: obtaining the weight value fed back by the weighing sensor within a second specified time period at a specified sampling rate. Specifically, although the weight value measured by the sensor is a continuous change process, the data collected by the PLC is actually sampled point by point, represented by x. Typically, the sampling period is 5ms. If the weighing time T2 is 400ms, then a total of 80 points are collected in the entire T2 stage, such as... Figure 3 As shown, it is stored in the array T[x], that is, T[1] to T
[80] .
[0043] It should be noted that, in fact, only an integer number of complete waveforms need to be obtained from the weight fluctuation curve in the T2 stage, such as Ta+Tb, Ta+Tb+Tc or Tb+Tc+Td... Therefore, when obtaining the weight value fed back by the weighing sensor at the specified sampling rate in step S1, the second specified time period can be any time period starting from the start time of T2, and the duration of this time period can be less than T2 time to save waiting time.
[0044] like Figure 4 As shown, stage T2 is actually composed of multiple sinusoidal curves. The starting points of each waveform are labeled a, b, c, d, e… where segment ab is the complete waveform Ta, segment bc is the complete waveform Tb, segment cd is the complete waveform Tc, segment de is the complete waveform Td… and so on. To obtain relatively complete sine and cosine curves in the weight fluctuation curve of stage T2, the points a, b, c, d, and e corresponding to the complete waveforms can be found by differentiation. For example… Figure 4 As shown, the blue curve is the derivative of the weight fluctuation curve, and each peak A, B, C, D, and E is the point to be found. Therefore, after calculating the slope of two adjacent points from T[1] to T
[80] , the slope is stored in the array R[y] to obtain R[1] to R
[79] . When the slope value in R[y] changes from positive to negative, the corresponding T[x] value is the point to be found.
[0045] Based on the above, in step S2 of this embodiment, since the horizontal axis of the fluctuation curve is time and the vertical axis is weight value, the calculation of the slope of the weight value at all adjacent sampling times includes: subtracting the weight value of the previous adjacent sampling time from the weight value at the current sampling time to obtain a first difference, subtracting the previous adjacent sampling time from the current sampling time to obtain a second difference, and dividing the first difference by the second difference to obtain the slope of the weight value at adjacent sampling times.
[0046] In step S2, after obtaining the slope, when selecting the endpoint value from all weight values according to the slope, the following steps are taken: if the slope between the weight value at the current sampling time and the weight value at the previous adjacent sampling time is positive, and the slope between the weight value at the current sampling time and the weight value at the next adjacent sampling time is negative, then the weight value at the current sampling time is the endpoint value.
[0047] For example, in Figure 3 In the diagram, Xn-1, Xn, and Xn+1 are three consecutive points collected on the weighing curve during stage T2. These three points are stored in the array T[x]. Then, the slopes of two consecutive points in T[x] are calculated and stored in R[y]. Since the slopes of Xn-1 and Xn are positive, while the slopes of Xn and Xn+1 are negative, it can be determined that Xn is the point in question. By following this method, the endpoints corresponding to all complete waveforms can be obtained.
[0048] like Figure 5 As shown, for the weight values sampled in the weight fluctuation curve of the T2 stage, this embodiment sets a filtering window, namely a steady-state determination window. The parameters of this window include buffer time and steady-state criterion. The buffer time is generally set to the time of an integer number of complete sine and cosine curves. The steady-state criterion setting value is adjusted according to the weighing accuracy, specifically referring to the preset weight value range.
[0049] Since the filtering window can acquire an integer number of complete waveforms that meet the conditions, before step S3 in this embodiment, there is also a step of filtering valid endpoint values. Specifically, it includes: determining whether the endpoint value is within the preset filtering window. If so, the endpoint value is a valid endpoint value. Specifically, determining whether the endpoint value is within the preset filtering window means that if the sampling time of the endpoint value is within the buffer time of the preset filtering window, and the weight value of the endpoint value meets the steady-state criterion of the preset filtering window, then the endpoint value is within the preset filtering window.
[0050] For example, through step S2, for the second specified duration starting from time T2, the sampled weight values Xn1, Xn2, and Xn3 are calculated as endpoint values. The sampling time of Xn2 and Xn3 is within the buffer time of the filter window, and the weight values of Xn2 and Xn3 are within the weight value range of the steady-state criterion of the filter window. Therefore, Xn2 and Xn3 are selected as valid endpoint values.
[0051] After obtaining an integer number of complete waveforms based on the valid endpoint values, it is generally necessary to filter out weight values with excessive fluctuations. Based on the steady-state criterion, the filtering out of weight values with excessive fluctuations can be achieved. In step S3, before calculating the average of all weight values between endpoint values, a step of filtering out weight values with excessive fluctuations is included, specifically:
[0052] Obtain all weight values between each pair of valid endpoint values;
[0053] Determine whether the magnitude of each weight value meets the steady-state criterion of the preset filtering window. If it does, retain the corresponding weight value; otherwise, delete the corresponding weight value.
[0054] In this embodiment, the upper limit of the preset weight value range in the steady-state criterion of the filter window is the sum of the target weight and the weight deviation, and the lower limit of the preset weight value range is the difference between the target weight and the weight deviation. The weight deviation is the product of the target weight and a specified ratio. For example, if the steady-state criterion is set to fluctuation range < target weight * 0.1%, then the weight deviation is target weight * 0.1%.
[0055] In step S3, after finding the complete waveform and filtering out weight values with excessive fluctuations, a more accurate weight value can be obtained by averaging the complete waveform. For example, if the complete waveforms Ta, Tb, Tc, and Td are all within the filtering window, the weight value is as follows:
[0056]
[0057] This embodiment also proposes an online weighing system, including a filling and capping machine, which is programmed or configured to perform the online weighing method described above.
[0058] In summary, this invention can accurately locate the key points corresponding to the complete waveform during the fluctuation phase of weighing data. Based on a preset filtering window, it can automatically acquire valid endpoints that meet the conditions, thereby determining the complete waveform involved in obtaining the weighing value. At the same time, by calculating the average value of multiple valid endpoint values of the complete waveform and the remaining weight values, an accurate weighing value can be obtained. Compared with the delayed acquisition method of weight value, it saves a lot of waiting time. Compared with the steady-state acquisition method of weight value, it is more efficient and accurate. Compared with the two methods, it can effectively improve the equipment's production capacity.
[0059] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the invention. Therefore, any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention should fall within the protection scope of the present invention.
Claims
1. An online weighing method, characterized in that, Includes the following steps: During the weight fluctuation phase after the item is weighed, the weight value fed back by the weighing sensor is obtained at a specified sampling rate. The weight fluctuation phase includes multiple waveforms similar to sine waves. Calculate the slope of the weight value at all adjacent sampling times, and select the endpoint value from all weight values according to the slope, including: if the slope of the weight value at the current sampling time and the weight value at the previous adjacent sampling time is positive, and the slope of the weight value at the current sampling time and the weight value at the next adjacent sampling time is negative, then the weight value at the current sampling time is the endpoint value. Based on the endpoint values, determine an integer number of complete waveforms, calculate the average of all endpoint values of the integer number of complete waveforms, or calculate the average of all weight values between endpoint values in the integer number of complete waveforms, to obtain the weighing value.
2. The online weighing method according to claim 1, characterized in that, Before acquiring the weight value fed back by the load cell at a specified sampling rate, the process includes: listening to the weight value fed back by the load cell; if the weight value fed back by the load cell is 0, continuing to listen to the weight value fed back by the load cell until the weight value fed back by the load cell is greater than 0; after waiting for a first specified time period, the process of acquiring the weight value fed back by the load cell at a specified sampling rate is executed.
3. The online weighing method according to claim 1, characterized in that, When obtaining the weight value fed back by the weighing sensor at a specified sampling rate, it includes: obtaining the weight value fed back by the weighing sensor within a second specified time period at a specified sampling rate.
4. The online weighing method according to claim 1, characterized in that, When calculating the slope of the weight value at all adjacent sampling times, the following steps are taken: subtract the weight value of the previous adjacent sampling time from the weight value at the current sampling time to obtain a first difference, subtract the previous adjacent sampling time from the current sampling time to obtain a second difference, and divide the first difference by the second difference to obtain the slope of the weight value at adjacent sampling times.
5. The online weighing method according to claim 1, characterized in that, Before calculating the average of all endpoint values, or the average of all weight values between endpoint values, the method further includes a step of filtering valid endpoint values, specifically: determining whether an endpoint value is within a preset filtering window; if so, the endpoint value is a valid endpoint value.
6. The online weighing method according to claim 5, characterized in that, When determining whether an endpoint value is within a preset filtering window, the following steps are included: If the sampling time of the endpoint value is within the buffer time of the preset filtering window, and the weight value of the endpoint value satisfies the steady-state criterion of the preset filtering window, then the endpoint value is within the preset filtering window.
7. The online weighing method according to claim 6, characterized in that, Before calculating the average of all weight values between endpoints, a step is included to filter out weight values with excessive fluctuations, specifically including: Obtain all weight values between each pair of valid endpoint values; Determine whether the magnitude of each weight value meets the steady-state criterion of the preset filtering window. If it does, retain the corresponding weight value; otherwise, delete the corresponding weight value.
8. The online weighing method according to claim 7, characterized in that, The steady-state criterion of the preset filtering window specifically refers to the preset weight value range. The upper limit of the preset weight value range is the sum of the target weight and the weight deviation, and the upper limit of the preset weight value range is the difference between the target weight and the weight deviation, wherein the weight deviation is the product of the target weight and a specified ratio.
9. An online weighing system, comprising a filling and capping machine, characterized in that, The filling and capping machine is programmed or configured to perform the online weighing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method of weight measurement using moving weigh conveyor
WO2002084232A1