AWGN noise does not fit main function
16 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Propagation and Channel Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!