Skip to content

Discrete time blocks

Peter Corke edited this page Mar 28, 2021 · 1 revision

bdsim supports discrete time blocks in systems with single or multiple rates, and possibly with continuous states.

All discrete blocks are associated with a Clock object which has:

  • a specified period and phase offset
  • a blocklist of all blocks connected to this clock
  • a state vector _x of all state associated with these blocks, in the order they appear in the blacklist

A Clock object has a method

next(t)

which returns the time of its next sample that is greater than t.

A discrete-time block has a method

update()

which returns the new state as a function of the inputs.