# How do you add noise to an FM signal?

17 ビュー (過去 30 日間)
Jared Joselowitz 2020 年 9 月 9 日
コメント済み: Hiro 2020 年 9 月 10 日
This is Frequency modulation where
where
Question:
I have been able to modulate the message signal m(t) and demodulate it suing this code:
fc = 1000;
Ac = 5;
t0 = 0.2;
ts = 0.00000001;
fs = 1/ts;
t=[0:ts:t0];
m = 10*t.*(t>=0 & t<=0.1)+(2-10*t).*(t>0.1 & t<=0.2)+0.*(t>0.2);
u = Ac*modulate(m,fc,fs,'fm'); %% modulate the message signal
y = demod(u,fc,fs,'fm'); %% demodulate the message signal
y = y/(6.275*10^-5); %% scale the demodulated signal
figure(6)
subplot(2,1,1)
plot(t,m(1:length(t)));
title('Original Message signal m(t)')
xlabel('Time (s)')
ylabel('Amplitude')
subplot(2,1,2)
plot(t,y);
title('Demodulated Message Signal')
xlabel('Time (s)')
ylabel('Amplitude')
I now need to add noise to the signal according to the above formula of y(t) = u(t) + n(t)
where n(t) = nc(t).cos(2\pi fc.t) - ns(t).sin(2\pi fc.t)
How do I add this noise to u(t) using rand or randn ?

サインインしてコメントする。

### 回答 (1 件)

Hiro 2020 年 9 月 9 日
You can check this up:
1. white noise
2. apply filter with the cutoffs both ends in the frequency domain

#### 3 件のコメント

Jared Joselowitz 2020 年 9 月 9 日
I have tried this but it is not working. The demodulated signal looks nothing like the original message signal. Please help.
Jared Joselowitz 2020 年 9 月 10 日
I have added the noise however, the demodulated signal is indestinguishable from the orignal message signal:
fc = 1000;
Ac = 5;
kf = 25;
t0 = 0.5;
ts = 0.00000001;
fs = 1/ts;
t=[0:ts:t0];
df = 0.45;
nc = 0.2;
ns = 0.2;
m = 10*t.*(t>=0 & t<=0.1)+(2-10*t).*(t>0.1 & t<=0.2)+0.*(t>0.2);
u = modulate(m,fc,fs,'fm');
n = nc*cos(2*pi*fc*t) - ns*sin(2*pi*fc*t);
y = u + n;
dem = demod(y,fc,fs,'fm'); % demodulate the nosey signal
dem = dem/(8.7275*10^-5); % scale the signal
figure(1)
subplot(2,1,1)
plot(t,m(1:length(t)));
title('Original Message signal m(t)')
xlabel('Time (s)')
ylabel('Amplitude')
subplot(2,1,2)
plot(t,dem);
title('Demodulated Noisy Message Signal')
xlabel('Time (s)')
ylabel('Amplitude')
Hiro 2020 年 9 月 10 日
I guess you should add noise before the command "modulation".
see:
it says demod works for the signal created by modulation.
Also this can be a help for you

サインインしてコメントする。

### Community Treasure Hunt

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

Start Hunting!

Translated by