Steve
Steve

Reputation: 859

Scilab xcos integrator

I have been facing a problem how to generate event signals based on value at the integrator block in Scilab Xcos. For example I need to create event signal in case value at the output of the integrator block is equal to zero. I had an idea to use the RELATIONALOP block for the comparison of the value at the output of the integrator with zero but I don´t know how to convert result of this comparison into the event. Can anybody help?

Upvotes: 1

Views: 498

Answers (1)

Serge Steer
Serge Steer

Reputation: 446

The zcross_f, NEGTOPOS_f POSTONEg_f AND general_F blockS are exactly designed for this purpose.

There based on the zero-crossing ability of ODE/DAE solver the continuous time integration is performed till a given expression of the states exactly crosses zero. At this time the discret simulation handles the immediate consequences of this events before the continuous state integration restarts.

Upvotes: 2

Related Questions