5
494 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 47, NO. 2, APRIL 1998 A Temperature-Compensated System for Magnetic Field Measurements Based on Artificial Neural Networks J. M. Dias Pereira, Octavian Postolache, and P. M. B. Silva Gir˜ ao Abstract—This paper presents a personal-computer-controlled system, assembled mainly with IEEE 488 general purpose instru- ments and aimed at the measurement of magnetic field intensity. The main sensor element in the system is a magnetoresistive field sensor which includes four permalloy strips connected in a Wheatstone bridge configuration. The temperature dependence of this sensor can vary almost 25% in the experimental operating temperature range (20 C–100 C). In order to overcome this problem, a two-terminal integrated circuit temperature trans- ducer is connected to the system, and its temperature information is used to correct the temperature drift error of the magnetic sensor. Artificial neural networks are used for data reduction and final results show an improvement in the system’s accuracy from 20% to 2%. Index Terms— Calibration, error compensation, magnetic transducers, neural networks, temperature. I. INTRODUCTION T HE measurement of magnetic quantities using magnetic sensors such as Hall-effect sensors, magnetoresistive sen- sors, or induction sensors relies on the development of hard- ware or software linearizing blocks to increment the system’s accuracy. One of the common solutions used in automated measurement systems is the modeling of the transducer (sensor and conditioning circuit) characteristics with the polynomial approximation in a least-mean-square (LMS) error sense. Nowadays, application of artificial neural networks (ANN’s) has emerged as a promising area of research [1]–[3], since its adaptive behavior has the potential of conveniently modeling strongly nonlinear transducer characteristics. In this paper, the transducer characteristic modeling problems have been solved using ANN techniques. These techniques are used for inverse modeling [4] of a temperature-compensated magnetic transducer. The measurement system block diagram, described in the next section, is represented in Fig. 1. II. SYSTEM DESCRIPTION A. Hardware The hardware of the proposed magnetic field measurement system can be divided into the following parts: Manuscript received August 7, 1997; revised December 4, 1998. J. M. Dias Pereira is with the Escola Superior de Tecnologia, Instituto Polit´ ecnico de Set´ ubal, 2910 Set´ ubal, Portugal. O. Postolache is with the Faculty of Electrical Engineering, Technical University of Iasi, 6600 Iasi, Romania. P. M. B. Silva Gir˜ ao is with the Instituto Superior T´ ecnico, Universidade ecnica de Lisboa, 1049-001 Lisbon, Portugal. Publisher Item Identifier S 0018-9456(98)09848-9. Fig. 1. Block diagram of the measurement system: —inductance (number turns 500, cm, cm , ); —calibrator (FLUKE 5700A); S1—magnetic field sensor (KMZ10); S2—temperature sensor (AD 590); AS1—S1 signal conditioner; AS2—S2 signal conditioner. transducers—include sensors S1 and S2 and respective conditioning circuits (AS1, AS2); voltage measurement block—includes a digital multimeter HP 34401 controlled by a personal computer (PC) via general-purpose interface bus (GPIB) [5]; operative control block—consists of a switching system (Keithley 7001) controlled by a PC via GPIB that per- forms the following connections: HP 34401-AS1, HP 34401-AS2, and gain selection of instrumentation ampli- fiers. In addition to the blocks mentioned above, the hardware includes a multifunctional calibrator (FLUKE 5700A) which works as a dc current generator controlled by a PC via GPIB. 1) Magnetic Transducer: The sensor S1 is used to measure the magnetic field intensity generated by a current-carrying wire, allowing current measurement without any break in or interference with the circuit. The sensor uses the magnetore- sistive effect, a well-known property of a current-carrying magnetic material, to change its resistance in the presence of an external magnetic field. Four resistors, the resistance and sensitivity of which vary with temperature, are connected in a 0018–9456/98$10.00 1998 IEEE

A temperature-compensated system for magnetic field measurements based on artificial neural networks

  • Upload
    pmb

  • View
    217

  • Download
    3

