Because the data made through the simulation experiment is analog data, it can not be compared with the real data, so the method of adding noise data to the simulated signal will be used to simulate the signal in the actual scene.

There is also a function of directly adding noise data in MATLAB. I saw a post on the Internet before, which explained the method of adding noise data in detail. In this post, we also use the function to add noise.

These are the introductions in the post:

y = awgn(x,snr)Add white Gaussian noise to the vector signal x Yes. scalar snr Specifies the ratio of signal to noise at each sampling point, in dB. If x It's plural, awgn Complex noise will be added. This grammatical assumption x The energy of is 0 dBW. y = awgn(x,snr,sigpower)Same syntax as above except sigpower yes x Energy in dBW. y = awgn(x,snr,'measured')and y = awgn(x,snr)It's the same except agwn Measured before adding noise x Energy. y = awgn(x,snr,sigpower,state)and y = awgn(x,snr,sigpower)It's the same except awgn Firstly, the normal random number generator is reset randn The status of is an integer. y = awgn(x,snr,'measured',state)and y = awgn(x,snr,'measured')It's the same except awgn Firstly, the normal random number generator is reset randn The status of is an integer. y = awgn(...,powertype)The syntax is the same as before, except for strings powertype Specified snr and sigpower Unit of. powertype The options are'db' and 'linear'，If powertype yes'db'，that snr According to dB Measured in units, sigpower According to dBW Measured in. If powertype It's linear, snr Measured at a rate, sigpower It is measured in watts. Relationship Among SNR, Es/N0, and Eb/N0 about SNR And other noise relative energy measurements Describing the Noise Level of an AWGN Channel.

However, for specific signal data, the sawtooth noise added is relatively good, but the added noise ratio should not be too small, otherwise the characteristics of the original signal will become less obvious. Then I use the current signal, so I use the sawtooth noise, and then set the signal-to-noise ratio to 10. I also tried other signal-to-noise ratios, too If it is small, the original signal becomes very blurred, and only 10 is the most appropriate signal-to-noise ratio.

%Add Gaussian white noise, add'measured To add jagged white noise' % Y = awgn(X,10,'measured');

In this way, a signal Y containing noise will be added, which can be decomposed and reconstructed to simulate the data processing in the actual scene.

Similarly, there are many methods for data denoising. Relatively speaking, decomposition and reconstruction can filter and denoise signals with different frequencies. In addition, it can denoise by threshold method. What is the specific threshold method (I recommend a book called MATLAB wavelet analysis super learning manual. If you watch the video, I remember a digital signal processing course from which university. You can see what you need). I'll post both methods below and find them as needed.

(1) Denoising by threshold method (wden)

%Denoising using threshold method% % [M] = wden(X,TPTR,SORH,SCAL,N,'wavename');

Where M is the signal after denoising and X is the original signal.

TPTR is a threshold rule, which is generally divided into three types: heursure is the optimal variable prediction threshold (used more when the signal-to-noise ratio is small); rigrsure: the selection of adaptive threshold based on stein's unbiased likelihood estimation principle; sqtwolog: fixed threshold; miniaxi: fixed threshold, which refers to the extreme value of minimum mean square deviation.

SORH is a threshold method, which is generally divided into two types:'s' is a soft threshold method and 'h' is a hard threshold method

SCAL: the proportion of threshold scale change. Generally, there are three 'one', which can ignore the noise level that must be estimated; 'sln', non white noise mode, which estimates the noise level at each decomposition level; 'mln', which carries out independent noise design at different decomposition levels.

N is the number of decomposition layers; wavename is the wavelet basis used.

(2) Denoising by threshold method (wdencmp)

% Denoising using threshold method % [thr,sorh,keepapp] = ddencmp('den','wv',V1); % Gets the default threshold of the signal % [Y,CY] = wdencmp('gbl',X,'wavename',N,thr,sorh,keepapp);

'gbl' is the global threshold and 'lvd' is the threshold of each layer

When keepapp = 1, the low-frequency coefficients are not processed; when keepapp = 0, the low-frequency coefficients are not processed.

CY is the structure of returned Y, or it can not be returned.

The above one is to denoise the signal through the default threshold. There are two other methods: one is to denoise through the given threshold, which is obtained through the empirical formula, using the wthresh function; the other is forced denoising; the high-frequency coefficient is forcibly converted to 0, and the signal is reconstructed (I don't recommend it).

In fact, there are many denoising methods, but I think you can choose this one by doing more experiments, changing the methods or rules each time, and choosing which method is better after the experiment. These are basically introduced in the recommended book. You can understand it by looking carefully.

Find the link of MATLAB wavelet analysis super learning manual? You can talk privately. I'll send you a link to my book.