SciELO - Scientific Electronic Library Online

 
vol.6 número3Composición y diversidad de especies arbóreas en transectos de localidades del bosque siempreverde de tierras bajas del EcuadorIndicadores de contaminación visual y sus efectos en la población índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados

Revista

Articulo

Indicadores

Links relacionados

  • No hay articulos similaresSimilares en SciELO

Compartir


Enfoque UTE

versión On-line ISSN 1390-6542versión impresa ISSN 1390-9363

Enfoque UTE vol.6 no.3 Quito jul./sep. 2015

https://doi.org/10.29019/enfoqueute.v6n3.73 

Ingeniería General

Real-Time Embedded Control System for a Portable Meteorological Station

Sistema de Control Embebido en Tiempo Real para una Estación Meteorológica Portátil

Marcelo Moya1 

Gonzalo Guerrón1 

Andrés Montero1 

1 National Institute of Energy Efficiency and Renewable Energy (INER), Quito - Ecuador marcelo.moyal@iner.gob.ec, gonzalo.guerron@iner.gob.ec, andres.montero@iner.gob.ec


Abstract:

The aim of this work is to design and code an embedded system for a portable automatic weather station. The portable station includes high performance sensors to measure parameters such as: i) wind speed and direction, micro perturbations and wind gusts, ii) air temperature, iii) solar radiation, iv) relative humidity, and v) atmospheric pressure. The main contribution of this work is the development of an embedded control system operating in real time. This system is based on a Field Programmable Gate Array (FPGA) device. The method developed guarantees high-resolution data acquisition of a number of samples in real time. The samples obtained are grouped and stored in a database, which will be used as a starting point for further analysis.

Keywords: FPGA; Real Time; embedded; FIFO; resolution; meteorology; Butterworth.

Resumen:

El objetivo de este trabajo es diseñar y programar un sistema embebido para una estación meteorológica automática portátil. La estación portátil incluye sensores de alto rendimiento para medir parámetros tales como: i) la velocidad y dirección del viento, micro perturbaciones y ráfagas de viento, ii) la temperatura del aire, iii) la radiación solar, iv) la humedad relativa, y v) la presión atmosférica. La principal contribución de este trabajo es el desarrollo de un sistema de control embebido que opera en tiempo real. Este sistema se basa en un sistema de compuertas lógicas programables en campo (FPGA). El método propuesto garantiza la adquisición de datos a alta resolución de un número de muestras en tiempo real. Las muestras obtenidas se agrupan y se almacenan en una base de datos, que será utilizado como punto de partida para su posterior análisis.

Palabras clave: FPGA; Tiempo Real; embebido; FIFO; meteorología; Butterworth.

1. Introduction

Ecuador faces the lack of high quality meteorological data due to the outdated equipment and obsolete methods for data analysis. In order to solve this problem, the National Institute of Meteorology and Hydrology (INAMHI) is implementing a campaign for replacing conventional weather stations with new equipment; however, the replacement cannot be completed in a short period of time covering the whole country. It is also imperative to include data transmission devices in most of the new stations, to have a faster access to collected data and to analyze data through new control methods.

According to INAMHI (), the national network of weather stations counts with 519 meteorological stations in Ecuador, of which 41% use pluviometers, a 29% of the stations are employed for climatology, and a merely 2% are used for agro meteorological research (13 stations). It is important to emphasize that an important public network of automatic meteorological stations exists at the south of the country, in the provinces of Loja, El Oro and Zamora Chinchipe. Unfortunately most of these stations are out of service, in technical obsolescence state, or they are insufficient for satisfying the country needs.

According to Popa (2011) there are a variety of solutions for climate monitoring. The classic solution consists of static meteorological stations that collect data and later to submit data by wired systems to a main station. The problem with this approach is that it needs constant maintenance and supervision. Another solution is based on a network of wireless sensors that are placed in the desired zone. These devices collect all the weather information and then transmit it to the main base.

The most common way of monitoring meteorological variables is through the use of Automatic Weather Stations (AWS) (Abbate, Avvenuti, Carturan, & Cesarini, 2013), which can be used as main platform for wireless sensors networks. With the improvement of research and development in automatic static meteorological stations, manual stations are gradually transforming into manual and automatic stations that can be operated easily (Jian-Ming Li, 2010). Zhen Fang (2010) proposed a practical and economical solution that consists of a micro station that is portable, has a small size, and brings several other benefits.

The system presented in this paper is based on Field Programmable Gate Array (FPGA) devices, which allow programing based on logical blocks. These elements permit high-level parallel processing and analysis of different meteorological parameters. A 16-bit analog input/output central processing unit (CPU) was used for that purpose. The control program, that includes filtering and signal scaling through FPGA devices, was developed in LabVIEW. This method guarantees high-resolution and a big number of samples on the data acquisition in real time. These samples are grouped and stored in a database, which is used as a starting point for further analysis according to the methodology which will be established in the Section 3.1.

