0
$\begingroup$

I need to remove noise that is multiplied to a periodic signal using a maximum of 7 periods having no information about the noise. I have tried to use auto-correlation:

 abs(ifft(fft(signal.*noise).*conj(fft(signal.*noise)))), 

But I'm losing too much information from the original signal. Any suggestion to recover the original signal keeping maximum points index information?

If it helps, the data set I'm using is here (Matlab mat file)

Noise multiplied with periodic signal

$\endgroup$
  • $\begingroup$ Use cross correlation with your signal and “signal+noise” if you have such a training sequence? $\endgroup$ – Dan Boschen Sep 5 '18 at 13:17
0
$\begingroup$

I suppose you can use synchronous averaging in this case due to the signal being periodic and the nature of the noise (as long as it is sufficiently uncorrelated). See MATLAB example:

ts = 1e-4; % sampling time
tend = 10; % end time
t = 0:ts:tend-ts; % time vector

fx = 10; % periodic signal frequency
x = 5*sin(2*pi*fx*t); % periodic signal

switch 2
    case 1
        n = 1*rand(1,length(x)); % noise in (0,1)
    case 2
        R = 50; % upsampling factor
        nn = 1*rand(1,length(x)/R+1);
        tn = 0:ts*R:tend;
        nnn = timeseries(nn,tn);
        nnnn = resample(nnn, t, 'zoh');
        n = nnnn.Data(:).'; % noise that looks like OP's plot
end

%y = x + n; % additive 
y = x.*n; % multiplicative 

nsp = 1/(fx*ts); % no. samples per period
NP = fx*tend; % no. periods

avg = zeros(1,nsp); % initialise 
for k = 1:NP % loop over number of periods available

    Is = (k-1)*nsp+1; % index to start of period
    Ie = k*nsp; % index to end of period

    avg = avg + 1/NP*y(Is:Ie); % add period to average
end
avg = 2.*avg; % scale dependent on noise and how it enters the signal

plot(t(1:nsp),y(1:nsp),t(1:nsp),avg,t(1:nsp),x(1:nsp)) % plot signals
legend('signal with noise', 'average', 'signal')

enter image description here

$\endgroup$
  • $\begingroup$ The average method works fine when I have 100+ periods of my signal. In my case, each period is a entire day, so I would have to wait 100 days till I can calculate something... I need to recover the signal with a maximum of 7 periods. $\endgroup$ – Rui Cunha Aug 2 '18 at 9:36
  • $\begingroup$ @RuiCunha Fair enough -- You might want to update your question with that information, and if there is little data to work with, it might be difficult to recover the signal using simple filtering and averaging. You might have to use model-based techniques, where you can add assumptions or prior knowledge about the signal and/or the noise. Do you know anything else about the noise and the signal? $\endgroup$ – Arnfinn Aug 2 '18 at 10:56
  • $\begingroup$ I might be able to estimate noise since it is related with meteorologic conditions, but the ideal was if I could get a clean signal without that information... I think this could be done using auto-correlation but clearly I'm missing something... $\endgroup$ – Rui Cunha Aug 6 '18 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.