1 Introduction

Traffic accidents, road congestion and environmental pollution are persistent problems faced by both developed and developing countries, which have made people live in difficult situations. Among these, the traffic incidents are the most serious ones because they result in huge loss of life and property. For decades, we have seen governments and car manufacturers struggle for safer roads and car accident prevention. The development in wireless communications has allowed companies, researchers and institutions to design communication systems that provide new solutions for these issues. Therefore, new types of networks, such as Vehicular Ad hoc Networks (VANETs) have been created. VANET consists of a network of vehicles in which vehicles are capable of communicating among themselves in order to deliver valuable information such as safety warnings and traffic information.

Nowadays, every car is likely to be equipped with various forms of smart sensors, wireless communication modules, storage and computational resources. The sensors will gather information about the road and environment conditions and share it with neighboring vehicles and adjacent roadside units (RSU) via vehicle-to-vehicle (V2V) or vehicle-to-infrastructure (V2I) communication. However, the difficulty lies on how to understand the sensed data and how to make intelligent decisions based on the provided information.

As a result, Ambient Intelligence (AmI) becomes a significant factor for VANETs. Various intelligent systems and applications are now being deployed and they are going to change the way manufacturers design vehicles. These systems include many intelligence computational technologies such as fuzzy logic, neural networks, machine learning, adaptive computing, voice recognition, and so on, and they are already announced or deployed [1]. The goal is to improve both vehicle safety and performance by realizing a series of automatic driving technologies based on the situation recognition. The car control relies on the measurement and recognition of the outside environment and their reflection on driving operation.

On the other hand, we are focused on the in-car information and driver’s vital information to detect the danger or risk situation and inform the driver about the risk or change his mood. Thus, our goal is to prevent the accidents by supporting the drivers. In order to realize the proposed system, we use some Internet of Things (IoT) devices equipped with various sensors for in-car monitoring.

In this paper, we propose a fuzzy-based system for safe driving considering four parameters: Vehicle’s Inside Temperature (VIT), Noise Level (NL), Vehicle Speed (VS) and Heart Rate (HR) to determine the Driving Risk Measurement (DRM).

The structure of the paper is as follows. In Sect. 2, we present an overview of VANETs. In Sect. 3, we present a short description of AmI. In Sect. 4, we describe the proposed fuzzy-based system and its implementation. In Sect. 5, we discuss the simulation and experimental results. Finally, conclusions and future work are given in Sect. 6.

2 Vehicular Ad Hoc Networks (VANETs)

VANETs are a type of wireless networks that have emerged thanks to advances in wireless communication technologies and the automotive industry. VANETs are considered to have an enormous potential in enhancing road traffic safety and traffic efficiency. Therefore, various governments have launched programs dedicated to the development and consolidation of vehicular communications and networking and both industrial and academic researchers are addressing many related challenges, including socio-economic ones, which are among the most important [2].

The VANET technology uses moving vehicle as nodes to form a wireless mobile network. It aims to provide fast and cost-efficient data transfer for the advantage of passenger safety and comfort. To improve road safety and travel comfort of voyagers and drivers, Intelligent Transport Systems (ITS) are developed. The ITS manages the vehicle traffic, support drivers with safety and other information, and provide some services such as automated toll collection and driver assist systems [3].

The VANETs provide new prospects to improve advanced solutions for making reliable communication between vehicles. VANETs can be defined as a part of ITS which aims to make transportation systems faster and smarter, in which vehicles are equipped with some short-range and medium-range wireless communication [4]. In a VANET, wireless vehicles are able to communicate directly with each other (i.e., emergency vehicle warning, stationary vehicle warning) and also served various services (i.e., video streaming, internet) from access points (i.e., 3G or 4G) through roadside units.

3 Ambient Intelligence (AmI)

The AmI is the vision that technology will become invisible, embedded in our natural surroundings, present whenever we need it, enabled by simple and effortless interactions, attuned to all our senses, adaptive to users and context and autonomously acting [5]. High quality information and content must be available to any user, anywhere, at any time, and on any device.

In order that AmI becomes a reality, it should completely envelope humans, without constraining them. Distributed embedded systems for AmI are going to change the way we design embedded systems, as well as the way we think about such systems. But, more importantly, they will have a great impact on the way we live. Applications ranging from safe driving systems, smart buildings and home security, smart fabrics or e-textiles, to manufacturing systems and rescue and recovery operations in hostile environments, are poised to become part of society and human lives.

