Skip to content

Issue with Non-Zero starting conditions when using control.forced_response - Not working as expected? #843

Answered by bnavigator
TheWicklowWolf asked this question in Q&A
Discussion options

You must be logged in to vote

The code you posted should have given you a UserWarning:

UserWarning: Non-zero initial condition given for transfer function system. Internal conversion to state space used; may not be consistent with given X0.

if isinstance(sys, TransferFunction) and np.any(X0 != 0):
warnings.warn(
"Non-zero initial condition given for transfer function system. "
"Internal conversion to state space used; may not be consistent "
"with given X0.")

`force_response() takes the initial condition as initial state of the system. This is not necessarily equivalent to initial output of the transfer function.

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@bnavigator
Comment options

@TheWicklowWolf
Comment options

Answer selected by TheWicklowWolf
Comment options

You must be logged in to vote
3 replies
@bnavigator
Comment options

@TheWicklowWolf
Comment options

@TheWicklowWolf
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@TheWicklowWolf
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #842 on January 05, 2023 21:02.