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

Update docstring for impulse for discrete sys#812

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 1 commit intomainfromsawyerbfuller-patch-2
Dec 13, 2022

Conversation

sawyerbfuller
Copy link
Contributor

Update impulse_response doc string to indicate that the impulse size is unit area for discrete systems.

Update impulse_response doc string to indicate that the impulse size is unit area for discrete systems.
@murrayrm
Copy link
Member

murrayrm commentedDec 11, 2022
edited
Loading

We definitely need to update the documentation, but I wonder whether we shouldn't also consider what the right definition of the impulse response is for a discrete time system with non-unit sampling time.MATLAB apparently defines the impulse response for a discrete time system as being the response to an input that is 1 at the initial time and then 0 after that. This matches the description in theWikipedia entry for impulse response.

@sawyerbfuller
Copy link
ContributorAuthor

I made this change a little while back to match what matlab does, which is a unit-area impulse for discrete-time systems:https://www.mathworks.com/help/control/ref/lti.impulse.html. This arrangement is probably what you want if you are viewing a discrete-time system as a discretized model of a continuous-time system.

Probably unit area is favored by engineering, unit magnitude by math.

Probably a subjective choice. Anybody here have further insight into such a choice?

@ilayn
Copy link

ilayn commentedDec 12, 2022
edited
Loading

As the samplingfrequency period grows the response starts to get larger if impulse is kept at unity. Hence the same dynamical system sampled at different frequencies will give different results with the same unity impulse which is not correct. In a hand-waving argument we have to scale the energy of the impulse with frequency to have equivalent supply. Otherwise, we need to type math here which is not fun :)

You can test it yourself by generating a [1, 0, 0, 0, ...] array and supply tolsim for different sampled versions of the same system to see the effect I am attempting to describe above.

@murrayrm
Copy link
Member

@ilayn's comment makes it clear why scaling by the sampling time is the right approach (and I was mistaken about what MATLAB does).

@murrayrmmurrayrm merged commit900d56e intomainDec 13, 2022
@murrayrmmurrayrm added this to the0.9.3 milestoneDec 24, 2022
@murrayrmmurrayrm deleted the sawyerbfuller-patch-2 branchJune 10, 2023 05:29
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.9.3
Development

Successfully merging this pull request may close these issues.

Scaling difference in impulse response size compared to scipy.signal
3 participants
@sawyerbfuller@murrayrm@ilayn

[8]ページ先頭

©2009-2025 Movatter.jp