Newbie question: Differential Corrector just oscillating

Post here for assistance in troubleshooting a problem using GMAT

Newbie question: Differential Corrector just oscillating

Postby meme » Wed Jan 18, 2017 1:17 am

Hi - hopefully this will be easy, as I'm a newbie with GMAT and have never gotten it to do a simple task right (apart from the tutorial), so the problem must be me ;)

I'm trying to do what I would think would be easy - I've got a spacecraft in LEO, a large tank and thrusters, and it's trying to make a close pass of Venus. My actual scenario is more complex, but this is just for starters. So I have to solve for two things: how long to wait in orbit to do the burn (so that it'll be pointing in the right direction), and how high of a delta-V it needs to do the burn for. I've tried all sorts of combinations, and all it ever seems to want to do is oscillate by MaxStep, back and forth, never trying any values in-between. This happens whether I include one variable in the optimization or both, regardless of what parameters I choose in the Vary command, and so forth. I've been working on this for days and I've gotten nowhere :( Thoughts?

Here's one of the random variants of the Mission Sequence tried:

Code: Select all
%Propagate 'Prop VTE' prop(Transit) {Transit.Earth.Periapsis};
Target 'Venus loop' DC1 {SolveMode = Solve, ExitMode = SaveAndContinue, ShowProgressWindow = true};
  Vary 'Vary position delay' DC1(duration = 7000, {Perturbation = 0.0001, Lower = 0, Upper = 8000, MaxStep = 400, AdditiveScaleFactor = 0.0, MultiplicativeScaleFactor = 1.0});
  Vary DC1(VTOI.Element1 = 3.7, {Perturbation = 0.0001, Lower = 0.0, Upper = 34.9, MaxStep = 0.25, AdditiveScaleFactor = 0.0, MultiplicativeScaleFactor = 1.00});
  Propagate 'Prepare position' prop(Transit) {Transit.ElapsedSecs = duration};
  Maneuver 'Apply VTOI' VTOI(Transit);
  Propagate 'Prop to apoapsis' prop(Transit) {Transit.Earth.Apoapsis};
  Achieve DC1(Transit.Venus.RMAG = 42165.0, {Tolerance = 100000.0});
EndTarget;  % For targeter DC1

I'm attaching the full file, although it's spammier, and contains random things I've tried and since commented out.

I'm using R2016a (64-bit), build date Oct 6 2016 09:51:25. Thank you for any tips you can provide!
(15.7 KiB) Downloaded 205 times
Posts: 4
Joined: Sat Jan 14, 2017 10:32 pm

Re: Newbie question: Differential Corrector just oscillating

Postby meme » Fri Jan 20, 2017 5:02 pm

So I've been using GMAT continuously since then, going through examples, etc... and it seems like however many Vary commands there are, there's always one element that oscillates at MaxStep, never less... but you can't do anything about it because the amount that the other figures are tweaked is of a scale proportional to the one that's fluctuating at maxstep, so their convergence runs at a crawl if you reduce it.

I tried to work around the optimizer problems with a hack workaround, with some code to detect when all of my variables were oscillating. Except that GMAT appears broken in this; it interprets variables for max steps as zero, and quits immediately :Þ Searching I found a bug on the topic. A bug from 2012. Apparently still unfixed.

Surely it must be possible to do what I would think would be a simple task. Here's the full thing I need to achieve: I want to build up a dataset of minimum transit times between Venus and Earth, using aerobraking, across varied departure dates (say, every several weeks over the course of half a decade) for a range of delta-Vs on the transfer burn (aka, covering the range from minimal energy to fast transfer); and likewise back from Venus to Earth. There are two scenarios for each of the Venus and Earth orbits - low circular (~400km for Venus, ~250 for Earth; 70° inc for Venus, ~30° for Earth) and highly elliptical / nearly escape (same inclinations and periapsis). I need in both Venus to Earth and Earth to Venus.

Could anyone point me in roughly the right direction here? :(
Posts: 4
Joined: Sat Jan 14, 2017 10:32 pm

Re: Newbie question: Differential Corrector just oscillating

Postby pbhuter » Tue Feb 07, 2017 9:34 pm

I have this same issue on a regular basis. Sometimes it works to change the max step size, but that is rare. Are you doing "Save and Continue" on your Target command? Again, that sometimes helps. Another thing that may work is to let it run to the point that it oscillates and then stop it, go and "Apply Correction" to the Target command, which will load the current state into the defaults for the Vary, and then try running from that point.

None of these work on a regular basis for me, but they do occasionally get past that oscillation.
Posts: 9
Joined: Fri Jan 13, 2017 2:12 pm

Re: Newbie question: Differential Corrector just oscillating

Postby AshleyCuneo » Tue Nov 21, 2017 12:16 pm

This was helpful and informative for me as well, thanks for answering, guys! I'm glad to become a member of this community!
Posts: 1
Joined: Tue Nov 21, 2017 12:15 pm

Re: Newbie question: Differential Corrector just oscillating

Postby kygojo » Thu Sep 27, 2018 8:32 am

All the injunctions have been produced for the individuals. All the issues and australia writings are prevalent for the flow of the items for the ladies of the world.
Posts: 3
Joined: Thu Sep 27, 2018 7:42 am

Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests