Using Simulink    

States

Blocks can have states. A state is a variable that determines a block's output and whose current value is a function of the previous values of the block's states and/or inputs. A block that has a state must store previous values of the state to compute its current state. States are thus said to be persistent. Blocks with states are said to have memory because such blocks must store the previous values of their states and/or inputs in order to compute the current values of the states.

The Simulink Integrator block is an example of a block that has a state. The Integrator block outputs the integral of the input signal from the start of the simulation to the current time. The integral at the current time step depends on the history of the Integrator block's input. The integral therefore is a state of the Integrator block and is, in fact, its only state. Another example of a block with states is the Simulink Memory block. A Memory block stores the values of its inputs at the current simulation time and outputs them at a later time. The states of a Memory block are the previous values of its inputs.

The Simulink Gain block is an example of a stateless block. A Gain block outputs its input signal multiplied by a constant called the gain. The output of a Gain block is determined entirely by the current value of the input and the gain, which does not vary. A Gain block therefore has no states. Other examples of stateless blocks include the Sum and Product blocks. The output of these blocks is purely a function of the current values of their inputs (the sum in one case, the product in the other). Thus, these blocks have no states.


  Modeling Dynamic Systems System Functions