Wireless Sensor Networks to Improve Road Monitoring

In this chapter an approach to improve road monitoring through wireless sensor networks is described: several sensors may be distributed along a road in order to detect traffic flows, speed, and the continued occupation of the road. Each WSN cluster offers a monitoring system based on videotapes and, at the same time, produces information which can be processed to provide a clear interpretation of the road situation regardless of weather conditions [1, 2]. Therefore, it is necessary to integrate video monitoring information with parameters measured by other sensors, e.g. magnetometer or power sensors, for traffic detection [3–5]. Advantages about WSN usage in this area are several. Some of them have been already shown in literature. Others derive by the proposed approach.


Introduction
In this chapter an approach to improve road monitoring through wireless sensor networks is described: several sensors may be distributed along a road in order to detect traffic flows, speed, and the continued occupation of the road. Each WSN cluster offers a monitoring system based on videotapes and, at the same time, produces information which can be processed to provide a clear interpretation of the road situation regardless of weather conditions [1,2]. Therefore, it is necessary to integrate video monitoring information with parameters measured by other sensors, e.g. magnetometer or power sensors, for traffic detection [3][4][5]. Advantages about WSN usage in this area are several. Some of them have been already shown in literature. Others derive by the proposed approach.
• A WSN can monitor and evaluate roads automatically and continuously, with little human effort • A WSN can work during night even with poor weather conditions, when there is fog or presence of dust (pollution, volcanic ash) in the air • WSNs are low cost and low power [6] • A WSN allows the integration of video monitoring with magnetic or power sensor. In this way, it is possible to obtain complete and integrated information (video-images and traffic volumes information) [7] • WSNs allow dynamic changes to network topology based on real needs and reports coming from sensors located along the road.
• When needed, the number of cameras which control a specific area may increase to produce more detailed information. However, it may increase network workload that will be properly managed by the proposed approach.
The idea is to distribute many sensors along a road to detect traffic flows, speed and the continued roadway occupation. At first, the chapter will show most common wireless technologies used in WSNs in order to select the protocol to meet main system requirements.
A system for road traffic monitoring, operating in adverse environmental conditions, involves the coexistence of a large number of devices that, working together, ensure proper analysis of vehicular traffic situation. Our goal is to show a flexible architecture in which information of specific road sections are provided and, in case of queue or traffic jam, a mechanism for traffic detection is activated. In particular, this chapter introduces an algorithm that, based on traffic volume measured values through magnetic sensor located on the ground, dynamically enables or disables cameras according to the real need to monitor the given area. Moreover, in order to manage power consumption, the proposed architecture is based on an innovative approach, using IEEE 802.15.4/ZigBee standard protocol [8]. As described in next section, IEEE 802.15.4/ZigBee is able to satisfy main system requirements. The proposed algorithm dynamically varies active devices number based on loading conditions through a fuzzy logic controller. The role of fuzzy logic controller is useful in terms of network load and power consumption management. In order to satisfy several Quality of Service requirements (QoS) and real-time constraints, the network coordinator dynamically manages the data sampling period of cluster coordinator nodes. They give the new sampling period to its end-nodes representing local monitoring stations. The algorithm is characterized by predetermined "membership" functions used to process some network information (e.g. Deadline Miss, Power Consumption). The architecture proposed and the algorithms shown will be evaluated using TrueTime [35] and OmNet++ [36] simulators.

