Keysight E4428C ESG RF Programming Manual page 160

Signal generators
Table of Contents

Advertisement

Programming Examples
LAN Programming Interface Examples
% This value should be 256 for the Equalization filter and 32*osr for the
% Arb Modulation filter.
% applied with a width of maxTaps centered about the peak point.
% Example: writeMxgEqFir('mxg1', 'a', [-0.1 0.1 0.4 0.1 0.4 0.1 -0.1]);
if (nargin<3 || nargin>7)
error('usage: writeMxgFir(host, instrumentFilename, timeDomainFilter[, osr[, rate[, destRate[,
maxTaps]]]])');
end
if (nargin<4)
osr=1;
end
if (nargin<5)
rate=125e6;
end
if (nargin<6)
destRate=125e6;
end
if (nargin<7)
maxTaps=1024;
end
% adjust coefficients for destination rate
if (rate ~= destRate)
timeDomainFilter = resample(double(timeDomainFilter), destRate, rate, 30);
timeDomainFilter = timeDomainFilter.*(rate/destRate);
end
if (length(timeDomainFilter)>maxTaps)
[maxval, index] = max(abs(timeDomainFilter));
center=index;
left = center-(maxTaps/2-1);
if (left<1)
left=1;
end
right = left+(maxTaps-1);
while (right > length(timeDomainFilter))
right = right-1;
end
timeDomainFilter = timeDomainFilter((left):(right));
end
rateAdjustedFilter = timeDomainFilter;
% open tcp connection
t=tcpip(host, 5025);
t.OutputBufferSize=1024*1024; % plenty big for filters
% write file contents
152
Note that the filter has a rectangular window
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents