Machine learning based microwave perception detection method and system for liquid food contaminants

By designing array antenna units and machine learning models, the problem of limited detection range in microwave sensing systems was solved, enabling wide-range detection of liquid food and effective identification of various contaminants, thus improving detection capabilities.

CN120507370BActive Publication Date: 2025-11-11NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing microwave sensing systems have limited detection range, especially when food deviates from the main detection range, and their detection capability is insufficient for low-density and non-metallic contaminants.

Method used

A machine learning-based approach is used to design array antenna units, calculate compensation phase, enhance electric field strength, and use an FPGA control board to control the state of the antenna units. Combined with PCB board communication, a detection device is constructed to detect food contaminants.

Benefits of technology

It expands the detection range, improves the ability to detect pollutants in different locations, enhances the electric field strength, and the machine learning model can quickly adapt to different detection scenarios, effectively detecting a variety of pollutants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120507370B_ABST
    Figure CN120507370B_ABST
Patent Text Reader

Abstract

The application discloses a kind of microwave perception detection method and system of liquid food pollutant based on machine learning, specifically: the theoretical model of microwave detection liquid food pollutant is established, antenna unit structure is designed;Detection area is demarcated on conveyor belt and sampling point position is set, the phase difference of each antenna unit to sampling point position is calculated, and the compensation phase of each antenna unit is designed;Array antenna is built in simulation software, and the focusing effect of array antenna is verified;FPGA control board is designed for array antenna, and the working state of each antenna unit is controlled using host computer, and the detection device is formed by integrating host computer, FPGA control board and antenna board;Test food before and after being contaminated, and construct the test data set of scattering parameters before and after food contamination;Machine learning model is established to detect whether liquid food is contaminated and the type of pollution.The application improves the success rate of food pollutant detection, and the detection range is wider and the detection capacity is stronger.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of microwave detection technology, specifically a microwave sensing detection method and system for contaminants in liquid food based on machine learning. Background Technology

[0002] As food testing scenarios become increasingly complex, food quality testing technologies have made significant progress in recent years. Among these, X-ray detection and metal detectors are widely used methods for detecting food contamination. 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 on metallic objects, while most contaminants are non-metallic materials such as plastics, wood, and glass, thus limiting their detection range.

