サイン搬送波には、振幅、周波数、位相の 3 つのパラメータがあります。したがって、変調信号の情報をこれら 3 つのパラメーターの変化に読み込むことができます。変調する際、搬送波の周波数が変調信号に応じて変化することを周波数変調 (FM) と呼びます。また、FM と PM (位相変調) を総称して角度変調と呼びます。角度変調の場合、元の変調信号のスペクトルの線形シフトではなく、新しい周波数成分を生成する非線形変換であるため、非線形変調とも呼ばれます。
周波数変調 FM は、瞬間的な周波数オフセットが変調信号 m(t) に比例して変化することを意味します。
このうち、Kfは周波数変調感度(rad/(s・V))である。
次に MATLAB でシミュレーションします。
①システム パラメータの初期化
% 系统参数初始化
clear;clc;close all;
echo on
t0 = .15; % signal duration
ts = 0.0005; % sampling interval
fc = 200; % carrier frequency
kf = 100; % modulation index
fs = 1/ts; % sampling frequency
t = [0:ts:t0]; % time vector
df = 0.25; % required frequency resolution
② 変調信号、FM変調信号の生成
% 调制信号和FM已调信号的产生
% message signal
m = [ones(1,t0 / (3 * ts)),-2 * ones(1,t0 / (3 * ts)),zeros(1,t0 / (3 * ts) + 1)];
int_m(1) = 0;
for i = 1 : length(t) - 1 % integral of m
int_m(i + 1) = int_m(i) + m(i) * ts; % m(i) 是调制信号矩阵的幅值,按顺序将三个阶段排开对应相应的 i
echo off ;
end
echo on ;
u = cos(2*pi * fc * t + 2*pi * kf * int_m); % modulated signal
figure(1);
subplot(2,1,1)
plot(t,m(1 : length(t)))
axis([0 0.15 -2.1 2.1])
xlabel('Time')
title('The message signal')
subplot(2,1,2)
plot(t,u(1 : length(t)))
axis([0 0.15 -2.1 2.1])
xlabel('Time')
title('The modulated signal')
③ 変調信号のスペクトラムと変調信号
% 调制信号和已调信号的频谱
[M,m,df1] = fftseq(m,ts,df); % Fourier transform
M = M / fs; % scaling
f = [0 : df1 : df1 * (length(m) - 1)] - fs / 2; % frequency vector
[U,u,df1] = fftseq(u,ts,df); % Fourier transform
U=U / fs; % scaling
figure(2);
subplot(2,1,1)
plot(f,abs(fftshift(M)))
xlabel('Frequency')
title('Magnitude spectrum of the message signal')
subplot(2,1,2)
plot(f,abs(fftshift(U)))
title('Magnitude spectrum of the modulated signal')
xlabel('Frequency')
④ FM信号の復調
% 信号的解调
[v,phase] = env_phas(u,ts,200); % demodulation, find phase of u
phi = unwrap(phase); % Restore original phase.
dem = (1 / (2*pi * kf)) * (diff(phi) / ts); % demodulator output, differentiate and scale phase
figure(3)
subplot(2,1,1)
plot(t,m(1:length(t)))
xlabel('Time')
title('The message signal')
subplot(2,1,2)
plot(t,dem(1:length(t)))
xlabel('Time')
title('The demodulated signal')
⑤ 関連する4つの機能、コンテンツ内で機能を説明
function [M,m,df]=fftseq(m,ts,df)
% [M,m,df]=fftseq(m,ts,df)
% [M,m,df]=fftseq(m,ts)
%FFTSEQ generates M, the FFT of the sequence m.
% The sequence is zero padded to meet the required frequency resolution df.
% 零填充序列,以满足所需的(输入)频率分辨率df
% ts is the sampling interval. The output df is the final frequency resolution.
% ts是采样间隔, 输出的df是 最终的 频率分辨率
% Output m is the zero padded version of input m. M is the FFT.
% 输出m 是 输入m 的零填充版本 M是FFT变化
fs = 1 / ts;
% nargin 针对当前正在执行的函数,返回函数调用中给定函数输入参数的数目。
if nargin == 2 % [M,m,df]=fftseq(m,ts)
n1 = 0;
else % [M,m,df]=fftseq(m,ts,df)
n1 = fs / df;
end
n2 = length(m);
% y = nextpow2(x); 2^y 为 大于等于x 的最小的二的整数次幂的数字 nextpow2(4)=2 nextpow2(5)=3
n = 2^(max(nextpow2(n1),nextpow2(n2)));
M = fft(m,n); % Y = fft(X,n)
% 如果 X 是向量且 X 的长度小于 n,则为 X 补上尾零以达到长度 n
% 如果 X 是向量且 X 的长度大于 n,则对 X 进行截断以达到长度 n
m = [m,zeros(1,n - n2)];
df = fs / n;
function [v,phi]=env_phas(x,ts,f0)
% [v,phi]=env_phas(x,ts,f0)
% v=env_phas(x,ts,f0)
% ENV_PHAS Returns the envelope and the phase of the bandpass signal x.
% 返回带通信号的 包络和相位
% f0 is the center frequency.
% ts is the sampling interval.
% nargin 针对当前正在执行的函数,返回函数调用中给定函数输出参数的数目。
if nargout == 2
z = loweq(x,ts,f0); % 返回 信号x 的低通等效值
phi = angle(z);
end
v = abs(hilbert(x)); % 希尔伯特变换,位移 π/2
function xl=loweq(x,ts,f0)
% xl=loweq(x,ts,f0)
%LOWEQ returns the lowpass equivalent of the signal x
% 返回 信号x 的低通等效值
% f0 is the center frequency.
% ts is the sampling interval.
t = [0 : ts : ts * (length(x)-1)];
z = hilbert(x);
xl = z.* exp(-j * 2 * pi * f0 * t);
function p=spower(x)
% p=spower(x)
%SPOWER returns the power in signal x
% 返回 信号x 的功率
p = (norm(x)^2) / length(x);
% norm(x,1),x是一个向量,norm是对向量中所有值的绝对值求和
% p就是x的平均功率
シミュレーション後、周波数変調感度 kf を通じてさまざまな結果を観察できるため、FM 関連の内容が理解しやすくなります。