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

Simulation with Resets #35

Open
TUMcps opened this issue Oct 25, 2022 · 4 comments
Open

Simulation with Resets #35

TUMcps opened this issue Oct 25, 2022 · 4 comments

Comments

@TUMcps
Copy link
Contributor

TUMcps commented Oct 25, 2022

When we simulate with solve_ivp, are we currently resetting the state after each time-step? Or did I get this wrong. If yes, I think it would be good to have an option reset = "all" / "none" / integer (number of time steps between reset) for solve_ivp so that the user can choose.

@EthanJamesLew
Copy link
Owner

@TUMcps Idk what reset means. We currently run a simulation between each step and hold the inputs constant (ZOH). Would the idea be to run the simulation at a finer resolution?

@TUMcps
Copy link
Contributor Author

TUMcps commented Oct 25, 2022

Instead of mapping the initial state through the observable function and then simulating the linear system, I think we currently map the state again through the observable function after each simulation time step (thats what I meant with resets)

@EthanJamesLew
Copy link
Owner

EthanJamesLew commented Oct 25, 2022

Ah yes, this is coming back to me. Yes, we reset "all" in continuous mode because we pass it to an ODE solver that evaluates $\dot{\mathbf x} = f(\mathbf x, \mathbf u)$ instead of ${\mathbf y} = g(\mathbf x, \mathbf u)$.

@TUMcps
Copy link
Contributor Author

TUMcps commented Oct 25, 2022

My concern is actually about the discrete time systems: What I was expecting was that we simulate without resets, so
$y_0 = g(x_0)$, $y_1 = F(y_0,u_0)$, $y_2 = F(y_1,u_1)$, $y_3 = F(y_2,u_2)$, ....

However, what I think is currently implemented is that the state is reseted to the original space after each time step and mapped through the observable function again:
$y_0 = g(x_0)$, $y_1 = F(y_0,u_0) \Rightarrow x_1$, $y_1 = g(x_1)$, $y_2 = F(y_1,u_1) \Rightarrow x_2$, ....

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

No branches or pull requests

2 participants