A method for simulating atrial fibrillation has been developed using the open source simulator ECGSYN (available at physionet.org). In this method episodes of atrial fibrillation are simulated by combining data streams generated by two ECGSYN engines driven from a correlated stochastic process. The underlying process represents atrial activity during atrial fibrillation. This process generates a series of atrial inter-beat intervals with the same statistical properties as those found in real patients with atrial fibrillation. The atrial beats from this process are then selected to be either conducting beats that generate subsequent ventricular activity or non-conducting beats that generate only atrial activity. The intervals for conducting beats are processed by an ECGSYN engine with appropriate parameters to create PQRS and T waves while the non-conducting intervals are processed by a second ECGSYN engine with parameters to generate only P waves. The data streams from the two engines are superimposed to create an artificial atrial fibrillation waveform. This waveform generator has been made into an operator and has been incorporated into a stream based ECG simulator. The simulator uses a timing operator to switch from generating normal ECG morphologies to atrial fibrillation. Notes: Copyright IEEE. Published in Computers in Cardiology, 19-22 September 2004, Chicago, IL, USA 6 Pages