Flow Matching-Based Surrogate Model for Solar-Perturbed Lunar Flyby Tours

Hirotaka Okada1 Naoya Ozaki2 Yosuke Kawabata3 Satoshi Ikari1 Ryu Funase1

1The University of Tokyo 2ISAS/JAXA 3Nagoya University

Submitted to the Journal of Guidance, Control, and Dynamics

Between two lunar flybys a spacecraft can follow legs of several distinct families. A flow matching model, trained offline on optimized legs, proposes candidates of several families in 6.6 ms, and a beam search corrects only the leading candidates and chains them into a tour in seconds on one GPU.

spacecraft Moon first lunar flyby later flybys impulse, 0.2 m/s at this length

The best tours with two or more legs for the three goals below (capture at the Moon, escape from the Earth and the largest v∞ at a flyby), each found again by one beam search of 2.6 to 10.7 s on one GPU. One color per leg; Sun–Earth rotating frame with the Earth at the origin and the Sun on the −x side.

Details

Each is the best among 20, 36 and 20 searches that differ in the seed (for the escape, three seeds at each of 12 initial solar phases).

Abstract

As commercial lunar deliveries increase opportunities for missions to the Moon, expectations are growing for low-cost missions that exploit solar-perturbed lunar flybys. A tour of such flybys chains Moon-to-Moon legs, and a tour search evaluates many candidate legs at every flyby, each requiring a costly trajectory optimization under multibody dynamics. Conventional neural networks avoid this cost but return one answer per query, whereas a leg's boundary conditions admit several solution families. This paper proposes a generative surrogate in the planar Sun–Earth circular restricted three-body problem. Given boundary conditions, a conditional flow matching model samples legs of several families as collocation vectors. Within a root-mean-square distance of 104 km, 256 samples as generated recall on average 97.5% of the legs optimized at an unseen test condition, and 256 legs retrieved from the nearest training conditions recall 13.1%. The samples are screened by their constraint residual without propagation, and a beam search corrects only the leading candidates and chains them into tours. For three benchmarks modeled on past and planned missions, the beam search builds tours in seconds on one graphics processor after offline training, finding better tours than with retrieved legs in 71 to 84% of the test cases.

In what dynamical model are the legs computed?

A leg, the flight from one lunar flyby to the next, is computed in the planar circular restricted three-body problem of the Sun and the Earth, and a tour chains such legs. Legs are drawn here in the frame that rotates with the Sun–Earth line, with the Earth at the origin and the Sun far away on the −x side. The Moon moves on a circle around the Earth, the lunar orbit, and is massless: lunar gravity is neglected along a leg, and a flyby instantaneously rotates the velocity relative to the Moon and keeps its magnitude, v∞.

A Moon-to-Moon leg in the Sun-Earth rotating frame with the Earth at the origin: it leaves the Moon at departure, loops outside the lunar orbit, receives one impulse and returns to the Moon at arrival. The solar phase theta_s is the angle at the Earth between the direction to the Sun and the Moon at departure. On the right, the impulse magnified, and the velocity triangle at departure, in which the speed relative to the Moon is v-infinity.
A leg of the database, 51 days with one impulse of 12.0 m/s, in the Sun–Earth rotating frame. θs is the angle at the Earth from the direction to the Sun, on the −x side, to the Moon at departure. The leg is discretized into eight numbered phases, with an impulse allowed at each phase boundary. On the right, the impulse at the boundary of phases 3 and 4, magnified, and the velocity triangle at departure: v∞ is the velocity of the spacecraft relative to the Moon, vsc − vM, at the pump angle α from the Moon’s velocity.

Three numbers set the condition of a leg: the speed relative to the Moon at departure, v∞,dep; the speed relative to the Moon at arrival, v∞,arr; and the solar phase θs, the angle from the direction to the Sun to the Moon at departure, counterclockwise. The surrogate returns legs for these three numbers, within the range of its database: departure v∞ of 0.4 to 2.2 km/s, arrival v∞ of 0.05 to 2.57 km/s, and flight times of at most 200 days.

