Teljes Matlab script kiegészítő függvényekkel.
File: d2018_01_16_LPV_zero_dynamics.m Directory: projects/3_outsel/2018_01_10_LPV_inversion Author: Peter Polcz (ppolcz@gmail.com)
Created on 2018. January 16.
Inherited from
LPV decomposition (version 3)
File: d2018_01_13_Kalman_decomp_LPV_v3.m Directory: projects/3_outsel/2018_01_10_LPV_inversion Author: Peter Polcz (ppolcz@gmail.com)
Created on 2018. January 13.
Inherited from
Kalman decomposition
File: Kalman_decomposition.m Directory: demonstrations/oktatas/ccs/2017fall Author: Peter Polcz (ppolcz@gmail.com)
Created on 2018. January 13.
Inhereted from:
CCS 2017 fall. Homework 2. Solutions
File: d2017_10_26_hf2_mo.m Directory: demonstrations/oktatas/ccs/2017fall Author: Peter Polcz (ppolcz@gmail.com)
Created on 2017. October 04. Reviewed on 2017. October 30.
Given the following LPV system:
$$ \begin{aligned} &\Sigma: \left\{\begin{aligned} &\dot x = A(\rho) x + B(\rho) u,~~~ \rho \in \mathcal P \\ &y = C x \\ \end{aligned}\right. \\ &\begin{aligned} \text{where: } & A(\rho) = A_0 + A_1 \rho \in \mathbb{R}^{n\times n} \\ & B(\rho) = B_0 + B_1 \rho \in \mathbb{R}^{n\times r} \\ & C \in \mathbb{R}^{m\times n} \\ & D = 0_{m\times r} \end{aligned} \end{aligned} $$
load LPV_18_01_13_Time211859
A_fh = @(rho) A0 + A1*rho;
B_fh = @(rho) B0 + B1*rho;
C_fh = @(rho) C0 + C1*rho;
D_fh = @(rho) D0 + D1*rho;
A = {A0, A1};
B = {B0, B1};
C = {C0, C1};
D = {D0, D1};
AA = [A{:}];
BB = [B{:}];
Nálam az $E_c$ most az $Im(B)$.
Im_B = IMA([B{1} B{2}]);
Ker_C = INTS(KER(C{1}), KER(C{2}));
We compute $\mathcal V^*$ and $\mathcal R^*$.
[R,V] = CSA([A{1} A{2}], Im_B, Ker_C);
assert(rank(R) == 0 && rank([V Ker_C]) == rank(Ker_C));
assert(rank(INTS(V, Im_B)) == 0)
We ensure that $\mathcal R^* = \{0\}$ and that $\mathcal V^* \subseteq \mathrm{Ker}(C)$. Furthermore, we checked the strong invertibility condition $\mathcal V^* \cap \mathrm{Im}\big(B(\rho)\big) = \{0\}$.
\begin{equation} {\LARGE(6) \quad} \mathcal V^* = \left(\begin{array}{ccccc} -1 & 0 & 0 & 0 & 0 \\ 0 & -0.88 & 0 & 0 & 0 \\ 0 & -0.386 & -0.585 & 0 & 0 \\ 0 & 0.129 & -0.377 & -0.707 & 0 \\ 0 & -0.129 & 0.377 & -0.707 & 0 \\ 0 & 0.21 & -0.611 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ \end{array}\right) \end{equation} \begin{equation} {\LARGE(7) \quad} \mathcal V_1 = \mathcal V^* \cap \mathrm{Im}\big(B(\rho)\big)^\perp = \left(\begin{array}{cc} -0.934 & 0 \\ -0.0555 & -0.14 \\ 0.0832 & 0.21 \\ 0 & 0.812 \\ -0.155 & 0.42 \\ 0.126 & 0.317 \\ -0.279 & 0 \\ \end{array}\right) \end{equation} \begin{equation} {\LARGE(8) \quad} \mathcal V_2 = \mathcal V^* \cap \mathrm{Im}\big(B(\rho)\big)^\perp = \left(\begin{array}{ccc} -0.357 & 0 & 0 \\ 0.145 & -0.855 & 0 \\ -0.217 & -0.474 & 0.41 \\ 0 & 0 & 0 \\ 0.405 & -0.123 & -0.528 \\ -0.328 & 0.1 & 0.428 \\ 0.73 & 0.142 & 0.608 \\ \end{array}\right) \end{equation}1. variáns
Let $T = \begin{pmatrix} {V^*}^\perp & L \end{pmatrix}^T$, where ${V^*}^\perp$ and $L$ are orthonormal bases for ${\mathcal V^*}^\perp \not\perp \mathcal L \subseteq \mathrm{Im}\big(B(\rho)\big)$, respectively.
L = ORTCO(Im_B);
T = [ ORTCO(V) L(:,1:end) ]';
tol = 1e-10;
prec = -log10(tol);
N = numel(A);
tA = cell(1,N);
tB = cell(1,N);
tC = cell(1,N);
tD = cell(1,N);
for i = 1:numel(A)
    tA{i} = round(T*A{i}/T, prec);
    tB{i} = round(T*B{i}, prec);
    tC{i} = round(C{i}/T, prec);
    tD{i} = round(D{i}, prec);
end
tA_fh = @(rho) tA{1} + tA{2}*rho;
tB_fh = @(rho) tB{1} + tB{2}*rho;
tC_fh = @(rho) tC{1} + tC{2}*rho;
tD_fh = @(rho) tD{1} + tD{2}*rho;