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