Reputation:
I have some questions regarding the simulink model, below.
Given an input in In1, what is the initial input of the 1 tagged in red?
What is the meaning of the block 1/s
tagged with 2 in red?
Upvotes: 0
Views: 11360
Reputation: 1097
It may be easier to answer these questions in reverse:
2) What is the meaning of the block 1/s
tagged with 2 in red?
Answer: This is the Integrator block. It outputs the integral of its input at the current time step. Note that at the first time step, it will output whatever you have specified as its initial condition. By default, I believe that the initial condition is 0. (See the linked doc above for more info on setting various parameters for this block, including initial condition).
1) Given an input in In1
, what is the initial input of the 1 tagged in red?
Answer: The initial input at 1 is actually completely independent of In1
. It will depend only on the initial conditions of the blocks that feed into it at a given timestep.
You have to take into consideration the execution order of the blocks. In this model, the first block to execute will probably be the integrator block that you have marked with a 2. Following this will be the next integrator block and the gain blocks that they feed. One of the last blocks to execute will actually be the Subtract block that In1
feeds into. This is because this Subtract block needs to know what its input are before it can do any sort of calculations on them, therefore, the other blocks need to execute first.
This may be a little bit confusing considering that there is a loop here and therefore the Subtract block ends up feeding in to the Integrator blocks. This ends up not being an issue because the Integrator blocks do not have direct-feedthrough. This means that the current output of the integrator is not a direct function of the current input. Rather it is calculate based on the current state of the integrator block (which is determined mainly by the input at previous timesteps). This means that the Integrator block doesn't need to know its current input in order to calculate its current output.
So at the first time-step, the output of the integrator block is just the initial condition that you set (or the default initial condition of 0). So most likely, the initial value at 1 is 0.
(This link has some more info on algebraic loops and direct-feedthrough).
See here for more info on execution order in Simulink. This link also shows how to display the execution order in a model, which can sometimes be extremely useful to know.
Upvotes: 7