What's the difference between two command?

Hello,
In general, the command of nyquist plot is nyquist(sys,omega), but an example of textbook the command of nyquist is nyquist(A,B,K,0,1,w), where (A,B : matrices from state space equation, K : control gain, w : frequency range).
What's the difference between the two commands?

1 件のコメント

Dyuman Joshi
Dyuman Joshi 2024 年 1 月 27 日
Could you please share the example where that particular syntax is used?

サインインしてコメントする。

回答 (1 件)

Paul
Paul 2024 年 1 月 27 日

2 投票

That's the old, obsolete form of nyquist() that was used for state space models before the Control System Toolbox introduced lti objects like ss and tf.
f = which('nyquist','-all')
f = 2×1 cell array
{'/MATLAB/toolbox/control/ctrlobsolete/nyquist.m' } {'/MATLAB/toolbox/shared/controllib/engine/@DynamicSystem/nyquist.m'}
dbtype(f{1},'35:58')
35 % Old help 36 %warning(['This calling syntax for ' mfilename ' will not be supported in the future.']) 37 %NYQUIST Nyquist frequency response for continuous-time linear systems. 38 % NYQUIST(A,B,C,D,IU) produces a Nyquist plot from the inputs 39 % IU to all the outputs of the system: 40 % . -1 41 % x = Ax + Bu G(s) = C(sI-A) B + D 42 % y = Cx + Du RE(w) = real(G(jw)), IM(w) = imag(G(jw)) 43 % 44 % The frequency range and number of points are chosen automatically. 45 % 46 % NYQUIST(NUM,DEN) produces the Nyquist plot for the polynomial 47 % transfer function G(s) = NUM(s)/DEN(s) where NUM and DEN contain 48 % the polynomial coefficients in descending powers of s. 49 % 50 % NYQUIST(A,B,C,D,IU,W) or NYQUIST(NUM,DEN,W) uses the user-supplied 51 % freq. vector W which must contain the frequencies, in radians/sec, 52 % at which the Nyquist response is to be evaluated. When invoked 53 % with left hand arguments, 54 % [RE,IM,W] = NYQUIST(A,B,C,D,...) 55 % [RE,IM,W] = NYQUIST(NUM,DEN,...) 56 % returns the frequency vector W and matrices RE and IM with as many 57 % columns as outputs and length(W) rows. No plot is drawn on the 58 % screen.

4 件のコメント

Dyuman Joshi
Dyuman Joshi 2024 年 1 月 27 日
I wonder how old that syntax is. The documentation pages say that ss and tf were introduced before R2006a.
So, I guess older than that? Or maybe it was discontinued afterwards?
Paul
Paul 2024 年 1 月 27 日
That syntax is as old as the Control System Toolbox itself, so nearly as old as the first commerical release of Matlab. If you're asking when ss and tf were implemented, that was probably around V5 would be my guess, so mid-90's.
Dyuman Joshi
Dyuman Joshi 2024 年 1 月 27 日
Wow. I was not even born then haha.
Sam Chak
Sam Chak 2024 年 1 月 27 日
The original Nyquist code was written in 1985.
% 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-2003 The MathWorks, Inc.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeDynamic System Models についてさらに検索

タグ

質問済み:

2024 年 1 月 27 日

コメント済み:

2024 年 1 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by