Fault Detection of Multi-Wheeled Robot Consensus Based on EKF

: Synchronizing a network of robots in consensus is an important task for cooperative work. Detecting faults in a network of robots in consensus is a much more important task. In considering a formation of Wheeled Mobile Robots (WMRs) in a master–slave architecture modeled by graph theory, the main objective of this study was to detect and isolate a fault that appears on a robot of this formation in order to remove it from the formation and continue the execution of the assigned task. In this context, we exploit the extended Kalman filter (EKF) to estimate the state of each robot, generate a residual, and deduce whether a fault exists. The implementation of this technique was proven using a Matlab simulator.


Introduction
In recent years, there has been a significant shift in focus toward cooperative multiagent control (MAS) within the realm of control research.This shift is driven by its rapid advancement across various domains, including several robot systems, intelligent transportation, and numerous industrial setups [1][2][3][4][5].The primary benefit of MAS lies in its ability to enhance system functionality, often overcoming challenges that may prove difficult for humans or even entirely superseding human involvement in executing tasks that are repetitive, hazardous, or beyond human capability [6].Consequently, the importance of fault detection and isolation has escalated, ensuring safety and maintaining quality standards.Given the inevitability of faults in embedded systems such as wheeled mobile robots (WMRs), it is imperative to ensure that they are promptly identified and addressed.To facilitate and guarantee communication between robots, graph theory is used, which plays a crucial role in modeling the interactions and communication between multiple robots.In representing the robots as nodes and their communication links as edges, graph theory provides a framework for analyzing and designing consensus algorithms.This theoretical foundation is critical in ensuring that all robots in the network can agree on a common set of parameters or states, despite potential faults or communication delays.
Within computer networking, the master-slave model serves as a communication protocol wherein a designated device or process (referred to as the master) governs one or more other devices or processes (the slaves).In a master-slave relationship, the master is often the transmitter of control to the slave.
Master-slave systems often provide data security, improved consistency, and robust fault tolerance.However, their significant drawback arises in the event of master failure, which can lead to the entire system's failure, causing process malfunctions and subsequent degradation in performance [7].Hence, the necessity of implementing process monitoring and fault detection systems becomes paramount, especially in applications like wheeled robots.This prompts exploration into fault diagnosis techniques to effectively address this challenge.Fault detection and isolation (FDI) has garnered substantial attention in both academic and industrial spheres, as evidenced by recent publications, for example, [8].According to [9], this methodology is typically categorized into three overarching groups: hardware redundancy methods, model-based methods, and signal analysis methods.There are two other main forks: quantitative approaches and qualitative approaches.In the literature, considerable attention has been directed toward the observer-based technique.For instance, in [10], a method utilizing Kalman filter identification was utilized for the detection and isolation of sensor faults within mobile robotic systems.Also, in [11], the authors presented the integration of a bank of Kalman filters with an expert system for the detection and isolation of sensor faults in mobile robots.Additionally, [12] introduced a Kalman filter designed for joint state prediction and unknown input estimation within linear stochastic discrete-time systems subject to intermittent unknown inputs in measurements.FDI in nonlinear systems has increased significantly in recent years because most of the systems we encounter in practice are nonlinear.For example, in [13], the FDI system is based on a single-model EKF filter that generates residuals as soon as the behavior of the aircraft deviates from the expected trajectory.Also, refs.[14,15] directed their focus toward fault detection in wheeled mobile robots utilizing an EKF filter.The fault detection process typically involves two primary steps: residual generation and subsequent residual evaluation.In our contribution, we will emphasize the observer-based approach, particularly the utilization of the extended Kalman filter.
The main contribution of this article is to detect and isolate faults in a network of robots synchronized to carry out a common task in a master-slave configuration.Robot synchronization is based on graph theory, and fault detection is implemented via the Extented Kalman Filter approach.A new procedure is established to isolate the defective robot from a formation of robots, the majority of which are affected by a defect appearing in one robot.
To present our investigation on fault detection and isolation within a nonlinear system, specifically a wheeled mobile robot, utilizing the extended Kalman filter, this paper is structured as follows.The first section outlines the modeling of a unicycle mobile robot.In the subsequent section, we delve into the extended Kalman filter (EKF) as a corrective predictor technique.This section covers two primary tasks, encompassing prediction and correction phases, alongside the fault diagnosis steps, which include residual generation, evaluation, and decision-making processes.Following this, simulations are presented to illustrate the exploitation of the EKF to detect and generate residues for a faulty masterslave system.Finally, the last section concludes the paper.

Multi-Wheeled Robot Consensus
In this section, we delve into the consensus algorithms for multi-wheeled robots, utilizing graph theory to model and analyze the interactions between robots.By employing graph-theoretic concepts, we can design robust consensus protocols that ensure that all robots achieve a unified state.

Notation
We denote the set of real numbers as R. The notation R n represents the real vector space with n dimensions, while R n×n denotes the set of n × n matrices.A diagonal matrix of size n × n, with diagonal elements q 1 , q 2 , ..., q n , is denoted as diag(q 1 , q 2 , ..., q n ).The identity matrix is represented by I ∈ R n×n .The Kronecker product of matrices is denoted by ⊗.Additionally, we utilize x = (x 1 , ..., x n ) T to signify the vector in R n .The T in the exponent means transposition.

Graph Theory
Understanding the fundamental concepts of graph theory is indispensable for exploring the dynamics of multi-agent systems [16].Consider a multi-agent system comprising n mobile robots interconnected through a communication network.The interaction model among agents can be represented by delineating the communication topology in the form of a graph.
Consider G t = (Λ, Υ) an oriented graph, where Λ = [Λ 1 , Λ 2 , ..., Λ n ] represents the set of nodes.Each node i represents the i th agent, and represents the collection of edges linking the nodes, where N i denotes the set of node indexes connected to the i th node.Here, (i; j) signifies a connection between nodes i and j, with j being in N i , although i may not be in N j .Therefore, (i; j) and (j; i) do not obligatory denote the same edge.These node connections are consolidated into a matrix M d = [a ij ], known as the adjacency matrix or connection matrix, with dimensions N * N .The elements within the matrix indicate whether pairs of vertices are adjacent in the graph or not.
The degree matrix Q is a diagonal matrix of size N × N, providing information regarding the number of edges connected to each node.
The components within this matrix are as follows::

Closed-Loop System
Consider a collection of N = 3 agents of significant scale, wherein the conduct of each agent is delineated by a nonlinear controlled model.
Figure 1 shows the master-slave configuration considered in this study, and the matrices are as follows: Remember, the protocol can be written as follows: where P(X i ) ∈ ℜ n×m , and a ij are the adjacent elements linked to G.

Wheeled Mobile Robot Modeling
A unicycle is a robot driven by two independent wheels.It moves in a planar area referenced by an inertial reference (0,⃗ x,⃗ y).The kinematic model is illustrated in Figure 2. The continuous state-space representation is given as follows: where x and y denote the position along the x-axis and the y-axis, respectively; v ∈ ℜ represents the linear speed associated with the center of mass; θ is the orientation angle; ω is the angular speed of the center of mass; a is the acceleration; and u represents the input vector u = ω a T .Then, the generalized robot model is given by where X = x y θ v T is the state vector, and C = 1 0 0 0 0 1 0 0 is the observation matrix that provides the system its observability condition.We studied a sinusoidal trajectory, so we developed a regulator that allows us to control the robot.
For this, we used the method of linearizing looping.The command will be, in the end, as follows: If we define the error vector, e = (e x , e y ) the dynamics of the error are written as follows: which is stable and converges rapidly to 0. According to Euler's approximation, we discretize state model (1) using a sampling time T e as follows: Consider the desired trajectory in Figure 3.We observe that the robot master accurately follows this trajectory, which is also replicated by the two robot slaves, as depicted in Figures 4-6.
We get the responses of the master and the slaves shown in Figures 7 and 8, also the control is shown in Figures 9-11.In fact, fault detection means identifying and diagnosing malfunctions within a system.This involves recognizing deviations from the system's normal or expected behavior, which could be indicative of faults such as sensor errors, actuator failures, process disturbances, or other issues affecting the system's performance.Fault detection typically involves monitoring the system's outputs and comparing them to the predicted values based on a model of the system's normal operation.The extended Kalman filter (EKF) plays a crucial role in this process by providing a dynamic model that can estimate the system's state variables and predict future outputs.Any significant discrepancies between the predicted and actual outputs can indicate the presence of a fault.
Within the extended Kalman filter framework, the nonlinearities inherent in the system dynamics are approximated using a linearized rendition of the nonlinear model based on the most recent state estimate.Let us consider the system characterized by the following state equations: ρ(k) and γ(k) denote the process and observation noises, which are assumed to have a zero mean with covariances Ψ ρ k and Ψ γ k , respectively.Function f , defined as nonlinear according to Equation (7), is employed to compute the predicted state from the previous estimate, as is function h for predicting the measurement from the predicted state.However, due to the nonlinearity of f and h, a Jacobian matrix of partial derivatives is computed, since these functions cannot be directly applied to the covariance.

