AWGN noise does not fit main function

16 visualizaciones (últimos 30 días)
Tauras Eicius
Tauras Eicius el 26 de Mzo. de 2021
Editada: Tauras Eicius el 26 de Mzo. de 2021
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.

Respuestas (0)

Categorías

Más información sobre Propagation and Channel Models en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by