LabVIEW-based online egg crack detection system and detection method thereof

文档序号:680390 发布日期:2021-04-30 浏览:2次 中文

阅读说明:本技术 一种基于LabVIEW的禽蛋裂纹在线检测系统及其检测方法 (LabVIEW-based online egg crack detection system and detection method thereof ) 是由 刘宪林 孙力 蔡健荣 许骞 于 2020-12-15 设计创作,主要内容包括:本发明提供了基于LabVIEW的禽蛋裂纹在线检测系统,包括控制系统、声音接收器、敲击装置、编码器、输送装置和接近开关;所述输送装置用于输送禽蛋;所述敲击装置包括若干敲击棒;所述控制系统利用脉冲信号通过编码器控制每一所述敲击棒;若干敲击棒安装在所述输送装置的输送路径附近;每一所述敲击棒附近设有接近开关,用于判断禽蛋是否达到打击位置;所述控制系统通过声音接收器采集禽蛋敲击后产生的声音信号,所述控制系统通过时域和频域分析来判断禽蛋是否有裂纹。本发明可以同时使用多个声卡对多个咪头进行音频采集,既满足禽蛋裂纹在线检测音频采集的应用需求又节约成本。(The invention provides an egg crack online detection system based on LabVIEW, which comprises a control system, a sound receiver, a knocking device, an encoder, a conveying device and a proximity switch, wherein the sound receiver is connected with the control system; the conveying device is used for conveying the poultry eggs; the knocking device comprises a plurality of knocking rods; the control system controls each knocking rod through an encoder by using a pulse signal; a plurality of knocking rods are arranged near the conveying path of the conveying device; a proximity switch is arranged near each knocking rod and used for judging whether the poultry eggs reach the knocking position or not; the control system collects sound signals generated after the eggs are knocked through the sound receiver, and judges whether the eggs have cracks or not through time domain and frequency domain analysis. The invention can simultaneously use a plurality of sound cards to carry out audio acquisition on a plurality of microphones, thereby not only meeting the application requirement of online detection of the crack of the poultry egg for audio acquisition, but also saving the cost.)

1. An egg crack online detection system based on LabVIEW is characterized by comprising a control system, a sound receiver, a knocking device (5), an encoder (6), a conveying device and a proximity switch (7); the conveying device is used for conveying the poultry eggs; the knocking device (5) comprises a plurality of knocking rods; the control system controls each knocking stick through an encoder (6) by using a pulse signal; a plurality of knocking rods are arranged near the conveying path of the conveying device; a proximity switch (7) is arranged near each knocking rod and used for judging whether the poultry eggs reach the knocking position or not; the control system collects sound signals generated after the eggs are knocked through the sound receiver, and judges whether the eggs have cracks or not through time domain and frequency domain analysis.

2. The LabVIEW-based egg crack online detection system as claimed in claim 1, wherein the control system performs FFT transformation on the collected egg beating sound signals, calculates the mode of the frequency point corresponding to each frequency domain amplitude most significant value according to the obtained frequency domain signals, determines the ratio of all amplitudes at the mode frequency point to all amplitude most significant values, and distinguishes whether the egg has cracks or not by comparing the ratios.

3. An egg crack on-line detection system based on LabVIEW as claimed in claim 2, wherein the control system determines the presence or absence of an egg by using a threshold value according to the amplitude of the collected egg beating sound signal.

4. A LabVIEW-based egg crack online detection system according to claim 1, wherein the sound receiver comprises a sound card (3) and a microphone (4), the control system is connected with the sound card (3), the sound card (3) is connected with the microphone (4), and one microphone (4) is arranged among at least 2 knocking bars and used for collecting sound signals generated after the eggs are knocked.

5. A LabVIEW-based egg crack online detection system as claimed in claim 4, wherein 16 knocking rods are arranged on the conveying device, and 1 microphone (4) is arranged between 2 knocking rods.

6. The detection method of the LabVIEW-based egg crack online detection system according to claim 1, characterized by comprising the following steps:

the control system performs speed matching on the knocking device (5) by utilizing the encoder (6) and the proximity switch (7) so as to ensure that a knocking rod on the knocking device can knock to the central axis position of the poultry egg;

the sound receiver receives a sound signal of knocking eggs by the knocking device (5), and whether eggs exist or not is judged according to the amplitude of the time domain of the sound signal and a set threshold value;

the control system carries out FFT (fast Fourier transform) on the collected poultry egg beating sound signals, calculates the mode of frequency points corresponding to the most value of each frequency domain amplitude according to the obtained frequency domain signals, determines the ratio of all amplitude values and all the most value sums of the amplitude values at the mode frequency points, and distinguishes whether the poultry egg has cracks or not by comparing the ratios.

7. The detection method of the LabVIEW-based egg crack online detection system as claimed in claim 6, wherein when the egg is an egg, the threshold value is 0.16; when the poultry egg is a duck egg, the threshold value is 0.18.

Technical Field

The invention relates to the technical field of egg crack detection, in particular to an egg crack online detection system based on LabVIEW and a detection method thereof.

Background

The damage of eggs is easily polluted by microorganisms, so that the deterioration of the internal quality is aggravated, the domestic detection of cracked eggs is mainly manual, the detection of tiny cracks is easily influenced subjectively, so that the missed detection is generated, if the missed-detected cracked eggs are processed into marinated eggs, preserved eggs and the like, the economic loss is caused, the human health is not influenced a little, and the automatic detection of the cracks of the eggs is inevitable for the commercialized treatment of the eggs.

At present, the detection of cracks on the surfaces of eggs by scholars is studied, and Chinese patent discloses an eggshell crack detection method for multi-station acoustic response signal analysis. Chinese patent discloses a system and a method for dynamically detecting cracks of eggs, which adopt a method of combining FPGA and DSP to collect multi-channel sound signals. The method has the advantages of complex programming of the audio acquisition system, long research and development period and high later development and maintenance cost.

Disclosure of Invention

Aiming at the defects in the prior art, the invention provides an egg crack online detection system based on LabVIEW and a detection method thereof, which are developed based on LabVIEW graphical programming language, have friendly and simple interfaces and are easy to debug and maintain, a sound card is adopted as audio acquisition equipment, and a computer can simultaneously use a plurality of sound cards to carry out audio acquisition on a plurality of microphones, thereby not only meeting the application requirements of online detection of egg cracks and audio acquisition, but also saving the cost.

The present invention achieves the above-described object by the following technical means.

An egg crack online detection system based on LabVIEW comprises a control system, a sound receiver, a knocking device, an encoder, a conveying device and a proximity switch; the conveying device is used for conveying the poultry eggs; the knocking device comprises a plurality of knocking rods; the control system controls each knocking rod through an encoder by using a pulse signal; a plurality of knocking rods are arranged near the conveying path of the conveying device; a proximity switch is arranged near each knocking rod and used for judging whether the poultry eggs reach the knocking position or not; the control system collects sound signals generated after the eggs are knocked through the sound receiver, and judges whether the eggs have cracks or not through time domain and frequency domain analysis.

Further, the control system carries out FFT (fast Fourier transform) on the collected poultry egg knocking sound signals, calculates the mode of frequency points corresponding to the most significant values of the amplitudes of all frequency domains according to the obtained frequency domain signals, determines the ratio of all the amplitudes of the mode frequency points to the most significant sum of all the amplitudes, and distinguishes whether the poultry egg has cracks or not by comparing the ratio.

Further, the control system judges whether eggs exist or not by utilizing a threshold value according to the collected egg knocking sound signals.

Furthermore, the sound receiver comprises a sound card and a microphone, the control system is connected with the sound card, the sound card is connected with the microphone, and a microphone is arranged between at least 2 knocking rods and used for collecting sound signals generated after the poultry eggs are knocked.

Furthermore, 16 knocking rods are arranged on the conveying device, and 1 microphone is arranged between 2 knocking rods.

A detection method of an on-line detection system for poultry egg cracks comprises the following steps:

the control system performs speed matching on the knocking device by utilizing the encoder and the proximity switch so as to ensure that a knocking rod on the knocking device can knock the central axis of the poultry egg;

the sound receiver receives a sound signal of knocking eggs by the knocking device, and judges whether the eggs exist or not by using a threshold value;

the control system carries out FFT (fast Fourier transform) on the collected poultry egg beating sound signals, calculates the mode of frequency points corresponding to the most value of each frequency domain amplitude according to the obtained frequency domain signals, determines the ratio of all amplitude values and all the most value sums of the amplitude values at the mode frequency points, and distinguishes whether the poultry egg has cracks or not by comparing the ratios.

The invention has the beneficial effects that:

1. the egg crack online detection system based on LabVIEW and the detection method thereof can continuously store egg excitation response signals on line and store a large number of data samples so as to establish a dynamic detection model for different varieties of eggs off line.

2. According to the on-line detection system and the detection method for the poultry egg cracks based on the LabVIEW, the sound card is used as audio acquisition hardware, LabVIEW graphical programming software is used for carrying out background and interface development of the system, the poultry egg excitation response signal waveform can be visually observed, the sound card is used as audio acquisition equipment, the requirement on audio signal indexes can be met, the system is economical and applicable, the use is flexible, and an upper computer can work by using multiple sound cards at the same time to achieve the function of multi-channel audio acquisition.

3. The egg crack online detection system and the detection method based on LabVIEW can realize online real-time detection of egg cracks, have good anti-interference performance on external noise, and can develop multi-channel egg crack detection on the basis.

Drawings

Fig. 1 is a schematic block diagram of an egg crack online detection system based on LabVIEW according to the invention.

FIG. 2 is a schematic view of a rapping device in accordance with the present invention.

Fig. 3 is a flow chart of the method for online detection of the crack of the egg based on LabVIEW.

In the figure: 1-an upper computer; 2-PLC; 3-sound card; 4-microphone; 5-a knocking device; 6-an encoder; 7-proximity switch.

Detailed Description

The invention will be further described with reference to the following figures and specific examples, but the scope of the invention is not limited thereto.

As shown in fig. 1 and 2, the on-line detection system for egg cracks based on LabVIEW comprises an upper computer 1, a PLC2, a sound card 3, a microphone 4, a knocking device 5, a conveying device, an encoder 6 and a proximity switch 7, wherein the conveying device is used for conveying eggs; the knocking device 5 comprises a plurality of knocking rods; a plurality of knocking rods are arranged near the conveying path of the conveying device; a proximity switch 7 is arranged near each knocking rod, and the PLC2 is used for judging whether the poultry eggs reach the knocking position; the PLC2 controls each knocking stick through an encoder 6 by using a pulse signal; the upper computer 1 is connected with a PLC2 by an RS 485; the microphone 4 is inserted into the USB sound card through a 3.5mm joint; the upper computer 1 is used for receiving the egg excitation response signals from the sound card 3, and judging whether the egg has cracks or not by collecting 16 excitation response signals of the same egg and performing time domain and frequency domain analysis, and specifically comprises the following steps: the control system carries out FFT (fast Fourier transform) on the collected poultry egg knocking sound signals, calculates the mode of frequency points corresponding to the most value of each frequency domain amplitude according to the obtained frequency domain signals, determines the ratio of all amplitude values and all the most value sums of the amplitude values at the mode frequency points, and distinguishes whether the poultry egg has cracks or not by comparing the ratios.

The upper computer 1 is connected with a PLC2 and adopts an MODBUS communication protocol; the upper computer 1 is connected with two USB expanders; the upper computer 1 automatically allocates ports to the USB ports of the USB expanders; the USB expander adopts USB2.0, and the transmission rate is 480 mbps; each USB expander has 4 USB ports, 8 USB ports in total, is connected with eight USB sound cards 3 respectively.

