Computer simulation of switching power converters is complicated by the discontinuous (switching) nature of the converter waveforms. When switching details of the waveforms are of interest, detailed simulations requiring extremely small time steps are needed. On the other hand, so-called averaged models allow capture of lowfrequency converter dynamics (of interest for example when closing the feedback loop) by computing averaged continuous waveforms. The possibility of using relatively large time steps makes averaged models computationally efficient. A real-time hierarchical approach that combines the advantages of the two methods is proposed. An averaged model and a detailed model are used alternately in successive time intervals. The final state of one model at the end of a time interval is used to calculate the initial conditions for the other model running in the following time interval. The method is illustrated with a buck converter. The combined use of two models with a hierarc...