Hypothesis:
As stated in [17], when the extended Kalman filter (EKF) is applied to a system and placed in a canonical observation form, it gains the following properties associated with global convergence:

•
The pair of matrices (A, C) is detectable, which means that there is no unstable mode or no observability in the system.

•
The signals ρ(k) and γ(k) are central Gaussian white noises.The Density Power Spectral (DSP) covariances where E[..] represents the mathematical expectation.The latter equation illustrates the stochastic independence of the noises ρ and γ.This assumption is introduced to simplify the subsequent calculations but is not obligatory.

Correction:
• Updated state estimate: • Updated covariance estimate: • Innovation covariance: • Near-optimal Kalman gain: Prediction: • Predicted covariance: where A k is the linearized matrix of the function f , which is written as follows: Remark 1. Occasionally, numerical issues can cause the covariance of innovation Z k to lose its positive definite nature.In such instances, it is advisable to substitute the equation for covariance estimation with The replacement will always ensure a positive, definite outcome, even if the matrix Ψ k/k−1 is not.Consequently, the Kalman equations will exhibit greater stability, as any minor deviations in the positive definite nature of the covariance matrices will be corrected in the subsequent iteration.According to (14), Suppose that the signals γ k and ρ k are Gaussian white noise with a unit covariance matrix; that is to say, Also, we take the sample time Te = 0.01.

Fault Diagnosis Steps
Figure 12 describes the fault detection procedure in the master-salve robot configuration.Generally, a fault diagnosis system follows three steps: a residual generation, a residue evaluation, and a decision logic [18].

Step 1: Residual generation
The residual generator generates a fault indicator vector, or residual vector, denoted r, based on the measurements of the input and output variables of the system.The nominal value of the residue, excluding transient effects, is theoretically equal to zero under the normal operating conditions of the monitored system.When a fault appears, this residual moves away from zero depending on the fault.

Step 2: Residue evaluation
The residual evaluation module consists of measuring the residue and determining whether the system is functioning properly or not using specific algorithms and methods [18].Detecting a fault typically involves comparing the residues with a predetermined detection threshold t th .This threshold represents a crucial aspect of residual-based FDI methods, defined as the boundary value for the deviation of a residue from zero.Thus, the process of fault detection proceeds as follows: Excessively high thresholds may result in failing to detect a fault (missed alarm), while overly low thresholds may lead to false alarms, detecting faults in healthy conditions [19].There exist two categories of thresholds [8]: the first being a constant threshold, and the second, an adaptive one.The adaptive threshold is employed to accommodate the inevitable parameter uncertainty, disturbances, and noise encountered in practical applications.

Step 3: Decision
This step involves examining the outcome of evaluating a set of residues, and, based on the pattern of activated and non-activated tests, it generates a determination regarding the faulty component within the monitored system.

Closed-Loop System
The closed-loop system was used in Simulink/Matlab and is shown in the functional diagram in Figure 13.The robot was controlled in order to follow a desired trajectory given by P d = [x d , y d ] T , as shown in Figure 14.

Simulation Results
We noticed that the robot master follows the desired trajectory (see Figure 15).The fault scenario addressed involves an offset applied to the x measurement at the 15 s mark.Subsequently, we applied our Extended Kalman Filter (EKF), and the resulting robot trajectory is illustrated in Figure 16.
It is observed that there is a slight deviation attributable to the applied fault, yet the robot continues to track the same trajectory consistently.
Furthermore, upon introducing a fault (considered an intermittent fault, such as a switch) to a parameter at time t = 15 s, a minor peak is observed (see Figure 17), after which the robot promptly returns to its intended trajectory.Hence, it can be concluded that the Extended Kalman Filter effectively identifies the fault introduced into the system.

Fault Detection in Multi-Robot System
In the preceding section, the system (consisting of a robot master and slaves) executes its trajectory within an ideal environment.However, real-world environments lack such ideal conditions.Thus, we aimed to introduce a fault and observe how the system responds to the challenge.Indeed, the multi-robot system under fault is described in the following figure (see Figure 18).It was observed that the robot master adheres to its trajectory, as depicted in Figure 3. Subsequently, we induced an offset fault in the master robot's x measurement at 15 s, as illustrated in Figure 19.Furthermore, the simulations of the controllers for both the master and the slaves are illustrated in Figures 25-27, respectively.It is observed that the robot master adheres to the desired trajectory until time t = 15 s, at which point it deviates slightly.However, after a few seconds, it resumes following the trajectory initially set.Meanwhile, our attention is directed toward the behaviors of the robot slaves, which entail two cases for investigation: firstly, when a robot slave operates without fault, and secondly, when a robot slave is subjected to a fault injection.The simulations depicted in Figures 21 and 22 revealed the impact on the functionality of the slave robot.Notably, a minor peak is observed in the slave responses (refer to Figures 23 and 24), following which it swiftly resumes its trajectory.

Fault Diagnosis
To utilize the extended Kalman filter (EKF) for fault detection in a wheeled mobile robot, the following procedural steps are advised: 1-System Modeling: Develop a comprehensive model that characterizes the robot's behavior under both normal operating conditions and various fault scenarios.
2-State Estimation: Implement the EKF to estimate the current state of the robot utilizing sensor measurements.
3-Fault Models: Define specific fault models detailing how each fault impacts the robot's state and sensor measurements.
4-Residual Calculation: Calculate residuals by computing the disparity between actual measurements and estimated measurements, based on the fault models delineated in the preceding step.
5-Fault Detection: Employ statistical tests or threshold-based techniques on the residuals to identify the occurrence of faults.

6-Fault Diagnosis:
Initiate the fault diagnosis phase subsequent to the detection of faults.For establishing thresholds, the system should first undergo simulations under faultfree conditions, followed by simulations with faults.The fault-free simulations aid in determining thresholds t th through the application of the three-sigma method: where σ denotes the standard deviation of residual r.
Note that σ reflects the EKF accuracy and is calculated based on the EKF error: As mentioned in the previous section, the fault is said to be detected when the residual exceeds the threshold more than |t th |.
Based on the EKF in our case, we calculated the difference between the values of the robot's state vector and the values of the estimated state vector X e .So four residuals are generated for each robot: where the index e means the estimated value.Each residual is compared to the threshold.Table 1 summarizes the signatures of the residuals under a fault applied to the robot master and the slave robots.The different residual signatures allow for fault isolation.We notice that when the fault appears in the robot master, the other two robots (slaves) are affected.On the other side, if we insert the fault in the robot slaves, the master is not affected, so we conclude that the fault affects only the following robots.Hence, we can say that the fault propagates in one direction only.As shown in the figures (Figures 28-30), a fault appears at time t = 15 s and is detected, and the detection delay does not affect the system performance.

Residue of Residue of Residue of Fault on Master Robot First Slave Robot Second Slave Robot
Master robot 1 1 1 First slave robot 0 1 1 Second slave robot 0 0 1

