Matrix must be positive definite with real diagonal

The two-sided HP-filter is not recommended. The biggest issue is that you are not handling parameter dependence correctly. Please read Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”