Evaluacion Instrumentacion

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Realization of the Motor Data Acquisition and

Analyzation System Based on the


Producer/Consumer Model of Labview
Sheng Zhi-yu
School of Automation Science and Electrical Engineering, Beihang University
Beihang University
Beijing,China
hnyzxs@126.com

Abstract—To solve the problems of motor’s data acquisition can be easily set by user. The system can also save and load the
system’s low automation level, too less data channel, limited data that have acquired.
apply areas. This paper introduced a kind of motor’s data
acquisition and analyzation system which were developed based
II. PROGRAM DESIGN MODEL
on producer/consumer model and LabVIEW program. This
system can fulfil the tasks of multi-channel data acquisition, data Program design model refers to a number of useful
analyzation and display, data saving and loading. By setting two structures. These structures usually are easy to read, easy to
different data acquiring frequencies, that’s 2kHz and 20kHz, to maintain, and suitable for various occasions. Pipeline structure,
acquire the same signal that produced by the signal generator state machines, producer/consumer structure are widely used in
and analyzing the data that were acquired. According to the LABVIEW programming.
analysis and data fitting results the benefits and short comes was
concluded. These tests suggested that the signal can be
represented by this two kind of data acquiring frequency and the
standard error that the 2kHz had is bigger than that of 20kHz A. Pipeline structure
had. So, the test’s result proved that this system works well and Pipeline structure works just like the production line. Every
easy to realize. function and data are processed step by step. The data can only
be processed by one function at a time. Every function works
Keywords—LabVIEW; Data acquisition; Producer/Consumer; during each circulation, but each function can only deal with
Data acquiring frequency; Data fitting; different data. Only if all function has finished their process
this circulation ended and the next circulation begins. The
pipeline structure provides a kind of model to deal with the
data. It ensures the correctness of the function. The time
I. INTRODUCTION needed is determined by the longest function in the whole
Nowadays, many kinds of motors like stepping motors, program. The program works efficiently when all the functions
permanent magnet synchronous motor(PMSM), Switched need similar time to process. If the time gap between different
Reluctance Motor(SRM) play a vital role in modern production functions is very large the system will work inefficiently.
process. It is very important to make sure that motor can work
efficiently and stably. Acquiring motor’s running data is the B. State machine
first step for analyzing the motor’s health condition and failure State machine or finite state machine (FSM) is a kind of
diagnosis. So, it is very important to do some research about math model that usually used in describing the changes and
the motor’s data acquiring. functions between different states. It is widely used in
Programs such as VC, MATLAB, Basic, LABVIEW are computer program designing and sequential logic circuit
widely used in designing this kind of system. LABVIEW, designing. Usually state machine contains four elements-
particularly, is the most popular, developed and powerful current states, condition, action, next state. Current state is
graphical virtual instrument development tool. LABVIEW what the program works now. When specific condition is
have many functions, it can fulfil the tasks of data acquiring, meted, the program will change the works that it going to do
data analyzing, signal output, input and output controlling. The that means the program come to the next state. And what it
existing system always has some inadequacies such as some going to do in the state is called the action. State machine is
cannot alter acquiring methods, some don’t have data widely used in monitoring, controlling or some kind of logical
analyzing, some are difficult to scale up to more large system. system.
The system proposed in this paper was developed on
LABVIEW. It uses producer/consumer model and can be used C. Producer/consumer
to acquire and process muti-channel motor’s data. The Producer/consumer model contains multi circulation, in
acquiring frequency, acquiring channel and acquiring time all each circulation different function will be processed at different
___________________________________
978-1-4673-9613-4/16/$31.00 ©2016 IEEE

330
speed. Some circulation works as a producer which produces frequency of the original analog signal can be the acquired
data and information which would be analyzed in the consumer signal restore the original waveform. In consideration of the
circulation. Two kinds of circulations by certain motor’s voltage frequency, the default sampling rate is 2kHz.
communication method to communicate and transfer data. In order to make this system work efficiently in various
Consumer/producer model solves the program’s multi-process operating conditions, the system also allows users to select
synchronization problem.It can make sure that the system does different sampling frequency and the length of the sampling
not lose any data or repeat the analysis. It helps to ensure the time.
integrity of the data. This model can easily be found in java or
C++ program. When the system is running, if user clicks the start
acquiring button the system will start acquiring according to
the setting of the acquiring rate, the number of data that need to
III. HARDWARE BUILDING be acquired, the channels that need to be sampled. The figure2
The whole system is consisted of a computer, a data shows how to accomplish the sampling work. First the “create
acquisition card, a motor and its controller, voltage sensor and the task.vi” read the “analog sampling rate” and create the task.
current sensor. The data acquisition card is a PCIE-6321 Then “daqmx read.vi” gets the task and starts to sample. While
produced by national instrument. This card has 16 analog input the vi is sampling it puts the data into the “analog sampling
channels and 2 analog out channels. It also has 24 channels that queue”. After all the data sampling have accomplished the
support digital input and output. The maximum analog input system will decide whether continue sampling according to the
speed is 250kS/s. And the ad converter’s resolution is 16 bits. user’s setting. By the end of the sampling process all the data
The input range for this card is ±10V. The whole system’s have been put into the queue.
hardware structure is presented in fig1. The motor in this
system is a kind of AC servo motor which was made by
DELTA company.The motor’s phase current signal line, line
voltage signal line, speed signal line, bus current signal line
and other signal lines are all connected with their
correspondent sensor. The sensor’s output connected with the
acquisition card, in that case, the data can be transferred
through the system into the computer.

