Finite and asymptotic time state estimation for linear and nonlinear systems