Keywords

1 Introduction

Safety-critical systems are those systems whose failure could result in loss of life, significant property damage, or damage to the environment. Many modern information systems are becoming safety-critical in a general sense because financial loss and even loss of life can result from their failure [1]. Engineering of safety-critical systems is a complex task involving many technical fields. Unmanned aerial vehicles (UAVs), also known as drones, are aircraft either controlled by ‘pilots’ from the ground or increasingly, autonomously following a pre-programmed mission. It is one of most common example of safety critical systems. Due to their advantages, UAVs are used in many civil and military applications such as aerial surveillance, remote sensing, cargo delivery, etc. About 80% of flight incidents concerning unmanned aerial vehicles (UAV) are due to faults affecting propulsion, flight control surfaces, or sensors [2]. Here we are considering the UAV system as a set of sensors namely groundspeed sensor, angle of attack sensor, accelerometer sensor, angle of sideslip sensor, differential pressure sensor, etc.

Safety assessment is the process for assuring the safety and reliability of critical aeronautical systems. It uses probabilistic analysis to provide precise measures about the safety requirements of a system. The basic information used as input to these techniques are failure conditions and failure rates [3]. We define prognosis to be detecting the precursors of a failure, and predicting how much time remains before a likely failure. Algorithms that use the data-driven approach to prognosis learn models directly from the data, rather than using a hand-built model based on human expertise [4]. One useful approach is the data-driven approach, also known as the data mining approach or the machine learning approach, which uses historical data to automatically learn a model of system behavior [5]. So data-driven approach along with the safety assessment helps in the safe handling of UAV systems. Being the most famous data-driven approach, ANN finds its application in this case too. ANNs, like people, learn by example. An ANN is configured for a specific application, such as pattern recognition or data classification , through a learning process [6]. The sensor model values are given to classifier and predictor which is used for prognosis. Groundspeed sensor is implemented using MATLAB/SIMULINK model and the outputs are given to ANN algorithm. Groundspeed is the horizontal speed of the aircraft relative to ground. Groundspeed sensor gives reasonable results in calm weather conditions. It measures actual airspeed resulting in better throttle control and aircraft performance especially in windy conditions [7]. The classifier output specifies whether the sensor works satisfactorily or not. Predictor predicts the future output values.

The paper organized in various sections as: Sect. 2 gives details about the ANN and tools, Sect. 3 explains block diagram and flowchart of the proposed approach, sensor model and algorithm details are given in Sect. 4 and results and conclusion are given in Sects. 5 and 6, respectively.

2 Related Work

Large variety of methods have been proposed for designing Safety analyzing systems. Some of the approaches are: pattern recognition, parameter estimation [8], observers (Luenberger observers, extended Luenberger observers, and unscented observers) [9], filters (Kalman filters, extended Kalman filters, unscented Kalman filters) [10], multiple model adaptive estimation and intelligent technology [11]. Intelligent technology consists of fault diagnosis such as expert system method, graphical method, soft computing, and distributed artificial intelligence. Graphical systems includes fault tree analysis and Bayesian network. Soft computing method consists of rough set, artificial neural network , support vector machine, fuzzy logic [12], artificial immune system, and decision tree are included. Among all these we are using ANN method. Bayesian networks are used to describe the relationship among project state impact factors, decisions to be taken and the satisfaction levels related to each decision. Approximated results are available in an efficient way while using Neural networks. An Artificial Neural Network (ANN) [13] is an information processing paradigm that is stimulated by the way biological nervous systems, such as the brain, process information. Usually, neural networks operate in two phases. The first phase is a learning phase where each of the nodes and links adjust their strength in order to match with the desired output. A learning algorithm is in charge of this process. When the learning phase is complete, the neural network (NN) is ready to recognize the incoming information and to work as a pattern recognition system (Fig. 1).

Fig. 1
figure 1

ANN general architecture