Embed Size (px)

Citation preview

Page 1: A temperature-compensated system for magnetic field measurements based on artificial neural networks

494 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 47, NO. 2, APRIL 1998

A Temperature-Compensated System forMagnetic Field Measurements Based

on Artificial Neural NetworksJ. M. Dias Pereira, Octavian Postolache, and P. M. B. Silva Gir˜ao

Abstract—This paper presents a personal-computer-controlledsystem, assembled mainly with IEEE 488 general purpose instru-ments and aimed at the measurement of magnetic field intensity.The main sensor element in the system is a magnetoresistivefield sensor which includes four permalloy strips connected ina Wheatstone bridge configuration. The temperature dependenceof this sensor can vary almost 25% in the experimental operatingtemperature range (20 ���C–100 ���C). In order to overcome thisproblem, a two-terminal integrated circuit temperature trans-ducer is connected to the system, and its temperature informationis used to correct the temperature drift error of the magneticsensor. Artificial neural networks are used for data reductionand final results show an improvement in the system’s accuracyfrom 20% to 2%.

Index Terms— Calibration, error compensation, magnetictransducers, neural networks, temperature.

I. INTRODUCTION

T HE measurement of magnetic quantities using magneticsensors such as Hall-effect sensors, magnetoresistive sen-

sors, or induction sensors relies on the development of hard-ware or software linearizing blocks to increment the system’saccuracy. One of the common solutions used in automatedmeasurement systems is the modeling of the transducer (sensorand conditioning circuit) characteristics with the polynomialapproximation in a least-mean-square (LMS) error sense.Nowadays, application of artificial neural networks (ANN’s)has emerged as a promising area of research [1]–[3], since itsadaptive behavior has the potential of conveniently modelingstrongly nonlinear transducer characteristics. In this paper,the transducer characteristic modeling problems have beensolved using ANN techniques. These techniques are used forinverse modeling [4] of a temperature-compensated magnetictransducer. The measurement system block diagram, describedin the next section, is represented in Fig. 1.

II. SYSTEM DESCRIPTION

A. Hardware

The hardware of the proposed magnetic field measurementsystem can be divided into the following parts:

Manuscript received August 7, 1997; revised December 4, 1998.J. M. Dias Pereira is with the Escola Superior de Tecnologia, Instituto

Politecnico de Set´ubal, 2910 Set´ubal, Portugal.O. Postolache is with the Faculty of Electrical Engineering, Technical

University of Iasi, 6600 Iasi, Romania.P. M. B. Silva Girao is with the Instituto Superior Tecnico, Universidade

Tecnica de Lisboa, 1049-001 Lisbon, Portugal.Publisher Item Identifier S 0018-9456(98)09848-9.

Fig. 1. Block diagram of the measurement system:L—inductance (numberturns= 500, l = 10 cm, S = 3 cm2, � = �0 = 4�10�7H � m�1);I—calibrator (FLUKE 5700A); S1—magnetic field sensor (KMZ10);S2—temperature sensor (AD 590); AS1—S1 signal conditioner; AS2—S2signal conditioner.

• transducers—include sensors S1 and S2 and respectiveconditioning circuits (AS1, AS2);

• voltage measurement block—includes a digital multimeterHP 34401 controlled by a personal computer (PC) viageneral-purpose interface bus (GPIB) [5];

• operative control block—consists of a switching system(Keithley 7001) controlled by a PC via GPIB that per-forms the following connections: HP 34401-AS1, HP34401-AS2, and gain selection of instrumentation ampli-fiers.

In addition to the blocks mentioned above, the hardwareincludes a multifunctional calibrator (FLUKE 5700A) whichworks as a dc current generator controlled by a PC via GPIB.

1) Magnetic Transducer:The sensor S1 is used to measurethe magnetic field intensity generated by a current-carryingwire, allowing current measurement without any break in orinterference with the circuit. The sensor uses the magnetore-sistive effect, a well-known property of a current-carryingmagnetic material, to change its resistance in the presence ofan external magnetic field. Four resistors, the resistance andsensitivity of which vary with temperature, are connected in a

