The document presents a study on a generalized recursive algorithm designed for isolating fetal electrocardiogram (FECG) signals from non-invasive maternal electrocardiogram (MECG) recordings, which is crucial for monitoring fetal health. The method utilizes the abdominal MECG as the primary source and the thoracic MECG as a reference, employing discrete wavelet transform for noise reduction and demonstrating improved results through simulations on both synthetic and actual signals. The proposed algorithm minimizes a cost function based on the error signals, thereby enhancing the separation of FECG from mixed recordings.