A method and system for variable pressure extraction control in an automatic coffee machine

CN122911298APending Publication Date: 2026-10-16GUANGZHOU JIGU ELECTRIC APPLIANCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611105639.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0006]因此,本申请提供了一种自动咖啡机变压萃取控制方法及系统,能够克服变压萃取中流量计因水流脉冲产生计量虚高,导致咖啡机提前停机及出液不足的问题

Benefits of technology

[0017]The beneficial effects of implementing this application are as follows: This application provides an automatic coffee machine pressure-switching extraction control method and system. In response to a pressure-switching extraction start command, it acquires the pressure-switching sequence of the coffee machine's water pump and the original pulse sequence of the flow meter; extracts the pressure difference between adjacent acquisition times to generate a pressure change rate sequence; compares the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter overshoot correction sequence; calculates the true cumulative flow value of the pressure-switching extraction process based on the flow meter overshoot correction sequence and the original pulse sequence of the flow meter; and generates a stop extraction command in response to the true cumulative flow value reaching the preset extraction target value. This application can eliminate false pulse components generated by the flow meter under pressure-switching conditions due to acceleration overshoot and deceleration idling, restoring the true extraction liquid volume and preventing the coffee machine from stopping prematurely due to overshoot and insufficient liquid output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122911298A_ABST
    Figure CN122911298A_ABST
Patent Text Reader

Abstract

The application discloses a variable pressure extraction control method and system of an automatic coffee machine, and relates to the technical field of fluid metering, which comprises the following steps: in response to a variable pressure extraction starting instruction, obtaining a variable pressure sequence of a coffee machine water pump and an original pulse sequence of a flowmeter; extracting pressure difference values of adjacent collection time points to generate a pressure change rate sequence; comparing and processing the pressure change rate sequence and the original pulse sequence of the flowmeter to generate a flowmeter false high correction sequence; calculating a real cumulative flow value of the variable pressure extraction process based on the flowmeter false high correction sequence and the original pulse sequence of the flowmeter; and generating a stop extraction instruction in response to the real cumulative flow value reaching a preset extraction target value. The application can eliminate false pulse components generated by the flowmeter under the variable pressure working condition due to acceleration overshoot and deceleration idling, restore the real extraction liquid amount, and avoid the early shutdown of the coffee machine due to false high metering and insufficient liquid output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of fluid metering, and in particular to an automatic coffee machine pressure swing extraction control method and system. Background Technology

[0002] When an automatic coffee machine performs a pressure-switching extraction process, the water pump alternately changes its output pressure according to a preset curve, causing the water flow inside the pipes to exhibit a pulsating state with varying speeds. When the pulsating water flow passes through the flow meter, the impeller inside the flow meter experiences overshoot due to the impact of the water flow during the high-pressure acceleration phase, while continuing to spin idly during the low-pressure deceleration phase due to the impeller's own rotational inertia.

[0003] Existing flow metering systems directly equate the pulse frequency output by the flow meter to the instantaneous flow rate for cumulative calculation, ignoring the dynamic response error of the sensor under unsteady flow conditions. Flow meter overshoot in the high-pressure section and impeller inertia idling in the low-pressure section both input false flow increments into the system, causing the cumulative flow meter reading to exceed the actual amount of water flowing through the coffee pouch. The controller determines the total extraction volume based on the cumulative pulse value fed back by the flow meter, and the system may mistakenly believe that enough liquid has been extracted, prematurely ending the extraction process, resulting in insufficient actual extracted liquid and incomplete extraction of coffee flavor.

[0004] Existing fixed-discount compensation methods cannot adapt to the amplitude and frequency variations of different pressure curves. When the pressure fluctuation is large, the number of spurious pulses generated by impeller overshoot and idling increases significantly, making fixed discounts prone to overcompensation or undercompensation. When the pressure fluctuation is small, the proportion of spurious pulses decreases, but fixed discounts may excessively deduct normal flow, resulting in uncontrollable liquid output. Therefore, there is an urgent need for a method that can dynamically eliminate spurious pulse components based on pressure fluctuation conditions. Summary of the Invention

[0005] In view of the aforementioned problems, this application is hereby filed.

[0006] Therefore, this application provides an automatic coffee machine pressure change extraction control method and system, which can overcome the problem of falsely high flow meter readings caused by water flow pulses during pressure change extraction, resulting in premature shutdown of the coffee machine and insufficient liquid output.

[0007] To solve the above-mentioned technical problems, this application provides the following technical solution: In a first aspect, this application provides an automatic coffee machine pressure change extraction control method, comprising: in response to a pressure change extraction start command, acquiring the pressure change sequence of the coffee machine water pump and the original pulse sequence of the flow meter; Based on the pressure change sequence of the coffee machine's water pump, the pressure difference between adjacent sampling times is extracted to generate a pressure change rate sequence; The pressure change rate sequence and the original pulse sequence of the flow meter are compared and processed to generate a flow meter false high correction sequence. The true cumulative flow rate of the pressure swing extraction process is calculated based on the flow meter false high correction sequence and the original pulse sequence of the flow meter. In response to the actual cumulative flow value reaching the preset extraction target value, a stop extraction command is generated for the coffee machine's water pump.

[0008] Preferably, the step of extracting the pressure difference between adjacent sampling times based on the pressure change sequence of the coffee machine's water pump to generate a pressure change rate sequence includes: Obtain the first and second pressure values ​​at adjacent sampling times in the pressure transformation sequence of the coffee machine's water pump; The difference between the acquisition time is calculated based on the first pressure value and the second pressure value to generate the first pressure difference sequence; The first pressure difference value sequence is judged by positive and negative signs to generate a pressure increase indicator sequence and a pressure decrease indicator sequence. A pressure change rate sequence is generated by splicing together the pressure rise indicator sequence and the pressure fall indicator sequence.

[0009] Preferably, the step of comparing the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter false high correction sequence includes: Obtain the pressure rise indicator sequence from the pressure change rate sequence and the corresponding first pulse subsequence from the original pulse sequence of the flow meter; Based on the pressure rise indicator sequence and the first pulse subsequence, calculate the high pressure overshoot correction subsequence for the flowmeter impeller; Obtain the pressure drop indicator sequence from the pressure change rate sequence and the corresponding second pulse subsequence from the original pulse sequence of the flow meter; Based on the pressure drop indicator sequence and the second pulse subsequence, calculate the low-pressure inertia correction subsequence of the flowmeter impeller; The high-pressure overshoot correction subsequence and the low-pressure inertia correction subsequence are time-sequentially spliced ​​to generate the flowmeter false high correction sequence.

[0010] Preferably, the step of calculating the high-pressure overshoot correction sub-sequence for the flowmeter impeller based on the pressure rise identifier sequence and the first pulse sub-sequence includes: Based on the pressure rise identifier sequence, extract the set of time labels for the continuously rising rise segments in the pressure change sequence; Based on the set of rising segment time labels, extract the corresponding first pulse subsequence from the original pulse sequence of the flowmeter; Peak capture is performed on the first pulse subsequence to obtain the maximum pulse frequency value in the first pulse subsequence; Based on the difference between the maximum pulse frequency value and the reference frequency value, a high-pressure overshoot correction sequence for the flowmeter impeller is generated.

[0011] Preferably, the step of calculating the low-pressure inertia correction sub-sequence of the flowmeter impeller based on the pressure drop identifier sequence and the second pulse sub-sequence includes: Based on the pressure drop identifier sequence, extract the set of time labels for the continuously decreasing segments in the pressure drop sequence; Based on the set of time labels for the falling segment, extract the corresponding second pulse subsequence from the original pulse sequence of the flowmeter; Perform pulse zero-crossing detection on the second pulse subsequence to obtain the pulse duration in the second pulse subsequence; Based on the difference between the pulse duration and the theoretical outflow duration, a low-pressure inertia correction subsequence for the flowmeter impeller is generated.

[0012] Preferably, the calculation of the true cumulative flow value of the pressure swing extraction process based on the flow meter false high correction sequence and the original pulse sequence of the flow meter includes: The original pulse sequence of the flow meter is accumulated over time to generate the original cumulative flow value extracted by the coffee machine. The flow meter over-extension correction sequence is accumulated over time to generate the cumulative over-extension flow rate value extracted by the coffee machine. Obtain the difference between the original cumulative traffic value and the artificially inflated cumulative traffic value, and generate a traffic error compensation value; The true cumulative flow rate of the pressure swing extraction process is calculated by superimposing the flow error compensation value and the original cumulative flow rate value.

[0013] As a preferred option, it also includes: In response to the actual cumulative flow value not reaching the preset extraction target value, the current pressure value and current pressure change rate in the pressure transformer sequence are obtained; Based on the current pressure value and the current pressure change rate, generate the pressure change sequence update value of the coffee machine water pump for the next moment; Based on the pressure change sequence update value, replace and update the pressure change sequence of the coffee machine water pump during the pressure change extraction process; In response to the updated pressure sequence, the coffee machine's water pump is controlled to perform the next cycle of pressure-discharge water operation.