System requirements and wireless sensor network protocols 2.1. System requirements
In order to make a wireless sensor network suitable for road monitoring, some requirements have to be met. In the following we give a brief overview of requirements that drove the design of the proposed architecture and the choice of the wireless protocol to use.
• Predictability and system performance simulation: The system shall implement a WSN that allows to simulate its network environment and to determine in advance end-to-end performance of the monitored system: power consumption, end-to-end latency (min, max, average), jitter, throughput.
• Quality of Service provisioning: The WSN shall implement advanced QoS mechanisms and a clear policy to ensure guaranteed performance. QoS will be ensured also when nodes number increase.
• The network should cover harsh large area: The WSN should be able to work in a harsh and dynamic environments taking into account factors like high temperature, dust, vibrations, humidity, poor visibility, fog or heavy rain, etc.
• High density of nodes: Nodes density should be high.
• High communication reliability: The WSN shall provide high reliability in terms of communication services. Error message rate will be kept acceptable for the road monitoring application.
• Fault tolerance: The WSN shall prevent performance degradation in case of fault to any part of the system. It is mandatory to conduct a fault analysis of the monitored system in order to provide fault tolerance mechanisms. The WSN shall be self healing: i.e. the WSN detects communication errors and heals these errors by its own means.
• Mechanism to support dynamic environment: The working conditions in road monitoring systems are not static.
• Network ability to transmit video traffic flows: WSNs should be able to transmit video traffic flows using an appropriate video compression algorithm. The WSN must be able to manage QoS associated with this type of traffic flows.  "wakes up" client devices, which are listening to their address and go into "sleep" mode if they do not receive it. Beacons (which are basically sync signals) are important for mesh and cluster tree networks to keep all nodes synchronized in order to save batteries. Since transmission medium (radio) is shared by all devices, it is necessary to use a transmission mechanism to avoid that two devices send packets simultaneously. There are two techniques: CSMA-CA and Beacon. Through CSMA-CA each device, before starting a transmission, performs a channel listening to understand if there is already another transmission. If so, the retransmission will be done later with a random delay. Through Beacon technique the coordinator sends a superframe (beacon mode) at regular time intervals (multiples of 15.38 ms, up to 252 s). Between a beacon and another one there are 16 time slots where the absence of collision is guaranteed. All devices contend for first 9 time slots, while remaining time slots are assigned by the coordinator to a specific node and are called GTS (Guaranteed Time Slot). If a node has to transmit many information, the coordinator may give it more than one GTS. This structure guarantees dedicated bandwidth and low latency compared to the first technique. Furthermore, it also reduces battery consumption, because each device knows exactly when to transmit and it is sure there will not be collisions.

Introduction
Main requirement of a road monitoring scenario is the ability to guarantee Quality of Service for video monitoring traffic flows. However QoS management in a wireless sensor network is something difficult to ensure because of several factors: • Sensors with limited power, energy, memory and processing capacity • Nodes heterogeneity: each node should manage different tasks and different hardware • Network topology may change over time due to nodes mobility, removal or addition of a node • Environment conditions in which sensor work are often unpredictable All these situations can cause "delays" and/or "packet loss rate" too high which damage predictability and reliability system requirements. It is therefore necessary to use a QoS management paradigm to ensure network flexibility, adaptability and scalability. Some of these problems have been already investigated in literature (par. 3.2) while others are unresolved yet. Finally, the last paragraph of this section shows video transmission over IEEE 802.15.4/ZigBee.

Road monitoring through WSNs in literature
Traffic congestion is a problem of many big city of the world since vehicles number increase. Research in Intelligent Transportation System (ITS) is often focused on optimization of urban traffic flows. ITS main goal is to improve safety, mobility and efficiency. In recent years researchers studied and analyzed wireless sensor networks, communication technologies and algorithms targeted for ITS applications. WSNs can be deployed and organized in a very short time and can measure sevaral parameters related to vehicular traffic. Furthermore, sensors nodes have reduced size, are often low power and can be positioned in various places along the road. A wireless sensor network is able to detect vehicular flow, speed and occupation with high spatial and temporal resolutions, providing a possible solution to traffic congestion. To improve road monitoring reducing, at the same time, waiting and travel time, techniques for efficient traffic management are necessary. A large number of methods and approaches have been proposed in literature to reach this goal. In [11] the effectiveness of a WSN to take real-time traffic information has been studied. A first analysis is performed using a single sensor to detect vehicles approaching to traffic lights. In a second analysis, two sensors are positioned on each traffic lane to calculate the queue length. Results show that the use of one sensor is not enough to obtain best performance. Instead the distance between two sensors, located in the same traffic lane [12], does not have a great influence on traffic flow. A sensors based Traffic Light Controller (TLC) is implemented thanks to the Green Light District Simulator [4] and it is compared with an existing real TLC that does not use sensors.
Results show that the proposed sensor network based TLC, has good performance but it was never able to draw up the exact number of queued vehicles at the traffic lights. In fact, the use of not many sensors does not guarantee a full and complete management of traffic in a road intersection. A new decentralised TLC based on WSNs is proposed in [13]. Its main aim is to improve road monitoring maximising vehicles flow and reducing waiting time at traffic lights. Each intersection is characterized by an Intersection Control Agent (ICA) that receive information from wireless sensors distributed along roads and determines the traffic flow model [14]. Another research [15] shows how it is possibile to equip vehicles with an electronic tag that can be mainly used for management traffic application. This solution would remove the sensor network infrastructure, since vehicles could easily exchange information each other. However, this approach is too invasive to be applied in a traffic management context. To improve real-time road monitoring, in addition to WSN, the fuzzy theory can be used. In fact, in the approach proposed in [16], a wireless sensor network collects traffic information [17] while fuzzy logic allows a dynamic and real-time traffic control. Based on number of detected vehicles by sensors, a profile is applied to manage the traffic flow. Performance are determined by calculating the Average Waiting Time Trip (AWTT) and results show wireless sensor network capabilities to quickly collect traffic information. In [18] is proposed a wireless sensor network to collect information on road intersections. These information can be transmitted to users that make requests about traffic. Indeed, the driver through his cell phone can receive traffic information of an interested area. The main goal of [19] is to design and implement an algorithm and, through several simulations, to evaluate road traffic management and control. The proposed system is able to detect ferrous objects in movement, e.g. vehicles, through a wireless sensors network. Furthermore, it is able to calculate the appropriate duration of green and red time of traffic lights in a road intersection.
In this way, the system should help to solve traffic congestion problems. In any case, it is necessary to use many sensor nodes to increase system accuracy.

