{'fraction_non_alphanumeric': 0.045875726744186045, 'fraction_numerical': 0.010446947674418604, 'mean_word_length': 4.016709706820598, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Receding Horizon Temporal Logic Control for Finite Deterministic Systems

This paper considers receding horizon control of finite deterministic systems, which must satisfy a high level, rich specification expressed as a linear temporal logic formula. Under the assumption that time-varying rewards are associated with states of the system and they can be observed in real-time, the control objective is to maximize the collected reward while satisfying the high level task specification. In order to properly react to the changing rewards, a controller synthesis framework inspired by model predictive control is proposed, where the rewards are locally optimized at each time-step over a finite horizon, and the immediate optimal control is applied. By enforcing appropriate constraints, the infinite trajectory produced by the controller is guaranteed to satisfy the desired temporal logic formula. Simulation results demonstrate the effectiveness of the approach.


I. INTRODUCTION
This paper considers the problem of controlling a deterministic discrete-time system with a finite state-space, which is also referred to as a finite transition system. Such systems can be effectively used to capture behaviors of more complex dynamical systems, and as a result, greatly reduce the complexity of control design. A finite transition system can be constructed from a continuous system via an "abstraction" process. For example, for an autonomous robotic vehicle moving in an environment, the motion of the vehicle can be abstracted to a finite system through a partition of the environment. The set of states can be seen as a set of labels for the regions in the partition, and each transition corresponds to a controller driving the vehicle between two adjacent regions. By partitioning the environment into simplicial, rectangular or polyhedral regions, continuous feedback controllers that drive a robotic system from any point inside a region to a desired facet of an adjacent region have been developed for linear [1], multi-affine [2], piecewise-affine [3]- [5], and non-holonomic (unicycle) [6], [7] dynamical models. By relating the initial continuous dynamical system and the abstract discrete finite system with simulation or bisimulation relations [8], the abstraction process allows one to solve a control problem for the more complex continuous system with the "equivalent" abstract system. It has been proposed by several authors [1], [5], [9]- [11] to use temporal logics, such as linear temporal logic (LTL) and computation tree logic (CTL) [12], as specification X.C. Ding  languages for finite transition systems due to their well defined syntax and semantics. These logics can be easily used to specify complex behavior, and in particular with LTL, persistent mission task such as "pick up items at the region pickup, and then drop them off at the region dropoff, infinitely often, while always avoiding unsafe regions". The applications of these temporal logics in computer science in the area of model checking [12] and temporal logic game [13] has resulted in off-the-shelf tools and algorithms that can be readily adapted to synthesize provably correct control strategies [1], [5], [9]- [11].
While the works mentioned above address the temporal logic controller synthesis problem, several problems and questions remain to be answered. In particular, the problem of combining temporal logic controller synthesis with optimality with respect to a suitable cost function remains to be solved. This problem becomes even more difficult if the optimization problem depends on time-varying parameters, e.g., dynamic events that occur during the operation of the plant. For traditional control problems (without temporal logic constraints) and dynamical systems, this problem can be effectively addressed using a model predictive control (MPC) approach (see e.g., [14]), which has reached a mature level in both academia and industry, with many successful implementations. The basic MPC set-up consists of the following sequence of steps: at each time instant, a cost function of the current state is optimized over a finite horizon, only the first element of the optimal finite sequence of controls is applied and the whole process is repeated at the next time instant for the new measured state. Thus, MPC is also referred to as receding horizon control. Since the finite horizon optimization problem is solved repeatedly at each time instant, real-time dynamical events can be effectively managed.
However, it is not yet well-understood how to combine a receding horizon control approach with a provably correct control strategy satisfying a temporal logic formula. The aim of this paper is to address this issue for a specific system set-up (deterministic systems on a finite state-space) and problem formulation (dynamic optimization of rewards). More specifically, the role of the receding horizon controller is to maximize over a finite horizon the accumulated rewards associated with states of the system, under the assumption that the rewards change dynamically with time and they can only be observed in real-time. The rewards model dynamical events that can be triggered in real-time, which is an often used model in coverage control literature [15].
The key challenge in this controller synthesis framework is to ensure correctness of the produced infinite trajectory and recursive feasibility of the optimization problem solved at each time-step. For a constrained MPC optimization problem, which is solved recursively on-line, feasible at all times or recursively feasible means that if the optimization problem is feasible (has a solution) for the initial state at initial time, then it remains feasible for all future time instants, when it will be solved with a different initial condition resulting from the generated closed-loop trajectory. A proof that the proposed receding horizon control framework satisfies both properties is provided. Similar to standard MPC, where certain terminal constraints must be enforced in the optimization problem in order to guarantee certain properties for the system (e.g., stability), the correctness of produced trajectory and recursive feasibility are also ensured via a set of suitable constraints.
This work can be seen as an extension and generalization of the set-up presented in [16], where a similar control objective was tackled. In [16] an optimization based controller was designed, which consists of repeatedly solving a finite horizon optimal control problem every N steps and implementing the complete sequence of control actions. This procedure is more close to finite-horizon optimal control than true receding horizon control and its main drawback comes from the inability of reacting to dynamical events (i.e., rewards) triggered or varying during the execution of the finite trajectory. This paper removes this limitation by attaining a truly receding horizon controller for deterministic systems on a finite state-space. Another related work is [5], where a provably correct control strategy was obtained for large scale systems by dividing the control synthesis problem into smaller sub-problems in a receding horizon like manner. However, in [5] dynamical events were addressed differently and the specification language was restricted to a fragment of LTL, whereas in this paper full LTL expressivity is allowed.

II. PROBLEM FORMULATION AND APPROACH
In this paper, we consider a discrete-time system with a finite state space, i.e., the system evolves on a graph. Each vertex of the graph produces an output, which is a set of observations. Such a system can be described by a finite deterministic transition system, which can be formally defined as follows.
• Q is a finite set of states; • q 0 ∈ Q is the initial state; • ∆ ⊆ Q × Q is the set of transitions; • ω : ∆ → R + is a weight function that assigns positive values to all transitions; • Π is a set of observations; and • h : Q → 2 Π is the observation map. For convenience of notation, we denote q → T q if (q, q ) ∈ ∆. We assume T to be non-blocking, i.e., for each q ∈ Q, there exists q ∈ Q such that q → T q (such a system is also called a Kripke structure [17]). A trajectory of a DTS is an infinite sequence q = q 0 q 1 ... where q k → T q k+1 for all k ≥ 0. A trajectory q generates an output trajectory Note the absence of the control inputs in the definition of T . This is because T is deterministic, and one can choose an available transitions at a state. In other words, each transition (q, q ) corresponds to a unique control input at state q. This also implies that a trajectory q = q 0 q 1 . . . can be used as a control strategy for T , by simply applying the transitions (q 0 , q 1 ), (q 1 , q 2 ), and so on. An example of a DTS is shown in Fig. 1. Fig. 1. An example of a finite DTS T as defined in Def. II.1. In this example, T has 100 states, which are at the vertices of a rectangular grid with cell size 10. We define the weight function ω to be the Euclidean distance between vertices, and there is a transition between two vertices if the Euclidean distance between them is less than 15. The set of observations is Π = {base, survey, recharge, unsafe}. States with no observation are shown with smaller vertices.
The goal of this paper is to synthesize trajectories q of T satisfying a behavioral specification, given as a linear temporal logic formula over Π. An LTL formula over Π is interpreted over an (infinite) sequence o = o 0 o 1 . . ., where o k ⊆ Π for all k ≥ 0. We say q satisfies an LTL formula φ if it generates an output trajectory o satisfying φ. A detailed description of the syntax and semantics of LTL is beyond the scope of this paper and can be found in [12]. Roughly, an LTL formula is build up from the observations in Π, Boolean operators ¬ (negation), ∨ (disjunction), ∧ (conjunction), −→ (implication), and temporal operators X (next), U (until), F (eventually), G (always). For example, the following task command in natural language: "Reach a survey location infinitely often, and always avoid unsafe states" can be translated to the LTL formula: φ := G F survey ∧ G ¬unsafe.
The system is assumed to operate in an environment with dynamical events. In this paper, these events are modelled by a reward process R : Q × N → R + , i.e., the reward associated with state q ∈ Q at time k is R(q, k). Note that rewards are associated with states in Q in a time varying fashion. We do not make any assumptions on the dynamics governing the rewards, but we make the natural assumption that, at time k, the system can only observe the rewards in a neighborhood N (q, k) ⊆ Q of the current state q. In this paper, we assume that the reward process R is unknown and reward values must be observed and acted upon in real-time. The problem in the case when knowledge of R is given apriori is interesting, but will be addressed in future research.
The problem considered in this paper is formally stated next. Problem II.2. Given a transition system T and an LTL formula φ over the set of observations of T , design a controller that maximizes the collected reward locally, while it ensures that the produced infinite trajectory satisfies φ.
Since the rewards are time-varying and can only be observed around the current state, inspirations from the area of MPC are drawn (see, e.g. [14]) with the aim of synthesizing a controller such that the rewards are maximized in a receding horizon fashion. At time k with state q k , the controller generates a finite trajectory q k+1 q k+2 . . . q k+N by solving an on-line optimization problem maximizing the collected rewards over a horizon N , and the system implements the immediate control action (q k , q k+1 ). This process is then repeated at time k + 1 and state q k+1 .
In order to guarantee the satisfaction condition for the LTL formula φ, the proposed approach is based on the construction of an automaton that captures all satisfying trajectories of T . This automaton also induces a Lyapunovlike function that can be used to enforce that the trajectory of the system satisfies the desired formula. These steps are formally described in detail in Sec. III. The aforementioned function will be utilized to guarantee recursive feasibility of the developed receding horizon controller, which in turn will yield that the synthesized infinite trajectory satisfies φ. The controller synthesis method is presented in Sec. IV.

III. A TOOL FOR ENFORCING THE BÜCHI ACCEPTANCE CONDITION
In this section, we review the definition of Büchi automata and describe the construction of a function that enforces the satisfaction of a Büchi acceptance condition for the trajectories of a DTS.
B accepts an infinite sequence over Σ if it generates at least one trajectory on B, which intersects the set F B infinitely many times.
For any LTL formula φ over Π, one can construct a Büchi automaton with input alphabet Σ = 2 Π accepting all and only sequences over 2 Π that satisfy φ [12]. We refer readers to [18] for efficient algorithms and implementations to translate an LTL formula over Π to a corresponding Büchi automaton B.
Definition III.2 (Weighted Product Automaton). Given a weighted DTS T = (Q, q 0 , ∆, ω, Π, h) and a Büchi automaton B = (S B , S B0 , 2 Π , δ B , F B ), their product automaton, denoted by P = T ×B, is a tuple P = (S P , S P0 , ∆ P , ω P , F P ) where Trajectory p is called accepting if and only if it intersects F P infinitely many times.
We define the projection γ T of p onto T as simply removing the automaton states, i.e., We also use the projection operator γ T for finite trajectories (subsequences of p). Note that a trajectory p on P is uniquely projected to a trajectory γ T (p) on T . By the construction of P from T and B, p is accepted if and only if q = γ T (p) satisfies the LTL formula corresponding to B [12].
In [16], we introduced a real positive function V on the states of the product automaton P that uses the weights ω P to enforce the acceptance condition of the automaton. Conceptually, this function resembles a Lyapunov, or energy function. While in Lyapunov theory energy functions are used to enforce that the trajectories of a dynamical system converge to an equilibrium, this "energy" function enforces that the trajectories of T satisfy the acceptance condition of a Büchi automaton.
To define the energy function, we first denote a set A ⊆ S P to be self-reachable if and only if all states in A can reach at least one state in A. Definition III.3 (Energy function of a state in P). We define F P to be the largest self-reachable subset of F P . The energy function V (p), p ∈ S P is defined as the graph distance of p to the set F P , i.e., the accumulated weight of the shortest path from p to any states in F P . Fig. 2 shows an example of T , B, and their product P, as well as the induced energy function defined on states of P. In [16], we showed the following properties for V . Theorem III.4 (Properties of the energy function). V satisfies the following: (i) If a trajectory p on P is accepting, then it cannot contain a state p where V (p) = ∞.     F (a ∧ F b)), translated by the tool LTL2BA [18]. (c): The product automaton P = T × B constructed with Def. III.2 (the weights are inherited from T and not shown). The number above a state p ∈ S P is the energy function V (p). Note that in this example, the set F P = F P , thus V (p) is the graph distance from p to any accepting states.
We see from the above facts that V (p) resembles an energy-like function, which justifies the name we use. We refer to the value of V (p) at a state p ∈ S P as the "energy of the state". Note that satisfying the LTL formula is equivalent to reaching states where V (p) = 0 for infinitely many times. Therefore, for each state p ∈ S P , V (p) provides a measure of progress towards satisfying the LTL formula. An algorithm generating V (p) for an arbitrary product automaton can be found in [16].

