?? 程序.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 + -