Video transmission problems over IEEE 802.15.4/ZigBee
In order to adapt video signal to the available bandwidth provided by IEEE 802.15.4/ZigBee protocol [7], it is really important to choose the best video coding approach. Surely IEEE 802.15.4/ZigBee is not a high performance protocol, but it is possible to transfer audio and video through an appropriate compression algorithm. Also, it is necessary to consider other characteristics in terms of video resolution and number of frames per second [20]. These specifications are used to adapt video signal to the available bandwidth (250 kbps) for each of sixteen channels in the ISM band (2.4 GHz).

Video compression
Video compression technologies [21] are intended to reduce and remove redundant information. In this way, digital video file can be transmitted over a network and stored on computer hard drives more efficiently. With effective compression techniques, it is possible to obtain a considerable file size reduction with minimal effects on image quality. However, it is possible that images quality is compromised if file size is further reduced increasing the compression level. There are various compression technologies, both proprietary and industrial standards. Standards are important to ensure compatibility and interoperability. They are particularly useful for video compressions because a video can be used for different purposes. For example, in many surveillance applications, it must be viewable even many years after the registration date. Among various surveillance systems [22], end users can choose among different suppliers, rather than being tied to one vendor. Motion JPEG [23], MPEG-4 [24] and H.264 [25] are most used algorithms in video surveillance. H.264 is the most recent and effective video compression standard. The compression process applies an algorithm to the source video in order to create a compressed file ready for transmission or storage. When the compressed file is played, an inverse algorithm is applied to produce a video with the original content. Time required to compress, transmit, decompress and display a file is called latency. An algorithm pair used together determine a video codec (encoder/decoder). Video codecs of different standards are generally not compatible each other. For example, an MPEG-4 decoder can not be used with a H.264 encoder, simply because one of two algorithms is not able to properly decode the output of the other. However, it is possible to implement multiple algorithms in the same software or hardware in order to allow different formats coexistence.

Image compression Vs. video compression
Compression standards use different methods and have various transmission rate, quality and latency. Compression algorithms are divided into two types: images compression and videos compression. Image compression uses "intra -frame" encryption technology [26]. Data is reduced within an image frame removing unnecessary information that may not be visible by human eye. In fact, human eye is more sensitive to luminance characteristics respect to chrominance characteristics. Motion JPEG is a typical example of this type compression standard. In a Motion JPEG sequence images are compressed or encoded as a single JPEG image.  [27] to reduce video data from a frames series. Furthermore, there are techniques, such as differential encoding [28], where each frame is compared with a reference frame; pixels are encoded only if they have been modified respect to the reference frame.  One of Motion JPEG advantages is that various images of a video sequence can have the same quality, which varies depending on chosen compression level for the network camera or video encoder. If compression level is greater, then, image quality and file size will be smaller. Since there are no links between frames, a Motion JPEG video is "solid", i.e. if during transmission a frame is lost, the rest of the video will not be compromised. This format is characterized by a wide compatibility and it is prevalent in many applications. In particular, it is used when individual frames of a video sequence are needed and when there are reduced transmission rate, usually 5 or less frames per second. Main disadvantage of Motion JPEG is that it does not use video compression techniques to reduce data, since it consists of a complete images series. Result is a relatively high bit transmission rate or a low compression ratio to obtain performance comparable with to MPEG-4 and H.264.

