{'fraction_non_alphanumeric': 0.042256620937568774, 'fraction_numerical': 0.015662827378768982, 'mean_word_length': 4.117889994368312, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Exact SDP Formulation for Discrete-Time Covariance Steering with Wasserstein Terminal Cost

In this paper, we present new results on the covariance steering problem with Wasserstein distance terminal cost. We show that the state history feedback control policy parametrization, which has been used before to solve this class of problems, requires an unnecessarily large number of variables and can be replaced by a randomized state feedback policy which leads to more tractable problem formulations without any performance loss. In particular, we show that under the latter policy, the problem can be equivalently formulated as a semi-definite program (SDP) which is in sharp contrast with our previous results that could only guarantee that the stochastic optimal control problem can be reduced to a difference of convex functions program. Then, we show that the optimal policy that is found by solving the associated SDP corresponds to a deterministic state feedback policy. Finally, we present non-trivial numerical simulations which show the benefits of our proposed randomized state feedback policy derived from the SDP formulation of the problem over existing approaches in the field in terms of computational efficacy and controller performance.


I. INTRODUCTION
In this paper, we consider Covariance Steering (CS) problems for discrete-time linear stochastic systems. In this particular class of stochastic optimal control problems, one tries to find a control policy that will steer the probability distribution of the state, or more precisely the first two moments of the latter distribution, to a goal distribution in finite time or infinite time. Specifically, we address a soft constrained version of the CS problem in which the objective is defined as finding a control policy that will minimize the sum of the expected value of a running cost (e.g., control effort) and a terminal cost which corresponds to a distance metric in the space of probability distributions. To this end, we choose the (squared) Wasserstein distance [1]. Literature Review: Early versions of the CS problems were focused on the infinite horizon case [2]- [4] for both discretetime and continuous-time systems. Finite-horizon CS problems in continuous time are addressed in [5]- [7]. A soft constrained version of the CS in continuous time which is based on the utilization of a Wasserstein distance terminal cost is addressed in [8]. However, the latter problem formulation does not offer computational advantages over standard CS problem formulations given that for its solution one has to utilize numerical optimal control techniques (e.g., shooting methods) This research has been supported in part by NSF award CMMI-1937957. Isin M. Balci (graduate student) and Efstathios Bakolas (Associate Professor) are with the Department of Aerospace Engineering and Engineering Mechanics at The University of Texas at Austin, Austin, Texas 78712-1221, USA, Email: isinmertbalci@utexas.edu, bakolas@austin.utexas.edu. that rely, in general, on nonlinear programming (NLP) methods. Finite horizon discrete-time CS problems are typically addressed by means of optimization based approaches [9]- [16]. Furthermore, the multi-agent CS problems are addressed in [17]. And these methods are extended to the nonlinear CS problems in [18]- [20]. However, all of these approaches rely on a semi-definite relaxation of the terminal covariance constraint to reduce the CS problem to a convex program. Recently, a maximum entropy finite-horizon CS problem for discrete-time deterministic linear systems was addressed in [21] based on a Riccati equation approach.
In our previous work [22], we have addressed the discretetime version of the CS problem with Wasserstein terminal cost proposed in [8] and showed that it can be recast as a difference of convex functions program (DCP) [23] which can be solved for local optimality with convergence guarantees using the convex-concave procedure (CCP) [24]. Main Contributions: As we have already mentioned, finite horizon discrete-time CS problems are typically treated as optimization problems in the relevant literature. The latter optimization problems are either convexified by semi-definite relaxations which prohibit finding the exact solutions to the CS problem or they are cast as generic nonlinear programs, for which there are no guarantees of convergence or global optimality in general. To the best of our knowledge, this is the first paper that formulates the CS problem with a Wasserstein distance terminal cost as a convex semi-definite program specifically without relying on any convex relaxations of non-convex constraints.
We first show that the optimal value of the CS problem with state history feedback control policies is lower bounded by the optimal value of the CS problem with the randomized state feedback policy. Then, we formulate an SDP for solving the CS problem with a Wasserstein distance terminal cost and show that this SDP formulation is exact. Then, we express the Wasserstein distance in a convenient form that allows us to express the objective function of the SDP as a linear function of the decision variables. Next, we show that the optimal policy, whose parameters are obtained by solving the associated SDP, corresponds to a deterministic feedback policy. Finally, we show the efficacy of our formulation in terms of controller's performance and computation time via numerical simulations. Structure of the Paper: The rest of the paper is organized as follows. In Section II, we formulate the CS problem with Wasserstein distance terminal cost. We then, summarize previous results based on the state history feedback policy parametrization in Section III. In Section IV, we introduce the randomized state feedback policy parametrization and demon-strate its advantages over other parametrizations. In Section V, we formulate the problem as an instance of an SDP using a suitable variable transformation. Numerical simulations are presented in Section VI. Finally, we conclude the paper in Section VII.

A. Notation
The space of n-dimensional real vectors is denoted as R n and the space of n × m matrices as R n×m . The space of n × n symmetric, positive semi-definite and positive definite matrices are denoted by S n , S + n and S ++ n , respectively. The n × n identity matrix is denoted as I n whereas 0 denotes the zero matrix (or vector) with appropriate dimension.
We use tr (·) to denote the trace operator. bdiag (A 1 , A 2 , . . . , A N ) denotes the block diagonal matrix whose diagonal blocks are the matrices means that x is a normal (Gaussian) random variable with mean µ ∈ R n and covariance matrix Σ ∈ S + n . The expectation and the covariance of a random variable x are denoted as E[x] and Cov(x), respectively.

B. Wasserstein Distance
The Wassertein distance defines a distance metric in the space of probability distributions over R n . In particular, for two random variables over R n with probability density functions ρ 1 and ρ 2 , their squared Wasserstein distance is denoted as W 2 2 (ρ 1 , ρ 1 ) and defined as: where P(ρ 1 , ρ 2 ) denotes the space of all probability distributions of the random variable y = [x T 1 , x T 2 ] T over R 2n with finite second moments and marginals ρ 1 and ρ 2 on x 1 and x 2 , respectively.
Typically, the Wasserstein distance for two arbitrary probability density functions does not admit an analytic expression and its computation can be a hard task. However, if both ρ 1 and ρ 2 correspond to the densities of two Gaussian distributions with mean vectors µ 1 , µ 2 ∈ R n and covariance matrices Σ 1 , Σ 2 ∈ S + n , then the Wasserstein distance admits the following closed form expression [1]: (2)

C. Problem Formulation
Let us consider the following discrete-time stochastic linear system: where {x k } N k=0 is the state process over R n , {u k } N −1 k=0 is the control process over R m and {w k } N −1 0 is the disturbance process over R n . In addition, A k ∈ R n×n , B k ∈ R n×m are known matrices for all k. We consider the case where {w k } N −1 k=0 is a Gaussian white noise process i.e. E[w k ] = 0 for all k ∈ {0, . . . , N − 1} and E[w k w T ] = 0 for all k = ∈ {0, . . . , N − 1} and E[w k w T k ] = W k ∈ S + n . We also assume that the initial state The main objective in this paper is to find a control policy such that the distribution of the terminal state x N under the policy is close to a desired terminal Gaussian distribution in terms of the Wasserstein metric while minimizing the expected value of the quadratic control cost. Next, we state the precise problem formulation.
k=0 be given where W k ∈ S + n and R k ∈ S ++ m for all k ∈ Z + . Furthermore, let Π 0 denote the space of admissible causal control policies . , x k } is the state sequence up to time step k. Then, find a policy π ∈ Π 0 that solves the following problem: In addition, ρ N and ρ d denote the probability density functions of the terminal state distribution and the desired distribution, respectively.
Remark. Note that Problem 1 is an infinite-dimensional problem because the optimization is over Π 0 which is the set of all causal policies. Thus, the variables of Problem 1 are the control laws m k (X k ) which are functions of state sequences.

III. SOLUTION VIA STATE HISTORY FEEDBACK POLICY
Since Problem 1 is an infinite-dimensional optimization problem, it is generally computationally intractable. To improve computational tractability, we restrict the set of admissible policies to the one that are affine functions of states visited up to time step k as follows: We denote the space of policies that are defined as in (5) as Π 1 . We observe that all policies π ∈ Π 1 can be parametrized by v

A. Difference of Convex Functions Program Formulation
Next, we will show that Problem 1 can be recast as a difference of convex functions program (DCP). To this aim, we will have to introduce the following variables which will facilitate the subsequent discussion and analysis. Let us consider the concatenated vectors x := vertcat(x 0 , . . . , x N ), . Then, the relationship between the concatenated vectors are given as follows: (5). Interested readers can refer to [9] for detailed derivations. Under the state history feedback policy (5), the mean of the concatenated state vector x is an affine function of v as To be able to express the covariance of x as a convex quadratic function of the decision variables, we utilize the following bijective variable transformation: (7b) Using (6)-(7), and the matrix inversion lemma [25], we have By utilizing (8), one can express the objective function J(π) of Problem 1 with admissible policy space Π 1 ⊂ Π 0 in terms of (v, Θ) as follows: where J i , for i ∈ {1, . . . , 4}, are defined as [22]: Remark. Note that in [22], we showed that the objective function of Problem 1 when the admissible policy space is Π 1 can be written as a difference of two convex functions, which does not necessarily mean that it is non-convex. However, in our more recent work [26], we showed that the objective function J(v, Θ) is in general non-convex and admits more than one local minima. We also provided a sufficient condition under which the objective function becomes convex, but it is not possible to check whether this condition holds without solving Problem 1 first.

