作者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