What's the difference between two command?

2 Ansichten (letzte 30 Tage)
준호
준호 am 27 Jan. 2024
Kommentiert: Sam Chak am 27 Jan. 2024
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 Kommentar
Dyuman Joshi
Dyuman Joshi am 27 Jan. 2024
Could you please share the example where that particular syntax is used?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Paul
Paul am 27 Jan. 2024
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 Kommentare
Dyuman Joshi
Dyuman Joshi am 27 Jan. 2024
Wow. I was not even born then haha.
Sam Chak
Sam Chak am 27 Jan. 2024
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Dynamic System Models finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by