📜  如何使用 GNU-Octave 生成窄带和宽带 FM 信号?

📅  最后修改于: 2022-05-13 01:55:51.640000             🧑  作者: Mango

如何使用 GNU-Octave 生成窄带和宽带 FM 信号?

在本文中,我们将讨论如何使用 MATLAB 生成窄带宽带调频信号。

频率调制俗称调频,是一种模拟调制技术,其中高频载波信号的频率根据调制(消息)信号的幅度而变化,而载波信号的幅度和相位保持恒定或不变。

FM 信号的标准方程

fm = Ac∗ cos(2π fc t + b∗ sin(2π fm t))

在哪里; fm = FM 信号,

Ac = 载波信号的幅度,



fc = 载波频率,

fm = 调制频率,

t = 时间,& b = 频率调制指数。

根据频率调制指数 (b) 的值,FM 信号分为两大类:

  • 窄带调频
  • 宽带调频

窄带调频信号

一般来说,调频指数(b<1)小于1的调频信号称为窄带调频信号。通常,窄带调频信号用于像对讲机这样的低成本双向无线电通信系统。

为了生成窄带 FM 信号,我们将使用 FM 信号的标准方程并传递小于 1 的频率调制指数 (b) 的值。

例子:

Matlab
%  MATLAB code to generate the narrowband FM signal
clc;       % Clears the Command Window
clear all; % Clears the Workspace
close all; % Closes all the Windows opened by the program
  
% Time sampling where Step Size = 0.001
t = 0:0.001:1;
fm = 20; % frequency of the Message signal
fc = 250; % frequency of the Carrier signal
  
% Take the user input for the Frequency Modulation Index (b)
% (b) must be less than 1
b = input("Enter the value of b (<1): ");
  
% Define the Message signal
% here its a Sine wave
msg = sin(2*pi*fm*t);
  
% Define the Carrier signal
% here it is a Cosine wave
crr = cos(2*pi*fc*t);
  
% Narrowband FM Signal generation
nb_fm = cos((2*pi*fc*t)+(b*sin(2*pi*fm*t)));
  
% Plot all the three signals
figure('Name','Narrowband FM Signal Generation');
  
% Message Signal
subplot(3,1,1);
plot(t, msg, 'b', 'Linewidth', 1.5);
title('Message signal');
xlabel('Time')
ylabel('Amplitude')
grid on;
  
% Carrier Signal
subplot(3,1,2);
plot(t, crr, 'r', 'Linewidth', 1.5);
title('Carrier signal');
xlabel('Time')
ylabel('Amplitude')
grid on;
  
% Narrowband FM Signal
subplot(3,1,3);
plot(t, nb_fm, 'g', 'Linewidth', 1.5);
title('Narrowband FM signal');
xlabel('Time')
ylabel('Amplitude')
grid on;


Matlab
%  MATLAB code to generate the wideband FM signal
clc;       % Clears the Command Window
clear all; % Clears the Workspace
close all; % Closes all the Windows opened by the program
  
% Time sampling where Step Size = 0.001
t = 0:0.001:1;
  
fm = 20; % frequency of the Message signal
fc = 250; % frequency of the Carrier signal
  
% Take the user input for the Frequency Modulation Index (b)
% (b) must be greater than 1
b = input("Enter the value of b (>1): ");
  
% Define the Message signal
% here its a Sine wave
msg = sin(2*pi*fm*t);
  
% Define the Carrier signal
% here it is a Cosine wave
crr = cos(2*pi*fc*t);
  
% Wideband FM Signal generation
wb_fm = cos((2*pi*fc*t)+(b*sin(2*pi*fm*t)));
  
% Plot all the three signals
figure('Name','Wideband FM Signal Generation');
  
% Message Signal
subplot(3,1,1);
plot(t, msg, 'b', 'Linewidth', 1.5);
title('Message signal');
xlabel('Time')
ylabel('Amplitude')
grid on;
  
% Carrier Signal
subplot(3,1,2);
plot(t, crr, 'r', 'Linewidth', 1.5);
title('Carrier signal');
xlabel('Time')
ylabel('Amplitude')
grid on;
  
% Wideband FM Signal
subplot(3,1,3);
plot(t, wb_fm, 'g', 'Linewidth', 1.5);
title('Wideband FM signal');
xlabel('Time')
ylabel('Amplitude')
grid on;


输出:

Enter the value of b (<1): 0.55

输出:窄带调频信号生成

宽带调频信号

与窄带调频信号不同,宽带调频信号是调频指数(b>1)大于1的调频信号。通常,宽带信号用于高质量的广播传输。

为了生成宽带 FM 信号,我们将使用 FM 信号的标准方程并传递大于 1 的频率调制指数 (b) 的值。

例子:

MATLAB

%  MATLAB code to generate the wideband FM signal
clc;       % Clears the Command Window
clear all; % Clears the Workspace
close all; % Closes all the Windows opened by the program
  
% Time sampling where Step Size = 0.001
t = 0:0.001:1;
  
fm = 20; % frequency of the Message signal
fc = 250; % frequency of the Carrier signal
  
% Take the user input for the Frequency Modulation Index (b)
% (b) must be greater than 1
b = input("Enter the value of b (>1): ");
  
% Define the Message signal
% here its a Sine wave
msg = sin(2*pi*fm*t);
  
% Define the Carrier signal
% here it is a Cosine wave
crr = cos(2*pi*fc*t);
  
% Wideband FM Signal generation
wb_fm = cos((2*pi*fc*t)+(b*sin(2*pi*fm*t)));
  
% Plot all the three signals
figure('Name','Wideband FM Signal Generation');
  
% Message Signal
subplot(3,1,1);
plot(t, msg, 'b', 'Linewidth', 1.5);
title('Message signal');
xlabel('Time')
ylabel('Amplitude')
grid on;
  
% Carrier Signal
subplot(3,1,2);
plot(t, crr, 'r', 'Linewidth', 1.5);
title('Carrier signal');
xlabel('Time')
ylabel('Amplitude')
grid on;
  
% Wideband FM Signal
subplot(3,1,3);
plot(t, wb_fm, 'g', 'Linewidth', 1.5);
title('Wideband FM signal');
xlabel('Time')
ylabel('Amplitude')
grid on;

输出:

Enter the value of b (>1): 2.5

输出:宽带调频信号生成