Error compensation in ultrasonic sensor and mica mote NEW.docx

download Error compensation in ultrasonic sensor and mica mote NEW.docx

of 21

Transcript of Error compensation in ultrasonic sensor and mica mote NEW.docx

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    1/21

    ANN Based Error Compensation for Distance Measuring Sensor

    ABSTRACT: Identification of all the errors to achieve the reuired levels of accurac! ma! "e

    difficult# The pro"lem of improving the accurac! of measurement of ph!sical uantities

    remains upon in man! cases$ despite the vast variet! of Morden sensor# The pro"lem "ecomes

    important %hen either the sensor or the measurement method cannot offer inherentl! the

    desired resolution and accurac!# To resolve the accurac! issues$ a sensor "ased indirect error

    compensation approach is proposed in this pro&ect# To improve the error compensation

    precision of these sensors$ a method of the error compensation of sensors "ased on the neural

    net%or' algorithm is proposed# To validate the validit! of the algorithm$ the simulation

    e(ample of the error compensation of sensor %as given# )ere I am using *ltrasonic sensor for

    estimate the error compensation# The ANN "ased error compensation has "een implemented

    for the sensor "! training the ANN %ith their respective error profiles and the result indicate

    that the accurac! of sensor# The result sho%s that the approach of the error compensation of

    sensors using the neural net%or' algorithm has a ver! high accurac!# Thus$ the method

    proposed is effective# +e% Error Estimation and Compensation Techniues have "een

    discussed and ne%er method has "een proposed for improving the compensation efficienc!#

    The desired goal is to improve the measurement accurac! "! estimation and correction of the

    ma(imum error components are anal!sed in this pro&ect#

    ,e!%ords:

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    2/21

    1.INTRODUCTION

    Information o"tained from a sensor is prone to "e erroneous#calli"ration is done in order to

    get rid of these errors# Suita"le compensation are provided as a part of this cali"ration

    procedure# Neural net%or' provide an advantages of ma'ing the s!stem learn from its

    operation and improve its output "! modif!ing the s!stem parameter according to a feed"ac'#

    Neural net%or' %or' on the principle of limitation of %or'ing of neuron in the "rain for

    efficient implementation of comple( algorithm# These provide a fle(i"ilit! over conventional

    model in a %a! that neural net%or' are non-parametric in nature#

    1.1 Need of Compensation

    In order to improve the error compensation precision of sensor$ an approach of the error

    compensation sensor "ased on pol!nomial regression method %as proposed# To validate the

    validit! of the method the simulation e(ample of error compensation of sensor %as given#

    The result sho%ed that the approach of error compensation of sensor using the pol!nomial

    regression method has a ver! high accurac!#

    In this pro&ect an error profile is "eing generated$ %hich %ould sho% the deviation sensor

    output from ground truths# .ualit! enhancement is "eing done "! feeding the error data and

    sensor data to an ANN$ %hich %ould implement either of the follo%ing algorithm depending

    on mode of application#

    Bac' propagation algorithm: compensation %hen a fault! sensor is detected#

    /ol!nomial regression: for finding errors to intermediate sensor values then those

    provided to ANN for training#

    Error backpropagation algorithm is a supervised learning technique used to train

    a Neural Network In error backpropagation Neural Network, each hidden and

    output neuron processes its inputs by multiplying each input by its weight,

    summing the product and then passing the sum through a nonlinear function to

    produce a result. NN learns by adjusting the weights of the neurons in response

    to the errors between the actual output values and the target output values. This

    is performed through the gradient descent on the sum of squares of the error for

    all the training sets. The training stops when average sum of squares of the error

    is minimied.

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    3/21

    All real life transaction and interaction are a form of measurement# Certain specific

    instruments$ 'no%n as sensors are reuire to measure fe% particular parameters# A sensor

    output is permea"le to man! 'inds of error and irregularities o%ing to different condition of

    application under different conditions for similar input stimulus and hence lead to error in

    measurement these error and irregularities are removed#

    1.2 The Need for better accuracy

    The purpose of this research is to develop a general purpose compensation s!stem that is

    capa"le of enhancing the accurac! of sensor measurement "! correcting for the s!stematic

    position errors "! using the neural net%or'# In toda!0s modern and competitive

    manufacturing environment there is an ever increasing need of higher precision and greater

    accurac!# The "enefits "ehind the compensation are the

    To speed up the process of supplanting$ fitting "! assem"l!#

    To ensure "etter interchangea"ilit! of components "! manufacturing to higher

    tolerances#

    To achieve "etter product performance and relia"ilit!#

    Neural Net%or's: 1eneral Discussion

    Information o"tained from a sensor is prone to "e erroneous# Cali"ration is done in order to

    get rid of these errors# Suita"le compensations are provided as a part of this cali"ration

    procedure# Comple(it! of an error compensation algorithm and the methodolog! for going

    a"out to solve the pro"lem strictl! depends on the application reuirement# +or applications

    reuiring high precision$ algorithms of higher comple(it! and computational po%er are

    supposed to "e used %hereas for those %hich do not reuire such high precision$ procedures

    can "e simple enough#

    Though several different methods can "e e(ploited to reach similar conclusions$ Neural

    Net%or's provide an advantage of ma'ing the s!stem learn from its operations and improve

    its output "! modif!ing the s!stem parameters according to a feed"ac'# Neural net%or's

    %or' on the principle of imitation of %or'ing of neurons in the "rain for efficient

    implementation of comple( algorithms# These provide a fle(i"ilit! over conventional

    mathematical models in a %a! that neural net%or's are non-parametric in nature# Moreover$

    addition of e(tra information in neural net%or's is much simpler than its mathematical

    counterparts# Also$ function replication can "e done ver! effectivel!#

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    4/21

    Several learning algorithms and propagation algorithms are availa"le for this purpose# The!

    can emplo! either single la!er or multi-la!er approaches$ depending on the comple(it! and

    reuirement#

    E(ample 23342354: a classification pro"lem %ith data representation similar to that of an AND

    or 6R operation can "e solved using single la!er s!stem$ "ut those depicting 76R or 7N6R

    reuire a minimum of t%o la!ers#

    +or this particular pro&ect$ a neural net%or' has "een designed to implement a fourth order

    pol!nomial regression operation on the sensor data#

    +igure 3: A structured vie% of neural net%or'

    1.3 Objectie of the project:

    To compensate the error of ultrasonic distance sensor using different algorithm#

    To improve the information ualit! of sensor using the information of ground truths$

    %ith the help of Artificial Neural Net%or's#

    To attain higher compensation performance %ith greater accurac!#

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    5/21

    2. !IT"R#TUR" $UR%"&

    Cali"ration of a sensor inherentl! defines the need for error compensation# Authors in 284

    provide a comprehensive coverage of different sources of error for an ultrasonic sensor# Main

    reasons include: temperature$ target location$ composition$ motion$ characteristics of

    ultrasound "eing used and transmission media#

    Alan S Morris in 294 also provides a discussion on ultrasound$ its characteristics and factors

    affecting it# Ta'ing into consideration$ the directionalit! of ultrasonic %aves$ and ho% the!

    diverge as the! move for%ard in the medium$ a useful account of these %aves can "e made "!

    considering them not as single directional "eams$ "ut as conical "eams %ith edges of cone

    defined as transmission angle and magnitude ta'en either -dB 2;4 or -

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    6/21

    =# S>STEM M6DE?

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    7/21

    8# /R/6SED DATA CA?IBRATI6N MEC)ANISM

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    8/21

    '.2 Compensation Techni(ues

    '.2.1)ac*propa+ation #,+orithm 234

    This algorithm deals %ith multi-la!er perception# The error o"tained after the last la!er should

    "e responsi"le for not onl! updating the %eights corresponding to final la!er$ "ut also to all

    other %eight matrices as %ell# Bac' propagation achieves this "! introducing sensitivities for

    each la!er and updating these from those of the succeeding la!er#

    +or an M-la!er net%or'$

    +igure

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    9/21

    Training the net%or':

    Training the net%or' %ill "e done "! updating the %eights and "iases$ so that the

    output reaches the target value# /erformance inde( for this operation is mean suare error @mse# This inde( is also

    called Cost +unction#

    *pdate operation is done in accordance %ith ?MS algorithm$ %here %eights are

    updated "! su"tracting the product of learning factor and partial derivative of cost

    function %ith respect to that %eight from its current value# Bias update is done "!

    su"tracting the sensitivit! of the la!er from its current value#

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    10/21

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    11/21

    8#5#5 -o,ynomia, Re+ression

    Neural net%or' has "een utilised to perform a regression pro"lem of order 8 using t%o la!ers one input and one

    output# The net%or' has %eight vector %0# Input is given in the form of a vector containing multiple po%ers of

    sensor value p0#

    23 35=84

    Input multiplied %ith %eight vector gives a pol!nomial of sensor value in ever! training e(ample# This

    pol!nomial output$ %hen compared to the target value$ %hich is error for the training e(ample$ in this case$ gives

    a pol!nomial mapping of sensor values over range of plausi"le errors# Then$ for an! intermediate value "et%een

    t%o sensor-readings$ error can "e o"tained from the pol!nomial coefficients i#e# %eight vector# This error can "e

    added @or su"tracted from the sensor data to give compensated output#

    Training the net%or':

    An input matri( 7 is constructed %hose ro%s are vectors formed "! multiple po%ers of sensor value p0#

    7 is$ thus$ a m:< vector$ %ith first column containing all 3s#

    @$: 23 35=84 3 @

    Feights of the net%or' are given "! the column vector:

    @24$3

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    12/21

    )!pothesis function: It is the summation of the product of a training input %ith its corresponding %eight

    element#

    @ @$:

    The net%or' is trained "! updating the %eights in order to decrease the performance inde($ %hich$ in this

    case is Mean Suare Error# This performance inde( is also called Cost +unction @G#

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    13/21

    %here @(@i$ !@i is the ith training e(ample#

    Feight update operation:

    This includes "ias update operation as %ell$ since the input matri( includes the initial "ias

    inputs in its first column and the %eight vector is constructed so as to cater to all the elements

    of ever! ro% in the input matri(#

    Simplif!ing the differential term in the a"ove euation

    The a"ove method of cost function reduction is called "atch-gradient descent method$ due to

    the fact that$ for ever! update operation$ error is "eing calculated for all the training

    e(amples$ unli'e the ?MS approach$ %here onl! error pertaining to one training e(ample is

    calculated for one update operation at a time# The a"ove differential is called "atch error and

    is multiplied %ith a learning factor @H "efore updating the %eight vector#

    Thus$ the final update euation is:

    8#5# Chec*in+ the Trained #rtificia, Neura, Netor*

    +or "oth the algorithms a"ove mentioned$ the efficienc! of training operation can onl! "e

    assessed %hen some 'no%n data is sent into the net%or' and the output o"tained matches the

    e(pected results# Thus$ after ever! training session$ 'no%n data$ t!picall!$ the same training

    inputs are re-sent into the net%or' and chec'ed for degree of closeness "et%een the net%or'

    output and training targets#

    A"ove algorithms have "een implemented in MAT?AB and net%or's have "een chec'ed for

    training efficienc!$ %hose results have "een sho%n in the ne(t chapter#

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    14/21

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    15/21

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    16/21

    /round 10 20 30 0 '0 0 0 40 50 100

    Truths

    $,.No @cm @cm @cm @cm @cm @cm @cm @cm @cm @cm

    1. 3#3< 3L#LL 5L#;< =#33 =L#

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    17/21

    Training data:

    Input Kector 7 %hose ro% vectors are of the form given "elo%$ %here variation of p %ith

    target values is given in the ne(t ta"le#

    @24

    RES*?TS:

    Console 6utput:

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    18/21

    !igure "# $onsole showing %ackpropagation &utput

    Plot: Error Profle [Error vs Sensor value or all training examples]

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    19/21

    This algorithm is provided %ith multiple po%ers of DA. output as input and the target is set

    to "e the error o"tained "! comparing the sensor output to the standard i#e# data from ground

    truth measurement s!stem# Result %ill "e a pol!nomial mapping the sensor inputs to errors

    o"tained# +rom that graph$ an error estimate for an! reuired DA. value can "e o"tained#

    This error estimate %hen mi(ed up %ith the original uncertain data %ill give solutions are

    devoid of errors or %ith much less errors compared to the original ones#

    Training input is a matri( 7 %hose ro% vectors are of the form

    @$:23 @3@5@@=@84

    Target or standard values are errors:

    @ @@

    'alues of p and correct vectors#

    CONC!U$ION

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    20/21

    This pro&ect has acuired sensor data$ ultrasonic sensor in particular$ through a Data

    Acuisition S!stem setup using Arduino *no Board# The Arduino-"ased DA. s!stem has a

    t%o-fold advantage# It is much cheaper than off-the-shelf DA. s!stems availa"le and at the

    same time ver! eas! to "e programmed unli'e a conventional microcontroller or processor#

    Data from Arduino can directl! "e interfaced %ith MAT?AB to o"tain real-time data#

    Artificial Neural Net%or's to get DA. outputs closer to the standards values# ANN can "e

    implemented for such operations after appropriatel! "eing trained %ith a set of sensor and

    standard data# This pro&ect implements the Bac'propagation and /ol!nomial Regression

    algorithms for that purpose#

    6UTUR" $CO-"7

    References

  • 7/25/2019 Error compensation in ultrasonic sensor and mica mote NEW.docx

    21/21

    234

    254 //IMT$ )isar @)ar!ana$MinimiJation of Error in Training a Neural Net%or'

    *sing 1radient Descent MethodIGTR mar-apr535

    24

    2=4

    284 D# S# Bernstein$ OSensor /erformance Specifications$OIEEE Control Systems Magazine,August 53#