Pursuer-Evader Study Steve Rogers Pursuer-Evader Study..................................................................................................................................1 Introduction.............................................................................................................................................1 Linearization Process...............................................................................................................................2 Pursuer Control Law Development..........................................................................................................3 Evader Control Law Development...........................................................................................................4 Conclusion...............................................................................................................................................6 Appendix – Results with Random Target Motions...................................................................................6 Appendix – Results with Intelligently Controlled Target Motions..........................................................12
Introduction In this study a solution to the game of pursuer evader is presented based on the LQR state space method. In a pursuer evader game the pursuer attempts to capture (intercept or minimize the miss distance) the evader while the evader tries to avoid the pursuer. The 1 st phase of the study will deal with a ‘dumb’ evader which only has random or fixed acceleration inputs for its control logic. Ultimately, the pursuer guidance must be able to deal with an ‘intelligent’ evader that is attempting to maximize the miss distance. A straightforward approach is to utilize the regulator concept. The intention with a regulator is to force all states to zero with a feedback controller. Therefore, the pursuer’s objective is to drive the miss distance relevant states to zero. The evader’s objective is to drive the miss distance relevant states to infinity. A simple point mass model is given.
This equation may be used for each dimension
of a 2D model study. A guidance algorithm can be easily derived from these equations which can then be fed as a desired force input to an autopilot for more detailed control. A clearer equation statement
follows:
. A state space formulation of each dimension is:
. For a 2D representation they are placed in parallel so that
both x and y are generated.
is the 2D representation. Note that the
only difference in the two models is the force input (one is Fx & the other is Fy). With this simple model a useful guidance algorithm may be developed, which then can act as a supervisory control to the lower level autopilot. Guidance control algorithms may be designed using state space techniques such as LQR or pole placement. The design procedure is to linearize a model, then use it to generate a control law, and then tune the control parameters according to control performance requirements.
Linearization Process The 1st step in design is to generate a linear model. The following model that has 4 inputs and 6 outputs is used to create the linear model. The 4 inputs are: Fx for the pursuer, Fy for the pursuer, Fx for the target, and Fy for the target. The 6 outputs are: x and y for the pursuer, x error, x error integrated, y error, and y error integrated.
sys_p Pursuer 1 In1 sys_t
1 s 1 s
1 Out1
Target
The following matlab code creates the linearized model: mp = 20;mt = 500;A = [0 1;0 0];C = [1 0];D = 0; Bp = [0;1/mp];Bt = [0;1/mt]; sys_xp = ss(A,Bp,C,D);sys_yp = sys_xp; sys_xt = ss(A,Bt,C,D);sys_yt = sys_xt; sys_p = append(sys_xp,sys_yp); sys_t = append(sys_xt,sys_yt);
First the 1D models are created (sys_yp, sys_xp, etc. above). Then the 1D models are combined to create sys_p and sys_t, pursuer and target representations respectively. The pursuer and target models differ, at this stage, only by the amount of mass associated with each. io(1) = linio('lin_Pursuer_target/In1',1,'in'); io(2) = linio('lin_Pursuer_target/Mux',1,'out'); op=operspec('lin_Pursuer_target'); op=findop('lin_Pursuer_target',op); lin_sys = linearize('lin_Pursuer_target',op,io); A = lin_sys.a;B = lin_sys.b;C = lin_sys.c;D = lin_sys.d; states = {'x_int','y_int','x_pur','vx_pur','y_pur','vy_pur',... 'x_tar','vx_tar','y_tar','vy_tar'}; inputs = {'Fx_pur','Fy_pur','Fx_tar','Fy_tar'};
outputs = {'xp','xv','X_err','X_err_int','Y_err','Y_err_int'}; sys_comb = ss(A,B,C,D,... 'statename',states,'inputname',inputs,'outputname',outputs);
Sys_comb above is the state space linearized representation of the 2D model. This is the result of the linearization process given in the matlab code snippet above. Note that the output lin_sys of the matlab command linearized is the linear system to be used in further analyses and design. Once sys_p and sys_t are generated we can produce a set of performance criteria. Since the most commonly used control law is proportional-integral (PI) we may generate them for incorporation into the state space control law. The approach is to include them in the linearization model outputs as shown above, then they are automatically part of the linearized models.
Pursuer Control Law Development Once we have suitable linear models with pursuer-target error and integral error, we can proceed with any state space control law design, such as LQR or pole placement. The approach we’ll use in this study is the LQR regulator. This forces all the states to go to zero according to the specified state and control weightings. The following matlab code snippet generates both an observer and a control law. sys_comb = minreal(sys_comb); [a,b,c,d] = ssdata(sys_comb); [nr,nc] = size(a); Q = diag(ones(1,nr)); [nr,nc] = size(c); R = diag(50*ones(1,nr)); Lobs = lqr(a',c',Q,R).';[nr,ncd]=size(Lobs); [nr,nc] = size(b); Rp = diag(5e5*ones(1,nc)); Lconp = lqr(a,b,Q,Rp);[nr,nc]=size(Lconp); syscon = ss(a-Lobs*c,Lobs,-Lconp,zeros(nr,ncd)); assignin('base','syscon',syscon);
The 1st line uses mineral which generates a minimal realization or pole-zero cancelation, which produces an observable and controllable system. This system characteristic is necessary for observer and controller gain computations. The observer gain matrix is ‘Lobs’ and the controller gain matrix is ‘Lconp’. These gains are combined into a linear controller system ‘syscon’. The R weight for the observer gain is much less than the R weight for the controller in order that the observer poles be much larger than the controller poles. This is necessary to prevent the observer poles from interfering with the desired control law performance.
sys_p
In1
Pursuer
1 s
In2
1 s
sys_t
StopSim
Force
P-Tdata
U Y
Target
PI-perf Selector
syscon controller
It should be noted that the simulation structure is nearly the same as the linearization structure. This will ensure that the control law works according to the linear model used to generate it. Otherwise, there would be a model error. The control signals to the target are replaced by random signals. The control law was verified by using a set of random target inputs for a set of random pursuer initial positions. The plots are in the Appendix – Results with Random Target Motions. Each plot shows the ability of the intercept control law for a random set of 20 initial pursuer starting location conditions. The target position is always initialized at 0,0, however, the random force inputs have different seeds. The pursuer intercepts the target (approaches within 9 distance units) in every case.
Evader Control Law Development The evader control law development is very similar to that of the pursuer. We must note that the optimal objective is to maximize the miss distance. In order to do that we modify the linearization model used in the regulator approach. For the pursuer we minimize the position error, while for the evader we add the positions together, therefore, the sum of the positions is minimized. This is the same as maximizing the miss distance. The approach is shown in the simulink diagrams below.
sys_p Pursuer
In1
1
Out1 In2
In1 sys_t Target
outputs
1 Out1
1 In1
1 s
1 Out1
2 In2 1 s
The linearization process is identical to the above, as well as the control law development. The matlab code is shown below for completeness, however. io(1) = linio('lin_target/In1',1,'in'); % io(2) = linio('HX_lin_Mdl/In_Fkw',1,'in'); io(2) = linio('lin_target/outputs/Mux',1,'out'); op=operspec('lin_target'); %op.Inputs(1).u = 1;op.Inputs(1).Min = 0.5;op.Inputs(1).Max = 20; %op.Outputs.Min(1) = op.Inputs(1).Min; op=findop('lin_target',op); lin_sys_targ = linearize('lin_target',op,io); sys_comb_targ = minreal(sys_comb_targ); [a,b,c,d] = ssdata(sys_comb_targ); [nr,nc] = size(a); Q = diag(ones(1,nr)); [nr,nc] = size(c); R = diag(50*ones(1,nr)); Lobs = lqr(a',c',Q,R).';[nr,ncd]=size(Lobs); [nr,nc] = size(b); Rp = diag(2e2*ones(1,nc)); Lconp = lqr(a,b,Q,Rp);[nr,nc]=size(Lconp); syscon_targ = ss(a-Lobs*c,Lobs,-Lconp,zeros(nr,ncd)); assignin('base','syscon_targ',syscon_targ);
The plots are in the Appendix – Results with Intelligently Controlled Target Motions. Each plot shows the ability of the intercept control law for a random set of 9 initial pursuer starting location conditions. In this case each random pursuer position evokes a unique response from the target. The target position is always initialized at 0,0. The pursuer intercepts the target (approaches within 9 distance units) in every case. When the approach limit is reduced it becomes more difficult to ‘capture’ the target (see page 14). In four cases the target actually evaded capture. The target tries to avoid an interception by turning away from the more agile pursuer. Additional studies may be performed by imposing constraints/changes such as mission time/fuel consumption of pursuer, maximum force available, turning radius, and vehicle mass. The control weighting matrix R may be varied in order to accommodate most constraints or mimic agility of the vehicles. The final two cases show the forces also.
In the four cases of escape, the forces become unbounded and are stopped only by the simulation timeout.
Conclusion Two pursuer-evader concepts were explored and control laws for each were developed based on simple point-mass models. In the first targets are given random motions, whereas in the second the targets are given ‘intelligent’ controls. The ‘intelligent’ control is the analogous method given to the pursuer. The control objective of the pursuer in both cases is to minimize the distance difference between the two vehicles. The control objective of the target evader is to minimize the sum of the distances. This causes the target to turn away from the approaching pursuer. Further studies will be necessary for specific applications. In our case the target is much larger, therefore, less agile than the pursuer. Additional studies may be performed by imposing constraints/changes such as mission time/fuel consumption of pursuer, maximum force available, turning radius, and vehicle mass. The control weighting matrix R may be varied in order to accommodate most constraints or mimic agility of the vehicles. Application studies will require integration of the ‘intelligent’ control with more detailed vehicle models.
Appendix – Results with Random Target Motions
Pursuer vs Target 2000
1500
1000
500
0
-500
-1000 -300
-200
-100
0
100
200
300
400
500
Pursuer vs Target 1000
800
600
400
200
0
-200
-400 -300
-200
-100
0
100
200
300
400
500
600
700
Pursuer vs Target 500
0
-500
-1000
-1500
-2000
-2500
-3000 -400
-200
0
200
400
600
800
Pursuer vs Target 500 400 300 200 100 0 -100 -200 -300 -400 -600
-500
-400
-300
-200
-100
0
100
200
300
400
Pursuer vs Target 500
0
-500
-1000
-1500
-2000 -400
-200
0
200
400
600
800
1000
1200
1400
1600
Pursuer vs Target 800
600
400
200
0
-200
-400
-600 -600
-400
-200
0
200
400
600
Pursuer vs Target 500
0
-500
-1000
-1500
-2000 -400
-300
-200
-100
0
100
200
300
400
500
600
200
300
400
500
Pursuer vs Target 2000
1500
1000
500
0
-500 -500
-400
-300
-200
-100
0
100
Pursuer vs Target 9000 8000 7000 6000 5000 4000 3000 2000 1000 0 -1000 -500
-400
-300
-200
-100
0
100
200
300
400
500
Appendix – Results with Intelligently Controlled Target Motions 150
200
100
0
100 0 -100
50
0
100
200
400
-200 -200
0
200
200
-200
0
50
100
0
200
0
200
400
200
200 0
0 -200 -200
0 0
200
100
-200 -200
0
200
200
-200 -200 100
150 50
50 100
0 -200
0
200
50
0
200
400
0 -200
1000
200
400
500
0
200
0
-200
0
-500 -200
0
200
150
-400 -200
0
200
100
-200
0
50
100
0 -500
0
500
80
90
0
50
-50
0
0
500
100
0 100
50 -100
50
0
100
200
100
-200
0
50
100
150
200
50
0 100
0 -50 -200
-200 0
200
100
50
0
500
80
-400 70
400
50
200 60
0 -50 -500
0 0
500
100
40 -500
0
500
-200 -50
100
50
0
40
50 0 -50 -500
0
500
100
-100 -100
0
100
30 -100
150
200
100
0
50
-200
50
0 -50
0
50
0 -200
0
200
-400 -500
200
100
50
0
0
-100
-50
0
-200 -200
0
200
200
-200 -100
0
100
100
-100 -50
0
50
0
100
0
100
0
500
0
500
20
40
100
0 0
0 -100
-200 -200
0
200
50
-200 -200
0
200
-100 -100
200
200
0
0
0 -50 -100 -50
0
50
-200 -200
0
200
-200 -100
100
50
200
50
0
100
0
-50
0
-50 -200
0
200
-100
50
200
0
0
0
50
-100 -500 100 50 0
-50 -200
0
200
200
-200 -500
0
500
100
-50 -500 150
100
100 0
0 -100 -100
50 0
100
-100 -500
0
500
0
0
15
100
5
50
0
0 -200
0
200
x 10
200 0
-5 -2
0
2
-200 -200
-100
0
15
x 10 15
100
5
0
0
-100 -200
0
200
15
x 10
5
x 10
0
-5 -2
0
2
-5 -2
0
15
2 15
x 10
x 10
15
100
5
0
0
-100 -100
0
100
x 10
100 50
-5 -2
0
2
0 -200
-100
0
10
20
15
x 10
14
200
5
0
0
-200
0
50
100
-5
x 10
200 0
0
1
2 x 10
-200
15
200
1
0
0
-200
0
100
200
-1
0
4 15
x 10
1
x 10
0 0
1
2 x 10
-1
0
1
4
2 4
x 10
15
200
1
0
0
-200
0
100
200
-1
x 10
200 0
0
1
2 x 10
4
-200
0
10
20
100
100
0
0
70 60 50
-100 -100
0
100
500
-100 -100
0
100
400
40 -200
-100
0
0
200
0
100
0
10
20
0
50
100
0
100
200
100
200 0
50 0
-500 -100
0
100
100
-200 -500
0
500
0 -200
300
200
200
0
100
-200
0
-100 -100
0
100
0 -100
100
100
0
0
-100
-100
0
100
-400 -100
200
0
-200
0
100
200
200
-200
0
100
200
-200
500
200
0
0
0 -200 -400
0
100
200
-500
100
200
0
0
-100
-200
0
100
200
-200 200
0
-200
0
100
200
-400
0
50
100
-200