Skip to content
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

Automatic time scaling #702

Closed
baggepinnen opened this issue Jul 1, 2022 · 0 comments · Fixed by #703
Closed

Automatic time scaling #702

baggepinnen opened this issue Jul 1, 2022 · 0 comments · Fixed by #703

Comments

@baggepinnen
Copy link
Member

Anecdotally, most issues related to simulation on the ControlSystems repo arise because someone has modeled an electronics circuit in seconds, but the time scales appearing in the model are on nano-micro seconds. The continuous-time solvers really dislike this.

For linear systems, you can always perform a similarity transform on the state-transition matrix without changing the input-output behavior,

à = T⁻¹AT
B̃ = T⁻¹ B
C̃ = CT
D̃ = D

we use this extensively in ControlSystems to keep systems well balanced. T can be any invertible matrix. A similarity transform can never change the eigenvalues of A and can thus not model time scaling, but it can change the typical size of state components during simulation.

For linear systems, scaling of time $t$ changes the Laplace transform $F$ of a function $f$ according to
$f(at) \leftrightarrow \dfrac{1}{a} F\big(\dfrac{s}{a}\big)$
which is also straightforward to apply. We could provide a function that applies this transformation automatically.

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