How to store all the sequential signals generated during the Simscape simulation in Simulink and access those signals inside the function block?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a Simscape-based simulation model, and my goal is to integrate a Reinforcement Learning agent that controls the existing inverters in my model. To achieve this, the RL agent requires measurement signals from time (t-k) to t, where k represents a sliding window of a particular size. Unfortunately, I am encountering issues in implementing this functionality to store the sequential measurements and access the required window of measurements to provide them as observations to the RL agent. I would be grateful for any assistance in this matter.
2 commentaires
Réponses (1)
Fangjun Jiang
le 24 Avr 2023
The "Buffer" block?
2 commentaires
Fangjun Jiang
le 24 Avr 2023
Modifié(e) : Fangjun Jiang
le 24 Avr 2023
I did the following on the "f14" example model, which runs on variable-step ode45.
Insert a 'Signal Specification' block between the signal and the Buffer block and specify a sample time.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1365198/image.png)
Voir également
Catégories
En savoir plus sur Sources dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!