Spinach cleaning quality detection method based on image recognition
By generating composite water flow sequences and using image recognition technology to analyze the biomechanical and hydrodynamic parameters of spinach clusters, a cleaning impedance model was constructed, solving the problem of distinguishing between flexible impedance and adhesive impedance in spinach cleaning, and realizing efficient and energy-saving spinach cleaning quality detection.
Patent Information
- Application Number
- CN202511568632.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2025-11-28
AI Technical Summary
Existing technologies cannot effectively distinguish between flexible and adhesive resistance when cleaning spinach, resulting in low cleaning efficiency and a lack of real-time dynamic adjustment capabilities, making it difficult to achieve efficient and energy-saving closed-loop control.
By generating a composite water flow sequence and combining image recognition technology with structured light 3D reconstruction, the biomechanical response and hydrodynamic turbidity parameters of spinach clusters are analyzed, a cleaning impedance model is constructed, and the flexible impedance and adhesion impedance are decoupled in real time, and the water flow control is adaptively adjusted.
It enables precise diagnosis and efficient closed-loop control of the spinach washing process, improving washing efficiency and resource utilization while reducing energy consumption.
Smart Images

Figure CN121025997A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image or video recognition technology, in particular to a spinach cleaning quality detection method based on image recognition. BACKGROUND
[0002] In the field of automated food processing and industrial production, especially in central kitchens and clean vegetable production lines, the cleaning of leafy vegetables (such as spinach) is a key quality control link; online quality detection and process control of complex objects is a core technology to improve production efficiency and product quality. At present, intelligent detection technology based on machine vision is developing rapidly, which realizes the automatic monitoring of the production process by collecting and analyzing the image information of the object. However, when facing the dynamic process of flexible and deformable objects in a fluid environment, how to extract stable and reliable physical features from high-noise and high-coupling visual data and achieve precise closed-loop feedback control accordingly is still a technical direction that needs to be broken through in this field.
[0003] When trying to solve such problems, the existing technology faces the following challenges: 1. Existing cleaning quality detection methods, such as the scheme disclosed in the patent application with publication number CN114821574A, mainly rely on comparing static images before and after cleaning, or analyzing the change of water turbidity to judge cleanliness. The information dimension obtained by such methods is relatively single, and only the macroscopic appearance of the cleaning result or process can be reflected. They cannot deeply explore the root cause of low cleaning efficiency - whether it is due to the physical form of the object (such as spinach clusters) that causes the water flow to be ineffective (i.e. flexible impedance), or due to the strong adhesion between the dirt and the object surface that is difficult to overcome (i.e. adhesion impedance). This observation of the physical mechanism of the cleaning process leads to a lack of clear physical basis for subsequent control strategy adjustment, making it difficult to achieve targeted and efficient cleaning.
[0004] 2. Traditional automated cleaning processes generally use preset and fixed cleaning programs, i.e. "open-loop control" mode. This mode cannot be dynamically adjusted according to the real-time state of the object to be cleaned, and has poor adaptability to different batches and different levels of contamination of the material, often leading to excessive consumption of energy or incomplete cleaning. Although some improved schemes introduce feedback based on a single indicator such as turbidity, this feedback is a passive response that only makes compensatory adjustments after detecting problems, lacking the ability to predict process trends and actively optimize control strategies. Therefore, how to build a closed-loop control system that can diagnose in real time, make active decisions and continuously optimize itself is a key bottleneck to improve the level of cleaning automation.
[0005] 3、In the underwater dynamic environment, using image recognition technology for accurate quantitative analysis itself has great challenges. The reflection of water, the interference of bubbles and the complex, non-rigid deformation of flexible objects (such as spinach) under the impact of water flow all seriously interfere with the stable extraction of image features. The two-dimensional image analysis method commonly used in the prior art is difficult to robustly separate the weak signal that can accurately reflect the biomechanical properties of the object and the fluid dynamics of the dirt from these high-noise image sequences, which directly limits the accuracy and reliability of the subsequent diagnostic model.
[0006] The above information disclosed in the background section is only intended to enhance the understanding of the background of the present disclosure, and thus it can include information that does not constitute the prior art known to those of ordinary skill in the art. SUMMARY
[0007] The purpose of the present application is to provide a spinach cleaning quality detection method based on image recognition to solve the problems raised in the background art.
[0008] To achieve the above-mentioned purpose, the present application provides the following technical solutions: A spinach cleaning quality detection method based on image recognition, the specific steps comprising: S1: controlling the cleaning equipment to generate a composite water flow sequence, the composite water flow sequence including a detection phase for physical property detection and an execution phase for dirt peeling in each operation cycle; S2: during the action of the composite water flow sequence on the spinach cluster to be cleaned, synchronously collecting an image sequence reflecting the dynamic response process of the spinach cluster through an image acquisition device; S3: based on the image sequence, synchronously analyzing the biomechanical response parameters representing the collective deformation characteristics of the spinach cluster after being excited in the detection phase, and the fluid dynamics turbidity parameters representing the fluid dynamics turbidity formed after the dirt is peeled off from the spinach cluster and enters the water body; S4: constructing a cleaning impedance model for representing the cleaning difficulty, the cleaning impedance model being based on the dynamic correlation between the biomechanical response parameters and the fluid dynamics turbidity parameters, and real-time decoupling and quantifying the flexible impedance determined by the physical characteristics of the spinach and the adhesion impedance determined by the adhesion characteristics of the dirt; S5: according to the quantification results of the flexible impedance and the adhesion impedance decoupled by the cleaning impedance model, adaptively adjusting the control parameters of the composite water flow sequence in the next operation cycle to form a closed-loop feedback control.
[0009] Compared with the prior art, the present application has the following advantages: by decoupling into two functional phases of "detection" and "execution" in the time domain, and using a single image sensor to synchronously analyze the cross-modal physical responses of the object in the two phases.
[0010] The application extracts the "biomechanical response parameters" representing the collective deformation characteristics of the object and the "fluid dynamics turbidity parameters" representing the dynamic of dirt peeling from the high-noise image sequence by actively injecting the detection water flow pulse of specific frequency and combining the structured light three-dimensional reconstruction and particle image velocimetry analysis technology.
[0011] The application constructs the cleaning impedance model based on the physical mechanism, and realizes the real-time and accurate quantification of the core contradiction of cleaning, i.e., "flexible impedance" and "adhesion impedance", by extending the Kalman filter and other advanced estimation algorithms to deeply fuse and decouple the two seemingly unrelated observation quantities. This fundamental change from "phenomenon observation" to "mechanism diagnosis" provides unprecedented decision basis for building a truly intelligent closed-loop control. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 It is a schematic diagram of the application flow of the whole method of the application; Figure 2 It is a schematic diagram of the execution logic of step S1 and step S2 of the application; Figure 3 It is a schematic diagram of the execution logic of step S3 and step S4 of the application; Figure 4 It is a schematic diagram of the execution logic of step S5 of the application. DETAILED DESCRIPTION
[0013] In order to make the above-mentioned purposes, features and advantages of the application more obvious and easy to understand, the specific embodiments of the application will be described in detail below with reference to the accompanying drawings.
[0014] In the following description, many specific details are set forth in order to provide a thorough understanding of the application, but the application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the concept of the application, therefore the application is not limited to the specific embodiments disclosed below.
[0015] Example one: Please refer to Figures 1 to 4 The application provides a technical solution: A spinach cleaning quality detection method based on image recognition, comprising the following steps: S1: controlling a cleaning device to generate a composite water flow sequence, the composite water flow sequence including a detection phase for physical property detection and an execution phase for dirt peeling in each operation period; S2: during the action of the composite water flow sequence on the spinach cluster to be cleaned, synchronously collecting an image sequence reflecting the dynamic response process of the spinach cluster by an image acquisition device; S3: synchronously analyzing, based on the image sequence, a biomechanical response parameter representing a collective deformation characteristic of the spinach cluster after being excited in the detection stage, and a hydrodynamic turbidity parameter representing fluid dynamics of dirt peeling from the spinach cluster and entering the water body to form; S4: constructing a cleaning impedance model for representing cleaning difficulty, the cleaning impedance model being based on a dynamic correlation between the biomechanical response parameter and the hydrodynamic turbidity parameter, and decoupling and quantifying a flexible impedance determined by physical characteristics of the spinach and an adhesion impedance determined by adhesion characteristics of the dirt in real time; S5: according to the quantification results of the flexible impedance and the adhesion impedance decoupled by the cleaning impedance model, adaptively adjusting the control parameters of the composite water flow sequence in the next operation cycle to form a closed-loop feedback control.
[0016] Further explanation: for Figure 1 It should be noted that "dynamic process excitation and image acquisition" represents steps S1 and S2; "cross-modal physical parameter analysis" represents step S3; "cleaning impedance modeling and decoupling" represents step S4; and "adaptive closed-loop feedback control" represents step S5.
[0017] The step of controlling the cleaning equipment to generate a composite water flow sequence further comprises: In the detection stage, a periodic pulsed water flow with a preset detection pulse resonance frequency is generated; Through offline experimental calibration, the water flow pulse frequency that can produce the maximum mechanical resonance effect on the target dirt on the spinach cluster to be cleaned is represented as "detection pulse resonance frequency"; In the execution stage, based on the adaptive adjustment result output in the current operation cycle, a targeted cleaning water flow with an execution water flow energy gradient coefficient is generated; The mapping relationship between the "adaptive adjustment result" and the "execution water flow energy gradient coefficient" is established through a fuzzy logic reasoning system.
[0018] Further explanation: the synchronous acquisition of the image sequence further comprises setting the acquisition frame rate of the image acquisition device to be greater than twice the detection pulse resonance frequency.
[0019] The embodiment makes the following specific implementation explanations on the above contents: The core innovation of the embodiment lies in generating an acoustically optimized detection pulse sequence, the frequency characteristics of which aim to resonantly stimulate target dirt attached to the surface of spinach, thereby maximizing its detectability in the subsequent image sequence at low energy input; further, in the execution phase, the method resolves the abstract control instructions output by the S5 step into spatially focused, energy gradient adjustable targeted cleaning water flow. By decoupling the cleaning process in the time domain into two distinct but closely related stages of "high-sensitivity acoustic detection" and "high-efficiency energy injection", and using a single image sensor for cross-modal synchronous information acquisition, precise diagnosis and efficient closed-loop control of the cleaning process are achieved at the lowest hardware cost and physical conflict. The acoustic resonance principle is introduced into water flow control and deeply integrated with visual perception, improving the signal-to-noise ratio of the detection phase and the energy utilization efficiency of the execution phase. The key parameters involved in the embodiment are defined as follows: The parameter symbol of the detection pulse resonance frequency is The physical meaning of which is the water flow pulse frequency that can produce the maximum mechanical resonance effect with the target dirt, which makes the dirt produce the most significant micro-vibration or displacement under low-energy water flow excitation, thereby enhancing its detectability in the image sequence; the "target dirt" of the embodiment includes but is not limited to sand particles within a predetermined particle size range; The parameter symbol of the detection pulse modulation waveform is The logical meaning of which is a function waveform that controls the instantaneous intensity of the detection pulse water flow over time, specifically a sine wave or Chirp-Signal waveform to match specific resonance excitation requirements.
[0020] The parameter symbol of the total energy of the detection phase is The physical meaning of which is the total kinetic energy of the water flow applied to the cleaning system in the detection phase of an operating cycle, which ensures that its main function is physical property detection rather than large-scale dirt peeling; The parameter symbol of the execution water flow energy gradient coefficient is The physical meaning of which is a dimensionless coefficient that controls the decay rate of the execution phase cleaning water flow energy from the center of the impact point to the periphery, which determines the degree of spatial focusing of the water flow energy; The parameter symbol of the execution water flow impact mode is The logical meaning of which is the time intensity mode of the execution phase cleaning water flow, and the "time intensity mode" of the embodiment includes a constant high-pressure jet and a high-frequency, short-impulse pulsed jet.
[0021] For the detection pulse resonance frequency The acquisition approach and determination method of the detection pulse resonance frequency are as follows: based on the principle of "forced vibration and resonance" in the field of acoustics, the value is obtained by combining offline experiment calibration and theoretical model; the offline calibration method includes the following steps: A spinach sample with typical dirt attached is prepared; it is placed in an experimental tank, and a high-precision programmable water pump is used to generate a sweep pulse water flow with a preset frequency scanning range; at the same time, a high-magnification microscopic camera system or a laser Doppler vibration meter is used to monitor the vibration amplitude of the sand particles ; finally, the frequency corresponding to the maximum vibration amplitude is determined as the detection pulse resonance frequency of the type of dirt . It should be noted that the "typical dirt" is quartz sand with an average particle size of ; the "preset frequency scanning range" is a range interval composed of the corresponding lower limit value to the upper limit value ; for fine sand with an average particle size of 0.2 mm, it is found through the above experiment that the detection pulse resonance frequency in water medium is 85 Hz ; The acquisition approach and determination method of the detection phase total energy are as follows: the instantaneous kinetic energy of the water flow in the detection phase is time-integrated. The instantaneous kinetic energy is proportional to the square of the instantaneous flow rate of the water pump and the instantaneous mass flow rate . The control system controls the driving signal of the water pump so that the integral value of the detection phase total energy is equal to the preset and experimentally calibrated low energy threshold in the detection pulse period . The determination standard of the low energy threshold is that more than 95% of the dirt will not macroscopically and irreversibly peel off at this energy level, but enough to produce collective deformation for subsequent biomechanical model analysis. In this embodiment, the detection phase total energy is set to be no more than 0.5 joule for a 50-liter washing tank processing 2 kilograms of spinach, which is experimentally calibrated; The acquisition approach and determination method of the water flow energy gradient coefficient are as follows: based on the jet theory in fluid mechanics and the cooperative control principle of multiple nozzle arrays; the core idea is to synthesize a combined jet with a specific energy space distribution by adjusting the flow rate and direction of multiple independent water flow nozzles; the water flow energy gradient coefficient is converted from the control instruction output by the upstream fuzzy logic reasoning system through a preset mapping model; the water flow energy gradient coefficient The calculation logic is as follows: the nozzle array at the bottom of the cleaning tank is divided into a central region and a peripheral region. The value range of the water flow energy gradient coefficient is normalized to the interval [0, 1].
[0022] When the value of the water flow energy gradient coefficient tends to 1, the characterization system determines that the dominant obstacle of the current cleaning task is high adhesion resistance, and it is necessary to highly spatially focus the cleaning energy; at this time, the control system needs to allocate the total flow of the water pump to one or a few nozzles in the central region, and make the jet converge at a point by adjusting the nozzle angle, while reducing or closing the flow of the nozzles in the peripheral region.
[0023] When the value of the water flow energy gradient coefficient tends to 0, the characterization system determines that the dominant obstacle of the current cleaning task is high flexibility resistance, and it is necessary to widely spatially cover the cleaning energy; at this time, the control system will allocate the total flow of the water pump to all nozzles in the central and peripheral regions as evenly as possible; for the water flow energy gradient coefficient value between 0 and 1, the flow allocation ratio of the nozzles in the central region and the flow allocation ratio of the nozzles in the peripheral region will be smoothly interpolated according to the preset nonlinear S-shaped function or exponential function, so as to realize continuous adjustment of the energy gradient. The specific form of the nonlinear function is calibrated through offline computational fluid dynamics (CFD) simulation or particle image velocimetry (PIV) experiment, so as to ensure that there is a clear and monotonic correspondence between the output value of the water flow energy gradient coefficient and the actual formed jet energy spatial distribution gradient.
[0024] In this embodiment, when the instruction output by the fuzzy logic system requires highly focused jet, the water flow energy gradient coefficient value calculated by the mapping model is 0.95. According to this, the control system will allocate 95% of the total flow to the 3x3 nozzles in the central region, of which the centermost nozzle obtains the highest flow, and the remaining 8 nozzles have decreasing flow; at the same time, the remaining 5% of the flow is extremely lowly allocated to the 16 nozzles in the periphery, thereby forming an energy gradient distribution with high central energy and rapid decay to the periphery. Conversely, if the instruction requires uniform flushing, the water flow energy gradient coefficient value calculated is 0.1, then the system will allocate 100% of the total flow to all 25 nozzles. The calculation process of generating a composite water flow sequence and synchronously sensing in one operation cycle is as follows: 1.1) Input the operation cycle number, for the first operation cycle, the system loads preset initial parameters; for subsequent cycles, the system receives adjustment instructions from the output of S5 step; the control system enters the detection phase. The system queries the main types of dirt attached to the current batch of spinach to be cleaned according to the offline calibration database, and loads the corresponding detection pulse resonance frequency and detection pulse modulation waveform . The system sets the total energy of the detection phase to a fixed low energy threshold . The final output is the detection phase driving signal sequence that can be executed by the water pump; 1.2) Receive the detection phase driving signal sequence from step 1.1); control the system to drive the water pump to generate detection pulse water flow according to the driving signal sequence; at the same time, the image acquisition device starts to synchronously acquire image sequences at a preset frame rate. The "preset frame rate" in this embodiment is greater than twice the detection pulse resonance frequency to meet the Nyquist sampling theorem; The system continuously monitors the duration of the detection phase, and when the preset detection time is reached, the step ends; the original image sequence containing the dynamic response process of the spinach cluster under the acoustic optimized detection pulse is output.
[0025] 1.3) Receive the adjustment instruction about the next operation cycle composite water flow sequence from the output of S5 step. The adjustment instruction is a vector containing the expected flexible impedance factor and adhesion impedance factor target decay rate; the control strategy mapping module inside the system resolves the input abstract adjustment instruction into specific, executable physical parameters; and finally outputs a set of explicit execution phase control parameters, including execution water flow energy gradient coefficient and execution water flow impact mode , as well as the target area coordinates and total energy of the cleaning water flow; 1.4) Receive the execution phase control parameters from step 1.3); control the system to drive one or more controllable nozzle / water pump arrays to generate targeted cleaning water flow according to the resolved parameters; if the execution water flow energy gradient coefficient is large, control multiple nozzles to work cooperatively to form a highly focused central jet; if the execution water flow impact mode is impact mode, control the water pump to work in high-frequency switching mode. The image acquisition device continues to seamlessly acquire image sequences. The system monitors the duration of the execution phase, and when the preset execution time is reached, the step ends, marking the completion of a complete operation cycle.
[0026] The final output is a sequence of original images containing the process of soil detachment of spinach clusters under the targeted washing flow. These two sequences of images will be jointly used as the input of the S3 step.
[0027] This embodiment adopts a fusion mechanism based on Fuzzy-Logic-Inference to fuse and map the diagnostic results output by the S5 step into the specific execution phase control parameters in the step 1.3). The following definitions are made for the membership functions and the fuzzy rule base of the fuzzy logic system: For the membership function definition: the flexible impedance factor of the input variable and the adhesion impedance factor , three fuzzy sets are defined respectively: {low, medium, high}. Each set corresponds to a membership function, the shape and coverage of which are calibrated by offline experimental data statistics or expert experience. Similarly, the same fuzzy processing is performed on the output variables: the flow energy gradient coefficient and the execution flow impact mode ; the value range of the “flexible impedance factor and the adhesion impedance factor ” in this embodiment is normalized to the interval [0, 1] by the algorithm of the S4 step; the membership function is a triangular or Gaussian function; Fuzzy rule base construction: the rule base is composed of a series of “IF-AND-THEN” rules, which are pre-set by domain experts according to physical principles. This embodiment is set as: Rule 1: IF( “-is-” high) AND( “-is-” low) THEN( “-is-” high frequency impact) AND( “-is-” high).
[0028] Rule 2: IF( “-is-” low) AND( “-is-” high) THEN( “-is-” continuous push flow) AND( “-is-” low).
[0029] Rule 3: IF( “-is-” medium) AND( “-is-” medium) THEN( “-is-” medium frequency pulse) AND( “-is-” medium).
[0030] adhesion impedance factor and execution flow impact mode The pulse frequency of the execution water flow is positively correlated with the adhesion resistance factor The physical logic is that the adhesion resistance factor directly quantifies the firmness of the dirt adhesion. A higher adhesion resistance factor value means that a larger local impact force is needed to achieve effective peeling. According to the principle of fluid mechanics, the impact force of the jet is proportional to the energy density. Therefore, the system is designed to correspondingly increase the execution water flow energy gradient coefficient when the adhesion resistance factor increases, so as to enhance the energy focusing and thus improve the local impact force.
[0031] The flexible resistance factor is negatively correlated with the pulse frequency of the execution water flow impact mode , and tends to be a continuous water flow, and is negatively correlated with the execution water flow energy gradient coefficient . The physical logic is that the flexible resistance factor characterizes the energy transmission obstacles caused by the stacking and curling of the spinach clusters; a higher flexible resistance factor value means that it is more difficult for the water flow energy to reach the internal dirt adhesion points, and at this time simply increasing the local impact force is ineffective. The correct strategy is to change the macroscopic morphology of the spinach clusters. This requires a water flow with a wide range and long duration. Therefore, the system is designed to correspondingly reduce the execution water flow energy gradient coefficient when the flexible resistance factor increases, so as to expand the energy coverage range and achieve effective turning and stretching of the spinach clusters. This negative correlation design accurately reflects the real demand for solving the energy transmission problem, avoiding ineffective energy consumption.
[0032] The following further implementation is described as follows: the following table shows the results of a series of controlled experiments to verify the effectiveness of the composite water flow sequence generation and synchronous sensing method in the present application. The experimental design aims to quantitatively evaluate the performance of the present application method (using acoustic resonance detection and adaptive energy gradient execution) and two comparison methods (method one: fixed high-frequency pulse cleaning; method two: fixed mode wide-area flushing) in handling two typical pollution scenarios. The two scenarios are "scenario one: high adhesion soil pollution" and "scenario two: internal sand particle pollution". All experiments were conducted on the same hardware platform, spinach batch, and initial pollution level, and the data is the average of three repeated experiments.
[0033]
[0034] The data of "scene two: internal sand inclusion pollution" (experiment B group) and "comparison method one" (experiment C group) are compared. The method of the application adopts a 85 Hz probe pulse resonance frequency aiming at the physical characteristics of sand, and the signal-to-noise ratio of the probe stage dirt signal reaches 12.1-12.4 dB. The comparison method one adopts a fixed 50 Hz pulse, and the signal-to-noise ratio is only 3.1 dB. This shows that by introducing the principle of acoustic resonance, the embodiment can significantly enhance the detectability of specific dirt at low detection energy, and the signal-to-noise ratio is approximately increased by 290%. The high signal-to-noise ratio of the detection signal is the fundamental premise for accurately calculating the flexible impedance factor and the adhesion impedance factor. This strongly proves the innovative design of the application in the detection stage, which has a breakthrough performance advantage compared with the existing fixed frequency pulse technology.
[0035] The difference in the average execution water flow energy gradient coefficient in "scene one" (experiment A group) and "scene two" (experiment B group) is observed. When dealing with high adhesion soil, the system diagnoses a high adhesion impedance factor (0.88-0.90), and therefore generates a high execution water flow energy gradient coefficient (0.91-0.92) adaptively, and adopts an energy focusing strategy. When dealing with internal sand inclusion, the system diagnoses a high flexible impedance factor (0.82-0.85), and therefore generates a low execution water flow energy gradient coefficient (0.10-0.12) adaptively, and adopts a wide-area coverage strategy. This strategy brings significant results. Compared with experiment A group and "comparison method two" (fixed wide-area flushing), the final cleaning degree of the embodiment when dealing with high adhesion dirt is 22.8 percentage points higher, and the total water consumption is reduced by 53.9%. Compared with experiment B group and "comparison method one" (fixed high-frequency pulse), the final cleaning degree of the application when dealing with internal shielding dirt is 13.4 percentage points higher, and the total water consumption is reduced by 36.4%. This proves that the adaptive mapping relationship established by the fuzzy logic reasoning system of the application can accurately convert the diagnosis result into the optimal physical execution strategy, and realize the double and significant improvement of cleaning efficiency and resource utilization.
[0036] In the embodiment two, the step of analyzing the biomechanical response parameter further comprises: calculating the three-dimensional surface strain energy generated by the spinach cluster after being excited in the detection stage by using a structured light three-dimensional reconstruction technology. The step of analyzing the fluid dynamics turbidity parameter further comprises: quantifying the micro-vortex characteristic parameters induced in the water body when the dirt is stripped from the spinach cluster by using a particle image velocimetry analysis.
[0037] It is further explained that the step of constructing the cleaning impedance model further comprises: constructing a nonlinear state space model taking the flexible impedance and the adhesion impedance as state variables. an observation equation of the state space model, taking the three-dimensional surface strain energy and the micro-vortex characteristic parameter as observation quantities associated with the state variables; the step of solving and separating the impedance factors further comprises: using an extended Kalman filtering algorithm to on-line identify the flexible impedance factor and the adhesion impedance factor in the state space model according to the observation quantities.
[0038] The following is a specific implementation description of the above: The core innovation of the embodiment is that the structured light projection technology is introduced, the three-dimensional surface strain energy is calculated as the biomechanical response parameter by analyzing the dynamic distortion of the projected grating on the spinach cluster surface, and the micro-vortex characteristic parameter formed at the moment of peeling is tracked as the fluid dynamics turbidity parameter by using the particle image velocimetry (PIV) idea. Further, a nonlinear state space model based on the physical mechanism is constructed. The three-dimensional surface strain energy is taken as the observation quantity of the system state, and the micro-vortex characteristic parameter is taken as the observation quantity of the system output. The flexible impedance factor representing the energy dissipation characteristics of the spinach itself and the adhesion impedance factor representing the peeling energy threshold of the spinach-leaf interface are identified in the model by using the extended Kalman filtering (EKF) algorithm. By introducing the active optical measurement and the advanced flow field analysis, the physical information content and the signal-to-noise ratio of the input characteristics are improved, and the state space model closer to the real physical process is used for system identification, so that the real-time decoupling of the two cleaning impedances with high precision and high robustness is realized. The key parameters involved in the embodiment are defined as follows: the three-dimensional surface strain energy, the parameter symbol of which is The physical meaning is that the total energy stored by the spinach cluster surface due to elastic deformation under the action of the detection pulse water flow. This parameter can more accurately reflect the stiffness and energy absorption characteristics of the spinach cluster than the two-dimensional projected area. the micro-vortex characteristic parameter, the parameter symbol of which is The physical meaning is that the dimensionless comprehensive index synthesized by analyzing the intensity, size and duration of the micro-vortex induced in the surrounding flow field when the dirt particles are peeled off the leaf surface. This parameter is directly related to the instantaneous energy release of the dirt peeling event. the flexible impedance factor, the parameter symbol of which is It represents the energy dissipation term coefficient related to the viscoelasticity of the spinach cluster in the state space model. The flexible impedance factor is proportional to the proportion of the water flow energy wasted by driving the spinach movement and deformation. the adhesion impedance factor, the parameter symbol of which is It represents the stress threshold required to trigger the dirt peeling event in the state space model. The factor is proportional to the minimum energy required to overcome the adhesion force per unit area of the dirt and the leaf surface.
[0039] Three-dimensional surface strain energy The acquisition approach and determination method are as follows: based on the elastic potential energy theory in solid mechanics and the structured light three-dimensional reconstruction technology in computer vision; the calculation method comprises the following steps: a structured light projector is arranged above a cleaning tank, and a pre-calibrated sinusoidal grating pattern is projected to a spinach cluster; simultaneously, a high-speed camera is used to collect a distorted grating image sequence modulated by the spinach cluster surface. The system collects a reference grating image before the detection pulse acts and a distorted grating image at the action moment; by means of a Fourier transform profilometry algorithm, two-dimensional grating phase information in the two images is demodulated into a height map in three-dimensional space, so as to generate two high-density three-dimensional point clouds before and after the action. Then, a point cloud registration algorithm is executed, so as to accurately calculate a three-dimensional space displacement vector of each corresponding point in the point cloud after the action, based on the point cloud before the action, and form a displacement field covering the entire spinach cluster surface. Then, based on the displacement field, a strain tensor of each point in a small surface element is solved by calculating a difference rate of displacement vectors between adjacent points, and the tensor describes the stretching, compression and shear deformation degrees of the element in each direction. Then, an offline calibrated material constitutive model representing the mechanical properties of spinach leaves is used to associate the strain tensor with the stress tensor; the stress tensor borne by each small surface element is calculated. Subsequently, according to the theory of elasticity, the strain energy stored in the small element is obtained by performing an inner product operation on the stress tensor and the strain tensor and multiplying by half the volume of the element. Finally, the strain energies of all the small surface elements are globally integrated and summed up, and the final result is the total three-dimensional surface strain energy of the entire spinach cluster under the excitation .
[0040] Under the action of a detection pulse, the system reconstructs a three-dimensional surface containing 500,000 data points. The calculated displacement field shows that the maximum normal displacement of the central region of the spinach cluster is 3 mm. Through the strain-stress-energy conversion chain, the average strain energy of each small surface element is calculated to be about 40 nanojoules. The energy values of the 500,000 elements are accumulated, and the total three-dimensional surface strain energy under the excitation is finally determined to be 0.02 joules.
[0041] Microscopic vortex characteristic parameters The acquisition approach and determination method are as follows: based on the vorticity dynamics theory in fluid mechanics and the particle image velocimetry (PIV) analysis technology; in the image sequence, the dirt particles or small clumps peeled off from the surface of the spinach cluster are identified through background subtraction and color segmentation. In the image sequence of the system in the execution stage, the newly appearing dirt particles with the motion trajectory conforming to the peeling characteristics are identified through inter-frame difference and target detection algorithm, and a dynamic tracking analysis window is defined around the dirt particles. Within the window, the system applies the micro-scale PIV algorithm to generate a high-resolution instantaneous two-dimensional velocity vector field by calculating the cross-correlation of the micro textures of the images between the continuous frames. Then, the spatial derivation of the velocity field is performed to calculate the vorticity field describing the rotation rate of the fluid micro element. In the vorticity field, the core vortex structure formed due to the disturbance of dirt peeling is locked through threshold segmentation and morphological analysis. For the structure, the system synchronously extracts four key original physical characteristics: the maximum vorticity value of the vortex core, representing the rotation intensity; the equivalent radius of the vortex core, representing the spatial scale; the number of continuous frames during which the vortex structure is maintained, representing the life cycle; and the velocity circulation along the closed path of the vortex, representing the total angular momentum. Since the dimensions and numerical ranges of the four original characteristics are different, the system first performs minimum-maximum value normalization on each of them, mapping them to the uniform [0, 1] interval. Finally, the four normalized characteristic values are input into the dimension reduction model trained in advance through principal component analysis (PCA) as a four-dimensional vector. The projected scalar value after the linear projection of the four-dimensional vector onto the first principal component axis that maximizes the variance of the data is defined as the final, single, dimensionless micro-vortex characteristic parameter Micro-vortex characteristic parameter with a value range in the [0, 1] interval; the "micro tracer particle" in this embodiment represents micro bubbles or fine impurities in water; The system detects the dirt peeling event and extracts the vortex original characteristics as follows: maximum vorticity 150 / s, vortex core radius 0.5 mm, life cycle 80 ms, and velocity circulation 3 mm2 / s. After respective normalization, the normalized vector is [0.85, 0.60, 0.70, 0.75]. The first principal component weight vector of the pre-trained PCA model is [0.6, 0.25, 0.1, 0.05]. Through dot product operation of the two vectors, i.e., 0.85 multiplied by 0.6, plus 0.60 multiplied by 0.25, and so on, the final calculated micro-vortex characteristic parameter is 0.78.
[0042] Flexible impedance factor and adhesion impedance factor The acquisition approach and determination method are as follows: the filter is based on the flexible impedance factor and the adhesion impedance factor The optimal estimate is obtained, and the prior state at the current moment is predicted using the state transition equation. At the same time, the expected value of the three-dimensional surface strain energy and the expected value of the microscopic vortex characteristic parameters that should be observed at this moment are predicted using the observation equation based on this prior state. In this embodiment, the "state transition equation" is a random walk model with small process noise, which characterizes the slow change of the impedance factor. The system acquires the actual observation calculated by the vision module at this moment. The filter calculates the difference between the actual and expected observations, termed the "news" or "residual," which represents all the new information about the prediction error. The filter calculates the crucial "Kalman gain" matrix, the value of which is determined by both the uncertainty of the predicted state (from process noise) and the uncertainty of the measured value (from measurement noise). Finally, the filter weights the news using the Kalman gain and adds this weighted correction to the prior state estimate, thus obtaining the current time-to-date flexible impedance factor. and adhesion resistance factor The posterior optimal estimate. The core of this embodiment is that the observation equation defines different sensitivity of different observations to different state variables, which is specifically reflected by the Jacobian matrix. When the residual of the three-dimensional surface strain energy is large, the Kalman gain will tend to use this error more to correct the flexible impedance factor that is strongly correlated with it, and vice versa, thereby realizing the intelligent decoupling of the two impedances.
[0043] In this embodiment, at the previous time step, the estimated values of the flexible impedance factor and the adhesive impedance factor are [0.30, 0.80]. After the prediction step, the prior estimates remain [0.30, 0.80]. Based on this, the observation model predicts a strain energy of 20 mJ and a vortex parameter of 0.1. However, the actual measured value at this moment is a strain energy of 35 mJ and a vortex parameter of 0.12. The system calculates a strain energy residual of +15 mJ and a vortex parameter residual of +0.02. Since the model knows that the strain energy is mainly affected by the flexible impedance, while the vortex parameter is affected by the adhesive impedance, the calculated Kalman gain will allocate most of the correction effect of the strain energy residual to the flexible impedance factor, and at the same time, allocate the correction effect of the vortex parameter residual to the adhesive impedance factor. Finally, after correction and update, the optimal estimate value at the current time step is obtained: the flexible impedance factor increases significantly to 0.45, while the adhesive impedance factor decreases slightly to 0.79. The calculation process of steps S3 and S4 above is described below: 2.1) Input a complete image sequence from step S2, including the detection and execution phases, and a synchronously recorded sequence of the switching states of the structured light projector; Image frames from the detection phase are selected; Fourier transform profilometry algorithm is applied to these frames to reconstruct the 3D surface point cloud sequence of the spinach cluster. The displacement field between the point clouds before and after the detection pulse is calculated, and the time series of 3D surface strain energy is calculated by integrating the elastic mechanics model .
[0044] Image frames from the execution phase are selected; PIV-based micro-vortex analysis algorithm is applied to these frames to detect all the soil detachment events and calculate the corresponding micro-vortex feature parameters for each event , forming a sparse event-driven time series. Finally, two time-aligned parameter sequences are output: the dense 3D surface strain energy sequence and the sparse micro-vortex feature parameter sequence.
[0045] 2.2) The system constructs a nonlinear state space model; the state vector of the "nonlinear state space model" contains two core state variables: the flexible impedance factor and the adhesion impedance factor . The state equation describes the evolution of the two impedance factors over time within an operating period; the observation equation establishes the observation of the system; the "observation" of this embodiment is the nonlinear physical relationship between the 3D surface strain energy and the micro-vortex feature parameters and the state variables; The observation equation of this embodiment defines the 3D surface strain energy as a function of the flexible impedance factor and the input water flow energy, while the occurrence probability and amplitude of the micro-vortex feature parameters are functions of the adhesion impedance factor and the local stress acting on the soil. Finally, the nonlinear state space model containing the state equation and the observation equation is output.
[0046] 2.3) Input the two parameter sequences from step 2.1) and the defined state space model from step 2.2); the system starts the extended Kalman filter (EKF) algorithm. The EKF algorithm iterates in time steps: based on the state estimation at the last time and the state equation, the priori estimation values of the flexible impedance factor and the adhesion impedance factor at the current time are predicted. The actual observation of the 3D surface strain energy and / or the micro-vortex feature parameters at the current time is obtained. The residual between the actual observation and the observation predicted based on the priori state estimation is calculated. Through the Kalman gain, the residual is used to correct the priori state estimation to obtain the posteriori estimation value at the current time, i.e. the updated flexible impedance factor and the adhesion impedance factor .
[0047] At the end of each operation cycle, the final quantified values of the optimally estimated flexible impedance factor and adhesion impedance factor after the whole cycle data smoothing and recognition are outputted and passed to the S5 step for decision making. This embodiment adopts a method combining state space model based on physical mechanism and extended Kalman filter (EKF) for multi-parameter fusion and system identification. The core reason for choosing this method is that the cleaning process is a dynamic system, and the two kinds of internal states of impedance cannot be directly measured, but can only be inferred through external observation. The state space model provides a mathematical framework to describe the internal mechanism of such dynamic system. And the EKF is an algorithm for handling state estimation problems of nonlinear dynamic systems, which can give the optimal estimation of the state recursively through Bayesian inference in the presence of process noise (characterizing the slow changes of impedance) and measurement noise (characterizing the errors of visual feature extraction); in the extended Kalman filter (EKF), the key adjustment parameters are defined as the process noise covariance matrix Q and the measurement noise covariance matrix R.
[0048] Setting of the "process noise covariance matrix Q": the "process noise covariance matrix Q" represents the uncertainty of the state variable itself changing over time. The size of its diagonal elements is calibrated by offline analysis of a large number of different batches of spinach cleaning process, and the typical change rate of the flexible impedance factor and adhesion impedance factor in a single cleaning cycle is statistically determined. The larger the Q value represents the faster changes of the impedance factor in a short period of time; Setting of the "measurement noise covariance matrix R": the "measurement noise covariance matrix R" represents the degree of trust in the observed quantity . The size of its diagonal elements is determined by calibration experiments on the visual feature extraction algorithm. In this embodiment, on the calibration object with known three-dimensional deformation, the three-dimensional surface strain energy is repeatedly measured and its variance is calculated, which can be used as the initial value of the corresponding element in the R matrix. The smaller the R value represents the more reliable the measurement result, and more new measurement values will be relied on in the filter update. The above contents are specifically and in detail disclosed as follows: The core state variable finally outputted by the extended Kalman filter algorithm is the flexible impedance factor and adhesion impedance factor , whose value range is normalized to the interval [0, 1]. The technical meanings of the two output values are as follows: When the flexible impedance factor The closer to 1, the more likely the system recognizes that the main obstacle of the current cleaning process comes from the physical properties of the spinach cluster itself; the higher the proportion of water flow energy is used to drive the macro-scale deformation of the spinach cluster such as macroscopic overturning and stretching before it is transmitted to the soil-leaf interface, the lower the energy transmission efficiency is; When the adhesion resistance factor is closer to 1, the system recognizes that the main obstacle of the current cleaning process is more likely to come from the strong adhesion between the soil and the leaf surface; even if the water flow energy can be effectively transmitted to the soil adhesion point, a higher local stress is needed to overcome the adhesion force to achieve effective soil peeling.
[0049] When other parameters remain unchanged, the increase of three-dimensional surface strain energy will mainly lead to the monotonic increase of the estimated value of the flexible resistance factor , which is a strong positive correlation; the three-dimensional surface strain energy directly quantifies the degree of water flow energy absorbed and stored by the spinach cluster in the form of elastic deformation. Under the same input of detection pulse energy, a higher three-dimensional surface strain energy value indicates that the whole spinach cluster is more “flexible” or more prone to large-scale deformation; Under a given water flow impact intensity, the decrease of the micro-vortex characteristic parameter will mainly lead to the monotonic increase of the estimated value of the adhesion resistance factor , which is a strong negative correlation; the micro-vortex characteristic parameter is a direct quantitative representation of the soil peeling event. Under the same cleaning water flow, if the observed micro-vortex characteristic parameter value is lower, i.e., the soil peeling event is less frequent, the physical interpretation is that the soil is more firmly adhered, and the local stress provided by the water flow is insufficient to overcome its adhesion.
[0050] The following table shows the results of a series of controlled experiments to verify the accuracy and superiority of the real-time decoupling method of cleaning resistance in the present application; the experimental design aims to compare the recognition accuracy of the “multi-modal visual feature and extended Kalman filter (EKF) decoupling method” and “method one: decoupling based on two-dimensional contour and simplified model” in this embodiment in two physically distinct, artificially prepared cleaning scenarios. The two scenarios are “scene one: high flexible resistance sample (fresh, stretched spinach with a small amount of easily peeled soil)” and “scene two: high adhesion resistance sample (slightly dehydrated, curled spinach with high viscosity mud)”. The true resistance factor of all experiments is pre-calibrated by offline fine measurement, which is used to evaluate the algorithm accuracy. The data is the average value of five repeated experiments.
[0051]
[0052] The observation data of "scene one" (experiment A1 group) and "scene two" (experiment B1 group) are observed. In scene one, the system observes high three-dimensional surface strain energy (48.5 millijoules-50.2 millijoules) and high micro-vortex characteristic parameters (0.82-0.85), which is highly consistent with the physical fact of "high flexibility, low adhesion". In scene two, the system observes low three-dimensional surface strain energy (15.3 millijoules-16.1 millijoules) and low micro-vortex characteristic parameters (0.12-0.15), which is also highly consistent with the physical fact of "low flexibility, high adhesion".
[0053] The three-dimensional surface strain energy and micro-vortex characteristic parameters introduced in this embodiment can more directly and sensitively capture the physical signals reflecting the two kinds of impedance natures compared to the traditional two-dimensional area change and global turbidity.
[0054] Comparing the relative error of identification of "experiment A1, experiment B1" with the comparison method one "experiment C1, experiment D1 group". In "scene one", the identification error of the flexible impedance factor of the present application is as low as 1.25%-2.50%, while the comparison method is 18.75%. In "scene two", the identification error of the adhesion impedance factor of the present application is as low as 1.18%-2.35%, while the comparison method has an error of 27.06%.
[0055] In "scene two", the comparison method one mistakenly attributes part of the effect of high adhesion impedance to flexible impedance, resulting in a sharp rise in the relative error of identification of flexible impedance to 140%. However, the method of the present embodiment, thanks to the dynamic filtering and state updating mechanism of extended Kalman filter (EKF), can correctly attribute low strain energy and low peeling rate to high adhesion impedance, and the identification error of flexible impedance is still controlled within a reasonable range of 5.00%-15.00%. This irrefutably proves that the nonlinear state space model and EKF identification algorithm constructed by the present application can effectively overcome the coupling interference between different physical effects, and achieve robust and accurate decoupling. The error of the present embodiment in the two scenes is controlled within 9% (experiment A1-2 group and experiment B1-2 group are lower than 4%), while the comprehensive error of the comparison method one is 76%-83%. This group of data powerfully proves the synergistic effect of the two core technical features of "multi-modal visual feature extraction" and "state space model identification based on EKF" proposed by the present application, achieving a magnitude improvement in the identification accuracy of cleaning impedance.
[0056] Further description: the step of self-adaptively adjusting further comprises: based on the error between the quantitative results of the flexible impedance and the adhesion impedance and the preset impedance target value, calculating the reference adjustment amount of the composite water flow sequence control parameter in the next operation period through a double-channel PID (proportional-integral-derivative) controller. a periodic cleaning performance index is defined, which combines the amount of dirt removal and the energy consumption of the execution phase; a reinforcement learning agent is utilized to perform a secondary optimization of the reference adjustment quantity output by the PID controller, using the periodic cleaning performance index as the reward signal, to maximize the long-term cumulative reward; the reinforcement learning agent adopts a Q-Learning algorithm, whose state is defined by the quantized results of the flexible impedance and the adhesion impedance; the control parameters of the composite water flow sequence include an execution water flow energy gradient coefficient representing the degree of water flow energy space focusing, and an execution water flow impact pattern representing the water flow time intensity pattern.
[0057] The following specific implementation is described: The core innovation of the embodiment is to introduce a dual-channel PID (Proportional-Integral-Derivative) controller to dynamically generate adjustment instructions. The controller targets the expected decay trajectory of the flexible impedance factor and the adhesion impedance factor, respectively, and calculates the control parameter adjustment quantity for the next period based on the current diagnosed actual impedance value. The embodiment method introduces a reinforcement learning agent based on Q-Learning. The agent takes the output of the PID controller as the basic action space and takes the periodic cleaning performance index that combines cleaning cleanliness and energy consumption as the reward signal. Through online exploration and utilization strategies, the reinforcement learning agent can perform secondary fine optimization of the control parameters generated by the PID, thereby autonomously learning and converging to the optimal cleaning strategy trajectory for a specific batch of spinach on a longer time scale, realizing the transition from passive feedback control to active optimization control. The key parameters involved in the embodiment are defined as follows: adhesion impedance target decay rate, parameter symbol , which represents the expected adhesion impedance factor relative proportion of the drop, which is preset by the system according to the total cleaning time and the initial impedance evaluation; flexible impedance target decay rate, parameter symbol , which represents the expected flexible impedance factor relative proportion of the drop.
[0058] periodic cleaning performance index, parameter symbol , which has the physical meaning of a comprehensive evaluation index for quantifying the overall benefits brought by the cleaning behavior in the current operation period. The index is directly proportional to the amount of dirt removal and inversely proportional to the total water flow kinetic energy consumed in the execution phase.
[0059] PID controller output adjustment vector, parameter symbol , which is a two-dimensional vector calculated by the dual-channel PID controller, whose two components respectively represent the reference adjustment amount of the execution water flow energy gradient coefficient and the execution water flow impact pattern .
[0060] The reinforcement learning optimization adjustment vector, whose parameter symbol is , which is a two-dimensional vector output by the Q-Learning agent, represents the fine-tuning amount on the basis of the PID controller output for maximizing the long-term cumulative reward.
[0061] The acquisition approach and determination method of the periodic cleaning performance index is: based on the performance evaluation theory in process engineering, combining the two dimensions of cleaning effect and resource consumption; specifically, by comparing the baseline levels of the micro-vortex characteristic parameters analyzed from the two detection stages before and after the start and end of the current operation period, the total removal amount of dirt in the period is estimated, denoted as . At the same time, by monitoring the power and working time of the execution stage water pump, the total kinetic energy consumed in the execution stage is calculated, denoted as . Then divide the total removal amount of dirt by the total energy consumption in the execution stage to get the basic performance value; then map the basic performance value through the pre-set Sigmoid activation function to get the final periodic cleaning performance index , whose value range is limited in the interval (0, 1). In an operation period, the total removal amount of dirt is estimated to be 5 grams, the energy consumption in the execution stage is 10 joules, and the basic performance value is 0.5 grams / joule. After Sigmoid function mapping, the periodic cleaning performance index is 0.8.
[0062] The acquisition approach and determination method of the PID controller output adjustment vector is: based on the proportional-integral-derivative (PID) control algorithm in classical control theory; the system runs two independent PID controllers in parallel, which are respectively used for the adhesion impedance channel and the flexible impedance channel; and the execution modes of the adhesion impedance channel and the flexible impedance channel are the same, as follows. The adhesion impedance channel example: the controller first calculates the error between the currently diagnosed adhesion impedance factor and the expected target value. Then, the error is multiplied by the proportional coefficient , the integral coefficient and the differential coefficient , respectively, to get the proportional term, the integral term and the differential term. The sum of the three terms constitutes the adjustment amount of the execution water flow impact pattern ; in this embodiment, the "expected target value" is obtained by multiplying the value of the last period by "1" and subtracting the adhesion impedance target decay rate; and the "execution water flow impact pattern characterized by its pulse frequency parameter; based on the error of the flexible impedance factor and its independent PID coefficient , the adjustment amount for executing the water flow energy gradient coefficient is calculated. The two adjustment amounts together constitute the PID controller output adjustment vector . The PID coefficient is calibrated offline by the Ziegler-Nichols method. In this embodiment, the current value of the adhesion impedance is 0.8, the target value is 0.7, and the error is 0.1. Set , and the integral accumulated error is 0.3, and the error change rate is -0.02. Then the impact mode adjustment amount is (0.1 times 0.5) plus (0.3 times 0.1) plus (-0.02 times 0.05), and the calculation result is 0.079. Similarly, the energy gradient coefficient adjustment amount is -0.05. Therefore, the PID controller output adjustment vector is [-0.05, 0.079]. The following calculation process decomposition content is executed on the above content: 3.1) Receive the quantization results of the flexible impedance factor and the adhesion impedance factor decoupled from the current operation period of S4 step. The system loads the preset flexible impedance target decay rate and the adhesion impedance target decay rate . According to the impedance values and target decay rates of the last period, the impedance target values expected to be reached in the current period are calculated; 3.2) Input the impedance measurement values and target values from 3.1); calculate the current error, the integral term represented by the error accumulation, and the differential term represented by the error change rate of the flexible impedance and the adhesion impedance respectively. Input the above error terms into the respective PID controllers, and calculate the adjustment amounts for executing the water flow energy gradient coefficient and the water flow impact mode according to the preset PID coefficient. Output the PID controller output adjustment vector .
[0063] 3.3) Receive the PID controller output adjustment vector from 3.2); and the periodic cleaning effectiveness index calculated at the end of the last period, the periodic cleaning effectiveness index being the environmental reward obtained by the reinforcement learning agent after executing the action in the last state; and the flexible impedance factor and the adhesion impedance factor A Q-table for lookup is constructed, specifically by discretizing the value ranges of the continuous flexible impedance factor and adhesive impedance factor; the value ranges of the flexible impedance factor and adhesive impedance factor are divided into ten equally wide intervals, labeled from 0 to 9. Any one of them... The combination is mapped to a unique discrete state index consisting of two integers. In this embodiment, state (3,8) is set to represent the flexible impedance factor. Within the interval [0.3, 0.4) and the adhesion resistance factor The discrete state index is within the interval [0.8, 0.9), which represents the current state of the reinforcement learning agent. .
[0064] Define a finite, discrete action space around the output of the PID controller; this action space outputs fine-tuning of the PID baseline adjustment. Specifically, the action space is defined as a set of nine discrete actions. Actions 1 to 9 correspond to nine preset fine-tuning operations on the PID controller output adjustment vector: {no adjustment, add a small positive value to the first component, subtract a small positive value from the first component, add a small positive value to the second component, subtract a small positive value from the second component, add to both components, subtract to both components, add to the first component and subtract from the second component, subtract from the first component and add to the second component}. Each action corresponds to a specific, fixed reinforcement learning optimization adjustment vector. .
[0065] Agency basis The strategy selects the action to be performed. ; set this The specific implementation is as follows: The system generates a random number between 0 and 1. If this random number is less than the preset exploration rate... If the condition is met, the agent will randomly select one of the nine possible actions to execute; otherwise, the agent will query its internal Q-table to determine the action to be performed in the current state. In the corresponding row, the action with the largest Q value is selected for execution; in this embodiment, the exploration rate is... Set to 0.1; This process is executed at the start of the next operating cycle and after receiving a new reward signal. It updates the Q-value of the (state, action) pair from the previous cycle. Its calculation logic follows the Bellman equation, specifically broken down as follows: Step 1: The agent obtains the action to be performed. The new state after transition Query the Q table for the new status. Find the corresponding row and identify the maximum Q-value for all actions within that row. Multiply this maximum Q-value by a preset discount factor. This yields a current estimate of future long-term returns, denoted as the "future term"; in this embodiment, the "new state" is the index of the discrete state of the next period; the "preset discount factor " is set to 0.9; Second step: add the periodic cleaning performance index obtained in the last period to the "future item" calculated in the first step to obtain a new target Q value. Then, subtract the old value stored in the Q table before the action is performed from the new target Q value; the difference is the time difference error, which quantifies the difference between the old estimate and the new information; Third step: multiply the time difference error calculated in the second step by the preset learning rate to obtain the step size of this update. Finally, add this update step size to the old value to obtain the updated, new value, and write it back to the corresponding position in the Q table; the "preset learning rate " in this embodiment is 0.05; finally, output the reinforcement learning optimization adjustment vector for the current period .
[0066] 3.4) Input the PID controller output adjustment vector and the reinforcement learning optimization adjustment vector . Add the two vectors element by element to obtain the final total adjustment vector. Apply the total adjustment vector to the parameter values of the execution water flow energy gradient coefficient and the execution water flow impact pattern in the last period, and perform boundary checking; including the updated execution water flow energy gradient coefficient and the execution water flow impact pattern .
[0067] The PID coefficients in this embodiment are set by offline experiments; the specific method is: build a physical simulation platform similar to the actual cleaning equipment, perform step response tests on typical cleaning scenarios (high flexible impedance factor , high adhesion impedance factor , mixed type), and then use the Ziegler-Nichols tuning rule or other parameter setting methods in modern control theory to find a set of robust PID parameters that can make the system response fast, with small overshoot and few oscillations.
[0068] For the learning rate of the reinforcement learning parameters, the discount factor , and the exploration rate determination: determined by offline simulation experiments through grid search or Bayesian optimization. The goal is to find a set of parameters that enable the Q-Learning agent to stably converge to a pre-set high cumulative reward within a reasonable number of training cycles, while maintaining the required exploration ability to cope with changes in working conditions. The following detailed implementation is described: The core output of this embodiment is the updated execution water flow energy gradient coefficient and the execution water flow impact mode together determine the cleaning strategy for the next operation cycle; the output of the execution water flow impact mode is mapped to a specific pulse frequency value, whose value range is determined by the water pump hardware performance, and the value range of this embodiment is [0, 200] Hz; When the output value of the execution water flow impact mode is higher, i.e., the pulse frequency is higher, it indicates that the system determines that the current cleaning task is more likely to face a high adhesion resistance factor and needs to use high-frequency water hammer effect to generate instantaneous overpressure to "impact" and destroy the microscopic adhesion structure between the dirt and the blade surface; When the execution water flow impact mode is lower, it indicates that the system determines that the current cleaning task is more likely to face a high flexibility resistance factor and needs to use a continuous and stable thrust to change the macro posture of the spinach cluster, and at this time the energy transmission efficiency of high-frequency pulses will be reduced due to cavitation effect and other factors. The final output control parameter adjustment amount is determined by the PID controller output adjustment vector and the reinforcement learning optimization adjustment vector .
[0069] Based on the increase of the adhesion resistance factor , the execution water flow energy gradient coefficient and the pulse frequency of the execution water flow impact mode are strongly positively correlated; the adhesion resistance channel of the PID controller is set to have an input error range of . When the adhesion resistance factor is higher than the target value , the error is negative, and the PID controller will output a positive adjustment amount to increase the peeling strength in the next cycle; the target value of this embodiment is the "adhesion resistance factor ” set ideal or acceptable maximum threshold; based on higher energy focus and higher frequency of impact can effectively improve the local impact force principle. The positive correlation design accurately maps the diagnosed “high adhesion” problem to the most effective “strong impact” solution. Reinforcement learning agent then learns from historical data, if it finds that for a certain specific adhesion, slightly reduce the frequency and greatly increase the energy gradient, its periodic cleaning efficiency index is higher, thereby making more fine optimization.
[0070] Based on the increase of flexible impedance factor , the execution of water flow energy gradient coefficient and the pulse frequency of execution water flow impact mode are strongly negatively correlated; the flexible impedance channel of the PID controller sets its input error as . When the flexible impedance factor is higher than the target value, the error is negative, and the controller will output the adjustment amount aiming to reduce the energy focus and the impact frequency. Its physical logic is that high flexible impedance factor indicates that energy transmission is blocked, and the core task at this time is “passage”. Reducing the execution water flow energy gradient coefficient to expand the water flow range, and reducing the execution water flow impact mode to form a sustained thrust, are the most effective means to change the overall shape of the spinach cluster and reduce the flexible impedance.
[0071] The periodic cleaning efficiency index as a reward signal, through the Q table updating mechanism of reinforcement learning, has an indirect but decisive influence on future control parameter selection; the (state, action) pair with high will increase the corresponding Q value, thereby increasing the probability of selecting the action again in the same state in the future; if the current action of the embodiment makes the impedance drop fast but consumes a lot of energy, resulting in a low periodic cleaning efficiency index , while another action makes the impedance drop slowly but consumes low energy, resulting in a high periodic cleaning efficiency index .
[0072] To verify the superiority of the PID + reinforcement learning cascade control strategy in the present application compared with single control strategy, three groups of comparative experiments were designed to process spinach samples with different initial impedance characteristics. The changes of key input, intermediate and output parameters in two consecutive operation periods were recorded. The data table aims to demonstrate the significant progress of the core technical features of the present application by comparing the performance differences of three control strategies - "fixed parameter strategy" (representing the prior art), "pure PID control strategy" and "PID + reinforcement learning strategy" of the present application - in processing three typical cleaning scenarios (high adhesion type, high flexibility type and mixed type). By tracking the periodic cleaning efficiency index and the final total energy consumption, the dual advantages of the present application in cleaning efficiency and energy saving can be quantitatively proved. The total energy consumption is defined as the total flow energy consumed in the execution stage from the start of the experiment to the end of the current period.
[0073]
[0074] Comparative scenario one (experiment A3-1 and experiment A3-2): when processing high adhesion samples, both strategies correctly output high energy gradient coefficient and high impact frequency. However, the PID + reinforcement learning strategy of the present application (experiment A3-1) achieves lower total energy consumption than the pure PID strategy (experiment A3-2) after two periods. If the energy consumption of the pure PID strategy in periods N and N+1 is 27.0 joules and 28.2 joules respectively, the total energy consumption is 55.2 joules. The total energy consumption of the strategy of the present application is 48.0 joules, and the energy saving calculation is: (1-48.0 / 55.2) x 100% = 13.0%. Analyzing the internal parameters, the reinforcement learning agent slightly "reverses the operation" (-0.03) while the PID suggests a significant increase in impact frequency, and slightly increases the energy gradient (+0.05). This indicates that the agent has learned that for this type of dirt, the frequency is not optimal, and that transferring energy from the time dimension to the spatial dimension appropriately can achieve higher energy efficiency. This strongly proves that the present application has achieved fine and global performance optimization beyond traditional feedback control by introducing reinforcement learning, significantly improving energy saving effect.
[0075] Comparative scenario two (Experiment B3-1 and Experiment B3-2): In the processing of high flexibility samples, both strategies correctly output low energy gradient coefficient and low impact frequency. Similarly, the PID + reinforcement learning strategy of the present application (Experiment B3-1) shows a significant advantage in total energy consumption. If the total energy consumption of the pure PID strategy in two cycles is 59.5 joules. The total energy consumption of the strategy of the present application is 51.2 joules, and the energy saving calculation is: (1-51.2 / 59.5) x 100% = 14.0%. The internal data shows that the reinforcement learning agent further reduces the energy gradient (-0.05) on the basis of the PID recommendation, while slightly increasing the impact mode (+0.01). This reveals the deep strategy learned by the agent: when solving the problem of flexible impedance, the priority of energy coverage range is placed above the absolute "continuous push flow", and weak pulse is helpful to loosen the stacked structure. This proves the feasibility of the design of the present application, that is, the system can autonomously learn and discover counterintuitive but more efficient complex working condition coping strategies.
[0076] Comparative scenario three (Experiment C3-1 and Experiment C3-2): In the mixed scenario, the synergy of PID and reinforcement learning is more obvious. If the total energy consumption of the pure PID strategy in this scenario is 56.8 joules, the total energy consumption of the PID + reinforcement learning strategy of the present application (Experiment C3-1) is 50.1 joules, and the energy saving calculation is: (1-50.1 / 56.8) x 100% = 11.8%. The reinforcement learning agent fine-tunes the PID output in both directions, reflecting its ability to balance and optimize under both impact force and coverage. It is proved that the present application can more intelligently and efficiently handle complex, nonlinear cleaning tasks through the cascading fusion architecture, compared with the prior art which relies only on a single model, and exhibits strong adaptability and superior performance in practical applications. The present embodiment is based on the execution water flow energy gradient coefficient and the execution water flow impact mode output by the algorithm, to divide the cleaning strategy into three clear operation intervals to guide the work of the physical execution unit. Through K-means clustering analysis of a large amount of experimental data and combined with the experience of experts in the cleaning field, three core cleaning strategy modes are defined in the two-dimensional parameter space composed of .
[0077] Strategy one: strong peeling mode; trigger interval is and hertz; the system is highly confident that the current cleaning bottleneck is the high adhesion impedance factor The control system allocates more than 70% of the water pump flow to a few nozzles in the central area. By adjusting the nozzle angle, the jet is highly focused on the target dirt area. The water pump driver works in a high-frequency switching state, generating a strong "water hammer" impact. This operation aims to overcome the adhesion of stubborn dirt with the highest energy density and impact frequency.
[0078] Strategy two: flexible expansion mode, trigger interval is (0.5 < F < 1) and (0.5 < H < 1); the system is highly confident that the current cleaning bottleneck is a high-flexibility impedance factor . The control system allocates the total water pump flow relatively evenly to most or all of the nozzles in the cleaning tank. The water pump driver works in a low-frequency or direct-current state, generating a continuous and stable water flow; the mechanical overturning or vibration function of the cleaning tank is started simultaneously. This operation aims to change the overall stacking form of the spinach cluster by a large range of continuous water flow, exposing the internal area. Strategy three: mixed balanced mode, trigger interval is all other combinations located outside the above two intervals . The system determines that the adhesion impedance and flexibility impedance exist simultaneously or are at a medium level, and needs to consider both cleaning needs; the control system allocates the flow between the central and peripheral nozzles according to the specific execution water flow energy gradient coefficient
[0079] value, according to the pre-set non-linear function; the water pump driver works in a medium-frequency pulse state. This operation aims to balance the spatial distribution and time pattern of energy to simultaneously process two different types of cleaning obstacles. It should be noted that all the calculation formulas in this application file use regression analysis including but not limited to machine learning algorithms to deeply analyze the collected relevant parameters, identify their natural trends and mutual relationships. Professional software such as Python's Scikit-learn library or R language is used to automatically generate mathematical models that match the data. Then, through methods such as cross-validation, the performance of the model is objectively evaluated, and combined with continuous feedback and optimization, to ensure that the created formula truly reflects the inherent law of the data, thereby ensuring its effectiveness and accuracy. In all the calculation formulas in this application, the parameters in each formula are processed by consistent range of dimensionless to ensure that different physical quantities are compared on the same scale; the dimensionless technique includes but is not limited to Min-Max-Normalization, Z-Score standardization;
[0080] It should be noted that all the calculation formulas in this application file use regression analysis including but not limited to machine learning algorithms to deeply analyze the collected relevant parameters, identify their natural trends and mutual relationships. Professional software such as Python's Scikit-learn library or R language is used to automatically generate mathematical models that match the data. Then, through methods such as cross-validation, the performance of the model is objectively evaluated, and combined with continuous feedback and optimization, to ensure that the created formula truly reflects the inherent law of the data, thereby ensuring its effectiveness and accuracy. In all the calculation formulas in this application, the parameters in each formula are processed by consistent range of dimensionless to ensure that different physical quantities are compared on the same scale; the dimensionless technique includes but is not limited to Min-Max-Normalization, Z-Score standardization; It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A method for detecting the washing quality of spinach based on image recognition, characterized in that, The specific steps include: S1: Control the cleaning equipment to generate a composite water flow sequence, wherein the composite water flow sequence includes a detection phase for physical characteristic detection and an execution phase for dirt removal in each operation cycle; S2: During the period when the composite water flow sequence acts on the spinach cluster to be cleaned, an image sequence reflecting the dynamic response process of the spinach cluster is simultaneously acquired by an image acquisition device; S3: Based on the image sequence, simultaneously analyze the biomechanical response parameters characterizing the collective deformation characteristics of the spinach cluster after being stimulated during the detection phase, as well as the hydrodynamic turbidity parameters characterizing the formation of pollutants after they are detached from the spinach cluster and enter the water body; S4: Construct a cleaning impedance model to characterize the cleaning difficulty. The cleaning impedance model is based on the dynamic correlation between the biomechanical response parameters and the hydrodynamic turbidity parameters, and decouples and quantifies in real time the flexible impedance determined by the physical properties of spinach itself and the adhesive impedance determined by the adhesion properties of dirt. S5: Based on the quantification results of the flexible impedance and adhesion impedance decoupled from the cleaning impedance model, the control parameters of the composite water flow sequence in the next operating cycle are adaptively adjusted to form a closed-loop feedback control.
2. The method for detecting the washing quality of spinach based on image recognition according to claim 1, characterized in that: The step of controlling the cleaning equipment to generate a composite water flow sequence further includes: During the detection phase, a periodic pulsed water flow with a preset detection pulse resonance frequency is generated; Through offline experimental calibration, the water flow pulse frequency that can produce the maximum mechanical resonance effect on the target dirt on the spinach cluster to be cleaned is characterized as the "probe pulse resonance frequency". During the execution phase, a targeted cleaning water flow with an execution water flow energy gradient coefficient is generated based on the adaptive adjustment results output by the current operation cycle. A mapping relationship between the "adaptive adjustment result" and the energy gradient coefficient of the executed water flow is established through a fuzzy logic reasoning system.
3. The method for detecting the washing quality of spinach based on image recognition according to claim 2, characterized in that: The synchronous acquisition of the image sequence further includes: setting the acquisition frame rate of the image acquisition device to be greater than twice the resonant frequency of the detection pulse; When the value of the energy gradient coefficient of the water flow is larger, the characterization system is more likely to determine that the dominant obstacle of the current cleaning task is high adhesion resistance, and the more necessary it is to highly focus the cleaning energy in space. The smaller the value of the water flow energy gradient coefficient, the more likely the system is to determine that the dominant obstacle to the current cleaning task is high flexible impedance, and the more necessary it is to cover the cleaning energy in a wide space.
4. The method for detecting the washing quality of spinach based on image recognition according to claim 3, characterized in that: The step of resolving the biomechanical response parameters further includes: calculating the three-dimensional surface strain energy generated by the spinach cluster after being excited during the detection phase using structured light three-dimensional reconstruction technology; The step of resolving the fluid dynamics turbidity parameters further includes: quantifying the microscopic vortex characteristic parameters induced in the water body when the pollutants are peeled off from the spinach clusters through particle image velocimetry analysis.
5. The method for detecting the washing quality of spinach based on image recognition according to claim 4, characterized in that: The step of constructing the cleaning impedance model further includes: constructing a nonlinear state-space model with the flexible impedance and the adhesive impedance as state variables; The observation equation of the state-space model takes the three-dimensional surface strain energy and the microscopic vortex characteristic parameters as observations associated with the state variables. The step of solving and separating the impedance factor further includes: using the extended Kalman filter algorithm to identify the flexible impedance factor and the adhesive impedance factor in the state-space model online based on the observations.
6. The method for detecting the washing quality of spinach based on image recognition according to claim 5, characterized in that: Define three-dimensional surface strain energy, which physically means the total energy stored on the surface of a spinach cluster due to elastic deformation under the action of a probe pulse water flow; The micro-vortex characteristic parameters are defined as dimensionless comprehensive indices synthesized by analyzing the intensity, size, and duration of the micro-vortices induced in the surrounding flow field when dirt particles are peeled off from the blade surface. Define the flexible impedance factor, which characterizes the energy dissipation term coefficient related to the viscoelasticity of the spinach cluster itself in the state-space model. This flexible impedance factor is proportional to the proportion of water flow energy that is ineffectively consumed due to driving the spinach's own motion and deformation. Define an adhesion resistance factor, which characterizes the stress threshold required to trigger a dirt stripping event in the state-space model. This adhesion resistance factor is proportional to the minimum energy required to overcome the adhesion force between dirt per unit area and the blade surface.
7. The method for detecting the washing quality of spinach based on image recognition according to claim 6, characterized in that: As the flexible impedance factor increases, the characterization system identifies the main obstacle to the current cleaning process as more likely to come from the physical characteristics of the spinach cluster itself, and the energy transfer efficiency is lower. The larger the adhesion resistance factor, the more likely the characterization system identifies the main obstacle in the current cleaning process as being the strong adhesion between dirt and the blade surface; higher local stress is required to overcome the adhesion force in order to achieve effective removal of dirt.
8. The method for detecting the washing quality of spinach based on image recognition according to claim 7, characterized in that: The adaptive adjustment step further includes: based on the error between the quantification results of the flexible impedance and the adhesive impedance and the preset impedance target value, calculating the reference adjustment amount of the control parameters of the composite water flow sequence for the next operating cycle through a dual-channel PID controller. Define a periodic cleaning efficiency index that integrates the amount of dirt removed and the energy consumption during the execution phase; By using a reinforcement learning agent and taking the periodic cleaning efficiency index as a reward signal, the baseline adjustment of the PID controller output is optimized in a secondary manner to maximize the long-term cumulative reward.
9. The method for detecting the washing quality of spinach based on image recognition according to claim 8, characterized in that: The reinforcement learning agent employs the Q-Learning algorithm, and its state is defined by the quantization results of the flexible impedance and the adhesive impedance. The control parameters of the composite water flow sequence include the executed water flow energy gradient coefficient, which characterizes the spatial focusing degree of water flow energy, and the executed water flow impact mode, which characterizes the time intensity mode of the water flow.
10. The method for detecting the washing quality of spinach based on image recognition according to claim 9, characterized in that: When the output value of the water flow impact mode is higher, that is, when the pulse frequency is higher, the characterization system determines that the current cleaning task is more likely to face a high adhesion resistance factor, and it is more necessary to use the high frequency water hammer effect to generate instantaneous overpressure to destroy the micro-adhesion structure between dirt and the blade surface in the form of "impact". When the water flow impact mode is lower, the characterization system judges that the current cleaning task is more likely to face a high flexible impedance factor, and more likely to require continuous and stable thrust to change the macroscopic attitude of the spinach cluster.
Citation Information
Patent Citations
Intelligent identification method for vegetable washing robot
CN114821574A
Cleaning robot contact force compliance control method for differentiated insulators
CN120419838A
Flow channel cleaning machine cleanliness detection system based on image recognition
CN120734033A
Water quality sensing device and sensing method for washing fruits and vegetables
TWI755045B
Impedance spectroscopy-based cellular analysis device
US9121806B1
Cited By
Leaf vegetable cleaning and packaging process monitoring system and method based on big data
CN121747098A
Leafy vegetable cleaning and packaging process monitoring system and method based on big data
CN121747098B
