9
Real time detection through Generalized Likelihood Ratio Test of position and speed readings inconsistencies in automated moving objects Sternheim Misuraca, M. R. Degree in Electronics Engineering, University of Buenos Aires, Argentina Project Engineer, Sistemas Industriales, ABB Argentina Email: [email protected] Abstract In the present work we describe a system to detect inconsistencies of position and speed readings in automated moving objects to prevent collisions. The system is implemented through a Generalized Likelihood Ratio Test (GLRT) strategy. Posi- tion and speed measurements are used as inputs of an hypothesis testing system for consistency checking. Type I error (false alarm) probability can be specified and set, while minimizing type II error (mis-detection) probability. Also, we show the results of the successful implementation of this strategy in the transelevator control system we installed in April 2013, in the Distribution Center of Molinos Rio de La Plata in Barracas, Buenos Aires, Argentina. 1 Introduction and problem set up There are several industrial applications where automated moving objects relay on position and speed readings to control its movement, such as cranes and trans- elevators. Independent position and speed measurements are easily implemented through laser positioning, bar codes or encoders. However they are usually noisy, leaving consistency checking systems open to errors such as stating that the read- ings are not consistent when they are (type I or false alarm error), or stating that the readings are consistent when they are not (type II or mis-detection error). We examine the Distribution Center of Molinos R´ ıo de la Plata S.A, located in Barracas, Buenos Aires, Argentina, where we implemented the system in the trans-elevator control program we developed and installed in April 2013. The Distribution Center consists on a vertical warehouse that storages pallets carrying comestible loads of up until one ton. The warehouse has three corridors, each of 100m long x 12m high, with capacity for 2200 pallets. Through each cor- ridor, a fully automated trans-elevator of two ton moves at 10km/h - see figure 1. 1

Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

Real time detection through GeneralizedLikelihood Ratio Test of position and speedreadings inconsistencies in automated movingobjects

Sternheim Misuraca, M. R.Degree in Electronics Engineering, University of Buenos Aires, Argentina

Project Engineer, Sistemas Industriales, ABB Argentina

Email: [email protected]

Abstract

In the present work we describe a system to detect inconsistencies of position andspeed readings in automated moving objects to prevent collisions. The system isimplemented through a Generalized Likelihood Ratio Test (GLRT) strategy. Posi-tion and speed measurements are used as inputs of an hypothesis testing system forconsistency checking. Type I error (false alarm) probability can be specified andset, while minimizing type II error (mis-detection) probability. Also, we show theresults of the successful implementation of this strategy in the transelevator controlsystem we installed in April 2013, in the Distribution Center of Molinos Rio de LaPlata in Barracas, Buenos Aires, Argentina.

1 Introduction and problem set up

There are several industrial applications where automated moving objects relay onposition and speed readings to control its movement, such as cranes and trans-elevators. Independent position and speed measurements are easily implementedthrough laser positioning, bar codes or encoders. However they are usually noisy,leaving consistency checking systems open to errors such as stating that the read-ings are not consistent when they are (type I or false alarm error), or stating thatthe readings are consistent when they are not (type II or mis-detection error).

We examine the Distribution Center of Molinos Rıo de la Plata S.A, locatedin Barracas, Buenos Aires, Argentina, where we implemented the system in thetrans-elevator control program we developed and installed in April 2013.

The Distribution Center consists on a vertical warehouse that storages palletscarrying comestible loads of up until one ton. The warehouse has three corridors,each of 100m long x 12m high, with capacity for 2200 pallets. Through each cor-ridor, a fully automated trans-elevator of two ton moves at 10km/h - see figure1.

1

Page 2: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

1 Introduction and problem set up 2

In the event of a mechanical or electronic issue in the position or speed readingsused for positioning control, it is of the essence that the control system stop thedevice in order to protect the people and the facilities involved.

Fig. 1: Empty trans-elevator moving through the warehouse

In this work we present a strategy of hypothesis testing using Generalized Like-lihood Ratio Test (GLRT). The system is implemented in real time with negligiblecomputational burden, and allows to set false alarm probability while minimizingmis-detection error probability.

The aforementioned trans-elevators are automated by means of a AC800M con-troller, model PM851. Movement is controlled individually for each axis, by meansof an ACS800 drive attached controlling the corresponding motor. The drive re-ceives motor speed measurements through an incremental encoder plugged to themotor axis, and position measurements of the trans-elevator jail through a differentincremental encoder plugged to an independent mechanical system - (elevation istaken from a wire, and horizontal movement from a timing chain).

