www.gusucode.com > robust 案例源码程序 matlab代码 > robust/DecomposeUncertainModelUsingLftdataExample.m
%% Decompose Uncertain Model Using lftdata % You decompose an uncertain model into a fixed certain part and normalized % uncertain part using the <docid:robust_ref.f10-120643> command. To see % how this command works, create a 2-by-2 uncertain matrix (|umat|) using % three uncertain real parameters. %% delta = ureal('delta',2); eta = ureal('eta',6); rho = ureal('rho',-1); A = [3+delta+eta delta/eta;7+rho rho+delta*eta] %% % The |umat| |A| depends on two occurrences of |delta|, three occurrences % of |eta|, and one occurrence of |rho|. % % Decompose |A| into |M| and |Delta|. [M,Delta] = lftdata(A); %% % |M| is a numeric matrix. M %% % |Delta| is a |umat| with the same uncertainty dependence as |A|. Delta %% % To examine some of the characteristics of |Delta|, sample it at three % points. Note that: %% % % * The sampled value of |Delta| is always diagonal. % * The sampled values alway range between -1 and 1, because |Delta| is % normalized. % * The sampled matrices each contain three independent values. Duplication % of the entries is consistent with the dependence of |Delta| and |A| on % the three uncertain real parameters. usample(Delta,3) %% % Verify that the maximum gain of |Delta| is 1. maxnorm = wcnorm(Delta) %% % Finally, verify that |lft(Delta,M)| is the same as |A|. To do so, take % the difference, and use the |'full'| option in |simplify| to remove % redundant dependencies on uncertain elements. simplify(lft(Delta,M)-A,'full')