MPEG-4
Usually, in video surveillance applications MPEG-4 Part 2 standard is used, also known as MPEG-4 Visual. Like other standards, MPEG license is purchasable, then users must pay a license fee associated with each monitoring station. MPEG-4 is used in applications characterized by limited bandwidth or requiring high images quality.

H.264
H.264 is used in high data rate and high resolution applications, (highways and airports) where 30/25 frames (NTSC / PAL) per second are needed. In fact, in these contexts, where it is necessary bandwidth and required storage space reduction, H.264 can offer the most significant advantages. This standard is also intended to accelerate network cameras diffusion with megapixels resolution because the efficient compression technology is able to reduce large files size and bit transmission rate without compromising images quality. However, H.264 requires the deployment of high performance network cameras and monitoring stations. Figure 6 shows performance of video encoding techniques described. Considering a sample video sequence, H.264 standard generates up to 50% bits per second less than an encoder which supports MPEG-4 with motion compensation. Furthermore, it is 3 times more efficient than MPEG-4 without motion compensation and at least 6 times more efficient than Motion JPEG.

Introduction
As said, some problems remained open challenges such as the system ability to interact in harsh environments ensuring QoS for video monitoring traffic flows, and network predictability and reliability. The main goal of this work is to resolve these management issues through a fuzzy logic controller, highlighting improvements in terms of reduced packet loss and an increased number of packets successfully received by destination nodes. A network controller manages sampling period of each sensor node at run time, in order to maintain deadline miss ratio, associated with real time traffic flows, inside a desired level. In other words, the network controller dynamically determines the sampling period based on current value of deadline miss using apposite membership functions as provided by Fuzzy logic [10].

Network architecture
A road traffic monitoring system, working in adverse environmental conditions, needs the coexistence, in a WSN (based on IEEE 802.15.4), of several devices, which working together, provide a correct road traffic analysis. Figure 7 shows the system architecture here proposed. It integrates sensors connected to cameras with several magnetic sensor to reveal traffic flows.
The circled area in figure represents a cluster in which, when high traffic volume is detected, more monitoring cameras are dynamically activated. Surveillance cameras have the following characteristics to satisfy the available bandwidth (250 kbps) for each channel: •  Figure 7) that, based on magnetic field distortion caused by the presence of ferrous objects like cars, provide basic information for traffic volume estimation. Subsequently, they send data detected to their cluster coordinator node (FFD). Its main task is to transmit data to and from other devices especially to the First Pan Coordinator (FPC), which is able to store and process network information and send, in case of high traffic volume detected, an activation message to "sleeping" nodes using the IEEE 802.15.4/ZigBee protocol. WSN functioning is appropriately and dynamically adapted to critical conditions in terms of congestion increase in order to optimize information quality. When a critical situation needs a more accurate monitoring, the • smart network manager to optimize power consumption using a "low rate" protocol (IEEE 802.15.4/ZigBee) • dynamic management of critical situations (also unexpected) which may lead network overloading.

Magnetic sensors
Magnetic field detection has enjoyed a significant growth thanks to several application fields: magnetic sensors can be used to detect the presence, strength or direction of magnetic field distortion caused not only by earth, but also by vehicles [30]. These sensors can measure these properties without physical contact and this is the reason why they have become so important for industrial control systems. We need to consider that magnetic sensors are never used to measure the magnetic field. Usually they are used to evaluate parameters like speed or vehicles presence. These parameters can not be directly calculated, but can be extracted based on magnetic field variation and distortion. Conventional sensors (temperature or pressure), can directly convert the desired parameter to a proportional voltage or current output. Using a magnetic sensor, it is necessary to measure the magnetic field variation and then process the measured signal in order to obtain the desired output. Figure 8 shows the difference between conventional sensors and magnetic sensors. Figure 9 show how a ferrous object, like a car, can create a local distortion. Vehicle detection applications can take different forms. A single axis sensor can detect vehicle presence. Magnetic distortion caused by a large ferrous object metals, like a car, can be modeled as a set of many magnetic dipoles. Figure 10