This paper presents in Section 2 basic definitions on FPGAs and real-time control. Section 3 provides technical details of the proposed solution. In Section 4, preliminary results and implementation aspects are covered. Finally, the article concludes with future work.

2. Methodology

Embedded systems use automation specific functions based on programmable CPUs. The programming of these systems can be done with different development tools. This section provides the basis of these tools.

2.1. Field programmable gate array

A Field Programmable Gate Array (FPGA) consists of a combinational array of interconnected logic gates that can be configured after manufacturing hence field programmable. The FPGA configuration is generally specified using a hardware description language (HDL), similar to that used for an application-specific integrated circuit (ASIC). The digitally generated program reorders physically the logic gates to obtain the required configuration once its compile.

The gates are connected to Look Up Tables (LUT) which are used to save processing time. Jointly with the shift register and multiplexors, specialized high performance circuits can be developed, heavily depending of the amount of combinational gates contained in the FPGA cells.

The current development of FPGAs technology focuses on the implementation of dedicated functions such as: RAM memory management, signal processing blocks of high performance, high speed memory interface, and logical blocks with arithmetic and control specific functions.

2.2. Real time control systems

The development of real-time systems allows to handling big amounts of data at high speed for information processing, and for improving the system response, either in control and problem solving (Giannone et al., 2011). The real time processor provides determinism in the sense that the system is enabled to determine or predict with precision whether the program blocks are executed, obtaining as a result a dedicated system for specific applications (Salzmann, Gillet, & Huguenin, 2000).

The LabVIEW real time (RT) processors use a FPGA to perform the data acquisition. These RT processors are able to use all their resources in data treatment. This is possible since each FPGA data input is configured to create First in First out (FIFO) data storage buffer which are transmitted to the processor’s memory, and processed (Zheng, Liu, Zhang, Zhuang, & Yuan, 2014). Figure 1 shows a simplified embedded system diagram for data acquisition using FPGA and RT.

2.3. Embedded control system operating in real time

The block diagram shown in Figure 2 represents the internal operation of the control system, data acquisition and data base storage. It also describes the interrelationships between the memory blocks and the data buses. An embedded system that works with low energy consumption is created to ensure continuous operation and no human supervision.

The hardware configuration is mainly conformed by an embedded system based in two technologies: i) Field Programmable Gate Arrays (FPGA) for high speed data acquisition, and ii) real time processing (RT) for data administration.

The data acquisition is done through one analogic module and one digital module, and each module performs the analog-digital conversion required by the FPGA. Through a Peripheral Component Interconnect (PCI) data bus, the FPGA communicates with the real time processor (RT). This acquires the data from the FIFO and converts them into a double data type format achieving the format needed to perform logical operations. Wind ultrasonic sensor connects to RT using RS-232 protocol, and the sampling is made every second.

Fig. 1: Embedded system for data acquisition with FPGA and RT 

Fig. 2: Block Diagram of the portable weather station 

2.4. Software Functional Description

The software design is also divided into two main parts: i) FPGA, and ii) real time processor. In the case of the FPGA, an analogical channel configuration was performed to set their voltage levels and measurement type.

In order to start the data acquisition at different voltage levels, digital low-pass filters Butterworth were created with a cutoff frequency of 400 mHz. This action eliminates noise from temperature sensor, avoiding the use of physical analogical filters (reducing energy consumption) and improving uncertainty in signal measurements.

The signal processing filter applied to the control system is fitted with the Butterworth polynomials. In this work the four degree of Butterworth showed in Equation 1 is proposed (Paarmann, 2001).

(1)

where H(s) is the cutoff amplitude in decibels (dB) and (s) is the cutoff frequency (Hz).

This model achieves high speed and precision for the acquisition and transmission of suspicious values.

The signals of radiation, humidity, and pressure sensors are fitted based on the signal processing filter. Data collection of each element is made through a direct access to memory (DMA). The FIFO data storage is used to communicate FPGA and RT. This represents an increment on speed data transmission due to the FPGA memory use and the RAM memory of the RT host.

Similarly, a specialized data acquisition and signal filtering over the FPGA processor is developed (Cantó Navarro, 2010).

The wind data signal obtained through the ultrasonic anemometer is sent to the controller through the RS-232 serial protocol to then choose the important information using logic digital gates. In order to implement an edge detector, the signals are processed using digital converters and a state machine to restart the pulse counter value to zero every ten minutes.

Finally, the stored arrangements are sent to an iterative loop to perform averages every ten minutes of each meteorological variable recorded by the station. The data is printed out in a plain text format that corresponds to the database which stores in the non-volatile memory of the device.

3. Results and Discussion

In order to test the real time and FPGA based control system, a portable meteorological station shown in Figure 3 was used. A portable meteorological station should have capacity to keep up to seven different sensors (Barrenetxea et al., 2008) as in this case. All the sensors are located on a 10-meter mast as recommended by the general standards and practices from the World Meteorology Organization.

Fig. 3: Portable meteorological station 

