﻿ 平衡线圈式高精度金属检测算法
 文章快速检索 高级检索
 山东大学学报(工学版)  2017, Vol. 47 Issue (4): 83-88  DOI: 10.6040/j.issn.1672-3961.0.2016.112 0

### 引用本文

BAI Shuzhong, DONG Chunyang. High precision algorithm of metal detector based on balance coil[J]. Journal of Shandong University (Engineering Science), 2017, 47(4): 83-88. DOI: 10.6040/j.issn.1672-3961.0.2016.112.

### 文章历史

1. 山东大学电气工程学院, 山东 济南 250061;
2. 中国联通济南市分公司, 山东 济南 250002

High precision algorithm of metal detector based on balance coil
BAI Shuzhong1, DONG Chunyang2
1. School of Electrical Engineering, Shandong University, Jinan 250061, Shandong, China;
2. Jinan Branch, China United Network Communication, Jinan 250002, Shandong, China
Abstract: Metal detector is widely used in food security and industrial manufacture. In order to solve the product effect problem which used only amplitude feature, the dual channel digital detecting algorithm was put forward based on amplitude and phase information, also the balance coil mathematical model was built, and the metal signal feature was deeply analyzed. Through the coordinate orientating, the amplitude and phase information of metal could be exactly extracted, product learning and clustering algorithm could efficiently separate the metal signal and product effect signal. The experiment results showed that the phase information could separate different material metal effectively, cooperated with the amplitude information, the dual channel digital detecting algorithm could extract the metal information accurately and detect the metal with strong product effect.
Key words: metal detection    balance coil    product effect    eddy current    detection algorithm
0 引言

1 平衡线圈金属检测算法 1.1 检测原理

 图 1 平衡线圈检测原理图 Figure 1 Schematic diagram of balance coil detector

 图 2 接收线圈的等效电路图 Figure 2 Equivalent circuit diagram of receiving coil

 ${{\mathit{\boldsymbol{\dot I}}}_1} = {{\mathit{\boldsymbol{\dot I}}}_2} = \frac{{\left( {{{\mathit{\boldsymbol{\dot U}}}_1} - {{\mathit{\boldsymbol{\dot U}}}_s}} \right) - {{\mathit{\boldsymbol{\dot U}}}_2}}}{{{R_1} + {R_2} + {Z_L}}} = \frac{{j\omega \left( {{M_1} - {M_2}} \right){{\mathit{\boldsymbol{\dot I}}}_i} - {{\mathit{\boldsymbol{\dot U}}}_s}}}{{{R_1} + {R_2} + {Z_L}}},$

 $\Delta \mathit{\boldsymbol{\dot U}} = {{\mathit{\boldsymbol{\dot U}}}_1} - {{\mathit{\boldsymbol{\dot U}}}_2} - \left( {{R_1} + {R_2}} \right){{\mathit{\boldsymbol{\dot I}}}_1} - {{\mathit{\boldsymbol{\dot U}}}_s} \approx j\omega \left( {{M_1} - {M_2}} \right){{\mathit{\boldsymbol{\dot I}}}_{\rm{i}}} - \mathit{\boldsymbol{\dot U,}}$ (1)

