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

Fix impuse response, input data only contains one input[0]==1 in each trace#1023

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

Conversation

KybernetikJo
Copy link
Contributor

Computation of impulse response was correct, but input in impulse response was not.

@coveralls
Copy link

Coverage Status

coverage: 94.533%. remained the same
when pullinga03ed38 on KybernetikJo:fix_impulse_response
into4acc78b on python-control:main.

@KybernetikJoKybernetikJo changed the titleFix impuse response, input data only contains one inpute[0]==1 in each traceFix impuse response, input data only contains one input[0]==1 in each traceJul 3, 2024
@slivingston
Copy link
Member

@KybernetikJo Can you add a regression test that demonstrates the error you are fixing?

@KybernetikJo
Copy link
ContributorAuthor

importnumpyasnpimportcontrolasctprint(ct.__version__)A= [[.5,0.25],[.0,.5]]B= [[1.,0,],[0.,1.]]C= [[1.,0.],[0.,1.]]D= [[0.,0.],[0.,0.]]dt=Truesysd=ct.ss(A,B,C,D,dt=dt)response=ct.impulse_response(sysd,T=dt*3)U=np.zeros((2,2,4),dtype=float).astype(object)U[0,0,0]=1./dtU[1,1,0]=1./dtprint(np.array_equal(response.inputs,U))display(U)display(response.inputs)

Expected / New behavior

0.10.1.dev76+g4acc78b.d20240703Truearray([[[1.0, 0.0, 0.0, 0.0],        [0.0, 0.0, 0.0, 0.0]],       [[0.0, 0.0, 0.0, 0.0],        [1.0, 0.0, 0.0, 0.0]]], dtype=object)array([[[1.0, 0.0, 0.0, 0.0],        [0.0, 0.0, 0.0, 0.0]],       [[0.0, 0.0, 0.0, 0.0],        [1.0, 0.0, 0.0, 0.0]]], dtype=object)

Old behavior

0.10.0Falsearray([[[1.0, 0.0, 0.0, 0.0],        [0.0, 0.0, 0.0, 0.0]],       [[0.0, 0.0, 0.0, 0.0],        [1.0, 0.0, 0.0, 0.0]]], dtype=object)array([[[1.0, 0.0, 0.0, 0.0],        [1.0, 0.0, 0.0, 0.0]],       [[1.0, 0.0, 0.0, 0.0],        [1.0, 0.0, 0.0, 0.0]]], dtype=object)

@coveralls
Copy link

Coverage Status

coverage: 94.533%. remained the same
when pulling7624aeb on KybernetikJo:fix_impulse_response
into4acc78b on python-control:main.

@murrayrmmurrayrm merged commit7a135d1 intopython-control:mainJul 7, 2024
23 checks passed
@murrayrmmurrayrm added this to the0.10.1 milestoneAug 8, 2024
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.10.1
Development

Successfully merging this pull request may close these issues.

4 participants
@KybernetikJo@coveralls@slivingston@murrayrm

[8]ページ先頭

©2009-2025 Movatter.jp