rasmusmarak / TOSS

Trajectory Optimization for a Spacecraft Swarm Orbiting 67P/Churyumov-Gerasimenko.
GNU General Public License v3.0
2 stars 0 forks source link

Obtain first results for paper #18

Closed gomezzz closed 1 year ago

gomezzz commented 1 year ago

Two first scenarios

Baseline

More complex

gomezzz commented 1 year ago

@rasmusmarak please post results here incl trajectory plots and whatever else you have

also post parameters (ranges)

rasmusmarak commented 1 year ago

Updated fitness over generations:

Fitness: Covered space + close distance penalty + far distance penalty Start time: 0 [s] End time: 10 [s] Delta t: 1 [s] _Vmax scaling: 40 Penalty scaling: 0.1

Number of spacecrafts: 1 Number o maneuvers: 0

Number of generations: 1000 Population size: 120 Number of threads: 40

Results: Convergence at 231 generations.

Skärmavbild 2023-05-03 kl  11 22 10

rasmusmarak commented 1 year ago

Profile code for initial test with 1 spacecraft and 1 maneuver, and a mission duration of 4 weeks, can be found in #29

rasmusmarak commented 1 year ago

Case 1: (without rotation)

Optimization settings: Fitness function: CoveredSpace+CloseDistancePenalty+FarDistancePenalty Number of spacecrafts: 1 Number of maneuvers: 1 Start time: 0 [s] End time: 2419200 [s] (i.e 4 weeks, or 28 days) Rotation: False

Measurement period: 100 [s] Penalty scaling: 0.1 Max velocity scaling: 40 Max velocity: [-0.02826052, 0.1784372, -0.29885126] [m/s] (in xyz-coordinates)

Radius inner bounding sphere: 4000 [m] Radius outer bounding sphere: 15000 [m]

Population size: 120 Number of generations: 1000 Number of threads: 40

Bounds for initial state: a = [4000, 15000] e = [0, 1]
o = [0, 2pi] w = [0, 2pi]
i = [0, pi]
ea = [0, 2*pi]

Impulsive maneuvers: tm = [(start_time + 1), (final_time - 1)] (tm=time for maneuver) dvx = [-0.5, 0.5] dvy = [-0.5, 0.5] dvz = [-0.5, 0.5]

Results: Collisions: 0 Optimization run time: 7.057814452862739563e+04 [s] Champion fitness: -3.670855659772738200e-01 Champion chromosome: champion_x.csv

Fitness over Generations: Fitness_over_generations.csv Skärmavbild 2023-05-07 kl  18 52 40

Fitness sensitivity: Skärmavbild 2023-05-07 kl  19 33 46

Trajectory plot: Skärmavbild 2023-05-07 kl  18 54 43

Close-up risky positions: (radius < 3000 [m]) Skärmavbild 2023-05-07 kl  19 00 30

rasmusmarak commented 1 year ago

Case 2: (with rotation)

Run 1:

Optimization settings: Fitness function: CoveredSpace+CloseDistancePenalty+FarDistancePenalty Number of spacecrafts: 1 Number of maneuvers: 1 Start time: 0 [s] End time: 2419200 [s] (i.e 4 weeks, or 28 days) Rotation: True

Measurement period: 100 [s] Penalty scaling: 0.1 Max velocity scaling: 40 Max velocity: [-0.02826052, 0.1784372, -0.29885126] [m/s] (in xyz-coordinates)

Radius inner bounding sphere: 4000 [m] Radius outer bounding sphere: 15000 [m]

Population size: 120 Number of generations: 1000 Number of threads: 40

Bounds for initial state: a = [4000, 15000] e = [0, 1]
o = [0, 2pi] w = [0, 2pi]
i = [0, pi]
ea = [0, 2*pi]

Impulsive maneuvers: tm = [(start_time + 1), (final_time - 1)] (tm=time for maneuver) dvx = [-0.5, 0.5] dvy = [-0.5, 0.5] dvz = [-0.5, 0.5]

Results: Collisions: 0 Optimization run time: 4.026962128949165344e+04 [s] Champion fitness: 1.353038492045705865e-01 Champion chromosome: champion_x.csv