0018–9456/98$10.00 1998 IEEE

Page 2: A temperature-compensated system for magnetic field measurements based on artificial neural networks

PEREIRA et al.: A TEMPERATURE-COMPENSATED SYSTEM FOR MAGNETIC FIELD MEASUREMENTS 495

Fig. 2. The magnetic transducer: LM317—voltage regulator, AD524—instrumentation amplifier, and KMZ10—magnetic field sensor.

Wheatstone bridge configuration. Using mobility () variationlow for metals

(1)

the resistance temperature dependence of magnetoresistancescan be approximated by

(2)

which shows clearly that resistance and sensitivity of magne-toresistance decreases when temperature increases.

The magnetic transducer, represented in Fig. 2, includes anintegrated circuit (KMZ10), which delivers a voltage propor-tional to the magnetic field intensity, and a conditioning circuit(AS1).

Amplification of the output voltage from the magnetic fieldsensor is obtained using an instrumentation amplifier (AD524).As a complete amplifier, the AD524 does not require anyexternal components for fixed gains of 1, 10, 100, and 1000and the switching system (Keithley 7001), controlled by theprogram, can select automatically one of the pin programmablegains.

The high common-mode rejection rate (CMRR) and thelow nonlinearity of the instrumentation amplifier produce ahigh immunity to common-mode disturbances signals and highaccuracy.

2) Temperature Transducer:The temperature transducer,represented in Fig. 3, includes an integrated circuit temper-ature sensor AD590, which delivers a current proportionalto the temperature, and a conditioning circuit (AS2) whichconverts the current to a voltage.

The temperature sensor is almost insensitive to line voltagedrops due to its high output impedance (greater than 10 M)and its high interference rejection results from the output beinga current rather than a voltage.

The output current from AD590 flows through a 1-kresistance, thereby developing a voltage of 1 mV/K. Theoutput of the 2.5-V dc reference voltage, obtained from a

Fig. 3. The temperature transducer: LM317—voltage regulator, AD524—instrumentation amplifier, and AD590—two terminal IC temperature sensor.

voltage regulator, is divided down by resistors to provide anoffset of 273 mV required to have 0C as the referencetemperature. This offset is subtracted from the voltage acrossthe 1-k resistor and amplified by a second instrumentationamplifier (AD524).

B. Software

The software part of the system includes the following:

• communication software between the personal computer(PC Pentium-133 MHz) and the general proposed instru-ments represented in the block diagram of Fig. 1;

• data-managing software which performs the fileread/write data operations;

• signal processing software (SPS) which performs themodeling of transducer characteristics using the ANNtechnique and the numerical linearization of transducercharacteristics.

1) Communication and Data Managing Software:Thecommunication software is implemented in LabVIEW [6]using the special graphical functions for GPIB communication.Using functions such as GPIB write and GPIB read, togetherwith several string functions, the main command sequenceof the magnetic field measurement system is performed. Toestablish the ANN’s weights and biases (ANN learning phase)the FLUKE calibrator is commanded to generate dc currentsbetween 1–200 mA.

In this way, assuming that linear approximation is valid, themagnetic field intensity varies between (A/m) and

(A/m), where is the coil constant givenby , being the number of turns andthe coillength.

The AS1 and AS2 output voltages are measured by a mul-timeter and their values are stored in a file. These values, to-gether with the current information, are used in MatLab to trainthe ANN’s associated with the S1-AS1 and S2-AS2 condition-ing circuits. In the operational phase, it is possible to displaythe value of the magnetic field intensity compensated for theerrors caused by temperature variations of the magnetic sensor.

Page 3: A temperature-compensated system for magnetic field measurements based on artificial neural networks

496 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 47, NO. 2, APRIL 1998

Fig. 4. Virtual instrument front panel.

