Liquid food pollutant microwave sensing detection method and system based on machine learning

Through machine learning-based methods, design array antenna units and compensated phases, build detection devices, obtain scattering parameters, and train models to identify contaminants in liquid food, solving the problems of small detection range and weak electric field of microwave sensing systems, and achieving a wider and stronger pollutant detection capability.

CN120507370AActive Publication Date: 2025-08-19NANJING UNIV OF SCI & TECH

Patent Information

Application Number
CN202510934476.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-08-19
Estimated Expiration
2045-07-08

AI Technical Summary

Technical Problem

The existing microwave sensing systems have limited detection range, especially the detection capacity of non-metallic pollutants is insufficient, and the electric field strength is weak, making it difficult to effectively identify pollutants at different locations.

Method used

Using a machine learning-based method, by establishing a theoretical model, designing array antenna units and compensating phases, combining FPGA control board and host computer, a detection device is built, scattering parameters are obtained, and machine learning models are trained to identify contaminants in liquid food.

Benefits of technology

The detection range is expanded, the electric field strength is enhanced, the detection ability of pollutants is improved, and the ability to effectively identify pollutants at different locations and types is possible. The machine learning model training process is simple and highly adaptable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120507370A_ABST
    Figure CN120507370A_ABST
Patent Text Reader

Abstract

The invention discloses a liquid food pollutant microwave sensing detection method and system based on machine learning, and the method specifically comprises the steps: building a theoretical model for microwave detection of liquid food pollutants, and designing an antenna unit structure; defining a detection area on the conveyor belt and setting a sampling point position, calculating a phase difference from each antenna unit to the sampling point position, and designing a compensation phase of each antenna unit; an array antenna is built in the simulation software, and the focusing effect of the array antenna is verified; the FPGA control panel is designed for the array antenna, the upper computer is used for controlling the working state of each antenna unit, and the upper computer, the FPGA control panel and the antenna board are integrated to form the detection device. Testing the food before and after being polluted, and constructing a test data set of scattering parameters of the food before and after being polluted; and establishing a machine learning model to detect whether pollutants exist in the liquid food or not and the pollution type. According to the invention, the success rate of food pollutant detection is improved, the detection range is wider, and the detection capability is stronger.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of microwave detection technology, and in particular to a method and system for microwave perception detection of liquid food contaminants based on machine learning. Background Art

[0002] As food inspection scenarios become increasingly complex, food quality inspection technology has made significant progress in recent years. X-ray inspection and metal detectors are currently widely used methods for food contamination detection. However, X-rays lack the ability to detect low-density contaminants and may pose health risks to users. Metal detectors are only suitable for detecting contaminants found in metal objects, while most contaminants are non-metallic materials such as plastic, wood, and glass, thus limiting their detection range.

[0003] Microwave sensing technology, as an emerging detection technology used in the food industry, has a stronger ability to detect these contaminants than traditional methods. Microwave detection technology is based on the different electromagnetic responses of food and contaminants to electromagnetic waves to achieve detection and identification, and is therefore not limited by the material of the contaminants mentioned above. Reference 1 (JA TobonVasquez et al., “Noninvasive inline food inspection via microwave imaging technology: An application example in the food industry,” IEEE Antennas Propag. Mag. , vol. 62, no. 5, pp.18–32, Oct. 2020) Imaging of food contaminants in hazelnut-cocoa spread was achieved by simulating electric fields and scattering parameters (S-parameters).

[0004] Beyond imaging, microwave detection is more importantly about identifying the presence of contaminants and even classifying different types of contamination. Machine learning (ML) has shown significant advantages in many areas, including food quality and safety assessment. Reference 2 (Darwish, Ali, Marco Ricci, Flora Zidane, Jorge A. Tobon Vasquez, Mario R.Casu, Jerome Lanteri, Claire Migliaccio, and Francesca Vipiana. "Physical contamination detection in the food industry using microwave and machine learning.") Electronics, vol. 11, no. 19, pp. 3115, 2022.) By constructing a dataset of contaminated and uncontaminated hazelnut cocoa butter jars, this paper proposes a real-time contamination detection method based on machine learning using a multi-antenna system. However, current microwave sensing systems are mostly composed of horn antennas or patch antennas, which limit their detection range to a single antenna beam. Furthermore, the electric field strength inside food is weak, and detection capabilities are further reduced when food deviates from the primary detection range. Summary of the Invention

[0005] The purpose of the present invention is to provide a microwave sensing detection method and system for liquid food contaminants based on machine learning with a wider detection range and stronger detection capabilities, thereby improving the success rate of food contaminant detection.