We added the consistency check layer to the existing control system withoutadding computational burden to the controller. In the next section we detail the

Page 3: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

2 Mathematical model 3

implemented algorithm and we compare it with more conventional integration anddifferentiation methods to address this issue.

2 Mathematical model

We start modeling available measurements. Time is discretized according to theexecution time of the controller’s task running the program, which we will call ∆t.Time is referenced by a subindex (e.g. xi ).

For each axis, at instant i, independent position - xi - and speed - vi mea-surements are available. They are, however, noisy, with mean equal to the actualposition and speed, respectively. Noise statistics are approximated by a gaussiandistribution (due to it being mathematically easy to use). We thus have

xi = xi + ηi (1)

vi = vi + νi (2)

With ηi ∈ R and νi ∈ R gaussian, zero mean and variances σ2x and σ2

v re-spectively. We assume they are both ergodic processes (measurement noises areuncorrelated if measurements are taken at different times, though the statisticalparameters are equal).

Next we derive the most common approaches to this problem, along with theissues they present - differentiation and integration, and finally we describe themethod we chose to implement, the generalized likelihood ratio test.

2.1 Differentiation strategy

The most simple strategy to check for consistency is to approximate the derivativeof the position via finite differences, and then compare it to the speed measurement.We start by defining Λ

dx

dt(i) ∼ xi − xi−1

∆t(3)

Λ =xi − xi−1

∆t− vi (4)

Now we define ε > 0 as the bound for the difference between measured speedand approximated speed through derivatives. Thus, when |Λ| > ε, inconsistencywarning is set.

This strategy presents several issues. First, position measurement noise is am-plified, since 3 is a high pass filter, which effect is to filter out the mean and toamplify the random component. Since successive position measurements are takenvery fast compared to the trans-elevator speed, the means are similar, rendering itvulnerable to the filter. Moreover, since the subtraction is divided by a very smallfactor (∆t), the noise is even more amplified.

Secondly, speed measurement vi is unfiltered, so its noise is not mitigated,which is not desirable.

Finally, there is no control over the error probabilities.

Page 4: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

2 Mathematical model 4

2.2 Integration strategy

Instead of derivating position to compare it with speed, we will try integratingspeed to compare it with the position. Speed measurement, at each moment, ismultiplied by the time interval ∆t (and by a factor ρ if speed needs scaling); andthen it is added to approximate the integral of the speed. We then calculate thediscriminant as

Λ = (xN − x1)− ρ∆t

N∑i=1

vi

Again, the decision strategy boils down to comparing the absolute value of thediscriminant with the bound ε - if it is greater, we decide there is an inconsistencyin the measurements.

This strategy is better than derivating since speed measurement noise is mit-igated. Proof lies on averaging zero mean noise components. Due to eq 2, wehave

N∑i=1

vi =

N∑i=1

vi +

N∑i=1

ηi

Since adding independent, identically distributed (i.i.d.) samples and divid-ing by the number of samples is an unbiased estimator of the mean (remembermeasurement noise is ergodic by hypothesis) we then write

N∑i=1

vi =

N∑i=1

vi +Nµη

However µη = 0 by hypothesis, thus noise effect is mitigated.Another improvement is that position measurement noise is not as highly am-

plified, since means of position separated by the data window (N) are bound tobe less similar (unless the trans-elevator is not moving at all). Besides, we are nolonger dividing it by the sampling factor ∆t.

We must underline the fact that, as in the previous case, we don’t have meansto quantify the errors, much less set them according to specifications.

2.3 Likelihood ratio strategy

2.3.1 Constructing the sample set

To overcome the problems inherent to integration, we will use hypothesis testing.We start defining the random variable z as follows

zN = (xN − x1)− ρ∆t

N∑i=1

vi (5)

This random variable is gaussian, due to being a linear combination of gaussian,independent variables, with mean equal to the linear combination of their means,and variance equal to the sum of individual variances, weighted by the squaredcoefficients. Since the linear combination of the means is equal to zero (in normal

Page 5: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

2 Mathematical model 5

conditions, the mean value of the integral of the speed is equal to the positiondifference) we have

z ∼ N (0, 2σ2x + ρ2∆t2Nσ2

v) = N (0, σ2z) (6)

Using 5 we build the sample set {z1 . . . zN} of (i.i.d.) variables. Samples will bei.i.d. if data windows are independent. However, this will delay sample production,so data overlapping will be permitted if needed out of the application sample speedrequirement, assuming i.i.d. samples to simplify the mathematical model.

2.3.2 Generalized Likelihood ratio test - GLRT

Next we define two hypothesis. Null hypothesis is that the mean of z is zero, whichcorresponds to speed and position measurements consistency. Alternative hypoth-esis is defined as having non-zero mean, which signifies that there is a deterministicdifference between speed and position measurements dynamics, and thus an in-consistency in the data which might be caused by electrical or mechanical issues.Formalizing

H0 : µz = 0

HA : µz 6= 0

To contrast such hypothesis, we use Likelihood Ratio Test, which consists onobtaining the discriminant comparing the probability of obtaining the sample setconditioned to the null hypothesis or the alternative hypothesis.

At this point, we must redefine the alternative hypothesis (to avoid comparingthe zero mean probability to every mean probability) - alternative mean is nowequal to the maximum likelihood estimator of the mean computed from the sampleset, which is equal to the data set average. We don’t lose generality in the process,in the sense that even if the alternative hypothesis will always be more likely, thekey is to accept the null hypothesis when it is not likely enough. Later we willsee that the error probability, which can now be computed, will help us set thebound to choose the alternative or null hypothesis. See [1] and [2] for details of thisdetection strategy.

Next we formally redefine the hypothesis

H0 : µz = 0

HA : µz = µMLEz =

1

N

N∑i=1

zi

Λ0 =p(z1 . . . zN |H0)

p(z1 . . . zN |HA)=

p(z1 . . . zN |µz = 0)

p(z1 . . . zN |µz = µMLEz )

(7)

Since samples are independent and gaussian, we write

Page 6: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

2 Mathematical model 6

Λ0 =

N∏i=1

1

σz√

2πe− z2

i2σ2z

N∏i=1

1

σz√

2πe− (zi−µ

MLEz )2

2σ2z

Taking logarithms and simplifying constants, we have

Λ1 = −N∑i=1

z2i2σ2

z

+

N∑i=1

(zi − µMLEz )2

2σ2z

dividing by 2σ2z and expanding (zi − µMLE

z )2 we obtain

Λ2 = −NµMLE 2

z = −

(N∑i=1

zi

)2

Finally, dividing by the constant and taking squared root (note that Λ1 is alwaysnegative or zero since Λ0 ≤ 1, since the denominator of 7 is always greater thanthe numerator by definition of maximum likelihood estimator)

Λ =

∣∣∣∣∣N∑i=1

zi

∣∣∣∣∣ (8)

Discriminant Λ is then compared with ε. Should it be smaller, null hypothesisis accepted and the system is branded consistent. Else, null hypothesis is rejected,branding the system inconsistent

Si Λ ≤ ε null hypothesis is accepted, system is consistent

Si Λ > ε null hypothesis is rejected, system is inconsistent

The most important difference with the previously described methods is thatwe are now allowed to compute the probability of false alarm (type I error) α, thatis, the probability of Λ being greater than the discriminant conditioned to z havingzero mean (inconsistency warning is set, though system is consistent)

α = p(Λ > ε|µz = 0)

Statistics of Λ can be derived from the statistics of z. According to (8), Λ isthe absolute value of a zero mean gaussian variable, with variance

√(N)σz (see

6), namely Folded Normal Distribution. The variance is a function of the ratio ρ(linear-angular speed ratio), sampling time ∆t and σx y σv standard deviations.

Applying the same principle we derive a mis-detection error bound βDet, whichmeans Λ being smaller that the discriminant given non-zero mean (readings areinconsistent but warning is not set)

βDet = p(Λ ≤ ε | |µz| > µβDet)

Page 7: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

3 Implementation 7

According to Neyman-Pearson theorem ([1]), likelihood ratio test minimizesmis-detection error once false alarm error is set, which renders the method optimalwhen such error is set by the system’s specifications.

High values of mis-detection errors are more acceptable than high values of falsealarm errors. The reason is that monitoring is done in real time (a check for eachtime instant), thus the probability of a standing type II error through k instantsis βkDet. This is the reason why a low type I (false alarm) error should be set toa small value, and then type II error be minimized. Details on how to choose thebound for the discriminant are given in the next section.

To minimize the global error, Bayesian estimation methods should be used,which requires a priori knowledge of the class probability density functions (i.e.the a priori probability for the system of being consistent/inconsistent), see [2] fordetails.

