An implementation of EM on an LDS with a known input, following Blocker (2008). I assume the affine term=0.