Professional Documents
Culture Documents
Pir Sensor Characterization and A Novel Localization Technique Using Pirs
Pir Sensor Characterization and A Novel Localization Technique Using Pirs
Pir Sensor Characterization and A Novel Localization Technique Using Pirs
Figure 14: Peak-to-peak amplitude vs distance at speeds Figure 15: Example of interpolation of data for M3, from
Smin = 1 kmph (top), Si = 5 kmph (middle) and Smax = 1 kmph and 5 kmph curves to obtain Sf = 3 kmph.
10 kmph (bottom).
Since we have empirical curves for various speeds, we try
to use the values from the curves directly. However, for a
speeds Si and Smax , the plot obtained is a set of bell-shaped particular speed, if we do not have an empirical curve, we
curves, but the maximum peak-to-peak amplitude Amax x for compute its value as described here. To find an intermediate
sensor Mx is less than Amaxx obtained with speed Smin for curve set for speed Sf , we interpolate the available two set of
the same sensor. Moreover, the distance at which Amax x oc- curves whose speeds are above and below Sf . For instance,
curs is not at dx anymore, but at dx + δ, where δ is a small if Sf = 3 kmph, then its curve set can be obtained by inter-
increment in distance. This means, at speed Si , the entire polation of curves of 1 kmph and 5 kmph. Figure 15 shows
reference plot is shifted to d1 + δ1 along abscissa and shifted the interpolation of two curves for sensor M4 to obtain Sf
to d2 + δ2 for speed Smax . This phenomenon is because of = 3 kmph.
the dependency between speed, distance and amplitude as For approximate distance calculation with the reference or
explained in Section 4.2. Correspondingly, the decrease in interpolated curves, we need to find the least error between
amplitude is also observed for higher speeds. These set of peak-to-peak amplitude of the signal generated by all multi-
plots obtained with speed Smin , Si and Smax are used as lens sensors. Let Apx represent the peak-to-peak amplitude
reference on the fly to localize an object if the curves for from sensor x. We utilize the Least Squares method to find
different (intermediate) speeds are not available. the least error, x,S (d), for sensor x with reference speed S
by using the following expression,
6.2.3 Signal Processing
x,S (d) = min(Apx − Ax,S (d))2
The three set of curves obtained at speeds Smin , Si and
Smax can be mathematically represented using Gaussian The expression is iterated over different distances in the
curve fitting. In order to increase the accuracy of the fit, curve from d=1 m to 2dmax (the detection range) with S =
two terms were considered. Now, each curve has the expres- Sf . The first approximation for range df is found when the
sion in the form, error is minimized.
The distance df thus obtained is considered for refining
(d − b1(S,d) )2 the speed by replacing dF oV with df . Thus, the newly found
Ax,S (d) = a1(S,d) exp(− )
c21(S,d) approximate speed is df /t. A new curve set for this speed
(d − b2(S,d) )2 has to be interpolated from the reference set of curves using
+ a2(S,d) exp(− ), Least Squares in each iteration. The process is iterated until
c22(S,d)
the distance starts diverging instead of converging or if the
where x is the multi-lens sensor (M1, M2, M3 or M4), S pre-determined maximum number of iterations is reached.
is the reference speed (Smin , Si or Smax ) and d is the dis- The algorithm for distance and speed calculation is shown
tance. Hence, Ax,S (d) gives the peak-to-peak amplitude of in Algorithm 1. We set K = 10; we observed that well
the output signal from multi-lens sensor x at distance d for within K, the algorithm converged and on few occasions it
the particular reference speed Si . The coefficients a1 , a2 , indeed diverged. A situation might occur where the mov-
b1 , b2 , c1 and c2 are the coefficients obtained from curve ing object crosses the FoV of only one spot sensor returns
fitting, which are constant for the respective curves. Con- without crossing the other. In this case, the pulse width
sidering this Gaussian fit and the coefficients, the speed of of the signal gives the time required to calculate the first
movement and the distance of the moving object from the approximated speed.
sensor tower can be estimated using Least Squares.
As soon as a movement is recorded by the spot sensors, 7. EVALUATION
the direction of movement is identified by the phase of the We evaluated the system and its behavior for different
signal. Depending on the direction of movement, the time movement scenarios. It was also necessary to evaluate how
Algorithm 1 Range estimation algorithm for controlling the amplifier gains, then it would be possible
1: procedure RangeEstimation(K) // K is the maxi- to classify and localize using the same sensor tower, though
mum number of iterations for computing the range one after the other. In this case, all the sensors will have
2: dF oV ← 4 //in m equal amplifier gain for ranging larger distance in the be-
3: t ← time between two pulses ginning. As soon as an object is detected within the range,
4: S ← dF oV /t we can classify the object. Immediately after classification,
5: R1 ← Find range using curves (as in Sec. 6.2.3) zones can be created by changing the gains via digital po-
6: i←1 tentiometer for localization. In this manner, a single sensor
7: repeat tower could switch between classification and localization
8: Si ← Ri /t when a software controlled potentiometer is used for gain
9: Ri+1 ← Find range using curves with Si adjustments.
10: if Ri+1 −Ri < threshold then
11: return Ri 7.1.1 Zone creation
12: i←i+1 Since we wanted to have a higher resolution of localization,
13: until i ==K we chose an inter-zonal distance of 1 m. Therefore, the gains
14: return Ri+1 for sensors M1, M2, M3 and M4 were set so that they gen-
erate maximum peak-to-peak amplitude at 2 m, 3 m, 4 m
and 1 m respectively at speed Smin . Since M3 covered the
well the sensor tower can locate an object even in the pres- largest range of 4 m, both the towers were placed at 4 m dis-
ence of obstacles. Hence, the experiment was conducted in tance from the center point (4 m, 4 m) in the area of inter-
a classroom as it contained many desks and benches as ob- est. The maximum distance until which localization could
stacles. We explain the scenarios and our evaluation in this be achieved was at 2dmax = 8 m from each tower as M3 can
section. sense until 2dmax .