Satellite Mission Instruction Sequence Generation Algorithm Using a Flexible Weighted Directed Graph

. A satellite mission instruction generation algorithm based on a ﬂ exible weighted directed graph has been proposed. This algorithm can sort the instruction into sequence according to the instruction execution relationship with constraints, which can promote satellite operation performance of the ground station. Concepts like ﬂ exible edge, ﬂ exible zone, and implement zone were introduced, and the ﬂ exible weighted directed graph (FWDG) model was proposed. Based on this model, the satellite instruction sequence generation algorithm was designed. After practice and research, the result showed that according to the new algorithm, the instruction sequence can be consistent with all implement zones, consequently guaranteeing the correctness of the sequence.


Introduction
A low earth orbit remote sensing satellite with high resolution is the main channel to acquire ground information, which plays an increasingly important role in an earth optical and microwave survey [1]. A remote sensing satellite meets the users' needs through "task planning+instruction generation" [2]. The missions of a low earth orbit remote sensing satellite are intermittent, diverse, and uncertain, because of orbit revisit characteristics, weather conditions, onboard electronic constraints, and ground receiving resources. It is one of the most concerned problems for users and also a research hotspot in the academic field that a large space system takes advantage of a mission planning system to optimize the satellite-ground resources and accomplish the most imaging tasks with the least resources [3].
Lots of satellite task planning algorithms were presented based on artificial intelligence techniques [4]. Bensana et al. established the constraint satisfaction model and the integer programming model [5] and proposed the branch and bound algorithm and taboo search approximate algorithms to obtain the feasible solution. Hall and Magazine used a greedy algorithm and dynamic programming technique to solve a task programming model [6]. Vasquez and Hao map the SPOT5 satellite routine mission planning problem to a knapsack problem. Lin et al. use a Joseph-Louis Lagrange relaxation technique and tabu search algorithm to solve the imaging scheduling problem [7]. Mansour and Dessouky design the evolutionary algorithm and compare it with the traditional algorithm [8]. The main problem with these methods is that scheduling decisions cannot be changed dynamically. In References [9][10][11], the method of dynamically adjusting the results of planning such as task replanning is proposed, but the deviation between task planning and task execution cannot be considered.
On this basis, the satellite instruction sequence generation algorithm based on the weighted directed graph (WDG) presented in References [12,13] can sort the satellite instruction sequence according to the constraint relation, and the operation efficiency of the ground control center to the spacecraft is greatly reduced. However, the interval between the instruction nodes of the noncritical path may be extended by default when the topological sorting algorithm is applied to generate the instruction sequence; it does not consider the need for strict protection of the execution interval of some spacecraft instructions.
In this paper, the concepts of directed acyclic flexible edge, flexible interval, and reasonable instruction execution interval of a directed acyclic graph are introduced, and a flexible weighted directed graph (FWDG) model is proposed to modify the instruction generation algorithm, and an instruction sequence generation algorithm based on the flexible weighted digraph is proposed. The FWDAG model is an essential module in onboard software, and it takes observation mission as input and instruction sequence as output, as shown in Figure 1. The example shows that the modified algorithm can satisfy the spacecraft instruction execution interval.

Satellite Instruction Sequence Generation
Algorithm Based on the Directed Graph Model In graph G, V is the set of vertices corresponding to all instructions contained in the task and E is the edge set corresponding to the instruction timing constraint that completes the task. In order to describe GðV, EÞ in detail, more symbols are introduced; they are as follows: N is the number of all vertices of a digraph GðV, EÞ.M is the number of all edges of a digraph GðV, EÞ.Source is the start of the instruction sequence for a task.
Sink is the end of the instruction sequence for a task.
VðT 0 Þ is the instructions at time T 0 (T 0 is the beginning time of imaging).
VðT 1 Þ is the instructions at time T 1 (T 1 is the beginning time of data transfer). X = fS, X l , X m , ⋯g, where S is the start time of a mission and fX l , X m , ⋯g is the interval between the instruction sequence fV l , V m ⋯ g and the first instruction.

Task Instruction Sequence Generation Algorithm
Based on the Digraph Model. In this section, we introduce the directed graph-based task instruction sequence generation algorithm [12]: A unified instruction topological sequence can be generated finally by Algorithm 1, after digraph modeling of a sensing task, according to the start time of the mission on the satellite, the interval of the basic instruction sequence, and the dependence of different instruction sequences.
However, in the second and fourth steps of the algorithm, when the earliest ESTðV i Þ and the latest LSTðV i Þ of each vertex are calculated, the default edge can be stretched [14,15].  Figure 1: Relationship of the instruction module and onboard software modules.
Algorithm 1 holds the execution time TðV 1 Þ and TðV 1 Þ for V 1 and V 2 , respectively, which is reasonable, as long as TðV 1 Þ ∈ ½ESTðV 1 Þ, LSTðV 1 Þ and TðV 2 Þ ∈ ½ESTðV 2 Þ, LSTð V 2 Þ. If V 1 is the shutdown instruction, according to Algorithm 1, TðV 1 Þ = ESTðV 1 Þ = 5. But consider an application scenario in which there are certain instructions and intervals between instructions that are fixed; that is, some edges E x cannot be stretched and shortened. In this paper, we call this "rigid edge," denoted as RE.
As shown in Figure 3, the solid line RE 3 indicates that the edge can be neither shortened nor stretched, and the dash line indicates that the edge can be stretched but cannot be shortened. Obviously, TðV 1 Þ must be a fixed value; Tð V 1 Þ = TðV 3 Þ − 4 = 11. However, Algorithm 1 cannot take into account this constraint, and the calculated results cannot meet this requirement.

Instruction Generation Algorithm Based on the FWDAG Instruction Model
In order to meet the more realistic and strict requirements of a satellite instruction transmission time slot, we propose an instruction generation algorithm based on a flexible weighted directed acyclic graph (FWDAG).

FWDAG Instruction Model.
For the more general case, some instruction intervals can be within a set interval. For example, instruction V 1 must be executed after instruction V 0 is completed 3~4 s; then, obviously the interval ½3, 4 is the variable interval of E 1 . In this case, the concept of flexible interval edges is introduced into weighted directed acyclic graphs. The basic definitions are listed below: (v) ... (vi) n − layer vertices take Source, 1 − layer, …, n − 1 − layer vertices as forward vertices; 2. Start with Source, the earliest execution time interval ESTðV i Þ of each vertex V i relative to Source is computed by layer; 3. The earliest execution time interval of Sink relative to Source is the minimum execution time of the task instruction sequence; 4. Starting from Sink, the latest execution time interval LSTðV i Þ of each vertex relative to Source is calculated in reverse step by step; 5. For instruction V p like shutdown, the execution time delay X p selects the earliest execution time interval relative to Source, and for instruction V q like switch on, the execution time delay X q selects the latest execution time interval relative to Source; Ensure that the command sequence satisfies the user's task, starting as late as possible and shutting down as early as possible; 6. The execution time of the Source vertices is the time T 0 subtracts the earliest execution time of the Source to T 0 , which is also the start time S that the sequence starts to execute; 7. … Algorithm 1: Instruction sequence generation algorithm based on the directed acyclic graph model.