Fig.1. The overall hardware structure of acquisition and


processing system
Fig.2. Part of the data acquisition program

IV. SOFTWARE REALIZATION B. Data display


This data acquisition and processing system for the motor Display and analysis part is a different circulation from the
are based on the producer-consumer design model. Data acquisition part. It is the consumer section. In this circulation,
acquisition, data display and analysis, data saving and loading first the program will check whether there are data in the
are the system’s main parts. Data acquisition are the main “analog sampling queue”. If the queue is not empty, the
producer part and the others are the consumer part. program will separate the data by the channel that set by user.
If the sampling process has done more than once, the program
There are too many channels that need to be shown on the will combine the different data through the “append
front panel. If all graphs are arranged just in one screen that waveforms.vi”into a completed waveform. This waveform will
will make it very hard to see the graph clearly. So in this be used for further process. Then the waveform will pass
system the tabs are used. The system’s front panel is showed in through some wave filter that can delete some noise in the data
fig 7. The left buttons are used to select the signals that are and be analyzed.
intended to acquire. The right buttons are used to set and
control the acquiring process. The figure3 shows how this process works to the A phase
voltage channel. The data will go through the “filter express.vi",
"A phrase voltage stastics.vi", "signal analysis.vi",
A. Data acquisitions
"FFTSpectrum(mag-phase).vi" one by one. Through these
The main points about the data acquisition are the selection processes the signal's statistics like standard deviation, variance,
of sampling rate. The data that transferred to the computer are frequency, phase, THD can acquire. These statistics are
discrete digital data, so according to the Nyquist law that only displayed in the front panel. Also, the data's Fourier
when the sampling frequency is greater than twice the highest

331
Transformation results are displayed to help user to understand showed in the fig8. It is clear from the fig that the waveform
the harmonic component in the waveform. acquired from the acquisition card is like a kind of sine wave
which amplitude change periodically. The frequency spectrum
of the acquired signal showed the wave’s main frequency is
508Hz, the data analysis showed that the waveform amplitude
is 8.27, consistent with the signal generator’s information.
Export the collected data, and use the supply voltage channel’
s first 200 data to redraw the waveform. The new waveform is
showed in the fig4. It can be seen from the graph that the
signal’s amplitude showed periodical change. There are some
distortions in the sampling data. These results showed that the
original analog signal can be restored from the acquired data,
but the relative position of each sampling point is in change.
The reason for this is when the sampling frequency and signal
frequency do not match, the sampling points’ position may
vary in different period. The 2kHz frequency was used to
sample the 500Hz signal, so in one period there were only four
points acquired. So, the movement in the fig is very obvious.

Fig.3. Part of the program that analysis the A phase voltage

C. Data storage and loading


Data saving and loading function are also very important
for the whole system. In the LABVEW, the TDMS format is
widely used in waveform saving and loading. The TDMS file
is a kind of binary record that developed and promoted by the
National Instrument. This kind of structure has high speed, Fig.4. 2kHz sampling results
easy to store, convenient to modify and many other advantages.
This system uses the event structure to fulfil the tasks of saving B. 20kHz sampling frequency
and loading. When user clicks the "saving all waveform" Change the sampling frequency to 20kHz and resample the
button, the corresponding program in the event structure will 500Hz signal. The sampling results are showed in fig9.
start running. The program is showed in fig6. First the "file
dialog" enquires the user of the saving location information. We can see from the diagram that the sampled waveform is
Then, system uses "create TDMS" to create a TDMS file. After relatively good. Spectrum analysis and waveform analysis
this, it uses "TDMS writing" to save the data from the queue showed that the amplitude and main frequency of the wave is
and button information into TDMS file. At last, the TDMS 8.3V and 508Hz. The analysis results indicate that the acquired
reference is closed by the program. Also, when user click the data are more desirable. This time, uses the supply voltage
"loading waveform" button, the system will read the file that channel’s first 200 data to redraw the waveform again, as
chosen by the user. Then the data in the file will be displayed showed in fig5. We can see that the wave of fig5 is very similar
in the system. to the standard sine wave form and the acquired data is very
ideal. This may be due to the points that collected in one period
V. TEST EXPERIMENT is become more, the time distance between different points is
smaller, so the movement is not obvious as before.
Before applying the system into actual using, the signal
generator was used to test the whole system's function. The
signal generator can generate signals that contain little noise
and very easy to recognize, it's widely used in system testing
condition. The signal generator used in this testing is SG1646A
which made by the Jiangsu Right Electronic Equipment
company. This generator is used to produce sine waveform
with an amplitude of 8V and a 500Hz frequency.

