Generating arbitrary waveforms for Rigol DSG3000 series RF signal generator
Pure two-tone test signal on spectrum analyzer

Pure two-tone test signal on spectrum analyzer

I needed to get two-tone signal out of a Rigol DSG3060-IQ RF signal generator. Seems like a simple test signal that is needed for most RF testing applications, but boy was I wrong. There was no UI element to get two signals out at the same time, so the solution had to be to use arbitrary waveform generator. This takes waveform, generated in computer and plays it. Works as a basic software defined radio with IQ signal as input.

First I tried to do the official way: downloaded Rigols official Ultra Sigma and Ultra IQ Station. Ultra IQ Station was the most bug filled piece of software that I have ever seen. It has button for multi tone signal, but it gives unrecoverable error each time you think about changing a setting.

.arb file format itself

After ditching this, I moved on to the next logical step - reverse engineering the .arb file format. It seems to be somewhat of a standard, at-least in Rigol equipment, but there is no documentation on the version used in RF signal generators. After bunch of reverse engineering I figured out that it is a binary IQ dump with some headers. File starts with some binary header, then there is JSON metadata that tells the signal generator the sampling rate and number of samples, and then the IQ portion itself has 2 bytes per sample. That is pretty typical for 14 bit DAC based system. But the problem. We discovered that the binary data is somehow protected. Binary header of the file has timestamp or random seed in it and all the data has been changed with that key. Generating .arb file from the same IQ file gives different binary content each time. Unfortunately that means that it is not trivial to just add a header to your otherwise good IQ files. That also means that any .arb file generation has to rely on Rigol provided tools until somebody bothers to reverse engineer the keying.

Short example ARB file:

GÖÌÚARB.Ð...Ò......÷....óãà0.Oö.Ä|.`èÿ.g."è.®r\@}Hÿp.àL.!..3..G£Ñ`.û.oÿÀª.tð.¾(88B!.÷\ÿ.".¹..Òoê8°À¬..dE..98P.......Ù..| WÖ÷........Wæ3.........0..|....L..|isÄ÷L..|.Â.Ú....L..|©KÀ÷.PÖ÷....Þæ3.øè3.snÄ÷....²...{Clock:20000000HZ}{ModulationMode:Digital}{Value:0.874303}{Num:8}{DataSource:PRBS9}{Length:16}{SymbolRate:20000000Hz}{ModulationType:32QAM}{FilterType:Raised cosine}{FilterCoefficients :1.000000}{ImpulseLength:1}{OverSample:1}Z..7%í%LR¯Sâók{..ÿÒ.úÁ.Õ.*¼jp{.@

Official ConvDat2Arb.exe utility

While trying to figure out file formats we found a poorly documented command line utility called ConvDat2Arb.exe from one of the Rigol installers. As the limited help said it takes IQ data in either CSV or binary format and gives out .arb files. No information on data format, only the type. First we figured out the CSV. Contrary to the name "Comma-Separa Values" the tool can't handle any commas... Each value has to be on separate line and no commas can be in the file. The tool takes your maximum and minimum values and scales them properly for the signal generator DAC. It doesn't matter if values are between 0-100 or 0-100 000, it still works. It also works with negative numbers, that are converted to negative IQ voltages. I used it to generate my two-tone test signal and both, the IQ outputs and RF output worked exactly as hoped.

Secondly I tried to figure out the binary format. I knew that output file format had 2+2 bytes for each sample. And I knew that file sizes go down 4x when converting with the converter. After some testing we figured out that the input data has to be in long format. So 8 + 8 bytes per sample. With is a bit unfortunate since GNU Radio doesn't support this data type out of the box and separate converting is needed. With binary input negative numbers also don't seem to work. So the signals have to biased up from 0. But as with CSV the input file is scaled to match the signal generator and this is not something the user has to think about.

Internal memory glitches

Rigol DSG IQ glitch from internal memory

Rigol DSG IQ glitch from internal memory

With this my adventures in getting signal I need out seemed to end. But no, there is more. After testing the signal from USB stick and everything working I decided to copy the test signal to internal 1 GB memory. USB sticks tend to get lost and this is a much used test pattern. After running it from internal memory I noticed that running same file from internal memory produces endless amount of glitches in IQ outputs. So using the internal memory should be always avoided.

While putting random data in the .arb files I managed to brick my signal generator for some time. So be careful when doing further research.

Posted on 2020-01-24, 14:00 By
No comments yet Categories: Soft

Leave a Reply

Your email address will not be published. Required fields are marked *