I am currently trying to use estimated Smets Wouters (2003) model to compare welfare under interest rate rule and constant money growth rule. According to Michel Juillard (2006) “welfare-based monetary policy rules in an estimated DSGE model of the US economy” and Stephane Adjemian (2007) "Optimal Monetary Policy in an Estimated DSGE for the Euro Area’’, they can use the estimated parameters to compute to model and solve the welfare by using second order moments from non-linearized model.
However, you said we can’t do it in this way. Could you give me some suggestions about this problem, please? Thank you very much!

The approach you outline is not 100 percent consistent due to using different orders for estimation and evaluation, but can be used if one accepts this caveat. The actual problem lies in the Smets/Wouters (2003/2007) model. It features markup shocks. These markup shocks imply that the nonlinear Keynesian Phillips curve does not have a recursive representation due to the time-varying exponents. This implies you cannot solve the nonlinear model at second order (unless you truncate the arising infinite sum).

I have one follow-up question. As you said, for a model with markup shocks, we cannot derive a recursive representation about nonlinear Keynesian Phillips curve. But how should we do if we want to solve the nonlinear model in order to do the policy/welfare analysis?

I am looking forward to your reply. Thanks in advance.

As @jpfeifer said there is no recursive representation of the Calvo forward variables with the shocks on the elasticities of the aggregation functions. A possibility is to replace the mark-up shock with a shock on the dividends of the intermediary firms (you can do the same with the unions). The only difference is that the shock does not appear additively in the linearized Phillips curve, as the mark up shock, but is multiplied by a non linear function of some parameters (the slope of the Phillips curve if I remember correctly). So obviously the impact on the variance of inflation will be different.

@Grant You should have a look at the post Markup shock in SGU? In higher order approximated models, one can use a fixed cost shock. The reference is Andreasen (2013)

I now have another question. When I type my model in levels in dynare, I can put every variable in exp() or not. To make the code consistent, my understanding is if I type exp(), then in the “steady_state_model” block I should put every variable in log(); if I don’t type exp(), I should type log() in the steady state block. Am I right?

Yes. If a variable is declared in logarithm in the model block, by putting it inside an exponential function, you have to consistently define the steady state, by defining the logarithm of the variable in the steady_state_model block. For the other variables which are not in logarithm there is no reason to do that.