170 likes | 278 Views
A Scheduled Virtual Sensor – Measuring Degree Days. Barry Pearn Graduate Research Candidate School of Computing and Information Systems University of Tasmania. Barry Pearn. PhD Candidate at the University of Tasmania Research Interests:
E N D
A Scheduled Virtual Sensor – Measuring Degree Days Barry Pearn Graduate Research Candidate School of Computing and Information Systems University of Tasmania
Barry Pearn • PhD Candidate at the University of Tasmania • Research Interests: • Application of Sensors to Agricultural Research and Production. • Virtual Sensors as an abstraction to manage data from heterogeneous sensors. • GSN.
Agenda • Motivation • Previous version – Timed VS • Scheduled Virtual Sensor • Implementation • An Application – Measuring Degree Days
Motivation • Not satisfied with the previous version. • Schedules output required for a flooring trial. • Potential application in crop monitoring. • Just wanted to prove it could be done.
So What is the Problem • The WSN produces a stream of data packets each representing the all the data from a single node and at interavals determined by the program on the node. • Many applications require data in more structured format and at predictable intervals.
Source Configuration • <source alias="s1" storage-size="15m" slide="1" sampling-rate="1.0"> • <address wrapper="xBow"> • <predicate key="host">localhost</predicate> • <predicate key="port">9005</predicate> • <predicate key="rate">500</predicate> • </address> • <avg(prtemp) as pt from wrapper where nodeid = 5288</query> • </source>>
Modified Configuration - 1 The rate at which data output is produced was modified using the “output-specification rate” parameter. This parameter sets a minimum interval (in milliseconds) between output data items. For example, to produce data output at 10 minute intervals we used: <output-specification rate="600000"/> Problem: Slippage in the data interval.
Modified Configuration - 2 To reduce the slippage we added an event at the desired interval which would trigger the production of a data item independently of the receipt of a data packet from the wireless nodes. The stream-rate was set to one millisecond less than the desired time interval so to suppress the generation of data item before the required interval and the system-time source was set to the precise time interval so that an event was generated at the required interval.
Outcome of Modified Configuration • Slippage was reduced but not eliminated. • Couldn’t specify output on specific interval (e.g.. On the hour) Solution: Scheduled Processing Class Implemented in: AbstractScheduledVirtualSensor ScheduledBridgeVirtual Sensor ScheduledStreamExporterVirtualSensor
Implementation Details • Initialize() implements the abstract method and provides the initialization of the timer but allows any subclass to implement its own specific requirements. • dataAvailable() implements the abstract method and validates the data element but does not call dataProduced. • Dispose() remains an abstract method and leaves the subclass to provide any implementation. • MyTimerTask() is an additional abstract method which must be implemented in any subclass to provide the output of the virtual sensor at the intervals set by the clock-rate parameter in the virtual sensor definition. • AbstractScheduledVirtualSensor introduces a start-time parameter to allow to set the precise time of data item generation. If no start-time is set then a scheduled virtual sensor will default to starting on the next whole interval (for example on the hour for an hourly scheduled virtual sensor.
Degree Days • Growth rates of most organisms are specifically related to the accumulated heat above the threshold temperature for growth in a given species during various stages of their growing period. • This has become known as physiological time and is measured in degree-days (D), sometimes referred to as “Growing Degree Days”. • One degree-day is equal to a temperature of one degree above the growth threshold of the organism for 24 hours or 24 degree-hours. • A processing chain to calculate accumulated D was constructed in GSN using scheduled virtual sensors.
WSN Xbow VS Node data Hourly Temperature VS Hourly Avg. Temp Degree Hours VS Degree hours Degree Days VS Degree days Accumulated Degree Days VS
Conclusions • Scheduled Virtual Sensors • Produce data at precise intervals. • Can be scheduled to start at a precise time. • Have been used to produce daily summary data at midnight • Some problems remain: • Currently having problems with a virtual sensor that produces nulls for all nodes if one node goes down.