For a friendly measurement interface with a human operator,a virtual instrument (VI) was developed. The VI front panel,represented in Fig. 4, includes several areas which correspondto the main functions of the system: system configuration,communications, calibration, oven control, and measurements.When system calibration is selected in the configuration menu,a complete set of temperature and current values is used tocalibrate the system. The temperature oven controller per-mits adjustment of the temperature between 20C–100 Cwith an accuracy of 0.5 C. The calibrator adjusts cur-rents between 200 to 200 mA, using 1-mA increments,for each temperature. Gain control of conditioning ampli-fiers (AS1 and AS2) can be set to manual or automatic.In the first case, the gain is fixed during the calibrationphase and can be 1, 10, 100, or 1000. In the second case,recommended in normal operation conditions, the gain isautomatically adjusted by the system in order to minimizemeasurement errors and to have the operating point of theamplifiers in the linear zone. This operational mode incrementsthe dynamic amplitude range of the measurement systemby 60 dB.

2) SPS: The SPS of the system includes several ANNstructures which extract the information stored on the numeri-cal values of the acquired voltages (and ) delivered by themagnetic and temperature conditioning circuits. In this way,

is converted to the correspondent magnetic field intensity( ) using the processing structure ANN1 andis convertedto temperature () using the processing structure ANN2. TheSPS block diagram is presented in Fig. 5.

Concerning the output values of ANN2, temperature infor-mation ( ) is used to reduce the temperature drift error ofthe magnetic transducer by selecting an optimal choice oftwo magnetic transducer characteristics, ,from the characteristics set. The characteristics set,

, is obtained for the set of oventemperatures ( ) used in the calibration phase, given by

( C), where is an integer value between0–8. For each temperature, the magnetic field intensity in thecoil has 200 levels which are detected by S1 and expressedin AS1 output voltages , where is an integer value

between 1–200.Using the voltage vector

for each temperature and the associatedmagnetic field intensity values ( ), ANN1 is trained to

Fig. 5. SPS block diagram.

give the magnetic field intensity for each voltage value (),acquired from AS1, when S1 is submitted to temperature ().Assuming a linear relationship between the current in the coiland the magnetic field intensity, magnetic field values areexperimentally imposed using the calibrator configured as acurrent source.

Experimental results show that the maximum nonlinearityerror between output voltage () and the temperature ()is less than 0.45%, when a 10C temperature range isconsidered. This low level of nonlinearity for a small rangeof temperature offers the opportunity to develop a numeri-cal method to evaluate magnetic field intensity, with highprecision, for any temperature included in the operationaltemperature range of the sensor.

a) ANN’s architecture: In the present application, severalof the main strengths of the ANN, such as capacity forgeneralization, fast response in operational phase, reliability,and efficiency are used to develop a voltage/magnetic field(V/H) converter.

The ANN’s of the SPS are characterized by three neuronlayers: the input layer, the hidden layer, and the output layer.Each neuron input is weighted with an appropriate value.The sum of weighted inputs, along with the bias offset,are processed by a signoid function , given by

. The neurons of the hidden layer use this type offunction to generate their outputs, which are applied to theneurons of the output layer. The transfer function of the outputlayer neurons is a linear function. The number of neuronscharacterized by nonlinear transfer function isand the number of linear neurons is .

The training sets of ANN’s in the learning phase arerepresented by two vectors. In the ANN1 case:

• input vector has as elements normalized voltages givenby ;

• target vector is represented by one of the normalizedvectors.

In the ANN2 case:

• input vector has elements that are the nor-malized values of the AS2 output voltages:

when

Page 4: A temperature-compensated system for magnetic field measurements based on artificial neural networks

PEREIRA et al.: A TEMPERATURE-COMPENSATED SYSTEM FOR MAGNETIC FIELD MEASUREMENTS 497

TABLE INUMBER OF ITERATIONS OBTAINED IN ANN TRAINING PHASE ("0 = 0:001)

the calibration temperature has the following variation:, where is an integer value between 0–16;

• target vector elements are the normalized temperature val-ues ( ) measured with a precision digital thermometer(error less than 0.5C).

b) ANN’s training: The training algorithm used inthe present application is the backpropagation algorithm[7], [8]. The initial values of weights and biases( ) are represented by random elementsbetween 1 and 1. The final values for weights and biasescorrespond to a function approximation ( or

in the present case) characterized by a finalerror (in the sum square error sense) which is less than theimposed error threshold . This relation, , expressesthe stop condition of the learning algorithm.

The number of iterations in the present applicationare represented in Table I where are the characteristics,

, for the magnetic transducer, andsymbolizesthe characteristic, , of the temperature transducer.From the table, we can conclude that the number of iterations( ) and, obviously, the training time, depend strongly onthe initial values of weights and biases. To decrement thetime associated with modeling of transducer characteristics,an approximation technique was performed using two steps inthe ANN training phase.

• In a first step, the ANN is characterized by a reducednumber of neurons (two or three) in the hidden layer, andthe stop condition is expressed by .

• In a second step, the ANN includes six neurons in the hid-den layer and the stop condition is . In the firststep, the initial values of weights and biases are the ran-dom elements between1 and 1, but, in the second step,the initial weights and biases are obtained from the finalweights and biases of the first step. Using this method,the total number of iterations for both steps is always lessthan the values presented in Table I ( ).

III. RESULTS AND DISCUSSION

After the ANN training phase, the final values ofweights and biases corresponding to each transducer areused for on-line processing of the information deliveredby AS1 or AS2 and to evaluate the magnetic fieldintensity with temperature drift error compensation.The working matrices associated with the operationalphase are ,

, ,, where

are the matrices of weights and associated biasesfor the different temperatures used in the calibration phase( ).

Fig. 6. Relative error of the magnetic field intensity for different values oftemperature (T ).

The selection of weights and biases to calculate the mag-netic field intensity is made automatically using the outputvalue of ANN2. When this value is one of the tempera-tures used for calibration (), the weights and biases nec-essary for calculation of magnetic field intensity () are

. If the temperature obtained as an outputof ANN2 ( ) is other than , an algorithm to localizethe temperature interval associated with

value is performed. After identification of , for thevoltage value ( ) delivered by AS1, two values and

are calculated using and, respectively. Considering experimen-

tal results obtained for the linear dependence of S1 outputvoltages with temperature, within a 10C interval (linearityerror lower than 0.45%), the value of the magnetic fieldintensity ( ) for a given temperature () is obtained usingthe following relation:

(3)

where integer and arethe weights, the values of which are proportional to thedifferences, and , respectively.

The precision of the method was evaluated using 20 valuesfrom ( ) which correspond to 20 levels ofmagnetic field intensity. The relative error () obtained formagnetic field intensity evaluation is less than 1.1% (Fig. 6).

Comparative results associated with magnetic field intensityerror, with and without temperature drift error compensation,are represented in Fig. 7.

Another error source compensated by the system is themagnetic transducer hysteresis. Transducer hysteresis impliesthat, during the calibration phase of the system, the magneticfield transducer delivers, for the same value of magnetic fieldintensity ( ), different voltages for ascending or descendingcharacteristic. The error component which corresponds totransducer hysteresis is less than 1% and can be reducedcomparing the AS1 current output voltage with AS1 precedingoutput voltage. If the sign of this difference is positive,

Page 5: A temperature-compensated system for magnetic field measurements based on artificial neural networks

498 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 47, NO. 2, APRIL 1998

Fig. 7. The magnetic field intensity error with and without temperature errorcompensation.

the value is calculated using the ascendant characteristic,otherwise, is calculated using the descendant characteristic.

IV. CONCLUSIONS

A two-transducer system has been proposed in order to cor-rect the temperature dependence of magnetoresistive transduc-ers. This idea can be extended to other transducer applicationsand provide an on-line correction of external disturbances. Thesoftware signal processing part of the system includes twoANN’s that are used to model magnetoresistive transducerbehavior for different temperatures. Once the weights becomestable after the neural network has been well trained, the fastsignal processing of the network can be implemented. An addi-tional selection block and a computation algorithm enable thecorrection of temperature dependence of the magnetoresistiveeffect.