NN-based schemes benefit from factors such as; online learning algorithms, ability to model nonlinear systems and are programmable in a few lines of code [14]. There are several open source tools are available for ANN like open NN, just NN, Neural Machine, plug & Score, FANN, etc. Some of them are useful for commercial purpose while some others help in research works [15]. MATLAB is having lot of functionalities and tutorials are also available. So MATLAB is used for implementing the proposed method. The nonlinear autoregressive network with exogenous inputs (NARX) is a recurrent dynamic network, with feedback connections enclosing several layers of the network. The NARX model is based on the linear ARX model, and commonly used in time-series modeling .

3 Proposed Approach

The block diagram and the flowchart is explained in this section.

3.1 Block Diagram

Here the inputs are given to MATLAB SIMULINK model. These models are built according to the characteristic equation of each sensor . The outputs of sensor models are given to the neural network where the classification and prediction takes place. The predicted values are again given to the classifier which helps in evaluating efficiency of the system. The input values are decided on the basis of range of each individual values of the sensors (Fig. 2).

Fig. 2
figure 2

Block diagram of the proposed approach

The proposed approach is relatively simple and precise than other safety assessment techniques. It checks the status of the system and along with that it monitors the future performance also. So, this approach helps in proper working as well as the long time life period of the system (Fig. 3).

Fig. 3
figure 3

Flowchart representation of system

3.2 Flowchart

The flowchart of the implemented program is given below. In the flowchart the general workflow is explained. In the case of classifier, after loading inputs and targets, networks is created, trained, and tested with real time data. The data is categorized based on the range of output values. If it belongs to class 1 the system gives satisfactory performance otherwise it indicates some failure condition. In the predictor part, the NARX network is created, trained, simulated, and used for iterated prediction. The predicted values are again given to classifier network to check the working in the future slots.

4 Implementation

In this section classification and prediction algorithms are explained briefly along with the explanation of sensor model.

4.1 Modeling of Sensor

The sensor model has been created based on the characteristic equation. We have implemented the model for groundspeed sensor and its out values are processed accordingly. All the other sensors mentioned in Sect. 1 can be implemented similarly. Consider the case of ground speed sensor. The characteristic equation is given below:

$${\text{Vg = }}\sqrt {{\text{(v}}^{{\text{2}}} {\text{ + [Vw]}}^{{\text{2}}} {\text{ + 2}}{\text{.v}}{\text{.Vwcos(}}\Psi {\text{ - Xw))}}}$$
(1)

where, Vg = groundspeed, Vw = wind speed, v = airspeed, Xw = wind direction and Ψ = yaw value.

The database is created according to the equation and range of value of each input. The inputs are imported to the Simulink model. The simulated outputs are saved in the work space. The outputs of the Simulink model are given to the ANN algorithm (Fig. 4).

Fig. 4
figure 4

Groundspeed sensor model

4.2 Classification Algorithm

In this case the inputs are the groundspeed monitored from the output of the Simulink model. The targets are the classes which indicate to which category the input given belongs to. Pattern recognition networks are feedforward networks that can be trained to classify inputs according to target classes. The target data for pattern recognition networks consists of vectors of all zero values except for a 1 in element i, where i is the class they are to represent. Processing functions transform user input data to a form that is easier or more efficient for a network.

Training phase: The first step in training is to divide data for training, validation, and testing. Here we are using the method of sampling for this. The performance function used here is the mean square error mse—the average squared error between the networks outputs and the target outputs t. There are two different ways in which training can be implemented: incremental mode and batch mode. In incremental mode, the gradient is computed and the weights are updated after each input is applied to the network. In batch mode, all the inputs in the training set are applied to the network before the weights are updated. Here it is used the batch mode training with the train command which is faster and produces less errors.When training large networks and when training pattern recognition networks, ‘trainscg’ and ‘trainrp’ algorithms are good choices. Their memory requirements are relatively small, and yet they are much faster than standard gradient descent algorithms. Here ‘trainscg’ algorithm is used.

Perceptron concept: Perceptrons are simple single-layer binary classifiers, which divide the input space with a linear decision boundary. Perceptrons can learn to solve a narrow class of classification problems. Classification with pattern recognition gives more precise and accurate results.

4.3 Prediction Algorithm

