Matlab Script that I can add a Gaussian Noise to a Discrete Wavelet Transform processed fault signal

조회 수: 1 (최근 30일)
Please does any one has a matlab script where I can add a Gausssian Noise to a Discrete Wavelete Transform processed fault signal. This will mimic a lightning disturbance and switching disturbance during fault connditions and normal steady state. Forf the protective relay to distinguish between this lightning disturbance and fault conditions

채택된 답변

William Rose
William Rose 2022년 9월 18일
편집: William Rose 2022년 9월 18일
If you have a fault signal x(t), processed by a DWT (or not), add Gaussian noise as shown.
s=1; %standard deviation of the added noise
xn=x+s*randn(size(x)); %x=signal without added noise
The fact that the signal has been processed by a DWT is not really relevant, unless there is more information that you want to share. Good luck with your work on lightning and faults.
  댓글 수: 14
William Rose
William Rose 2022년 9월 26일
I worked around the calls to rmmissing(). Then I get the same error you reported earlier*:
Index exceeds matrix dimensions.
Error in getmswtfeat (line 115)
prob = percentENER(:,st:en);
Error in processdataWR (line 37)
feat_fault = getmswtfeat(DPFD,32,16,100000);
The error above occurs because percentENER is 43x52, but st=689. Line 115 tells Matlab to get data from columns 689 and following of a matrix which has only 52 columns. Of course this is an error.
The error occurs inside a funciton which you did not write (accfording to the documentaiton in the code). I suggest you contact the author of the function for assistance.
You call getmswtfeat twice: once on each of the fiinal two lines of your script. The comment preceding the calls is
%% Let's observe the FFT power spectrum for differences
But getmswtfeat does not return the power spectrum, so either the comment is incorrect (i.e. you are not really interesting in observing the FFT), or you are using a function that does not accomplish your goal.
You have added noise to the signals inside getmswtfeat, The signals which are analyzed and plotted in the main program are unaffected by this added noise, because 1. The noisy signals are not passed back from getmswtfeat to the main program, and 2. even if the signals were passed back, the calls to getmswtfeat are at the very end of the main program.
*The line numbers in the error message are different than what you reported, because of the work-around code which I added.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

John Amoo-Otoo
John Amoo-Otoo 2022년 9월 21일
William, for a script like this where will the Gaussian Noise fit. I have also attached the data that needs to be processed
  댓글 수: 5
John Amoo-Otoo
John Amoo-Otoo 2022년 9월 24일
편집: John Amoo-Otoo 2022년 9월 24일
The output is to distinguish between a fault condition and Non faut condition. The entropy output(Highest and Minmimum entropy) wil tell me a fault condition and when a Protection starts and will use it as a treshold for the protection settings

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by