IV. RANDOMIZED STATE FEEDBACK POLICY
In this section, we define a new set of policies which are comprised of randomized affine state feedback policies, denoted as Π 2 . Each policy π ∈ Π 2 is a sequence of feedback laws {m k is a function from R n to the set of m dimensional random variables with Gaussian distribution. The functions m (2) k (x k ) is realized as follows: Given the discrete-time stochastic linear system (3), the dynamics of the mean and the covariance of the state process {x k } N k=0 under the randomized state feedback policy defined in (11) are given as follows: where µ k and Σ k denote the mean vector and the covariance matrix of x k for all k ∈ {0, . . . , N − 1}, respectively. In addition, let the mean and covariance of {u k } N −1 k=0 be denoted as, respectively,ū k and U k and written in terms of the policy parameters {v k=0 as follows: Moreover, the dynamics of the state mean and the state covariance under the state history feedback policy defined in (5) are given by: for all k ∈ {0, . . . , N − 1}. It is worth noting that the term L k corresponds to the cross-covariance between the random variables x k and u k .
We now show that for any policy π ∈ Π 1 , there exists a policyπ ∈ Π 2 such that the first and the second moments of the control and the state processes that are induced byπ are equal to the ones that are induced by π under Assumption 1. This will allow us to conclude that the optimal value of Problem 1 when the admissible policy space is Π 1 ⊂ Π 0 is lower bounded by the optimal value of the same problem when the admissible policy space is Π 2 ⊂ Π 0 . The next lemma and theorem formally states the previous claims about the policy spaces Π 1 and Π 2 .

Lemma 1. Let Assumption 1 hold and let {µ
k=0 be the mean and covariance of the state and the control sequences under a policy π ∈ Π 1 . Then, for all π ∈ Π 1 , there exists a policyπ ∈ Π 2 such that k } N k=0 and {ū (2) k , U (2) k } N −1 k=0 denote the mean and covariance of the state and the control sequences under a policyπ ∈ Π 2 .
Proof. Let us consider a policy π ∈ Π 1 and let {v be the parameters corresponding to this policy. Our goal is to find a different policyπ ∈ Π 2 with corresponding policy parameters {v k=0 such that the mean and covariance of the state and control processes will satisfy (16). First, let v k . Because the feedback terms do not affect the dynamics of the mean of the state process {x k } for both sets of policies, (16a) follows immediately.
be the covariance matrices of x k and u k induced by the state history feedback policy defined in (5). Then, let where L k and M k are defined as in (15). Using (12b) with the parameters {K k }, we can write the state covariance dynamics under policyπ ∈ Π 2 , which is denoted by Σ (2) k , as follows: The initial state covariance is equal for both policies, that is, 0 . Furthermore, if we assume that Σ k as the inductive hypothesis, then it follows that Σ k+1 by virtue of (14b) and (18). Thus, we conclude that Σ k } is given by which completes the proof.
Remark. Note that Lemma 1 does not only apply to state history feedback policies (5). For any linear or nonlinear control policy π ∈ Π 0 which induces a state process with non-singular covariance matrix for all time steps, there exists a policyπ ∈ Π 2 which induces state and control processes which have the same first and second moments as the induced state and control processes under policy π ∈ Π 0 . Theorem 1. Let J 1 = J(π 1 ), where π 1 ∈ Π 1 is the minimizer of Problem 1 over Π 1 , and J 2 = J(π 2 ), where π 2 is the minimizer of Problem 1 over Π 2 . Then, J 2 ≤ J 1 .
Proof. Let π 1 ∈ Π 1 be the optimal policy that solves Problem 1 over Π 1 and let {v k , K k, } N −1,k k=0, =0 be the corresponding set of parameters. Now, let {v k , K k , Q k } N −1 k=0 be the policy parameters of π 2 ∈ Π 2 which are defined as in (17). Then, from Lemma 1, we can show that the first two moments of the control and state sequences under policy π 1 are equal to the ones under policy π 2 . Since both policies are affine functions of the state x k , then the distribution of x k will be Gaussian at each time step k, and the distribution of the terminal state x N under both policies will also be Gaussian with the same mean and covariance. Thus, the Wasserstein distance terms in the objective function of Problem 1 are equal for both policies. Furthermore, the running cost term at time step k is given by: Thus, the running cost is a function of the first two moments of u k . Since the values ofū k , U k are equal under both policies π and π , the running cost terms in (20) are equal at all time steps for both policies. Thus, we conclude that J(π 2 ) ≤ J(π 2 ) = J(π 1 ).
V. SDP FORMULATION FOR RANDOMIZED STATE FEEDBACK POLICY In Section IV, we showed that the optimal value of Problem 1 over randomized state feedback policies defined in (11) is upper bounded by the optimal value of the same problem over state history feedback policies defined in (5). Furthermore, the number of parameters that is required to parametrize the control policies in Π 2 is less than Π 1 . However, Problem 1 can be recast as a difference of convex functions program using the policy class Π 1 as shown in Section III.
In this section, we will formulate Problem 1 with admissible policy space Π 2 ⊂ Π as a convex semi-definite program using a suitable variable transformation. In particular, the finitedimensional problem can be formulated as follows from (12), (13): The sum of the first two terms of the objective function in (22) corresponds to the running cost whereas the third term corresponds to the terminal cost which is taken to be the squared Wasserstein distance between the terminal state density and the desired density. The constraints (12a) and (12b) impose the mean and the covariance dynamics given in respective equations. The optimization problem given in (21) is a nonlinear program (NLP) which is generally non-convex due to the presence of the terms tr R k K k Σ k K T k in the running cost and the nonlinear equality constraints (12b). In order to convexify the latter problem, we first introduce the following variable transformation which is often used in convex optimization based approaches for optimal control and robust control problems for discrete-time linear systems [6], [27], [28]: By introducing the new variable P k in (23), we can eliminate the bilinear terms in (12b). Now, observe that the term K k Σ k K T k that appears in (22) and (12b) is equal to P k Σ −1 k P T k under (23). With this observation, we define a new decision variable M k as follows: By using M k and P k , the nonlinear equality constraint (12b) can be written equivalently as follows: The following lemmas will be used to formulate Problem (21) as a standard SDP.
Lemma 2. Let X ∈ S + n , Y ∈ S ++ m and N ∈ R n×m . Then, there exists a matrix Q ∈ S + n such that if and only if The proof of Lemma 2 is straight-forward and therefore is omitted. The equivalence of (26) and (27) can be seen by applying Schur's complement formula to (27).
Lemma 3. Let ϕ : S + n × S + n → R be defined as: Then, ϕ(M, N ) can be equivalently written as: where the set M(N, M ) is defined as follows: Proof. Let us consider the following optimization problem: It follows readily that the minimizer L of the latter problem is equal to ( √ M N √ M ) 1/2 . Thus, the optimal value of the objective function of the optimization problem in (31) is equal to the value of ϕ(M, N ) which is defined in (28). Therefore, The relation in (32a) holds since the function f (X) = X 2 is monotonically non-decreasing for all X ∈ S + n in the Löwner partial order sense. The relation in (32b) holds due to the congruence transform with M −1/2 . The final step of the proof in (32c) follows from direct application of Schur's complement formula to (32b).
Using Lemma 2 and Lemma 3, we can write the problem in (21) as a standard SDP as follows: where the constraints (12a), (25), (33b) and (33d) are imposed for all k ∈ {0, . . . , N − 1}. In addition, the objective function J SDP is defined as follows: Theorem 2. Let {µ k , v k , Σ k , K k , Q k } be the minimizer of the NLP in (21), and let {µ k , v k , Σ k , P k , M k , L} be the minimizer of the SDP in (33).
Proof. The equalities µ k = µ k and v k = v k follow immediately given that the problem in (33) and the problem in (21) share the constraint in (12a) that enforces the state mean dynamics and in addition, the terms related to the mean dynamics in the objective functions J NLP and J SDP are equal. By the definition of M k in (24), it follows that tr (R k M k ) = tr R k (K k Σ k K T k + Q k ) . By utilizing the definition of M k , the state covariance dynamics in (12b) can be equivalently expressed as in (24) and (25). Furthermore, we observe that (33b) is equivalent to (24) from Lemma 2. Finally, the last term of the objective function of the NLP in (22) can be expressed as the optimal value of a relevant minimization problem in view of (3). Hence, the SDP problem in (33) is equivalent to the NLP problem in (21).
Remark. The problem given in (33) can be decomposed into two optimization problems. One for steering the mean and one for steering the covariance. This is because the objective function J SDP is equal to the sum of J SDP,mean and J SDP,cov , where J SDP,mean = . The mean steering problem can be formulated as an equality constrained convex quadratic program as follows: Although the proposed control policy (11) for the solution to the CS problem corresponds to a randomized state feedback policy, it turns out that the optimal policy for the Problem in (33) corresponds to a deterministic policy, i.e., Q k = 0 for all k. This observation is formally stated in the following theorem.
Theorem 3. Let us assume that A k is non-singular for all k ∈ {0, . . . , N − 1} and let π ∈ Π 2 be the optimal policy that solves the optimization problem in (21) and let {v k , K k , Q k } N −1 k=0 be its corresponding parameters. Then, Proof. Let us assume, for the sake of contradiction, that Q = 0 for some ∈ {0, . . . , N − 1}. Let {Σ k } N k=0 be the induced state covariance sequence under the optimal policy π , and M , P be defined as in (23), (24), respectively. Let us now consider the following optimization problem: which can be written in a more compact way after dropping the subscripts as follows: Furthermore, the dual problem associated with the problem in (36) is given by . From complementary slackness, we conclude that the optimal values of the primal and dual variables satisfy the following equality: since Σ is non-singular in view of Assumption 1. From (38), we obtain: Now, let M = M − P Σ −1 P T . By multiplying both sides of dual feasibility constraint (37b) by M on the left, we obtain: where in our derivations we have used that MQ 11 = 0 from (39a) and MY HY T = 0 from (37c) and (39b). We obtain MR = 0. Since R 0, we have M = 0. Thus, we have M − P Σ P T = Q = 0. This contradicts our initial assumption that there exists ∈ {0, . . . , N − 1} such that Q = 0 and thus, we conclude that Q k = 0 for all k. This completes the proof.

VI. NUMERICAL EXPERIMENTS
We solve the SDP in (33) for the linear system (3) with parameters: to generate the experiment results in Fig.  1 and Fig. 2. We also consider a two-dimensional and a threedimensional double integrator system with A k = In ∆tIn 0 In , B k = 0 In with ∆t = 0.05 and n = 2, 3 to show that our SDP formulation in (33) can handle CS problems with higher dimensional systems. The results of these experiments are given in Table I. In all of our experiments, we use MOSEK [29] to solve SDPs along with the modeling tool CVXPY [30]. Fig. 1 illustrates the evolution of the state statistics under the optimal policy found by solving the SDP in (33). As it can be seen from Figures 1a-1c, as λ increases the terminal distribution approaches the desired distribution. Figures 2a and 2c show comparison results between the randomized state feedback policy in (11), the truncated affine disturbance feedback policy [15] and the truncated state history feedback policy [22]. In the utilized truncated affine disturbance feedback policy, only the last disturbance term w k−1 from the history of disturbances is used for the computation of the control input u k at time step k (in contrast with the standard or non-truncated affine disturbance feedback policy in which the whole history of disturbances {w 0 , . . . , w k−1 } is used instead). The state history feedback policy is parametrized by the matrix variable Θ which is defined in (7) and which is constrained to be a lower block triangular matrix to preserve the causality of the latter control policy. In the utilized truncated state history feedback policy, the matrix Θ is further restricted to be a block diagonal matrix. Note that this truncation scheme does not necessarily mean that the control will be determined by a truncated history of states since the matrix variable K in (7b) is still lower block triangular (and not necessarily block diagonal) even if Θ is constrained to be a block diagonal matrix. However, the number of decision variables that appear in the truncated state history feedback policy for the CS problem is smaller than the standard (non-truncated) version of this policy which typically leads to smaller computational cost. For both of the truncated policies used in our comparisons, the computation time increases with the same rate with increasing problem horizon N as in the (memoryless) state feedback policy induced by the SDP formulation in (33). However, the optimal parameters for the truncated policies yield sub-optimal results compared with our proposed SDP-based (memoryless) state feedback policy as shown in Fig. 2c. If one uses the standard (or non-truncated) versions of the disturbance affine feedback or state history feedback control policies, the sub-optimality gap will be eliminated, as shown in Fig. 2d, however the CS problem becomes computationally intractable as the problem horizon N increases, as shown in Fig. 2b. In contrast to the SDP formulation, the other policy parametrizations lead to non-convex problem formulations. However, since the values of different local minima are close to each other in this problem instance, optimal values returned by these approaches turned out to be close to each other in Fig. 2d.
The time complexity of SDP problems is in O ( 3 ) where is the number of decision variables [31]. Let n, m be the dimension of the state x k and control input u k , respectively. Then, the number of decision variables corresponding to the covariance problem is given by N (n 2 + nm + m 2 ) + n 2 and thus, the number of decision variables is linearly proportional to N . Therefore, the time complexity of solving Problem 1 over randomized state feedback policies is in O(N 3 ). This fact is also reflected by the computation times reported in Table I.

VII. CONCLUSION
In this paper, we addressed a class of covariance steering problems for discrete-time stochastic linear systems with Wasserstein terminal cost. We showed that the proposed state feedback policies have significant advantages over previous policy parametrizations and formulated an SDP to find the optimal policy parameters by using suitable variable transformations. Then, we showed that the optimal policy is deterministic for the problems that we addressed. Finally, we demonstrate the efficacy of our approach by extensive numerical simulations.
In our future work, we plan to extend our approach to robust and nonlinear covariance control problems as well as dynamic games with covariance assignment constraints.   The first row indicates the problem horizon N , the second, the third and the fourth row correspond to the randomly generated system in Fig. 1, the two-dimensional and the three-dimensional double integrator, respectively.