gusucode.com > UWB_matlab源码程序 > CP0704/cp0704_time_mask.m

    %
% FUNCTION 7.13 : "cp0704_time_mask"
%
% This function defines the signal in the time domain
% corresponding to the FCC indoor emission mask for UWB
% devices in the frequency domain
%
% The function receives as input:
% 1) and 2) the time interval to be considered through the
% lower limit  'Tmin' and the upper limit 'Tmax'
% 3) the number of samples in the time domain 'smp'
%
% The function returns a vector 'timemissionmask' of 'smp'
% points representing the Fourier anti-transform of the
% square root of the FCC mask
% 
% The constant values used in the function have been
% analytically derived by representing the mask as the sum
% of translated rects in the frequency domain, based on the
% following formula:

% A*rectT(t) <--> A * T * sin(pi*f*T)/(pi*f*T) 
%
% and on the duality and translation properties of the
% Fourier transform
%
% Programmed by Luca De Nardis

function[timeemissionmask]=cp0704_time_mask(Tmin,Tmax,smp)


% -----------------------------------------------
% Step Zero - Input parameters and initialization
% -----------------------------------------------

% sampling period
dt = (Tmax-Tmin)/smp;
% sampling frequency
fs = 1/dt;
% initialization of the time axis
x=linspace(Tmin,Tmax,smp);

% periods of the sin(x)/x functions in the time domain

t(1)=1/(0.96e9);
t(2)=1/(0.65e9);
t(3)=1/(0.38e9);
t(4)=1/(1.11e9);
t(5)=1/(7.5e9);
% adjusting the last value depending on fs
t(6)=1/(fs/2-10.6);

% amplitudes of the rects functions in the frequency domain

a(1)=261.408;
a(2)=3.53;
a(3)=25.99;
a(4)=95.571;
a(5)=2042.25;
% adjusting the last value depending on fs
a(6)=8.61e-8/t(6);

% evaluation of the frequency shifts

for i=1:6
    f0(i)=0;
    if i>1
        for k=1:(i-1)
            f0(i)=f0(i)+1/t(k)
        end
        f0(i)=f0(i)+1/(2*t(i));
    else
        f0(i)=1/(2*t(i));
    end
    s(i,:)=a(i)*(sin(pi*x/t(i))./(pi*x/t(i))).*exp(j*2*pi*f0(i)*x); 
% performing the fourier AT
end
comb=ones(1,6);
timeemissionmask=comb * s;