Lunar flyby escapes built in this dynamical model change little when reoptimized with ephemerides and lunar gravity (Lantoine and McElrath, 2014). Below a v∞ of 0.4 km/s, however, the neglected lunar gravity becomes significant (Chen, 2023), and the capture tours on this page end below that speed.

Why does one condition need several legs?

One condition admits legs of several families. Far from the Earth the Sun's gravity reshapes the orbit, so the spacecraft can meet the Moon again at another speed without an impulse. Several solution families meet the same three numbers, v∞,dep, v∞,arr and θs, and an optimizer reaches each one only from an initial guess inside its basin of convergence, so a tour search has to optimize at least one leg per family at every flyby. A regression network returns one answer per query, about the average of the solutions when there are several.

Each video shows legs of one condition, generated by the surrogate and then corrected: a Gauss–Newton iteration moves a generated leg to a nearby leg that satisfies the discretized equations of motion. Only the cheapest leg of each family is shown. Each panel has its own scale, and the panels are ordered by lunar revolutions, then apogees, then flight time. A label such as oi 7:3 reads outbound at departure, inbound at arrival, seven apogees, three lunar revolutions. Two legs count as distinct when the root-mean-square distance between their positions, at 200 equal fractions of their flight times, exceeds 104 km. Red arrows are the impulses, with lengths in proportion to ΔV at the scale given under the video.

Condition (v∞,dep, v∞,arr, θs)
impulse, 10 m/s at this length departure arrival

How does the method work?

The surrogate is trained once offline and then answers many conditions in one query. Offline, legs are optimized on a grid of conditions, first without impulses and then with them, and two networks are trained on these legs: a flow matching model and a decoder. Online, one query takes N conditions c1, …, cN and returns K samples for each, cut by their constraint residual: how far a leg is from satisfying the discretized equations of motion and its boundary conditions. The beam search below sends one such query at every depth.

Block diagram. Offline, once: ballistic legs by grid search and continuation, legs with impulses optimized from them, and the training of the flow matching model and the decoder. Online, in every tour search: one query passes N conditions with K samples each through flow matching sampling, decoding, boundary enforcement and the residual cut, and returns the kept samples.
cn, the condition (v∞,dep, v∞,arr, θs) of the n-th group of samples; vNN, the velocity network; gNN, the decoder; ζ, a latent vector; z, the collocation vector of a leg; ρ̄, its scaled constraint residual.

How does the surrogate generate legs?

Flow matching carries noise to legs of several families. The surrogate draws Gaussian noise in a 64-dimensional latent space and integrates a learned velocity field, conditioned on (v∞,dep, v∞,arr, θs), in four Heun steps. A decoder maps each latent vector to the collocation vector of a leg (782 values at the collocation nodes of its eight phases), the boundary conditions are enforced, and the samples are cut by their constraint residual without propagation. A query of 256 samples for one condition takes 6.6 ms on one NVIDIA GH200, from drawing the noise to the residual cut (median of 100 test conditions).

Condition (v∞,dep, v∞,arr, θs)
a sample, before its family is known one color per family, as in the video above impulses of one leg of the family, 10 m/s at this length departure arrival
One-dimensional illustration of flow matching: straight training paths and the exact flow that carries noise to the families of one condition.
Why the samples split among the families, in one dimension: a) the model is trained along straight paths from noise to data, dashed through Q; b) the exact flow carries noise to each family by its probability, where a regression network would return one value between them.

What tours does it find?

The same networks give tours for three goals. Only the settings of the search change; the networks are not retrained. The goals are benchmarks modeled on missions, not measures of their performance: a capture that lowers v∞ at the Moon without orbit insertion, as for EQUULEUS (García Yárnoz et al., 2016); an Earth escape to the characteristic energy C3 of 2.64 km²/s², from the 2022 baseline of DESTINY+ (Ozaki et al., 2022); and the largest v∞ at a flyby, a GEO-X scenario (Sekine et al., 2025). The videos show one search at each initial solar phase θs of 0°, 60°, …, 300°, with one seed for the six phases of a goal.

Capture at the Moon: v∞ from 0.80 down to 0.45 km/s or less

