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

Add aliases of selected functions as member functions to LTI#1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
murrayrm merged 3 commits intopython-control:mainfromlkies:main
Jan 13, 2025

Conversation

@lkies
Copy link
Contributor

And add automatic frequency computation toLTI.frequency_response since refactoring to replace it withcontrol.frequency_response is not possible without breaking changes.

Closes#1084

@coveralls
Copy link

coveralls commentedJan 7, 2025
edited
Loading

Coverage Status

coverage: 94.781% (-0.009%) from 94.79%
when pulling566627b on lkies:main
into93c4c8d on python-control:main.

Copy link
Member

@murrayrmmurrayrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for these contributions. These look OK to me.

I think we need to put in some sort of unit test just to make sure the functions work as intended. This is perhaps as simple as just creating a state space system (which has all of the member functions defined), making sure all of the member functions point to the existing function, and then calling it with no argument and with some simple argument(s) to make sure we get aControlPlot back.

Comment on lines 217 to 232
# conversions
to_ss:Callable
to_tf:Callable

# system interconnections
feedback:Callable

# freq domain plotting
bode_plot:Callable
nyquist_plot:Callable
nichols_plot:Callable

# time domain simulation
forced_response=control.timeresp.forced_response
impulse_response=control.timeresp.impulse_response
step_response=control.timeresp.step_response
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We should add (short) docstrings for these. Since these are initialized as assigned member variables instead of standard function (usingdef), we will have to use the doc-comment format (lines starting with #: before the variable). SeeInputOutputSystem.nstates for an example.

I think these can be short, perhaps of the form: "Bode plot; seebode_plot function for more information".

'append':test_unrecognized_kwargs,
'bode':test_response_plot_kwargs,
'bode_plot':test_response_plot_kwargs,
'LTI.bode_plot':test_response_plot_kwargs,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I would add a comment at the end of this line (and the equivalent lines below) indicating that this is tested viabode_plot since there is not a separate test for the member function (and it really isn't needed, since it is the same object).

@lkies
Copy link
ContributorAuthor

Hi,
i made the changes you suggested. I also noticed thatfeedback is already implemented on derived classes so I replaced the alias with a stub so that type checkers know they can call it onLTI objects.

@murrayrmmurrayrm merged commita1791c9 intopython-control:mainJan 13, 2025
23 checks passed
@murrayrmmurrayrm added this to the0.10.2 milestoneFeb 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@murrayrmmurrayrmmurrayrm left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.10.2

Development

Successfully merging this pull request may close these issues.

Response Functions as Member Functions?

3 participants

@lkies@coveralls@murrayrm

[8]ページ先頭

©2009-2025 Movatter.jp