Based on this feature, the designed neural networks (ANN1and ANN2) can be used to evaluate, in real time, magneticfield quantities. Results show an improvement of the systemaccuracy from 20% to 2%, when temperature informationis used to compensate the magnetic sensor temperature drifterror.

ACKNOWLEDGMENT

The authors would like to thank the collective Laboratoryof Electrical Measurements, Lisbon Technical Institute, forproviding the material and technical support that made thiswork possible.

REFERENCES

[1] B. Kosco, Neural Networks for Signal Processing.Englewood Cliffs,NJ: Prentice-Hall, 1992.

[2] A. Bernieri, “A neural network approach for identification and faultdiagnosis on dynamic systems,”IEEE Trans. Instrum. Meas.,vol. 43,pp. 867–873, Dec. 1994.

[3] D. C. Park et al., “Electric load forecasting using an artificial neuralnetwork,” IEEE Trans. Power Syst.,vol. 6, pp. 442–449, May 1991.

[4] O. Postolache, M. Cretu, and C. Fosalau, “A thermocouple probecalibrator as an artificial neural networks application,” inProc. 8th TC-4Imeko Symp.,Budapest, Hungary, Sept. 1996, pp. 326–329.

[5] J. M. D. Pereira and P. S. Girao, “Identification of two and four portssystems using a frequency domain measurement technique,” inProc. 7thTC-4 Imeko Symp.,Prague, Czech Republic, Sept. 1995, pp. 352–356.

[6] T. Weckstrom and N. Uusipulkamo, “Using the LabVIEW software fortemperature calibrations,” inProc. 14th Imeko World Congr.,June 1997,vol. VI, pp. 191–193.

[7] S. Stearns and R. David,Signal Processing Algorithms in Matlab.Englewood Cliffs, NJ: Prentice-Hall, 1996.

[8] W. Wen, S. Liu, and Z. Zhou, “The research on the relation of self-learning ratio and the convergence speed in BP networks,” inProc.IMTC/94 Advanced Technologies in I&M,May 1994, pp. 131–134.

J. M. Dias Pereira was born in Portugal in 1959.He received the degree in electrical engineering andthe M.Sc. degree in electrical engineering and com-puter science from the Instituto Superior Tecnico,Technical University of Lisbon, Lisbon, Portugal,in 1982 and 1995, respectively.

For approximately eight years, he was with Portu-gal Telecom, where he worked on digital switchingand transmission systems. In 1992, he returned toteaching as an Assistant Professor in the EscolaSuperior de Tecnologia, Instituto Politecnico de

Setubal, Set´ubal, Portugal, where he is currently a Full Professor. His mainresearch interests are in the areas of instrumentation and measurement.

Octavian Postolachewas born in Piatra Neamt,Romania, in 1967. He received the electrical en-gineering diploma from the Technical University ofIasi, Iasi, Romania, in 1992.

In 1992, he joined the Faculty of Electrical En-gineering, Department of Electrical Measurements,Technical University of Iasi, as an Assistant Profes-sor. His main research interests include optimizationin sensor modeling, signal processing in virtual mea-surement systems, and usage of genetic algorithmsin ANN architecture optimization.

P. M. B. Silva Girao was born in Lisbon, Portugal,in 1952. He received the Ph.D. degree in electricalengineering from the Instituto Superior Tecnico,Technical University of Lisbon, Lisbon, Portugal,in 1988.

In 1975, he joined the Department of ElectricalEngineering, Instituto Superior Tecnico, TechnicalUniversity of Lisbon, as an Assistant Professor.Since 1988, he has been a Professor. His mainresearch interests include instrumentation and mea-surement techniques, as well as physical and math-

ematical problems involved in modeling magnetic materials.