⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdsolv.m

📁 控制系统计算机辅助设计——MATLAB语言与应用(源代码)
💻 M
字号:
function [lamda,kpc]=pdsolv(nli,mwi,sf)
%PDSOLV is a utility function for FPSEUDO
%       [lamda,Kpc]=PDSOLV(NLI,MWI,sf) solves the real symmetric eigenvalue
%       problem  (MWI.*sf)*Kpc = lamda*(NLI.*sf)*Kpc  using singular value
%       decompositions.  When NLI is almost singular small changes in the
%       scalar sf affect the result.
%       Kpc a vector.

%       Dr M.P. Ford 2nd September 1987
% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd
%       MRN0019

[x,d,temp]=svd(nli.*sf);   % since N is real symmetric
			   % singular values = eigenvalues
			   % but SVD has better numerical properties.
if any(diag(d)==0);   % a perfect fit
   crlf=setstr([13,10]);
   error(['Matrix is singular to working precision', crlf,...
	  'Order of compensator too high or not enough frequency points?'])
end
id=diag(sqrt(diag(d)).\1);   % inverse of square roots of d  (diagonal)
x=real(x);             % x should be real
mwid=id*x'*(mwi.*sf)*x*id;
mwid=real((mwid+mwid')./2);  % make sure it is real symmetric
[s,lamda,temp]=svd(mwid);
[lamda,i]=min(diag(lamda));  % last one should be the minimum
kpc=x*id*real(s(:,i)); %  s should be real also

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -