Order reduction of large thermal and electrical models with system-theoretic techniques and matrix equation algorithms