The power supply is composed of a voltage regulator with 1V, 5V and 12V taps and a 50W photovoltaic cell to power the entire system. The solar cell supplies 2.79A at 17.9V to a sealed 12V and 34A rechargeable battery.

The control system implementation was performed in a cRIO 9068 CPU which includes a Field Programmable Gate Array (FPGA) for data acquisition and a real- time processor (RT) in its own architecture. The control algorithms were developed using the LabVIEW platform, a graphical environment that use G programing (Chouder, Silvestre, Taghezouit, & Karatepe, 2013).

Figure 4 shows the recorded values of the sensors installed on the portable system. The stored data corresponds to the period from July 4th to July 11th, 2014 at a temporal resolution of ten minutes. Table 1 shows the daily average of each parameter analyzed using the proposed approach.

Fig. 4: Plots of the collected data sample: Up) Pressure, global radiation, diffuse radiation, and wind direction. Down) T0-T4 Temperature, Humidity, Pluvial precipitation and Wind speed. 

Table 1 Collected data sample in a tabular representation. HUMID=Relative Humidity, PRESS=Atmospheric pressure, G. RAD= Global radiation, DIF. RAD.= Diffuse radiation, PRECIP=Atmospheric precipitation, W. SPEED= Wind speed, W. DIR=Wind direction 

The advantages of using this approach over traditional technologies are: scalability, precision, data acquisition speed, application-oriented configuration, portability, robustness, energy supply autonomy, and parallel programing. A deeper evaluation of our approach is currently in process.

4. Conclusions and Future Work

In this work, the programming development of a portable automatic weather station with capabilities to measure meteorological variables was presented. The design included a sustainable solution which is based on a photovoltaic system to ensure continuous operation and protection against failures due to lack of energy and unexpected reboots.

In order to validate the results obtained from the proposed weather automatic station, the portable system will be installed at the Villonaco wind farm in Ecuador where a fixed weather station is installed. In the near future, the portable weather station will be connected to Internet in order to broadcast the obtained information. Also an exhaustive analysis is planned using some data mining techniques.

Acknowledgements

The authors of the present work wish to thank to Secretaría de Educación Superior, Ciencia, Tecnología e Innovación from Ecuador (SENESCYT) for financing this research.

References

Abbate, S., Avvenuti, M., Carturan, L., & Cesarini, D. (2013). Deploying a Communicating Automatic Weather Station on an Alpine Glacier. Procedia Computer Science, 19(0), 1190-1195. doi: http://dx.doi.org/10.1016/j.procs.2013.06.170Links ]

Barrenetxea, G., Ingelrest, F., Schaefer, G., Vetterli, M., Couach, O., & Parlange, M. (2008). SensorScope: Out-of-the-Box Environmental Monitoring. 332-343. doi: 10.1109/ipsn.2008.28 [ Links ]

Cantó Navarro, L. G., Fons Lluis, Ramos Lara. (2010). Sistema Embededido de Rápida Auto-Reconfiguración. [ Links ]

Chouder, A., Silvestre, S., Taghezouit, B., & Karatepe, E. (2013). Monitoring, modelling and simulation of PV systems using LabVIEW. Solar Energy, 91(0), 337-349. doi: http://dx.doi.org/10.1016/j.solener.2012.09.016Links ]

Giannone, L., Eich, T., Fuchs, J. C., Ravindran, M., Ruan, Q., Wenzel, L., Concezzi, S. (2011). Data acquisition and real-time bolometer tomography using LabVIEW RT. Fusion Engineering and Design, 86(6-8), 1129-1132. doi: http://dx.doi.org/10.1016/j.fusengdes.2011.03.119Links ]

INAMHI. (2014). Instituto Nacional de Meteorología e Hidrología. [ Links ]

Jian-Ming Li, L. H., Shu-Yong Zhen, Lun-Tao Yao. (2010). The assessment of automatic weather station operating quality based on fuzzy AHP. Ninth International Conference on Machine Learning and Cybernetics, Qingdao. [ Links ]

Paarmann, L. D. (2001). Design and analysis of analog filters: a signal processing perspective (617): Springer Science & Business Media. [ Links ]

Popa, M. (2011). Embedded Weather Station with Remote Wireless Control. 19th Telecommunications forum TELFOR. [ Links ]

Salzmann, C., Gillet, D., & Huguenin, P. (2000). Introduction to real-time control using LabVIEWTM with an application to distance learning. Int. J. Engng Ed, 16(5), 372-384. [ Links ]

Zhen Fang, Z. Z., Lidong. Du, Jiangang Zhang, Cheng Pang, Daoqu Geng. (2010). A New Portable Micro Weather Station. [ Links ]

Zheng, W., Liu, R., Zhang, M., Zhuang, G., & Yuan, T. (2014). Design of FPGA based high-speed data acquisition and real-time data processing system on J-TEXT tokamak. Fusion Engineering and Design , 89(5), 698-701. [ Links ]

Received: July 23, 2015; Accepted: September 21, 2015

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License