The AmI deals with a new world of ubiquitous computing devices, where physical environments interact intelligently and unobtrusively with people. AmI environments can be diverse, such as homes, offices, meeting rooms, hospitals, control centers, vehicles, tourist attractions, stores, sports facilities, and music devices.

In the future, small devices will monitor the health status in a continuous manner, diagnose any possible health conditions, have conversation with people to persuade them to change the lifestyle for maintaining better health, and communicates with the doctor, if needed [6]. The device might even be embedded into the regular clothing fibers in the form of very tiny sensors and it might communicate with other devices including the variety of sensors embedded into the home to monitor the lifestyle. For example, people might be alarmed about the lack of a healthy diet based on the items present in the fridge and based on what they are eating outside regularly.

The AmI paradigm represents the future vision of intelligent computing where environments support the people inhabiting them [7,8,9]. In this new computing paradigm, the conventional input and output media no longer exist, rather the sensors and processors will be integrated into everyday objects, working together in harmony in order to support the inhabitants [10]. By relying on various artificial intelligence techniques, AmI promises the successful interpretation of the wealth of contextual information obtained from such embedded sensors and it will adapt the environment to the user needs in a transparent and anticipatory manner.

4 Proposed System

In this work, we use fuzzy logic to implement the proposed system. Fuzzy sets and fuzzy logic have been developed to manage vagueness and uncertainty in a reasoning process of an intelligent system such as a knowledge based system, an expert system or a logic control system [11,12,13,14,15,16]. In Fig. 1, we show the architecture of our proposed system.

Fig. 1.
figure 1

Proposed system architecture.

4.1 Proposed Fuzzy-Based Simulation System

The proposed system called Fuzzy-based System for Driving Risk Measurement (FSDRM) is shown in Fig. 2. For the implementation of our system, we consider four input parameters: Vehicle’s Inside Temperature (VIT), Noise Level (NL), Vehicle Speed (VS) and Heart Rate (HR) to determine the Driving Risk Measurement (DRM). These four input parameters are not correlated with each other, for this reason we use fuzzy system. The input parameters are fuzzified using the membership functions showed in Fig. 3(a), (b), (c) and (d). In Fig. 3(e) are shown the membership functions used for the output parameter. We use triangular and trapezoidal membership functions because they are suitable for real-time operation. The term sets for each linguistic parameter are shown in Table 1. We decided the number of term sets by carrying out many simulations. In Table 2, we show the Fuzzy Rule Base (FRB) of FSDRM, which consists of 81 rules. The control rules have the form: IF “conditions” THEN “control action”. For instance, for Rule 1: “IF VIT is L, NL is Q, VS is Lo and HR is S, THEN DRM is Hg” or for Rule 29: “IF VIT is M, NL is Q, VS is Lo and HR is No, THEN DRM is Sf”.

Fig. 2.
figure 2

Proposed system structure.

Table 1. Parameters and their term sets for FSDRM.
Fig. 3.
figure 3

Membership functions.

4.2 Testbed Description

In order to evaluate the proposed system, we implemented a testbed and carried out experiments in a real scenario [17, 18]. A snapshot of testbed is shown in Fig. 4. The testbed is composed of sensing and processing components. The sensing system consists of two parts. The first part is implemented in the Arduino Platform while the second one consists of a Microwave Sensor Module (MSM) called DC6M4JN3000. We set-up sensors on Arduino Uno to measure the environment temperature and noise and used the MSM to measure the driver’s heart rate. The vehicle speed is considered as a random value. Then, we implemented a processing device to get the sensed data and to run our fuzzy system. The sensing components are connected to the processing device via USB cable. We used Arduino IDE and Processing language to get the sensed data from the first module, whereas the MSM generates the sensed data in the appropriate format itself. Then, we use FuzzyC to fuzzify these data and to determine the degree of risk which is the output of our proposed system. Based on the DRM an appropriate task can be performed.

Table 2. FRB of FSDRM.
Fig. 4.
figure 4

Snapshot of testbed.

Fig. 5.
figure 5

Simulation results for VIT = 10 °C.

