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 — Create matlab's equivalent to bandwidth. · Issue #690 · python-control/python-control

Create matlab's equivalent to bandwidth. #690

New issue
Copy link
New issue
Copy link
Closed
Closed
Create matlab's equivalent to bandwidth.#690
Copy link
Labels
enhancement

Description

@Kreijstal
Kreijstal
opened on Jan 9, 2022
Issue body actions

Is it possible to create matlab's equivalent to bandwidth in control?
https://www.mathworks.com/help/control/ref/lti.bandwidth.html
or are there any alternatives available?

Reacted by Scott Shambaugh

Activity

  1. murrayrm commented on Jan 9, 2022

    @murrayrm
    murrayrm
    on Jan 9, 2022
    Member
    More actions

    Definitely possible, although this can also be done with the output from bode_plot and the Numpy argmin function, I suspect.

    If you (or someone) want to contribute code to do this, we can put it either in the main package or in the MATLAB compatibility module.

  2. murrayrm
    added
    enhancement
    on Jan 9, 2022
  3. Kreijstal commented on Jan 10, 2022

    @Kreijstal
    Kreijstal
    on Jan 10, 2022
    Author
    More actions

    Here is roughly how I solved it for me, I don't have time for providing a pull request, but maybe someone writing the pull request can get inspired.

    import scipy
    import numpy as np
    def bandwidth(sys,dbgain=-3):
      result=scipy.optimize.root(lambda s:control.matlab.freqresp(sys,s)[0][0]-control.matlab.dcgain(sys)*10**(dbgain/20),1)
      if result.success:
        return np.abs(result.x)[0]
      else:
        raise Exception(result.message)
  4. roryyorke commented on Jul 14, 2024

    @roryyorke
    roryyorke
    on Jul 14, 2024
    Contributor
    More actions

    Looks like merged #889 closes this?

  5. Kreijstal commented on Jul 14, 2024

    @Kreijstal
    Kreijstal
    on Jul 14, 2024
    Author
    More actions

    I have not used control in years, but I am happy it got solved

  6. Kreijstal
    closed this as completedon Jul 14, 2024
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

    enhancement

    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.