[0014] Preferably, the step of generating the pressure change sequence update value of the coffee machine water pump for the next moment based on the current pressure value and the current pressure change rate includes: The current pressure value in the pressure variation sequence is determined by the range, and the preset pressure range label to which the current pressure value belongs is obtained; Based on the preset pressure range label, match the target rate of change threshold corresponding to the current pressure range during the pressure swing extraction process; In response to the current pressure change rate exceeding the target change rate threshold, a constant pressure maintenance command is generated based on the current pressure value; Based on the constant pressure maintenance command and the current pressure value, the pressure change sequence update value of the coffee machine water pump for the next moment is generated.

[0015] Preferably, the step of generating the pressure change sequence update value of the coffee machine water pump at the next moment based on the constant pressure maintenance command and the current pressure value includes: In response to the constant pressure maintenance command, the current pressure value in the variable pressure sequence is extracted as the constant pressure target value of the water pump; Parse the constant pressure maintenance command to obtain the maintenance time period label of the pressure swing extraction process corresponding to the constant pressure maintenance command; Based on the constant pressure target value and the maintenance time period label, a constant pressure segment pressure sequence of the coffee machine water pump is generated; The constant pressure sequence is replaced and spliced ​​with the original variable pressure sequence to generate the updated variable pressure sequence value of the coffee machine water pump at the next moment.

[0016] Secondly, this application also provides an automatic coffee machine variable pressure extraction control system, including: a first acquisition module, a first generation module, a comparison and processing module, a calculation module, and a control module; The first acquisition module is used to respond to the pressure swing extraction start command and acquire the pressure swing sequence of the coffee machine water pump and the original pulse sequence of the flow meter; The first generation module is used to extract the pressure difference between adjacent acquisition times based on the pressure change sequence of the coffee machine's water pump, and generate a pressure change rate sequence. The comparison processing module is used to compare the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter false high correction sequence. The calculation module is used to calculate the true cumulative flow value of the pressure swing extraction process based on the flow meter false high correction sequence and the original pulse sequence of the flow meter; The control module is used to generate a stop extraction command for the coffee machine's water pump when the actual cumulative flow value reaches the preset extraction target value.

[0017] The beneficial effects of implementing this application are as follows: This application provides an automatic coffee machine pressure-switching extraction control method and system. In response to a pressure-switching extraction start command, it acquires the pressure-switching sequence of the coffee machine's water pump and the original pulse sequence of the flow meter; extracts the pressure difference between adjacent acquisition times to generate a pressure change rate sequence; compares the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter overshoot correction sequence; calculates the true cumulative flow value of the pressure-switching extraction process based on the flow meter overshoot correction sequence and the original pulse sequence of the flow meter; and generates a stop extraction command in response to the true cumulative flow value reaching the preset extraction target value. This application can eliminate false pulse components generated by the flow meter under pressure-switching conditions due to acceleration overshoot and deceleration idling, restoring the true extraction liquid volume and preventing the coffee machine from stopping prematurely due to overshoot and insufficient liquid output. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is an overall flowchart of an automatic coffee machine variable pressure extraction control method related to this application; Figure 2 This is a schematic diagram illustrating the determination of whether the extraction target value has been reached in an automatic coffee machine variable pressure extraction control method according to this application. Figure 3 This is a schematic diagram illustrating the determination of whether the current pressure change rate exceeds the target change rate threshold in an automatic coffee machine pressure change extraction control method according to this application. Figure 4 This is a schematic diagram of the core data entities and processing logic of an automatic coffee machine variable pressure extraction control method involved in this application.

[0020] Figure 5 This is a schematic diagram illustrating the pressure fluctuation and flow meter dynamic response error analysis during the pressure variation extraction process of an automatic coffee machine pressure variation extraction control method involved in this application.

[0021] Figure 6 This is a schematic diagram showing the comparison of cumulative flow before and after modification and the analysis of the early shutdown effect of a variable pressure extraction control method for an automatic coffee machine involved in this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0023] Embodiments of this application provide an automatic coffee machine variable pressure extraction control method, including: Figure 1 A flowchart of a method for controlling the variable pressure extraction of an automatic coffee machine is shown, including: Step S1: In response to the pressure swing extraction start command, acquire the pressure swing sequence of the coffee machine water pump and the original pulse sequence of the flow meter; It is understandable that the pressure swing extraction start command refers to the trigger signal sent by the user through the coffee machine's control panel or mobile terminal application to start making coffee. The trigger signal includes the type of coffee beverage selected by the user and the corresponding extraction parameter requirements.

[0024] When the coffee machine's main controller receives the aforementioned pressure-switching extraction start command, it needs to simultaneously acquire two key data sources: the pressure-switching sequence of the coffee machine's water pump and the raw pulse sequence of the flow meter. The pressure-switching sequence refers to a discrete sequence of target pressure values ​​that changes over time, generated by the main controller based on the aforementioned extraction parameter requirements. This discrete sequence of target pressure values ​​is used to guide the output pressure of the water pump during the subsequent extraction process. The original pulse sequence of the flow meter refers to the unprocessed square wave pulse signal sequence output by the flow meter within a corresponding time period. The frequency of the square wave pulse signal sequence is positively correlated with the flow velocity of the water flowing through the flow meter.

[0025] Existing technologies typically generate static pressure sequences by manually inputting fixed pressure points, or obtain variable pressure sequences by reading a single curve pre-stored in memory. However, these conventional techniques cannot be dynamically adapted to the actual state of the coffee beans. Another common technique is to directly read the pulse accumulation value output by the flow meter as the current flow rate, ignoring the transient characteristics of pulse frequency changes.

[0026] The detailed technical means provided in this application are as follows: after receiving the pressure swing extraction start command, the main controller triggers a periodic interrupt through an internal timer, and simultaneously reads the target pressure set value of the water pump output by the digital-to-analog converter and the pulse count value of the flow meter recorded by the microcontroller input capture module according to the preset sampling period, thereby forming a timestamp-aligned pressure swing sequence and a flow meter original pulse sequence. The aforementioned timestamp-aligned pressure swing sequence and flow meter original pulse sequence provide a data basis for subsequent extraction of pressure fluctuation characteristics and elimination of false pulse components.

[0027] Specifically, the method for obtaining the pressure change sequence of the water pump is to read the pressure curve data table pre-stored in the non-volatile memory through the communication interface of the main controller, and the method for obtaining the original pulse sequence of the flow meter is to record the high and low level transition times of the Hall flow meter output through the timer capture pin of the microcontroller.

[0028] For example, when a user selects to make an espresso extracted at 9 bar pressure, the main controller receives the aforementioned start command and retrieves the pressure change sequence corresponding to 9 bar. This sequence includes a pressure setpoint of 3 bar for 5 seconds during the pre-infusion stage and 9 bar for 25 seconds during the extraction stage. Simultaneously, the flow meter's Hall sensor continuously outputs pulse signals as the impeller rotates. The main controller captures the number of edges of these pulse signals with a sampling period of 10 milliseconds, forming the flow meter's raw pulse sequence. Furthermore, regarding the pressure change sequence and the flow meter's raw pulse sequence in the above steps, it should be noted that to ensure strict synchronization of the two data streams on the time axis, the main controller uses the same hardware timer to generate an interrupt. In the interrupt service routine, it simultaneously reads the current pressure setpoint and the value of the pulse count register, thereby avoiding pressure and flow mismatch issues caused by sampling time differences and ensuring the accuracy of subsequent calculations.

[0029] Step S2: Based on the pressure change sequence of the coffee machine's water pump, extract the pressure difference between adjacent sampling times to generate a pressure change rate sequence; Understandably, the pump's pressure variation sequence only reflects the absolute value of the target pressure at each moment. The overshoot and inertial idling errors of the flow meter impeller are essentially caused by drastic pressure fluctuations. Therefore, it is necessary to quantify the direction and amplitude of pressure fluctuations by calculating the pressure difference between adjacent acquisition moments, thereby providing a mathematical basis for subsequent identification of high-pressure acceleration and low-pressure deceleration phases. Generating a pressure change rate sequence can intuitively characterize the dynamic process of pressure rise and fall.

[0030] In some embodiments, the step of extracting the pressure difference between adjacent sampling times and generating a pressure change rate sequence based on the pressure change sequence of the coffee machine's water pump includes: Step S21: Obtain the first pressure value and the second pressure value at adjacent sampling times in the pressure transformation sequence of the coffee machine water pump; It should be noted that the first pressure value and the second pressure value are the basic data pair for calculating the pressure difference. In the pressure variation sequence of the coffee machine's water pump, the data is a discrete sequence of points arranged in chronological order of the acquisition time. The first pressure value refers to the pressure setpoint corresponding to the current acquisition time, and the second pressure value refers to the pressure setpoint corresponding to the next acquisition time adjacent to the current acquisition time.