3 Implementation

3.1 Algorithm description and computational burden

The algorithm consists on building position and speed measurements vectors, andthe sample vector, to choose for system consistency/inconsistency

1. Initialize position and speed measurements vectors, and sample vector z ofsize N. Initialize the cumulative sum of speed measurements and the cumu-lative sum of samples z.

2. Refresh measurement vectors, eliminating the oldest measurement and addingthe newest one. By the same token, refresh cumulative speed measurement.

3. Compute a new sample z, according to 5. Refresh samples vector cumulativesum of samples vector z, as seen in the previous step.

4. Take absolute value of z to build discriminant Λ, according to 8, and compareit to the decision boundary ε. Set inconsistency warning if the discriminantsurpasses the decision boundary.

5. Increment time and go back to step 2.

The algorithm is O(1) regarding vector size, since the number of operationsis independent of such size. The system is therefore implementable in real timewithout burdening the process controller.

3.2 Practical considerations

Next we detail the implementation of the system in the elevation axis of the trans-elevators in the Distribution Center of Molinos Rio de La Plata S.A. located inBarracas, Buenos Aires, Argentina. Procedures for horizontal movement is analo-gous.

Linear-angular speed ration ρ is identified setting the trans-elevator to move atconstant speed to have constant movement difference and constant speed integral.

We selected ∆t = 60ms, and vector size N=20. We approximated standarddeviation of speed measurement as σv = 0.1mHz, and position measurement as

Page 8: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

3 Implementation 8

σx = 1mm.

3.3 Type I and II error selection

Using data according to the previous section, we obtained curves that allows to setfalse alarm and mis-detection errors.

Next we show false alarm error probability function, setting the decision bound-ary to ε = 0.15, which determines type I error α < 1%. For this type of error,increasing the decision boundary improves performance.

Fig. 2: Estimation of P (Λ ≥ x | H0)

Finally, we show detection error probability function, setting the same decisionboundaryε = 0.15, which determines a mis-detection error of β1seg

15cm = 0.1%. Forthis type of error, lowering the decision boundary improves performance.

Fig. 3: Estimation of P (Λ < x| HA)

It is not possible to lower both error types probabilities simultaneously. How-ever, due to Neyman-Pearson theorem, fixing one type of error minimizes the other.

Page 9: Real time detection through Generalized Likelihood Ratio ... › public › e08a6e394551c9ef...is accepted and the system is branded consistent. Else, null hypothesis is rejected,

4 Conclusions 9

In this case, selecting ε = 0.15 renders a false alarm error of α < 1% anda mis-detection lower error bound (for a displacement of 15cm) of β15cm = 50%.Recall that the probability of a detection error of a displacement over 15cm to lastover 600ms is β10

15cm = 0.1%. The value 15cm is an acceptable distance for thetrans-elevator to stop in the event of an inconsistency in the speed and positionreadings.

Test conducted on site supported the simulated results. In the event of inductedfailures regarding encoders, trans-elevators stopped safely and reported inconsis-tency warnings.

4 Conclusions

We have implemented, in real time, a GLRT strategy to detect inconsistencies inthe position and speed readings of an automated moving object, with minimumcomputational and hardware requirements. Implemented system constitutes a se-curity layer to avoid collisions, and its performance can quantified and false alarmerror adjusted to have it meet the application requirements, whereas mis-detectionerror is optimally minimized. Finally, we describe the implemented solution in thetrans-elevator system of the Distribution Center of Molinos Rio de La Plate S.A.located in Barracas, Buenos Aires, Argentina.

Acknowledgments

To Alejandro Carrasco, Engineering Manager of Industrial Systems - ABB Ar-gentina, for his assistance in the writing of the present paper.

To Juan Pablo Giuttari, Service Engineer - ABB Argentina, for his assistancein the testing process.

5 Bibliography

[1] S. Kay, Fundamental of Statistical Signal Processing Vol II Detection Theory.New Jersey: Prentice Hall, 1998.

[2] O. Duda, P. Hart, and D. Stork, Pattern Classification 2da. Ed. Nueva York:John Wiley & Sons, Inc., 2000.

[3] S. Kay, Fundamentals of statistical signal processing, volume I: Estimation the-ory. Prentice Hall, 1993.

[4] Kailath, A. H. Sayed, and Hassibi, Linear Estimation. New Jersey: PrenticeHall, 2000.