Imagination is generally regarded as a very powerful and advanced cognitive ability. In this paper we propose a modelling framework for what we call functional imagination: the ability of an embodied agent to simulate its own behaviors, predict their sensory-based consequences, and extract behavioural benefit from doing so. We identify five key components of architectures for functional imagination, and claim that they may be both necessary and sufficient. We outline a typical architecture, explain the flow of control within it, and describe a typical testing scenario using nested physics-based robot models. We also show how malfunctions within such an architecture may produce effects reminiscent of those found in certain human pathologies.