GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Incorrect nyquist plot · Issue #830 · python-control/python-control

Incorrect nyquist plot #830

New issue
Copy link
New issue
Copy link
Closed
#880
Closed
Incorrect nyquist plot#830
#880
Copy link
Assignees
murrayrm
Milestone
0.9.4

Description

@Avitan01
Avitan01
opened on Dec 31, 2022
Issue body actions

I'm using the control package with python 3.10 in Pycharm and Jupiter lab.
I have stumbled upon a possible issue while trying to create a Nyquist plot for a simple system

import control as ct

s = ct.tf('s'))
plant_1 = 1/(s*(s + 5)*(s + 7)))
ct.nyquist_plot(plant_1)

The result I'm getting is this:

download

While in MATLAB I'm getting different results

clear all;
close all;
clc;


s = tf('s');
plant_1 = 1/(s*(s + 5)*(s + 7));
nyquistplot(plant_1)

image

Is there a limitation that might be causing this issue or am I missing something?

Activity

  1. bnavigator commented on Dec 31, 2022

    @bnavigator
    bnavigator
    on Dec 31, 2022
    Contributor
    More actions

    Look at the y-axis scale. The nyquist plot from control cuts off at max_curve_magnitude and scales the "infinity" loop for display within the plot boundaries.
    https://python-control.readthedocs.io/en/0.9.2/generated/control.nyquist_plot.html#control.nyquist_plot

  2. henklaak commented on Feb 2, 2023

    @henklaak
    henklaak
    on Feb 2, 2023
    Contributor
    More actions

    Behaviour that will 'surprise' many, I guess. The documentation is not explicit about it and the default value of 20.

    How about not drawing the large magnitudes at all? Just clip the traces at the limit with a ≫to indicate direction?

  3. murrayrm commented on Feb 2, 2023

    @murrayrm
    murrayrm
    on Feb 2, 2023
    Member
    More actions

    If you clip the traces, then it is harder to see the number of net encirclements. Especially if there is more than one. For example

    sys = ct.tf([1], [1, 3, 2]) * ct.tf([1], [1, 0, 1])
    ct.nyquist_plot(sys)
    

    which generates:
    multi-encirclement

    Reacted by Ben Greiner
  4. murrayrm commented on Feb 2, 2023

    @murrayrm
    murrayrm
    on Feb 2, 2023
    Member
    More actions

    We should definitely make sure all of this is well-documented, though.

    Reacted by Ben Greiner
  5. henklaak commented on Feb 3, 2023

    @henklaak
    henklaak
    on Feb 3, 2023
    Contributor
    More actions

    I'll take a stab at this (the documenting part), expect PR.

    Reacted by Ben Greiner and Rene van Paassen
  6. murrayrm
    added this to the 0.9.4 milestone on Mar 26, 2023
  7. murrayrm
    self-assigned this
    on Mar 26, 2023
  8. murrayrm
    closed this as completedin #880on Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @murrayrm
    murrayrm

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    • 0.9.4

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.