A Probabilistic Approach To Aircraft Conflict Detection Engineering Essay

Published: 2021-06-30 20:15:05
essay essay

Category: Engineering

Type of paper: Essay

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Hey! We can write a custom essay for you.

All possible types of assignments. Written by academics

GET MY ESSAY
ABSTRACT:
The project mainly deals with the implementation of probabilistic approach on aircraft conflict detection.
In the paper on probabilistic approach on aircraft conflict detection,conflict detection and reesolution schemes for midterm and short term future are discussed.Randomised algorithms are developed in the paper for conflict detection and resolution schemes.
In this project conflict detection and resolution schemes and the randomised algorithms used in it are implemented for the mid term future.The project is impelmented in the MATLAB environment.Prediction models are developed and the conflict detection schemes are discussed in MATLAB environment.
List Of Some terms:
ADSB :Automatic Dependence Surveillance Broadcast
ARTCC :Airroute Traffic Control Centre
ATC :Air Traffic Control/Controller
CTAS :Centre TRACON Automation System
FMS :Flight Management System
GPS :Global Positioning System
TMA :Terminal Maneuvering Area(European equivalent of TRACON)
TRACON :Terminal Radar Approach Control(USA equivalent of TMA)
INTRODUCTION
The main objective of the paper ‘’A probabilistic approach on aircraft conflict detection’’is to ensure the safety in the aircrafts.
Despite many technological advances still safety is a major criteria in the aircraft sector.Despite having powerful onboard computers,Global positioning systems(GPS),still the present day Air Traffic Management systems(ATM)s consists of a
Rigidly structured airspace
A centralized human operated system architecture
Rigidly structured airspace where the aircraft has to follow the predefined ways of the ATM without following self decisive optimal routes and favourable winds.
On the other hand the centarlized human operated system architecture in which the Air traffic controller(ATC) is responsible for issuing the prompts for seperating two aircrafts.
In the present days where the demand for the air traffic is increased the stress for the automation systems to be developed in the ATC ‘s is also increased.The increase in the automation simplifies the role of the human operators with increased efficiency of the ATM’s.
The safety can be ensured by a safe distance seperation between two aircrafts.
Normally the horizontal seperation will be greater than 5 nmi, where as inside the terminal radar approach control area(TRACON)area it is 3 nmi.
The vertical seperation will be 2000 ft above 29000 ft altitude and 1000 ft at FL290.
Before the advent of the global positioning systems (GPS) the aircraft control is done by the VHF Omni directional ranging points(VOR) points, to get accurate information about their position.
Current ATM system:
The current ATC’s cannot guarantee the safety in the aircrafts due to the fact that the ATC’s can only control the aircrafts which are travelling in the predefined air paths as instructed by them.
The current ATC structure is as shown in the fig : 2
’’ (2)
’’(2)
Where you can observe the aircrafts (A/c) are controlled by the central Air Traffic control (ATC) whenever the aircrafts move in the predefined air paths. Information is exchanged in the form of voice, secondary Radar. In the fig 2 the solid lines represent the flow of commands and dotted lines represent the flow of information. This is a routine direct communication and no communication is there between the two aircrafts.
The following table shows the accidents that occur due to the mid air collisions and run way incursions.
May be Conflict detection and resolution(CDR)algorithms are used for this purpose to minimise the mid-air collisions and runway incursions.
ref(2)’’
ref(2)’’
Safety is the major criteria in the process of automation.The process of automation of the aircrafts which inturn help in the less involvement of the human involves two stages
Conflict prediction
Conflict resolution
Conflict prediction :
In this stage,a prediction model for the aircraft is developed based on the flight plans which are given previously and if the flight paln violates the safe seperation distance i.e.horizontal distance<5nmi then a potential conflict is declared.
Conflict resolution:
In this stage,whenever the conflict is declared,conflict resolution is done by modifying the flight plans or re-planning the flight plans.
Conflict prediction and resolution is done at three levels of the Air traffic management(ATM)process.
Short range
Mid range
Long range
Short range:
Conflict prediction and resolution are carried out on board over seconds by Flight management systems(FMS).And Traffic Alert collission avoidance system (TCAS)is presently working on commercial aircrafts with less number of passengers.various algorithms were developed in this paper for this purpose.
Midrange:
Here conflict prediction and resolution is carried out in the order of ten minutes.Flight plans were modified in the order of 10-20 mins.Several algorithms were developed in this paper for this purpose.Semi automated ATC’s are developed to assist ATC’s.
Presently TRACON operating this in the Terminal area and URET(User request evaluation tool)operates on enroute airspace.
Long range:
Conflict Prediction and resolution is carried out in the order of 3-5 hours.Conflict prediction and resolution is carried out at the level of NAS(National airspace system) .Flight plans are given on hourly basis to ensure that the airport and sectors capacities are not exceeded.
The main vision or goal is nothing but the free flight.That is the conflict detection and resolution is carried out by the flights itself from the time of its starting origin to the destination.
Probabilistic approach in conflict detection:
In this paper probabilistic approach in conflict detection is carried out and the probabilistic approach is carried out by predicting the model basing on the uncertainities in motion and the probabilities for the projected conflicts are calculated.
In this probabilistic approach the external perturbations that are affecting the aircraft motion are taken into consideration.The along track errors and cross track errors are taken into consideration where the equations for the along track and cross track errors are given by the following equations.
Variance of along track error growing quadratically with time is given by
Variance along track σa² = ra² *t²
Where ra is the along track component usually ra=0.25
Variance of the Cross track error is given by
Variance cross track = σc² (1-exp(-2*(rc/σc)*v1*t)
Where σc=1nmi,rc=1/57, v1=velocity and t=time .
Note:The values are as given in the paper.
The model is accurate for predicting the model for every 20 minutes and the pilots correct the cross track component and the along track component in the long term.
The paper mainly deals with with the short range and the mid range,however in this project we are going to discuss about the implementation in midrange in detail.
The role of the midrange model is to provide centralised conflict information to the ATC’s.
When compared with that of the montecarlo approach this probabilistic approach is quite intensive hence extensively used for the online implementation ,where on the other hand the montecarlo implementation does not require particular approach hence it is used in the offline analysis.
The prediction model is developed in the midrange model which is rather simple and realistic,but closed form expression cannot be obtained.The performance is compared with that of the montecarlo approach.The proposed midterm algorithm is better at the cost of increasing computational load.However we prove that as we go from 2-D to 3-D the computational load will not increase.
The project mainly deals with the implementation of the paper in MATLAB environment.
Mid range conflict detection:
Now in the current project we are going to see how the trajectories are predicted over a time horizon and the conflict is predicted over the time and the probability of conflict is known.
The positions of the two aircrafts are predicted over the time interval from 1-60 and the relative positions are plotted for various headings
eg:one aircraft at 60 ۫ and other aircraft at 90 ۫.
Now the presence of conflict is assumed by calculating the distance between the selective points.If the distance is less than the assumed conflict distance that is 5nmi then a conflict is detected.
Then the uncertainities are taken into consideration and the trajectories are obtained by considering the along track and cross track errors into account.
Now the probability of conflict is calculated by taking Number of attempts and Total number of conflicts into effect.
The probability of conflict is calculated by the following formula
Probability of conflict(PC) =Total number of conflicts/Number of runs.
The graphs obtained showing the trajectories are clearly shown in the figs below.
Methodology
The matlab code implemented for the prediction models and conflict detection models are given at the end in the appendices.
The method of predicting the positions of the aircrafts over a time interval is understood clearly from the following equations.
X(t)=A*X(t)+n(t)
Where in the above equations X(t) constitute the positions and the n(t) constitute the external perturbations that are the uncertainities in the aircraft motion caused due to the along track and cross track errors.
Now differentiating the above equation inorder to predict the future positions
dX(t)=A*X(t)dt+n(t)dt
where dX(t) implies the differentiation of the position X(t).
This implies
X(t+1)=X(t)+A*X(t)dt+n(t)dt
In terms of continuous intervals,
dX(t)/dt=A*X(t)+n(t)
dX(t)=A*X(t)dt+n(t)dt
In terms of discrete time intervals dt=∆t
Now the equation becomes,
dX(t)=A*X(t)∆ t+n(t)∆t
generally
dX(t)=X(t+1)-X(t)
therefore,
equation becomes,
X(t+1)-X(t)=A*X(t)*∆ t+n(t)*∆t
Therefore
X(t+1)=X(t)+A*X(t)*∆t+n(t)*∆t
Where X(t+1) is the current position of the aircraft and X(t) is the previous position of the aircraft.
And n(t) which is said to be the effect of the perturbations due to the along track and cross track errors and it is taken as the random value by taking the mean and variances into account.
σa² = ra² *t²
Variance cross trackҲ2(t) = σc² (1-exp(-2*(rc/σc)*v1*t)
n(t)=randn(mean,variance)*Rotation vectorR(Ө)
where variance vector is obtained as a diagonal matrix by combining the along track and cross track variances.
Let σa be the along track variance and σc be the cross track variance then
Variance matrix is given by V(t) =sigma*√∆t
where Sigma is a diagonal matrix=( σa² 0
0 σc² )
Where variances along alongtrack and cross track directions is taken as above.
Now in the first section the code is developed neglecting the stochastic part and afterwards the stochastic part is included.
Different examples are taken for clearly explaining the predicted positions and their conflict predictions.
Illustration of the positions of twoaircrafts one at 60۫ and other at 90۫:
In our case in the first example,to aircrafts are taken one with a heading of 60۫ and other with a heading of 90 ۫ .The heading is the angle made by the position vector with respect to the axes.
The intial position of the first aircraft is taken as a vector position=[0 0]’ and the intial position of the second aircraft is taken as position1=[0 30]’.
And the time interval is assumed to be taken from 1-60time intervals and the increment in the time is taken as ∆t=1
And the velocity vector is taken as v=3*[sin(h) cos(h)] where h is the heading that is the angle made by the position vector of the aircraft with respect to the axes.The following fig.explains how the position vector makes angle with respect to the axes.
Fig:explaining the how the heading is taken for the aircraft
The above fig.explains how the heading of the aircraft changes for various angles.
Now the position is incremented and the plot is obtained as shown in the fig in the results by incrementing over a time interval from 1-60 ,
i.e X(t+1) =X(t)+V*∆t
where X(t+1) is the current position and X(t) is the previous position and ∆t is the time increment.
and the equation therefore is
Position=[position,position(:,end)+v*deltat]
The positions can be plotted using the plot tool
Plot(position(1,: ),position(2,: ))
The plot is as shown in the results below
The above equation is implemented for both the aircrafts and the plots are obtained.
Fig: Illustrating the positions of the aircrafts for headings(60deg,90deg)
Illustration of motion of two aircrafts in a zig-zag path one aircraft with heading change(60۫-300۫) and the other aircraft with heading change(300۫-60۫):
Now to understand clearly what we have done above another example is taken into consideration.
In this example the two aircrafts are assumed to be travelling in a zigzag path
The time intervals are taken from 1-120 for our convinience where the aircrafts travel in a straight line path from timeintervals 1-60 and after 60th interval the heading changes.
For this case ,for the first aircraft the intial position is taken as [20 0] and for the second aircraft the intial position is taken as [100 0]and by implementing the headings as required
For aircraft 1
From 1-60 time intervals,heading= 60۫
From 60-120 time intervals,heading= 300۫
For aircraft 2,
From 1-60 time intervals,heading= 300۫
From 60-120 time intervals,heading= 60۫
Now the same position equation is incremented i.e
X(t+1) =X(t)+v*∆t
Position=[position,position(:,end)+v*deltat]
Thus the plot for various positions can be obtained as shown in the fig .
Fig: Illustrating the positions of the aircrafts for headings(60deg,300deg)(300deg, 60deg)
Note in the above two examples the effect of the external perturbations is not taken into account.
Now a montecarlo type of approach is carried out to calculate a potential conflict between the two aircrafts.In this the distance between two positions at a given time interval is calculated and it is compared with that of the ideal conflict distance i.e.5nmi.
The conflict can be predicted for the above plotted positions of the aircrafts by calculating the distance between the points at various time intervals by the distance formula.
d=√((x1-x2)² +(y1-y2)²)
and the calculated distance is compared with the conflict distance conflictD=5nmi.
If the distance is less than the conflict distance then a conflict is declared .
That is
Calculates the distance between those two positions and checks whether there is a conflict or not
Again
It moves for the next time interval to calculate the distance between the next two points if conflict is not detected.
time intervals 1-60
time interval1
positions (x1,y1)and(x2,y2)noted
Fig:Illustarting the detection of a conflict for the plotted trajectories.
If conflictD<5
Conflict=1
Else
Conflict=0
Output:
x1 =
41.5692
y1 =
24.0000
x2 =
48
y2 =
30
d =
4.7952
conflict =
1
A potential conflict is declared at positions mentioned above.
The above task is so simple and does not involve the effect of the external perturbations i.e the along track and cross track errors into consideration.
Effect of external pertubations:
Now the effect of the external perturbations is taken into effect considering the along track and cross track errors.
Let Pj be the position of the aircraftwhich is moving with a velocity ‘Vj’ then
The along track and the cross track components are as shown in the following fig.
Fig:Illustrating the along path and cross path directions.
The above fig shows the along track and the cross track directions of the aircraft.
The along track and the cross track errors are taken as the random values and it is implemented in the given equation
X(t+1)=X(t)+A*X(t)+n(t)
where in the above equation n(t) is the variable that shows the effect due to the external perturbations.
n(t) is a random variable that takes rthe random sequences produced by the along track and the cross track components.
n(t) is taken as follows.
n(t)=R(Ө)*s(t)
where R(Ө) is the rotation matrix and the ‘h’ is the heading implemented and the V(t) is the variance matrix.
Generally the rotation matrix is taken as
R(Ө)= ( cos(Ө) -sin(Ө)
sin(Ө) cos(Ө)) where (Ө) is the heading of the aircraft.
R(Ө) is the rotation matrix given by the vector notation in the matlab by
R(h)=[cos(h) –sin(h) ;sin(h) cos(h)]’; where h is the heading Ө.
And the matrix s(t) is given by
s(t)= № (mean ,variance) that is a random variable is generated by taking mean=0 and variance matrix which is given as below
where the mean is taken as ‘’0’’
variance matrix is given by the diagonal matrix sigma*√∆t
where sigma== ( σa² 0
0 σc²)
That implies
Variance=sqrt(deltat)*[w1 0;0 w2];
Where w1 = ra² *t²
Where ra is the along track component usually ra=0.25
Variance of the Cross track error is given by
Variance cross track w2(t)= σc² (1-exp(-2*(rc/σc)*v1*t)
W2=var[X2(t)] in the above equation.
Where rc=1/57,velocity v1=3 ;and σc = 1nmi.
In matrix notation,
Mean=[0 0]’;
The value sigma is multiplied by the square root (deltat) gives the variance matrix where the deltat in our instance is ‘’1’’.
And a matrix Q is generated by taking the upper triangle matrix
Q=chol(sigma)
And a random variable is generated by taking the randn function
That is
Z=mean+Q*randn(2,1)
Now the position equation
X(t+1)=X(t)+A*X(t)+n(t) is implemented in the matlab as follows where position is taken as the vector,
Position=[position,position(:,end)+v*deltat+R*z];
Where v corresponds to the velocity andR*z generates the random variable which exemplifies the effect due to the random perturbations in the along track and cross track directions.Where R is the rotation matrix.
Now we can understand the above example clearly by implementing an example.
Illustrating the effect of external perturbations for example 1 discussed above :i.e.two aircrafts moving in a straight line path with headings 60۫ and 90۫:
Now let us consider two aircrafts one moving at an heading 60deg and other moving with a heading of 90deg.
Now the position can be updated as
X(t+1) =X(t)+V*∆t+n(t)*∆t
Where X(t+1) is the current position and X(t) is the previous position and n(t) shows the effect of external perturbations.
The above said process is done by considering the position vector
Position=[position,position(:,end)+v*deltat+R*z)]
The code developed for demonstarting the above example is given in the appendix at the bottom.
The plot obtained shows the effect of the external perturbations as shown in the fig.
Fig: Illustrating the positions of the aircrafts for headings(60deg,90deg)under the effect of external perturbations for one instants
Now the headings of the two aircrafts are changed to 30۫ and 60۫ and now the plot between their positions is as shown in the following fig.
Fig: Illustrating the positions of the aircrafts for headings(30deg,60deg)under the effect of external perturbations for single instant
Now let us see the change in the headings further let the heading of the first aircraft be 22.5 deg and the second aircraft heading be 60deg and the plot between the positions of the two aircrafts under the effect of external perturbations is as shown in the following fig.
Fig: Illustrating the positions of the aircrafts for headings(22.5deg,60deg)under the effect of external perturbations for single instant
Prediction of a conflict under the effect of external perturbations:
Now the above experiment is repeated for 20 instants where we get the trajectories as shown in the following figs.
Fig: Illustrating the positions of the aircrafts for headings(60deg,90deg)under the effect of external perturbations for 20 instants.
Conflict Prediction: Montecarlo approach:
Montecarlo style of approach is carried out for the prediction of the conflict between the positions of the two aircrafts by calculating the distance between the discrete positions at the same time intervals and comparing with that of the conflict distance.
Now a conflict is predicted from the above plot by drawing distances between the positions between the two aircrafts for a specific time interval and comparing with that of the ideal conflict distance that is 5nmi and the process continues as follows.
If d Conflict declared
Conflict=1
Else
Conflict=0
Total conflict is updated
for 20 instants
this loop continues
PC=Total conflict/N(=20)
The conflict detection process is done for 20 instants.Instant1:
Distance calculation and comparing with ideal distance
Fig: Illustrating the calculation of probability of conflict under the effect of external perturbations between two aircrafts moving with headings 60deg and 90 deg
For instance take the value sigma=[1 0.5;0.5 2];(This is a fixed value but not the exact value.It is only for the sake of observation of headings of the aircrafts).
And now with a fixed variance the trajectories obtained will be as shown in the following plot.
Fig: Illustrating the positions of the aircrafts for headings(60deg,90deg)under the effect of external perturbations for 20 instants
Now the conflict distance i.e. conflictD is taken as 5nmi which is the typical value and compared with that of the distance between the two positions ,
And the probability of conflict can be calculated from the equation
Probability of conflict(PC)=Total number of conflicts/number of runs
Zig-zag path configuration under the effect of external perturbations:
Now let us change the heading for the aircrafts ,For instance take zigzag path configurations where the turns are implemented for a aircraft
Heading of the first aicraft from 1-60 time intervals = 60۫
Heading of the aircraft from 60-120 time intervals = 300۫
Now for the second aircraft
Heading of the second aircraft from 1-60 time intervals = 300۫
Heading of the aircraft from the time interval 60-120 = 60۫
The code that gives the plot of the relative positions of the aircraft is discussed in the appendix section.
The plots of the relative positions obtained under the effect of external perturbations in the zigzag path configuration is as shown in the fig.
Fig: Illustrating the positions of the aircrafts for headings(60deg,300deg) (300deg,60deg) under the effect of external perturbations for one instant
Now the above experiment is repeated for 20 instants and the trajectories are obtained as shown in the following fig.
Fig: Illustrating the positions of the aircrafts for headings(60deg,300deg) (300deg,60deg) under the effect of external perturbations for 20 instants.
For instance if we take the fixed sigma value that is the variance matrix as
Sigma=sqrt(deltat)*[1 0.5;0.5 2]; ];(This is a fixed value but not the exact value.It is only for the sake of observation of headings of the aircrafts).
Then the trajectories obtained will be simple to understand as shown in the following fig.
Fig: Illustrating the positions of the aircrafts for headings(60deg,300deg) (300deg,60deg) under the effect of external perturbations for 20 instants.
In each case we can calculate the probability of the conflict by taking considering the ideal conflict distance conflictD=5nmi and comparing the distance between the distance between the discrete points to the conflictD
The distance between the discrete points is calculated by
Distance d=√((x1-x2)² +(y1-y2)²)
This comaprision is done for 20 instants for the time intervals ranging from 1-60.
If conflictD<5
Conflict=1
Else
Conflict=0
And the conflict value is added to that of the total conflict which is intialised with ‘’0’’ at the beginning
Total conflict=Total conflict+conflict
And now the probability of conflict is calculated by taking
PC=Total conflict/N
Where N=20 in our case.
The clear illustration of the outputs obtained above are shown in the form of matlab code which is at the end of the appendix.
Thus the positions of the aircrafts are plotted under the effect of external perturbations and the probability of the conflict is then obtained by considering the number of conflicts and number of runs.
APPENDIX:
In this we can see the above discussed equations implemented in terms of matlab.The results for the below matlab codes are explained above.
MATLAB CODE:
Straight line path:
In the following code the headings of the two aircrafts are taken as
h= 60degrees and for the second aircraft h=90degrees.
clear all
close all
clc
deltaT = 1; % time step
time = [0:deltaT:60]; % time vector
position = [0 0]'; % initialize vector of positions with initial position
h = pi/3; % heading
v = 3*[sin(h) cos(h)]'; % velocity vector
for i = 1:length(time),
position = [position position(:,end)+v*deltaT];
end
plot(position(1,:),position(2,:));
hold on
position=[0,30]';
h=pi/2;
v=3*[sin(h) cos(h)]';
for i = 1:length(time),
position = [position position(:,end)+v*deltaT];
end
plot(position(1,:),position(2,:));
Straight line path:Stochastic part:
In the following code the effect of the exetrnal perturbations is taken into account and the additive random perturbations due to along track and cross track errors are impelmented.
The following matlab code presents the trajectories where one aircraft is moving at a heading 60deg and the other aircraft moving at 90 deg.
clear all
close all
clc
deltaT = 1; % time step
t = [0:deltaT:60]; % time vector
position = [0 0]'; % initialize vector of positions with initial position
h = pi/3; % heading
v = 3*[sin(h) cos(h)]'; % velocity vector
R = [cos(h) -sin(h);sin(h) cos(h)]; %rotation vector which depends on the heading
h1=pi/2;
v1=3*[sin(h1) cos(h1)]';
R1 = [cos(h1) -sin(h1);sin(h1) cos(h1)]; %rotation vector which depends on the heading
figure; hold on;
for q=1:20,
position = [0 0]';
position1=[0,30]';
for i=1:length(t),
mu = [0 0]';
w1=(0.0625)*((i)^2); %ra=0.25;
w2=(1-exp(-2*1/57*3*(i))); %velocityv=3
Sigma = sqrt(deltaT)*[w1 0; 0 w2]' %rc=1/57;
Q = chol(Sigma);
z = mu + Q*randn(2,1);
position=[position,position(:,end)+v*deltaT+z];
end
plot(position(1,:),position(2,:));
for i = 1:length(t),
mu = [0 0]';
w1=(0.0625)*(i^2);
w2=(1-exp(-2*1/57*3*i));
Sigma = sqrt(deltaT)*[w1 0; 0 w2]';
Q = chol(Sigma);
z = mu + Q*randn(2,1);
position1 = [position1, position1(:,end)+v1*deltaT+z];
end
plot(position1(1,:),position1(2,:));
end
Conflict detection:straight line:
In the following code the conflict is predicted between two aircrafts without the effect of the external perturbations for a single instant.
clear all
close all
clc
dT = 1; % time step
time = 0:dT:60; % time vector
position = [0 0]';
x1=position(1);y1=position(2);
position1=[0 30]';
x2=position1(1);y2=position1(2);% initialize vector of positions with initial position
h = pi/3; % heading
v = 3*[sin(h) cos(h)]'; % velocity vector
for i = 1:length(time)
x1=x1+v(1)*dT
y1=y1+v(2)*dT
h1=pi/2;
v1=3*[sin(h1) cos(h1)]';
x2=x2+v1(1)*dT
y2=y2+v1(2)*dT
conflictD = 9;
d = sqrt((x1-x2)^2+(y1-y2)^2)
if d <= conflictD
conflict = 1
%break % if conflict detected, terminate the for loop
else
conflict = 0
end
end
Conflict detection:PROBABILITY OF CONFLICT:
A Typical montecarlo style of approach is implemented for predicting the conflict between the two aircrafts whose flight plan is known in prior under the effect of external perturbations.The procedure of calculating the conflict is discussed in the methodology section.
In the following code the conflict is predicted over 200 instants under the effect of external perturbations and the probability of conflict is predicted .
clear all
close all
clc
dT = 1; % time step
time = 0:dT:60; % time vector
position = [0 0]';
x11=position(1);y11=position(2);
position1=[0 30]';
x22=position1(1);y22=position1(2);% initialize vector of positions with initial position
h = pi/3; % heading
v = 3*[sin(h) cos(h)]'; % velocity vector
R = [cos(h) -sin(h);sin(h) cos(h)];
h1=pi/2;
v1=3*[sin(h1) cos(h1)]';
R1 = [cos(h1) -sin(h1);sin(h1) cos(h1)];
total_conflict = 0;
t0 = cputime;
N=200
for j = 1:N
for i= 1:length(time)
mu = [0 0]';
w1=(0.0625)*((i)^2); %ra=0.25;
w2=(1-exp(-2*1/57*3*(i))); %velocity v=3
Sigma = sqrt(dT)*[w1 0; 0 w2]'; %rc=1/57;
Q = chol(Sigma);
x1_mean=mu(1);
y1_mean=mu(2);
x1_sigma=Q(1);
y1_sigma=Q(2);
x1 = x1_mean + x1_sigma*randn(1,1)*R(1);
y1 = y1_mean + y1_sigma*randn(1,1)*R(2);
x11=x1+v(1)*dT+x1;
y11=y1+v(2)*dT+y1;
x2= x1_mean + x1_sigma*randn(1,1)*R1(1);
y2 = y1_mean + y1_sigma*randn(1,1)*R1(2);
x22=x22+v1(1)*dT+x2;
y22=y22+v1(2)*dT+y2;
conflictD = 5;
d = sqrt((x11-x22)^2+(y11-y22)^2);
if d <= conflictD
conflict = 1
break % if conflict detected, terminate the for loop
else
conflict = 0
end
end
total_conflict = total_conflict + conflict
end
PC = total_conflict/N
Zig-zag path:
In this code ,headings of the two aircrafts are changed at two instants each without the effect of external perturbations.
clear all;
close all;
clc;
deltaT = 1; % time step
time = [0:deltaT:120]; % time vector
position = [0 0]'; % initialize vector of positions with initial position
i= time;
for i = 0:60
h= pi/3; % heading
v= 3*[sin(h) cos(h)]'; % velocity vector
position = [position, position(:,end)+v*deltaT];
end
for i = 60:120
h1= 5 *(pi/3);
v1=[sin(h1) cos(h1)]';
position = [position, position(:,end)+v1*deltaT];
end
plot(position(1,:),position(end,:),'r');
hold on
position = [100 0]'; % initialize vector of positions with initial position
for i = 0:60
h2= 5*pi/3; % heading
v= 3*[sin(h2) cos(h2)]'; % velocity vector
position = [position, position(:,end)+v*deltaT];
end
for i = 60:120
h3= (pi/3);
v1=[sin(h3) cos(h3)]';
position = [position, position(:,end)+v1*deltaT];
end
plot(position(1,:),position(end,:),'b');
Zig-zag path:Stochastic part:
Now in the present code the external perturbations are taken into account .And it is compared in 20 instants.
clear all;
close all;
clc;
deltaT = 1; % time step
time = [0:deltaT:120]; % time vector
mu = [0 0]';
figure; hold on;
for j=1:20
position = [0 0]';
position1 = [100 0]';
for i = 1:60
h= pi/3; % heading
v= 3*[sin(h) cos(h)]'; % velocity vector
R = [cos(h) -sin(h);sin(h) cos(h)];
w1=(0.0625)*(i^2); %ra=0.25;
w2=(1-exp(-2*1/57*3*i)); %velocity v=3
Sigma = sqrt(deltaT)*[w1 0; 0 w2]'; %rc=1/57;
Q = chol(Sigma);
z = mu + Q*randn(2,1);
position = [position, position(:,end)+v*deltaT+R*z];
end
for i = 60:120
h1= 5 *(pi/3);
v1=[sin(h1) cos(h1)]';
R1 = [cos(h1) -sin(h1);sin(h1) cos(h1)];
w1=(0.0625)*(i^2); %ra=0.25;
w2=(1-exp(-2*1/57*3*i)); %velocity v=3
Sigma = sqrt(deltaT)*[w1 0; 0 w2]'; %rc=1/57;
Q = chol(Sigma);
z = mu + Q*randn(2,1);
position = [position, position(:,end)+v1*deltaT+R1*z];
end
plot(position(1,:),position(end,:),'r');
for i = 1:60
h2= 5*pi/3; % heading
v= 3*[sin(h2) cos(h2)]'; % velocity vector
R2 = [cos(h2) -sin(h2);sin(h2) cos(h2)];
w1=(0.0625)*(i^2); %ra=0.25;
w2=(1-exp(-2*1/57*3*i)); %velocity v=3
Sigma = sqrt(deltaT)*[w1 0; 0 w2]'; %rc=1/57;
Q = chol(Sigma);
z = mu + Q*randn(2,1);
position1 = [position1, position1(:,end)+v*deltaT+R2*z];
end
for i = 60:120
h3= (pi/3);
v1=[sin(h3) cos(h3)]';
R3 = [cos(h3) -sin(h3);sin(h3) cos(h3)];
w1=(0.0625)*(i^2); %ra=0.25;
w2=(1-exp(-2*1/57*3*i)); %velocity v=3
Sigma = sqrt(deltaT)*[w1 0; 0 w2]'; %rc=1/57;
Q = chol(Sigma);
z = mu + Q*randn(2,1);
position1 = [position1, position1(:,end)+v1*deltaT+R3*z];
end
plot(position1(1,:),position1(end,:),'b');
end
Now for better understanding the structure of the graphs the variance is taken as fixed value
At variance=squareroot(deltat)*[1 0.5;0.5 2] and the following code is implemented.
Note :The variance taken above is fixed and is not the exact value.It is just taken to show the clarity of the positions under the effect of extenal perturbations.
clear all;
close all;
clc;
deltaT = 1; % time step
time = [0:deltaT:120]; % time vector
i= time;
mu = [0 0]';
Sigma = sqrt(deltaT)*[1 .5; .5 2];
Q = chol(Sigma);
z = mu + Q*randn(2,1);
figure; hold on;
for j=1:20
position = [0 0]'; % initialize vector of positions with initial position
position1 = [100 0]'; % initialize vector of positions with initial position
for i = 0:60
h= pi/3; % heading
v= 3*[sin(h) cos(h)]'; % velocity vector
R = [cos(h) -sin(h);sin(h) cos(h)];
z = mu + Q*randn(2,1);
position = [position, position(:,end)+v*deltaT+R*z];
end
for i = 60:120
h1= 5 *(pi/3);
v1=[sin(h1) cos(h1)]';
R1 = [cos(h1) -sin(h1);sin(h1) cos(h1)];
z = mu + Q*randn(2,1);
position = [position, position(:,end)+v1*deltaT+R1*z];
end
plot(position(1,:),position(end,:),'r');
for i = 0:60
h2= 5*pi/3; % heading
v= 3*[sin(h2) cos(h2)]'; % velocity vector
R2 = [cos(h2) -sin(h2);sin(h2) cos(h2)];
z = mu + Q*randn(2,1);
position1 = [position1, position1(:,end)+v*deltaT+R2*z];
end
for i = 60:120
h3= (pi/3);
v1=[sin(h3) cos(h3)]';
R3 = [cos(h3) -sin(h3);sin(h3) cos(h3)];
z = mu + Q*randn(2,1);
position1 = [position1, position1(:,end)+v1*deltaT+R3*z];
end
plot(position1(1,:),position1(end,:),'b');
end
Conclusion
Thus the probability of conflict for a given pair of trajectories is calculated by implementing the trajectories under the effect of external perturbations. Suitable plots are shown for illustrating the positions of the aircrafts with and without the effect of the along track and cross track errors and for various headings.
The entire work is done in the MATLAB environment and the code done is illustrated in the appendices and the results are clearly explained.

Warning! This essay is not original. Get 100% unique essay within 45 seconds!

GET UNIQUE ESSAY

We can write your paper just for 11.99$

i want to copy...

This essay has been submitted by a student and contain not unique content

People also read