Combined Discrete-Continuous Simulation In SIMULINK
I am not even sure if that is the right title for this question.
Here’s the question:
How to implement the following dynamic system in Simulink?
Here’s the problem:
Time points are used to establish a uniform time grid on the interval , where the constant step size is . The solver is assumed to be at the beginning of the time step , where the state at the current time , is known, and the objective is to compute the next state through the relation , where is described as follows:
is first transformed to through some algebraic functions,
an IVP is set up with its initial condition set to . This IVP is then solved using a variable step ODE solver from to ,
the solution at time , is then mapped to the next state by some other algebraic mappings.
The following figure shows how the state is propagated thorugh time, in a single step:
In the output, I need the intermediate solutions (denoted by x) in each step, as well as the state variables .This can be easily done in a script, but I am looking for a way to do it in Simulink; which may be trivial problem, but I am really confused at this moment and I can’t really find a way to do it.
In some ways, in each step, the continuous-time subsystem waits for the input to be available, and once it is there, the external solver "waits" for the continuous-time subsystem to locally solve the continuous-time dynamical equations using an adaptive step-size solver, then the external solver receives this subsystem’s output and continuous to perform the remaining functions to produce . I feel like this should be logical workflow of the simulation, but I am not sure how Simulink treats problems of this type.I am not even sure if that is the right title for this question.
Here’s the question:
How to implement the following dynamic system in Simulink?
Here’s the problem:
Time points are used to establish a uniform time grid on the interval , where the constant step size is . The solver is assumed to be at the beginning of the time step , where the state at the current time , is known, and the objective is to compute the next state through the relation , where is described as follows:
is first transformed to through some algebraic functions,
an IVP is set up with its initial condition set to . This IVP is then solved using a variable step ODE solver from to ,
the solution at time , is then mapped to the next state by some other algebraic mappings.
The following figure shows how the state is propagated thorugh time, in a single step:
In the output, I need the intermediate solutions (denoted by x) in each step, as well as the state variables .This can be easily done in a script, but I am looking for a way to do it in Simulink; which may be trivial problem, but I am really confused at this moment and I can’t really find a way to do it.
In some ways, in each step, the continuous-time subsystem waits for the input to be available, and once it is there, the external solver "waits" for the continuous-time subsystem to locally solve the continuous-time dynamical equations using an adaptive step-size solver, then the external solver receives this subsystem’s output and continuous to perform the remaining functions to produce . I feel like this should be logical workflow of the simulation, but I am not sure how Simulink treats problems of this type. I am not even sure if that is the right title for this question.
Here’s the question:
How to implement the following dynamic system in Simulink?
Here’s the problem:
Time points are used to establish a uniform time grid on the interval , where the constant step size is . The solver is assumed to be at the beginning of the time step , where the state at the current time , is known, and the objective is to compute the next state through the relation , where is described as follows:
is first transformed to through some algebraic functions,
an IVP is set up with its initial condition set to . This IVP is then solved using a variable step ODE solver from to ,
the solution at time , is then mapped to the next state by some other algebraic mappings.
The following figure shows how the state is propagated thorugh time, in a single step:
In the output, I need the intermediate solutions (denoted by x) in each step, as well as the state variables .This can be easily done in a script, but I am looking for a way to do it in Simulink; which may be trivial problem, but I am really confused at this moment and I can’t really find a way to do it.
In some ways, in each step, the continuous-time subsystem waits for the input to be available, and once it is there, the external solver "waits" for the continuous-time subsystem to locally solve the continuous-time dynamical equations using an adaptive step-size solver, then the external solver receives this subsystem’s output and continuous to perform the remaining functions to produce . I feel like this should be logical workflow of the simulation, but I am not sure how Simulink treats problems of this type. simulink, simulation MATLAB Answers — New Questions