[0031] The main controller iterates through the aforementioned pressure change sequence, sequentially extracting two adjacent pressure setpoints to form the aforementioned data pairs. In specific implementation, the main controller sets a sliding window with a size of 2, and slides the sliding window along the time axis with a step size of one acquisition time. The previous data in the window is the first pressure value, and the next data is the second pressure value. The traversal operation of the sliding window ensures that every pressure change process in the sequence is captured, providing a prerequisite for subsequent calculation of the difference.

[0032] Step S22: Calculate the difference between the acquisition time based on the first pressure value and the second pressure value, and generate a first pressure difference sequence; Specifically, to accurately quantify the magnitude of pressure fluctuations, it is necessary to calculate the difference between the second pressure value and the first pressure value. In this application, the difference between the acquisition time based on the first pressure value and the second pressure value can be calculated in the following way: In the formula, This represents the pressure difference between adjacent data collection times, in bar. This indicates the second pressure value, in bar. This represents the first pressure value, in bar. Based on the above calculations, if... A positive number indicates that the pressure is trending upwards; if... A negative number indicates that the pressure is trending downwards; if... A value of zero indicates that the pressure is constant. This is calculated by taking data from all adjacent acquisition times in the pressure variation sequence. Arranging them in chronological order generates the first pressure difference sequence. This first pressure difference sequence precisely records the pressure changes within each minute time interval of the entire pressure swing extraction process in numerical form, providing a direct basis for subsequent judgment of the impeller's stress state.

[0033] Step S23: Determine the positive or negative sign of the first pressure difference sequence to generate a pressure increase indicator sequence and a pressure decrease indicator sequence; The sign determination is to convert the numerical first pressure difference sequence into a logical identifier so that it can be matched with the flow meter pulse sequence in a timely manner.

[0034] In some embodiments, a fixed threshold is set to determine whether the pressure has increased, or a rough classification is made based on a single difference sign. In other embodiments, pressure fluctuation trends can be identified through complex frequency domain transformations.

[0035] In this embodiment of the application, it can be achieved through logical judgment, for example, by reading the first pressure difference value sequence one by one. Value, will Compare with zero to determine, when When the value is greater than zero, it is determined that the pressure is rising at the current moment, generating a pressure rise flag of 1 and a pressure fall flag of 0; when... When the value is less than zero, it is determined that the pressure is decreasing at the current moment, generating a pressure increase flag with a value of 0 and a pressure decrease flag with a value of 1; when... When the value equals zero, a pressure rise indicator with a value of 0 and a pressure fall indicator with a value of 0 are generated. Combining the pressure rise indicators generated according to the acquisition time generates a pressure rise indicator sequence, and combining the pressure fall indicators generates a pressure fall indicator sequence. In this application, the method of obtaining zero is a system-preset baseline constant. Through the above logical determination, the complex difference sequence is simplified into a clear Boolean logic sequence, greatly reducing the computational complexity of subsequent comparison processing.

[0036] Step S24: Generate a pressure change rate sequence by splicing together the pressure rise indicator sequence and the pressure fall indicator sequence; It is understandable that the pressure rise indicator sequence and the pressure fall indicator sequence independently represent the rising and falling states of pressure, but in the actual pressure change process, the rise and fall occur alternately.

[0037] To reconstruct the complete pressure fluctuation logic, the two sequences mentioned above need to be concatenated. The main controller combines the pressure rise and pressure fall indicators at the same acquisition time into a tuple; for example, when the pressure rises, the tuple is (1,0), when the pressure falls, it is (0,1), and when the pressure is constant, it is (0,0). The tuples from all acquisition times are arranged in chronological order, thus generating the pressure change rate sequence. This pressure change rate sequence records the directional characteristics of pressure fluctuations in a structured manner, providing an index basis for subsequent extraction of continuous rise and fall segments.

[0038] Step S3: Compare the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter false high correction sequence. Understandably, the spurious pulse component of the flowmeter only occurs during specific pressure fluctuation phases: high-pressure overshoot spurious pulses during the pressure rise phase and low-pressure inertial idling spurious pulses during the pressure fall phase. Therefore, it is necessary to compare the pressure change rate sequence, which characterizes the direction of pressure fluctuation, with the original pulse sequence of the flowmeter reflecting the actual pulse output in the time domain to accurately locate the time window in which the spurious pulse occurs. This allows for the calculation of the corresponding correction amount and the generation of a flowmeter overshoot correction sequence to offset the metering overshoot.

[0039] In some embodiments, the comparison processing of the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter false high correction sequence includes: Step S31: Obtain the pressure rise indicator sequence in the pressure change rate sequence and the corresponding first pulse subsequence in the original pulse sequence of the flow meter; In detail, the pressure rise identifier sequence marks all acquisition moments when the pressure is rising, while the first pulse subsequence is the pulse data segment in the original pulse sequence of the flowmeter that corresponds to the acquisition moment when the pressure is rising.

[0040] The main controller extracts the acquisition time tag corresponding to the flag bit with a value of 1 in the pressure rise flag sequence. Then, based on the acquisition time tag, it extracts pulse frequency data under the same time index from the original pulse sequence of the flowmeter. The extracted pulse frequency data is arranged in chronological order to form the first pulse subsequence. The first pulse subsequence reflects the pulse output characteristics of the flowmeter impeller when it is impacted by water flow in the high-pressure acceleration section, providing a target data source for subsequent calculation of spurious pulse components generated by impeller overshoot.

[0041] Step S32: Calculate the high-pressure overshoot correction subsequence of the flowmeter impeller based on the pressure rise identifier sequence and the first pulse subsequence; Understandably, during the pressure rise phase, the pump output pressure increases sharply, causing the water flow in the pipeline to accelerate. Under the impact of the high-pressure water flow, the flow meter impeller will experience speed overshoot, meaning that the actual speed of the impeller exceeds the theoretical speed corresponding to the actual flow rate in the pipeline, thus outputting false high-frequency pulses.

[0042] Therefore, it is necessary to locate the time period of overshoot based on the pressure rise indicator sequence, and combine the pulse frequency characteristics in the first pulse subsequence to quantify the overshoot amount and calculate the high pressure overshoot correction subsequence to deduct the excess pulse count.

[0043] In some embodiments, calculating the high-pressure overshoot correction subsequence for the flowmeter impeller based on the pressure rise identifier sequence and the first pulse subsequence includes: Step S321: Based on the pressure rise identifier sequence, extract the set of time labels for the continuously rising segments in the pressure change sequence. In practice, the main controller iterates through the pressure rise flag sequence, searching for time periods where flags with a value of 1 appear consecutively. When multiple consecutive flags with a value of 1 are detected, the start and end times corresponding to these consecutive flags are recorded. These start and end times constitute a rise segment. The time indices of all rise segments in the transformer sequence that satisfy the above consecutive rise characteristics are extracted to form a set of rise segment time tags.

[0044] In this application, the lower limit of the number of consecutive occurrences is obtained by rounding up the ratio of the mechanical response time constant of the flowmeter impeller to the sampling period. The aforementioned set of rising segment time tags precisely defines the time interval of continuous pressure increase, providing a time boundary for extracting the corresponding pulse data.

[0045] Step S322: Based on the set of rising segment time tags, extract the corresponding first pulse subsequence from the original pulse sequence of the flow meter; It is understandable that extracting data based on the set of rising segment time tags means using the start and end times of each data acquisition point in the set of rising segment time tags as indices to extract pulse data within the corresponding time window from the original pulse sequence of the flow meter.

[0046] The main controller reads the start time of a rising segment. and the end time Subsequently, the location was determined within the original pulse sequence of the flow meter. to All pulse frequency data points within the range, and the data points extracted above are arranged in chronological order to form the first pulse subsequence corresponding to the current rising segment.

[0047] By iterating through all the labels in the time label set of the rising phase and performing the above truncation operation, the first pulse subsequence corresponding to all pressure rising phases in the pressure swing extraction process can be obtained. The above operation ensures that the truncated pulse data is perfectly aligned with the pressure rising process in time.

[0048] Step S323: Capture the peak value of the first pulse subsequence to obtain the maximum pulse frequency value in the first pulse subsequence; In the pressure rise phase, the false pulses generated by the flow meter impeller due to overshoot are usually manifested as an instantaneous abnormal increase in pulse frequency.

[0049] To quantify the degree of overshoot, it is necessary to capture the frequency extrema in the first pulse subsequence. Preferably, this can be achieved using a sliding window extremum detection method. Specifically, a sliding window with a width of 3 is set. Within the window, the values ​​of the center data point are compared with those of its left and right adjacent data points. If the value of the center data point is greater than the values ​​of its left and right adjacent data points, then the center data point is determined to be a local peak. This process is repeated throughout the entire first pulse subsequence to obtain all local peaks. The values ​​of all these local peaks are compared, and the local peak with the largest value is selected as the maximum pulse frequency value. This maximum pulse frequency value accurately reflects the highest speed reached by the impeller in the high-pressure acceleration phase, providing a key parameter for subsequent calculation of the overshoot offset.

[0050] Step S324: Generate a high-pressure overshoot correction subsequence for the flowmeter impeller based on the difference between the maximum pulse frequency value and the reference frequency value; In this embodiment, the reference frequency value refers to the pulse frequency value that the actual flow rate should have under an ideal steady-state flow field without overshoot during the current pressure rise segment. The difference between the maximum pulse frequency value and the reference frequency value represents the spurious frequency increment caused by overshoot. In this application, the difference between the maximum pulse frequency value and the reference frequency value can be calculated as follows: In the formula, Indicates spurious frequency increments, in Hz; This represents the maximum pulse frequency value, in Hz. This represents the reference frequency value, in Hz.

[0051] In some embodiments, the reference frequency value can be obtained by looking up a table. For example, it can be obtained by interpolating the average pressure value of the current rising segment with the flow meter's factory calibration curve, which represents the linear correspondence between steady-state pressure and output frequency. The aforementioned spurious frequency increments are then used to calculate this value. Multiplying the overshoot duration by the number of spurious pulses generated by the high-pressure overshoot yields the number of spurious pulses. Arranging these spurious pulse counts according to the time distribution of the rise-segment time label set generates a high-pressure overshoot correction subsequence for the flowmeter impeller. This high-pressure overshoot correction subsequence quantifies the inflated flow rate caused by accelerated overshoot, providing an accurate deduction for subsequent restoration of the true flow rate.

[0052] Furthermore, regarding the high-pressure overshoot correction subsequence in the above steps, it should be noted that when the calculated... When the value is less than zero, it indicates that the flow meter has not experienced overshoot. In this case, the correction value at the corresponding moment in the high-pressure overshoot correction subsequence should be set to zero to prevent excessive deduction of normal flow pulses.

[0053] Step S33: Obtain the pressure drop identifier sequence in the pressure change rate sequence and the corresponding second pulse subsequence in the original pulse sequence of the flow meter; To eliminate spurious pulses generated by low-pressure inertial idling, it is necessary to extract flowmeter data during the pressure drop phase. The main controller extracts the acquisition time tag corresponding to the flag bit with a value of 1 in the pressure drop flag sequence. Then, based on the acquisition time tag, it extracts pulse data segments with the same time index from the original flowmeter pulse sequence. These pulse data segments, arranged chronologically, constitute the second pulse subsequence. This second pulse subsequence comprehensively reflects the pulse output characteristics of the flowmeter impeller during the low-pressure deceleration phase when it continues to idle due to its own rotational inertia, providing a target data source for subsequent calculation of spurious pulse components generated by inertial idling.

[0054] Step S34: Calculate the low-pressure inertia correction subsequence of the flowmeter impeller based on the pressure drop identification sequence and the second pulse subsequence; Understandably, during the pressure drop phase, the pump output pressure decreases sharply, causing the water flow in the pipeline to slow down. Due to its own rotational inertia, the flow meter impeller cannot immediately follow the water flow to slow down, continues to spin idly and output false pulses, causing the flow meter reading to be greater than the actual amount of water flowing through the coffee pouch.

[0055] Therefore, it is necessary to locate the time period of idling based on the pressure drop indicator sequence, and combine the pulse continuity characteristics in the second pulse subsequence to quantify the number of false pulses generated by the above idling, and calculate the low-pressure inertia correction subsequence to deduct the redundant pulse count.

[0056] In some embodiments, calculating the low-pressure inertia correction subsequence of the flowmeter impeller based on the pressure drop identifier sequence and the second pulse subsequence includes: Step S341: Based on the pressure drop identifier sequence, extract the set of time labels for the continuously decreasing segments in the pressure drop sequence; Specifically, the main controller traverses the pressure drop flag sequence, searching for time periods where flags with a value of 1 appear consecutively. When multiple consecutive flags with a value of 1 are detected, the start and end times of the acquisition corresponding to these consecutive flags are recorded. These start and end times constitute a drop segment. The time indices of all drop segments in the transformer sequence that satisfy the above continuous drop characteristic are extracted to form a drop segment time tag set. This drop segment time tag set precisely defines the time interval of continuous pressure reduction, providing a time boundary for extracting corresponding pulse data and calculating the inertial idling time.

[0057] Step S342: Based on the set of falling segment time tags, extract the corresponding second pulse subsequence from the original pulse sequence of the flowmeter; In detail, truncation based on the falling segment time stamp set refers to extracting pulse data within the corresponding time window from the flowmeter's raw pulse sequence using the start and end times of each acquisition time stamp in the falling segment time stamp set as indices. The main controller reads the start time of a falling segment. and the end time Subsequently, the location was determined within the original pulse sequence of the flow meter. to All pulse frequency data points within the range, arranged in chronological order, constitute the second pulse subsequence corresponding to the current descent segment. By traversing all tags in the descent segment time tag set and performing the above truncation operation, the second pulse subsequence corresponding to all pressure descent stages in the pressure swing extraction process can be obtained. This operation ensures that the truncated pulse data is perfectly aligned with the pressure descent process in time.

[0058] Step S343: Perform pulse zero-crossing detection on the second pulse subsequence to obtain the pulse duration in the second pulse subsequence; It should be noted that during the pressure drop phase, the actual velocity of the water flow may have dropped to extremely low levels or even zero, but due to impeller inertia, the pulse signal will still persist for a period of time. To quantify the aforementioned inertial idling time, zero-crossing detection of the second pulse subsequence is required.

[0059] In some embodiments, a fixed voltage threshold can be set to determine the presence or absence of a pulse, or the number of pulse edges can be directly recorded by a counter; In other embodiments, the pulse decay process can be manually observed using an oscilloscope.

[0060] The detailed technical means provided in this application involves comparing the pulse frequency value in the second pulse subsequence with a frequency threshold approaching zero. When the pulse frequency value changes from a state greater than the aforementioned frequency threshold to a state less than the aforementioned frequency threshold, it is recorded as a zero-crossing point. The time corresponding to the zero-crossing point is the actual disappearance time of the pulse caused by inertial idling. The time length between the actual disappearance time and the start time of the pressure drop segment is calculated, and this time length is the pulse duration. In this application, the frequency threshold approaching zero is obtained based on a calibration experiment of the mechanical friction resistance of the flowmeter impeller. The pulse duration accurately reflects the actual duration for which the impeller overcomes inertial idling, providing a time dimension parameter for subsequent calculation of the number of false pulses.

[0061] Step S344: Generate a low-pressure inertia correction subsequence for the flowmeter impeller based on the difference between the pulse duration and the theoretical outflow duration. This application provides a method for calculating a low-pressure inertial correction subsequence to address the problem of spurious pulse metering caused by impeller inertial idling during the pressure drop phase. The theoretical outflow duration refers to the reasonable duration of the pulse that should last, calculated based on the actual water flow velocity during the current pressure drop phase. The pulse duration includes the additional time extended due to inertial idling. Therefore, the difference between the pulse duration and the theoretical outflow duration is the pure inertial idling duration. In the embodiments of this application, the difference between the pulse duration and the theoretical outflow duration can be calculated as follows: In the formula, Indicates the duration of inertial idling, measured in seconds (s). Indicates the duration of the pulse, measured in seconds (s). This represents the theoretical outflow duration, in seconds (s). The above theoretical outflow duration... The theoretical outflow duration can be calculated as follows: Calculate the average pressure value based on the pressure values ​​at the beginning and end of the descent phase. Then, use this average pressure value to look up the average theoretical flow rate in a table. Finally, calculate the ratio of the total water output by the pump during the descent phase to the average theoretical flow rate. This ratio represents the theoretical outflow duration. In obtaining the duration of inertial idling. Afterwards, Multiplying the number of false pulses generated by the inertial idling phase by the average pulse frequency yields the number of false pulses generated by the inertial idling. Arranging these false pulse numbers according to the time distribution of the falling segment time label set generates the low-pressure inertial correction subsequence of the flowmeter impeller.

[0062] It should be noted that during pressure swing extraction, the rate of pressure drop may exhibit non-linear extreme cases, especially when the water pump suddenly stops or the pressure drops sharply. In such cases, the inertial idling time of the flow meter impeller may exceed the conventional decay limit of the physical system, thus affecting the calculated inertial idling time. An abnormally large value may occur, leading to overcorrection.