When delay lines are used with multilayer feedback networks it can be used for prediction purposes. Some of the methods here used include NARX, NAR, etc.

Simple NARX method: Here after importing the inputs and targets, the delay values are specified. The typical workflow is to fully create the network in open loop, and only when it has been trained it is transformed to closed loop for multistep-ahead prediction. Thenby using ‘narx’ command the NARX network is created according to the hidden layer size given. Then the network is trained and simulated. The errors are plotted. For changing the series parallel configured network to parallel configuration ‘closeloop’ command is used. It helps for the multistep-ahead prediction (Fig. 5).

Fig. 5
figure 5

Closed loop network for multistep-ahead prediction

NARX network with training algorithm: Here the same NARX network is used along with the training steps which is explained in the classification part. The ‘trainlm’ algorithm is used to train the network. It is one of the fastest back propagation algorithm.

Function fitting networks: Function fitting is the process of training a neural network on a set of inputs in order to produce an associated set of target outputs. Once the neural network has fit the data, it forms a generalization of the input-output relationship and can be used to generate outputs for inputs it was not trained on. It can be used in the case of sensor values also.

NAR, Nonlinear input-output methods can also be used for the purpose. Only inputs differ in that case.

5 Results

The following images illustrate k-Means clustering applied to a set of randomly generated 2-d data points. The points are generated using a normal distribution cantered at a mean location and with a constant standard deviation. The section contains the output samples as well as the performance graphs of classification and prediction. Classifier outputs are saved in workspace. The 1 in first column indicates class 1, i.e., satisfactory performance. Here instead of exact value, approximated value is an output like 0.99 (Fig. 6).

Fig. 6
figure 6

Output waveform of groundspeed sensor

Performance graph: The graph shows the mse (mean squared error) of training, validation, and testing phases according to epochs. Performance is measured in terms of mean squared error, and shown in log scale. It rapidly decreased as the network was trained. Network gives the best performance at epoch 45.

Error histogram: It shows an approximation of errors occurred at training, validation, and testing phases. Errors are calculated by subtracting outputs from targets.

Confusion matrix: The confusion matrix shows the percentages of correct and incorrect classifications . Correct classifications are the green squares on the matrices diagonal. Incorrect classifications form the red squares. If the network has learned to classify properly, the percentages in the red squares shows very small values, indicating few misclassifications. These performance measurements are available from the command window. These three plots, i.e., Performance plot, error histogram and confusion matrix are the outputs of classifier.

Also, Prediction can be done using the sensor values. The following graph shows the difference between the actual and predicted output. The figure illustrates the iterated prediction. The blue line is the actual output value of the sensor , and the red line is the value predicted by the NARX neural network.

The table shows the error values found in several prediction methods used. NARX with training gives better results (Table 1) (Figs. 7 and 8).

Table 1 Errors in each prediction methods
Fig. 7
figure 7

a Performance graph, b Error histogram

Fig. 8
figure 8

a Confusion matrix, b Prediction plot

By analyzing these plots we can arrive at a conclusion about the working of sensor. If it is not working properly we can do failure preventive measures so that it helps to increase the lifetime of the system. The process is comparatively simpler while considering the Bayesian networks. Thus the classifier as well as predictor outputs together help for the safety assessment of system.

6 Conclusion

This paper explains the need of machine learning algorithms to tackle very large amount of data. Safety-critical systems are those systems whose failure could result in loss of life, significant property damage, or damage to the environment. From a software perspective, developing safety critical systems is required in significant areas such as specification, architecture, verification, and process. Due to the advantages, UAVs are used in many civil and military applications such as aerial surveillance, remote sensing, and cargo delivery. Being one of the most important example of safety critical system the safe handling of such UAV systems are very important. Safety assessment of such systems can result in efficient monitoring of their performance. Such safety systems help to improve the lifetime of UAV systems. Analyzing the safety is not just concerned about the sensor faults. Many areas under which safety analysis can be used is under research. Use of ANN networks are very helpful while detecting the faults. However, the methods which use other some other techniques like Bayesian networks, Hidden markov models, etc., are also under the research.