The paper presents an approach to facilitate integration and coherent operation of numerous disparate models that constitute a power system digital twin. We employ contemporary information technologies empowered by model-based systems engineering and advanced algebraic techniques to make the digital twin cost-effective to compose and operate while maintaining sufficient completeness, accuracy, and usability for practical purposes. The model-based digital twin architecture is proposed, which consists of an ontology, digital diagrams and visuals, electronic documentation, master data, real-time data, and mathematical models. The energy domain ontology provides the unified semantic basis for interaction between all the models. The mathematical framework of category theory applies for rigorous formal description and verification of complex digital twin composition procedures.