Intelligent Pursuer Study

17
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..........................................................5 Appendix – Results with Random Target Motions.......................6 Appendix – Results with Intelligently Controlled Target Motions....11 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

description

Random Target with intelligent control

Transcript of Intelligent Pursuer Study

Pursuer-Evader StudySteve Rogers

Pursuer-Evader Study..................................................................................................................................1

Introduction.............................................................................................................................................1

Linearization Process...............................................................................................................................2

Pursuer Control Law Development..........................................................................................................3

Evader Control Law Development...........................................................................................................4

Conclusion...............................................................................................................................................5

Appendix – Results with Random Target Motions...................................................................................6

Appendix – Results with Intelligently Controlled Target Motions.........................................................11

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 1st 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.

1

Out1sys_t

Target

sys_p

Pursuer

1s

1s1

In1

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.

syscon

controller

sys_t

Target

In1

In2

StopSim

UY Selector

sys_p

Pursuer

PI-perfP-Tdata

1s

1s

Force

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 DevelopmentThe 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.

1

Out1

In1

In2

Out1

outputssys_t

Target

sys_p

Pursuer1

In1

1Out1

1s

1s

2

In2

1In1

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.

ConclusionTwo 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

-300 -200 -100 0 100 200 300 400 500-1000

-500

0

500

1000

1500

2000Pursuer vs Target

-300 -200 -100 0 100 200 300 400 500 600 700-400

-200

0

200

400

600

800

1000Pursuer vs Target

-400 -200 0 200 400 600 800-3000

-2500

-2000

-1500

-1000

-500

0

500Pursuer vs Target

-600 -500 -400 -300 -200 -100 0 100 200 300 400-400

-300

-200

-100

0

100

200

300

400

500Pursuer vs Target

-400 -200 0 200 400 600 800 1000 1200 1400 1600-2000

-1500

-1000

-500

0

500Pursuer vs Target

-600 -400 -200 0 200 400 600-600

-400

-200

0

200

400

600

800Pursuer vs Target

-400 -300 -200 -100 0 100 200 300 400 500 600-2000

-1500

-1000

-500

0

500Pursuer vs Target

-500 -400 -300 -200 -100 0 100 200 300 400 500-500

0

500

1000

1500

2000Pursuer vs Target

-500 -400 -300 -200 -100 0 100 200 300 400 500-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000Pursuer vs Target

Appendix – Results with Intelligently Controlled Target Motions

0 100 20050

100

150

-200 0 200-200

0

200

0 50 100-200

-100

0

100

-200 0 200-200

0

200

400

-200 0 200-200

0

200

-200 0 200-200

0

200

400

-200 0 2000

50

100

0 200 40050

100

150

200

-200 0 2000

50

100

-200 0 200-500

0

500

1000

-200 0 200-400

-200

0

200

0 50 100-200

0

200

400

0 100 20050

100

150

0 50 100-200

-100

0

100

-500 0 5000

50

100

-200 0 200-50

0

50

100

0 50050

100

150

70 80 90-400

-200

0

200

-500 0 500-50

0

50

100

-500 0 50040

60

80

-50 0 50-200

0

200

400

-500 0 500-50

0

50

100

-100 0 100-100

0

100

-100 -50 030

40

50

-50 0 500

50

100

-200 0 2000

50

100

150

-500 0 500-400

-200

0

200

-200 0 200-200

0

200

-100 0 100-200

-100

0

100

-50 0 50-100

-50

0

50

-200 0 200-200

0

200

-200 0 200-200

-100

0

100

-100 0 100-100

0

100

-50 0 50-100

-50

0

50

-200 0 200-200

0

200

-100 0 100-200

0

200

-200 0 200-50

0

50

100

0 50-100

-50

0

50

-500 0 500-100

0

100

200

-200 0 200-50

0

50

-500 0 500-200

0

200

-500 0 500-50

0

50

100

-100 0 100-100

0

100

200

-500 0 500-100

0

100

0 20 400

50

100

150

-200 0 2000

50

100

-2 0 2

x 1015

-5

0

5x 10

15

-200 -100 0-200

0

200

-200 0 200-100

0

100

-2 0 2

x 1015

-5

0

5x 10

15

-2 0 2

x 1015

-5

0

5x 10

15

-100 0 100-100

0

100

-2 0 2

x 1015

-5

0

5x 10

15

-200 -100 00

50

100

0 50 100-200

0

200

0 1 2

x 104

-5

0

5x 10

14

0 10 20-200

0

200

0 100 200-200

0

200

0 1 2

x 104

-1

0

1x 10

15

0 1 2

x 104

-1

0

1x 10

15

0 100 200-200

0

200

0 1 2

x 104

-1

0

1x 10

15

0 10 20-200

0

200

-100 0 100-100

0

100

-100 0 100-100

0

100

-200 -100 040

50

60

70

-100 0 100-500

0

500

-500 0 500-200

0

200

400

-200 0 2000

50

100

-100 0 100-100

0

100

-100 0 1000

100

200

300

-100 0 100-400

-200

0

200

0 100 200-200

-100

0

100

0 100 200-200

-100

0

100

0 10 20-200

0

200

0 100 200-400

-200

0

200

0 100 200-500

0

500

0 50 100-200

0

200

0 100 200-200

-100

0

100

0 50 100-400

-200

0

200

0 100 200-200

0

200