Dead beat control

Code similar to that in the text can be found here.

A hybrid simulation shows what happens between the samples.