Discrete Time Integrator does not integrate every time step
Afficher commentaires plus anciens
Hello,
I would like to integrate a function with the Discrete Time Integrator in Simulink. I have a signal, which I first squared in order to have it only positive. My simulation time is let´s say 0.1s and I´d like to integrate over time steps of 0.01s. Therefore, the sample time of the Discrete Time Integrator is also 0.01s.

In the scope you can see the input signal "error", which can be positive and negative, and the squared error (the gain only helps to make it all visible in the scope at one glimpse). The problem is the integrated signal. Why is there no jump at 0.04s and 0.07s? It is always like this, also with different input signals like a simple jump signal.

I need this to build the reward signal for a reinforcement learning agent. Therefore, I also have continuous states and cannot change the solver. I would be very pleased, if someone has a suggestion. Thank you.
3 commentaires
Mathieu NOE
le 9 Fév 2024
hello
It would be interesting to know the sampling rate of the signal entering the integrator
Lucia Liedl
le 9 Fév 2024
Mathieu NOE
le 9 Fév 2024
ok
I see you modifed your simulink file , does it work better now ? how does your fourth trace look like ?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Circuit Envelope Simulation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!