The PLC2 adopts external interrupt counting, records the knocking pulse corresponding to each knocking stick of the knocking device 5 through the encoder 6, distributes the appointed sound card 3 for each knocking stick according to the knocking pulse, and opens the corresponding sound card 3 according to the read content of the PLC2 register by the upper computer 1 to obtain the poultry egg excitation response signal to be collected;

the sound card 3 is a USB external sound card and is connected with the upper computer 1 through a USB interface; the highest sampling rate of the sound card 3 is 44,100Hz, the sampling precision is 16 bits, and the requirement of audio signal acquisition is met; the total number of the sound cards 3 is eight, and the sound cards are correspondingly connected with the eight microphone heads 4 on the knocking device 5 respectively;

the microphone 4 is an electret microphone, and the directivity is omni-directivity; the number of the microphone 4 is eight, and the microphone is connected with the sound card 3 through a 3.5mm joint; the microphone 4 is arranged on the knocking device, each microphone 4 can collect the excitation response signals of two adjacent knocking sticks, and the eight microphones 4 can collect the excitation response signals of 16 knocking sticks of the knocking device 5.

As shown in fig. 3, the detection method of the egg crack online detection system based on LabVIEW of the present invention comprises the following steps:

the method comprises the following steps: the PLC2 utilizes the encoder 6 and the proximity switch 7 to carry out speed matching on the knocking device 5 so as to ensure that the knocking rod on the knocking device 5 can knock the central axis of the poultry egg.

Step two: the method comprises the steps that the PLC2 is used for obtaining the output pulse of the encoder 5 to correspond to the phase angle of each knocking rod in the knocking device 5, the phase angle of each knocking rod can be represented by the output pulse of the encoder 6, the phase angle of each knocking rod and the pulse number output by the encoder 6 are fixed, the PLC2 is used for counting the pulse number output by the encoder 6 and storing the pulse number in a designated register, a register is allocated for the pulse number to place the corresponding sound card 3 serial number, and the designated sound card 3 is opened by reading the sound card serial number stored in the PLC2 register through LabVIEW so as to collect poultry egg excitation response signals;

step three: the upper computer 1 transmits the sound signals of knocking eggs collected by the microphone 4 according to the corresponding sound cards 3, and judges whether the eggs exist or not according to the amplitude of the time domain of the sound signals and a set threshold value, the main objects of the experiment are eggs and duck eggs, the hardness of the shells of the eggs and the duck eggs is different, the adopted threshold values are different, the data collection equipment is the sound cards 3, the collected signal intensity is related to the recording equipment, and the adjustment can be carried out through the upper computer 1; according to the requirement of the experiment, the egg is selected to be 0.16 as the threshold value of the effective signal, and the duck egg is selected to be 0.18 as the threshold value of the effective signal; if the sound signal transmitted by the sound card 3 reaches the set threshold, 256 data points of the intercepted signal are selected in order to achieve effective processing of the knock signal and save processing time.

Step four: the method comprises the steps of respectively putting excitation response signals collected by eight microphones 4 into eight arrays, continuously storing collected poultry egg knocking sound signals, carrying out data processing on the eight arrays according to the knocking rule of a knocking rod, extracting 16 knocking sound signals of a single poultry egg, carrying out FFT (fast Fourier transform) conversion on the 16 knocking sound signals, calculating the mode of frequency points corresponding to the most significant amplitude values of all frequency domains according to the obtained 16 frequency domain signals, calculating the ratio of the most significant sum of all amplitude values of the mode frequency points, distinguishing cracked eggs from intact eggs through comparison of the ratio, and displaying the result on a data collection interface.

Step five: the time domain signals and the frequency domain signals of the knocking sounds collected by the eight microphones 4 can be stored in a computer by utilizing an Excel table control of LabVIEW, an audio signal storage path is set through manual operation, and a file name can be automatically generated in the designated path by the upper computer 1 so as to perform offline data analysis.

The present invention is not limited to the above-described embodiments, and any obvious improvements, substitutions or modifications can be made by those skilled in the art without departing from the spirit of the present invention.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于房地产评估的空鼓检测器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!