[0063] Therefore, in this application, when the inertial idling time is obtained... At that time, first of all, the above Compare with the maximum permissible idling time threshold set by the system; if If the value is less than or equal to the maximum permissible idling time threshold mentioned above, then continue the judgment. Is it greater than zero? If it is greater than zero, then... The product of the above average pulse frequency and the current descent segment's spurious pulse count is taken as the number of spurious pulses. If the value is less than or equal to zero, it indicates that there is no obvious inertial idling, and the number of false pulses in the current descent segment is set to zero. like If the idling time exceeds the maximum permissible idling time threshold, an abnormal fluctuation is determined. In this case, the product of the maximum permissible idling time threshold and the average pulse frequency is used as the upper limit of the number of false pulses in the current falling segment. At the same time, the pulses exceeding the maximum permissible idling time threshold are converted according to the exponential decay law and added to the number of false pulses.

[0064] In this application, the above-mentioned maximum permissible idling time threshold is obtained by dynamic simulation calculation based on the rotational inertia of the flowmeter impeller and the fluid damping coefficient.

[0065] Furthermore, regarding the theoretical outflow duration in the above steps, it should be noted that when the gradient change in the pressure drop section is extremely small, the calculation of the theoretical outflow duration may produce a truncation error due to sensor accuracy issues. In this case, a minimum outflow duration limit needs to be introduced, that is, the calculated theoretical outflow duration is compared with the preset minimum outflow duration, and the larger of the two is taken as the final theoretical outflow duration, to ensure the robustness of the correction logic.

[0066] Step S35: Time sequence splicing of the high pressure overshoot correction subsequence and the low pressure inertia correction subsequence to generate the flow meter false high correction sequence; In other words, the high-pressure overshoot correction subsequence only includes the correction amount for the pressure rise segment, and the low-pressure inertia correction subsequence only includes the correction amount for the pressure fall segment. However, during the entire pressure swing extraction process, pressure rises and falls alternate, and the correction amount is zero during the constant pressure segment. Therefore, it is necessary to sequentially concatenate the high-pressure overshoot correction subsequence, the low-pressure inertia correction subsequence, and the zero-correction sequence according to their actual occurrence order, based on time stamps.

[0067] The main controller establishes an all-zero sequence of the same length as the original pulse sequence of the flowmeter as the initial correction sequence. Then, based on the rising segment time tag corresponding to the high-pressure overshoot correction subsequence, the high-pressure overshoot correction amount is filled into the corresponding position of the initial correction sequence; based on the falling segment time tag corresponding to the low-pressure inertia correction subsequence, the low-pressure inertia correction amount is filled into the corresponding position of the initial correction sequence; uncovered positions remain zero. The sequence after these fillings is the flowmeter false high correction sequence. This flowmeter false high correction sequence completely covers the distribution of false pulses throughout the entire extraction cycle, providing an accurate deduction basis for subsequent global flow compensation.

[0068] Step S4: Calculate the true cumulative flow rate of the pressure swing extraction process based on the flow meter false high correction sequence and the original pulse sequence of the flow meter. Understandably, the flow meter overshoot correction sequence only represents the spurious pulse components that should be deducted at each moment, while actual control requires a cumulative scalar value that reflects the true volume of extractant. Therefore, the original flow meter pulse sequence and the flow meter overshoot correction sequence must be combined, integrated and accumulated separately, and then the difference must be calculated to reconstruct the true cumulative flow value after eliminating all dynamic response errors, providing a reliable basis for determining the extraction endpoint.

[0069] In some embodiments, calculating the true cumulative flow value of the pressure swing extraction process based on the flow meter false high correction sequence and the original flow meter pulse sequence includes: Step S41: Perform full-time cumulative calculation on the original pulse sequence of the flow meter to generate the original cumulative flow value extracted by the coffee machine; Specifically, the flowmeter's raw pulse sequence contains the superposition of all real and spurious flow pulses. Accumulating these pulses over the entire time sequence yields the total apparent flow rate. The main controller reads the frequency value of each pulse in the flowmeter's raw pulse sequence from the start of the transformer extraction process to the current acquisition time, and then adds the product of these pulse frequencies and the sampling period.

[0070] In this application, the aforementioned original cumulative flow value can be calculated in the following way: In the formula, This represents the original cumulative flow rate, in ml. Indicates the first The pulse frequency value at each acquisition moment, in Hz; This represents the pulse equivalent, which is the fluid volume corresponding to a single pulse, and is expressed in ml / pulse. Indicates the sampling period, in seconds; This represents the current cumulative number of sampling points. The above is the original cumulative flow value. This reflects the flow meter reading without any correction, and its value is necessarily greater than the actual amount of water flowing through the coffee puck due to the inclusion of false components caused by overshoot and idling.

[0071] Step S42: Perform a full-time cumulative calculation on the flow meter false high correction sequence to generate the false high cumulative flow value extracted by the coffee machine; Accordingly, the flow meter overage correction sequence contains the distribution of all spurious pulse components that should be deducted. Accumulating these components over the entire time sequence yields the total overage flow rate. Similarly, the main controller reads each correction value from the start of the transformer extraction process to the current acquisition time, and then adds the product of these correction values ​​and the sampling period. In this application, the aforementioned cumulative overage flow rate value can be calculated as follows: In the formula, This indicates an artificially inflated cumulative flow rate, in ml. Indicates the first The value of the false height correction at each acquisition time, in Hz; This indicates the pulse equivalent, with units of ml / pulse. This indicates the sampling period, measured in seconds. The above-mentioned artificially inflated cumulative flow values... The total spurious liquid volume generated by dynamic response error during the entire pressure swing extraction process was quantified, providing a deduction item for subsequent accurate restoration of the true flow rate.

[0072] Step S43: Obtain the difference between the original cumulative flow value and the artificially inflated cumulative flow value, and generate a flow error compensation value; The original cumulative traffic value includes both real and spurious traffic, while the inflated cumulative traffic value only includes spurious traffic; physically, they have an inclusion-and-be-included relationship. To extract the pure error, it is necessary to calculate the difference between the original cumulative traffic value and the inflated cumulative traffic value. In this application, the difference between the original cumulative traffic value and the inflated cumulative traffic value can be calculated as follows: In the formula, This represents the flow error compensation value, in ml. This represents the original cumulative flow rate, in ml. This represents the inflated cumulative flow rate value, in ml. The above flow rate error compensation value... Numerically, this is equal to the net flow rate after eliminating the dynamic error caused by voltage fluctuations, representing the total amount of water actually flowing through the coffee grounds. The generation of this flow error compensation value completely eliminates the interference of spurious pulses on the cumulative measurement, providing a core intermediate quantity for obtaining the true cumulative flow rate value. Furthermore, regarding the flow error compensation value in the above steps, it should be noted that since sensor noise may cause slight fluctuations in the artificially inflated correction value at individual moments, a moving average filter can be applied to the artificially inflated cumulative flow rate value before calculating the difference to smooth the jumps in the compensation curve and improve the stability of the final flow rate output.

[0073] Step S44: Calculate the true cumulative flow value of the pressure swing extraction process based on the superposition of the flow error compensation value and the original cumulative flow value; Preferably, in order to ensure that the final flow rate value used to control the extraction endpoint is absolutely accurate, the flow rate error compensation value and the original cumulative flow rate value need to be calculated by a double-check superposition.

[0074] In existing technologies, conventional methods typically estimate the actual flow rate by multiplying a fixed discount factor by the original flow rate, or by obtaining correction factors under different pressures through a lookup table and directly multiplying them by the original flow rate. Another method is to use the Kalman filter algorithm to estimate the flow rate in a state, but these methods require accurate mathematical models and are computationally complex.

[0075] Therefore, this application will use the flow error compensation value. Compared with the original cumulative flow value Dynamic weighting calculations are performed, introducing a dynamic confidence weighting factor. The actual cumulative traffic value is calculated as follows: In the formula, This represents the actual cumulative flow rate, in ml. This represents the dynamic confidence weighting factor, with a value ranging from 0 to 1; This represents the flow error compensation value, in ml. This represents the original cumulative flow rate, in ml.

[0076] The above dynamic confidence weighting factors The acquisition logic is as follows: First, calculate the flow error compensation value. Compared with the original cumulative flow value The ratio of the above ratio to the preset reasonable confidence interval indicates that the correction result is reliable, and the dynamic confidence weight factor is then applied. Set to 1, at which point the actual cumulative traffic value is... Completely equal to the flow error compensation value ; When the above ratio exceeds the reasonable confidence interval, it indicates that abnormal fluctuations may occur during the correction process. In this case, the dynamic confidence weighting factor is calculated based on the absolute value of the current pressure change rate. The larger the absolute value of the pressure change rate, the higher the dynamic confidence weighting factor. The closer the value is to 1, the smaller the absolute value of the rate of change of pressure, and the higher the dynamic confidence weighting factor. The closer it is to 0.5.

