Adaptive particle filter in hidden Markov models : a new approach and its applications