## 3 Simulation Experiment
### Algorithmic Implementation  
The simulation parameters were set to a sample rate \(f_{\mathrm{s}}\) = 25 kHz and sample duration \(t\) = 1 s. In accordance with Equation (3), the parameters of the MRS signal were set as follows: \(E_{0}\) = 200 nV, \(T_{2}^{*}\) = 200 ms, \(\theta\) = \(\frac{\pi}{6}\) rad, \(f_{\mathrm{f}}\) = 2325 Hz. Seven power-line harmonics and random noise generated randomly in phase \([0,2\pi]\) rad were added to the data in the range of \([2200\sim 2500]\) Hz. Two sets of noisy MRS data with different SNRs were constructed by changing the magnitude of the processed power-line harmonics and random noise. The first set of data harmonic amplitudes was randomly generated within \([40\sim 50]\) nV. the random noise amplitude was 25 nV, and the SNR was \(-6\) dB. The second set of data harmonic amplitudes was randomly generated within \([190\sim 210]\) nV; the random noise amplitude was 250 nV, and the SNR was \(-20\) dB. \(p=f\) was obtained according to Equation (8). Thus, the search range in which the discrete parameter \(p\) value was set was \(\pm 10\) of each frequency point; this was the range of the search value, and the search step length was 0.5. All values of the discretization parameter \(r\) between \(T_{2}^{*}\) and \([50\sim 500]\) ms were calculated according to Equation (9) and searched. The harmonic modeling cancellation (HMC) method is a method for modeling based on the expression of power frequency harmonic signals; after using the least square method to obtain parameters, power frequency harmonic elimination can be achieved by subtracting them from the original noisy signals [10]. This method is often used for algorithm comparison in the MRS field. Therefore, the proposed MP algorithm based on the oscillating atomic library and the HMC method were used to process two sets of simulated noisy data, with the results shown in Figures 1 and 2. Figure 1: Denoising results of the MP algorithm when SNR = \(-5.98\) dB: (**a**) noisy data and reconstructed power-line harmonics by MP and HMC; (**c**) is the corresponding spectrum. (**b**) After removing the harmonics, the MRS signal is extracted by MP and HMC; (**d**) is the corresponding spectrum. Figures 1 and 2 show that distinguishing the MRS signal in the noise is difficult. The power-line harmonics can be reconstructed accurately by limiting \(\rho=0\) through the MP algorithm based on the oscillating atomic library. The residual signal was obtained after the reconstruction was successively subtracted; the blue line in (b) and (d) is the residual signal after removing the power-line harmonics. After the first step of harmonic removal, the MRS signal shape could mostly be recovered, leaving only random noise and a small amount of harmonic residue. Through the second step of the algorithm, \(\rho>0\) was defined and the MRS signal was reconstructed directly. The extraction results are shown in Figures 1b,d and 2b,d. The noisy MRS data under different SNR values could be effectively filtered for noise after two-step denoising by the MP algorithm based on the oscillating atomic library. The characteristic parameters of the two sets of denoised data were extracted by nonlinear fitting. The errors were as follows: \(\Delta E_{0}=-1.48\%\), \(\Delta T_{2}^{*}=0.64\%\) for the first set; \(\Delta E_{0}=1.18\%\), \(\Delta T_{2}^{*}=-2.19\%\) for the second set. The improvement values of SNR after denoising were \(\Delta SNR=29.37\) dB and \(\Delta SNR=34.74\) dB, respectively, which demonstrates the accuracy of the MP denoising algorithm based on the oscillating atomic library. The harmonic modeling cancellation algorithm was used to process the above two sets of data, with the following error obtained for the fitting data: \(\Delta E_{0}=1.0762\%\), \(\Delta T_{2}^{*}=-1.2532\%\) for the first set; \(\Delta E_{0}=-20.2722\%\), \(\Delta T_{2}^{*}=190.4786\%\) for the second set. The improvement in the signal-to-noise ratio before and after noise removal is \(\Delta SNR=11.145\) dB and \(\Delta SNR=5.0815\) dB, respectively.