[0006] The technical solution to achieve the purpose of the present invention is: a method for detecting liquid food contaminants using microwave sensing based on machine learning, comprising the following steps:

[0007] Step 1: Establish a theoretical model for microwave detection of liquid food contaminants, determine the operating frequency of the detection device based on the electromagnetic characteristics of the liquid food to be detected, and design the antenna unit structure;

[0008] Step 2: Define a fixed area on the food conveyor belt as the detection area, set sampling points within the detection area, calculate the phase difference between each antenna element in the array antenna and these sampling points, and thus design the compensation phase of each antenna element;

[0009] Step 3: Based on the compensation phase of each antenna unit designed in step 2, build an array antenna in the simulation software, and simulate the electric field focusing of the array antenna at different sampling points to verify the focusing effect of the array antenna;

[0010] Step 4: Design an FPGA control board for the array antenna, and use the host computer to control the working status of each antenna unit of the array antenna through point control. Finally, integrate the host computer, FPGA control board, and antenna board to form a detection device, and develop the corresponding PCB board to achieve communication between the various parts.

[0011] Step 5: Using the detection device obtained in step 4, test uncontaminated liquid food and liquid food with different types of contaminants at different locations, obtain the scattering parameters detected at all sampling points, and construct test data sets before and after liquid food contamination;

[0012] Step 6: Preprocess and analyze the uncontaminated and contaminated liquid food test data sets, and establish a machine learning model to detect whether liquid food has contaminants and the type of contamination.

[0013] A liquid food contaminant microwave sensing detection system based on machine learning is used to implement the liquid food contaminant microwave sensing detection method based on machine learning. The system includes a model construction module, a compensation phase design module, a simulation module, a detection device construction module, a test data set construction module, and a detection module, wherein:

[0014] The model building module establishes a theoretical model for microwave detection of liquid food contaminants, determines the operating frequency of the detection device based on the electromagnetic characteristics of the liquid food to be detected, and designs the antenna unit structure;

[0015] The compensation phase design module defines a fixed area on the food conveyor belt as the detection area, sets sampling points within the detection area, calculates the phase difference between each antenna element in the array antenna and these sampling points, and thus designs the compensation phase of each antenna element;

[0016] The simulation module builds an array antenna in the simulation software based on the compensation phase of each designed antenna unit and simulates the electric field focusing of the array antenna at different sampling points to verify the focusing effect of the array antenna;

[0017] The detection device construction module designed an FPGA control board for the array antenna, using the host computer to control the working status of each antenna unit in the array antenna through point control. Finally, the host computer, FPGA control board and antenna board were integrated to form a detection device, and the corresponding PCB board was developed to achieve communication between these parts.

[0018] The test dataset construction module, based on the detection device, tests uncontaminated liquid food and liquid food with different types of contaminants at different locations, obtains the scattering parameters detected at all sampling points, and constructs test datasets before and after liquid food contamination;

[0019] The detection module preprocesses and analyzes the test data sets of uncontaminated and contaminated liquid foods, and establishes a machine learning model to detect whether liquid foods contain contaminants and the type of contamination.

[0020] Compared with the existing technology, the present invention has the following significant advantages: (1) Compared with the horn antenna system, the electric field strength in the liquid food to be tested is enhanced, and the ability to detect pollutants is improved; (2) Focused measurement greatly expands the detection range of pollutants at different locations and can capture scattering parameter information of pollutants from more perspectives; (3) The machine learning model training process is fast and simple, and can adapt to different detection scenarios based on different data forms, and can effectively detect a variety of pollutants. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1It is the quantitative phase compensation distribution diagram of the center-focused antenna unit.

[0022] Figure 2 It is the quantitative phase compensation distribution diagram of the edge position focused antenna unit.

[0023] Figure 3 This is a structural diagram of the microwave sensing detection system for liquid food contaminants based on machine learning of the present invention.

[0024] Figure 4 This is a simulation diagram of the electric field inside an oil can without an antenna.

[0025] Figure 5 This is a simulation diagram of the electric field inside an oil can with an antenna.

[0026] Figure 6 is the error matrix diagram without pollutants.

[0027] Figure 7 This is the error matrix diagram with pollutants.

[0028] Figure 8 It is the mean error matrix diagram without and with pollutants.

[0029] Figure 9 It is a correctness curve chart of the machine learning model training process.

[0030] Figure 10 It is the confusion matrix diagram of the test results.

[0031] Figure 11 It is the confusion matrix percentage graph of the test results. DETAILED DESCRIPTION

[0032] The present invention provides a method for detecting liquid food contaminants using microwave sensing based on machine learning, comprising the following steps:

[0033] Step 1: Establish a theoretical model for microwave detection of liquid food contaminants, determine the operating frequency of the detection device based on the electromagnetic characteristics of the liquid food to be detected, and design the antenna unit structure;

[0034] Step 2: Define a fixed area on the food conveyor belt as the detection area, set sampling points within the detection area, calculate the phase difference between each antenna element in the array antenna and these sampling points, and thus design the compensation phase of each antenna element;

[0035] Step 3: Based on the compensation phase of each antenna unit designed in step 2, build an array antenna in the simulation software, and simulate the electric field focusing of the array antenna at different sampling points to verify the focusing effect of the array antenna;

[0036] Step 4: Design an FPGA control board for the array antenna, and use the host computer to control the working status of each antenna unit of the array antenna through point control. Finally, integrate the host computer, FPGA control board, and antenna board to form a detection device, and develop the corresponding PCB board to achieve communication between the various parts.

[0037] Step 5: Using the detection device obtained in step 4, test uncontaminated liquid food and liquid food with different types of contaminants at different locations, obtain the scattering parameters detected at all sampling points, and construct test data sets before and after liquid food contamination;

[0038] Step 6: Preprocess and analyze the uncontaminated and contaminated liquid food test data sets, and establish a machine learning model to detect whether liquid food has contaminants and the type of contamination.

[0039] As a specific example, the theoretical model for microwave detection of liquid food contaminants described in step 1 is established as follows:

[0040] When electromagnetic waves penetrate liquid food, changes in the dielectric parameters inside the liquid food will lead to changes in the scattering parameters. Based on the difference in dielectric parameters between the liquid food substrate and the contaminants, the contaminants in the liquid food can be detected.

[0041] The volume ratio of the pollutants to the liquid food is less than the threshold, and the scattered field caused by the pollutants is negligible compared with the total field. The Born approximation is introduced to obtain:

[0042]

[0043] in 、 For port 、 location, Produced by pollutants 、 Changes in port scattering parameters; Is the imaginary unit, representing the imaginary part of a complex number; is the angular frequency, is the dielectric constant of liquid food, When there is no contamination, the port The electric field generated by radiation in liquid food, For the area where liquid food is located, Indicates the location The dielectric constant contrast between the presence and absence of contaminants in liquid food, where is the dielectric constant of the pollutant;

[0044] Since there are no pollutants It has nothing to do with pollutants, so and As a linear relationship, Analyze and realize the Conduct testing.

[0045] As a specific example, in step 1, the operating frequency of the detection device is determined based on the electromagnetic characteristics of the liquid food to be detected, as follows:

[0046] When an electromagnetic wave enters a dielectric medium, its energy gradually decreases as its penetration depth increases due to electromagnetic losses. The distance within a material where the radiation intensity of the electromagnetic wave decreases by approximately 37% is called the skin depth, which characterizes the effect of dielectric losses on the penetration strength of the electromagnetic wave. Generally speaking, the higher the electromagnetic wave frequency, the smaller the skin depth for the same material; however, the lower the electromagnetic wave frequency, the lower the detection resolution of the microwave system.

[0047] The liquid food to be detected in the present invention is edible oil. The skin depth, the size of the liquid food (i.e., the size of the edible oil can), and the pollutant detection resolution are comprehensively considered to ensure that the detection resolution can meet the requirements for identifying pollutants. At the same time, the skin depth of the electromagnetic wave is increased as much as possible. 10 GHz is selected as the center frequency of the detection device to design the antenna unit, and multiple frequency points are sampled within the set bandwidth.

[0048] As a specific example, the design of the antenna unit structure described in step 1 is as follows:

[0049] The antenna unit includes a radiation patch, a dielectric substrate, an adhesive plate and a bottom plate.

[0050] The radiating patch is used to receive and transmit electromagnetic waves. The receiving part consists of a side-fed loop antenna, and the transmitting part is a large loop antenna with a strip structure added in the middle. The current direction is controlled by a diode.

[0051] The dielectric substrate is F4BTMS350 with a thickness of 1.6 mm;

[0052] The bonding plate is Rogers4450F with a thickness of 0.2 mm, which is used to connect the dielectric substrate and the bottom plate;

[0053] The bottom plate acts as a ground plane, providing electrical grounding.

[0054] As a specific example, step 2 is as follows:

[0055] Step 2.1: Liquid foods on the production line are transported sequentially via a conveyor belt. A fixed area on the conveyor belt is designated as the detection zone. Transmitter and receiver array antennas are installed on both sides of the conveyor belt in the detection zone. To determine the contamination status of each liquid food, it is necessary to ensure that only one liquid food to be tested is moving along the conveyor belt within the detection zone.

