Reduced-order inf. horizon time-inv. discr.-time LQG control for systems with white parameters
08 Jun 2008
30 Mar 2010)
Optimal reduced-order compensation of discrete-time linear systems with white parameters
%PINVF: Pseudoinverse based on r singular values of A.
% X = PINVF(A,r,tol) produces a matrix X of the same dimensions
% as A' so that A*X*A = A, X*A*X = X and AX and XA
% are Hermitian. The computation is based on SVD(A) and r
% singular values.
% X = pinvf(A,r,tol)
% See also RANK.
% L.G. Van Willigenburg, W.L. De Koning, 28-11-95.
function X = pinvf(A,r,tol)
[U,S,V] = svd(A,0);
if min(size(S)) == 1
S = S(1);
S = diag(S);
tol = max(size(A)) * S(1) * eps;
rt = sum(S > tol);
if (rt == 0)
X = zeros(size(A'));
S = diag(ones(rt,1)./S(1:rt));
X = V(:,1:rt)*S*U(:,1:rt)';