[0003] Microwave sensing technology, as an emerging detection technology applied in the food industry, has a stronger detection capability for the aforementioned contaminants compared to traditional methods. Microwave detection technology achieves its detection and identification purpose based on the different electromagnetic responses of food and contaminants to electromagnetic waves, thus it is not limited by the material of the contaminants. Reference 1 (JA Tobon Vasquez 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 sauce was achieved by simulating electric fields and scattering parameters (S-parameters).

[0004] Beyond imaging, a more important purpose of microwave detection is to identify the presence of contaminants and even classify 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 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 cans, this paper proposes a machine learning-based real-time contamination detection method using a multi-antenna system. However, most current microwave sensing systems consist of horn antennas or patch antennas, whose detection range is limited to the beam of a single antenna. Furthermore, the electric field strength inside food is relatively weak, and the detection capability further decreases when the food deviates from the main detection range. Summary of the Invention

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

[0006] The technical solution for achieving the objective of this invention is: a microwave sensing detection method for contaminants in liquid food based on machine learning, comprising the following steps:

[0007] Step 1: Establish a theoretical model for microwave detection of contaminants in liquid food, 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 point positions within the detection area, calculate the phase difference between each antenna element in the array antenna and these sampling point positions, and design the compensation phase of each antenna element.

[0009] Step 3: Based on the compensation phase of each antenna element 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. Use a 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 a corresponding PCB board to realize communication between the parts.

[0011] Step 5: Based on the detection device obtained in Step 4, test uncontaminated liquid food and liquid food with different types of contaminants attached at different locations, obtain the scattering parameters detected at all sampling points, and construct test datasets before and after liquid food contamination.

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

[0013] A machine learning-based microwave sensing detection system for liquid food contaminants is disclosed. This system implements the aforementioned machine learning-based microwave sensing detection method for liquid food contaminants. The system includes a model building module, a compensation phase design module, a simulation module, a detection device building module, a test dataset building module, and a detection module, wherein:

[0014] The model building module establishes a theoretical model for microwave detection of contaminants in liquid food, 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 phase compensation design module defines a fixed area on the food conveyor belt as the detection area, sets sampling point positions within this detection area, calculates the phase difference between each antenna element in the array antenna and these sampling point positions, and thus designs the phase compensation for each antenna element.

[0016] The simulation module builds an array antenna in the simulation software based on the compensation phase of each designed antenna element, and simulates the electric field focusing of the array antenna at different sampling points, thereby verifying the focusing effect of the array antenna.

[0017] The detection device construction module is designed with an FPGA control board for the array antenna. The host computer is used to control the working status of each antenna unit of the array antenna through point control. Finally, the host computer, FPGA control board and antenna board are integrated to form the detection device, and the corresponding PCB board is developed to realize the communication between the 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 test datasets 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 prior art, the present invention has the following significant advantages: (1) Compared with the horn antenna system, it enhances the electric field strength inside the liquid food to be tested and improves the ability to detect pollutants; (2) Focused measurement greatly expands the detection range of pollutants at different locations and can capture more 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 for different data formats, and can effectively detect a variety of pollutants. Attached Figure Description

[0021] Figure 1This is a distribution diagram of the quantization phase compensation of the focusing antenna element at the center position.

[0022] Figure 2 This is a distribution diagram of quantized phase compensation for focused antenna elements at the edge.

[0023] Figure 3 This is a structural diagram of the microwave sensing and detection system for contaminants in liquid food based on machine learning, as described in this invention.

[0024] Figure 4 This is a simulation diagram of the internal electric field of an antennaless oil can.

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

[0026] Figure 6 This is an error matrix diagram without contaminants.

[0027] Figure 7 This is an error matrix diagram showing the presence of pollutants.

[0028] Figure 8 This is a mean error matrix diagram showing the presence and absence of pollutants.

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

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

[0031] Figure 11 This is a percentage chart of the confusion matrix of the test results. Detailed Implementation

[0032] This invention provides a microwave sensing detection method for contaminants in liquid food based on machine learning, the steps of which are as follows:

[0033] Step 1: Establish a theoretical model for microwave detection of contaminants in liquid food, 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 point positions within the detection area, calculate the phase difference between each antenna element in the array antenna and these sampling point positions, and design the compensation phase of each antenna element.

[0035] Step 3: Based on the compensation phase of each antenna element 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. Use a 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 a corresponding PCB board to realize communication between the parts.

[0037] Step 5: Based on the detection device obtained in Step 4, test uncontaminated liquid food and liquid food with different types of contaminants attached at different locations, obtain the scattering parameters detected at all sampling points, and construct test datasets before and after liquid food contamination.

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

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

[0040] When electromagnetic waves penetrate liquid food, the change in the dielectric parameters inside the liquid food will lead to a change in the scattering parameters. Based on the difference in dielectric parameters between the liquid food substrate and the contaminants, it is possible to detect contaminants in liquid food.

[0041] Since the volume ratio of contaminants to liquid food is less than a threshold, the scattered field from the contaminants is negligible compared to the total field. Introducing the Born approximation, we obtain:

[0042]

[0043] in , For port , Location, For pollutants , Changes in port scattering parameters; It is the imaginary unit, representing the imaginary part of a complex number; Angular frequency, The dielectric constant of liquid food. When there are no contaminants, the port The electric field generated by radiation within liquid food. This is the area where liquid food is located. Indicates the location The contrast in dielectric constant between liquid food samples with and without contaminants, where... The dielectric constant of the pollutant;

[0044] When there are no pollutants It is unrelated to pollutants, therefore and Consider it as a linear relationship, for To conduct analysis and achieve the goal of identifying contaminants in liquid food. Conduct testing.

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

[0046] When electromagnetic waves are incident on a dielectric medium, their energy gradually decreases with increasing penetration depth due to electromagnetic losses. The distance at which the radiation intensity of an electromagnetic wave decreases by approximately 37% after passing through a material is called the skin depth, which characterizes the effect of dielectric losses on the penetration intensity of the electromagnetic wave. Generally speaking, the higher the frequency of the electromagnetic wave, the smaller the skin depth for the same material; however, the lower the frequency of the electromagnetic wave, the lower the detection resolution of the microwave system.

[0047] The liquid food to be detected in this invention is edible oil. Taking into account factors such as skin depth, size of the liquid food (i.e., size of the edible oil can), and detection resolution of contaminants, the detection resolution is ensured to meet the requirements for contaminant identification. At the same time, the skin depth of electromagnetic waves 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 element structure described in step 1 is as follows:

[0049] The antenna unit includes a radiating patch, a dielectric substrate, an adhesive plate, and a base 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 a 0.2mm thick Rogers 4450F, used to connect the dielectric substrate and the base plate;

[0053] The base plate serves as a grounding plate, providing electrical grounding.

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

[0055] Step 2.1: Liquid food products on the production line are transferred sequentially via a conveyor belt. A fixed area is designated as the detection area within the food conveyor belt. Transmitting and receiving array antennas are installed on both sides of the conveyor belt in the detection area. In order to determine the contamination status of each liquid food product, it is necessary to ensure that only one liquid food product to be detected moves with the conveyor belt within the detection area.

[0056] Step 2.2: Assuming the conveyor belt moves at a constant speed within the detection area, a series of sampling points are set at equal intervals within the detection area. The food within the detection area is detected at equal time intervals, and these sampling points are used as the focusing positions of the array antenna.

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

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

[0059] The FPGA control board uses a 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 upper computer inputs the encoding matrix of the control beam state, and the encoding matrix is ​​sent to the memory of the lower computer.

[0061] The lower-level central processing unit controls the FPGA control board, thereby changing the state of the diodes 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 be 80cm long, and place the transmitting and receiving array antennas on both sides of the conveyor belt 1m apart on both sides of the detection area.

[0064] Step 5.2: Place the 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 into the host computer, point the transmitting and receiving array antennas to the first sampling point 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 that position;

[0065] Step 5.3: Place the liquid food items sequentially at the remaining sampling points on the conveyor belt. Simultaneously, input the encoding matrix for controlling the beam state into the host computer, point the transmitting and receiving array antennas at the sampling points on the conveyor belt where the liquid food items are located, and control the vector network scattering test to measure the scattering parameters of the liquid food items sampled in the frequency band at the corresponding sampling point locations. This process continues until the last sampling point location is tested, indicating that the liquid food items have moved on the conveyor belt over time and have moved out of the detection range after passing the last sampling point location.

[0066] Step 5.4: Only one scattering parameter is sampled at each sampling point location. The amplitude of the scattering parameter is sampled at n sampling points. Data from 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 dataset of uncontaminated liquid food.

[0067] Step 5.5: Place the contaminant inside the liquid food to simulate the contamination of the liquid food. Test the liquid food with different types of contaminants attached to different locations. The test steps are the same as those for the uncontaminated liquid food in Steps 5.2 to 5.4, thereby constructing a test dataset of contaminated liquid food.

[0068] As a specific example, step 6 involves preprocessing and analyzing the test datasets of uncontaminated and contaminated liquid foods, as detailed below:

[0069] For uncontaminated and contaminated liquid food test datasets, the noise error of each test dataset and the mean error between the two test datasets are calculated. The noise error of each dataset is smaller than the mean error, meaning that the change in scattering parameters caused by contaminants is greater than the change in scattering parameters caused by noise and experimental errors. Then, machine learning is used for microwave sensing detection.

[0070] As a specific example, step 6 involves establishing a machine learning model to detect the presence and type of contaminants in liquid food, as detailed below:

[0071] Step 6.1: Construct a machine learning network for the scattering parameter matrix. Input the scattering parameter matrix of the uncontaminated liquid food obtained from the test, as well as the scattering parameter matrix of the liquid food with different types of contaminants attached to different locations, into the machine learning network for training and testing.

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

[0073] Step 6.3: After verifying the discrimination performance, based on the liquid food contaminant discrimination model, obtain the discrimination results of whether liquid food contains contaminants and the type of contamination.

[0074] This invention also provides a machine learning-based microwave sensing detection system for liquid food contaminants. This system implements the aforementioned machine learning-based microwave sensing detection method for liquid food contaminants. The system includes a model building module, a compensation phase design module, a simulation module, a detection device building module, a test dataset building module, and a detection module, wherein:

[0075] The model building module establishes a theoretical model for microwave detection of contaminants in liquid food, 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 phase compensation design module defines a fixed area on the food conveyor belt as the detection area, sets sampling point positions within this detection area, calculates the phase difference between each antenna element in the array antenna and these sampling point positions, and thus designs the phase compensation for each antenna element.

[0077] The simulation module builds an array antenna in the simulation software based on the compensation phase of each designed antenna element, and simulates the electric field focusing of the array antenna at different sampling points, thereby verifying the focusing effect of the array antenna.

[0078] The detection device construction module is designed with an FPGA control board for the array antenna. The host computer is used to control the working status of each antenna unit of the array antenna through point control. Finally, the host computer, FPGA control board and antenna board are integrated to form the detection device, and the corresponding PCB board is developed to realize the communication between the 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 test datasets 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] This invention is based on the difference in electromagnetic properties between liquid food and contaminants to detect contaminants. 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 contaminants, thus expanding the detection range of food contaminants.

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

[0083] Example 1

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

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

[0086] First, the theoretical basis for microwave detection of contaminants in liquid food is explored. The operating frequency of the microwave sensing system is determined based on the electromagnetic properties of the food to be detected, and the antenna unit structure of the system is designed. When electromagnetic waves penetrate liquid food, changes in the dielectric parameters inside the food lead to changes in the scattering parameters. Generally, contaminants are very small relative to the size of the food, so the scattered field caused by the contaminants is negligible compared to the total field. Therefore, the Born approximation can be introduced to obtain...

[0087]

[0088] in , For port , Location, For pollutants , Changes in port scattering parameters Angular frequency, The dielectric constant of liquid food. When there are no contaminants, the port The electric field generated by radiation within liquid food. This is the area where liquid food is located. Indicates the location The contrast in dielectric constant between liquid food samples with and without contaminants, where... The dielectric constant of the pollutant;

[0089] When there are no pollutants It is unrelated to pollutants, therefore and Consider it as a linear relationship, for To conduct analysis and achieve the goal of identifying contaminants in liquid food. Conduct testing.

[0090] When electromagnetic waves are incident on a medium, their energy gradually decreases with increasing penetration depth due to electromagnetic losses. The distance at which the radiation intensity of an electromagnetic wave decreases by approximately 37% after penetrating a material is called the skin depth, which characterizes the effect of dielectric losses on the penetration intensity of the electromagnetic wave. Generally speaking, the higher the frequency of the electromagnetic wave, the smaller the skin depth for the same material; conversely, the higher the detection resolution of the microwave system. In this embodiment, the liquid food being tested is edible oil. Considering factors such as skin depth, the size of the edible oil can, and the system's resolution for detecting contaminants, 10 GHz was selected as the center frequency for the microwave sensing system antenna element design, sampling a total of m frequency points.

[0091] Step 2: Based on the size of the liquid food to be tested and the detection range of the production line, determine the focusing position of the antenna array in the horizontal direction, and design the phase distribution of the transmitting and receiving antenna arrays, such as... Figure 1 , Figure 2 As shown;

[0092] Step 3: Verify the antenna array design through full-wave simulation, and design an FPGA control board for the system antenna array. The system design diagram is shown below. Figure 3 As shown, the system is then integrated and processed to obtain the physical system.

[0093] A comparison of simulations and experiments using only a horn without an antenna array revealed that adding an antenna array can increase the electric field strength penetrating food. Figure 4 , Figure 5 As shown, this improves the system's detection capabilities.

[0094] Step 4: Use the system to conduct experiments on different types and locations of contaminants attached to liquid food, obtain scattering parameters, i.e., S-parameters, construct scattering matrix samples using S-parameters measured at all detection locations, and establish a machine learning model based on the experimental data to detect whether food contains contaminants and the type of contamination.

[0095] As food moves along the production line, transmitting and receiving antennas are pointed at different locations within the food, and the corresponding S-parameters are measured using vector scattering (SAR) analysis. The antennas 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 from m frequency points. Therefore, the complete data for each round of sampling is an n×m scattering matrix. The corresponding S-parameter matrix differs depending on the type and location of potential contaminants contained in the liquid food. Taking horizontal focusing as an example, preliminary experiments were conducted on food containing no contaminants and food containing different types and locations of contaminants. The experimental data were stitched together 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 discrimination.

[0096] A machine learning network was constructed based on the scattering matrix. The S-parameter matrices of food without contaminants and food containing contaminants of different types and locations were obtained from experiments and fed into the network for training and testing. The network learned the characteristics of the influence of contaminants on the scattering parameters, generated a food contaminant discrimination model, and trained and tested the network discrimination performance on the measured data.

[0097] Example 2

[0098] Traditional methods have limitations in detecting food contaminants of different materials and locations. X-rays are ineffective at detecting low-density contaminants, and metal detectors cannot detect non-metallic contaminants. This embodiment uses edible oil cans as the food to be tested. Contaminant fragments made of wood, glass, and stone were placed sequentially at the top, middle, and bottom of the can to simulate contamination scenarios. The frequency band used was 9.5 GHz to 10.5 GHz, with a frequency interval of 100 MHz, for a total of 11 frequency points. The S-parameter amplitudes were sampled at 9 locations, with each location spaced 10 cm apart. The three contaminants and the absence of contaminants constituted four cases, i.e., a four-class classification problem. Each case was tested 500 times, resulting in a total dataset of 2000 samples. The S12 parameters were then concatenated, and the machine learning input data was analyzed. The maximum S12 error matrix for samples without contaminants and samples containing all contaminants, as well as the mean error matrix of both, are shown below. Figure 6 , Figure 7 , Figure 8 As shown, their corresponding L2 norms are respectively , and This indicates that the changes in S-parameters caused by pollutants in the experiment are greater than those caused by noise and experimental errors, demonstrating the feasibility of using machine learning for discrimination.

[0099] Next, a machine learning network was built for training and testing. The entire dataset was divided into three groups: a training group (approximately 53%), a validation group (approximately 22%), and a testing group (approximately 25%). The training and validation groups were also collectively referred to as the development group. The model was trained for 100 epochs on a 9*11 dimension dataset containing only amplitude data, and the accuracy curves during training were recorded, such as... Figure 9 As shown. The confusion matrix of the final test results is as follows. Figure 10 , Figure 11 As shown, there are no pollutants and all three pollutants were completely identified, achieving a 100% accuracy rate.

[0100] Based on the above simulation examples and results analysis, the microwave sensing detection method and system for liquid food contaminants based on machine learning of the present invention has a better detection effect on contaminants of more materials compared with traditional contaminant detection methods, and can detect contaminants distributed in different locations, thereby improving the detection capability of the food detection system.

Claims