[0056] Step 2.2: Assume that the conveyor belt moves at a constant speed within the detection area. Set a series of sampling points at equal intervals within the detection area. Test the food within the detection area at equal time intervals. Use these sampling points as the positions where the array antenna needs to focus.

[0057] Step 2.3: Calculate the phase difference between each antenna unit and the sampling point positions in the transceiver array antennas on both sides of the food conveyor belt, so as to design the compensation phase of each antenna unit.

[0058] As a specific example, in the detection device described in step 4:

[0059] The FPGA control board uses the host computer to control the working state of each antenna unit on the antenna board through point control, and quantizes the compensation phase designed in step 2 as the actual compensation phase of each antenna unit;

[0060] The DC bias of the detection device is a 12V power supply. The host computer inputs the coding matrix that controls the beam state, and the coding matrix is sent to the memory of the slave computer;

[0061] The lower computer central processing unit controls the FPGA control board to change the state of the diode on the antenna board.

[0062] As a specific example, step 5 is as follows:

[0063] Step 5.1. Set the detection area on the food conveyor belt to 80 cm in length. The transmit and receive array antennas on both sides of the conveyor belt are 1 m apart and located on both sides of the detection area.

[0064] Step 5.2: Place uncontaminated liquid food at the first sampling point on the conveyor belt, indicating that the liquid food has just entered the detection range of the detection device. Input the coding matrix for controlling the beam state through the host computer, point the transmitting and receiving array antennas at the first sampling point on the conveyor belt where the liquid food is located, and control the vector network to measure the scattering parameters obtained by sampling the liquid food at this location within the frequency band.

[0065] Step 5.3: Place the liquid food at the remaining sampling points on the conveyor belt in sequence. At the same time, input the coding matrix for controlling the beam state through the host computer, point the transmitting and receiving array antennas toward the sampling points on the conveyor belt where the liquid food is located, and control the vector network to test the scattering parameters of the liquid food sampled in the frequency band at the corresponding sampling points. This is done until the last sampling point is tested, indicating that the liquid food moves over time on the conveyor belt and moves out of the detection range after passing the last sampling point.

[0066] Step 5.4: Only one scattering parameter is sampled at each sampling point, and the scattering parameter amplitudes at n sampling points are sampled. Data at m frequency points are sampled within the detection frequency band. Therefore, each liquid food corresponds to an n×m scattering parameter matrix, thereby constructing a test data set for uncontaminated liquid food.

[0067] Step 5.5: Place contaminants in liquid food to simulate contaminated liquid food. Test liquid food with different types of contaminants in different locations, following the same testing procedures as for uncontaminated liquid food in steps 5.2 to 5.4, to construct a test dataset for contaminated liquid food.

[0068] As a specific example, the preprocessing and analysis of the uncontaminated and contaminated liquid food test datasets in step 6 are as follows:

[0069] For the uncontaminated and contaminated liquid food test data sets, the noise errors of the two test data sets and the mean error between the two test data sets are calculated. The noise errors of both are smaller than the mean error, that is, the change in scattering parameters caused by contaminants is greater than the change in scattering parameters caused by noise and experimental errors, and then machine learning is used for microwave perception detection.

[0070] As a specific example, step 6 describes establishing a machine learning model to detect whether liquid food contains contaminants and the type of contamination, as follows:

[0071] Step 6.1: Construct a machine learning network based on the scattering parameter matrix. The scattering parameter matrix of the uncontaminated liquid food obtained from the test, as well as the scattering parameter matrices of liquid food with different types of contaminants at different locations, are fed into the machine learning network for training and testing.

[0072] Step 6.2: The machine learning network learns the characteristics of the impact of pollutants on scattering parameters, generates a liquid food contaminant discrimination model, and trains and verifies the discrimination performance of the discrimination model based on measured data;

[0073] Step 6.3: After the discrimination performance is verified, the discrimination results of whether the liquid food has pollutants and the type of contamination are obtained based on the liquid food contaminant discrimination model.

[0074] The present invention also provides a liquid food contaminant microwave sensing detection system based on machine learning, which is used to implement the liquid food contaminant microwave sensing detection method based on machine learning. The system includes a model construction module, a compensation phase design module, a simulation module, a detection device construction module, a test data set construction module, and a detection module, wherein:

[0075] The model building module establishes a theoretical model for microwave detection of liquid food contaminants, determines the operating frequency of the detection device based on the electromagnetic characteristics of the liquid food to be detected, and designs the antenna unit structure;