[0077] In this application, the aforementioned reasonable confidence interval is obtained through statistical analysis of numerous calibration experiments under different pressure-switching curves. For example, when making a 9-bar espresso, if the main controller calculates the original cumulative flow rate at the current moment as 45 ml and the artificially inflated cumulative flow rate as 5 ml, then the flow error compensation value is 40 ml, with a ratio of approximately 0.89, which falls within the reasonable confidence interval of 0.8 to 1.0. The dynamic confidence weighting factor... Since the value is 1, the actual cumulative flow rate is directly updated to 40ml.

[0078] The above-mentioned method of calculating the actual cumulative flow value not only ensures high-precision compensation under normal variable pressure conditions, but also provides a fault-tolerant mechanism under extreme fluctuation conditions, avoiding serious insufficient liquid output due to over-correction, and ensuring the reliability of the coffee machine control system.

[0079] Furthermore, regarding the dynamic confidence weighting factor in the above steps, it should be noted that the dynamic adjustment logic of the weighting factor is as follows: extract the absolute value of the pressure change rate at the current moment, calculate the ratio of the absolute value of the pressure change rate to the maximum design change rate threshold, and when the ratio is greater than 1, forcibly adjust the dynamic confidence weighting factor. Set to 1; when the above ratio is less than or equal to 1, the sum of the power of 0.5 of the above ratio and 0.5 is used as the dynamic confidence weight factor. This ensures that the compensation value is prioritized during drastic voltage changes, while both the original value and the compensation value are considered during gradual voltage changes.

[0080] Step S5: In response to the actual cumulative flow value reaching the preset extraction target value, a stop extraction command is generated for the coffee machine water pump, such as... Figure 2 As shown, where; This application provides a method for generating a stop extraction command to solve the problems of premature shutdown and insufficient liquid output caused by inaccurate metering in existing technologies. In the pressure swing extraction process, the actual cumulative flow rate is the only accurate indicator reflecting the actual amount of coffee liquid output.

[0081] In existing technologies, conventional methods typically involve comparing the original pulse accumulation value of the flow meter with the target value to control shutdown, or using a timed control method to directly set the extraction time. In other embodiments, shutdown can be controlled based on feedback from the weighing sensor, but the aforementioned weighing sensor is expensive and susceptible to vibration interference.

[0082] At the end of each sampling period, the main controller of this application will display the latest calculated actual cumulative flow value. Compared with the preset extraction target value Comparison and judgment; when the actual cumulative traffic value is detected. Greater than or equal to the preset extraction target value If this occurs, the extraction stop logic will be triggered immediately; It should be noted that the main controller sends a low-level signal to the water pump drive circuit to cut off the power supply to the water pump, and simultaneously sends a close signal to the solenoid valve to block the water flow path. These low-level and close signals together constitute the stop extraction command for the coffee machine's water pump. In this application, the preset extraction target value is obtained by reading it from the system's recipe database based on the type of coffee beverage selected by the user and the cup size.

[0083] For example, when a user selects to make a 40ml single shot of espresso, the preset extraction target value is set to 40ml. When the actual cumulative flow reaches 40ml, the main controller will resolutely execute a shutdown operation regardless of how much the cumulative value of the original pulse sequence of the flow meter is displayed. This avoids premature shutdown caused by falsely high original pulses, ensuring that the actual amount of coffee liquid falling into the cup is exactly 40ml, and the coffee flavor is fully extracted.

[0084] It should also be noted that, in order to prevent water hammer effect in the pipeline caused by the sudden stop of the water pump, the above-mentioned extraction stop logic can also include a flexible shutdown strategy, that is, when the actual cumulative flow value... Distance from preset extraction target value When the difference is only a preset lead time, first reduce the pump's duty cycle to 50% and run it until the actual cumulative flow value is reached. Fully achieve the preset extraction target value Then, completely cut off the power supply to the water pump. The aforementioned advance amount is calculated based on the product of the pipeline length and the fluid velocity.

[0085] In some embodiments, it also includes: Step S6: In response to the fact that the actual cumulative flow value has not reached the preset extraction target value, obtain the current pressure value and the current pressure change rate in the pressure change sequence; In detail, during pressure swing extraction (PSA), if the actual cumulative flow rate is less than the preset extraction target value, it indicates that the extraction process is not yet complete and the PSA effluent operation needs to continue. At this point, to dynamically optimize the PSA curve and improve extraction quality, it is necessary to obtain the pressure status parameters at the current moment. The main controller reads the pressure setpoint corresponding to the current acquisition moment in the PSA sequence as the current pressure value, and simultaneously reads the pressure difference corresponding to the current acquisition moment in the first pressure difference sequence as the current pressure change rate. The current pressure value reflects the current output load of the pump, and the current pressure change rate reflects the severity of pressure fluctuations. These two parameters provide real-time status input for subsequent judgment on whether intervention and adjustment of the PSA sequence are needed, ensuring that the PSA process remains within the optimal pressure fluctuation range.

[0086] Step S7: Based on the current pressure value and the current pressure change rate, generate the pressure change sequence update value of the coffee machine water pump for the next moment; Understandably, while pressure swing extraction can enhance the flavor of coffee, if the pressure fluctuations are too drastic, it can cause the coffee puck to perforate or break down, creating a channeling effect. If the pressure fluctuations are too gentle, the tumbling effect of pressure swing extraction will not be achieved.

[0087] Therefore, it is necessary to dynamically adjust the pressure setpoint for the next moment based on the current pressure value and the current pressure change rate, and generate a pressure change sequence update value so that the pressure change curve can adapt to the real-time penetration resistance of the coffee puck, thus ensuring extraction efficiency while avoiding channel effects.

[0088] Step S71: Determine the range of the current pressure value in the pressure variation sequence and obtain the preset pressure range label to which the current pressure value belongs; In practice, the main controller has multiple preset pressure ranges, each with a unique preset pressure range label. The main controller compares the current pressure value with the upper and lower limits of the multiple pressure ranges to determine which pressure range the current pressure value falls into, and then outputs the preset pressure range label corresponding to that pressure range.

[0089] For example, the pressure range can be divided into a low-pressure pre-infusion range, a medium-pressure transition range, and a high-pressure extraction range, with corresponding labels of 1, 2, and 3, respectively. When the current pressure value is 4 bar, it falls into the medium-pressure transition range, and the obtained preset pressure range label is 2. In this application, the above-mentioned preset pressure range label is obtained by dividing the rated working pressure range of the coffee machine's water pump into equal intervals. The above-mentioned range determination operation discretizes continuous pressure values ​​into a finite number of logical labels, reducing the computational load of subsequent matching threshold lookup and improving the real-time response speed of the system.

[0090] Step S72: Match the target rate of change threshold corresponding to the current pressure range during the pressure swing extraction process according to the preset pressure range label; Different pressure zones have varying tolerances for pressure fluctuations, thus requiring different target rate of change thresholds for adjustment. In the low-pressure pre-infusion zone, the coffee puck is not yet fully wetted, so pressure fluctuations should be as gentle as possible, and the target rate of change threshold should be small. In the high-pressure extraction zone, the water flow has strong penetrating power, allowing for larger pressure fluctuations to create a tumbling effect, and the target rate of change threshold should be larger.

[0091] In some embodiments, a globally uniform rate of change limit can be used for constraint, or fixed thresholds for different stages can be set through human experience; In this application, specifically, the main controller maintains a two-dimensional lookup table. The row index of this lookup table is a preset pressure range label, the column index is a fluctuation direction indicator, and the table entry content is a target rate of change threshold. The main controller searches and matches the currently acquired preset pressure range label and the sign of the current pressure rate of change in the two-dimensional lookup table to extract the target rate of change threshold at the corresponding position. In this application, the target rate of change threshold in the two-dimensional lookup table is obtained through orthogonal extraction experiments calibrated with coffee beans of different roast levels.

[0092] For example, when the preset pressure range label is 1, i.e., the low-pressure pre-soaking range, and the fluctuation direction is upward, the matched target change rate threshold may be 0.5 bar / s; when the preset pressure range label is 3, i.e., the high-pressure extraction range, and the fluctuation direction is upward, the matched target change rate threshold may be 2.0 bar / s.

[0093] Furthermore, the aforementioned two-dimensional lookup table is loaded from non-volatile memory into memory during system initialization, and when the coffee machine executes its self-cleaning program, the contents of the table entries can be finely adjusted and calibrated according to the actual attenuation characteristics of the water pump to ensure the long-term validity of the matching results.

[0094] Step S73: In response to the current pressure change rate exceeding the target change rate threshold, a constant pressure maintenance command is generated based on the current pressure value, such as... Figure 3As shown, specifically; It should be noted that when the current pressure change rate exceeds the target change rate threshold, it indicates that the current pressure fluctuation is too drastic. Continuing to execute the original pressure change sequence is highly likely to cause channel effects or serious inaccuracies in flow meter measurement. At this time, it is necessary to forcibly stop the continued pressure change and stabilize the pressure at the current level. The main controller compares the absolute value of the current pressure change rate with the matched target change rate threshold. If the absolute value of the current pressure change rate is greater than the target change rate threshold, the constant pressure maintenance logic is triggered. The constant pressure maintenance logic described above extracts the current pressure value as the maintenance target, freezes the time progression of the pressure variation sequence, and generates a constant pressure maintenance command. This command controls the water pump to maintain a constant output pressure for the next few sampling cycles until the pressure change rate falls back to a safe range. This operation effectively curbs drastic pressure spikes or drops, providing a buffer period for the flow meter to restore accurate measurement under steady-state flow conditions, while also preventing excessive stress damage to the coffee puck.

