Skip to content

Discrete system forced_response uses wrong shape for arguments #279

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bnavigator opened this issue Mar 15, 2019 · 0 comments · Fixed by #285
Closed

Discrete system forced_response uses wrong shape for arguments #279

bnavigator opened this issue Mar 15, 2019 · 0 comments · Fixed by #285

Comments

@bnavigator
Copy link
Contributor

forced_response() uses scipy.signal.dlsim() when dealing with a discrete time system. However, since scipy.signal uses a different time-series to channel index convention, the data has to be transposed. This is done correctly for xout and you (fixed in #142) but not for U (and T and X0 but it does not matter for those 1D vectors):

# Discrete time simulation using signal processing toolbox
dsys = (A, B, C, D, sys.dt)
tout, yout, xout = sp.signal.dlsim(dsys, U, T, X0)
# Transpose the output and state vectors to match local convention
xout = sp.transpose(xout)
yout = sp.transpose(yout)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant