作者Gocoba (Family Guy)
看板comm_and_RF
标题[问题] Matlab for noise spectrum
时间Mon Feb 2 14:35:30 2009
最近正在学习用matlab来解决communication的问题
看了一本书遇到些问题希望能有人指点
(书名:Contemporary Communication System Using Matlab)
假设输入讯号是 A*cos(2*pi*100k*t)
并且通过50ohm resistance
想请问若是我想画出spectrum with thermal noise at "room temperature"
我该如何起头呢?
noise里的bandwidth是total freq除2吗? (BW/2=100k/2?)
if so, 那thermal noise power是不是应该等於 K*T*(BW/2)
而不是KTB?
不是很清楚我的input signal该怎麽跟temperature扯上关系 XD....
以下为code:
A = 10e-3;
temp = 300; % Assume the room temperature is 300K
fs = 100e3;
tmax = 1/fs*20; % Frequency resolution to a multiple of the
fundamental
tstep = tmax/(2^10-1); % Number of time points to a power of 2 for fft
t = [0:tstep:tmax];
Vin = A*cos(2*pi*fs*t);
n = 50*randn(size(t));
V_sum = Vin+n;
基本想法是信号外加上因为电阻产生的noise
noise是由 randn()来产生, 50是电阻....
还是说电阻是用在...V^2/2R 来产生power
还有个问题是....100KHz时 SNR应该怎麽算呢?
Signal/Noise, 把已知的signal和noise相除转换成dB?
真是抱歉问了很多傻问题....还望有人能替我解惑....
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 70.171.231.215
1F:→ coye:Nyquist formula 61.223.210.227 02/03 02:31