0004d98l/84
$3.00 + 0.00
Q 1984 Perymon
Press td.
LETTER TO THE EDITORS A ROUTINE TO COMPUTE MEAN AND STANDARD DEVIA~ON FLUCTUATING WIND DIRECTION (First
received 28
April
OF
1983 and receivedfor publication 18 August 1983)
Abstract-A computer routine schematic, developed for use with micro-processor to compute mean wind direction and standard deviation of fluctuations in wind direction, is described. The main feature of the routine is overcoming of the ‘gap’ problem which arises due to discontinuity in the potentiometer of the wind vane. t. INTRODUCTION In the past, various instrumental systems have been devised for obtaining directly mean wind direction (8) and standard deviation (a#) of wind direction fluctuations needed in air pollution meteorology. Different kinds of systems/schemes have been put forward to overcome the difficulties arising from the potentiometric gap between 0 and 360’ (see, e.g. Bock and Provine, 1962; Harris and McCormick, 1963; Jones, 1965; Sachdev and Rawlani, 1968; Jones, 1970; Fritchen and Hinshaw, 1972; Civitano and Longhetto, 1973; Camuffo, 1974; Camuffo and Dengri, 1976; Verrall and Williams, 1982). With the advent of computers and microprocessors it is possible to solve the problem via software by processing the signals from standard potentiometric transducers. In this communication we present a logical computer routine for the same.
Let the following quantities corresponding to the situation at the end of Nth reading be defined. We shall designate the reading X if it fails in the eastern sector and Y if it falls in the western sector. R, N, + RaN,
X=
y=
R3N3
Let the 360” of the potentiometer be divided into four nonoverlapping quadrants Qj, Q2, Qa and Q4 and the potentiometric gap point to the north,as usual. A reading will fall into one of these quadrants. Let two memory locations be assigned to each quadrant for storing the number of readings Ni (i = 1 . , .4) and the average of readings Ri (i = 1 . . . 4). Let two common locations be provided to store 8, = mean of all the readings and S = mean of square of the readings. (Instead of averages, the sum of the readings can be stored, however this can lead to overflow problem). As soon as the reading is assigned to a given quadrant, the average of the readings and of square are updated using the relation Iy =(n-lK+Xn (1) n n where x” is the average of n readings or of the square of the readings as the case may be. Suppose we examine the contents of the quadrant memos locations when Nth value of direction is read. Depending upon the mean direction and the extent of fluctuations, some of the locations may be non-zeroand others empty (zero). The following non-zero combinations are possible. N,, N,, NJ, N,, N,N,, N,N,N,,
NzN,Nlr
N,N,, NjNd, N,N,.
N3N4Nlr N,NIN2 and N,NIN,N,.
The cross-over of the potentiometer gap is possible only if both Nt and N4 are non-zero simultaneously and the gap problem arises if this is so. We shall call this the cross-over condition. For the remaining combinations ordinary arithmetic routine is valid (There is a small probability that both N, and N. are non-zero, yet the cross-over has not occurred due to all direction changes occurring through south. This case will be considered later). 473
+ RIMI =
mean of the readings in the western
N3+N4
half circle N, = N, + N, + N, + N, = total number of readings in an averaging period 8, = mean of all the readings. Of the above variables, locations are needed for Tpand Mean
2. COMPUTER ROUTINE
= mean of the readings in the eastern
N,+Nz half circle
a,.
wind dire&on
As mentions earlier if the cross-over condition is not satisfied (i.e. N, and N, are simultaneously non zero) then 8= P”. If the cross-over condition is satisfied, then for every crossover we must either add 360” to the eastern sector readings or subtract 360” from the western sector readings for extending the linear range. We shall adopt the latter method. Now the mean N,+Nz N,+N, -6;
1
xi+$
c
i=, While the true mean N,+Nl a=kC
(2)
N,+N, xi+k
i=S
B=8._3@!$!$
i.e.
q.
i=,
1
(K-360)
(3)
i--t
(4)
This gives the correct location of the mean. IfBis negative then to bring the value within O-340 range we add 360” to the negative value, which can be written as #a) ~CORRECTED = T+ 360 In a serialised processing it is, therefore, necessary to check for the cross-over condition after the input of every reading and accordingly choose the appropriate path for computing and updating the mean. Standard R
deviation
Standard deviation, u, may be computed from the values of and S using the relation == = xi-a2 (5)
414
L061C i SELCCIION: FOR : CANDY ):
\-..J
FLOW
CHAR7
Fig. 1. Flow chart of computer routine for mean and standard deviatton
where the bar indicates the average. If the cross-over condition is not satisfied then
REFERENCES
u: = s-p,.
(6)
In case of cross-over the appropriate relation is
h’, + til 1 0;
=
-NT
N,+h’.
I= I
(Xi
[C
-4.y
+
,‘I
(v,
-360)-n
11
II ’
(7)
Brock F. V. and Provine D. J. (1962) A s:andard deviation computer. J. appl. Met. I, 81-90. Camuffo D. (1974) How to obtain mean valueand variance of wind direction by using a sine-cosine transducers. Atmospheric Encironmenr 10, 169- 173. CamutTo D. and Dengri A. (I 976) A method for measurement of mean wind direction with the use of standard deviation potentiometric transducers. Armospheric Enuironmenf 10, 415.
which using (4) simplifies to u; = S -8:
+ (360)’
+
Civitano L. and Longhetto A. (1973) A liquid-suspensron. high sensitivity anemograph. Atmospheric Enoironmenr 7,
W, + N,)(N, + N,) N; 720(N,
12851289.
--
+ N,) (B, - 7).
(8)
NT
Under special case where all the quadrants (N,, N,, N,, N,) are non zero then the question would arise whether the cross-over did occur or not. A test may be given to seewhether N, + Ns > N, + N,. If this is so then the average direction is definitely towards 180” and the cross-over relation need not be used. This test is also necessary after each input. The methodology of the routine is depicted in the Row chart (Fig. I). He&r
Physics Division
Ehobho Atomic Research Cenrre Bombay 400085, India
R.
SUNDARESAN
v. v. SHIRVAIKAR
Fritchen L. J. and Hinshaw R. (1972) A reed swatch anemometer. J. uppl. Me:. Il. 742-744. Harris E. K. and McCormick R. A. (1963) A stmple procedure for estimating the standard deviation of wind fluctuation. J. appl. Met. 2, 804-805. Jones J. I. P. (1965) A portable sensitive anemometer wrth proportional d.c. output and a matching wind velocitycomponent resolver. J. s&w. Insrrum. 42. 414417. Jones J. I. P. (1970) A new recording wind vane. J. ofPhy. E: Scienr. Insrrum. 3. 9-14. Sachdev R. N. and Rawlam P. B. (1968) Turbulence statrstics studiesat Trombay with a new wind system.J. oppl. Mer. 7. 981-985. Verrall K. A. and Williams R. L. (1982). A method fbr estimating the standard devratton of wind drrecttons. J. appl. Met.
21, 1922 -1925.