1.2 检测信号数学模型

 $\Delta \mathit{\boldsymbol{\dot U}} \approx \left( {j\omega {M_1}{{\mathit{\boldsymbol{\dot I}}}_{\rm{i}}} - {{\mathit{\boldsymbol{\dot U}}}_s}} \right) - j\omega {M_2}{{\mathit{\boldsymbol{\dot I}}}_{\rm{i}}},$ (2)

 $\begin{array}{l} \Delta u\left( t \right) = [{U_1}_{{\rm{max}}} + {u_{\rm{s}}}(t)]{\rm{sin}}\left( {\omega t + \theta \left( t \right)} \right) - {U_{2{\rm{max}}}}{\rm{sin}}\left( {\omega t} \right) = \\ \sqrt {{{({U_{1{\rm{max}}}} + {u_{\rm{s}}}\left( t \right))}^2} + U_{{\rm{2max}}}^2 - 2({U_{{\rm{1max}}}} + {u_{\rm{s}}}\left( t \right)){U_{{\rm{2max}}}}{\rm{cos}}\theta \left( t \right)} {\rm{ sin}}\left( {\omega t + \varphi \left( t \right)} \right),\\ {\rm{tan}}\varphi \left( t \right) = \frac{{({U_{{\rm{1max}}}} + {u_{\rm{s}}}(t)){\rm{sin}}\theta \left( t \right)}}{{({U_{{\rm{1max}}}} + {u_{\rm{s}}}(t)){\rm{cos}}\theta \left( t \right) - {U_{{\rm{2max}}}}}}, \end{array}$ (3)

 $\begin{array}{l} \Delta u\left( t \right) \approx {u_{\rm{s}}}(t){\rm{sin}}\left( {\omega t + \varphi \left( t \right)} \right),\\ {\rm{tan}}\varphi \left( t \right) \approx {U_{1{\rm{max}}}}\frac{{{\rm{sin}}\theta \left( t \right)}}{{{u_{\rm{s}}}\left( t \right)}} \approx {U_{1{\rm{max}}}}\frac{{\theta \left( t \right)}}{{{u_{\rm{s}}}\left( t \right)}} \end{array},$ (4)

 图 3 有金属时检测信号向量图 Figure 3 The vector diagram of detection signal with metal

us(t)与金属通过的速度有关, 相对发射信号而言为一缓慢变化信号, 假设金属以速度v通过线圈, 通过时间T=2d/v, 因此由金属产生的信号变化频率主要集中在Ω=2π/T的频率附近, 为简单起见假设频率等于Ω, 检测信号的数学模型式(4) 可改写为:

 $\Delta u\left( t \right) \approx {u_{\rm{s}}}(t){\rm{sin}}\left( {\omega t + \varphi } \right) = \left[ {{A_{{\rm{max}}}}{\rm{sin}}\left( {\mathit{\Omega }t + \beta } \right)} \right]{\rm{sin}}\left( {\omega t + \varphi } \right),$ (5)

1.3 金属感应信号的提取

 $\begin{array}{l} \Delta {u_{\rm{s}}}_{_x}\left( t \right) = {u_{\rm{s}}}\left( t \right){\rm{sin}}\left( {\omega t + \varphi } \right){\rm{sin}}\left( {\omega t} \right) = \frac{1}{2}{u_{\rm{s}}}\left( t \right)[{\rm{cos}}\varphi - {\rm{cos}}\left( {2\omega t + \varphi } \right)],\\ \Delta {u_{\rm{s}}}_{_y}\left( t \right) = {u_{\rm{s}}}\left( t \right){\rm{sin}}\left( {\omega t + \varphi } \right){\rm{cos}}\left( {\omega t} \right) = \frac{1}{2}{u_{\rm{s}}}\left( t \right)[{\rm{sin}}\varphi + {\rm{sin}}\left( {2\omega t + \varphi } \right)], \end{array}$

 $\begin{array}{l} {u_{\rm{s}}}_{_x}\left( t \right) = \frac{1}{2}{u_{\rm{s}}}\left( t \right){\rm{cos}}\varphi ,{u_{\rm{s}}}_{_y}\left( t \right) = \frac{1}{2}{u_{\rm{s}}}\left( t \right){\rm{sin}}\varphi ,\\ {\rm{tan}}\varphi = {u_{\rm{s}}}_{_y}\left( t \right)/{u_{\rm{s}}}_{_x}\left( t \right)。\end{array}$ (6)
2 全数字系统设计与实现

 图 4 全数字金属检测机框图 Figure 4 The block diagram of digital metal detector
2.1 传感器

2.2 模拟信号处理部分

2.3 数字信号处理部分

(1) 同步信号产生。由式(6) 看出, 采用正弦同步检波得到的输出信号只有金属信号us(t)的二分之一, 为提高信噪比采用方波同步检波, 对信号的正负包络进行检波, 由CPU定时器产生相位依次为0°、90°、180°、270°的方波信号, 检波输出的信号幅度为us(t), 较正弦检波信噪比提高了一倍。

