High performance electric motor drive systems are used in the continuous positive airway pressure (CPAP) device. This paper proposes dynamic modeling and control of a CPAP device. Both electrical and mechanical components of the model are developed in this paper. a closed loop permanent magnet motor drive based on the Field Oriented Control (FOC) is implemented to provide the required pressure and flow to the patient in different breathing patterns. Extensive simulations are carried out to evaluate the electric motor drive system performance under different patient conditions.