Assume that we have input vector $y_k \in \Re^{pxN}, u_k \in \Re^{mxN}$.
The vectors can be interpreted as:
$$u_k = (u_0 , u_1, u_2, u_3, \dots , u_{N-1})$$ $$y_k = (y_0 , y_1, y_2, y_3, \dots , y_{N-1})$$
Yes, $u_k, y_k$ can contains multiple dimensions.
So. I create my hankel matrices.
$$U = \begin{bmatrix} u_0 & u_1 & \dots & u_{j-1}\\ u_1 & u_2 & \dots & u_{j}\\ \vdots & \vdots& \ddots & \vdots\\ u_{i-1} & u_i & \dots & u_{i+j-2} \end{bmatrix}$$
$$Y = \begin{bmatrix} y_0 & y_1 & \dots & y_{j-1}\\ y_1 & y_2 & \dots & y_{j}\\ \vdots & \vdots& \ddots & \vdots\\ y_{i-1} & y_i & \dots & y_{i+j-2} \end{bmatrix}$$
Then I use LQ-decomposition to find $L_{22}$.
$$\begin{bmatrix} U\\ Y \end{bmatrix}=\begin{bmatrix} L_{11} & 0\\ L_{21} & L_{22} \end{bmatrix}\begin{bmatrix} Q_1\\ Q_2 \end{bmatrix}$$
The problem here is that I don't know the dimension of $L_{11}, L_{21}, L_{22}$. I know that the $L$-matrix and $Q$-matrix dimension. But no more!
If we try to simulate this method, we will first made up two vectors $u_k$ and $y_k$.
Then we use this code to create our hankel matricies. We determine the row dimension $i$ and column dimension $j$
U = hank(u, i, j)
Y = hank(y, i, j)
-
function [H] = hank(g, i, j)
% Create hankel matrix
H = cell(i, j);
for i = 1:i
for j = 1:j
H{i,j} = g(:,1+i+j-2);
end
end
% Cell to matrix
H = cell2mat(H);
end
Then we use this code to find the $L$-matrix.
L = triu(qr([U;Y]'))'
I have made a test. Consider this as a impulse response.
>> u = 0.1:0.1:4;
>> y = sin(u)./u;
>> U = hank(u, 9, 10); %i = 9, j = 10
>> Y = hank(y, 9, 10)
>> L = triu(qr([U;Y]'))'
L =
-1.96214 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-2.24245 -0.14639 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-2.52275 -0.29277 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-2.80306 -0.43916 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-3.08337 -0.58554 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-3.36367 -0.73193 0.00000 0.00000 0.00000 -0.00000 0.00000 0.00000 0.00000 0.00000
-3.64398 -0.87831 0.00000 0.00000 0.00000 -0.00000 -0.00000 0.00000 0.00000 0.00000
-3.92428 -1.02470 0.00000 0.00000 0.00000 -0.00000 -0.00000 0.00000 0.00000 0.00000
-4.20459 -1.17108 0.00000 0.00000 0.00000 -0.00000 -0.00000 0.00000 0.00000 0.00000
-2.55531 -1.51407 -0.01761 -0.01546 0.01204 0.01140 -0.01846 0.00061 -0.00066 -0.00530
-2.49022 -1.51018 -0.01708 -0.01481 0.01152 0.01107 -0.01769 0.00059 -0.00063 -0.00507
-2.41765 -1.50114 -0.01644 -0.01409 0.01093 0.01067 -0.01682 0.00056 -0.00060 -0.00482
-2.33803 -1.48701 -0.01571 -0.01328 0.01028 0.01020 -0.01585 0.00052 -0.00057 -0.00454
-2.25182 -1.46787 -0.01488 -0.01239 0.00958 0.00968 -0.01479 0.00049 -0.00053 -0.00423
-2.15954 -1.44384 -0.01398 -0.01144 0.00882 0.00910 -0.01365 0.00045 -0.00049 -0.00390
-2.06171 -1.41507 -0.01299 -0.01042 0.00801 0.00847 -0.01244 0.00041 -0.00044 -0.00355
-1.95890 -1.38174 -0.01193 -0.00935 0.00716 0.00780 -0.01116 0.00036 -0.00040 -0.00318
-1.85171 -1.34403 -0.01081 -0.00824 0.00628 0.00708 -0.00983 0.00032 -0.00035 -0.00279
Here we can see clearly that $L$-matrix has a lower triangular shape. But I still don't know how I should split $L$ into $L_{11}, L_{21}, L_{22}$.
The dimension of $L$ is $2ixj$.
Question:
Do you know how to split $L$ into $L_{11}, L_{21}, L_{22}$?