Conclusions
In this paper, we consider the architecture of a network of three robots, with a master and two slaves working in consensus.The main task is assigned to the master, and the two slaves follow.Graph theory is used to model the whole system.Next, in order to continuously estimate the state of each robot, an extended Kalman filter is assigned to each robot.The residual generator compares the current state of the robot with its estimated state.It deduces whether a fault has occurred or not.We noticed that faults propagate from the master to the slaves according to the orientation of the arcs in the graph.In analyzing the fault signature table and the adjacency matrix (A), this observation allowed us to isolate

s 1 :
The first slave robot, • s 2 : The second slave robot, • X d = x d y d θ d v d T : State vector of the desired trajectory, • X m = x m y m θ m v m T : State vector of the master robot, • X s1 = x s1 y s2 θ s1 v s1 T : State vector of the first slave robot, • X s2 = x s2 y s2 θ s2 v s2 T : State vector of the second slave robot, • u m = u ml u mr T : The left and right controllers of the master robot, • u s1 = u s1l u s1r T : The left and right controllers of the first slave robot, • u s2 = u s2l u s2r T : The left and right controllers of the second slave robot.

Figure 7 .
Figure 7.The x coordinate of the desired trajectory of the master and the slaves.

Figure 8 .
Figure 8.The y coordinate of the desired trajectory of the master and the slaves.

Figure 9 .
Figure 9.The control of the robot master.

Figure 10 .
Figure 10.The control of the first robot slave.

Figure 11 .
Figure 11.The control of the second robot slave.

Figure 12 .
Figure 12.A block diagram illustrating fault detection in a master-slave robot system.This configuration has the following components: • Master Robot: Sends control commands to the Slave Robot.• Slave Robot: Execute actions based on the received commands.• Sensors: Collect data from the environment and the robots' states, providing inputs for the EKF.• Actuators: Perform the necessary actions in response to control signals.• Extended Kalman Filter (EKF): Estimates the system's states based on sensor data and predicted models.

Figure 14 .
Figure 14.Desired trajectories x d and y d .

Figure 15 .
Figure 15.Coordinates x and y of the desired trajectory and the mobile robot.

Figure 16 .
Figure 16.Trajectory of the mobile robot when fault applied at t = 15 s.

Figure 17 .
Figure 17.Coordinates x and y of the mobile robot when fault applied at t = 15 s.

Figure 19 .
Figure 19.The fault applied at time t = 15 s.The responses of both the master and the slaves are depicted in the subsequent figures (Figures20-22).It is observed that the trajectory of the robots experiences a slight disturbance at a specific time, yet it promptly returns to its intended path without deviating from the desired trajectory.

Figure 20 .
Figure 20.The trajectory of the robot master with fault applied at time t = 15 s.

Figure 21 .
Figure 21.The trajectory of the first robot slave with fault applied at time t = 15 s.

Figure 22 .
Figure 22.The trajectory of the second robot slave with fault applied at time t = 15 s.

Figures
Figures23 and 24show the x and y measurements of the desired trajectory, the master and the slaves, respectively.Furthermore, the simulations of the controllers for both the master and the slaves are illustrated in Figures25-27, respectively.It is observed that the robot master adheres to the desired trajectory until time t = 15 s, at which point it deviates slightly.However, after a few seconds, it resumes following the trajectory initially set.

Figure 23 .
Figure 23.The coordinate x of the desired trajectory of the master and slaves.

Figure 24 .
Figure 24.The coordinate y of the desired trajectory of the master and slaves.

Figure 25 .
Figure 25.The control of the robot master.

Figure 26 .
Figure 26.The control of the first robot slave.

Figure 27 .
Figure 27.The control of the second robot slave.

Figure 28 .
Figure 28.The residual of the three robots when a fault is applied on the master .

Figure 29 .
Figure 29.The residual of the three robots when a fault is applied on the first slave.

Figure 30 .
Figure 30.The residual of the three robots when the a fault is applied on the second slave.
Analyzes the residuals to detect any discrepancies indicating potential faults, triggering appropriate responses if faults are detected.