Keysight E4428C ESG RF Programming Manual page 159

Signal generators
Table of Contents

Advertisement

centeredTime(center:len) = timeDomain(1:center);
else % even
topHalf = (length(timeDomain)/2)+1;
centeredTime(1:(topHalf-1)) = timeDomain(topHalf:end);
centeredTime(topHalf:len) = timeDomain(1:(topHalf-1));
end
else % already centered in time domain
centeredTime = timeDomain;
end
if (abs(destRate-rate)>1e-6)
resampledTime = resample(centeredTime, destRate, rate, 30);
resampledTime = resampledTime.*(rate/destRate);
else
resampledTime = centeredTime;
end
% clip off the center 256 (if necessary)
if (length(resampledTime)>256)
[maxval, index] = max(abs(resampledTime));
center=index;
left = center-127;
right = left+255;
clippedTime=resampledTime((left):(right));
else
clippedTime = resampledTime;
end
corrFilter=clippedTime;
end
Example 3: Downloading a FIR filter in Matlab to the MXG
This example uses Matlab to control the MXG over the TCP- IP (LAN) interface. This example takes a
filter in Matlab and writes it to a FIR file in the MXG. This example can be can be used in
combination with either the automatable loadPsaEqFilterFreq.m example (1) or the loadVsaEqFilter.m
(example 2) to manually work with the VSA 89600 software. This example can also be used to create
real modulation FIRs.
The following program example is available on the signal generator Documentation CD- ROM as
writeMxgFir.m.
function [rateAdjustedFilter]=writeMxgFir(host, instrumentFilename, timeDomainFilter, osr, rate,
destRate, maxTaps)
% writeMxgEqFir(host, instrumentFilename, timeDomainFilter, osr, rate, destRate, maxTaps);
% writes filter to 'instrumentFilename' on 'host' using tcp-ip. Real or complex is
% auto-detected.
osr is assumed to be 1 if it is missing.
% to be 125Mhz if missing.
% maxTaps is the hardware limit of the MXG (256 if not specified).
Keysight Signal Generators Programming Guide
destRate is assumed to be 125Mhz if missing.
LAN Programming Interface Examples
rate is assumed
Programming Examples
151

Advertisement

Table of Contents
loading

Table of Contents