What's the difference between two command?

1 次查看(过去 30 天)
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 个)

Paul
Paul 2024-1-27
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 个评论
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.

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by