CN112924652B - FPGA (field programmable Gate array) acceleration-based portable low-power-consumption multi-feature illegal cooking oil detector - Google Patents

FPGA (field programmable Gate array) acceleration-based portable low-power-consumption multi-feature illegal cooking oil detector Download PDF

Info

Publication number
CN112924652B
CN112924652B CN202110140478.4A CN202110140478A CN112924652B CN 112924652 B CN112924652 B CN 112924652B CN 202110140478 A CN202110140478 A CN 202110140478A CN 112924652 B CN112924652 B CN 112924652B
Authority
CN
China
Prior art keywords
fpga
oil
illegal cooking
temperature resistant
resistant container
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110140478.4A
Other languages
Chinese (zh)
Other versions
CN112924652A (en
Inventor
陈睿祺
林彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Renmian Integrated Circuit Technology Co ltd
Original Assignee
Nanjing Renmian Integrated Circuit Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Renmian Integrated Circuit Technology Co ltd filed Critical Nanjing Renmian Integrated Circuit Technology Co ltd
Priority to CN202110140478.4A priority Critical patent/CN112924652B/en
Publication of CN112924652A publication Critical patent/CN112924652A/en
Application granted granted Critical
Publication of CN112924652B publication Critical patent/CN112924652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/26Oils; Viscous liquids; Paints; Inks
    • G01N33/28Oils, i.e. hydrocarbon liquids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/94Hardware or software architectures specially adapted for image or video understanding
    • G06V10/955Hardware or software architectures specially adapted for image or video understanding using specific electronic processors

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Multimedia (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • General Chemical & Material Sciences (AREA)
  • Oil, Petroleum & Natural Gas (AREA)
  • Software Systems (AREA)
  • Food Science & Technology (AREA)
  • Medicinal Chemistry (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)
  • Edible Oils And Fats (AREA)

Abstract

The invention discloses a low-power-consumption portable multi-feature illegal cooking oil detector based on FPGA acceleration, which comprises an oil sample acquisition device and a data processing module, wherein the data processing module adopts an FPGA as an operation main body, the FPGA comprises a ROM module, an RAM module and a calculation module, and the FPGA carries out operation analysis on acquired data through a kNN algorithm; the oil sample collection device comprises a high-temperature resistant container, a reaction reagent reaction tube is arranged inside the high-temperature resistant container, a temperature measurement sensor and a heating tube are arranged in the high-temperature resistant container, and a conductivity/peroxide value sensor is arranged in the reaction reagent reaction tube. The invention accelerates the operation of the kNN algorithm by using the FPGA with the approximate multiplier, and judges whether the oil sample is the illegal cooking oil or not by performing operation analysis on the four-dimensional data acquired by the oil sample to be detected by using the kNN algorithm, thereby obviously improving the detection precision and having the advantages of high speed and low power consumption.

Description

FPGA (field programmable Gate array) acceleration-based portable low-power-consumption multi-feature illegal cooking oil detector
Technical Field
The invention relates to the technical field of illegal cooking oil detection, in particular to a low-power-consumption portable multi-feature illegal cooking oil detector based on FPGA acceleration.
Background
Food cooked by eating the illegal cooking oil brings great harm to the health, and food safety supervision departments can sample and detect cooking oil of catering merchants to realize safety oil supervision. Conventional laboratory detection methods are very accurate but consume a significant amount of time. Most of the existing field detection methods are used for measuring a threshold value aiming at a certain single property of the illegal cooking oil, and the method can cause error and result error due to other impurities in the oil sample to be detected.
Disclosure of Invention
The invention aims to provide a low-power-consumption portable multi-feature illegal cooking oil detector based on FPGA acceleration so as to solve the problems in the prior art.
In order to achieve the purpose, the invention provides the following technical scheme: a low-power-consumption portable multi-feature illegal cooking oil detector based on FPGA acceleration comprises an oil sample acquisition device and a data processing module, wherein the data processing module adopts FPGA as an operation main body, the FPGA comprises a ROM module, an RAM module and a calculation module, and the FPGA carries out operation analysis on acquired data through a kNN algorithm; the oil sample collection device comprises a high-temperature resistant container, a reaction reagent reaction tube is arranged inside the high-temperature resistant container, a temperature measurement sensor and a heating tube are arranged in the high-temperature resistant container, and a conductivity/peroxide value sensor is arranged in the reaction reagent reaction tube.
As a further improvement of the technical scheme of the invention, the target value of the oil sample data to be measured acquired by the oil sample acquisition device is as follows: a conductivity value at 60 ℃, a difference between conductivities at 60 ℃ and 25 ℃, a peroxide value at 25 ℃, and a peroxide value difference between 60 ℃ and 25 ℃.
As a further improvement of the technical scheme of the present invention, the target value of the oil sample to be measured is calculated by using the kNN algorithm of the approximate multiplier in the FPGA and all the training samples in the ROM as euclidean distances, specifically:
Figure BDA0002928371050000021
in the formula, xiI-th characteristic data, y, representing the sample to be testedn,iThe ith characteristic data represents the nth training sample; FPGA minimum k dnD is equal to knAnd (4) counting the corresponding categories, and outputting the category with the highest occupation ratio as a detection result, so that whether the oil product to be detected is the illegal cooking oil can be judged.
As a further improvement of the technical scheme of the invention, the oil sample collecting device also comprises a stepping motor, and the stepping motor shakes the oil to be detected through a rotating disk and a transmission rod.
Compared with the prior art, the invention has the following beneficial effects:
1. the method judges whether the oil product belongs to the illegal cooking oil or not by detecting the characteristic data of four dimensions, namely the 60 ℃ conductivity value, the 60 ℃ and 25 ℃ conductivity difference value, the 25 ℃ peroxide value and the 60 ℃ and 25 ℃ peroxide value difference value of the oil sample to be detected.
2. The invention accelerates the operation of the kNN algorithm by using the FPGA with the approximate multiplier, and performs operation analysis on the acquired data through the kNN algorithm, thereby outputting a result and judging whether the sample to be detected belongs to the illegal cooking oil, and the invention has the advantages of high speed and low power consumption.
Drawings
Fig. 1 is a schematic view of the overall structure of the present invention.
FIG. 2 is a flow chart of the present invention for detecting an oil sample to be detected.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With reference to fig. 1-2, a low-power-consumption portable multi-feature illegal cooking oil detector based on FPGA acceleration comprises an oil sample collection device and a data processing module, wherein the data processing module adopts an FPGA as an operation main body, the FPGA comprises a ROM module, a RAM module and a calculation module, and the FPGA performs operation analysis on collected data through a kNN algorithm; in addition oil appearance collection system includes high temperature resistant container, and the inside reaction reagent reaction tube that is provided with of high temperature resistant container, be provided with temperature sensor and heating pipe in the high temperature resistant container, be provided with conductivity peroxide value sensor in the reaction reagent reaction tube, further still include step motor, and step motor rocks the oil that awaits measuring through rotary disk and transfer line. It should be particularly noted that the target value of the oil sample data to be measured acquired by the oil sample acquisition device of the present invention is: conductivity value at 60 ℃, difference between conductivity values at 60 ℃ and 25 ℃, peroxide value at 25 ℃, and peroxide value difference between 60 ℃ and 25 ℃; and then, calculating Euclidean distances of target values acquired by the oil sample to be detected and all training samples in the ROM through a kNN algorithm using an approximate multiplier in the FPGA, wherein the Euclidean distances are specifically as follows:
Figure BDA0002928371050000031
in the formula, xiI-th characteristic data, y, representing the sample to be testedn,iThe ith characteristic data represents the nth training sample; FPGA minimum k dnD is equal to knAnd (4) counting the corresponding categories, and outputting the category with the highest occupation ratio as a detection result, so that whether the oil product to be detected is the illegal cooking oil can be judged.
In order to further illustrate the above embodiments, so that those skilled in the art can clearly understand the contents of the present invention, the following experimental description is provided.
6 different kinds of oil are selected, each kind of oil has different brands, and 15 kinds of original oil samples are used in total. In addition, edible oil and illegal cooking oil are mixed in order to meet the traditional detection index of part of illegal merchants; on the other hand, the oil sample to be measured may have participated in cooking, and various seasonings required for cooking appear inside. Therefore, for the practical situation, the number of the oil samples to be measured is increased on the basis of 15 original oil samples by the following method:
firstly, mixing 15 original oil samples pairwise according to the proportion of 8:2 to obtain 210 new oil samples and adding labels. All combinations (54 types) of the illegal cooking oil are specially explained, the labels are illegal cooking oil no matter the proportion of the illegal cooking oil, and other oil sample labels are used as labels according to 80 percent of oil samples;
respectively adding common Chinese meal seasonings such as salt, monosodium glutamate and chicken essence into the 15 original oil samples according to the same amount to obtain 225 new oil samples, and marking all the labels according to the labels of the oil samples before the seasonings are added;
and thirdly, adding common seasonings of Chinese food such as salt, chicken essence, monosodium glutamate and the like into the 210 oil samples according to the same amount to obtain 3150 new oil samples, wherein the label adding mode of the new oil samples is the same as that of 1.
Finally, 3600 oil samples are used as the data of the test under 6 different oil sample categories, and the quantity of all types of oil samples is shown in the table 1:
TABLE 1 number of individual oil samples in data set
Figure BDA0002928371050000041
The FPGA of the Intel Cyclone 10LP 10CL006ZU256I8G is selected, and the oil sample acquisition device and the data processing module are constructed according to the description in the embodiment, wherein the multiplier is an approximate multiplier realized by the user, and an IP core or a DSP module is not directly called. The resource occupation situation of realizing the kNN algorithm for illegal cooking oil detection by using an approximate multiplier in the FPGA is shown in a table 2:
TABLE 2 resource occupancy in FPGA
Resource&Performance Consumption
LUTs 1,049
Registers 374
Memory(Kb) 19.20
DSP(Embedded Multiplier) 0
Max Freq(MHz) 200
Latency(μs) 4.775
Power(mW) 65.62
Simultaneously, a plurality of common embedded development platforms are selected: the results obtained by comparing the platform with the FPGA data processing module are as follows:
Figure BDA0002928371050000051
through the analysis of the time consumption, the power consumption and other indexes during the processing of the plurality of platform data, the operation of the kNN algorithm is accelerated by adopting the FPGA, and the oil sample data is analyzed and judged whether to be the illegal cooking oil or not through the kNN algorithm, so that the method has the advantages of high speed and low power consumption.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments or portions thereof without departing from the spirit and scope of the invention.

Claims (2)

1. The utility model provides a portable multi-feature trench oil detector of low-power consumption based on FPGA accelerates, includes oil appearance collection system and data processing module, its characterized in that: the data processing module adopts an FPGA as an operation main body, the FPGA comprises a ROM module, an RAM module and a calculation module, and the interior of the FPGA carries out operation analysis on the acquired data through a kNN algorithm; the oil appearance collection system includes high temperature resistant container, and the inside reaction reagent reaction tube that is provided with of high temperature resistant container, be provided with temperature sensor and heating pipe in the high temperature resistant container, be provided with conductivity/peroxide value sensor in the reaction reagent reaction tube, the target value that oil appearance collection system gathered the oil appearance data that awaits measuring is: conductivity value at 60 ℃, difference between conductivity values at 60 ℃ and 25 ℃, peroxide value at 25 ℃, and peroxide value difference between 60 ℃ and 25 ℃; the method comprises the following steps that the target value acquired by the oil sample to be detected is subjected to Euclidean distance calculation by using a kNN algorithm of an approximate multiplier in an FPGA and all training samples in a ROM, and specifically comprises the following steps:
Figure FDA0003499431390000011
in the formula, xiI-th characteristic data, y, representing the sample to be testedn,iThe ith characteristic data represents the nth training sample; FPGA minimum k dnD is equal to knAnd (4) counting the corresponding categories, and outputting the category with the highest occupation ratio as a detection result, so that whether the oil product to be detected is the illegal cooking oil can be judged.
2. The FPGA acceleration-based low-power-consumption portable multi-feature illegal cooking oil detector as claimed in claim 1, characterized in that: the oil sample collection device further comprises a stepping motor, and the stepping motor shakes the oil to be detected through the rotating disk and the transmission rod.
CN202110140478.4A 2021-02-02 2021-02-02 FPGA (field programmable Gate array) acceleration-based portable low-power-consumption multi-feature illegal cooking oil detector Active CN112924652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110140478.4A CN112924652B (en) 2021-02-02 2021-02-02 FPGA (field programmable Gate array) acceleration-based portable low-power-consumption multi-feature illegal cooking oil detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110140478.4A CN112924652B (en) 2021-02-02 2021-02-02 FPGA (field programmable Gate array) acceleration-based portable low-power-consumption multi-feature illegal cooking oil detector

Publications (2)

Publication Number Publication Date
CN112924652A CN112924652A (en) 2021-06-08
CN112924652B true CN112924652B (en) 2022-04-15

Family

ID=76169431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110140478.4A Active CN112924652B (en) 2021-02-02 2021-02-02 FPGA (field programmable Gate array) acceleration-based portable low-power-consumption multi-feature illegal cooking oil detector

Country Status (1)

Country Link
CN (1) CN112924652B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204405639U (en) * 2014-12-22 2015-06-17 华东交通大学 A kind of doping of the edible oil based on FPGA swill-cooked dirty oil detecting system
CN109871887A (en) * 2019-01-29 2019-06-11 淮阴工学院 A kind of novel trench oil detection method and detection device based on SVM
CN109884282A (en) * 2019-01-29 2019-06-14 淮阴工学院 Novel trench oil detection method and its detection system based on GRNN neural network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204405639U (en) * 2014-12-22 2015-06-17 华东交通大学 A kind of doping of the edible oil based on FPGA swill-cooked dirty oil detecting system
CN109871887A (en) * 2019-01-29 2019-06-11 淮阴工学院 A kind of novel trench oil detection method and detection device based on SVM
CN109884282A (en) * 2019-01-29 2019-06-14 淮阴工学院 Novel trench oil detection method and its detection system based on GRNN neural network

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
KNN算法在动物油鉴别区分中的应用研究;赵杨沄等;《计算机与应用化学》;20140728;第31卷(第7期);第859-864页 *
Stochastic modeling of the transient regime of an electronic nose for waste cooking oil classification;A.F.Siqueira等;《Journal of Food Engineering》;20171011;第221卷;第114-123页 *
地沟油多指标快速筛选模式的研究;高卫东等;《中国食品工业》;20151130;第11卷;摘要 *
基于多标记学习的食用植物油分类识别与掺伪检测研究;周海琴;《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅰ辑》;20180315(第3期);第16页 *

Also Published As

Publication number Publication date
CN112924652A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN103518130B (en) Organism gas-detecting device and organism gas detection method
CN101936895B (en) Near infrared spectroscopy analysis rapid detection method of rice freshness
CN103235095B (en) Water-injected meat detection method and device
CN101452075B (en) At-sea small target detecting method based on average period
CN101493431A (en) Method for detecting fresh degree of chicken meat by electronic nose
CN104132896A (en) Method for rapidly identifying adulterated meat
CN202057355U (en) Temperature/humidity sensor apparatus
CN203745367U (en) Intelligent pork freshness detector
CN103792198A (en) Intermediate infrared-near infrared correlation spectrum discriminating method for melamine-doped milk
Li et al. Quantitative analysis of fish meal freshness using an electronic nose combined with chemometric methods
CN1804582A (en) Method for identifying reductive milk in fresh milk and commodity milk by using near infrared spectrum
CN105547915A (en) Shell food freshness determination system based on density model and method of system
CN102393376A (en) Support vector regression-based near infrared spectroscopy for detecting content of multiple components of fish ball
CN112098357B (en) Strawberry sensory quality grade evaluation method based on near infrared spectrum
CN112924652B (en) FPGA (field programmable Gate array) acceleration-based portable low-power-consumption multi-feature illegal cooking oil detector
CN110596080A (en) Mineral element-based golden pomfret origin identification method
CN103487398B (en) A kind of analytical method of lysine fermentation liquor
Zhang et al. Rapid recognition of marine fish surimi by one-step discriminant analysis based on near-infrared diffuse reflectance spectroscopy
CN109030755A (en) The detection device and method of grain moisture content, mass of 1000 kernel and bulk density based on image processing techniques
CN104849350A (en) Method for identifying and classifying wood defects based on multiple features
CN103529026A (en) Detection method and kit of illegal cooking oil as well as production method of detection color comparison card
CN107300535A (en) The method of near-infrared quick detection organic fertilizer active constituent content
CN103927438B (en) Near-infrared wavelength Variable Selection based on successive projection algorithm
CN106770861A (en) The evaluation method of oil-filled transformer on-line monitoring availability of data
CN105136881A (en) Method for quickly detecting sausages adulterated with rotten pork

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant