Application Note 1SP55: TSMW Digital I/Q Interface Option K1
Application Note 1SP55: TSMW Digital I/Q Interface Option K1
Option K1
Application Note 1SP55
Products:
R&S TSMW
Table of Contents
1 Overview 3
4Installation of the R&S TSMW K1 Option and TSMW I/Q Interface Demo
Application .......................................................................................... 4
8Additional Information............................................................................................. 16
1 Overview
The TSMW Digital I/Q-Interface Option R&S TSMW-K1 is a C++ software API that
provides direct access to the TSMW for capturing I/Q data using MATLAB™ or a user
specific C++ application. This allows for measuring RF signals with arbitrary center
frequencies between 30 MHz and 6 GHz with a maximum bandwidth of 20 MHz. Both
front-ends of the TSMW can be controlled, separately, allowing for MIMO
measurements as well as measurements on different center frequencies, e.g. to
capture mobile radio downlink and uplink band, simultaneously.
2 Software Features
The software offers:
TSMWIQInterfaceDemo
to start the R&S TSMW IQ Interface Demo Application. For running the compiled
standalone version, start TSMWIQInterfaceDemo.exe from the demo folder.
The R&S TSMW has to be connected to the host pc via LAN. Initialize the application
by clicking the Init. Interface button and connect to the TSMW via the Connect button.
Note: The default IP address of the TSMW is 192.168.0.2, if the IP address of the
TSMW has been changed, you have to enter the correct IP address in the
corresponding field, see Figure 1.
After having established the connection to the TSMW, one can start to perform
measurements.
6 Performing Measurements
1
There are 5 pre-selector bands. A low pass band for 30 MHz – 600 MHz, three tuneable bands
that reach from 600 MHz – 1.2 GHz, 1.2 GHz – 1.7 GHz and 1.7 GHz – 2.5 GHz with a
tracking filter bandwidth >40 MHz and a high pass band for 2.5 GHz – 6 GHz.
By activating the “Use Front-end 1” check box one activates measurements on front-
end 1, by selecting the “Use Front-end 2” check box, measurements on front-end 2
are activated. To perform simultaneous measurements on both frontends, select both
check boxes. Front-end specific measurement parameters are summarized in Table 2.
For designing user specific resampling filters press the “Design” button in the “Filter
Design” area. This opens the R&S TSMW Filter Design Tool window.
Load a pre-defined resampling filter with the “Load” button in the “Filter Design”
section. Such filter files are MATLAB™ (.mat) data files including a structure named
“FilterSpec” containing the filter specification. After a filter specification has been
loaded, it has to be transferred to the TSMW in order to use it. A filter specification is
selected by its filter id. Each time a new filter is loaded into the demo application, it
gets assigned the next free filter id. When pressing “Send to TSMW” all filter
specifications are sent to the TSMW.
When selecting a filter specification with the “Filter ID” combo box, the corresponding
sampling rate is displayed next to it. Pressing the “…” button shows the transfer
function of the selected filter.
After having loaded a filter specification and transferred it to the TSMW, it can be
selected and used for measurements.
One of the key-features of the TSMW is the ability to perform user-defined resampling.
This means that arbitrary sampling rates within the valid range can be used. The
R&S TSMW IQ Interface Demo Application includes a filter design tool for easy and
efficient design of resampling filters. This tool can also be started by entering
TSMWFilterDesignTool
at the command prompt. The same tool is also supplied as a compiled version in order
to allow designing a filter without having MATLAB™ installed.
The TSMW Filter Design Tool provides three different types of Low-pass filter designs:
Best results will usually be given with the “least squares” design. Consider the
following example.
You want to measure a signal with a bandwidth of 5 MHz. The minimum sampling
frequency for doing this is 5 MS/s. To sufficiently suppress aliasing products, however,
the sampling frequency has to be 10-20% higher than the bandwidth of the signal. We
will therefore use 6 MS/s.
The signal bandwidth of interest will lie between +/- 2.5 MHz (1/2 of the total
bandwidth), hence 2.5 MHz would be a sensible choice for the pass band frequency
fpass. (If the resulting attenuation at 2.5 MHz is too high to be accepted, the pass
band frequency can be increased slightly).
The maximum input frequency that does not lead to aliasing products is sampling
frequency / 2. In our case 3 MHz. This means we need a stop band frequency fstop of
3 MHz or lower. (If the achieved attenuation at 3 MHz is not acceptable, the stop band
frequency can be decreased).
The two other parameters wpass and wstop are the weighting factors for the pass
band and stop band. The standard values of 1 and 1000 for the pass and the stop
band, respectively, will usually be a good choice. Sometimes it might be necessary to
increase the stop band weighting factor wstop to 10000 for better attenuation results.
Usually, this results in higher pass band ripple.
Having selected the 5 parameters, you can press “Design Filter” in order to start the
filter designer. The other buttons will become active when it has finished.
“View Transfer Function” allows now to check the resulting transfer function. In this
plot, only the positive frequencies of the total bandwidth are shown because the filter is
symmetric about the zero frequency. The black line in the transfer function plot shows
½ of the sampling frequency, which is the maximum input frequency that does not
produce aliasing products. This means that higher frequencies shall be suppressed
sufficiently. A value of >60 dB is usually a sensible attenuation.
If the filter does not fulfil the requirements, one can change the input parameters and
start a new filter design after pressing “New Filter”.
Finally, when the filter fulfills your needs, you can save it with “Export to .mat File”,
which allows for loading it into the R&S TSMW IQ Interface Demo Application,
afterwards. Alternatively, you can press “Save & Close” to transfer it directly to the
Main GUI. This however, does not allow you to save the filter specification.
Figure 32 shows the Filter Design Tool with a transfer function plot resulting from the
previously discussed parameters. The transfer function shows the average and the
point-wise worst case transfer function. The latter shows for each frequency point the
worst case attenuation when considering different fractional delays as they appear
during resampling. Usually, only the average transfer function will be important.
Generally, the TSMW resampling FIR filter works with real-valued low-pass filters. If
special low-pass filter shapes are required by a user application, a user can use their
own filter design tool to produce different filter shapes. This is described in detail in
Section 7.2.
Figure 2: R&S TSMW Filter Design Tool with example filter transfer function.
The “Single Measure” area shows control buttons for single block measurements. A
measurement with the selected measurement parameters is started by pressing the
“Measure” button (this corresponds to calling the MATLAB™ function
TSMWIQMeasure). Pressing “GetData” calls the corresponding MATLAB™ (and
therefore C++) API function to unpack the measured data to the wanted output format,
and transfers it to MATLAB™. “Plot Channel” creates one plot window per selected
front-end where within each window, the signals of the corresponding sub-channels
are shown. For each sub-channel the power spectrum and the I and Q components are
plotted in sub-plots.
Continuous measurements can be started using the “Cont. Measure” area. This
performs all steps of “Single Measure”, i.e. start a measurement, get the data and
plot the result. After the results have been plotted, a new measurement is started. This
is done until “Stop” is pressed.
The “Analyze Custom” area has been provided for user specific enhancements. A
MATLAB™ user can easily use the corresponding callbacks to set parameters,
perform the specific measurement task and analyze and possibly plot the results.
Stream measurements are performed with the Streaming Dialog. This dialog can be
opened using the “Open Streaming Dialog” button. This can be done as soon as the
R&S TSMW IQ Interface has been initialized by pressing “Init. Interface”. This allows
you to open an already recorded stream data file without having to connect to a
TSMW.
The Streaming Dialog (Figure 3) allows for starting streaming measurements as well
as performing basic analysis of selected parts of the recorded I/Q data stream.
Furthermore, stream data files can be converted into the R&S signal generator
waveform and list format for easy replay on R&S signal generators.
I/Q streaming is generally performed with the parameters that are given in the main
dialog. However, these values are only taken when the streaming dialog is opened.
This means that for changing the I/Q streaming parameters, one has to close the
streaming dialog, change the measurements parameters and reopen the streaming
dialog.
I/Q streaming supports all possible measurement modes of the TSMW. That is, it is
possible by using a single front-end or both frontends, you can use one or several sub-
channels on each front-end etc. The sum of the sampling rates of all activated
channels, however, cannot exceed 22 MS/s @ 12Bit resolution. This results in
approximately 75 MByte/s transfer rate over GBit-LAN, which is the maximum that can
be achieved.
Stream buffer size Host PC buffer space in MByte that is reserved for
streaming. A minimum of 200MB is recommended. This
buffer is the maximum amount of memory used for stream
data before stream data blocks are skipped in case that the
data could not be written to disc or was not processed
already.
Maximum stream size Only used for streaming to hard disc. This is the maximum
amount of data that is streamed to disc before streaming is
automatically stopped.
During streaming, the number of received stream data blocks and the number of lost
(skipped) stream data blocks can be observed. In case of sufficient host PC
performance, no stream data blocks will be skipped. If however a stream data block is
skipped, a corresponding block with zero samples will be inserted in order to avoid
unknown time gaps in the I/Q data.
A recorded I/Q stream can be read using the second part of the Streaming Dialog.
“Open stream file” opens a stream data file. Note: You have to select the first stream
data file. After having opened the stream data file, the stream data parameters will be
shown in the lower panel.
A specific part of the I/Q stream can be extracted by entering the corresponding I/Q
start sample and the number of requested samples and pressing “Analyse stream”.
This loads the data from the stream data file and shows the corresponding spectrum
and time functions. “Export to Worksp.” allows for exporting the I/Q data to the
MATLAB™ workspace for further processing. “Export to .mat” exports to a
MATLAB™ binary file.
The function “Convert to .wv” allows converting the selected number of samples to
R&S signal generator waveform and list format in order to allow RF-replay on R&S
signal generators. For that purpose, the corresponding signal is normalized prior to
conversion in order to achieve best replay performance. The necessary signal
generator level for regeneration at exact the same signal level is written into the
comment section of the resulting .wv file.
Closing the corresponding file can be done using the button “Close stream file".
In the “Examples\CPP” folder, C++ example applications for I/Q baseband streaming
are provided. Under “Examples\CPP\TestStreaming”, online-processing of stream data
is demonstrated. Given a corresponding input signal at the TSMW (see C++ source
code), this example demonstrates that I/Q streaming is performed seamlessly. A
similar test application is included in “Examples\CPP\TestStreamingFile”, where in a
first step, the I/Q data is streamed onto disc and post-processed, later.
MeasCtrl = MeasCtrlTemplate_RF1;
% Get MeasCtrl structure template
% for measurement on front-end 1
10*log10(mean(abs(IQData).^2))
% Calculate average power in dBm
For further details on how to perform measurements, use measurement priorities and
change measurement parameters, please see the R&S TSMW Interface &
Programming Manual.
Consider an output sampling rate of 2 MS/s. The resulting down sampling factor is
therefore 21.94444 MS/s / 2 MS/s = 10.9722. Calling the function TSMWGetFIRParam
gives then a total number of filter coefficients of Ncoeff = 2688 with an oversampling
factor of 8. This means that 8 polyphase filter sets, each with 336 filter coefficients are
needed.
In order to design such a set polyphase filter, one can use every filter design algorithm
that provides Ncoeff filter coefficients using normalized pass and stop band frequency
limits fpass / Novspl and fstop / Novspl. This means, all polyphase filter coefficients are
designed at once.
Consider a filter specification that has a pass band frequency of 0.9 MHz and a stop
band frequency of 1 MHz. With a normalized frequency interval of -0.5 to 0.5
(corresponding to -10.9722 MHz .. 10.9722 MHz), the normalized pass and stop band
frequencies become 0.0820 and 0.0911. In order to design the polyphase filter, one
has now to use the pass and stop band frequencies 0.0820 / 8 = 0.0103 and 0.0911 / 8
= 0.0114 and design a filter with Ncoeff = 2688 coefficients (taps). The resulting filter
coefficients together with the given down sampling and oversampling factor can be
used directly for the TSMW.
To summarize, one can use any filter design algorithm that provides the given total
number of filter coefficients when scaling every frequency limit by 1 / Novspl.
Note: TSMW resampling filters have to be real-valued low-pass filters, hence they have
a symmetric transfer function. Furthermore, one has to keep in mind that a TSMW
resampling filter is always connected to a specific down sampling factor.
8 Additional Information
This Application Note and the associated software are updated from time to time.
Please visit the TSMW web page www.drivetest.rohde-schwarz.com
9 Ordering Information
R&S TSMW Scanner Hardware Platform 1503.3001.02
R&S TSMW-K1 IQ Streaming Option 1503.3960.02
R&S TSMW-Z1 Power Supply 110/230 VAC 1503.4608.02
Regional contact
Europe, Africa, Middle East
+49 1805 12 42 42* or +49 89 4129 137 74
[email protected]
North America
1-888-TEST-RSA (1-888-837-8772)
[email protected]
Latin America
+1-410-910-7988
[email protected]
Asia/Pacific
+65 65 13 04 88
[email protected]
www.rohde-schwarz.com