[0095] Step S74: Based on the constant pressure maintenance command and the current pressure value, generate the pressure change sequence update value of the coffee machine water pump at the next moment; Understandably, the constant pressure maintenance command is merely a logical trigger signal, which needs to be converted into a specific pressure setpoint sequence executable by the pump drive layer, i.e., the variable pressure sequence update value. By combining the current pressure value with the time span of constant pressure maintenance, a local pressure sequence inserted into the constant pressure platform is generated, replacing the corresponding part in the original variable pressure sequence. This achieves proactive peak smoothing and valley filling for drastic fluctuations, ensuring a smooth and stable extraction process.

[0096] Step S741: In response to the constant pressure maintenance command, extract the current pressure value from the variable pressure sequence as the constant pressure target value of the water pump; In other words, upon receiving the constant pressure maintenance command, the main controller immediately locks the pressure setpoint corresponding to the current acquisition moment in the pressure variation sequence, i.e., the current pressure value. Since this current pressure value represents the actual operating pressure of the system at the moment the fluctuation limit is triggered, extracting it and defining it as the constant pressure target value for the water pump ensures that the water pump will not experience a pressure step jump during the subsequent maintenance phase. This constant pressure target value will serve as the reference amplitude for generating the constant pressure segment pressure sequence, ensuring a seamless connection between the starting point of the constant pressure operation and the original pressure variation curve, avoiding secondary shocks to the extraction system due to sudden pressure changes.

[0097] Step S742: Parse the constant pressure maintenance command and obtain the maintenance time period tag of the pressure swing extraction process corresponding to the constant pressure maintenance command; Specifically, the constant voltage maintenance instruction not only contains the logic information to trigger the maintenance, but also encodes the duration for which the constant voltage needs to be maintained. The main controller parses the data frame of the constant voltage maintenance instruction, extracts the timestamp and duration parameters, and calculates the start and end times of the constant voltage operation based on the timestamp and duration parameters. The start and end times constitute the maintenance time period label.

[0098] In this application, the aforementioned duration parameter is obtained by calculating the product of the magnitude by which the current pressure change rate exceeds the target change rate threshold and a preset time step. The aforementioned maintenance time period label clarifies the time domain of the constant pressure control, providing a time coordinate framework for subsequently generating specific pressure sequence points.

[0099] Step S743: Based on the constant pressure target value and the maintenance time period label, generate the constant pressure segment pressure sequence of the coffee machine water pump; In a preferred implementation, to maintain absolute pressure stability during the maintenance period, the main controller calculates the number of sampling points within that period based on the start and end times in the maintenance period label. Then, it assigns the constant pressure target value to all the sampling points, generating a discrete sequence of multiple identical pressure values. This discrete sequence is the constant pressure segment pressure sequence of the coffee machine's water pump. This constant pressure segment pressure sequence is represented as a horizontal pressure plateau on the time axis. This pressure plateau effectively blocks the sharp rises or falls in the original pressure swing sequence, forcing the water flow into a brief steady-state flow state. This provides the physical conditions for the flow meter impeller to recover from overshoot or idling, and also provides a buffer time for the coffee puck to absorb moisture and release gas, greatly improving the robustness of pressure swing extraction and the consistency of the finished product.

[0100] It should also be noted that when the maintenance period ends, in order to avoid the pressure sudden change caused by jumping directly from the constant pressure value back to the original pressure sequence set value, a ramp transition section can be added at the end of the constant pressure section pressure sequence. The pressure value of the ramp transition section smoothly transitions to the set value of the original pressure sequence at the corresponding time in a linear increasing or decreasing manner, ensuring the global smoothness of the pressure curve.

[0101] Step S8: Replace and update the pressure sequence of the coffee machine water pump during the pressure swing extraction process based on the pressure swing sequence update value; Furthermore, after generating the transformer sequence update value, the main controller needs to overwrite the updated value into the active sequence storage area. Specifically, the main controller locates the time period index corresponding to the transformer sequence update value in the original transformer sequence, deletes the original pressure setpoint within the time period index, and sequentially inserts the data points from the transformer sequence update value into the time period index position, thereby completing the partial replacement update of the transformer sequence.

[0102] The aforementioned replacement and update operations substantially changed the control objective of the subsequent water pump, correcting the originally drastically fluctuating pressure curve into an optimized curve that includes a constant pressure platform. This ensured that the pressure swing extraction process always operated within the flow field range that the flow meter could accurately measure, thus guaranteeing the accuracy of the calculation of the actual cumulative flow value.

[0103] Step S9: In response to the updated pressure sequence, control the coffee machine water pump to perform the next cycle of pressure-dispensing water operation; Intuitively, the updated transformer sequence serves as the final basis for the main controller's closed-loop control of the water pump. When the next control cycle arrives, the main controller reads the pressure setpoint for the next moment in the updated transformer sequence, converts this pressure setpoint into a corresponding analog voltage or current signal via a digital-to-analog converter, and outputs it to the water pump drive board. The water pump drive board adjusts the water pump motor's speed or duty cycle based on the analog voltage or current signal, thereby changing the water pump's output pressure and executing the transformer-controlled water discharge operation.

[0104] For example, if the next time step in the updated pressure swing sequence is set to a constant pressure of 5 bar, the main controller outputs the corresponding control quantity to ensure the water pump outputs a stable pressure of 5 bar. If the setting is to increase the pressure to 9 bar, the main controller outputs an increasing control quantity according to the slope. This operation transforms the digital sequence update into a physical change in water flow pressure, achieving precise closed-loop control of the pressure swing extraction process and completely eliminating the problem of insufficient liquid output caused by the dynamic response error of the flow meter.

[0105] Figure 4 The diagram illustrates the core data entities and processing logic of the variable pressure extraction control method for an automatic coffee machine. The system uses the variable pressure sequence and the original pulse sequence from the flow meter as input data. It calculates the pressure difference sequence to generate a pressure change rate sequence and extracts pressure rise and fall indicator sequences. Simultaneously, it calculates high-pressure overshoot correction sub-sequences and low-pressure inertia correction sub-sequences based on the original pulse sequence, and then concatenates them to generate a flow meter overshoot correction sequence. Furthermore, based on the overshoot correction sequence and the original pulse sequence, it calculates the actual cumulative flow value and compares it with a preset extraction target value. If the target value is reached, a stop extraction command is generated; otherwise, it determines whether a constant pressure segment sequence needs to be generated to update the variable pressure sequence based on the current pressure state, forming a closed-loop control. This architecture diagram demonstrates the dynamic compensation mechanism for flow meter overshoot correction and the adaptive adjustment strategy for pressure fluctuations during the variable pressure extraction process.

[0106] Figure 5This paper illustrates the temporal correspondence between pressure fluctuations and the dynamic response error of a flow meter during the variable pressure extraction process of an automatic coffee machine. The blue solid line in the figure represents the variable pressure sequence P output by the water pump, including the pre-immersion constant pressure section, the sinusoidal variable pressure extraction section, and the linear pressure reduction section; the green dashed line represents the theoretical reference frequency f_base calculated based on the steady-state flow field, which is strictly positively correlated with the pressure value; the red solid line represents the measured pulse frequency of the flow meter. As can be seen from the figure, during the pressure rise section (dP / dt>0), the flow meter impeller experiences overshoot due to the impact of the high-pressure water flow, resulting in a measured frequency significantly higher than the reference frequency; during the pressure fall section (dP / dt<0), the impeller idles due to rotational inertia, causing the measured frequency to decay significantly behind the reference frequency. This dynamic response error results in the measured pulse integral area being larger than the theoretical pulse area. Direct accumulation of these areas will lead to an artificially high flow rate, verifying the necessity of dynamically eliminating high-pressure overshoot and low-pressure inertial spurious pulses based on the pressure change rate sequence in this application.

[0107] Figure 2 This paper demonstrates the changes in cumulative output volume and the shutdown control effect before and after flow correction during pressure swing extraction (PSE). Taking a preset extraction target of 40ml as an example, the solid green line represents the actual output volume flowing through the coffee puck, while the dashed red line represents the uncorrected original pulse accumulation value from the flow meter. This value is significantly inflated due to spurious pulse components generated by high-pressure overshoot and low-pressure idling, causing the system to prematurely trigger the stop-extraction command at approximately 26.5 seconds, when the actual output volume is only about 35.8ml, resulting in insufficient extraction. The solid blue line represents the true cumulative flow value corrected using the method described in this application. Dynamic compensation is achieved through a correction sequence generated based on pressure change rate sequence comparison, and the curve closely matches the actual output volume, allowing the system to accurately shut down at approximately 28.2 seconds. This data clearly demonstrates that this application can effectively eliminate spurious pulse components, restore the true extraction volume, and prevent the coffee machine from prematurely shutting down due to inflated metering and insufficient output.

[0108] This embodiment also provides an automatic coffee machine variable pressure extraction control system, including: a first acquisition module, a first generation module, a comparison and processing module, a calculation module, and a control module; The first acquisition module is used to respond to the pressure swing extraction start command and acquire the pressure swing sequence of the coffee machine water pump and the original pulse sequence of the flow meter; The first generation module is used to extract the pressure difference between adjacent acquisition times based on the pressure change sequence of the coffee machine's water pump, and generate a pressure change rate sequence. The comparison processing module is used to compare the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter false high correction sequence. The calculation module is used to calculate the true cumulative flow value of the pressure swing extraction process based on the flow meter false high correction sequence and the original pulse sequence of the flow meter; The control module is used to generate a stop extraction command for the coffee machine's water pump when the actual cumulative flow value reaches the preset extraction target value.

[0109] The above-mentioned unit modules can be embedded in the processor of the electronic device in hardware form or independent of it, or they can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of the above modules.

[0110] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0111] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for controlling the variable pressure extraction of an automatic coffee machine, characterized in that, include: In response to the pressure swing extraction start command, the pressure swing sequence of the coffee machine's water pump and the raw pulse sequence of the flow meter are obtained; Based on the pressure change sequence of the coffee machine's water pump, the pressure difference between adjacent sampling times is extracted to generate a pressure change rate sequence; The pressure change rate sequence and the original pulse sequence of the flow meter are compared and processed to generate a flow meter false high correction sequence. The true cumulative flow rate of the pressure swing extraction process is calculated based on the flow meter false high correction sequence and the original pulse sequence of the flow meter. In response to the actual cumulative flow value reaching the preset extraction target value, a stop extraction command is generated for the coffee machine's water pump.

2. The automatic coffee machine variable pressure extraction control method as described in claim 1, characterized in that: The step of extracting the pressure difference between adjacent sampling times based on the pressure change sequence of the coffee machine's water pump to generate a pressure change rate sequence includes: Obtain the first and second pressure values ​​at adjacent sampling times in the pressure transformation sequence of the coffee machine's water pump; The difference between the acquisition time is calculated based on the first pressure value and the second pressure value to generate the first pressure difference sequence; The first pressure difference value sequence is judged by positive and negative signs to generate a pressure increase indicator sequence and a pressure decrease indicator sequence. A pressure change rate sequence is generated by splicing together the pressure rise indicator sequence and the pressure fall indicator sequence.

3. The automatic coffee machine variable pressure extraction control method as described in claim 2, characterized in that: The process of comparing the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter overshoot correction sequence includes: Obtain the pressure rise indicator sequence from the pressure change rate sequence and the corresponding first pulse subsequence from the original pulse sequence of the flow meter; Based on the pressure rise indicator sequence and the first pulse subsequence, calculate the high pressure overshoot correction subsequence for the flowmeter impeller; Obtain the pressure drop indicator sequence from the pressure change rate sequence and the corresponding second pulse subsequence from the original pulse sequence of the flow meter; Based on the pressure drop indicator sequence and the second pulse subsequence, calculate the low-pressure inertia correction subsequence of the flowmeter impeller; The high-pressure overshoot correction subsequence and the low-pressure inertia correction subsequence are time-sequentially spliced ​​to generate the flowmeter false high correction sequence.

4. The automatic coffee machine variable pressure extraction control method as described in claim 3, characterized in that: The step of calculating the high-pressure overshoot correction sub-sequence for the flowmeter impeller based on the pressure rise identifier sequence and the first pulse sub-sequence includes: Based on the pressure rise identifier sequence, extract the set of time labels for the continuously rising rise segments in the pressure change sequence; Based on the set of rising segment time labels, extract the corresponding first pulse subsequence from the original pulse sequence of the flowmeter; Peak capture is performed on the first pulse subsequence to obtain the maximum pulse frequency value in the first pulse subsequence; Based on the difference between the maximum pulse frequency value and the reference frequency value, a high-pressure overshoot correction sequence for the flowmeter impeller is generated.

5. The automatic coffee machine variable pressure extraction control method as described in claim 4, characterized in that: The step of calculating the low-pressure inertia correction sub-sequence of the flowmeter impeller based on the pressure drop identifier sequence and the second pulse sub-sequence includes: Based on the pressure drop identifier sequence, extract the set of time labels for the continuously decreasing segments in the pressure drop sequence; Based on the set of time labels for the falling segment, extract the corresponding second pulse subsequence from the original pulse sequence of the flowmeter; Perform pulse zero-crossing detection on the second pulse subsequence to obtain the pulse duration in the second pulse subsequence; Based on the difference between the pulse duration and the theoretical outflow duration, a low-pressure inertia correction subsequence for the flowmeter impeller is generated.

6. The automatic coffee machine variable pressure extraction control method as described in claim 5, characterized in that: The calculation of the true cumulative flow value of the pressure swing extraction process based on the flow meter false high correction sequence and the original pulse sequence of the flow meter includes: The original pulse sequence of the flow meter is accumulated over time to generate the original cumulative flow value extracted by the coffee machine. The flow meter over-extension correction sequence is accumulated over time to generate the cumulative over-extension flow rate value extracted by the coffee machine. Obtain the difference between the original cumulative traffic value and the artificially inflated cumulative traffic value, and generate a traffic error compensation value; The true cumulative flow rate of the pressure swing extraction process is calculated by superimposing the flow error compensation value and the original cumulative flow rate value.

7. The automatic coffee machine variable pressure extraction control method as described in claim 6, characterized in that: Also includes: In response to the actual cumulative flow value not reaching the preset extraction target value, the current pressure value and current pressure change rate in the pressure transformer sequence are obtained; Based on the current pressure value and the current pressure change rate, generate the pressure change sequence update value of the coffee machine water pump for the next moment; Based on the pressure change sequence update value, replace and update the pressure change sequence of the coffee machine water pump during the pressure change extraction process; In response to the updated pressure sequence, the coffee machine's water pump is controlled to perform the next cycle of pressure-discharge water operation.

8. The automatic coffee machine variable pressure extraction control method as described in claim 7, characterized in that: The step of generating the pressure change sequence update value of the coffee machine water pump for the next moment based on the current pressure value and the current pressure change rate includes: The current pressure value in the pressure variation sequence is determined by the range, and the preset pressure range label to which the current pressure value belongs is obtained; Based on the preset pressure range label, match the target rate of change threshold corresponding to the current pressure range during the pressure swing extraction process; In response to the current pressure change rate exceeding the target change rate threshold, a constant pressure maintenance command is generated based on the current pressure value; Based on the constant pressure maintenance command and the current pressure value, the pressure change sequence update value of the coffee machine water pump for the next moment is generated.

9. The automatic coffee machine variable pressure extraction control method as described in claim 8, characterized in that: The process of generating the pressure change sequence update value for the coffee machine's water pump at the next moment, based on the constant pressure maintenance command and the current pressure value, includes: In response to the constant pressure maintenance command, the current pressure value in the variable pressure sequence is extracted as the constant pressure target value of the water pump; Parse the constant pressure maintenance command to obtain the maintenance time period label of the pressure swing extraction process corresponding to the constant pressure maintenance command; Based on the constant pressure target value and the maintenance time period label, a constant pressure segment pressure sequence of the coffee machine water pump is generated; The constant pressure sequence is replaced and spliced ​​with the original variable pressure sequence to generate the updated variable pressure sequence value of the coffee machine water pump at the next moment.

10. An automatic coffee machine variable pressure extraction control system, employing the automatic coffee machine variable pressure extraction control method as described in any one of claims 1 to 9, characterized in that, include: The module comprises: a first acquisition module, a first generation module, a comparison processing module, a calculation module, and a control module. The first acquisition module is used to respond to the pressure swing extraction start command and acquire the pressure swing sequence of the coffee machine water pump and the original pulse sequence of the flow meter; The first generation module is used to extract the pressure difference between adjacent acquisition times based on the pressure change sequence of the coffee machine's water pump, and generate a pressure change rate sequence. The comparison processing module is used to compare the pressure change rate sequence and the original pulse sequence of the flow meter to generate a flow meter false high correction sequence. The calculation module is used to calculate the true cumulative flow value of the pressure swing extraction process based on the flow meter false high correction sequence and the original pulse sequence of the flow meter; The control module is used to generate a stop extraction command for the coffee machine's water pump when the actual cumulative flow value reaches the preset extraction target value.