1. A microwave sensing detection method for contaminants in liquid food based on machine learning, characterized in that, Includes the following steps: Step 1: Establish a theoretical model for microwave detection of contaminants in liquid food, 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 point positions within the detection area, calculate the phase difference between each antenna element in the array antenna and these sampling point positions, and design the compensation phase of each antenna element. Step 3: Based on the compensation phase of each antenna element 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. Use a 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 a corresponding PCB board to realize communication between the parts. Step 5: Based on the detection device obtained in Step 4, test uncontaminated liquid food and liquid food with different types of contaminants attached at different locations, obtain the scattering parameters detected at all sampling points, and construct test datasets before and after liquid food contamination. Step 6: Preprocess and analyze the test datasets of uncontaminated and contaminated liquid foods, and establish a machine learning model to detect whether liquid foods contain contaminants and the type of contamination. Step 1 involves establishing a theoretical model for microwave detection of contaminants in liquid food, as detailed below: When electromagnetic waves penetrate liquid food, the change in the dielectric parameters inside the liquid food will lead to a change in the scattering parameters. Based on the difference in dielectric parameters between the liquid food substrate and the contaminants, it is possible to detect contaminants in liquid food. Since the volume ratio of contaminants to liquid food is less than a threshold, ignoring the scattering field caused by contaminants, the Born approximation is introduced to obtain: ; in , For port , Location, For pollutants , Changes in port scattering parameters; It is the imaginary unit, representing the imaginary part of a complex number; Angular frequency, The dielectric constant of liquid food. When there are no contaminants, the port The electric field generated by radiation within liquid food. This is the area where liquid food is located. Indicates the location The contrast in dielectric constant between liquid food samples with and without contaminants, where... The dielectric constant of the pollutant; When there are no pollutants It is unrelated to pollutants, therefore and Consider it as a linear relationship, for To conduct analysis and achieve the goal of identifying contaminants in liquid food. Conduct testing.

2. The microwave sensing detection method for contaminants in liquid food based on machine learning according to claim 1, characterized in that, Step 1, which involves determining the operating frequency of the detection device based on the electromagnetic properties of the liquid food to be tested, is detailed as follows: The liquid food to be tested is edible oil. 10GHz was selected as the center frequency of the detection device to design the antenna unit, and multiple frequency points were sampled within the set bandwidth.

3. The microwave sensing detection method for contaminants in liquid food based on machine learning according to claim 1, characterized in that, Step 1 involves designing the antenna element structure, as detailed below: The antenna unit includes a radiating patch, a dielectric substrate, an adhesive plate, and a base 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 a 0.2mm thick Rogers 4450F, used to connect the dielectric substrate and the base plate; The base plate serves as a grounding plate, providing electrical grounding.

4. The microwave sensing detection method for contaminants in liquid food based on machine learning according to claim 1, characterized in that, Step 2 is described in detail below: Step 2.1: Liquid food products on the production line are transferred sequentially via a conveyor belt. A fixed area is designated as the detection area within the food conveyor belt. Transmitting and receiving array antennas are installed on both sides of the conveyor belt in the detection area. In order to determine the contamination status of each liquid food product, it is necessary to ensure that only one liquid food product to be detected moves with the conveyor belt within the detection area. Step 2.2: Assuming the conveyor belt moves at a constant speed within the detection area, a series of sampling points are set at equal intervals within the detection area. The food within the detection area is detected at equal time intervals, and these sampling points are used as the focusing positions of the array antenna. Step 2.3: Calculate the phase difference between each antenna element and the sampling point position in the transceiver array antennas on both sides of the food conveyor belt, so as to design the compensation phase of each antenna element.

5. The microwave sensing detection method for contaminants in liquid food based on machine learning according to claim 1, characterized in that, In the detection device described in step 4: The FPGA control board uses a 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 upper computer inputs the encoding matrix of the control beam state, and the encoding matrix is ​​sent to the memory of the lower computer. The lower-level central processing unit controls the FPGA control board, thereby changing the state of the diodes on the antenna board.

