MATLAB: How to give Initial Condition to Transfer Function

simulinktransfer function

Hello All,
I want the graph to start at 5 after it leaves the transfer function block in Simulink.
However, it starts at zero as default.
I have tried to use the Transfer Fcn with initial inputs but did not succeed -the output osciallates between 5 and -5.
Any help is appreciated. Thanks.

Best Answer

From the doc:
Specifying Initial Conditions
Initial conditions are preset to zero. To specify initial conditions, convert to state-space form using tf2ss and use the State-Space block. The tf2ss utility provides the A, B, C, and D matrices for the system. For more information, type help tf2ss or see the Control System Toolbox™ documentation.
HTH.
Arkadiy
Related Question