Fig. 6.
figure 6

Simulation results for VIT = 20 °C.

Fig. 7.
figure 7

Simulation results for VIT = 30 °C.

5 Proposed System Evaluation

5.1 Simulation Results

In this subsection, we present the simulation results for our proposed system. The simulation results are presented in Figs. 5, 6 and 7. We consider the VIT and NL as constant parameters. The VS values considered for simulations are from 10 to 100 kmph. We show the relation between DRM and HR for different VS values. We vary the HR parameter from 30 to 150 bpm.

In Fig. 5, we consider the VIT value 10 °C and change the NL from 40 dB to 65 dB. From Fig. 5(a) we can see that the DRM values are relatively high, especially when the vehicle speed is over 40 kmph and the driver’s heart rate is not a normal one. In Fig. 5(b) is considered the same scenario but with a noisy environment. It can be seen that the DRM is increased compared with the first scenario. However, when the vehicle speed is under 40 kmph and the driver’s heart beats at a normal rate, the risk level is not a big concern.

In Fig. 6, we present the simulation results for VIT 20 °C. In Fig. 6(a) is considered the scenario with a quiet ambient. We can see that the DRM values are lower than all the other considered scenarios. This is due to the good conditions of the vehicle’s inside environment in which the driver feels comfortable and can easily manage situations when he is driving with high speed. With a noise present (see Fig. 6(b)), it can be seen that the DRM is increased, however, the risk is still in moderate levels.

In Fig. 7, we increase the value of VIT to 30 °C. If the driver’s heart beats normally we can see that there are some cases when the degree of risk is not high such as when the ambient is not noisy or the vehicle moves slowly. But, when the inside environment becomes very noisy, we can see that the degree of risk is assessed to be very high.

In the cases when the risk level is above the moderate level for a relatively long time, the system can perform a certain action. For example, when the DRM value is slightly above the moderate level the system may take an action to change the driver’s mood, and when the DRM value is very high, the system could limit the vehicle’s maximal speed to a speed that the risk level is decreased significantly.

5.2 Experimental Results

For the experiments, we considered the vehicle speed as up to 150 kmph. The experimental results are presented in Figs. 8, 9 and 10. In Fig. 8(a) are shown the results of DRM when VIT is “Low” and NL is “Quiet”. From Fig. 8(a), we can see a number DRM values that indicate a situation with a low risk. These values are achieved when the ambient is quiet and the driver’s heart is beating very normally. On the other hand, when the ambient is noisy, we can see that there is not any DRM value that is decided as a safe or low risk situation by the system (see Fig. 8(b)). All the situations are decided with moderate values, or very risky if the vehicle moves at high speed.

The results of DRM for medium temperatures are presented in Fig. 9, with Fig. 9(a) and Fig. 9(b) presenting the experimental results for quiet and noisy ambient, respectively. Here the driver is in better conditions and when his heart beats normally, the risk is mostly under the moderate level. Although the risk is in low levels, there are cases such as when the driver is driving fast and simultaneously his heart is beating at slow/high rates that the risk level is determined as above the moderate level.

Fig. 8.
figure 8

Experimental results for low temperatures.

Fig. 9.
figure 9

Experimental results for medium temperatures.

Fig. 10.
figure 10

Experimental results for high temperatures.

In Fig. 10 are shown the results of DRM for high temperatures. The results are almost the same with that of Fig. 7 where the low values of DRM happen to be only when the ambient is quiet, the driver’s heart rate is normal and he is driving slowly. When the ambient is very noisy, the degree of risk is decided to be even above the “Very High” level. In these situations, the driver should not drive fast as his situation is a potential risk for him and for other vehicles on the road. Therefore, the system decides to perform the appropriate action in order to provide the driving safety.

6 Conclusions

In this paper, we proposed a fuzzy-based system to decide the driving risk measurement. We took into consideration four parameters: vehicle’s inside temperature, noise level, vehicle speed and driver’s heart rate. We evaluated the performance of proposed system by simulations and experiments. From the evaluation results, we conclude that the vehicle’s inside temperature, noise level, vehicle speed and driver’s heart rate have different effects on the decision of the risk level.

In the future, we would like to make extensive simulations and experiments to evaluate the proposed system and compare the performance with other systems.