sampling and filtering in continuous time modulation

版本 1.0.0 (271.8 KB) 作者: Thamilmaran
Explores the fundamental techniques of sampling and filtering within the context of continuous time modulation
1.0 次下载
更新 2024/4/11

查看许可证

1. Comprehensive study of sampling techniques (uniform, non-uniform) and filtering methods (FIR, IIR) within the context of continuous time modulation.
2. Practical demonstrations and discussions on the application of these techniques in telecommunications, audio processing, and other relevant domains, emphasizing their importance and impact on signal integrity and system performance.
% Parameters
Ac = 1.0; % Carrier amplitude
fc = 10.0; % Carrier frequency (Hz)
fs = 100.0; % Sampling frequency (Hz)
T = 1.0; % Total time duration (s)
Ts = 1/fs; % Sampling period
t = 0:Ts:T-Ts; % Time vector
% Message signal (sinusoidal)
fm = 2.0; % Message frequency (Hz)
m_t = sin(2*pi*fm*t);
% Continuous-time modulated signal
s_t = Ac * (1 + m_t) .* cos(2*pi*fc*t);
% Sampling
x_n = s_t(1:round(fs/fc):end); % Sampling at the carrier frequency
% Filter design
cutoff = 20.0; % Cutoff frequency for the low-pass filter
nyquist = 0.5 * fs;
order = 5; % Filter order
[b, a] = butter(order, cutoff/nyquist, 'low');
% Filtering
filtered_signal = filter(b, a, x_n);
% Plotting
figure;
subplot(3,1,1);
plot(t, s_t);
title('Continuous-Time Modulated Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
subplot(3,1,2);
stem(t(1:round(fs/fc):end), x_n, 'r', 'Marker', 'o', 'LineStyle', 'none');
title('Sampled Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
subplot(3,1,3);
plot(t(1:round(fs/fc):end), filtered_signal);
title('Filtered Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
sgtitle('Sampling and Filtering in Continuous-Time Modulation');% Parameters
Ac = 1.0; % Carrier amplitude
fc = 10.0; % Carrier frequency (Hz)
fs = 100.0; % Sampling frequency (Hz)
T = 1.0; % Total time duration (s)
Ts = 1/fs; % Sampling period
t = 0:Ts:T-Ts; % Time vector
% Message signal (sinusoidal)
fm = 2.0; % Message frequency (Hz)
m_t = sin(2*pi*fm*t);
% Continuous-time modulated signal
s_t = Ac * (1 + m_t) .* cos(2*pi*fc*t);
% Sampling
x_n = s_t(1:round(fs/fc):end); % Sampling at the carrier frequency
% Filter design
cutoff = 20.0; % Cutoff frequency for the low-pass filter
nyquist = 0.5 * fs;
order = 5; % Filter order
[b, a] = butter(order, cutoff/nyquist, 'low');
% Filtering
filtered_signal = filter(b, a, x_n);
% Plotting
figure;
subplot(3,1,1);
plot(t, s_t);
title('Continuous-Time Modulated Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
subplot(3,1,2);
stem(t(1:round(fs/fc):end), x_n, 'r', 'Marker', 'o', 'LineStyle', 'none');
title('Sampled Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
subplot(3,1,3);
plot(t(1:round(fs/fc):end), filtered_signal);
title('Filtered Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
sgtitle('Sampling and Filtering in Continuous-Time Modulation');

引用格式

Thamilmaran (2026). sampling and filtering in continuous time modulation (https://ww2.mathworks.cn/matlabcentral/fileexchange/163136-sampling-and-filtering-in-continuous-time-modulation), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2024a
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签
版本 已发布 发行说明
1.0.0