DAQ Demo Software (5.x)
The SonixDAQ software is separated from the Exam software. This section will only focus on the DAQ software which is used to:
- Program the DAQ by pressing "Create Sequence ..."
- Adjust the DAQ parameters and capture channel data the by pressing "Start Sequencing"
- Transfer the DAQ data back to PC by pressing "Download Data"
- Load the collected data from the Sonix system (PC) and display the results by pressing "...".
The following figure shows the main user interface of the SonixDAQ software. The menu section of this window contains:
- Directory : is the path of the collected data and can be used to load acquired channel data
- Sequence (the same as the Create Sequence push button): programs the DAQ and opens another window "Sequence Control" which provides data acquisition options to the user. More detail is given below.
- View: to show/hide the frame control in the main window
- Help: shows the information about the software version.
- Sampling: to select the 80MHz bitstream to be loaded.
This window enables the user to view:
- The channel-by-channel waveform of the collected data (e.g. decrease/increase the time scale),
- The FFT or FFT average of the data (In case decimation is used during data collection, the same value needs to be set in this window for the frequency spectrum to show the correct frequencies),
- One or more channels (up to 32) on the screen (by adjusting "Channel Scale"), and
- Different acquisition frames (by pressing "<<" and ">>").
A sample screen shot of the window when displaying the results is shown below:
Note: By default when clicking on "Create Sequence ..." the 40MHz bitstream will be loaded into the DAQ FPGA. As a result only sampling frequency of 40MHz and lower can be used for data collection. To load the 80MHz bitstream, you need to first click on 80MHz in the Sampling tab prior to clicking on the "Create Sequence ...". If you do this correctly, a tick should appear beside 80MHz. You can double check this by clicking on the 'Sampling' tap and seeing the status of the 80MHz. After this step, if you click on the "Create Sequence ..." the 80MHz bitstream will be loaded into DAQ FPGA. Once programming is finished you should be able to select the 80MHz sampling in the next window.
Note: If you program the DAQ with one bitstream e.g. 40MHz and want to switch to the other bitstream i.e. 80MHz you need to turn off the DAQ and turn it back on. If you skip this step, the DAQ will always respond as already being initialized and will not load the new bitstream.
After pressing the "Create Sequence" button, the DAQ software will program the DAQ hardware. Once the DAQ is programmed, the "Sequence Control" window will appear. The Sequence Control window, which is shown below, allows the user to adjust the parameters for data acquisition, start/stop the sequencing, and download/transfer the captured data to PC.
The flowchart of the supported sequence control is depicted in a figure below and will be explained in detail in the following sections.
Choose the TGC Curve
The user can obtain the desired TGC curve in the top section of the window. Both adjustable TGC (as a function of depth) and fixed TGC can be programmed.
This window allows the user to adjust the imaging parameters such as
- Number of Samples: number of samples that will be acquired regardless of the sampling frequency,
- Receive Delay: the delay (in micro seconds) after the sync signal and before start of data collection,
- Line Duration: duration of each acquisition in micro seconds,
- Gain Delay, delay after the transmit before the TGC is applied in micro seconds,
- Gain Offset, shifts the TGC curve up based on the Gain offset value, the value is in micro volts and it ranges from 0 to 1600 (1.6 Volt maximum gain),
The effects of these parameters on data acquisition are depicted in a figure below. Further explanations are provided in the next subsections.
The parameters either has to be entered manually, or loaded from a file. Note that some combination of the parameters are not supported by the DAQ. In case "Load From File" option is selected. The first three parameters will be loaded from the file (D:\daq-b.prm). It should be noted that for this option to work properly, the Sonix system has to write these information to the same file. For this purpose, the "writeDAQparams" has to be set to 1 on the mouse over menu in the Exam software. For further information refer to Sonix system setup.
In case the "external" synchronization pulse is selected, the Line Duration is determined by the input sync/trigger coming from the Sonix system or another external triggering system. Also, it is up to the user to ensure that Number of Samples is short enough to fit in between the sync pulses. Otherwise, the DAQ will miss some of the triggers and unwanted transmits will occur during data acquisition. This is due to the fact that the DAQ will not look for the trigger signal during data collection. Once predefined number of samples are acquired, the DAQ will wait for the next trigger.
If "internal" synchronization pulse is selected, the DAQ software checks the feasibility of the selected combination of Number of samples, Line Duration and Receive Delay.
The DAQ has its own internal clock that runs at 40MHz. This clock is different from the Sonix clock. In this section you set the DAQ to use its own internal clock or to use the external clock provided to the DAQ through a BNC cable. This will make sure that both the DAQ and the Sonix system are using the same clock. It is important to note that this clock always has to be 40MHz regardless of the sampling frequency. The DAQ uses this 40MHz clock to generate the sampling frequency (i.e. 40MHz or 80MHz).
For general imaging it is not necessary to use the external clock. Small differences between the two clocks will not introduce any problem. But for tracking applications (e.g. tissue tracking or blood flow imaging) you should always use the external clock to make sure your data are all synced. Otherwise, you will notice small drifts over time in your channel data samples.
Note: This option is only available on the Sonix systems with the new PCI card (i.e. SonixTouch, SonixMDP, and modified SonixRP). On the old SonixRP system only the internal clock should be used.
In this section you select synchronization pulse source: internal or external. The synchronization pulse is a pulse which indicates the beginning of each acquisition. The user can choose the source of this pulse based on the purpose of the data collection. If the purpose is to test the DAQ, it is not required to connect the synchronization BNC to the Sonix system’s BNC. The DAQ is capable of generating this pulse internally.
In this scenario, the source of the synchronization pulse must be selected as internal. Also, it is not required to connect the DAQ to the probe slot. Instead, the DAQ's probe connector can be connected to a signal generator, which generates a wave form with a frequency less than 20MHz and amplitude less than 50mV.
However, if the goal is to capture synchronized ultrasound data from the Sonix system, the DAQ has to be connected to the Sonix system's probe connector and DAQ's BNC input signal has to be connected to Sonix's BNC output signal. In this scenario, the source of the synchronization pulse must be selected as external.
There are four separate boards inside the DAQ. Each board acquires data from 32 channel.
Active channels can be any combination of channels from 1 to 128. Next figure shows the active channel selection window.
This is a digital filter that performs as a DC canceler. The cut off frequency for this filter is 280kHz. The user can bypass this filter by selecting the Bypass HPF option.
Note: In addition to this digital HPF, the sonixDAQ has anti-aliasing filters as well. The AA filter is a combination of a low pass filter LPF and a high pass filter HPF. Currently the cut-off values for AA filter are set to be:
- HPF cut-off = F_high = F_sampling/3 = 40MHz/3 = 13.3MHz and
- LPF cut-off = F_low = F_high/20.7 = 650kHz.
In other words the pass band for AA filter is approximately from 0.6MHz to 13.3MHz for sampling frequency of F_sampling = 40MHz. Subsequently, the pass band for sampling frequency of F_sampling = 80MHz is approximately from 1.2MHz to 26.6MHz.
The SonixDAQ can work in two different operating modes:
- Normal mode: the data is written to the memory (i.e. DDR2) until it gets full. In this mode, the user can choose the max capacity of the memory.
- Free-Run mode: the memory is treated as a ring buffer. In this mode, the user has to press the stop button in order to stop writing the data into memory before downloading the stored data.
The DAQ FPGA runs at 40MHz but the receive board (rx board) can generate higher clock frequencies (e.g. 80MHz) from the same 40MHz clock. This will allow the DAQ to sample the data at higher frequencies. Currently both 40MHz and 80MHz samplings are supported by the DAQ.
You can always pre-calculate your frame size as follows: Frame size = number of channels x number of samples x sample size
For example:128 channels x 2000 samples x 2 bytes per sample = 512 kB
This means if you set your file size to 8MB you should be able to acquire 16 frames per download. The decimation option allows the user to reduce the sampling frequency (i.e. down sampling). This option can be used to store more frames on the DAQ. Currently, this is the only parameter that allows the user to control the sampling frequency as follows:
- 80MHz (decimation = 0) <<80MHz bitstream>>
- 40MHz (decimation = 0) <<40MHz bitstream>>
- 20MHz (decimation = 1) <<40MHz bitstream>>
- 13MHz (decimation = 2) <<40MHz bitstream>>
- 10MHz (decimation = 3) <<40MHz bitstream>>
Note: Decimation is not supported for the 80MHz sampling bitstream. If lower sampling frequencies are of interest 40MHz bitstream should be used instead. Also, at the moment, decimation only uses down-sampling with no anti-aliasing filter. Thus, setting the sampling frequency too low will result in aliasing.
The file size allows the user to set the maximum memory size for each board on the DAQ. Since there are four boards on the DAQ, setting the File Size to 4GB will result in capturing 16GB of channel data. Currently the following options are supported for the File Size:
- 4GB (divisor = 0)
- 2GB (divisor = 1, i.e. 4G/2^1 = 2G)
- 1GB (divisor = 2, i.e. 4G/2^2 = 1G)
- 128K (divisor = 15, i.e. 4G/2^15 = 128K)
Note: due to limited bandwidth of the USB cable, increasing the memory size will result in longer transfer time. Thus, it is recommended to set the file size lower than the maximum value unless it is necessary.
In this section LNA gain, PGA gain, and the Switch gain can be adjusted. For detailed description of these gains please refer to hardware block diagram.
Note: Setting the Switch gain to 0 will turn off the TR switch. Thus, you will not receive any echo. To acquire data, make sure this gain is set higher than 0.
Note: Maximizing all the gain may cause the TR switch to saturate. Thus, the values have to be adjusted depending on the application.
The write procedure to memory can be terminated by either pressing the stop button or when memory is filled to capacity (only in Normal mode). The user can download the captured data from DAQ. The following figure shows the download window.
Format of the stored data
In the output directory, the ultrasound data is stored in binary files CHZZZ-YYYY.daq, where ZZZ is the channel number from 0 to 127 and YYYY is the file number. For example, CH000-0000.daq is the first set of data for channel 0, while CH000-0001.daq is the second set of data for channel 0. At the beginning of each file is a header consisting of two unsigned integers (32 bits each) which contain the number of lines and the number of samples per line, respectively. The ultrasound samples are 16-bit signed integers, stored in lines after the header.
For example, if the integers are 10 and 1024, respectively, the file contains ten lines of 1024 samples per line, for a total of 10,240 samples. Since the ultrasound samples are stored in lines, to read the first line of samples one would simply read 1024 * (2 bytes/sample) = 2048 bytes from the file beyond the header. Each line would be the next 2048 bytes beyond that.
When using the latest version of the SDK (v6.0.1) data that is downloaded to disk from the SonixDAQ using an API function call has a slightly modified header structure. The header now consists of three 32-bit unsigned integers. The first represents the channel number (0 through 127), the second gives the number of lines and the third gives the number of samples per line. Moreover, the data file is saved as CHZZZ.daq where ZZZ is the channel number between 0 and 127.
DAQ Demo Software (6.0)
This version offers a new interface for the DAQ Demo software while maintaining all the previous functionality.
The following figure shows the main user interface of the SonixDAQ software:
The options tab on the top allows the user to adjust the initialization (i.e. sampling rate/frequency) as well as some of the sequencing parameters (e.g. start and clock configuration)
Once you set the sampling rate, press the Power button. This will start the initialization process. During the initialization a progress bar will be displayed on the top as a feedback to the user. Once the initialization is complete the Play bottom will be activated allowing the user to run the DAQ.
The right side menu allows the user to adjust most of the sequencing parameters.
Other sequencing parameters such as start and clock configuration can also be modified in the options tab. This version also allows the user to set the TGC to both fix value and adjustable as a function of depth:
After setting the sequencing parameters, the user can press the Play button to run the DAQ. Note that if you like to change the sampling from 40MHz to 80MHz you need to turn off the DAQ and re-initialized it with the new sample rate. Otherwise the DAQ will keep the previous sampling frequency. Also, by default the Bias Current is set to 0 which will turf off the receive. To turn it back on you need to set this parameter nonzero.
Loading DAQ Data
In order to load previously recorded data the user can click on the Data tab on the top and choose Load from file .... This way, previously recorded DAQ data can be loaded and displayed.
DAQ Demo Software (6.1)
The following figure shows the main user interface of the SonixDAQ software (6.1):
Enhancing Data Visualization
This version allows the user to visualize the channel Data acquired from the DAQ as an image (right screen) as well as individual channels (left screen). The user can scroll through different frames using the slider on the top. Sliders on the left can be used to help with visualization of different channels. One slider sets the start channel for display and the other slider sets the number of channels for display. Slider on the bottom plus the span ratio can also be used to control the axial zoom for channel display.
DAQ indexing check box on the top also allows the user to see the channel data with daq channel index (checked) or with transducer element index (unchecked). This option allows the user to visualize the DAQ data such that each channel corresponds to the same element index on the transducer (i.e. proper image).
By selecting the Beamforming check box, a parallel beamforming will be applied to the DAQ data to generate the RF image. After beamforming, the user may need to adjust the digital gain (slider in the center) in order to properly visualize the beamformed signal.
Note: By default the demo software assumes the L14-5/38 for beamforming. In order to make the software compatible with other transducers the users need to modify the source code and recompile the Demo software.
The software also allows the user to save channel data (or beamformed RF frames when Beamforming check box is checked) into a .rf file with proper header information. This file can then be processed by the Amplio Demo Program for generating the corresponding B mode images. The save button will save all the frames into daqData.rf file. This file will be stored in the same folder as the raw data. This option enables the user to generate beamform DAQ data very fast.
Anti Aliasing Filter
Starting version 6.1, the analog front end's low pass filter's cut-off frequency can be adjusted through the API (This is also known as anti-aliasing filter). The analog front end's high pass filter's cut-off frequency can also be adjusted through the API.