International Journal of Aerospace Engineering
Flexible Edge. In a directed acyclic graph, the edges with variable weights are called flexible edges and are denoted as FE.
Flexible Zone. The flexible interval of edge weight, which we call the flexible zone, is denoted as FZ. It is obvious that the rigid edge is a special flexible edge whose upper and lower limits of the flexible interval are equal. Implement Zone. In a directed acyclic graph, the time of a node changes within a reasonable range, which becomes a reasonable range of execution, referred to as the implement zone, recorded as IZ.
Addition operation of IZ and FZ: the addition operation of the implement zone and the flexible zone is defined as follows: Subtraction operation of IZ and FZ: the subtraction operation of the implement zone and the flexible zone is defined as follows: Obviously, if LZ up < FZ down , IZ ' = ∅.
In view of the above definition, the following theorem is proposed and proven. Theorem 1. Suppose that the node V i in a directed acyclic graph has a precursor node V pre , the corresponding flexible edge is FE pre , and the flexible zone is FZðFE pre Þ = ½FZ ðFE pre Þ down , FZðFE pre Þ up . If IZðV pre Þ = ½IZðV pre Þ down , LZ ðV pre Þ up has been determined, then IZðV i Þ = ½IZðV pre Þ down + FZðFE pre Þ down , LZðV pre Þ up + FZðFE pre Þ up .
Proof. Let x = TðV pre Þ, y = TðFE pre Þ, and z = TðV i Þ. According to the flexible edge constraints of FE pre , the objective function is z = x + y; here, x ∈ ½IZðV pre Þ down , IZðV pre Þ up and y ∈ ½FZðFE pre Þ down , FZðFE pre Þ up . According to the property of the linear equations with two unknowns, the range of the objective function z = x + y is ½IZðV pre Þ down + FZ ðFE pre Þ down , LZðV pre Þ up + FZðFE pre Þ up . And the range is continuous within its domain of definition IZðV i Þ = ½IZ ðV pre Þ down + FZðFE pre Þ down , LZðV pre Þ up + FZðFE pre Þ up .
Inference 2. Suppose that a node V i in a directed acyclic graph has J precursor nodes V pre j , j = 1, 2, ⋯, J. One of the implement zones IZðV i Þ j of node V pre j is determined by implement zone IZðV pre j Þ of each precursor and flexible zone FZðFE j Þ of FE j . All entries of this node determine the intersection of the execution ranges of this node, which is equal to the execution ranges of this node. That is, Theorem 3. Suppose that the node V i in a directed acyclic graph has a backward node V next , the corresponding flexible edge is FE next , and the flexible zone is FZðFE next Þ = ½FZ ðFE next Þ down , FZðFE next Þ up . If IZðV next Þ = ½IZðV next Þ down , LZ ðV next Þ up has been determined, then IZðV i Þ = ½LZ ðV next Þ down − FZðFE next Þ up , IZðV next Þ up − FZðFE next Þ down .
Proof. Let x = TðV next Þ, y = TðFE next Þ, and z = TðV i Þ. According to the flexible edge FE next constraints, it has objective function z = x − y, x ∈ ½IZðV next Þ down , IZðV next Þ up , and y ∈ ½FZðFE next Þ down , FZðFE next Þ up . According to the property of the linear equations with two unknowns, the range of the objective function z = x − y is ½LZðV next Þ down − FZðFE next Þ up , IZðV next Þ up − FZðFE next Þ down , and the range is continuous within its domain of definition IZðV i Þ = ½LZ ðV next Þ down − FZðFE next Þ up , IZðV next Þ up − FZðFE next Þ down .
Inference 4. Suppose a directed acyclic graph has a node V i and J rear-driver nodes V next j , j = 1, 2, ⋯, J. Each reardriver node V next j implement zone IZðV next j Þ and the flexible zone FZðFE j Þ of FE j determine an implement zone IZðV i Þ j of node V i ; all entries of this node determine the intersection of the execution ranges of this node, which is equal to the execution ranges of this node. That is,

Instruction Generation Algorithm Based on FWDAG.
In this paper, an instruction sequence generation algorithm based on the FWDAG model is proposed. A flexible edges FE are generated by the dependence of instructions with n nodes.

Application Example
Figure 4 is an instruction model of a satellite imaging task that is described by FWDAG. According to Algorithm 2, the procedure for calculating the graph above is  1. The implement zone IZðV 0 Þ = ½0, 0 for the task starting node V 0 , The implement zone for all other nodes is set to IZðV i Þ = ½0,+∞Þ ; 2. Starting from V 0 , select a node with degree 0 (no precursor node) from the digraph as the current node V i . According to equation (2), calculate implement zone of all the backward nodes of the current node whose degree edges are connected.
3. According to Inference 2, the implement zone of the new node calculated by step 2 is updated by "And operation". If the result of "And operation" is "Empty", operation will be quit. 4. Deletes the current node and all flexible edges coming from this node. 5. Repeat steps 2 to step 4, until there are no more nodes in the directed graph. 6. Starting with V N , select a node from the directed graph with an outdegree of 0 (without a trailing node) as the current node V i , according to equation (3), select TðV i Þ from IZðV i Þ according to the strategy of selecting node time (the last instruction is to select the earliest value, the start instruction is to be as late as possible, and the shutdown instruction is to be as early as possible), at the same time update the current node into all degrees edge connected to the precursor node implement zone; 7. According to Inference 4, the result of step 6 is updated by "And operation". The result of "And operation" should not be "Empty". 8. Deletes the current node and all flexible edges that enter this node. 9. Repeat steps 6 to step 8, until the node is no longer present in the directed graph.
Algorithm 2: An instruction sequence generation algorithm based on FWDAG.  Figure 5: Adjusted FWDAG instruction model.