Vehicle classification
Magnetic distortions can be used to classify different types of vehicles [31,32]. When a vehicle passes over the magnetic sensor, it will detect all different dipole moments. The field variation is a real "magnetic" signature of the vehicle. A three-axis magnetic sensor, positioned on the traffic lane, will provide a rich output signal related to vehicles passing over its area. Figure  11 shows a three-axis magnetic sensor output after detection of two vehicles (a pick up and a Magnetic Sensor sedan respectively). The four curves represent the magnetic field variation of X, Y and Z axis respectively and amplitude caused by the vehicle proceedings towards the south. Vehicle type can be classified based on these variations using pattern recognition or matching algorithms. Magnetometer output curves in Figure 11, reveal how vehicles vary Earth's magnetic field. The greatest variation, in each curve, occurs when the engine block is exactly opposed to the sensor.

Vehicle direction and presence
Detection of vehicle presence and direction [33], does not require a high degree of detail in terms of magnetic field distortion. Example in Figure 12 evaluates the detection of a car driven at a distance from sensor of 1 and 3 foot respectively.
Curves X, Y and Z obtained are shown in Figure 13. On the left results obtained by a sensor positioned at a distance of 1 foot with car travelling from north towards south are shown. On the right, instead, results obtained by a sensor positioned at a distance of 3 foot with car travelling from east toward ovest are shown. Each curve has two deviations: the first one represents the car traveling in direction of travel, while second one represents the car in reverse.

Dynamic video-monitoring algorithm
The approach here proposed (described through flow chart in figure 15), called Dynamic Video Monitoring Algorithm (DVMA), allows to activate more monitoring nodes in case of critical traffic situations detected by the WSN through magnetic sensors. Moreover, our approach controls the network load through a fuzzy controller whose task is to dynamically manage quality of service of data flows ensuring good performance. The DVMA evaluates, through magnetic sensors, the instantaneous magnetic field distortion value (VT). If VT measured value exceeds a threshold value, i.e. queue or traffic jam occur, and additional nodes are off, the FPC (green node in figure 7) sends an activation request to FFD nodes which, using the sleep/wakeup mechanism described in the IEEE 802.15.4 [8], forward the request to the sleeping RFD nodes. The idea is to forward an activation request

Send_activation_request_to_FFD Send_activation_request_to_FFD
Send_ACK_message_to_FFD Send_ACK_message_to_FFD Figure 14. DVMA UML sequence diagram setting to 1 the bit "High Traffic" introduced in the free reserved subfield of standard MAC control field frame as shown in figure 16. Sequence diagram in figure 14 shows DVMA functions. Threshold_inizialization() function defines the minimum traffic density. Beyond this limit, additional controls must be activated. According to magnetic field distortion, detected by RFD sensors, traffic volume trend can be analytically represented as shown in Figure 17. VT_acquisition() function acquires data collected by magnetic sensors placed along roads. Send_request_activation() function, sends an activation request from the First Pan Coordinator to "sleeping" RFD nodes through the FFD nodes (ZigBee routers) using 802.15.4/ZigBee standard protocol. Sleeping nodes wake up periodically, as described by standard [8], for channel control.

Fuzzy logic controller
The fuzzy logic controller manages network topology and workload. A similar approach has been applied in a context of WSAN [34] (Wireless Sensor Actuator Network). In our case, we have designed a fuzzy controller to dynamically change the sampling period of RFD nodes, determining the new sampling period (NST) based on two input values, as shown in figure  18:  Figure 19 shows our inference mechanism functioning scheme. To better understand Figure 19, IF CST value is NS (Negative Small) and DMRM value is ZE (Zero), THEN NST value will be ZE (Zero). Finally, this value is defuzzified into a numeric value, which represents the new sampling period (NST) of RFD nodes. In our algorithm, for each variable, a range of value has been defined. Therefore the range has been divided in sub-ranges (called fuzzy sets). Established that Deadline Miss Ratio Measured (DMRM) can assume values between 0 and 1.25, this range can be divided into fuzzy sets as shown in Figure 20. In other words, if the value of DMRM is between 0 and 0.03, it will be fuzzyfied as Negative Big (NB). Similarly, Current Sampling Time (CST) can assume values inside a range divided in fuzzy sets too, as shown in Figure 21.
So, if Current Sampling Time has a value between 0 and 4, it will be fuzzyfied as Negative Big (NB). As seen previously, outputs are input functions. According to fuzzy logic, these functions are expressed through IF-THEN constructs. To better understand, the following construct (from figure 19) can be taken as model: IF DMRM is NB And CST is ZE THEN