[0076] The compensation phase design module defines a fixed area on the food conveyor belt as the detection area, sets sampling points within the detection area, calculates the phase difference between each antenna element in the array antenna and these sampling points, and thus designs the compensation phase of each antenna element;

[0077] The simulation module builds an array antenna in the simulation software based on the compensation phase of each designed antenna unit and simulates the electric field focusing of the array antenna at different sampling points to verify the focusing effect of the array antenna;

[0078] The detection device construction module designed an FPGA control board for the array antenna, using the host computer to control the working status of each antenna unit in the array antenna through point control. Finally, the host computer, FPGA control board and antenna board were integrated to form a detection device, and the corresponding PCB board was developed to achieve communication between these parts.

[0079] The test dataset construction module, based on the detection device, tests uncontaminated liquid food and liquid food with different types of contaminants at different locations, obtains the scattering parameters detected at all sampling points, and constructs test datasets before and after liquid food contamination;

[0080] The detection module preprocesses and analyzes the test data sets of uncontaminated and contaminated liquid foods, and establishes a machine learning model to detect whether liquid foods contain contaminants and the type of contamination.

[0081] The present invention detects pollutants based on the difference in electromagnetic properties between liquid food and pollutants. Compared with traditional food detection methods such as X-ray detection and metal detectors, it has the ability to detect low-density and non-metallic pollutants, expanding the detection range of food contaminants.

[0082] The present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.

[0083] Example 1

[0084] This embodiment provides a method for designing a microwave sensing system for detecting liquid food contaminants based on machine learning. The steps are as follows:

[0085] Step 1: Explore the theoretical basis for microwave detection of liquid food contaminants, determine the operating frequency of the microwave sensing system based on the electromagnetic characteristics of the food to be detected, and design the system antenna unit structure;

[0086] First, we explore the theoretical basis for microwave detection of liquid food contaminants, determine the operating frequency of the microwave sensing system based on the electromagnetic characteristics of the food to be detected, and design the system antenna unit structure. When electromagnetic waves penetrate liquid food, changes in the dielectric parameters inside the food will cause changes in the scattering parameters. Generally speaking, contaminants are very small compared to the size of the food, so the scattering field caused by the contaminants can be ignored compared to the total field. Therefore, the Born approximation can be introduced to obtain

[0087]

[0088] in 、 For port 、 location, Produced by pollutants 、 Changes in port scattering parameters, is the angular frequency, is the dielectric constant of liquid food, When there is no contamination, the port The electric field generated by radiation in liquid food, For the area where liquid food is located, Indicates the location The dielectric constant contrast between the presence and absence of contaminants in liquid food, where is the dielectric constant of the pollutant;

[0089] Since there are no pollutants It has nothing to do with pollutants, so and As a linear relationship, Analyze and realize the Conduct testing.

[0090] When an electromagnetic wave is incident on a dielectric medium, the energy of the electromagnetic wave gradually decreases as the penetration depth increases due to electromagnetic loss. The distance at which the radiation intensity of an electromagnetic wave decreases by approximately 37% through a material is called the skin depth, which characterizes the effect of dielectric loss on the penetration intensity of the electromagnetic wave. Generally speaking, the higher the frequency of the electromagnetic wave, the smaller the skin depth of the same material; conversely, the higher the detection resolution of the microwave system. The liquid food targeted in this embodiment is edible oil. Taking into account the skin depth, the size of the edible oil can, and the system's resolution for pollutant detection, 10 GHz was selected as the center frequency of the microwave sensing system to design the antenna unit, and a total of m frequency points were sampled.

[0091] Step 2: According to the size of the liquid food to be detected and the detection range of the pipeline, determine the horizontal focus position of the antenna array and design the phase distribution of the transmitting and receiving antenna arrays, such as Figure 1 、 Figure 2 As shown;

[0092] Step 3: Full-wave simulation verifies the antenna array design, and designs the FPGA control board for the system antenna array. The system design diagram is as follows: Figure 3 As shown, the system is then integrated and processed to obtain the actual system.

[0093] By comparing the simulation and experiment of using only the horn without the array antenna, it is found that adding the antenna array can increase the electric field strength penetrating into the food, such as Figure 4 、 Figure 5 As shown, the system detection capability is improved.

[0094] Step 4: Use the system to conduct experiments on different types of contaminants in different locations attached to liquid food to obtain scattering parameters, namely S parameters. Use the S parameters measured at all detection positions to construct a scattering matrix sample. Based on the experimental data, establish a machine learning model to detect whether the food has contaminants and the type of contamination.

