AWGN noise does not fit main function
16 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have a task which asks to create a transfer function and then add noise to the output of it. I have created the transfer function, it works just fine:
G = tf([m,0,0],[m,b,k]);
% generating random input signal
u_min=100;
u_max=10;
n=101;
tt=[0:0.05:5];
u = (u_min+rand(1,n)*(u_max-u_min));
[y, t] = lsim(G,u,tt);
plot(t,y);
It looks like this:

Everything is fine until here. Now I would like to add some noise to this signal. I've defined my noise like this:
noisePower = 1;
noiseSignal = awgn(y, noisePower);
% adding noise to y (output)
The problem can be seen here. Every time noise just goes way too far, I want it to be the same lenght as my inital transfer function lenght.
plot(t,y, noiseSignal)

Perhaps I'm not applying the noise correctly? I just want this noise to be in the same range as transfer function.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Propagation and Channel Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!