How to reset the state of a LSTM neural network to its initial state in Simulink?
Show older comments
Hi everyone,
I have trained an LSTM neural network to function as a Reduced Order Model (ROM) within a Simulink model of a coupled-physics system. Specifically, this neural network will interact with the other dynamic component (the other physic of the coupled problem) in a closed-loop configuration. During the simulation, the outputs from the neural network will feed into the other dynamic block, and the inputs from that block will, in turn, be fed back into the neural network.
The training of the neural network seems to have been successful. The performance in terms of prediction against test data is satisfactory. This is achieved both by using MATLAB's predict function and by implementing the network in Simulink with the Stateful Predict block.
However, the network seems to fail to adequately predict outputs at the initial instances. This is why, while researching, I came across the issue of resetting the LSTM state.
The reference page (Stateful Predict) suggests placing the stateful predict block in a resettable subsystem. I read the reference pages on resettable systems but was unable to figure out how to define the signal that triggers the reset for my specific case. If I understand the concept in question correctly, the state of the LSTM network should reset at the start of the simulation of my coupled system. So the trigger should occur at t = 0. Consider that the simulation of the system should provide an overall response very similar to that of a damped harmonic oscillator. So a response that decreases harmonically over time.
Could you help me clarify my doubt in this regard?
Thank you very much for your support in advance.
Marco
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!