Performance evaluation
To demonstrate benefits introduced by the DVMA, several simulations were carried out using: • TrueTime [35]: it is a real-time simulation environment that allows co-simulation control tasks performed in real-time kernels.
• Simulink/Matlab has been used to test the DVMA in a WSN 802.15.4 based.
• OMNeT++: it ensure WSN evaluation [36] TrueTime and Simulink/Matlab have been used to test DVMA performance in a single cluster network. OMNeT++ has been used to test performance of entire WSN system. The simulated network consists of a central FPC node. It covers 480 meters of road section in every direction thanks to FFD nodes located at a distance of about 50 meters from each other. Each FFD node (ZigBee router) provides a magnetic sensor, for traffic measures, and two cameras in "sleeping mode". These cameras will be activated only in case of real need. In other words, when magnetic sensors detect traffic volume increase.
The simulation campaign refers to periodic and aperiodic traffic flows. A periodic real-time traffic flow has regular arrival times (arrival time is equal to sampling time value). An aperiodic real-time traffic flow has irregular and unpredictable arrival times (it can be even one-shot). The first concerns video monitoring traffic flows, while aperiodic packets concerns data sent by magnetic sensors for traffic volume detection. During simulations, have been evaluated: number of packets received and lost for image traffic and network management traffic respectively. Packet size considered is 18 Kb, data-rate equal to 180 Kbps, Simulation Time equal to 30s. Figure 23 shows results obtained with fuzzy logic controller related to periodic traffic is higher than the case with the controller ON. The fuzzy logic controller adjusting the periodic traffic (determining sampling times) reduces network traffic (workload) improving the throughput. In fact Figure 23 shows a number of periodic packet loss undoubtedly lower. Considering the aperiodic traffic, even if the network maintains the same workload, the DMVA improves performance because decreases general network workload.
We also analyzed network performance in terms of Throughput (Th) / Workload (Wl) (1). In other words: Figure 25, Figure 26 and Figure 27 show how the fuzzy controller reacts to network degradations. show how performance get worse when the controller is OFF. At each time window, in fact, the number of packets that correctly reach their destination, decreases till a minimum value measured of about 44% (total traffic sent), 41% (image traffic sent) and 59% (aperiodic traffic sent). Instead using the fuzzy logic controller, Th/Wl measured is equal to about 80% (total traffic sent), 76% (image traffic sent) and 82% (aperiodic traffic sent). The DVMA dynamically responds to an overloaded scenario. It has been simulated a generic situation adding and removing stations (due to fast road traffic variation) which generate additional traffic to the network. The network become able to prevent network collapse, while adding more monitoring nodes or when network conditions are close to saturation.

Conclusions and future works
This work discussed an algorithm to manage road traffic volume through a hybrid architecture that integrates magnetic sensors for vehicular traffic detection, with several cameras to ensure better monitoring. The possibility to activate more devices only in case of real need, ensures energy savings. Furthermore, using a fuzzy logic controller, we can manage easily and in a better way network workload changes. The controller works dynamically, based on QoS measured parameters and results are really promising. We are currently working on the implementation of the proposed architecture using COTS devices, with panels which indicate, along the monitored road section, the presence of heavy traffic and suggesting, where possible, alternative routes or estimated time to reach the desired destination. Moreover, our research will focus on real-time scheduling algorithms having as input data acquired through WSNs for road monitoring near traffic lights. In particular we are developing a mechanism to allow dynamic management of queues at traffic lights in order to give more green time to road sections with longest queues. In addition, we are studying a smart paradigm based on neural networks in order to predict, with mean square error as small as possible, vehicular traffic behavior based on values previously measured. As everybody knows, during the day streets are jammed in the morning (people go to work or accompany their children to school), lunchtime and late afternoon (work out). The Network Controller, after an accurate training phase, may cleverly monitor the established area in a soft way, dynamically determining the awakening of video surveillance cameras only when really necessary based on values detected by magnetic sensors and predictions determined by the neural algorithm. Another important research aspect concerns the study of power consumption within WSNs. Dynamic sampling times management allows us to assume a lower average power consumption of batteries used by the sensors. This leads an increase of batteries duration and network lifetime. Our goal is thus to measure energy savings that can be obtained through our approach and determine if the approach can be further improved by using a neural network system or a neuro-fuzzy combination.