You probably don't need to compute the matrix (H^T H)^{-1} H^{T} at all time steps, specially in closed loop.
I'd make sure that you have some way to precompute and store this matrix.