Abstract In the realm of signal processing, frequency error stands as a critical challenge that cannot be overlooked, particularly in scenarios characterized by noise disturbances and constantly changing environmental variables, as it significantly undermines the precision of waveform separation. Faced with a spectrum of frequency error phenomena stemming from hardware instability, such as clock drift, transmission distortion, and environmental changes, this paper proposes a waveform separation scheme centered around a core closed-loop control architecture aimed at addressing such challenges. Leveraging the high-performance STM32F407 microcontroller platform, the system harnesses the powerful algorithmic advantages of Fast Fourier Transform (FFT) to precisely locate and delineate the spectral characteristics of signals. Furthermore, we creatively integrate lock-in amplifier technology into the meticulously designed closed-loop control system, coupled with state-of-the-art zero-crossing detection algorithms for in-depth optimization. The research findings demonstrate outstanding signal-to-noise ratio performance within predefined target frequency bands for the separation device based on lock-in amplifier technology, showcasing not only remarkable resilience against interference but also the ability to accurately separate and reconstruct target signal components with high fidelity from complex and dynamic signal environments. This significantly enhances the robustness and accuracy of the entire system.