[英]MATLAB - Using fm demod to decode data
我試圖提取一個正弦曲線,它本身的速度會發生正弦變化。 其形式近似為sin(a(sin(b * t))),a + b是常數。
這是我目前正在嘗試的方法,但是它並沒有像我希望的那樣給我一個很好的正弦圖。
Fs = 100; % Sampling rate of signal
Fc = 2*pi; % Carrier frequency
t = [0:(20*(Fs-1))]'/Fs; % Sampling times
s1 = sin(11*sin(t)); % Channel 1, this generates the signal
x = [s1];
dev = 50; % Frequency deviation in modulated signal
z = fmdemod(x,Fc,Fs,fm); % Demodulate both channels.
plot(z);
謝謝您的幫助。
您的代碼中有一個錯誤,而不是:
z = fmdemod(x,Fc,Fs,fm);
你應該有:
z = fmdemod(x,Fc,Fs,dev);
另外,要查看漂亮的正弦圖,您需要繪制s1
。
似乎您沒有創建正確調制的FM信號,因此您也無法使用fmdemod
正確解調該fmdemod
。 這是一個正確執行此操作的示例:
Fs = 8000; % Sampling rate of signal
Fc = 3000; % Carrier frequency
t = [0:Fs]'/Fs; % Sampling times
s1 = sin(2*pi*300*t)+2*sin(2*pi*600*t); % Channel 1
s2 = sin(2*pi*150*t)+2*sin(2*pi*900*t); % Channel 2
x = [s1,s2]; % Two-channel signal
dev = 50; % Frequency deviation in modulated signal
y = fmmod(x,Fc,Fs,dev); % Modulate both channels.
z = fmdemod(y,Fc,Fs,dev); % Demodulate both channels.
如果您發現這些答案有用,則可以同時投票接受它們,謝謝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.