0

I have a Simulink diagram which contains multiple triggered subsystem with different timestamp. In this model I also got a feedback loop inducing an algebraic loop. Therefore the signal must be initialised, in order to do that, I used a Memory block.

The problem is on the feedback loop, the value of the signal seems to be not initialised.

I believe the origin of this problem is that it is indeed initialised by the memory block for the first timestamp, however, the trigger on the next subsystem did not occur. By default, this subsytem puts its out signal value to be 0. The loop is therefore broken there.

enter image description here

Did someone already encounter this situation ? Any Tips ? Thank you for your time.

Adriaan
  • 17,741
  • 7
  • 42
  • 75
Chewbaka
  • 184
  • 10

1 Answers1

0

You could add initialization blocks for your trigger values? I don't know about what SubSystem0 looks like inside, but its output could use an initialization block as well, this way you guarantee that you have an input to Subsystem

digital_hog
  • 202
  • 1
  • 11
  • Thank you for your answer, it is indeed working. (In the two subsystems there is just a direct feedtrough from _in_ to _out_). After playing with the model by putting initial condition etc, here are my further observation: To be sure of what is happening you have to put a memory block (this is for the feedback loop), **and** an initial condition on the triggered block that will have **the last rising edge** (to be sure the signal wont go to zero after one loop). And if necessary you need to put initial condition before block where you may have a singularity like "division by zero". – Chewbaka Jun 24 '20 at 13:48
  • Glad everything is working! Thanks for the additional infos – digital_hog Jun 24 '20 at 18:49