[0095] As food moves along the production line, the transmitting and receiving antenna panels are pointed at the food at different locations, and the corresponding S parameters are measured using a vector network. The antenna panels can achieve horizontal beam focusing through appropriate phase design. If only one S parameter is sampled at each location, and the S parameter amplitudes are sampled at n locations, each location corresponds to data at m frequencies. Therefore, the complete data corresponding to each round of sampling is an n×m scattering matrix. For liquid foods containing different types and locations of potential contaminants, the corresponding S parameter matrices are different. Taking horizontal focusing as an example, preliminary experiments were conducted on foods with no contaminants and those containing different types and locations of contaminants. The experimental data were spliced and analyzed, revealing that the changes in S parameters caused by contaminants were greater than those caused by noise and experimental errors, demonstrating the feasibility of using machine learning for identification.

[0096] A machine learning network is rationally constructed based on the scattering matrix. The S parameter matrices of foods without contaminants and foods containing contaminants of different types and locations obtained from the experiment are put into the network for training and testing. The network learns the characteristics of the impact of pollutants on the scattering parameters, generates a food contaminant discrimination model, and trains the measured data to test the network discrimination performance.

[0097] Example 2

[0098] Traditional methods have certain limitations in detecting food contaminants of different materials and at different locations. X-rays have poor detection capabilities for low-density contaminants, and metal detectors cannot detect non-metallic contaminants. In this embodiment, edible oil cans are used as the test food, and contaminant fragments made of wood, glass and stone are placed on the top, middle and bottom of the cans to simulate the contamination scenario. The frequency band used is 9.5GHz to 10.5GHz, with a frequency interval of 100MHz, and a total of 11 frequency points are sampled. The S parameter amplitudes of 9 positions are designed to be sampled, and the experiment is conducted at an interval of 10cm at each position. The three pollutants and no pollutants together constitute four situations, which is a four-classification problem. 500 rounds of testing were carried out for each situation, so that the total data set contains 2000 samples. The S12 parameters are then spliced, and the machine learning input data is analyzed. The S12 maximum error matrix of all samples without pollutants and containing pollutants, as well as the mean error matrix of the two are shown as follows. Figure 6 、 Figure 7 、 Figure 8 As shown, the corresponding two norms are , and , which means that the change in S parameters caused by pollutants in the experiment is greater than the change in S parameters caused by noise and experimental errors, indicating that the use of machine learning for judgment is feasible.

[0099] After that, a machine learning network was constructed for training and testing. The entire dataset was divided into three groups: training group (about 53%), validation group (about 22%), and test group (about 25%). The training group and validation group are also collectively referred to as the development group. The model was trained for 100 rounds on a dataset of 9*11 dimensions containing only amplitudes, and the accuracy curve of the training process was recorded during the training process, as shown in the figure below. Figure 9 The confusion matrix of the final test results is shown as Figure 10 、 Figure 11 As shown, it can be seen that there are no pollutants and all three pollutants are completely identified, with an accuracy rate of 100%.

[0100] From the above example simulation and result analysis, it can be seen that the liquid food contaminant microwave sensing detection method and system based on machine learning of the present invention has a good detection effect on pollutants of more materials compared with traditional pollutant detection methods, and can detect pollutants distributed in different locations, thereby improving the detection capability of the food detection system.

Claims

1. A method for detecting liquid food contaminants using microwave sensing based on machine learning, characterized in that: The following steps are involved: Step 1: Establish a theoretical model for microwave detection of liquid food contaminants, determine the operating frequency of the detection device based on the electromagnetic characteristics of the liquid food to be detected, and design the antenna unit structure; Step 2: Define a fixed area on the food conveyor belt as the detection area, set sampling points within the detection area, calculate the phase difference between each antenna element in the array antenna and these sampling points, and thus design the compensation phase of each antenna element; Step 3: Based on the compensation phase of each antenna unit designed in step 2, build an array antenna in the simulation software, and simulate the electric field focusing of the array antenna at different sampling points to verify the focusing effect of the array antenna; Step 4: Design an FPGA control board for the array antenna, and use the host computer to control the working status of each antenna unit of the array antenna through point control. Finally, integrate the host computer, FPGA control board, and antenna board to form a detection device, and develop the corresponding PCB board to achieve communication between the various parts. Step 5: Using the detection device obtained in step 4, test uncontaminated liquid food and liquid food with different types of contaminants at different locations, obtain the scattering parameters detected at all sampling points, and construct test data sets before and after liquid food contamination; Step 6: Preprocess and analyze the uncontaminated and contaminated liquid food test data sets, and establish a machine learning model to detect whether liquid food has contaminants and the type of contamination.

2. The method for detecting liquid food contaminants by microwave sensing based on machine learning according to claim 1, characterized in that: The theoretical model for microwave detection of liquid food contaminants is established as described in step 1, as follows: When electromagnetic waves penetrate liquid food, changes in the dielectric parameters inside the liquid food will lead to changes in the scattering parameters. Based on the difference in dielectric parameters between the liquid food substrate and the contaminants, the contaminants in the liquid food can be detected. The volume ratio of the pollutant to the liquid food is less than the threshold, and the scattered field caused by the pollutant is ignored. The Born approximation is introduced to obtain: ; in 、 For port 、 location, Produced by pollutants 、 Changes in port scattering parameters; Is the imaginary unit, representing the imaginary part of a complex number; is the angular frequency, is the dielectric constant of liquid food, When there is no contamination, the port The electric field generated by radiation in liquid food, For the area where liquid food is located, Indicates the location The dielectric constant contrast between the presence and absence of contaminants in liquid food, where is the dielectric constant of the pollutant; Since there are no pollutants It has nothing to do with pollutants, so and As a linear relationship, Analyze and realize the Conduct testing.

3. The method for detecting liquid food contaminants by microwave sensing based on machine learning according to claim 1, characterized in that: In step 1, the operating frequency of the detection device is determined based on the electromagnetic characteristics of the liquid food to be detected, as follows: The liquid food to be detected is edible oil. 10 GHz is selected as the center frequency of the detection device to design the antenna unit, and multiple frequency points are sampled within the set bandwidth.

4. The method for detecting liquid food contaminants by microwave sensing based on machine learning according to claim 1, characterized in that: The antenna unit structure is designed as described in step 1, as follows: The antenna unit includes a radiation patch, a dielectric substrate, an adhesive plate and a bottom plate. The radiating patch is used to receive and transmit electromagnetic waves. The receiving part consists of a side-fed loop antenna, and the transmitting part is a large loop antenna with a strip structure added in the middle. The current direction is controlled by a diode. The dielectric substrate is F4BTMS350 with a thickness of 1.6 mm; The bonding plate is Rogers4450F with a thickness of 0.2 mm, which is used to connect the dielectric substrate and the bottom plate; The bottom plate acts as a ground plane, providing electrical grounding.

5. The method for detecting liquid food contaminants by microwave sensing based on machine learning according to claim 1, characterized in that: The step 2 is specifically as follows: Step 2.1: Liquid foods on the production line are transported sequentially via a conveyor belt. A fixed area on the conveyor belt is designated as the detection zone. Transmitter and receiver array antennas are installed on both sides of the conveyor belt in the detection zone. To determine the contamination status of each liquid food, it is necessary to ensure that only one liquid food to be tested is moving along the conveyor belt within the detection zone. Step 2.2: Assume that the conveyor belt moves at a constant speed within the detection area. Set a series of sampling points at equal intervals within the detection area. Test the food within the detection area at equal time intervals. Use these sampling points as the positions where the array antenna needs to focus. Step 2.3: Calculate the phase difference between each antenna unit and the sampling point positions in the transceiver array antennas on both sides of the food conveyor belt, so as to design the compensation phase of each antenna unit.

6. The method for detecting liquid food contaminants by microwave sensing based on machine learning according to claim 1, characterized in that: In the detection device described in step 4: The FPGA control board uses the host computer to control the working state of each antenna unit on the antenna board through point control, and quantizes the compensation phase designed in step 2 as the actual compensation phase of each antenna unit; The DC bias of the detection device is a 12V power supply. The host computer inputs the coding matrix that controls the beam state, and the coding matrix is sent to the memory of the slave computer; The lower computer central processing unit controls the FPGA control board to change the state of the diode on the antenna board.

7. The method for detecting liquid food contaminants by microwave sensing based on machine learning according to claim 1, characterized in that: The step 5 is specifically as follows: Step 5.