IV. MAIN RESULTS: RECEDING HORIZON CONTROLLER DESIGN
In this section, we present a solution to Prob. II.2. The central component of our control design is a state-feedback controller operating on the product automaton that optimizes finite trajectories over a pre-determined, fixed horizon N , subject to certain constraints. These constraints ensure that the energy of states on the product automaton decreases in finite time, thus guaranteeing that progress is made towards the satisfaction of the LTL formula. Note that the proposed controller does not enforce the energy to decrease at each time-step, but rather that it eventually decreases. The finite trajectory returned by the receding horizon controller is projected onto T , the controller applies the first transition, and this process is repeated again at the next time-step.
In this section, we first describe the receding horizon controller and show that it is feasible (a solution exists) at all time-steps k ∈ N. Then, we present the general control algorithm and show that it always produces (infinite) trajectories satisfying the given LTL formula.

A. Receding horizon controller
In order to explain the working principle of the controller, we first define a finite predicted trajectory on P at time k. Denote the current state at time k as p k . A predicted trajectory of horizon N at time k is a finite sequence p k := p 1|k . . . p N |k , where p i|k ∈ S P for all i = 1, . . . , N , p i|k → P p i+1|k for all i = 1, . . . N −1 and p k → P p 1|k . Here, p i|k is a notation used frequently in MPC, which denotes the ith state of the predicted trajectory at time k. Moreover, we denote the set P(p k , N ) as the set of all finite trajectories of horizon N from a state p k ∈ S P . Note that the finite predicted trajectory p k of P uniquely projects to a finite trajectory q k := γ T (p k ) of T .
For the current state q k at time k, we denote the observed reward at any state q ∈ Q as R k (q), and we have that Note that R(q, k) = 0 if q / ∈ N (q k , k) because the rewards outside of the neighbourhood cannot be observed. We can now define the predicted reward associated with a predicted trajectory p k ∈ P(p k , N ) at time k. The predicted reward of p k , denoted as k (p k ), is simply the amount of accumulated rewards by γ T (p k ) of T : The receding horizon controller executed at the initial state at time k = 0 is described next. This is a special case because the initial state of P is not unique, and as a result we can pick any initial state of P from the set S P0 = {q 0 }×S B0 . We denote the controller executed at the initial state as RH 0 (S P0 ), and we define it as follows The controller maximizes the predicted cumulative rewards over all possible projected trajectories over horizon N initiated from a state p 0 ∈ S P0 where the energy is finite, and returns the optimal projected trajectory p 0 . The requirement that V (p 0 ) < ∞ is critical because otherwise, the trajectory starting from p 0 cannot be accepting. If there does not exist p 0 such that V (p 0 ) < ∞, then an accepting trajectory does not exist and there is no trajectory of T satisfying the LTL formula (i.e., Prob. II.2 has no solution). Lemma IV.1 (Feasiblity of (4)). Optimization problem (4) always has at least one solution if there exists p 0 such that V (p 0 ) < ∞.
Proof. The proof follows from the fact that T is nonblocking, and thus the set P(p 0 , N ) is not empty.
Next, the receding horizon control algorithm for any time instant k = 1, 2, . . . and corresponding state p k ∈ S P is presented. This controller is of the form i.e., it depends both on the current state p k and the optimal predicted trajectory p k−1 = p 1|k−1 . . . p N |k−1 obtained at the previous time-step. Note that, by the nature of a receding horizon control scheme, the first control of the previous predicted trajectory is always applied. Therefore, we have the following equality p k = p 1|k−1 , k = 1, 2, . . . .
As it will become clear in the text below, p k−1 is used to enforce repeated executions of this controller to eventually reduce the energy of the state on P to 0. We define controller (5) with the following three cases: 1) Case 1. V (p k ) > 0 and V (p i|k−1 ) = 0 for all i = 1, . . . , N : In this case, the receding horizon controller is defined as follows.
The key to guarantee that the energy of the states on P eventually decreases is the terminal constraint V (p N |k ) < V (p N |k−1 ), i.e., the optimal finite predicted trajectory p k must end at a state with lower energy than that of the previous predicted trajectory p k−1 . This terminal constraint mechanism is graphically illustrated in Fig. 3.
Time k-1 Time k Fig. 3. Constraints enforced for the receding horizon control law p k = RH(p k , p k−1 ) for Cases 1 and 2.
To verify the feasibility of the optimization problem under this constraint, we make use of the third property of V in Thm. III.4. Namely, each state with positive finite energy can make a transition to a state with strictly lower energy.
Namely, this controller enforces a state in the optimal predicted trajectory to have 0 energy if the previous predicted trajectory contains such a state. This constraint is illustrated in Fig. 3. Note that, if i 0 (p k−1 ) = 1, then from (6), the current state p k is such that V (p k ) = 0, and Case 2 does not apply but Case 3 (described below) applies instead. Lemma IV.3 (Feasibility of (8)). Optimization problem (8) always has at least one solution if V (p k ) < ∞.
Proof. Given p k−1 = p 1|k−1 . . . p N |k−1 , since p k = p 1|k−1 , we have p k → P p 2|k−1 . Therefore, we can construct a finite predicted trajectory p k = p 1|k . . . p N |k where p i|k = p i+1|k−1 for all i = 1, . . . , N − 1. If we let p N |k to be any state where p N −1|k → P p N |k and V (p N |k ) < ∞, then p k = p 1|k . . . p N |k ∈ P(p k , N ) satisfies the constraint. Thm. III.4 (iii) gurantees that such a state p N |k exists.
3) Case 3, V (p k ) = 0: In this case, the terminal constraint is that energy value of the terminal state is finite. The controller is defined as follows.
Proof. If V (p k ) = 0, then there exists p 1|k such that p k → P p 1|k and V (p 1|k ) < ∞ (if not, then V (p k ) must equal to ∞). From Thm. III.4 (iii), we have that there exists p 2|k such that p 1|k → P p 2|k and V (p 2|k ) < V (p 1|k ) < ∞. By induction, there exists p k ∈ P(p k , N ) such that V (p N |k ) < ∞.
Remark IV.5. The proposed receding horizon control law is designed using an extension of the terminal constraint approach in model predictive control [14] to finite deterministic systems. The particular setting of the Büchi acceptance condition, combined with the energy function V , makes it possible to obtain a non-conservative analogy of the terminal constraint approach, via either a terminal inequality condition (7) or a terminal equality condition (8).

B. Control algorithm and its correctness
The overall control strategy for the transition system T is given in Alg. 1. After the off-line computation of the product automaton and the energy function, the algorithm applies the receding horizon controller RH 0 (S P0 ) at time k = 0, or RH(p k , p k−1 )) at time k > 0. At each iteration of the algorithm, the receding horizon controller returns the optimal predicted trajectory p k . The immediate transition (p k , p 1|k ) is applied on P and the corresponding transition (q k , γ T (p 1|k )) is applied on T . This process is then repeated at time k + 1. Set k = 0.

15: end if
First, we show that the receding horizon controllers used in Alg. 1 are always feasible. We use a recursive argument, which shows that if the problem is feasible for the initial state, or at time k = 0, then it remains feasible for all future time-steps k = 1, 2, . . .. Theorem IV.6 (Recursive Feasiblity). If there exists p 0 ∈ S P0 such that V (p 0 ) = ∞, then RH 0 (S P0 ) is feasible and RH(p k , p k−1 )) is feasible for all k = 1, 2, . . ..
Finally, we show that Alg. 1 always produces an infinite trajectory satisfying the given LTL formula φ, giving a solution to Prob. II.2. Theorem IV.7 (Correctness of Alg. 1). Assume that there exists a satisfying run originating from q 0 for a transition system T and an LTL formula φ. Then, Alg. 1 produces an (infinite) trajectory q = q 0 q 1 . . . satisfying φ.
Proof. If there exits a satisfying run originating from q 0 , then there exists a state p 0 ∈ S P0 such that V (p 0 ) < ∞. Therefore, from Thm. IV.6, the receding horizon controller is feasible for all k > 0, and Alg. 1 will always produce an infinite trajectory q.
At each state p k at time k > 0, if V (p k ) > 0, then either Case 1 or Case 2 of the controller RH(p k ) applies. If Case 1 applies, since V (p k|N ) > V (p k+1|N > V (p k+2|N ) . . ., there exists j > k such that V (p j|N ) = 0. This is because the state-space S P is finite, and therefore, there is only a finite number of possible values for the energy function V (p). At time j, Case 2 of the proposed controller becomes active until time l = j + i 0 (p j ), where V (p l ) = 0. Therefore, for each time k, if V (p k ) > 0, there exists l > k such that V (p l ) = 0 by repeatedly applying the receding horizon controller. If V (p k ) = 0, then Case 3 of the proposed controller applies, in which case either V (p k+1 ) = 0 or V (p k+1 ) > 0. In either case, using the previous argument, there exists j > k where V (p j ) = 0.
Therefore, at any time k, there exists j > k where V (p j ) = 0. Furthermore, since j is finite, we can conclude that the number of times where V (p k ) = 0 is infinite. By the definition of V (p), p ∈ S P , V k = 0 is equivalent to that p k ∈ F P ⊆ F P . Therefore, the trajectory p is accepting. The trajectory produced on T is exactly the projection q = γ T (p), and thus, it can be concluded that q satisfies φ, which completes the proof.

C. Discussions
It is possible to extend the optimization problem of maximizing rewards to other meaningful cost functions. For example, it is possible to assign penalties or costs on states of the system and minimize the accumulated cost of trajectories in the horizon. It is also possible to define costs on state transitions and minimize the control effort (or the combination of this cost function with the one above).
The complexity of the off-line portion of Alg. 1 depends on the size of P. Denoting |S| as the cardinality of a set S, from [18], a Büchi automaton translated from an LTL formula over Π contains at most |Π| × 2 |Π| states 1 . Therefore, the size of S P is bounded by |Q| × |Π| × 2 |Π| . From [16], the complexity of generating the energy function is O(|S P | 2 + |F P | 3 ). The complexity of the on-line portion of Alg. 1 is highly dependent on the horizon N . If the maximal number of transitions at each state of P is ∆ max P , then the complexity at each iteration of the receding horizon controller is bounded by (∆ max P ) N , assuming a depth first search algorithm is used to find the optimal trajectory. It may be possible to reduce this complexity from exponential to polynomial if one applies a more efficient graph search algorithm using Dynamic Programming. This will be studied in future research.

V. SOFTWARE IMPLEMENTATION AND CASE STUDY
The control framework presented in this paper was implemented in a user friendly software package, available on http://hyness.bu.edu/LTL_MPC.html. To utilize this software, a user needs to input the finite transition system T , an LTL formula φ, the horizon N , and a function R(q, k) that generates the time-varying rewards defined on the states of T . The software executes the control algorithm outlined in Alg. 1, and produces a trajectory in T that satisfies φ and maximizes the rewards collected locally with the proposed receding horizon control laws. This software uses the LTL2BA [18] tool for the translation of an LTL formula to a Büchi automaton.
We now present a case study applying the software package. In this case study, we use the transition system defined as vertices of a rectangular grid as shown in Fig. 1. We consider the following LTL formula, which expresses a robotic surveillance task: The first line of φ, G F base, enforces that the state with observation base is repeatedly visited (possibly for uploading data). The second line ensures that after base is reached, the system is driven to a state with observation survey, before going back to base. Similarly, the third line ensures that after reaching survey, the system is driven to a state with observation recharge, before going back to survey. The last line ensures that, at any time, the states with observation unsafe should be avoided.
We assume that at each state q ∈ Q, the rewards at state q can be observed if the Euclidean distance between q and q is less than or equal to 25. In this case study, we define R(q, k) as follows. At time k = 0, the reward value R(q, 0) at each state q is generated randomly by a uniform sampling in the range of [10,25]. At each subsequent time k > 0, if the reward value at a state is positive, then it decays with a specific rate. Otherwise, there is a probability that a reward is assigned to this state with a value chosen by a uniform sampling in the range of [10,25]. In this case study, the states with rewards can be seen as "targets", and the reward values can be seen as the "amount of interest" associated with each target. The control objective of maximizing the collected rewards can be interpreted as maximizing the information gathered from surveying states with high interest. Fig. 4. Snapshots of the system trajectory under the proposed receding horizon control laws. In all snapshots, the state with rewards are marked in green, where the size of the state is proportional with the associated reward. a) At time k = 0, the initial state of the system is marked in red (in the lower left corner). b) The controller p 0 = RH 0 (S P0 ) is computed at the initial state. The optimal predicted trajectory p 0 is marked by a sequence of states in brown. c) The first transition q 0 → T q 1 is applied on T and transition p 0 → P p 1 is applied on P. The current state (q 1 ) of the system is marked in red. d) The controller p 1 = RH(p 1 , p 0 ) is computed at p 1 . The optimal predicted trajectory p 1 is marked by a sequence of states in brown.
By applying the method described in the paper, our software package first translates φ to a Büchi automaton B, which has 12 states. This procedure took 0.5 second on a Macbook Pro with a 2.2GHz Quad-core CPU. Since T contains 100 states, |S P | is 1200. The generation of the product automaton P and the computation of the energy function V took 4 seconds. In this case study, we chose the horizon N to be 4. By applying Alg. 1, some snapshots of the system trajectory are shown in Fig. 4. Each iteration of Alg. 1 took 1 − 3 seconds (due to different numbers of graph searches needed, the computation time varies for each iteration).
We applies the control algorithm for 100 time-steps. We plotted the results after 100 time-steps in Fig. 5. At the top, we plot the energy V (p) at the each time-step. We see that after 55 time-steps, the energy is 0, meaning that an accepting state is reached. Note that, each time an accepting state is reached, the system visits the base, survey and recharge states at least once i.e., one cycle of the surveillance mission task (basesurveyrecharge) is completed. We also compare the receding horizon controller with the controller proposed in [16] at the bottom of Fig. 5. We clearly see that the receding horizon controller proposed in this paper performs better in terms of rewards collection, since it reacts much quicker to the time varying rewards. An example video of the evolution of the system trajectory is also available at http://hyness.bu.edu/LTL_MPC.html.  figure: in blue, plot of the cumulative rewards collected in 100 time-steps by the proposed receding horizon controller; in red, plot of the cumulative rewards collected by the controller in [16] using the same reward function R(q, k).

VI. CONCLUSION AND FINAL REMARKS
In this paper, a receding horizon control framework that optimizes the trajectory of a finite deterministic system locally, while guaranteeing that the infinite trajectory satisfies a given linear temporal logic formula, was proposed. The optimization criterion was defined as maximization of timevarying rewards associated with the states of the system. A control strategy that makes real-time control decisions in terms of maximizing the reward while ensuring satisfaction of the LTL specification was developed. The proposed framework is a step toward synergy of model predictive control and formal controller synthesis, which is beneficial for both areas.
Future research deals with the extension of the proposed framework to finite probabilistic systems, such as Markov decision processes or partially observed Markov decision processes, where the specifications are given as formulas of probabilistic temporal logic.