Académique Documents
Professionnel Documents
Culture Documents
OF INDUSTRIAL ENGINEERING 1
I. Problem Statement As a result, each agent will know the distance from
I N this paper, a simulated solution for the cooperative the other agent, the distance from the TAGs in its
localization of two UAVs that can fly inside a room is neighborhood and their position.
presented.
The main idea is that both agents have communication,
processing and measurement capability, as well as a II. Modeling
limited communication and sensing range.
A. Environment
Each agent i receives velocity inputs in order to perform
a specified trajectory. Thanks to the knowledge of these The environment is modeled as a 10x10x10 m room,
inputs, the drone can propagate its equation of motion with landmarks represented as points placed on roof, floor
and walls as shown in fig. 1 and tab. I.
xik+1 = f i (xik , uik , nik ) (1)
where
• f is the system function,
i
A. Initialization
x̂i− (k + 1) = Ax̂i+ (k) + Bui (k) (9)
Consider the two UAVs belonging to the set U = {a, b}.
At iteration k=0, the algorithm is initialized as Pi− (k + 1) = APi+ (k)AT + Q(k) (10)
where x̂i+ is the state estimate, Pi+ is the state covariance C. Update step
estimate and P+ ij is the cross covariance matrix between Suppose that drone a performs distance measures from
agents i and j. the other drone b. So a becomes the temporary master
with b becoming the temporary slave. The measurement
B. Prediction step vector for this stage of the algorithm becomes
At iteration k, equation 5 can be written as (12)
zab (k + 1) = dab .
xi (k + 1) = Axi (k) + Bui (k) + ni (k) (8) Slave sends its predicted position, covariance and cross
where covariance estimates to the master. Given those informa-
tion, the role of the master is to ensemble the vectors and
• A = I3 is the state transition matrix,
matrices necessary for the calculations, and to send them
• B = t(k)I3 is the input to state matrix.
to the slave so that it can perform the update step as well.
The process noise ni (k) has covariance Q(k), this matrix
• rab is the residual of the relative measurement;
is estimated accordingly to the errors that are assumed to
• Sab is the covariance of the residual;
be caused by he model.
• Ha and Hb are the state observation matrices;
The propagation stage of the Kalman Filter can then
• Ki is the Kalman gain.
be written as
pi =
q
N
X (x̂i+ i 2 1+ 1 2 1+ 1 2
k − xk ) + (ŷk − yk ) + (ẑk − zk ) (20)
N
k=1
A.
After a few seconds, agent 1 has a malfunctioning,
it cannot perform distance measures of any kind and
cannot communicate. Agent 2 can rely on landmarks
Fig. 2. This plot shows the difference of the component of velocity if
UAV 1 from the input velocities. To simulate a malfunctioning, real measurements only.
x and y velocities are set 1.5 times the input velocities. In this way, agent 1 propagates its position according
to its model, on the basis of wrong information on
the velocities. Its covariance increases over time and its
position estimates is affected by an error (see fig. 4). On
the other side, agent 2 can localize itself thanks to the
landmark measurements and the Kalman Filter ((see fig.
5)).
As a consequence, the two root mean square errors used
as performance indexes take the following values:
p1 = 3.433m
p2 = 0.064m.
Fig. 5. Estimated VS real trajectory for agent 2 in situation ”A”: Fig. 7. Estimated VS real trajectory for agent 2 in situation ”B”:
after an initial error (due to the fact that the UAV does not know localization performances are similar to the previous case.
its initial position) agent 2 can localize itself with a small error.
D.
In this scenario, both UAVs can perform landmark
distance measures only. The algorithm then becomes a
Fig. 6. Estimated VS real trajectory for agent 1 in situation ”B”: standard Kalman Filter, executed independently by the
the position estimation is better than the previous case, thanks to agents. With respect to situation C, only a small loss
the ”help” from agent 2. in performances is noticeable. The highest effect can be
qualitatively seen for UAV 1 in fig. 10, when it travels in
the central part of the room, where it is too far from the
landmarks. This is confirmed by the values of the indexes:
UNIVERSITY OF TRENTO, DEPT. OF INDUSTRIAL ENGINEERING 6
Fig. 8. Estimated VS real trajectory for agent 1 in situation ”C”: Fig. 10. Estimated VS real trajectory for agent 2 in situation ”D”:
the position estimation is better than the previous cases ”A” and there is a loss of accuracy while traveling in the central part of the
”B”. In this scenario, in fact, drone 1 is capable to perform both room, where it is too far from the landmarks.
landmark and relative measures.
Appendix A
Matlab Implementation
The full simulation code can be found at the following
URL.
https://drive.google.com/drive/folders/
11tDjJEaCuZCsXcBKZz5XxSpf1_usRxJB?usp=sharing
Figure 12 represents a flow chart where the most impor-
tant functions have been highlighted, so that it can be
used as a reference while reading the code.
References
[1] S. Kia Solmaz , Rounds Stephen , Martinez Sonia, ”Coopera-
tive Localization for Mobile Agents: A Recursive Decentralized
Algorithm Based on Kalman-Filter Decoupling”, 2015.
[2] Fontanelli Daniele, ”Distributed System for Measurement and
Automation class notes”, 2016-2017.