Show 
Equations and Time Expansions Part of Quick Tour

Tutorial:  Open the Dynamic Bayes Net called "Bouncing" from the Examples folder.  It is designed to model a ball which bounces back and forth in a straight line between two parallel barriers without losing any energy at each bounce.  Initially we have no knowledge of the position or velocity of the ball.

The Position and Velocity nodes stand for the position and velocity at each instant of time, and are connected together with brown time delay links (and could also have regular black links as well if desired).  You can think of a time delay link as delivering to the arrow of the link the value that the tail had some period of time ago, with that period of time being the link's delay.

Equations:  If you double-click on the Position node you can see the equation which defines the new position in terms of the old position, and the velocity.  It involves the constant "dt", whose value may be changed (by right-clicking on the dt node and choosing Enter Numeric Finding) to provide a different amount of time between time slices.

 By clicking down on the selector that originally says “Equation”, you can choose “Discretization” to see how the node has been discretized.  Later, you can edit this list to change the discretization.

This net has already had it's probability tables (CPTs) built from the equation at each node.  If it didn't have, the first step would be  to generate probability tables for the current discretization by making  sure no nodes are selected and choosing Table Equation to Table from the main menu.  Enter 1000 when prompted for the number of samples per cell and press ‘No’ when asked about including sampling uncertainty.

Time Expansion:  Next you generate a time expanded version of the net by doing Network Expand Time.  Enter 2 in the dialog box for the expansion time and 1 for the burn-in time.  This will make a new window with a new net in it.  You will probably want to resize this window to make it wider.  You can use Layout Drawing Size and make the entry blank.  The new net is a regular Bayes net with each Position and Velocity node representing the position and velocity at a new point in time, with nodes to the right corresponding to later times.

Finally we can compile the Bayes net for probabilistic inference with Network Compile.   Experiment with setting the position or velocity (by clicking on the desired range) to indicate observations at certain times, and see how the beliefs for position and velocity at all other times change.

An interesting situation is when the ball is near the boundary, but you don’t know which way it is going, since after a little while it will surely be moving away from the boundary (perhaps due to a bounce).  Or if the positions at 2 times are known, can it infer the velocity?  Or if just the velocities at two adjacent times are known, and one is the negative of the other, can it infer the position (because it must have bounced).  You can also try entering some negative findings (that the ball isn’t at some particular position or velocity) by holding down the shift key when you click on the interval.

Remember that the numerical results will not be exact, due to the discretization and sampling error in converting the equations to probability tables.  You may also want to try a finer discretization by changing the Ranges of the original unexpanded net.

When you build your own time delay nets, to make some links represent a time delay, select the links, then choose Modify Delay Links.  Or you can use the node dialog box, choosing "Delay" from the multi-purpose selector at the bottom.

See also:  dynamic Bayes nets, and the  Equations chapter.
 

Home > Getting Started > Quick Tour > Equations and Time Expansions