Fitness over Generations: Fitness_over_generations.csv Skärmavbild 2023-05-07 kl  21 07 16

Fitness sensitivity: Skärmavbild 2023-05-07 kl  21 08 16

Trajectory plot: Skärmavbild 2023-05-07 kl  21 09 28 Skärmavbild 2023-05-07 kl  21 09 58


Run 2: Number of generations: 100 Collisions: 0 Optimization run time: 4.183567583560943604e+03 [s] Champion fitness: 8.227294948923846718e-02 Champion chromosome: champion_x.csv

Fitness over generations: Fitness_over_generations.csv Skärmavbild 2023-05-07 kl  22 33 32

Fitness sensitivity: Skärmavbild 2023-05-07 kl  22 34 31

Trajectory plot: Skärmavbild 2023-05-07 kl  22 35 32 Skärmavbild 2023-05-07 kl  22 36 01


Run 3: (increasing # maneuvers) Number of generations: 100 Number of maneuvers: 2 Collisions: 0

Run time: 3.712905243635177612e+03 champion chromosome: champion_x.csv Fitness: 6.026829913993356214e-02 Fitness_over_generations.csv Skärmavbild 2023-05-08 kl  11 15 59 Skärmavbild 2023-05-08 kl  11 16 58 Skärmavbild 2023-05-08 kl  11 17 34 Skärmavbild 2023-05-08 kl  11 18 00


Run 4: (increasing # maneuvers) Number of generations: 100 Number of maneuvers: 4 Collisions: 0

Run time: 3.992483901977539062e+03 champion chromosome: champion_x.csv Fitness: 6.187988750918801961e-02 Fitness_over_generations.csv Skärmavbild 2023-05-08 kl  11 21 37 Skärmavbild 2023-05-08 kl  11 22 04 Skärmavbild 2023-05-08 kl  11 22 45 Skärmavbild 2023-05-08 kl  11 23 13


Run 5: (increasing # maneuvers) Number of generations: 100 Number of maneuvers: 8 Collisions: 0

Run time: 3.283008295536041260e+03 champion chromosome: champion_x.csv Fitness: 9.876603577952121349e-02 Fitness_over_generations.csv Skärmavbild 2023-05-08 kl  11 26 31 Skärmavbild 2023-05-08 kl  11 27 09 Skärmavbild 2023-05-08 kl  11 27 41 Skärmavbild 2023-05-08 kl  11 28 03

rasmusmarak commented 1 year ago

Cases to run:

Case 1: 1 spacecraft 2 maneuvers 4 weeks (or similar, find reference for a good long duration) with and without rotation (to compare difficulty)

Case 2: 4 spacecraft 4 maneuvers 4 weeks (or similar, find reference for a good long duration)

outer_bounding sphere = 10000 (10 km)

rasmusmarak commented 1 year ago

1 spacecraft 2 maneuvers 4 weeks duration

1S_2M_1000Gen_champion_f.csv 1S_2M_1000Gen_champion_x.csv 1S_2M_1000Gen_fitness_list.csv coverage_over_time

distance_deviation_over_time fitness_over_generations fixed_body_frame_trajectory_plot

trajectory_plot

rasmusmarak commented 1 year ago

4 Spacecrafts 4 Maneuvers 4 weeks 4S_4M_1000Gen_champion_f.csv 4S_4M_1000Gen_champion_x.csv 4S_4M_1000Gen_fitness_list.csv 4S_4M_1000Gen_run_time.csv coverage_over_time distance_deviation_over_time fitness_over_generations fixed_body_frame_trajectory_plot trajectory_plot

rasmusmarak commented 1 year ago

Test were run for:

Fixed initial position: [-135.13402075, -4089.53592604, 6050.17636635] r_s = 10000 [m] (outer bounding sphere) d = array of squared distances to r_s from each point outside outer bounding sphere


Test 1 Far distance penalty function: (mean(d__ - r_s)/ r_s^2)^(1/4) * 0.1 T1_1S_2M_50Gen_champion_f..csv T1_1S_2M_50Gen_champion_x.csv T1_1S_2M_50Gen_fitness_list.csv T1_1S_2M_50Gen_run_time.csv trajectory_plot coverage_over_time distance_deviation_over_time fitness_over_generations


Test 2 Far distance penalty function: (mean(d - r_s)/ r_s^2)^(1/4) T2_1S_2M_200Gen_champion_f.csv T2_1S_2M_200Gen_champion_x.csv T2_1S_2M_200Gen_fitness_list.csv T2_1S_2M_200Gen_run_time.csv trajectory_plot coverage_over_time distance_deviation_over_time fitness_over_generations


Test 3 Far distance penalty function: (mean(d - r_s)/ r_s^2)^(1/2) T3_1S_2M_100Gen_champion_f.csv T3_1S_2M_100Gen_champion_x.csv T3_1S_2M_100Gen_fitness_list.csv T3_1S_2M_100Gen_run_time.csv trajectory_plot coverage_over_time distance_deviation_over_time fitness_over_generations


Test 5 Far distance penalty function: (mean(d - r_s)/ r_s^2) T5_1S_2M_100Gen_champion_f.csv T5_1S_2M_100Gen_champion_x.csv T5_1S_2M_100Gen_fitness_list.csv T5_1S_2M_100Gen_run_time.csv trajectory_plot coverage_over_time distance_deviation_over_time fitness_over_generations

rasmusmarak commented 1 year ago

Test 9:

No changes: Info: dv_magnitude = [-2.5, 2.5] v_magnitude = [-0.5, 0.5] penalty = ((mean_distance/(radius_outer_bounding_sphere2))(1/4)) * 0.1 T9_1S_2M_1000Gen_info.txt T9_1S_2M_1000Gen_champion_f.csv T9_1S_2M_1000Gen_champion_x.csv T9_1S_2M_1000Gen_fitness_list.csv T9_1S_2M_1000Gen_run_time.csv T9_1S_2M_1000Gen_trajectory_plot T10_1S_2M_1000Gen_fitness_over_generations T10_1S_2M_1000Gen_coverage_over_time T10_1S_2M_1000Gen_distance_deviation_over_time

rasmusmarak commented 1 year ago

Test 10:

Change: Increased velocity magnitude range [-+ 0.5] -> [-+ 1.5] info: dv_magnitude = [-2.5, 2.5] v_magnitude = [-1.5, 1.5] penalty = ((mean_distance/(radius_outer_bounding_sphere2))(1/4)) * 0.1

T10_1S_2M_1000Gen_info.txt T10_1S_2M_1000Gen_champion_f.csv T10_1S_2M_1000Gen_champion_x.csv T10_1S_2M_1000Gen_fitness_list.csv T10_1S_2M_1000Gen_run_time.csv T10_1S_2M_1000Gen_trajectory_plot T10_1S_2M_1000Gen_fitness_over_generations T10_1S_2M_1000Gen_coverage_over_time T10_1S_2M_1000Gen_distance_deviation_over_time

rasmusmarak commented 1 year ago

Test 11:

Change: Increased penalty scaling: 0.1 -> 0.5 info: dv_magnitude = [-2.5, 2.5] v_magnitude = [-0.5, 0.5] penalty = ((mean_distance/(radius_outer_bounding_sphere2))(1/4)) * 0.5

T11_1S_2M_1000Gen_info.txt T11_1S_2M_1000Gen_champion_f.csv T11_1S_2M_1000Gen_champion_x.csv T11_1S_2M_1000Gen_run_time.csv T11_1S_2M_1000Gen_trajectory_plot T11_1S_2M_1000Gen_fitness_over_generations T11_1S_2M_1000Gen_coverage_over_time T11_1S_2M_1000Gen_distance_deviation_over_time

rasmusmarak commented 1 year ago

Test 12:

Change: Added maneuvers: 2 -> 4 info: dv_magnitude = [-2.5, 2.5] v_magnitude = [-0.5, 0.5] penalty = ((mean_distance/(radius_outer_bounding_sphere2))(1/4)) * 0.1

T7_1S_4M_1000Gen_info.txt T7_1S_4M_1000Gen_champion_f.csv T7_1S_4M_1000Gen_champion_x.csv T7_1S_4M_1000Gen_fitness_list.csv T7_1S_4M_1000Gen_run_time.csv T7_1S_4M_1000Gen_trajectory_plot T7_1S_4M_1000Gen_fitness_over_generations T7_1S_4M_1000Gen_coverage_over_time T7_1S_4M_1000Gen_distance_deviation_over_time

rasmusmarak commented 1 year ago

Test 13:

Change: initial position = [-3645.61233166, -5634.25158292, 2883.0399209] (the real one after 24 days with respect to rotation) number_of_maneuvers = 2 dv_magnitude = [-2.5, 2.5] v_magnitude = [-0.5, 0.5] penalty = ((mean_distance/(radius_outer_bounding_sphere2))(1/4)) * 0.1

T13_1S_2M_1000Gen_info.txt T13_1S_2M_1000Gen_champion_f.csv T13_1S_2M_1000Gen_champion_x.csv T13_1S_2M_1000Gen_fitness_list.csv T13_1S_2M_1000Gen_run_time.csv T13_1S_2M_1000Gen_trajectory_plot T13_1S_2M_1000Gen_coverage_over_time T13_1S_2M_1000Gen_distance_deviation_over_time T13_1S_2M_1000Gen_fitness_over_generations

rasmusmarak commented 1 year ago

Test 14:

Change: initial position = [-3645.61233166, -5634.25158292, 2883.0399209] (the real one after 24 days with respect to rotation), number_of_maneuvers = 4 Info: initial_pos = [-3645.61233166, -5634.25158292, 2883.0399209] radius_outer_bounding_sphere = 12500 number_of_maneuvers = 4 dv_magnitude = [-2.5, 2.5] v_magnitude = [-0.5, 0.5] penalty = ((mean_distance/(radius_outer_bounding_sphere2))(1/4)) * 0.1

T [T14_1S_4M_1000Gen_info.txt](https://github.com/rasmusmarak/TOSS/files/11564694/T14_1S_4M_1000Gen_info.txt) 14_1S_4M_1000Gen_champion_f.csv T14_1S_4M_1000Gen_champion_x.csv T14_1S_4M_1000Gen_fitness_list.csv T14_1S_4M_1000Gen_run_time.csv T14_1S_4M_1000Gen_trajectory_plot T14_1S_4M_1000Gen_coverage_over_time T14_1S_4M_1000Gen_distance_deviation_over_time T14_1S_4M_1000Gen_fitness_over_generations

rasmusmarak commented 1 year ago

Test 15:

_Change: _number of maneuvers = 4, dv_magnitude = [0, 2.5], v_magnitude = [0, 0.5], radius_outer_bounding_sphere = 12500

Info: initial_position = [-135.13402075, -4089.53592604, 6050.17636635] number of spacecraft = 1 number of maneuvers = 4 radius_outer_bounding_sphere = 12500 dv_magnitude = [0, 2.5] v_magnitude = [0, 0.5] penalty = ((mean_distance/(radius_outer_bounding_sphere2))(1/4)) * 0.1

T15_1 [T15_1S_4M_1000Gen_info.txt](https://github.com/rasmusmarak/TOSS/files/11564720/T15_1S_4M_1000Gen_info.txt) S_4M_1000Gen_champion_f.csv T15_1S_4M_1000Gen_champion_x.csv T15_1S_4M_1000Gen_fitness_list.csv T15_1S_4M_1000Gen_run_time.csv T15_1S_4M_1000Gen_trajectory_plot T15_1S_4M_1000Gen_coverage_over_time T15_1S_4M_1000Gen_distance_deviation_over_time T15_1S_4M_1000Gen_fitness_over_generations

rasmusmarak commented 1 year ago

New results with rotating spherical grid:

Case 1: 1 Spacecraft 4 Maneuvers Convergence (1e-6) = 280 generations Tot Dv = 2.778971735322927 [m/s]

Inertial_frame_side_view_trajectory_plot.pdf Inertial_frame_top_view_trajectory_plot.pdf body_fixed_frame_trajectory_plot.pdf case_1_fitness_over_generations.pdf case_1_coverage_over_time.pdf case_1_distance_deviation_over_time.pdf

Skärmavbild 2023-05-29 kl  20 13 40 Skärmavbild 2023-05-29 kl  20 13 50

Skärmavbild 2023-05-29 kl  20 14 25 Skärmavbild 2023-05-29 kl  20 14 50 Skärmavbild 2023-05-29 kl  20 15 08 Skärmavbild 2023-05-29 kl  20 15 21
rasmusmarak commented 1 year ago

New results with rotating spherical grid:

Case 2: 4 Spacecraft 4 Maneuvers Convergence (1e-6) = 226 generations Tot Dv spacecraft 1 = 5.3532623146243346 [m/s] Tot Dv spacecraft 2 = 2.6134250206001215 [m/s] Tot Dv spacecraft 3 = 4.057814328660423 [m/s] Tot Dv spacecraft 4 = 5.2607626069270434 [m/s]

Spacecraft_1_2_side_view_trajectory_plot.pdf Spacecraft_1_2_top_view_trajectory_plot.pdf Spacecraft_1_2_body_fixed_frame_trajectory_plot.pdf Spacecraft_3_4_side_view_trajectory_plot.pdf Spacecraft_3_4_top_view_trajectory_plot.pdf Spacecraft_3_4_body_fixed_frame_trajectory_plot.pdf case_2_fitness_over_generations.pdf case_2_coverage_over_time.pdf case_2_distance_deviation_over_time.pdf

Skärmavbild 2023-05-29 kl  20 16 14 Skärmavbild 2023-05-29 kl  20 16 33 Skärmavbild 2023-05-29 kl  20 16 55 Skärmavbild 2023-05-29 kl  20 17 05 Skärmavbild 2023-05-29 kl  20 17 24 Skärmavbild 2023-05-29 kl  20 17 37 Skärmavbild 2023-05-29 kl  20 17 52 Skärmavbild 2023-05-29 kl  20 18 03
rasmusmarak commented 1 year ago

Additional tests:

3 Spacecraft 2 maneuvers

Covered space = 0.3410442897454662

Spacecraft 0 tot dv 0.6795063578765187 Spacecraft 1 tot dv 1.3500464175989317 Spacecraft 2 tot dv 0.5299005465327239

Skärmavbild 2023-06-02 kl  09 50 36 Skärmavbild 2023-06-02 kl  09 51 32 Skärmavbild 2023-06-02 kl  10 31 21

rasmusmarak commented 1 year ago

Additional tests:

4 Spacecraft 2 maneuvers

covered space = 0.4449151325230582

Spacecraft 0 tot dv 1.8933243134012598 Spacecraft 1 tot dv 0.18647151452013866 Spacecraft 2 tot dv 0.5027391121661303 Spacecraft 3 tot dv 1.5101085748592995

Skärmavbild 2023-06-02 kl  10 36 55 Skärmavbild 2023-06-02 kl  10 37 42 Skärmavbild 2023-06-02 kl  10 38 18 Skärmavbild 2023-06-02 kl  10 38 42

rasmusmarak commented 1 year ago

Additional tests

2 Spacecraft 4 Maneuvers

covered space = 0.383649614922649

Spacecraft 0 tot dv 5.513748286137223 Spacecraft 1 tot dv 1.2225808011534423

Skärmavbild 2023-06-02 kl  10 42 38 Skärmavbild 2023-06-02 kl  10 43 30 Skärmavbild 2023-06-02 kl  10 44 06 Skärmavbild 2023-06-02 kl  10 44 39

rasmusmarak commented 1 year ago

Additional tests

3 Spacecraft 4 maneuvers

Covered space = 0.2917844752563947

Spacecraft 0 tot dv 2.877462729891747 Spacecraft 1 tot dv 1.2180622349402332 Spacecraft 2 tot dv 2.5889929105668585

Skärmavbild 2023-06-02 kl  10 47 35 Skärmavbild 2023-06-02 kl  10 48 13 Skärmavbild 2023-06-02 kl  10 48 45 Skärmavbild 2023-06-02 kl  10 49 31