Mod file in a MATLAB loop

Hi to all,

I am writing a MATLAB file to estimate parameters using SMC in which I put a mod file in a loop to get the 2nd-order-approximation policy function.
First, I generate data by assigning values to parameters, then use that data to estimate parameters. When I use the true parameters to solve the model, Dynare works well.
However, when I execute estimation, after some iterations, it informs that Blanchard_Kahn conditions are not satisfied because of indeterminancy. I guess that the problem happens because some parameters are used to calculate the steady states. Can you give me some advices in this case please?
I know that Dynare applies the Metropolis-Hastings algorithm to derive the posterior. Could you please let me know what dynare does when a proposal leads to problems such as what I met: Blanchard_Kahn conditions are not satisfied.

Thank you very much,
AN