(2) 坐标定位。若两接收线圈严格对称, 理论上无金属通过时Δu(t)=0, 实际上在安装线圈、传感器外壳时很难保证完全对称, 一般通过调节使其保持在较小的数值, 如1~2mV, 以该信号向量为参考向量形成检波同步信号, 实现坐标系的定位。

(3) 自适应数字滤波器:金属信号频率Ω与金属通过传感器的速度(传送带速度)有关, 为减小噪声干扰提高信号的聚类效果, 采用自适应数字带通滤波器实现信号滤波, 滤波器中心频率Ω通过检测传送带的速度得到, 滤波器类型为2阶Butterworth IIR数字滤波器, 其传递函数

 $H\left( s \right) = \frac{1}{{{p^2} + \sqrt 2 p + 1}}\left| {_{_{p = }\frac{{{s^2} + {\mathit{\Omega }_{\rm{l}}}{\mathit{\Omega }_{\rm{h}}}}}{{s({\mathit{\Omega }_{\rm{h}}}{\mathit{\Omega }_{\rm{l}}})}}}} \right.,$

 $H\left( z \right) = H\left( s \right)\left| {_{_{s = }\frac{{z - 1}}{{z + 1}}}} \right.,$

(4) 产品学习与聚类。产品学习和聚类的目的是实现金属信号和产品效应信号的分离, 通过相位信息φ实现。对于无产品效应的产品, 如干燥类的产品可不用学习, 但对产品效应较强的产品如海产品等, 若仅采用幅度检测, 将大幅度降低检测精度, 甚至无法进行有效地检测。本系统通过聚类算法得到产品聚类的幅度和相位信息, 产品效应信息将集中在ABCD矩形框内, 实现金属与产品效应的有效分离, 如图 5所示。

 图 5 产品效应聚类图 Figure 5 The cluster figure of product effect

(5) 判决输出。采用区域判决法, 对于干燥无产品效应的产品, 学习系统噪声(包括传送带效应和设备震动等), 得到系统噪声长方形区域, 若信号超出该区域则判决为有金属。对于有产品效应的产品, 通过学习产品效应得到相应的产品长方形区域, 和系统噪声长方形区域一起形成无金属区域, 只要信号在该区域内均认为无金属, 否则判决为有金属。

3 试验结果

 图 6 直径Φ1.0 mm铁信号 Figure 6 The figure of Φ1.0mm Fe
 图 7 铝箔包装袋信号 Figure 7 The figure of aluminum foil
 图 8 铝箔袋+直径Φ2.0mm铁信号 Figure 8 The figure of aluminum foil with Φ2.0mm Fe

