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 — Nyquist plot with imaginary poles, semi-circles only working after 'trick' · Issue #613 · python-control/python-control

Nyquist plot with imaginary poles, semi-circles only working after 'trick' #613

New issue
Copy link
New issue
Copy link
Closed
#620
Closed
Nyquist plot with imaginary poles, semi-circles only working after 'trick'#613
#620
Copy link

Description

@kevindekemele
kevindekemele
opened on Apr 22, 2021
Issue body actions

I'm plotting the Nyquist diagram of a transfer function which has poles on the imaginary axis:


import control
import matplotlib.pyplot as plt
import numpy as np

K = 1

Gp =  control.tf([1], [1,1,0,0,0]) 
Gc = control.tf([K], [1]) 


control.nyquist_plot(Gp*Gc,plot=True,omega_num=1000)
plt.show()

Which results in the following incorrect plot, that does not show infinte semicircles, but something incorrect:
image

Also using indent_direction and indent_radius did not solve this.
The trick I found that makes it work is if I add omega_limits=[0.001,10000] to nyquist_plot:

image

Can you please fix such that the incorrect 'line' does not appear?

Activity

  1. bnavigator commented on Apr 24, 2021

    @bnavigator
    bnavigator
    on Apr 24, 2021
    Contributor
    More actions

    Yes, the algorithm to determine the default omega vector for the system starts with a lower frequency of 0.1, because the lowest non-zero pole of the system is at -1.

    python-control/control/freqplot.py

    Lines 1088 to 1092 in e81f648

    # This code looks at the poles and zeros of all of the systems that
    # we are plotting and sets the frequency range to be one decade above
    # and below the min and max feature frequencies, rounded to the nearest
    # integer. It excludes poles and zeros at the origin. If no features
    # are found, it turns logspace(-1, 1)

    The "trick" to manually define the omega limits is the correct way to override the default omega vector determination.

  2. kevindekemele commented on Apr 25, 2021

    @kevindekemele
    kevindekemele
    on Apr 25, 2021
    Author
    More actions

    Perhaps if there is a pole at the origin, the lower limit of the omega vector should be below the indent_radius ?

    Reacted by Richard Murray
  3. murrayrm
    linked a pull request that will close this issueRefine automatic contour determination in Nyquist plot #620on Jun 5, 2021
  4. murrayrm
    closed this as completedin #620on Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — 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.