Nonlinear Control and Estimation with General Performance Criteria