how to add white noise to signal

5 views (last 30 days)
Hi,friends, i wanna add white noise to measured signals, first of all, what's the allowable size i have to choose for adding noise to signal, second, because of my continous system, i used band limited white noise block, what's the proper noise power or sampling time and or seeds...
  1 Comment
Image Analyst
Image Analyst on 3 Nov 2013
You said "block" - does this means that you are using a Simulink model? If so, list Simulink as the product. If it's MATLAB then Youssef's code will work fine.

Sign in to comment.

Accepted Answer

Youssef  Khmou
Youssef Khmou on 3 Nov 2013
hi, Azzi mentioned a good point about the seed and about the signals noise, for this its better to work with signal to noise ratio :
s=std(signal(:));
%snr=20*log10(s/n); you can give a snr value and compute n, next :
y=signal+n*(randn(size(signal)));
Remember that this is only for real signals, not for complex ones .

More Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 3 Nov 2013
The power noise depends on the effect of your noise on your signal. For the seed, choose whatever you want, but for one seed you will have each simulation the same random signal. If you want to have different random signals for different simulations, you have to change the seed.

Community Treasure Hunt

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

Start Hunting!