Mode estimation techniques for switching discrete-time linear systems