Discrete Time Integrator does not integrate every time step
古いコメントを表示
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 件のコメント
Mathieu NOE
2024 年 2 月 9 日
hello
It would be interesting to know the sampling rate of the signal entering the integrator
Lucia Liedl
2024 年 2 月 9 日
Mathieu NOE
2024 年 2 月 9 日
ok
I see you modifed your simulink file , does it work better now ? how does your fourth trace look like ?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Signal Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!








