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 日
Values for winsize is 32 and increment is 16
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 Center および File ExchangeSignal Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by