Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Any plan for step_info to support negative step responses? #337

Closed
Milestone
@hgducharme

Description

@hgducharme

I have step responses that go negative and sometimes stay negative, and it breaks the settling time calculation and rise time calculation. I've been messing around with it and might open a pull request if this is something y'all would be interested in.

For example, here is my code, the step response plot, and the error

fromcontrolimporttf,step_response,step_infoimportmatplotlib.pyplotaspltimportnumpyasnptransfer_function=tf( [3.32,0,-162.8], [1,24.56,186.5,457.8,116.2] )time,response=step_response(transfer_function)fig,ax=plt.subplots(1,1)ax.plot(time,response)plt.show()step_info(transfer_function)

step_response

step_info() gives the following error

Traceback (most recent call last):  File "bug_test.py", line 14, in <module>    step_info(transfer_function)  File "/Users/hgducharme/Programming/pendulum/env/lib/python3.7/site-packages/control/timeresp.py", line 536, in step_info    SettlingTime = T[i + 1]IndexError: index 1000 is out of bounds for axis 0 with size 1000

When I run this code in MATLAB, I get the following result


Screen Shot 2019-08-20 at 8 36 44 PM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp