필터 지우기
필터 지우기

How to attenuate the signal in frequency domain without disturbing the noise floor?

조회 수: 1 (최근 30일)
I have written a code to calculate the power spectrum of a 200Hz sinusoidal signal. In frequency domain, the strength of the 200Hz component is 24dbm and the noise floor is at -15dbm. How to attenuate the signal with out affecting the noise floor at -15dbm?
close all;
clear all;
clc;
fs = 1e3; % sample freq
f = 2e2;
D = 0.3; % pulse delay times
StopTime = 1;
t = (0 : 1/fs : StopTime-1/fs)'; % signal evaluation time
N = size(t,1);
w = 0.2; % width of each pulse
yp = pulstran(t,D,@rectpuls,w);
x = (10)*sin(2*pi*f*t);
display(size(yp));
display(size(x));
z = yp.*x;
noisy_z = z + 0.5*randn(size(z));
y = xcorr(noisy_z,'biased');
display(size(y));
subplot(2,1,1);
plot(t*(1/(f*StopTime)),z);
title('Pulsed sine signal');
subplot(2,1,2);
plot(t*(1/(f*StopTime)),noisy_z);
title('Noisy signal');
l = length(t);
%%Fourier Transform:
X1 = fft(y,l);
X2 = X1(1:l/2);
X = abs(X2)/N;
%%Frequency specifications:
dF = fs/N; % hertz
f1 = 0:dF:fs/2-dF; % hertz
display(size(f1));
display(size(X));
%%Plot the spectrum:
figure;
plot(f1,(10*log10((X).^2*1e3)));
xlabel('Frequency (in hertz)');
ylabel('Power (in dbm)');
title('Autocorrelation spectrum');
grid on;
  댓글 수: 1
Wayne King
Wayne King 2014년 2월 20일
편집: Wayne King 2014년 2월 20일
Well, right out of the gate, how are you doing this?
fs = 1e3; % sample freq
f = 2e2;
A sinusoid with a period of 1/2000 sampled at 1/1000 is going to be aliased to be DC (all zeros for sin with zero phase and all ones for a cosine with zero phase.)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by