A method and apparatus for calibrating a near-infrared milk flow meter
By obtaining the empty tube calibration value and determining the full tube time in a near-infrared milk flow meter, and calculating the flow rate, the problem of insufficient accuracy and convenience of flow meter calibration at the client end is solved, and efficient calibration results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AMU CLOUD (GUIZHOU) TECHNOLOGY CO LTD
- Filing Date
- 2023-08-30
- Publication Date
- 2026-07-14
AI Technical Summary
Existing near-infrared milk flow meters lack sufficient calibration accuracy and convenience during customer use, and cannot effectively cope with the effects of individual differences in milk composition, aging of photoelectric sensors, and changes in pipeline position.
By acquiring the optical signal as the empty pipe calibration value when the empty pipe calibration command is received, and determining the full pipe time during the metering process, the flow rate is calculated using the new full pipe calibration value and the empty pipe calibration value, thus realizing the principle-level calibration of the flow meter and automatically completing the empty pipe and full pipe calibrations periodically.
It improves the accuracy and convenience of flow meter calibration, enabling reliable calibration to be completed automatically and periodically at the client's location, reducing errors caused by factors such as milk composition and sensor aging.
Smart Images

Figure CN117146937B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flow meter calibration technology, specifically to a calibration method and equipment for a near-infrared milk flow meter. Background Technology
[0002] Currently, flow meters based on near-infrared light principles for detecting milk flow already exist on the market. A typical schematic diagram of their principle is shown below. Figure 1 As shown, when this flow meter is working, the upper and lower light emitters continuously emit near-infrared light, which is received by the upper and lower light receivers respectively. The light is then calculated and converted into the instantaneous thickness of the milk at the upper and lower cross sections. The instantaneous flow velocity is obtained by measuring the propagation time of the thickness at the upper and lower cross sections. The instantaneous flow rate is obtained by multiplying the instantaneous flow velocity and the instantaneous thickness.
[0003] In order to accurately obtain the instantaneous thickness of milk in the upper and lower sections, it is theoretically necessary to measure the optical signal when the tube is completely empty, a process called empty tube calibration, and the optical signal when the tube is filled with milk, a process called full tube calibration.
[0004] At the factory, flow meters are relatively easy to calibrate with both empty and full tubes using auxiliary tooling. However, as the flow meters are used by customers, several factors can affect the short-term or long-term effectiveness of the calibration. Typical examples include: individual differences in the composition of cow's milk, aging of the photoelectric sensor, long-term aging of the optical properties of the pipeline, and long-term minor changes in the relative positions of the pipeline and the sensor. These factors can lead to a continuous deterioration in the accuracy of the flow meters at the customer's location.
[0005] To ensure the accuracy of flow meters at the client's site, corresponding solutions are needed. Currently, two solutions exist: Solution 1: Periodically check the average automatic measurement result and the average actual weight result of the meter during one or more milking sessions, and use the ratio of the two as a correction coefficient to compensate for the measurement result. The problem with Solution 1 is that it doesn't correct from the fundamental perspective of instantaneous milk thickness; it only provides a general correction to the overall result, failing to achieve a highly consistent correction effect across different milking sessions. Solution 2: Before each milking session, there is a point in time when the pipeline is empty. Acquiring an optical signal at this point allows for effective empty-pipe calibration, and then calculating the full-pipe calibration value using a specific proportional relationship. Solution 2 has two significant advantages over Solution 1: it facilitates automatic calibration at the client's site; and the calibration method directly addresses instantaneous milk volume calibration, theoretically making it more universally applicable than Solution 1. However, Solution 2 has a problem: the full-pipe calibration value can only be calculated using a fixed proportional relationship, which cannot account for individual differences in milk composition among cows or long-term minor changes in the relative positions of the pipeline and sensors, thus also leading to inaccuracies.
[0006] Therefore, there is currently a lack of a calibration method for near-infrared milk flow meters that balances both calibration accuracy and convenience. Summary of the Invention
[0007] In view of this, the purpose of the present invention is to provide a calibration method and device for a near-infrared milk flow meter, so as to solve the problem that the current calibration measures for near-infrared milk flow meters are not convenient enough in terms of calibration accuracy.
[0008] According to a first aspect of the present invention, a calibration method for a near-infrared milk flow meter is provided, applicable to the near-infrared milk flow meter, comprising:
[0009] When an air traffic control calibration command is received, the upper and lower emitters are controlled to emit near-infrared light respectively, and the light signals are acquired through the upper and lower light receivers and used as the air traffic control calibration value.
[0010] When a metering command is received, the upper and lower light emitters are controlled to continuously emit near-infrared light, and the light signals during the metering process are continuously acquired through the upper and lower light receivers.
[0011] Determine whether there is a full tube moment during the current measurement process based on the optical signal during the measurement process;
[0012] If so, the optical signal at the full tube moment is used as the new full tube calibration value. Based on the new full tube calibration value, the optical signal during the metering process, and the empty tube calibration value, the flow rate of this metering process is calculated.
[0013] Preferably, the control of the upper and lower emitters to emit near-infrared light, and the acquisition of light signals through the upper and lower light receivers, using the light signals as empty tube calibration values, includes:
[0014] The upper and lower light emitters are controlled to continuously emit near-infrared light for a preset time, and the light signals for the preset time are continuously acquired through the upper and lower light receivers.
[0015] The maximum value of the optical signal within a preset time period is used as the air tube calibration value.
[0016] Preferably, the step of using the maximum value of the optical signal within a preset time as the empty tube calibration value includes:
[0017] The optical signal within a preset time period is filtered using a preset filtering algorithm to remove measurement noise and obtain a denoised optical signal.
[0018] The maximum value of the denoised optical signal is used as the empty tube calibration value.
[0019] Preferably, determining whether a full-tube moment exists during the current measurement process based on the optical signal during the measurement process includes:
[0020] By comparing the values of the optical signal during the measurement process, the minimum value of the optical signal is obtained;
[0021] Determine whether the deviation between the minimum value of the optical signal and the pre-stored original full-tube calibration value is within a preset range;
[0022] If so, the time corresponding to the minimum value of the optical signal is taken as the full tube time.
[0023] Preferably, calculating the flow rate of this metering process based on the new full-pipe calibration value, the optical signal during the metering process, and the empty-pipe calibration value includes:
[0024] The thickness and flow rate of the optical signal at each moment in the metering process are calculated using the empty tube calibration value and the new full tube calibration value. Based on the thickness and flow rate at each moment, the flow rate at each moment is calculated. The flow rates at all moments are accumulated to obtain the flow rate of this metering process.
[0025] Preferably, the method further includes;
[0026] The preset filtering algorithm is either moving average filtering or median filtering.
[0027] Preferably, after using the optical signal at the full-tube moment as the new full-tube calibration value, the method further includes:
[0028] Replace the pre-stored original full tube calibration value with the new full tube calibration value.
[0029] Preferably, the method further includes:
[0030] If a full tube moment exists within a preset time after receiving the metering instruction, the optical signal at the full tube moment will be immediately used as the new full tube calibration value.
[0031] The flow rate after the full pipe calibration value, the empty pipe calibration value, and the optical signal after the full pipe moment during the metering process are calculated.
[0032] According to a second aspect of the present invention, a calibration device for a near-infrared milk flow meter is provided, comprising:
[0033] The main controller and the memory connected to the main controller;
[0034] Memory, which stores program instructions;
[0035] The main controller is used to execute program instructions stored in the memory and perform any of the methods described above.
[0036] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0037] It is understood that the technical solution provided by this invention can, upon receiving an empty pipe calibration command, control the upper and lower emitters to emit near-infrared light, and receive the light signals through the upper and lower optical receivers, using the light signals as the empty pipe calibration value; upon receiving a metering command, control the upper and lower emitters to continuously emit near-infrared light, and continuously receive the light signals during the metering process through the upper and lower optical receivers; if there is a full pipe moment during the metering process, the light signal at the full pipe moment is used as the new full pipe calibration value, and the flow rate of this metering process is calculated based on the new full pipe calibration value, the light signals during the metering process, and the empty pipe calibration value. The technical solution provided by this invention can calibrate the flow meter from the principle level, and can automatically and periodically complete reliable empty pipe calibration and full pipe calibration at the customer's location, ensuring both convenience and high calibration accuracy.
[0038] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0040] Figure 1 This is a schematic block diagram of a near-infrared milk flow meter according to an exemplary embodiment;
[0041] Figure 2 This is a schematic diagram illustrating the steps of a calibration method for a near-infrared milk flow meter according to an exemplary embodiment;
[0042] Figure 3 This is a schematic diagram illustrating an optical signal analysis and calculation process according to an exemplary embodiment. Detailed Implementation
[0043] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0044] Example 1
[0045] Figure 2This is a schematic diagram illustrating the steps of a calibration method for a near-infrared milk flow meter according to an exemplary embodiment. See also... Figure 2 A calibration method for a near-infrared milk flow meter is provided, applicable to the near-infrared milk flow meter, comprising:
[0046] Step S11: When an air tube calibration command is received, the upper and lower emitters are controlled to emit near-infrared light respectively, and the light signals are acquired through the upper and lower light receivers, and the light signals are used as the air tube calibration values.
[0047] Step S12: When a metering command is received, control the upper and lower light emitters to continuously emit near-infrared light, and continuously acquire the light signal during the metering process through the upper and lower light receivers.
[0048] Step S13: Determine whether there is a full tube moment during the current measurement process based on the optical signal during the measurement process;
[0049] Step S14: If yes, then the optical signal at the full tube moment is used as the new full tube calibration value. Based on the new full tube calibration value, the optical signal during the metering process, and the empty tube calibration value, the flow rate of this metering process is calculated.
[0050] In practical applications, near-infrared milk flow meters may include a controller. The controller can issue an empty pipe calibration command when it determines that the flow meter is about to start working (e.g., when the flow meter is started). At the same time, the controller can issue a metering command after the empty pipe calibration. Alternatively, a manual button can be set up. When the user manually presses the calibration button, an empty pipe calibration command is issued. When the user manually presses the metering button, a metering command is issued.
[0051] Taking the controller sending commands as an example, before each milking session, the near-infrared flow meter will be activated first. At this time, an empty pipe calibration command will be sent immediately. There is a period of empty pipe time between the operator starting the equipment and the start of milking. Therefore, upon receiving the empty pipe calibration command, empty pipe calibration is performed to obtain the empty pipe calibration value. After the empty pipe calibration value is obtained, a metering command can be sent. Upon receiving the metering command, the operator milks, allowing the flow meter to acquire the optical signal during the metering process. After metering is completed, the optical signal during the metering process is analyzed to determine the moment the pipe is full. The optical signal at the moment the pipe is full is used as the full pipe calibration value. Based on the full pipe calibration value, the empty pipe calibration value, and the optical signal during the metering process, the flow rate for this metering process is calculated.
[0052] It is understood that the technical solution provided in this embodiment can, upon receiving an empty pipe calibration command, control the upper and lower emitters to emit near-infrared light, and receive the light signals through the upper and lower optical receivers, using the light signals as the empty pipe calibration value; upon receiving a metering command, control the upper and lower emitters to continuously emit near-infrared light, and continuously receive the light signals during the metering process through the upper and lower optical receivers; if there is a full pipe moment during the metering process, the light signal at the full pipe moment is used as the new full pipe calibration value, and the flow rate of this metering process is calculated based on the new full pipe calibration value, the light signals during the metering process, and the empty pipe calibration value. The technical solution provided in this embodiment can calibrate the flow meter from the principle level, and can automatically and periodically complete reliable empty pipe calibration and full pipe calibration at the customer's location, with high calibration accuracy.
[0053] To make the empty pipe calibration values more accurate, the following technical solutions can be adopted:
[0054] It should be noted that the control of the upper and lower emitters to emit near-infrared light, and the acquisition of light signals through the upper and lower light receivers, using the light signals as empty tube calibration values, includes:
[0055] The upper and lower light emitters are controlled to continuously emit near-infrared light for a preset time, and the light signals for the preset time are continuously acquired through the upper and lower light receivers.
[0056] The maximum value of the optical signal within a preset time period is used as the air tube calibration value.
[0057] In practice, the preset time can be determined according to the actual situation. Stretching the empty pipe calibration time from a single point in time into a period of time makes the empty pipe calibration more accurate and reduces errors. Preferably, after the operator starts the flow meter, the flow meter will inevitably be in an empty pipe state for a period of time. Therefore, empty pipe calibration can begin when the flow meter is started, until the collected light signal suddenly decreases (indicating that milk has arrived at the flow meter). Thus, the maximum value of the light signal from the light signal values within the aforementioned time period can be selected as the empty pipe calibration value.
[0058] Preferably, the preset time and sampling frequency can also be set. For example, the preset time can be set to 5 seconds and the frequency can be set to 1000 samplings per second.
[0059] It should be noted that using the maximum value of the optical signal within a preset time as the empty tube calibration value includes:
[0060] The optical signal within a preset time period is filtered using a preset filtering algorithm to remove measurement noise and obtain a denoised optical signal.
[0061] The maximum value of the denoised optical signal is used as the empty tube calibration value.
[0062] In practice, filtering algorithms can be used to remove measurement noise from the acquired optical signals, and the maximum value of the signal is then taken as the empty pipe calibration value. The technical solution in this embodiment can eliminate interference caused by occasional water droplets sliding down the pipe. Typical filtering algorithms include fast filtering algorithms such as moving average filtering or median filtering.
[0063] After milking is completed, the measurement process ends, and optical signal analysis and milk volume calculation are performed. The analysis and calculation process is as follows: Figure 3 As shown in Figure 3, firstly, the optical signal during the metering process is used to determine whether there is a full pipe moment in the current metering process; if not, it means that there is no full pipe moment in the current metering process, and the pre-stored original full pipe calibration value is continued to be used; if so, the optical signal at the full pipe moment is used as the new full pipe calibration value, and the flow rate of the current metering process is calculated based on the new full pipe calibration value, the optical signal during the metering process and the empty pipe calibration value.
[0064] It should be noted that determining whether a full-tube moment exists during the metering process based on the optical signal during the metering process includes:
[0065] By comparing the values of the optical signal during the measurement process, the minimum value of the optical signal is obtained;
[0066] Determine whether the deviation between the minimum value of the optical signal and the pre-stored original full-tube calibration value is within a preset range;
[0067] If so, the time corresponding to the minimum value of the optical signal is taken as the full tube time.
[0068] In practice, when determining whether a full-tube moment exists during the measurement process, the minimum value of the optical signal during the measurement process can be compared with the original full-tube calibration value. This is because, excluding errors, the original full-tube calibration value must have been calibrated under full-tube conditions. Even if there is an error in the full-tube calibration value during this measurement, it will not exceed a certain range. Therefore, a preset range can be set. When the deviation between the minimum value of the optical signal and the pre-stored original full-tube calibration value is within the preset range, it proves that a full-tube moment exists during this measurement process, that is, the moment corresponding to the minimum value of the optical signal. The minimum value of the optical signal at that moment is then used as the new full-tube calibration value.
[0069] Preferably, the full tube condition can also be artificially determined. For example, if the outlet of the conduit is closed, the conduit will be full after milk flows in.
[0070] It should be noted that the calculation of the flow rate for this metering process based on the new full-pipe calibration value, the optical signal during the metering process, and the empty-pipe calibration value includes:
[0071] The thickness and flow rate of the optical signal at each moment in the metering process are calculated using the empty tube calibration value and the new full tube calibration value. Based on the thickness and flow rate at each moment, the flow rate at each moment is calculated. The flow rates at all moments are accumulated to obtain the flow rate of this metering process.
[0072] The specific method for regression calculation of the milking process signal is as follows: the original optical signal collected during the entire milking process is saved, and the thickness and flow rate corresponding to each frame of the original signal are recalculated using the new full tube calibration signal and empty tube calibration signal, thereby obtaining the milk volume of this milking.
[0073] It should be noted that after using the optical signal at the full-tube moment as the new full-tube calibration value, the following is also included:
[0074] Replace the pre-stored original full tube calibration value with the new full tube calibration value.
[0075] In practice, once the new full tube calibration value is obtained, the original full tube calibration value is no longer useful. Therefore, the new full tube calibration value can be used to overwrite the original full tube calibration value.
[0076] Example 2
[0077] It should be noted that the method also includes:
[0078] If a full tube moment exists within a preset time after receiving the metering instruction, the optical signal at the full tube moment will be immediately used as the new full tube calibration value.
[0079] The flow rate after the full pipe calibration value, the empty pipe calibration value, and the optical signal after the full pipe moment during the metering process are calculated.
[0080] In practice, the flow meter calculates the flow rate in real time based on the optical signal. However, the above-mentioned technical solution requires recalculating the flow rate after the metering process is completed, which introduces a delay. Furthermore, the controller needs to save all the data from the milking process. The technical solution shown in this embodiment allows the preset time to be set to 10 seconds. The determination of the full-tube moment can be made by checking whether the deviation between the minimum optical signal value within the preset time and the pre-stored original full-tube calibration value is within a preset range. If so, the full-tube moment can be determined.
[0081] Before determining the new full-pipe calibration value, real-time flow measurement can be performed using the original full-pipe calibration value within a preset time period. Real-time flow measurement can also be performed after the new full-pipe calibration value is determined, thus ensuring both the real-time nature of flow measurement and, to a certain extent, the accuracy of the full-pipe calibration value. The technical solution shown in this embodiment eliminates the need for the controller to save data from the entire milking process, simplifying hardware design; the final result can be displayed immediately after milking, without waiting for the time required to re-analyze the signals from the entire milking process.
[0082] Example 3
[0083] A calibration device for a near-infrared milk flow meter is provided, comprising:
[0084] The main controller and the memory connected to the main controller;
[0085] Memory, which stores program instructions;
[0086] The main controller is used to execute program instructions stored in the memory and perform any of the methods described above.
[0087] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0088] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.
[0089] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0090] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0091] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0092] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0093] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0094] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0095] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A calibration method for a near-infrared milk flow meter, applied to a near-infrared milk flow meter, characterized in that, include: When an air traffic control calibration command is received, the upper and lower emitters are controlled to emit near-infrared light respectively, and the light signals are acquired through the upper and lower light receivers. The light signals are used as the air traffic control calibration value. This includes: controlling the upper and lower emitters to continuously emit near-infrared light for a preset time, and continuously acquiring the light signals for the preset time through the upper and lower light receivers; and using the maximum value of the light signals within the preset time as the air traffic control calibration value. When a metering command is received, the upper and lower light emitters are controlled to continuously emit near-infrared light, and the light signals during the metering process are continuously acquired through the upper and lower light receivers. Determining whether a full tube moment exists during the current measurement process based on the optical signal during the measurement process includes: comparing the values of the optical signal during the measurement process to obtain the minimum value of the optical signal; determining whether the deviation between the minimum value of the optical signal and the pre-stored original full tube calibration value is within a preset range; if so, then taking the moment corresponding to the minimum value of the optical signal as the full tube moment. If there is a full pipe moment, the optical signal at the full pipe moment is used as the new full pipe calibration value. Based on the new full pipe calibration value, the optical signal during the metering process, and the empty pipe calibration value, the flow rate of this metering process is calculated.
2. The method according to claim 1, characterized in that, The step of using the maximum value of the optical signal within a preset time as the empty tube calibration value includes: The optical signal within a preset time period is filtered using a preset filtering algorithm to remove measurement noise and obtain a denoised optical signal. The maximum value of the denoised optical signal is used as the empty tube calibration value.
3. The method according to claim 1, characterized in that, The step of calculating the flow rate of this metering process based on the new full-pipe calibration value, the optical signal during the metering process, and the empty-pipe calibration value includes: The thickness and flow rate of the optical signal at each moment in the metering process are calculated using the empty tube calibration value and the new full tube calibration value. Based on the thickness and flow rate at each moment, the flow rate at each moment is calculated. The flow rates at all moments are accumulated to obtain the flow rate of this metering process.
4. The method according to claim 2, characterized in that, Also includes; The preset filtering algorithm is either moving average filtering or median filtering.
5. The method according to claim 1, characterized in that, After using the optical signal at full tube speed as the new full tube calibration value, the following is also included: Replace the pre-stored original full tube calibration value with the new full tube calibration value.
6. The method according to claim 1, characterized in that, Also includes: If a full tube moment exists within a preset time after receiving the metering instruction, the optical signal at the full tube moment will be immediately used as the new full tube calibration value. The flow rate after the full pipe calibration value, the empty pipe calibration value, and the optical signal after the full pipe moment during the metering process are calculated.
7. A calibration device for a near-infrared milk flow meter, characterized in that, include: The main controller and the memory connected to the main controller; Memory, which stores program instructions; The main controller is used to execute program instructions stored in the memory to perform the method as described in any one of claims 1 to 6.