4 结语

 [1] 鲁光宇. 金属探测技术发展综述[J]. 地学仪器, 1992, 92(1): 1-10 LU Guangyu. Overview and development of metal detection[J]. Earth Science Instrument, 1992, 92(1): 1-10 [2] 刘慧娟, 李志刚. 一种基于电压和频率的金属探测方法[J]. 仪器仪表学报, 2006, 27(7): 769-772 LIU Huijuan, LI Zhigang. Metal detection method based on voltage and frequency[J]. Chinese Journal of Scientific Instrument, 2006, 27(7): 769-772 [3] 王玉琦, 韩海燕, 郝智慧. 金属检测器在食品工业中的应用[J]. 长春大学学报, 2007, 17(2): 71-73 WANG Yuqi, HAN Haiyan, HAO Zhihui. Application of metal detectors in food industry[J]. Journal of Changchun University, 2007, 17(2): 71-73 [4] 周茂林, 项安. 全数字食品金属检测机信号处理系统仿真[J]. 计算机仿真, 2013, 30(9): 208-212 ZHOU Maolin, XIANG An. Simulation of all-digital metal detector[J]. Computer Simulation, 2013, 30(9): 208-212 [5] YARNAZAKI Sadaol, NAKANE Hiroshi, TANAKA Akio. Basic analysis of a metal detector[J]. IEEE Transactions on Instrumentation and Measurement, 2002, 51(4): 810-814 DOI:10.1109/TIM.2002.803397 [6] LIU Baobin, WEI Zhou. The research of metal detectors using in food industry[C]//2011 International Conference on Electronics and Optoelectronics. Piscataway, USA: IEEE Computer Society, 2011:43-45. https://es.scribd.com/doc/196266633/2014-International-CES-Official-Show-Directory [7] JAKUB Svatos, JOSEF Vedral. The usage of frequency swept signals for metal detection[J]. IEEE Transactions on Magnetics, 2012, 48(4): 1501-1504 DOI:10.1109/TMAG.2011.2173174 [8] 庞瑞帆, 钟翔, 胡泷, 等. 双频金属探测器的研究[J]. 解放军理工大学学报(自然科学版), 2011, 2(2): 1-8 PANG Ruifan, ZHONG Xiang, HU Long, et al. Research on dual frequency metal detector[J]. Journal of PLA University of Science and Technology, 2011, 2(2): 1-8 [9] 彭建学, 叶银忠, 侍尉, 等. 基于跨导测量的金属探测方法[J]. 电测与仪表, 2013, 50(586): 82-85 PENG Jianxue, YE Yinzhong, SHI Wei, et al. A new method for detecting metal based on trans-conductance measurement[J]. Electrical Measurement & Instrumentation, 2013, 50(586): 82-85 [10] 曹青松, 周继惠. 基于电涡流的金属种类识别技术的理论与实验研究[J]. 仪器仪表学报, 2007, 28(9): 1718-1722 CAO Qingsong, ZHOU Jihui. Theoretical and experimental study on metal type identification based on eddy current[J]. Chinese Journal of Scientific Instrument, 2007, 28(9): 1718-1722 [11] 贺桂芳. 一种新型智能金属探测仪的设计[J]. 仪表技术与传感器, 2006, 1(1): 13-14 HE Guifang. Design of new intelligent metal detector[J]. Instrument Technique and Sensor, 2006, 1(1): 13-14 [12] 张起祥, 祖大鹏. 无接触式电阻率的测量[J]. 电测与仪表, 2002, 39(5): 21-23 ZHANG Qixiang, ZU Dapeng. Measuring resistivity without touching the subject[J]. Electrical Measurement & Instrumentation, 2002, 39(5): 21-23 [13] 胡业发, 武志鹏, 王春麟. 探头线圈厚度对电涡流位移传感器性能影响的研究[J]. 电测与仪表, 2006, 43(4): 19-26 HU Yefa, WU Zhipeng, WANG Chunlin. The research on the effect for the performance of the current eddy shifting sensor by the thickness of the probe coil[J]. Electrical Measurement & Instrumentation, 2006, 43(4): 19-26 [14] 张学勇, 赵群, 李义宝, 等. 一种金属探测器的设计[J]. 安徽建筑工业学院学报(自然科学版), 2007, 15(3): 74-77 ZHANG Xueyong, ZHAO Qun, LI Yibao, et al. Design of a metal detector[J]. Journal of Anhui Institute of Architecture & Industry(Natural Science), 2007, 15(3): 74-77 [15] SILVESTER Peter P, OMERAGIC Dzevat. Sensitivity maps for metal detector design[J]. IEEE Transactions on Geoscience and Remote Sensing, 1996, 34(3): 788-792 DOI:10.1109/36.499783 [16] 苏庆丰, 李智, 牛军浩. 金属探测器的平衡式线圈最佳空间位置研究[J]. 国外电子测量技术, 2010, 29(3): 20-22 SU Qingfeng, LI Zhi, NIU Junhao. Research of the best spatial location for balanced coil on metal detector[J]. Foreign Electronic Measurement Technology, 2010, 29(3): 20-22 [17] 明军, 贾海波, 王新. 一种在线智能金属检测装置[J]. 仪表技术与传感器, 2013, 5(5): 20-22 MING Jun, JIA Haibo, WANG Xin. Online intelligent metal detector[J]. Instrument Technique and Sensor, 2013, 5(5): 20-22 [18] RESTIVO Maria Teresa. Case study of induced eddy currents[J]. Sensors and Actuators, A: Physical, 1996, 51(2): 203-210 [19] 郑亮, 郑士海. 嵌入式系统开发与实践:基于STM32F10x系列[M]. 北京: 北京航空航天大学出版社, 2015. [20] 胡广书. 数字信号处理:理论、算法与实现[M]. 2版. 北京: 清华大学出版社, 2003.