Thank you for your help!!!!
The nonlinear fiscal rule is the following:
gt=gt-1-phib(bgyt-1-bgybar)-phibb(bgyt-bgyt-1)
where g =government spending
bgy =public debt-to-gdp ratio
bgybar=ss public debt-to-gdp ratio
I tried to simplify the rule and I also change the coefficient values but nothing works. The problem appears when I have public debt in period t and t-1 with government spending at t-1. Government spending shows up in the market clearing condition, and in the government budget constraint only.