6. The microwave sensing detection method for contaminants in liquid food based on machine learning according to claim 1, characterized in that, Step 5 is described in detail below: Step 5.1: Set the detection area on the food conveyor belt to be 80cm long, and place the transmitting and receiving array antennas on both sides of the conveyor belt 1m apart on both sides of the detection area. Step 5.2: Place the 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 into the host computer, point the transmitting and receiving array antennas to the first sampling point 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 that position; Step 5.3: Place the liquid food in sequence at the remaining sampling points on the conveyor belt. At the same time, input the coding matrix to control the beam state through the host computer, point the transmitting and receiving array antennas to 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 point. The test continues until the last sampling point is completed, indicating that the liquid food moves on the conveyor belt over time and moves out of the detection range after passing the last sampling point. Step 5.4: Only one scattering parameter is sampled at each sampling point location. The amplitude of the scattering parameter is sampled at n sampling points. Data from 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 dataset of uncontaminated liquid food. Step 5.5: Place the contaminant inside the liquid food to simulate the contamination of the liquid food. Test the liquid food with different types of contaminants attached to different locations. The test steps are the same as those for the uncontaminated liquid food in Steps 5.2 to 5.4, thereby constructing a test dataset of contaminated liquid food.

7. The microwave sensing detection method for contaminants in liquid food based on machine learning according to claim 6, characterized in that, Step 6 involves preprocessing and analyzing the test datasets of uncontaminated and contaminated liquid foods, as detailed below: For uncontaminated and contaminated liquid food test datasets, the noise error of each test dataset and the mean error between the two test datasets are calculated. The noise error of each dataset is smaller than the mean error, meaning that the change in scattering parameters caused by contaminants is greater than the change in scattering parameters caused by noise and experimental errors. Then, machine learning is used for microwave sensing detection.

8. The microwave sensing detection method for contaminants in liquid food based on machine learning according to claim 7, characterized in that, Step 6 involves establishing a machine learning model to detect the presence and type of contaminants in liquid foods, as detailed below: Step 6.1: Construct a machine learning network for the scattering parameter matrix. Input the scattering parameter matrix of the uncontaminated liquid food obtained from the test, as well as the scattering parameter matrix of the liquid food with different types of contaminants attached to different locations, into the machine learning network for training and testing. Step 6.2: The machine learning network learns the characteristics of the influence of pollutants on scattering parameters, generates a liquid food pollutant discrimination model, trains and verifies the discrimination performance of the model based on measured data; Step 6.3: After verifying the discrimination performance, based on the liquid food contaminant discrimination model, obtain the discrimination results of whether liquid food contains contaminants and the type of contamination.

9. A microwave sensing and detection system for contaminants in liquid food based on machine learning, characterized in that, This system is used to implement the microwave sensing detection method for contaminants in liquid food based on machine learning as described in any one of claims 1 to 8. The system includes a model building module, a compensated phase design module, a simulation module, a detection device building module, a test dataset building module, and a detection module, wherein: The model building module establishes a theoretical model for microwave detection of contaminants in liquid food, 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 phase compensation design module defines a fixed area on the food conveyor belt as the detection area, sets sampling point positions within this detection area, calculates the phase difference between each antenna element in the array antenna and these sampling point positions, and thus designs the phase compensation for each antenna element. The simulation module builds an array antenna in the simulation software based on the compensation phase of each designed antenna element, and simulates the electric field focusing of the array antenna at different sampling points, thereby verifying the focusing effect of the array antenna. The detection device construction module is designed with an FPGA control board for the array antenna. The host computer is used to control the working status of each antenna unit of the array antenna through point control. Finally, the host computer, FPGA control board and antenna board are integrated to form the detection device, and the corresponding PCB board is developed to realize the communication between the 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 test datasets 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

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

    CN114689615A

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

    CN115545096A