bugGNU Octave - Bugs: bug #45918, [octave forge] (control) Nyquist...

 
 

bug #45918: [octave forge] (control) Nyquist plot is incorrect

Submitter:  None
Submitted:  Thu 10 Sep 2015 06:13:11 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 06 Mar 2018 05:31:44 PM UTC, comment #9: 

This can be closed. It now works as expected.

Doug Stewart <dastew>
Fri 11 Sep 2015 10:52:48 AM UTC, comment #8: 

No, the original problem is not fixed.

The original problem is that the nyquist function doesn't show the interesting part of the plot entirely. If the user doesn't specify a frequency range or vector, nyquist tries to figure it out from the zeros and poles of the system. This part of the code could be more sophisticated indeed. In the case of


sys = tf ([-10 10], [1 1 0])


the lower frequency bound is too high such that the part which goes to infinity is not shown. On the other hand, if the lower frequency bound gets too low, the values on the imaginary axis go quickly towards infinity such that the part between -3 and 3 can't be seen anymore.

The task is to improve the code which computes the upper and lower frequency bounds. Not only for the system above, but for a wide variety of systems.

Lukas Reichlin <paramaniac>
Fri 11 Sep 2015 02:14:54 AM UTC, comment #7: 

Lukas: so this bug is resolved with that commit?

Mike Miller <mtmiller>
Group Member
Thu 10 Sep 2015 09:10:36 PM UTC, comment #6: 

This


nyquist (sys, {2e-1, 1e2})


shows you the same portion of the Nyquist plot as on this page


http://www.wolframalpha.com/input/?i=transfer+function+10*%281-s%29%2F%28%28s%2B1%29*s%29&dataset=


However, you need to apply this patch


https://bitbucket.org/paramaniac/control/commits/b23c696a02f0454f3582570b74a29f5d7b18f32e


before you can specify a frequency range for Nyquist plots. So thanks to your bug report, I squashed a bug which was unrelated to the original problem ;-)


Lukas Reichlin <paramaniac>
Thu 10 Sep 2015 08:29:16 PM UTC, comment #5: 

For reference, this is what Wolfram plot, it does match my own calculations and graph [1].

[1] http://www.wolframalpha.com/input/?i=transfer+function+10*%281-s%29%2F%28%28s%2B1%29*s%29&dataset=

Anonymous
Thu 10 Sep 2015 08:22:44 PM UTC, comment #4: 

sorry. I didn't see the negative sign.

Doug Stewart <dastew>
Thu 10 Sep 2015 08:21:04 PM UTC, comment #3: 

I don't get it. There is no zero-pole cancellation due to the negative sign.


octave:17> sys = tf([-10 10], [1 1 0])

Transfer function 'sys' from input 'u1' to output ...

      -10 s + 10
 y1:  ----------
       s^2 + s

Continuous-time model.
octave:18> [z, k] = zero (sys)
z =  1
k = -10
octave:19> pole (sys)
ans =

  -1
   0

octave:20> sysmin = minreal (sys)

Transfer function 'sysmin' from input 'u1' to output ...

      -10 s + 10
 y1:  ----------
       s^2 + s

Continuous-time model.
octave:21>


Lukas Reichlin <paramaniac>
Thu 10 Sep 2015 07:56:04 PM UTC, comment #2: 

Adding the control package maintainer in cc.

For future reference, it is more helpful when you provide a full working example (e.g. show the nyquist command also), and show the output, screenshot for plots, that does not match your expectation.

Mike Miller <mtmiller>
Group Member
Thu 10 Sep 2015 06:58:14 PM UTC, comment #1: 

you have  10*s +10  but this is 10*(s +1)
and you have for the denominator
   s^2 +s   and this is s(s+1)

so the system is 10/s

Yes the nyquist diagram is wrong.

These poles and zeros at -1 should disappear!


Doug Stewart <dastew>
Thu 10 Sep 2015 06:13:11 PM UTC, original submission:  

The Nyquist plot of the system defined by tf([-10 10], [1 1 0]) is incorrect, I did double check it with both pencil and paper and the online Wolfram Alpha tool.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by i7tiol (Updated the item)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by paramaniac (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by mtmiller
  • -email is unavailable- added by dastew (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-07 i7tiol StatusNone Fixed
        Open/ClosedOpen Closed
    2017-08-13 jwe Summarycontrol: Nyquist plot is incorrect [octave forge] (control) Nyquist plot is incorrect
    2015-09-10 mtmiller Carbon-Copy- Added paramaniac

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code