Adding initial conditions in a transfer function/block

Good afternoon, everyone

I have a question, and hopefully someone can assist me with it

Is it possible to specify initial conditions for a transfer function in the XCOS ? I have a model with a numerator of 1 and a denominator of s^2 + 1s + 2. The model contains various blocks like a step block, PID block, sum block, transfer block, mux, clock, and a scope.

Within the transfer block, there doesn’t seem to be an option to set initial conditions. I want to set the initial velocity to 2 m/s and the initial position to 1 meter. I am aware that for state space models, integrator blocks, and gains, you can set these initial conditions.

Could someone guide me on how to achieve this? I have attached the model for reference.

Thank you in advance.

ADG

Hello,

As you said, the “Continuous transfer function” block does not allow to set any initial condition. Of course, this block is implemented as a state-space system inside Xcos, but if you want to be able to set initial conditions you have to use a “Continuous state-space system” (or build your system with integrators, which have also an initial condition field). The following statement on Scilab’s command line will give you the matrices:

tf2ss(1/(%s^2+%s+2))

S.