目录
1、FM 系统
clear all;
close all;
clc;
Kf = 5; %调频指数
fc = 10; %载波中心频率
dt = 0.001;
T = 10;
t = 0:dt:T;
%生成基带信号
fm = 1;
%mt = cos(2*pi*fm*t) + 1.5*sin(2*pi*0.3*fm*t);
mt = cos(2*pi*fm*t);
%FM 调制
A = sqrt(2);
%mt 的积分函数
%mti = 1/2/pi/fm*sin(2*pi*fm*t) -3/4/pi/0.3/fm*cos(2*pi*0.3*fm*t);
mti = (1/(2*pi*fm))*sin(2*pi*fm*t) ;
st = A*cos(2*pi*fc*t + 2*pi*Kf*mti);
figure;
subplot(3,1,1); plot(t,st,'b-');
hold on; plot(t,mt,'r:');
xlabel('t (s)'); title('FM 调频信号');
grid on;
%FM 已调信号的功率谱
[f sf] = T2F(t,st);
subplot(3,1,2); plot(f, (abs(sf).^2)/T,'b-');
axis([-18, 18, 0, 1]); grid on;
xlabel('f (Hz)'); title('FM 调频信号的功率谱');
%FM 解调
for k = 1:(length(st)-1)
rt(k) = (st(k+1)-st(k))/dt;
end
rt(length(st)) = 0;
subplo