📄 程序.txt
字号:
function [reout,im,w] = nyquist(a,b,c,d,iu,w)
%NYQUIST Nyquist frequency response of LTI models.
%
% NYQUIST(SYS) draws the Nyquist plot of the LTI model SYS
(created with either TF, ZPK, SS, or FRD). The frequency range
and number of points are chosen automatically. See BODE for
details on the notion of frequency in discrete-time.
%
% NYQUIST(SYS,{WMIN,WMAX}) draws the Nyquist plot for frequencies between WMIN and WMAX (in radians/second).
%
% NYQUIST(SYS,W) uses the user-supplied vector W of frequencies (in radian/second) at which the Nyquist response is to be evaluated. See LOGSPACE to generate logarithmically spaced frequency vectors.
% NYQUIST(SYS1,SYS2,...,W) plots the Nyquist response of multiple LTI models SYS1,SYS2,... on a single plot. The frequency vector W is optional. You can also specify a color, line style, and marker for each system, as in nyquist(sys1,'r',sys2,'y--',sys3,'gx').
%
% [RE,IM] = NYQUIST(SYS,W) and [RE,IM,W] = NYQUIST(SYS) return the real parts RE and imaginary parts IM of the frequency response (along with the frequency vector W if unspecified). No plot is drawn on the screen. If SYS has NY outputs and NU inputs, RE and IM are arrays of size [NY NU LENGTH(W)] and the response at the frequency W(k) is given by RE(:,:,k)+j*IM(:,:,k).
%
% See also BODE, NICHOLS, SIGMA, FREQRESP, LTIVIEW, LTIMODELS.
% Old help warning(['This calling syntax for ' mfilename ' will not be supported in the future.']) NYQUIST Nyquist frequency response for continuous-time linear systems. NYQUIST(A,B,C,D,IU) produces a Nyquist plot from the inputs IU to all the outputs of the system:
. -1
x = Ax + Bu G(s) = C(sI-A) B + D
y = Cx + Du RE(w) = real(G(jw)), IM(w) = imag(G(jw))
%
% The frequency range and number of points are chosen automatically.
%
% NYQUIST(NUM,DEN) produces the Nyquist plot for the polynomial transfer function G(s) = NUM(s)/DEN(s) where NUM and DEN contain the polynomial coefficients in descending powers of s.
%
% NYQUIST(A,B,C,D,IU,W) or NYQUIST(NUM,DEN,W) uses the user-supplied freq. vector W which must contain the frequencies, in radians/sec,at which the Nyquist response is to be evaluated. When invoked with left hand arguments, [RE,IM,W] = NYQUIST(A,B,C,D,...) [RE,IM,W] = NYQUIST(NUM,DEN,...) returns the frequency vector W and matrices RE and IM with as many columns as outputs and length(W) rows. No plot is drawn on the screen.
See also: LOGSPACE,MARGIN,BODE, and NICHOLS.
% J.N. Little 10-11-85 Revised ACWG 8-15-89, CMT 7-9-90, ACWG 2-12-91, 6-21-92, AFP 2-23-93, 10-1-94 Copyright 1986-2002 The MathWorks, Inc. $Revision: 1.18 $ $Date: 2002/04/10 06:24:57 $
ni = nargin;
no = nargout;
% Check for demo and quick exit
if ni==0,
eval('exresp(''nyquist'')')
return
end
error(nargchk(2,6,ni));
% Determine which syntax is being used
switch ni
case 2
if size(a,1)>1,
% SIMO syntax
a = num2cell(a,2);
den = b;
b = cell(size(a,1),1);
b(:) = {den};
end
sys = tf(a,b);
w = [];
case 3
% Transfer function form with time vector
if size(a,1)>1,
% SIMO syntax
a = num2cell(a,2);
den = b;
b = cell(size(a,1),1);
b(:) = {den};
end
sys = tf(a,b);
w = c;
case 4
% State space system without iu or time vector
sys = ss(a,b,c,d);
w = [];
otherwise
% State space system, with iu but w/o time vector
if min(size(iu))>1,
error('IU must be a vector.');
elseif isempty(iu),
iu = 1:size(d,2);
end
sys = ss(a,b(:,iu),c,d(:,iu));
if ni<6,
w = [];
end
end
if no==0,
nyquist(sys,w);
else
[reout,im,w] = nyquist(sys,w);
[Ny,Nu,lw] = size(reout);
reout = reshape(reout,[Ny*Nu lw]).';
im = reshape(im,[Ny*Nu lw]).';
end
% end nyquist
LTI模式的NYQUIST Nyquist频率响应.NYQUIST((SYS)吸引Nyquist小块LTI模式SYS(,用或者SS或者FRD)TF,ZPK,建立.频率范围和点的数目被自动选择.看见预示为有关在分离的-time。中常见想法细节
NYQUIST((SYS{,WMIN,WMAX)}为频率在WMIN和WMAX之间((在弧度//秒)中吸引Nyquist计划.
奈奎斯特(系统,瓦特)使用用户提供的矢量瓦特的频率(在弧度/秒) ,其中奈奎斯特反应是进行评估。见logspace产生对数间隔的频率向量。
NYQUIST((SYS1,SYS2,W)阴谋策划有关一专一计划多重的LTI模式SYS1,SYS2的Nyquist反应.频率矢W是可选.当在nyquist((sys1',r',sys2',y--'----sys3',gx)'中时,你能也指定一颜色,沿款式和为每一系统打记号的人排列.
[重,即时通讯] =奈奎斯特(系统, w )和[转口,即时通讯,瓦特] =奈奎斯特(系统)返回的真正部分重新部和虚部即时通讯的频率响应(随频率矢量瓦特,如果未指定) 。没有情节,是订定在屏幕上。如果系统有纽约州的产出和Nu投入,重新和IM是阵列的大小[纽约州怒族长度(瓦特) ]及反应的频率瓦特( k )项是给予重新(:,:, k )款+ j *即时通讯( : , : , k )的。
请参看也BODE,NICHOLS,SIGMA,FREQRESP,LTIVIEW,LTIMODELS. 见也预示着,尼科尔斯,西格玛, freqresp , ltiview , ltimodels 。
岁的帮助警告( [ '这一要求的语法' mfilename '将不会予以支持,在未来。 ' ] )奈奎斯特奈奎斯特频率响应为连续时间的线性系统。奈奎斯特(甲,乙,丙,丁,廖)所产生的奈奎斯特的阴谋,从投入,廖向所有的产出系统: 。 -1 x =斧+步克( ) = C (上泗一)乙+ d为Y =国泰航空+杜重(宽) =真正的(克(系列JW ) ) ,即时通讯(瓦特) =图像(克(系列JW ) ) %
频率范围和点的数目被自动选择. 频率范围和若干要点是选择自动。
NYQUIST((NUM,兽穴)为多项式的转换函数G((s)=NUM((s)/DEN((s)NUM在哪里,和DEN在落到用s的力量的地步方面含有多项式的协同因素的生产Nyquist计划. 奈奎斯特( NUM个,书斋)生产奈奎斯特的阴谋多项式传递函数克( ) = NUM个( ) /书斋( )凡NUM个和Den包含多项式系数递减的权力,美国 奈奎斯特( NUM个,书斋)生产奈奎斯特的阴谋多项式传递函数克( ) = NUM个( ) /书斋( )凡NUM个和Den包含多项式系数递减的权力,美国
奈奎斯特(甲,乙,丙,丁,廖,瓦特)或奈奎斯特( NUM个,书斋,瓦特)使用用户提供的频率。矢量瓦特,其中必须包含的频率,在弧度/秒,在哪个奈奎斯特反应是进行评估。当引用与左手的论点, [转口,即时通讯,瓦特] =奈奎斯特(甲,乙,丙,丁, ,...) [转口,即时通讯,瓦特] =奈奎斯特( NUM个,书斋,...)回报的频率矢量瓦特和矩阵的转口和IM与尽可能多的栏目,作为产出和长度(瓦特)行。没有情节,是订定在屏幕上。也请看: logspace ,保证金,预示着,和尼科尔斯。 奈奎斯特(甲,乙,丙,丁,廖,瓦特)或奈奎斯特( NUM个,书斋,瓦特)使用用户提供的频率。矢量瓦特,其中必须包含的频率,在弧度/秒,在哪个奈奎斯特反应是进行评估。当引用与左手的论点, [转口,即时通讯,瓦特] =奈奎斯特(甲,乙,丙,丁, ,...) [转口,即时通讯,瓦特] =奈奎斯特( NUM个,书斋,...)回报的频率矢量瓦特和矩阵的转口和IM与尽可能多的栏目,作为产出和长度(瓦特)行。没有情节,是订定在屏幕上。
也请看: logspace ,保证金,预示着,和尼科尔斯。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -