Distributed Sensor Network for meteorological observations and numerical weather Prediction Calculations
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
A. Vas et al. / Carpathian Journal of Electronic and Computer Engineering 6/1 (2013) 56-63 56 ________________________________________________________________________________________________________ Distributed Sensor Network for meteorological observations and numerical weather Prediction Calculations Ádám Vas Ádám Fazekas University of Debrecen, Faculty of Science and Technology, University of Debrecen, Faculty of Informatics, Department of Meteorology Department of Informatics Systems and Networks Debrecen, Hungary Debrecen, Hungary vas.adam@inbox.com fazekas.adam@inf.unideb.hu Gábor Nagy, László Tóth SciTech Műszer Kft. Debrecen, Hungary nagyg2000@t-online.hu, laszlo.toth@scitechmuszer.com Abstract—The prediction of weather generally means the one. Apparently, finding a perfect analogue for an event in the solution of differential equations on the base of the measured past had low probability which made this technique difficult to initial conditions where the data of close and distant neighboring use. points are used for the calculations. It requires the maintenance of expensive weather stations and supercomputers. However, if The first weather prediction based on physical equations weather stations are not only capable of measuring but can also and numerical calculation was made by Richardson [3] in the communicate with each other, then these smart sensors can also first decades of the 20th century. The complexity of numerical be applied to run forecasting calculations. This applies the weather prediction models started to increase significantly highest possible level of parallelization without the collection of when the Electronic Numerical Integrator and Computer measured data into one place. Furthermore, if more nodes are (ENIAC) was announced and the modeling work by J. involved, the result becomes more accurate, but the computing Charney, R. Fjørtoft and J. von Neumann (CFvN) [4] started. power required from one node does not increase. Our Distributed As computers grew in power and capacity, it became possible Sensor Network for meteorological sensing and numerical to run more complex mathematical models involving denser weather Prediction Calculations (DSN-PC) can be applied in initial data in space and time [2]. several different areas where sensing and numerical calculations, even the solution of differential equations, are needed. Since the number of measurement points and observed parameters nowadays are relatively large and continuously Keywords— distributed sensor network; meteorological grow, as well as the complexity of the models, the weather sensing; numerical weather prediction forecasting calculations require more and more expensive supercomputers, although modern weather sensors are already I. INTRODUCTION equipped with a digital central unit (microprocessor (µP), Meteorology is strongly influenced by scientific and microcontroller (µC), Digital Signal Processor (DSP), Field technological developments, which is especially true in the Programmable Gate Array (FPGA)), which represents a case of weather forecasting. The improvements of significant computation power currently utilized “only” for thermodynamics helped to recognize that the solution of filtering the measured values and sending them to a central equations of hydro- and thermodynamics as well as continuity computer. with five initial variables (pressure (mbar), temperature (°K), The central computer could be eliminated or greatly density (kg/m3), humidity (%), velocity (m/s)) are feasible to simplified with our method of forecast calculations where the be used for successful weather forecasting calculations [1],[2]. nodes are connected to each other through the Internet; However, the fast collection of weather data reports from therefore, it is not needed to collect data and make the wide areas became possible only after the invention of electric calculation at one location. These nodes can communicate telegraph in 1835. Because of the lack of known physical and with each other and make numerical finite difference or finite mathematical models as well as proper computing element calculations based on their close and distant instruments, forecasting was based on a visual pattern neighbors’ data. This grid itself forms the sensor network and recognition method where a previous similar weather situation a distributed computing system, which can be used for solving and the subsequent one were used to predict the upcoming differential equations without using a central computer, so it ISSN 1844 – 9689 http://cjece.ubm.ro
A. Vas et al. / Carpathian Journal of Electronic and Computer Engineering 6/1 (2013) 56-63 57 ________________________________________________________________________________________________________ can function as a multiprocessor system with extremely high In CFvN calculations the spherical Earth was mapped by number of computational units, making the highest level of polar stereographic projection onto a rectangular plane (Fig. 2) parallelization of the calculations possible. with sides of Lx and Ly, then a rectangular grid was created and defined by the coordinates of In such a system by increasing the number of nodes for getting better covered field and therefore more accurate calculations the computing power required by one node does Lx Ly x i, y j not increase, since they use their close and distant neighbors’ p q data only (Fig. 1). The nodes can also be placed on the board of moving vehicles i.e. ships and airplanes for monitoring i 0, ..., p; j 0, ..., q even the vertical parameters. Our work of developing DSN-PC started five years ago where [5],[6],[7],[8],[9],[10], and here we present the latest results. II. THE ENIAC FORECAST AND ITS IMPLEMENTATION ON Lx L y s (2) DSN-PC p q Earlier it was shown that our µC based networked sensor system is able to do both meteorological sensing and making and s=736 km at the North Pole (494 km at 20°N), λ=8° calculations simultaneously. These calculations involved of longitude at =45°N. determining isotherm lines, temperature gradient vectors and solving the differential equation of heat transfer by applying During the following calculations, according to CFvN, the finite difference method (FDM) based on communication next notations are used: between nodes [9]. For demonstrating the functionality and capability of our method and networked system also for cos r (3) simple weather prediction calculations, the well-known first 1 sin successful 24 hour weather prediction algorithm for large- scale motions in barotropic atmosphere, developed by CFvN dr 2 and run on the ENIAC, was applied. Here the CFvN solution m 2 1 r2 (4) of finite difference linearized barotropic vorticity equations is d 1 sin also shown. Although it was used for calculating predictions for the 500 mbar geopotential heights and its input data set 1 r2 differs from that of our DSN-PC stations can provide (ground f 2 sin 2 (5) level pressure (mbar), temperature (°C) and relative humidity 1 r2 (%)) at the present, by applying CFvN calculations we could show the capability of our system of realizing such kind of gm 2 calculations. We are working on development of new and h (6) more sophisticated weather prediction algorithms for DSN- f PC. Fig. 1. The conception of DSN-PC sensor network, which forms the necessary grid for numerical calculations by using the nodes of the networked sensor stations not only for measurements and collection of data but for making numerical calculations in a distributed way. The networked weather stations (nodes) are able to communicate with their close and distant neighbors through the Internet and solve weather prediction calculations. In the present work we applied FDM on a rectangular grid (Left) but the calculations can also be done by Finite Elements Method (FEM) on irregular grid (Right). ISSN 1844 – 9689 http://cjece.ubm.ro
A. Vas et al. / Carpathian Journal of Electronic and Computer Engineering 6/1 (2013) 56-63 58 ________________________________________________________________________________________________________ z is the geopotential height of the 500 mbar level. The ° 90 E initial data were taken from the 500 mbar analyses of ° 120 E 60 ° E the U.S. Weather Bureau [4]. In our case the interpolated data for the initial values of z at the grid points were taken from [11]. ° 150 E 30 ° E is the absolute vorticity. the hij and fij parameters are independent of t and have to be calculated only once for each node. the Poisson equation: ° ° ° 0° 20 N 40 N 60 ° N 80 ° N ° 180 E 0 z 1 z z ij 2 t s t i 1, j t i 1, j (11) z z z 150 ° W ° 30 W 4 t i , j 1 t i , j 1 t ij ° ° the Jacobi operator: 120 W 60 W ° 90 W 1 J ij , z i 1, j i 1, j z i , j 1 z i , j 1 4s 2 Fig. 2. Stereographic projection of the northern hemisphere and the 16×19 rectangular grid structure for CFvN calculations. (12) i, j 1 i , j 1 z i 1, j z i 1, j where is the geographical latitude. z The boundary conditions for are: r is the distance from the pole on the stereographic t projection map. The radius of the equator on the map was chosen as the unit of distance. z z z z 0 (13) m is the magnification factor of the polar stereographic t 0 j t pj t i 0 t iq projection. f is the Coriolis parameter. i 0, ..., p; j 0, ..., q is the angular velocity of Earth’s rotation which means the geopotential height is considered to be (=2π(24·60·60)-1 rad/s). constant at the boundaries during the term of prediction. g is the gravitational constant (g=9.80665 m/s2). However, the boundary values of are different in cases The finite difference vorticity equations of CFvN that have t ij been implemented in our system are the following: when the fluid is entering or leaving the investigated area. In ij hij ij f ij (7) the first case 0 and in the second case can be ij t t ij calculated by linear extrapolation from the interior value of ij J ij , z (8) and z: t z ij 0 : 2 ij (9) 0 j t 1 j t 2 j t t t i 0 : z 0, j 1 z 0, j 1 (14) 0 : 0 t 0 j where ij z ij (10) This equation is used for the calculation of ij in the first step of the iteration while in the following steps (24) is used. ISSN 1844 – 9689 http://cjece.ubm.ro
A. Vas et al. / Carpathian Journal of Electronic and Computer Engineering 6/1 (2013) 56-63 59 ________________________________________________________________________________________________________ 3) ( 7 ) z ij ( 10 ) ij ( ij ( 12 ) 0 : 2 pj t p 1, j t p 2, j t n times iteration i p : z p, j 1 z p , j 1 of (8),( 9 ),(11) (19) z 0 : 0 J ij , z for the whole field t pj t ij (15) At the first step on the border nodes ij are extrapolated similarly to (14)-(17): 0 : 2 i 0 : 0 j 21 j 2 j (20) j 0 : z i -1,0 z i 1, 0 t i0 i1 t i 2 t (16) 0 : 0 i p : pj 2 p 1, j p 2, j (21) t i 0 j 0 : i 0 2 i1 i 2 (22) 0 : 2 t iq t i , q 1 t i , q 2 j q : z i 1, q z i 1, q j q : iq 2 i ,q 1 i ,q 2 (23) 0 : 0 t iq During this procedure the nodes are communicating with their neighbors, exchanging data and solving the differential (17) equation by applying finite difference scheme (19). Since the iterative solution of the finite difference scheme can be i 0, ..., p; j 0, ..., q explained as the propagation of disturbances in the field of the investigated area, the data change and the finite difference The corner points are not taken into consideration. iteration parts of the calculation for the different nodes in our case can happen not only in a regular way, but even randomly. In a worldwide network of DSN-PC the boundary condition may not necessarily be defined in the above way z When and are determined from (11) and since the nodes of the network will provide them t ij t ij automatically through their directly measured and calculated data. (12), the time extrapolation can be done using the next equations [4]: z The explicit solution for shown in [4] that was t ij ij t 0 t ij t 0 t t 0 more suitable for the ENIAC calculation procedure, and is t ij given by four one-dimensional Fourier transforms: ij t t ij t t 2t t (24) t ij z s 2 p 1 q 1 p 1 q 1 t ij pq z zij t0 t zij t 0 t t 0 l 1 m 1 r 1 s 1 2 l m 1 t ij sin sin 2 (18) 2p 2q t rs z zij t t zij t t 2t t (25) lr ms li mj t ij sin sin sin sin p q p q These calculations have to be repeated 24 times for the However, in our system this method would require from whole forecast period and the solution can be found iteratively each DSN-PC node to collect data from all the other nodes of z the investigated area, which would be difficult and would by solving for and extrapolating the motion forward in t ij require large memory and processor capacities. Therefore, in our system an iterative solution, calculated in a distributed time with the suitable boundary conditions. The flowchart of way by the µC based nodes, was applied, that consists of the the algorithm is shown in Fig. 3. Initial steps including the next steps: calculation of the geographical parameters are omitted for better readability. ISSN 1844 – 9689 http://cjece.ubm.ro
A. Vas et al. / Carpathian Journal of Electronic and Computer Engineering 6/1 (2013) 56-63 60 ________________________________________________________________________________________________________ Calculate predicted geopotential height (z) Calculate η (7) Node inner position ? border Node inner position ? border Wait until inner nodes Get z and η from neighbors Wait until inner nodes finish calculation of ∂ξ/∂t Get z from neighbors finish calculation of ξ Calculate ∂ξ/∂t (12) Get z from 2 border neighbors Get ξ from 2 inner neighbors Calculate ξ (10) counter=0 Check condition
A. Vas et al. / Carpathian Journal of Electronic and Computer Engineering 6/1 (2013) 56-63 61 ________________________________________________________________________________________________________ Fig. 5. The test environment with 3 real weather stations connected to each Fig. 4. Our prototype DSN-PC station [9]. other and to the simulated environment through an Ethernet switch. For better understanding, the 16×19 rectangular grid (Fig. 2) is represented on grid paper. B. Software on the DSN-PC panel For embedded software development we used MPLAB X, IV. RESULTS an integrated development environment from Microchip and The initial observed data of the 500 mbar geopotential the TCP/IP Stack library, which includes the source code of height is represented on the map of Fig. 6, and the map of the many network communication protocols. 24 hour later observed data is shown in Fig. 7. The necessary Based on that library, the most important parts of our data in both cases are the same as they were in the original software are the UDP servers and clients responsible for the CFvN calculations and are taken from [11]. The original communication between the stations over the network. UDP is solution on the ENIAC [4] as well as P. Lynch’s currently preferred to TCP because the PIC18F67J60 μCs only demonstrations on MATLAB and mobile phone [11],[12],[13] have 4 kB of data memory, and UDP requires significantly all apply (18). However, in our DSN-PC system, the less memory. application of the iterative method (19) is more suitable, since for one node it is sufficient to know the necessary data of their Previously three calculation methods have been close and distant neighbors, and do not need to collect and implemented such as temperature gradients, isotherms and the store the whole data set from all the other nodes of the solution of heat transfer equation by FDM [9]. Since we do investigated area. The result of the 24 hour geopotential height not have our own forecast algorithm for DSN-PC yet, but we CFvN prediction calculation by our DSN-PC system, which wanted to show its capability making not only simple applies (19) can be seen in Fig. 8. calculations and solving the simple heat transfer equation but solving more difficult differential equations related to weather It agrees well with the previous results (Fig. 9) prediction calculations; the well-known first successful [4],[11],[12],[13], and the difference between those and ours method of CFvN was implemented. are negligible (Fig. 10), which shows that our method and a DSN-PC-like system may have to be applied for making more As soon as the final system is available, an efficient way of sophisticated weather prediction calculations in the future. firmware (FW) updates is going to be essential, especially in the early phase of the development. The FW update V. CONCLUSION mechanism needs a boot loader, which is able to download a new version of FW if available and apply the update. It is On the base of our conception we succeeded to design and important to guarantee that a corrupted communication cannot develop instruments and architecture, as well as to build the prevent the boot loader from getting back to normal operation. prototype of a meteorological Network for Sensing and Microchip’s Library for Applications contains a demo numerical weather Prediction Calculations (DSN-PC). As it application called Internet Bootloader which fits our was shown earlier, the present system is capable of sensing requirements. Based on that demo a customized version was temperature, pressure and humidity besides calculating made, which is integrated with a symmetric encryption isotherms, temperature gradients and solving simple numerical method based on XTEA cipher for increased security. The differential equations like heat transfer by the method of finite boot loader application is based on a TFTP server, listening differences [9]. The system is working through the Internet, for incoming connection on UDP port 69. In the case of an where the nodes receive the measured parameters from their incoming connection the server waits for incoming data from close and distant neighbors and make the necessary the client and downloads the new FW. For easier usability we calculations. Here the conception and structure of DSN-PC are working on a TFTP client based version, so it will be able was described, furthermore the implementation of the well- to automatically check for a new version on an update server, known finite-difference vorticity equations of CFvN on our download the new FW and reprogram the µC. system is shown to demonstrate its capability of making simple weather prediction calculations in a test environment. ISSN 1844 – 9689 http://cjece.ubm.ro
A. Vas et al. / Carpathian Journal of Electronic and Computer Engineering 6/1 (2013) 56-63 62 ________________________________________________________________________________________________________ 5000 5000 5600 5405200 560 5400 56 5000 520540 00 5600 0 0 0 4800 480 00 5600 0 00 560 5400 00 52 0 500 50 0 0 52 50 5000 00 00 50 5600 0 5600 54050200 520 5400 5205 5000 56 5600 540 0 5200 400 5200 00 5200 0 5400 5600 5800 56 800 5400 5400 5800 00 5600 00 5800 52 5600 800 5600 0 5600 5460000 0 5 56 5400 0 5800 5800 580 0 0 580 5800 5800 5800 5800 0 56 5800 5800 5800 Fig. 7. The final observed 500 mbar geopotential height weather map (24 hours later) [4],[11],[12]. Fig.6. The initial observed 500 mbar geopotential height weather map as the input of CFvN calculations [4],[11],[12]. developing new stations with extended sensor capabilities, increased measurement accuracy and Although the present system consists of only 3 stations and improved networking functions such as applying GPS the other nodes of the applied virtual field are simulated, it receiver and long range radiowave or GSM connection. was possible to investigate several different hardware configurations, the applied algorithms and software as well as at the present a central computer is needed to help the to get sufficient experiences for further developments of our nodes to find their neighbors when a new node is DSN-PC system. Some of the further possibilities are: introduced to the system, that could be eliminated by applying a neighbor discovery algorithm running on developing modern suitable weather prediction the stations. algorithms (i.e. method of finite elements with irregular net) for DSN-PC. using the system not only for weather sensing and prediction but also for other FDM/FEM systems. applying it in short-term regional weather forecast or urban climate and heat island analysis. applying forecast calculation methods on mobile phones equipped with i.e. air pressure sensors. increasing the order of calculations. involving vertical data in the calculations. 560 540 5000 56 5200 0 0 4800 00 5000 5600 5600 5200 5000 5400 54 4800 56 5600 5000 00 00 5400 56 5000 56 00 00 5 6 0 0 00 52 0 0 52 5400 6 00 5 0 5 200 5600 0 54005200 58 00 580 5600 5400 58 5600 58 0 5200 5400 5400 00 58 5600 58 5 6 00 00 5400 00 8 0 0 5 600 560 0 5 5400 00 00 580 0 5 8 56 00 0 560 580 800 58 0 58 5800 5800 5800 00 5800 Fig. 8. The result of 24 hour 500 mbar geopotential height CFvN weather Fig. 9. The result of 24 hour 500 mbar geopotential height CFvN weather prediction calculation by using the iterative solution (19) and our prototype prediction calculation by using (18) and P. Lynch’s open source MATLAB DSN-PC system in the test environment. code [11],[12]. ISSN 1844 – 9689 http://cjece.ubm.ro
A. Vas et al. / Carpathian Journal of Electronic and Computer Engineering 6/1 (2013) 56-63 63 ________________________________________________________________________________________________________ 0 0.20 0 0 −0.20 0 ACKNOWLEDGMENT 0.4 0.2 −0.4 0.2 −0. 0 −0− The authors wish to thank SciTech Műszer Kft. for 0 2 0 .2 − .4 providing the possibility to use their facilities and for 0 − 0.6 0.4 0.2 supporting our work financially. 4 6 0.4 −0. −0. .8 0 0.6 REFERENCES −0 0 −0.2 −0.2 0 [1] F.G. Shuman, “Weather prediction,” U.S. Department of Commerce 0.6 −1 National Oceanic and Atmospheric Administration, National Weather 0.2 0.4 0.2 Service, Washington, Office Note 198, 1979. 0 −0 0 .6 [2] P. Lynch, “The origins of computer weather prediction and climate −0.4 0 −0 modeling”, J. Computational Physics, vol. 227, no. 7, pp. 3431-3444, −1 .8 2008. .8 −0.4 −0.2 −0 [3] L.F. Richardson, Weather prediction by numerical process, Cambridge: −0.8 −0.6 0 0 Cambridge University Press, 1922. −0.4 [4] J.G. Charney, R. Fjørtoft and J. von Neumann, “Numerical integration −0.2 −0.6 of the barotropic vorticity equation," Tellus, vol. 2, pp. 237-254, 1950. −0.4 −0.4 −0.2 [5] B. Simon and G. Pásztor, “Mikrokontrolleren alapuló időjárás előrejelző 0 −0.2 −0.2 hálózat,” B.S. thesis, Faculty of Informatics, University of Debrecen, Debrecen, Hungary, 2010. 0 0 0 0 0 0 [6] B. Kulcsár and D. Virág, “Mikrokontrolleren alapuló időjárás előrejelző Fig. 10. The differences between the results of 24 hour 500 mbar geopotential hálózat,” B.S. thesis, Faculty of Informatics, University of Debrecen, height CFvN weather prediction calculation by using (18) on a single Debrecen, Hungary, 2011. computer [11],[12] and the iterative solution of (19) by our prototype DSN-PC [7] B. Ferenc, “Rendszerfrissítő alkalamzás mikrokontrolleren alapuló system in a test environment. időjárás-előrejelző rendszerhez,” B.S. thesis, Faculty of Informatics, University of Debrecen, Debrecen, Hungary, 2012. The DSN-PC practically simulates the interactions of the [8] G. Csizmadia, “Hálózati alkalmazás fejlesztése meteorológiai real world where the stations are placed in the nodes of a rendszerhez,” B.S. thesis, Faculty of Informatics, University of regular or irregular net, stretched physically on the surface of Debrecen, Debrecen, Hungary, 2012. the Earth for sensing, communicating with each other and [9] Á. Vas, Á. Fazekas, B. Lehotai, G. Nagy and L. Tóth, “Microcontroller- based network for meteorological sensing and weather forecast making numerical prediction calculations. It can quasi calculations,” Carpathian Journal of Electronic and Computer simulate reality and make predictions, since the velocity of the Engineering, vol. 5, pp. 139-142, 2012. spreading of disturbances during the regular or randomly made [10] Á. Vas, “Mikrokontroller-alapú időjárás-előrejelző hálózat építése,” steps of numerical calculations through the network is faster M.S. thesis, Faculty of Informatics, University of Debrecen, Debrecen, than it is in the case of the real world; that makes the system Hungary, 2013. being capable of prediction calculations. [11] P. Lynch. (2008, February). The ENIAC Integrations [Online]. Available: http://mathsci.ucd.ie/~plynch/eniac Since there are a lot of possibilities for further [12] P. Lynch, “The ENIAC forecasts: A re-creation,” Bull. Amer. Meteor. developments in many fields (meteorology, electronics, Soc., vol. 89, no. 1, pp. 45-55, 2008. embedded hardware/software systems, networking, [13] P. Lynch and O. Lynch, “Forecasts by PHONIAC,” Weather, vol. 63, mathematics, physics, …) of interest related to DSN-PC and it no. 11, pp. 324-326, 2008. can be applied in different research and university programs, we make the circuit diagram of our present DSN-PC station the embedded software of measurements, Ethernet communication, existing calculations etc. the Java software of DSN-PC simulation environment freely available on http://www.scitechmuszer.com for non- commercial developments and university programs; furthermore, we are open for future cooperation. ISSN 1844 – 9689 http://cjece.ubm.ro
You can also read