Escape from the Earth: C3 of 2.64 km²/s² or more after the last flyby

impulse, 10 m/s at this length

Largest v∞: v∞ at a lunar flyby as high as possible, from 0.60 km/s

Symbols as in the first video; the impulse scale of the escape video is given under it. The searches ran on one NVIDIA GH200.

How do the samples compare with retrieved legs?

The samples recall 97.5% of the optimized legs at unseen conditions, where retrieved legs recall 13.1%, and give the better tour in 71 to 84 of 100 problems per goal. The baseline, retrieval, returns the optimized legs of the nearest training conditions in the database instead of generating new ones. At 300 test conditions unseen in training, 256 samples per condition recall on average 97.5% of the legs optimized there within 104 km, before any correction, whereas 256 retrieved legs recall 13.1%. An optimized leg lies a median of 810 km from the closest kept sample and 23,600 km from the closest retrieved leg.

Recall against match threshold: the surrogate curve lies well above the retrieval curve below about 100,000 km.
Recall at the 300 test conditions as the match threshold is varied (red dashed line, 104 km): surrogate samples in blue, retrieved legs in gray; solid, dashed and dotted lines for 256, 64 and 16 per condition.

The gap depends on the threshold: it exceeds 50 points from 1,000 to 20,000 km and falls to 2.2 points at 100,000 km, where the retrieved legs recall 96.7%. Recall measures how close a leg is as generated, not whether an optimizer could reach the solution from it. Reoptimized by SNOPT, 95.8% of the samples within 104 km of an optimized leg return to it, as estimated from 300 samples.

In the tour searches, each goal was posed at 100 initial solar phases (0, 3.6, …, 356.4°), 100 problems per goal, and each problem was searched once with the samples and once with the retrieved legs, with the same seed.

Problems out of 100CaptureEscapeLargest v∞
Surrogate better848171
Retrieval better151927
Tie (within 1 mm/s)102

One escape search with the surrogate returned no tour and is counted as retrieval better.

Three scatter plots of the best objective with retrieval against the surrogate, one per benchmark problem.
Best objectives of the 100 problems per goal with retrieval (x) and the surrogate (y): blue, surrogate better; gray, retrieval better; open circles, ties.

References

  1. Lantoine, G., and McElrath, T. P., “Families of Solar-Perturbed Moon-to-Moon Transfers,” AAS/AIAA Spaceflight Mechanics Meeting, AAS Paper 14-471, 2014.
  2. Chen, H., “Capacity of Sun-driven Lunar Swingby Sequences and Their Application in Asteroid Retrieval,” Astrodynamics, Vol. 7, No. 3, 2023, pp. 315–334. doi:10.1007/s42064-023-0161-9
  3. García Yárnoz, D., Yam, C. H., Campagnola, S., and Kawakatsu, Y., “Extended Tisserand–Poincaré Graph and Multiple Lunar Swingby Design with Sun Perturbation,” 6th International Conference on Astrodynamics Tools and Techniques (ICATT), 2016.
  4. Ozaki, N., et al., “Mission Design of DESTINY+: Toward Active Asteroid (3200) Phaethon and Multiple Small Bodies,” Acta Astronautica, Vol. 196, 2022, pp. 42–56. doi:10.1016/j.actaastro.2022.03.029
  5. Sekine, H., Kawabata, Y., Tsutsui, M., Fuse, R., Funase, R., Nakasuka, S., and Oguri, K., “Efficient Moon-to-Moon Transfer Optimization and Its Application to GEO-X,” 35th International Symposium on Space Technology and Science (ISTS), Paper 2025-d-16-3, 2025.

BibTeX

@misc{okada2026flow,
  title         = {Flow Matching-Based Surrogate Model for Solar-Perturbed Lunar Flyby Tours},
  author        = {Okada, Hirotaka and Ozaki, Naoya and Kawabata, Yosuke and Ikari, Satoshi and Funase, Ryu},
  year          = {2026},
  archivePrefix = {arXiv},
  eprint        = {2612.03631},
  primaryClass  = {cs.LG},
  url           = {https://arxiv.org/abs/2612.03631}
}