1
votes

I essentially need to do 'x = x + a*b' operation at every time-step in my simulation. The value of b is changing throughout the simulation.

Please suggest what blocks I should use; if possible a diagram too. I think I need a block which can act as a source but also have an option to be updated. Or any other way to carry out the above task would suffice.

I have done this in Matlab scripting and it was very easy there, but I need a Simulink model solution.

1

1 Answers

0
votes

You can use a "discrete integrator block" for this. The initial condition should be set equal to x0. The input should be equal to a*b'. If b is a signal you can use the "product" block to multiply with a. a can be set on a "constant" block and then fed into the previously mentioned product block.