You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to model a switched system where the state dynamic is described by an equation like this:
where:
x is the state vector that consists of the elements x1 and x2 and Ai is a matrix 2x2. i = 1, 2, 3 then I have a system with 3 different modes. Assuming that at t=0 the state follows the first mode (i=1) and that, after a given time, if x1 >= 10, the system enters in the second mode (i=1), whereas if x2 >= 5 the system enters the third mode. My question is: is it possible to write the "event_variable_equation" parameter to model this system? If not, is it possible to use the more general class DiscontinuousSystem to model this system?
The text was updated successfully, but these errors were encountered:
Hi @narr95, based on what you're describing you could use a standard DynamicalSystem object to implement the model you're after. You may want a state equation of the form:
Note that you may want to verify the logic of your model, but hopefully this can get you started. I'm assuming the "A" matrices are intended to be the "state matrix" for each mode, i.e., xdot = Ai x for each mode i.
I'm trying to model a switched system where the state dynamic is described by an equation like this:
where: x is the state vector that consists of the elements x1 and x2 and Ai is a matrix 2x2. i = 1, 2, 3 then I have a system with 3 different modes. Assuming that at t=0 the state follows the first mode (i=1) and that, after a given time, if x1 >= 10, the system enters in the second mode (i=1), whereas if x2 >= 5 the system enters the third mode. My question is: is it possible to write the "event_variable_equation" parameter to model this system? If not, is it possible to use the more general class DiscontinuousSystem to model this system?
The text was updated successfully, but these errors were encountered: