LQROneStepLTV

Updated:

Tags: , , ,

Sintax

[K,P] = LQROneStepLTV(system,T,E)
[K,P] = LQROneStepLTV(system,T,E,opts)

Description

Consider a generic LTV system of the form

\[\mathbf{x}(k+1)=\mathbf{A}(k)\mathbf{x}(k)+\mathbf{B}(k)\mathbf{u}(k)\;\]

where $\mathbf{x}(k)\in\mathbb{R}^{n}$ is the state vector, $\mathbf{u}(k)\in \mathbb{R}^{m}$ is the input vector, and $\mathbf{A}(k)$ and $\mathbf{B}(k)$ are time-varying matrices of appropriate dimensions.

Consider a standard LQR regulator

\[\mathbf{u}(k) = -\mathbf{K}(k)\mathbf{x}(k)\:,\]

where $\mathbf{K}(k)\in\mathbb{R}^{m\times n}$ is the regulator gain. Consider a regulator cost function

\[J_{\infty}(k) = \sum_{\tau=k}^{\infty}\left(\mathbf{x}^T(\tau)\mathbf{Q}(\tau)\mathbf{x}(\tau)+\mathbf{u}^T(\tau)\mathbf{R}(\tau)\mathbf{u}(\tau)\right)\:,\]

where $\mathbf{Q}(\tau) \succeq \mathbf{0}\in\mathbb{R}^{n\times n}$ and $\mathbf{R}(\tau) \succ \mathbf{0}\in\mathbb{R}^{m\times m}$ are the time-varying weighing matrices of the state vector and control action, respectively.

Let matrix $\mathbf{E} \in\mathbb{R}^{m\times n}$ denote a sparsity pattern. The set of matrices which obey the sparsity constraint determined by $\mathbf{E}$ is defined as

\[\mathrm{Sparse}(\mathbf{E}) :=\left\{[\mathbf{K}]_{ij}\in\mathbb{R}^{m\times n}: [\mathbf{E}_{ij}] = 0 \implies [\mathbf{K}]_{ij}= 0;\: i= 1,...,m, \:j=1,...,n \right\}.\]

The one-step method computes a sequence of decentralized gains that aims at solving the optimization problem

\[\begin{aligned} & \underset{\begin{subarray}{c}\mathbf{K}(i)\in \mathbb{R}^{m\times n},\: i\in \mathbb{N}_0 \end{subarray}}{\text{minimize}} & & J_{\infty}(0) \\ & \text{subject to} & & \mathbf{K}(i) \in \mathrm{Sparse}(\mathbf{E}),\: i\in \mathbb{N}_0\:. \end{aligned}\]

Define the finite-horizon performance index, over a given finite window $ \{ k,\ldots,k+T \} $, where $T\in\mathbb{N}$, as

\[J(k) := \mathbf{x}^T(k+T)\mathbf{Q}(k+T)\mathbf{x}(k+T) + \sum_{\tau = k}^{k+T-1} \left(\mathbf{x}^T(\tau)\mathbf{Q}(\tau) \mathbf{x}(\tau)+\mathbf{u}^T(\tau)\mathbf{R}(\tau) \mathbf{u}(\tau)\right) \:.\]

The one-sep method computes the close-form solution to the relaxed finite-window optimization problem

\[\begin{aligned} & \underset{\begin{subarray}{c}\mathbf{K}(\tau)\in \mathbb{R}^{m\times n} \\\tau = k,...,k+T-1 \end{subarray}}{\text{minimize}} & & J(k)\\ & \text{subject to} & & \mathbf{K}(\tau) \in \mathrm{Sparse}(\mathbf{E}),\: \tau = k,...,k+T-1\:, \end{aligned}\]

using the one-step method procedure proposed in [Section 3, 1]. It is shown in [1] that there is a matrix $\mathbf{P}(\tau) \succ \mathbf{0}\in\mathbb{R}^{n\times n},\tau = k,\ldots,k+T$, such that

\[J(\tau) = \mathbf{x}^T(\tau)\mathbf{P}(\tau)\mathbf{x}(\tau)\:.\]

The commands

[K,P] = LQROneStepLTV(system,T,E)
[K,P] = LQROneStepLTV(system,T,E,opts)

compute the sequence of decentralized gain that solves the relaxed problem, as well as the sequence of matrices $\mathbf{P}(\tau).$


Computational complexity

The one-step optimization problem is solved using the efficient sparse equation solver proposed in [2]. See sparseEqSolver for the implementation of the solver.

Define the set $\chi$ of integer pairs of the form $(i,j)$ to index the nonzero entries of $\mathbf{E}$ as

\[\begin{cases} (i,j) \in \chi &\;,\;\left[\mathbf{E}\right]_{i,j} \neq 0\\ (i,j) \notin \chi &\;,\;\text{otherwise} \end{cases}, i = 1,...,n,\: j = 1,...,o\:.\]

It is shown in [2] that each gain computation of the algorithm requires $\mathcal{O}(|\chi|^3)$ floating-point operations, where $|\chi|$ denotes the cardinality of set $\chi$. In the field of distributed estimation and control theory, $|\chi|$ is usually given by $|\chi| \approx cn$, where $c\in \mathbb{N}$ is a constant. It, thus, follows that each iteration requires $\mathcal{O}(n^3)$ floating-point operations, thus it has the same complexity as a centralized gain computation.


Input arguments

Required

  • system : \((T+1)\times 4\) cell array of the time-varying dynamics matrices of the LTV system, i.e.,
    • system{i,1}: \(\mathbf{A}(k+i-1),\: i = 1,\ldots, T\)
    • system{i,2}: \(\mathbf{B}(k+i-1),\: i = 1,\ldots, T\)
    • system{i,3}: \(\mathbf{Q}(k+i-1),\: i = 1,\ldots, T+1\)
    • system{i,4}: \(\mathbf{R}(k+i-1),\: i = 1,\ldots, T\)
  • E : sparsity pattern $\mathbf{E}$
  • T : length of the finite window

Optional

  • opts: struct of optional arguments (assumes default value for each parameter which is not assigned by the user)
    • verbose: display algorithm status messages (default: opts.verbose = false)

Output Arguments

  • K: \(T\times 1\) cell array of the sequence of decentralized LQR gains \(\mathbf{K}(\tau),\: \tau = k,\ldots,k+T-1\), i.e.,
    • K{i,1}: \(\mathbf{K}(k+i-1)\)
  • P: \((T+1)\times 1\) cell array of the sequence of matrices \(\mathbf{P}(\tau),\: \tau = k,\ldots,k+T\), i.e.,
    • P{i,1}: \(\mathbf{P}(k+i-1)\)

Examples

See Regulator design using the one-step method for a tutorial.


References

[1] Pedroso, L. and Batista, P., 2021. Discrete‐time decentralized linear quadratic control for linear time‐varying systems. International Journal of Robust and Nonlinear Control. doi:10.1002/rnc.5772.

[2] Pedroso, L. and Batista, P., 2021. Efficient algorithm for the computation of the solution to a sparse matrix equation in distributed control theory. Mathematics, 9(13), p.1497. doi:10.3390/math9131497.