1. Set the detection area on the food conveyor belt to 80 cm in length. The transmit and receive array antennas on both sides of the conveyor belt are 1 m apart and located on both sides of the detection area. Step 5.2: Place uncontaminated liquid food at the first sampling point on the conveyor belt, indicating that the liquid food has just entered the detection range of the detection device. Input the coding matrix for controlling the beam state through the host computer, point the transmitting and receiving array antennas at the first sampling point on the conveyor belt where the liquid food is located, and control the vector network to measure the scattering parameters obtained by sampling the liquid food at this location within the frequency band. Step 5.3: Place the liquid food at the remaining sampling points on the conveyor belt in sequence. Simultaneously, input the coding matrix for controlling the beam state through the host computer, direct the transmitting and receiving array antennas toward the sampling points on the conveyor belt where the liquid food is located, and control the vector network to measure the scattering parameters of the liquid food within the frequency band at the corresponding sampling points. Until the last sampling point position is tested, it indicates that the liquid food moves on the conveyor belt over time and moves out of the detection range after passing the last sampling point position; Step 5.4: Only one scattering parameter is sampled at each sampling point, and the scattering parameter amplitudes at n sampling points are sampled. Data at m frequency points are sampled within the detection frequency band. Therefore, each liquid food corresponds to an n×m scattering parameter matrix, thereby constructing a test data set for uncontaminated liquid food. Step 5.5: Place contaminants in liquid food to simulate contaminated liquid food. Test liquid food with different types of contaminants in different locations, following the same testing procedures as for uncontaminated liquid food in steps 5.2 to 5.4, to construct a test dataset for contaminated liquid food.

8. The method for detecting liquid food contaminants by microwave sensing based on machine learning according to claim 7, characterized in that: Step 6 pre-processes and analyzes the uncontaminated and contaminated liquid food test datasets as follows: For the uncontaminated and contaminated liquid food test data sets, the noise errors of the two test data sets and the mean error between the two test data sets are calculated. The noise errors of both are smaller than the mean error, that is, the change in scattering parameters caused by contaminants is greater than the change in scattering parameters caused by noise and experimental errors, and then machine learning is used for microwave perception detection.

9. The method for detecting liquid food contaminants by microwave sensing based on machine learning according to claim 7, characterized in that: Step 6 describes the establishment of a machine learning model to detect the presence of contaminants and the type of contamination in liquid food, as follows: Step 6.1: Construct a machine learning network based on the scattering parameter matrix. The scattering parameter matrix of the uncontaminated liquid food obtained from the test, as well as the scattering parameter matrices of liquid food with different types of contaminants at different locations, are fed into the machine learning network for training and testing. Step 6.2: The machine learning network learns the characteristics of the impact of pollutants on scattering parameters, generates a liquid food contaminant discrimination model, and trains and verifies the discrimination performance of the discrimination model based on measured data; Step 6.3: After the discrimination performance is verified, the discrimination results of whether the liquid food has pollutants and the type of contamination are obtained based on the liquid food contaminant discrimination model.

10. A liquid food contaminant microwave sensing detection system based on machine learning, characterized in that: The system is used to implement the microwave sensing detection method for liquid food contaminants based on machine learning as described in any one of claims 1 to 9, and the system includes a model construction module, a compensation phase design module, a simulation module, a detection device construction module, a test data set construction module and a detection module, wherein: The model building module establishes a theoretical model for microwave detection of liquid food contaminants, determines the operating frequency of the detection device based on the electromagnetic characteristics of the liquid food to be detected, and designs the antenna unit structure; The compensation phase design module defines a fixed area on the food conveyor belt as the detection area, sets sampling points within the detection area, calculates the phase difference between each antenna element in the array antenna and these sampling points, and thus designs the compensation phase of each antenna element; The simulation module builds an array antenna in the simulation software based on the compensation phase of each designed antenna unit and simulates the electric field focusing of the array antenna at different sampling points to verify the focusing effect of the array antenna; The detection device construction module designed an FPGA control board for the array antenna, using the host computer to control the working status of each antenna unit in the array antenna through point control. Finally, the host computer, FPGA control board and antenna board were integrated to form a detection device, and the corresponding PCB board was developed to achieve communication between these parts. The test dataset construction module, based on the detection device, tests uncontaminated liquid food and liquid food with different types of contaminants at different locations, obtains the scattering parameters detected at all sampling points, and constructs test datasets before and after liquid food contamination; The detection module preprocesses and analyzes the test data sets of uncontaminated and contaminated liquid foods, and establishes a machine learning model to detect whether liquid foods contain contaminants and the type of contamination.

Citation Information

Patent Citations

  • Plant-derived food chemical pollutant risk analysis and detection method

    CN111784197A

  • Material water content detection system and method based on patch antenna

    CN114689615A

  • Double-coding semi-supervised non-targeted food pollutant detection method

    CN115545096A

  • Food pollution detection method and system based on multi-wavelength spectrophotometry

    CN120009209A

  • PROMPT VIRUSES INFECTION DETECTION USING THz SPECTROSCOPY IN A BREATHALYZER-LIKE CONFIGURATION

    US20230221248A1

Cited By

  • Pollutant detection method and system based on machine learning

    CN121456370A