Message Boards Message Boards

5
|
1120 Views
|
6 Replies
|
8 Total Likes
View groups...
Share
Share this post:

Issue with NyquistPlot

Posted 5 months ago

I have been trying use the NyquistPlot function to generate a NyquistPlot for the following transfer function:

gLT = (3.55310^-15s^4 - 0.1642s^3 - 0.1243s^2 - 0.00161s + 9.12110^-17) / ( s^5 + 1.825s^4 + 2.941s^3 + 0.03508s^2 + 0.01522s - 1.245*10^-15)

(the Pitch Dynamics for an F16 fighter)

However, when I execute a Nyquist Plot of this in Mathematica, it does not produce the correct result (Matlab and Scilab do produce correct plots).

The Scilab program appears below:

// This file is a test of the Nyquist function in Scilab. It is for an F16 pitch
// dynamics.
s = poly(0, "s")    
gstf = syslin("c", (3.553e-15 * s^4 - 0.1642 * s^3 - 0.1243 * s^2 -0.00161 * s + 9.121e-17) ...
/ (s^5 + 1.825 * s^4 + 2.941 * s^3 + 0.03508 * s^2 + 0.01522 * s - 1.245e-15)) 
nyquist(gstf)

and the plot produced is:

Scilab Nyquist Plot

A Mathematica Notebook with the issues is below

One can see that the Mathematica Nyquist Plot is completely wrong.

Does anyone know what is going on here?

Thanks in advance for any assistance.

Regards,
Robert Betz

POSTED BY: Robert Betz
6 Replies
Posted 5 months ago

There's a bug in computing the default frequency range. This is a workaround.

NyquistPlot[gLT, {-3, 3}, PlotPoints -> 200, MaxRecursion -> 10]

enter image description here

POSTED BY: Suba Thomas
Posted 5 months ago

Suba,

Thanks for the help. I was surprised that there is still such a bug in NyquistPlot. This function has been in Mathematica forever.

Anyway, thanks again for clearing up the issue. Much appreciated.

Regards,

Robert Betz

POSTED BY: Robert Betz

Hello, use Chop[] so that you get a similar plot

NyquistPlot[Chop[gLTTf], PlotRange -> {{-6, 1}, {-3, 3}}, 
 AspectRatio -> Full, Exclusions -> None]
POSTED BY: Maher Kuzbari

Why is dosen't work with my code ? See below:

POSTED BY: Mariusz Iwaniuk

When using Rationalize you have set the tolerance to 0. Try using a higher tolerance:

gLT = Rationalize[ (
   3.553*10^-15*s^4 - 0.1642*s^3 - 0.1243*s^2 - 0.00161*s + 
    9.121*10^-17)/(
   s^5 + 1.825*s^4 + 2.941*s^3 + 0.03508*s^2 + 0.01522*s - 
    1.245*10^-15), 10^-14];
POSTED BY: Maher Kuzbari

Yes ,probably is a bug in NyquistPlot.

I tried your example in Matlab and give the same plot what you wrote earlier.

You may write to WRI and you will find out what they will say.

Regards M.I.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract