Creating low pass filter

조회 수: 20 (최근 30일)
Shyngys Serikov
Shyngys Serikov 2022년 3월 14일
답변: Sufiyan 2024년 1월 18일
How do I create anti aliasing low pass filter shown in the figure? So far I have coded root raised cosine in frequency domain:
%Generating Root Raised Cosine Pulse in Frequency Domain
T=0.1*10^-3; %symbol period
alpha=0.5; %roll-off factor
N=10/T;
f=linspace(-1/T,1/T,N+1);
% Generation of the raised cosine pulse using the formula in Lecture
Q=zeros(size(f));
Q(abs(f)<=1/2/T*(1-alpha))=T;
Q(abs(f)<=1/2/T*(1+alpha) & abs(f)>=1/2/T*(1-alpha))=T/2*(1- sin(T/2/alpha*(2*pi*abs(f... (abs(f)<=1/2/T*(1+alpha) & abs(f)>=1/2/T*(1-alpha)))-pi/T)));
%Plot
plot(f,sqrt(Q));
xlabel('frequency[Hz]', 'FontSize', 11);
ylabel('Amplitude', 'FontSize', 11);
title('Root Raised Cosine Pulse', 'Fontsize', 11);
grid on
axis square;
hold on;
%Keep when comparing graphs with different roll-off factors

답변 (1개)

Sufiyan
Sufiyan 2024년 1월 18일
You can try this
q_time = ifftshift(ifft(Q, 'symmetric')); % Inverse FFT with ifftshift
t = linspace(-5*T, 5*T, N);
plot(t, q_time);
xlabel('Time [s]', 'FontSize', 11);
ylabel('Amplitude', 'FontSize', 11);
title('Time Domain', 'Fontsize', 11);
grid on;
axis square;

카테고리

Help CenterFile Exchange에서 Discrete Fourier and Cosine Transforms에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by