A. 2kHz frequencies sampling


2kHz frequency is used to sample the sine wave that
generated by the signal generator, and some analysis has been
done on the waveform. The sampling and analysis results are Fig.5. 20kHz sampling results

332
C. Comparisons The system was developed by the LABVIEW and it can
TableI gives the part of the information about the two acquire multi analog signals. Users can set an appropriate
data’s curve-fitting results. sampling frequency, sampling channels and the filter frequency
for different conditions. The system is easy to develop and
Table I PART OF THE RESULTS OF DATA FITTING have complete function, very suitable for engineering using
Frequency w A purpose.
Standard Standard
Value Value The signal generator was used to test the system’s function
Error Error
5.50E- and the comparison was made between 2kHz and 20kHz
2kHz 1.964 5.83E-07 4.014 sampling results. The fitting and analysis of the data shows that
04
these two sampling data all can be used to restore the original
20kHz 19.663 5.008E-6 4.021 2.36E-4 waveform. But, the 2kHz sampled waveforms showed a certain
deviation. Therefore 20kHz sampling frequency should be
The formula of this waveform fitting is applied to a system which acquisition equipment resources are
rich and required accurate waveform information. On the other
y = y 0 + A × sin( pi × ( x − xc) / w) (1) hand, 2KHz sampling frequency is suitable in the system
According to this formula, the frequency is which acquisition devices with limited resources. It can acquire
the correct data and information, but the waveform error is
=f ω= 1/ 2 w (2) relatively large.

The curve-fitting results do not take the sampling time into
consideration, it calculates the frequency by the number of the REFERENCES
data. So the actual frequency of the sampled waveform is [1] Zhang Changfan,Huang Yishan,Shao Rui. Fault detection method and
application of induction motor based on observer[J]. Chinese Journal of
Scientific Instrument, 2011,32(6):1337-1343.
f r= f × fsample (3)
[2] QIAO Jun-fu. Design of A Motor Monitoring System Based on
So, the actual frequency of this two acquired wave is Labview[J]. Mechanical Engineering & Automation, 2015 , 193
508.9Hz and 508.6Hz respectively. These two fitting (6):148-150.
parameters can restore the original signal correctly, but the [3] HU Wen-biao, MA Wei-ming. A data acquisition system used in electric
fitting results’ standard error of the amplitude and frequency of machine test based on LabVIEW[J]. Journal of Naval University of
Engineering, 2005,17(3):61-65.
the waveform for the 2kHz frequency is more large. So more
data is lost in this process. In conclusion, 20kHz sampling [4] YE Fenghua,ZHOU Xincong,BAI Xiuqin,GUO Zhiwei,et al. Design of
Data Acquisition Program Based on Queued State Machine in
frequency applies to the system that capture device resources LabVIEW [J]. Modern Electronics Technique, 2009,315(4):204-
are abundant and the accuracy of the waveform is strict. For the 210.
system which equipment’s acquisition resources are limited, [5] Tang Jinyuan Li Song Shao Wen. Gear Transmission Vibration Test
using the 2kHz sample frequency is suitable. This can also System Based on the Producer/Consumer Model of LabVIEW[J].
obtain the correct data information, but there will be relatively Journal of Mechanical Transmission, 2011,35(1):5-7.
large errors. [6] Huang Haocai,Yang Canjun,Chen Daohua,et al. Measurement and
control system for gas-tight deep-sea water sampler based on
LabVIEW[J]. Chinese Journal of Scientific Instrument, 2011,32(1):
VI. CONCLUSION 40-45.
A kind of motor’s acquisition and analysis hardware system [7] YANG Zhong-ren, RAO Cheng, ZOU Jian,et al. Study on DAQ System
by Using LabVIEW[J]. Journal of Chongqing University (Natural
was built. And the corresponding software system was Science Edition), 2004,27(2):32-35.
developed based on the producer/consumer model. This system [8] Du Juan,Qiu Xiaohui,Zhao Yang,et al. Data Acquisition and Signal
can fulfil the tasks of sampling and analyzing multi-channel Processing System Based on LabVIEW [J]. Journal of Nanjing Normal
data and the producer-consumer structure can effectively avoid University(Engineering and Technology Edition), 2010,10(3):7-10
the problems caused by the speed difference of the data
collection and data analysis.

Fig.6. Part of the storage program

333
Fig.7. The front panel display

Fig.8. Using 2kHz sampling frequency to sample 500Hz sine wave

Fig.9. Using 20kHz sampling frequency to sample 500Hz sine wave

334

You might also like