Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI 5441 hardware timed carrier frequency sweep

Hello Everyone,

I have a question about the PXI 5441 Arb waveform generator.

I would like to perform a hardware-timed phase-coherent frequency sweep from about 40 MHz to around 150 kHz spanning from 5-10 seconds. The first thing that springs to my mind is, why not use the Frequency list mode of the signal generator, but I believe the minimum duration of each frequency of the list is 1 ms, therefore my sweep would probably take over 10 seconds. I would like to sweep the frequency down quickly at the from 40 MHz to 1 MHz and then slow it down. So then I thought that maybe I could use the NCO to do the job, but I think that the carrier frequency is software controlled. Does anyone know if the NCO can be changed using hardware-timing?

Also the PXI 5441 is based on DDS to generate the output signal. Therefore, in the Standard Function mode can I change the frequency of the output (sine-wave) by changing the clock speed (either using the internal clock, or an externally provided one)?

Note: The reason I don't just want to use the Arbitrary signal generator mode, and load all the sweep point into the card and start it off, is that I wish to minimise the memory used on the onboard memory of the signal generator: Since this frequency sweep will be the first segment of a longer sequence of frequency and amplitude changes that will be using up most of the onboard memory.

I hope that my question makes sense!
Thanks, Paul.
0 Kudos
Message 1 of 22
(10,507 Views)

labJunky,

What is your desired frequency step size? If you are going to sweep from 40 MHz to 150 kHz, will you be sweeping every 1Hz, 1 kHz, etc?

You are correct when saying that the NCO carrier frequency is controlled by software, however you will not be able to change the carrier frequency based on the internal timing of the hardware. 

DDS is the same way you can only change your frequency in software.  This means the time to change to each frequency would be depended on your computer system and not the hardware. 

Ryan N
National Instruments
Application Engineer
ni.com/support
0 Kudos
Message 2 of 22
(10,473 Views)
Hi Ryan, thanks for your reply.

The frequency step size will vary along the frequency sweep, from about 5 kHz at the beginning to around 100 Hz nearer the end. I expect that we are going to vary the frequency step according to a logarithmic function in time. Although it might be possible to use a linear function. But without working out anything, the number of steps will probably be around 40 thousand. Therefore, in frequency list mode, this would take 40 seconds if we simply stepped a 1 kHz at a time. 40 seconds is definitely too long for our application! We need to ramp in a strict-maximum of 15 seconds 'tops'.

If I used the arbitrary waveform mode and simply loaded points to the card, could I load one sine wave cycle for each frequency step, and then loop each cycle for however long I need that frequency step to be, before moving onto the next frequency step? I guess for the waveform to be phase-coherent I would need each cycle to start and end at zero (volts). Now if I need a one thousand points per cycle, and 40 thousand frequency steps, I would use 80 MB of memory (its a 16 bit card), which is quite a lot. (I am not sure how many points per cycle I need though, I don't know if the harmonics will affect what I am doing...) Is there a way of using the OSP 'onboard signal processing' to compress the data loaded onto the card? (By uploading data at say 10 samples per cycle and then interpolating using the FIR (x4), CIC (x256), and DAQ (x8) interpolating to create a signal at 81.92 kS/s. This would only use 800 kB (its like magic! From 80 MB to 800 kB memory used and increasing the output quality of the signal while you are at it!))

On your comments about the software timing: I am not using labview real-time, I am running labview on an intel dual-core 2 GHz Dell machine, running Windows XP, which uses a PCIe to PXI bridge to interface with the PXI 6 slot chassis with the PXI 5441 in the 6th slot. The other slots are used by a M series DAQ card, a DIO card, and two AO cards (PXI 6723, PXI 6733). Since the frequency sweep needs to be smooth using the software-timing to sweep the output frequency would probably not do. I expect that the sweep would not be smoothly timed and worse it probably would not be repeatable? (Since you never know what windows is going to start doing while you are running the sweeping loop in labview. Right?)

Any comments on my above thought would be really useful. And also if anyone has any clever ideas of using the card's features to make the frequency sweep reliably timed, while not using much onboard memory, that would be great too!

Thanks,
Paul
0 Kudos
Message 3 of 22
(10,460 Views)
Hi Paul,
 
I've been looking into this with two different ideas in mind.  However, I haven't been able to come up with any way that this is doable.
 
My first idea would be to try and change the sampling rate on the card on the fly.  I don't see any way that the card cannot change frequency fast enough to accomplish 40,000 different frequencies in a 15 second span. 
 
My second idea would be to use streaming.  The only way for streaming to work is to use a consistent sampling rate.  For example, your application will require you to sample at atleast 80MS/s to cover the nyquist rate of your highest frequency component.  This means that you will have to use this rate for all other frequencies.  This just means that you will be significantly oversampling these lower frequency rates.  Unfortunetly, this means that you will be streaming at a rate of 160MB/s (16 bit card = 2 bytes per sample).  None of our currently arbitrary waveform generators are on the PCI-e bus.  This means that the max theoretical bandwith would be around 133MB/s.  This is ideal and often the more realistic speeds would be around 115-125MB/s.  With this in mind, you would also have to comprise a raid array to store this 2.4 GB of data waveform and stream it at 160MB/s to PC memory.  This is doable with current larger raid array setups. 
 
To conclude, the pci bus is going to be your limitation in regards to streaming.  We have no current way to get around this limitation.  If you were to make some reductions in terms of how many frequencies you sweep or reduce the highest frequency component, we might have a solution for you with streaming.  If you would like to play around with some of our streaming examples, they are available on www.ni.com/streaming.  These examples use a modified win32 file write/read vi's to achieve faster rates than the current ones found in LabVIEW.
 
Regards,
Ryan N
National Instruments
Application Engineer
ni.com/support
0 Kudos
Message 4 of 22
(10,442 Views)
Hi Ryan, thanks for your ideas.

I haven't been able to understand the first one your wrote, regarding changing the sample rate on the fly. Can you go into some more details about that (step-by-step what I need to do)? Also I didn't understand your sentence with the double negative in it "I don't see any way that the card cannot change frequency fast enough to accomplish 40,000 different frequencies in a 15 second span." To me that means 'The card can change the frequency fast enough to accomplish 40,000 different frequencies in 15 seconds.' In which case thats great!

Your idea about streaming is also helpful. But I didn't understand why you think it is impossible with my current hardware. It is true that the output sampling rate of my highest frequency component (40 MHz) must be 80 MS/s, which is 160 MB/s in terms of memory (I hadn't thought of the Nyquist rate before you mentioned it). This requirement makes things difficult since for 15 seconds we need a total of 2.4 GB of data to output the sweep, and thus streaming is the only solution. However, if I use the onboard signal processing (OSP) I can start with a waveform sampled at 10 kS/s and use the FIR (x4) and CIC (x256) to up-sample the data to a sample rate of 10.24 MS/s, then at the DAC I can further interpolate to x8, and that results in a output-waveform sample-rate of 81.92 MS/s. Which avoids the problem with aliasing. In this case, the 15 seconds of waveform use up 300 kB of memory (10 kS/s=20 kB/s. 20 kB/s x 15 s = 300 kB).

Have I completely misunderstood something about the function of OSP? If not, is the above logic correct that I only need 300 kB of memory to output my sweep at 80 MS/s (after interpolation of the signal)?

If you could answer those few question above that would be fantastic.
Thanks for your help.
Paul


(p.s. You also mentions that "None of our currently arbitrary waveform generators are on the PCI-e bus. This means that the max theoretical bandwith would be around 133MB/s." I thought that the new PXIe-5442 arbitrary waveform generator can receive data at 200 MB/s using streaming?)
0 Kudos
Message 5 of 22
(10,425 Views)
Hello Paul.

I'd like to clarify a few of the points above and answer some of your questions:
  • The Sample Rate on the NI PXI-5441 cannot be changed on the fly. The 5441 has a very complicated clocking circuitry with some internal components that need to be reconfigured based on different Sample Rates and others that need to lock to any new Sample Rates. This applies to both internal and external clocks.
  • If you want to use the interpolation circuitry in the Onboard Signal Processing block of the 5441, the IQ Rate can go to up to 8.33 MS/s. This is too low to reach 40 MHz so for your application the OSP should not be used.
  • Does anyone know if the NCO can be changed using hardware-timing? Yes. Frequency List Mode on the 5441 is a hardware timed NCO frequency change, nothing else. This is how the functionality is implemented by NI-FGEN.
  • Also the PXI 5441 is based on DDS to generate the output signal. Therefore, in the Standard Function mode can I change the frequency of the output (sine-wave) by changing the clock speed (either using the internal clock, or an externally provided one)? When the PXI-5441 is in Standard Function Mode, the Sample Rate is fixed at 100 MS/s and the NCO is used to generate your signal. External clocks are not allowed in Standard Function Mode.
  • NI has released the new PXIe-5442 which increases the streaming performance very much (among many other improvements). However, I think it might be overkill to use streaming for your application.
In summary: you want to do a phase-continuous frequency sweep from 40 MHz to 150 kHz that takes no more than 10 s. Since the minimum frequency list step duration is 1 ms, you can have up to 10000 distinct frequencies in your Frequency List.
  • Is 10000 distinct frequencies not granular enough for your application?
  • If not, then how many discrete frequencies would you like to have in your frequency list?
Thanks
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 6 of 22
(10,420 Views)
Hello Marcos, thanks for your points. They cleared up a lot of things.

One point I didn't understand though is:

"If you want to use the interpolation circuitry in the Onboard Signal Processing block of the 5441, the IQ Rate can go to up to 8.33 MS/s. This is too low to reach 40 MHz so for your application the OSP should not be used."

The reason I have some misunderstanding is that on the datasheet of the PXI 5441 it states, under the heading of 'Baseband Interpolation', that:

"For example, a waveform created at 10 kS/s sample rate could be interpolated to 10.24 MS/s by using 4x FIR interpolation and 256x CIC interpolation. The upsampled signal is then passed to the DAC which can also interpolate by 2, 4, or 8x resulting in an effective sampling rate of 81.92 MS/s (8x DAC interpolation). Since the original waveform was sampled at only 10 kS/s, rather than 81.92 MS/s, a 1:8,192 compression ratio is achieved, resulting in dramatically faster waveform computation and download times."

In this case, 81.92 MS/s would be enough to reach 40 MHz. So I am confused between your statement and this one. Its obvious that I have misunderstood something important, so could you try and clarify please?

Also as for you question about whether 10 thousand frequency steps is enough. The answer is that I would like to do it with 40 thousand frequency steps. However, if that can not be done (with my current hardware), or is very difficult to do, then I will try and do it with 10 thousand steps.

Thanks for the help!
Paul

p.s. I can't afford a PXIe-5442.
0 Kudos
Message 7 of 22
(10,400 Views)
The FIR (Finite Impulse Response) and CIC (Cascaded integrator-comb) filters in the OSP act on the user's waveform data.
The user's data is generated at a lower rate (the IQ Rate). The filters upsample it in order to shape the data and remove aliases. They increase the effective sample rate by adding points in between the user's points and sending them to the DAC at a faster rate (this is a very very simplified view). But they will not add any content to your data. Their main application is in the telecommunications area, although they can be used for other things.

For example, let's say your original waveform data is a single period of a sine wave using 10 samples. You want to generate a 100 Hz tone, so you'd run the device at 1 KS/s. 10 points for a cycle of a sine tone is not a lot so it would look a lot like a staircase.
You could use the OSP circuit to upconvert your sine tone by 1000x, so that each cycle contains 10000 samples (after upconversion). You'd still run the board at an IQ rate of 1 KS/s and your signal would still come out at 100 Hz. But the DAC would be fed data at 1 MS/s!. Thus the quality of the signal would be much higher... it would look like a smooth sine tone, not a staircase. It's analogous to passing a signal through a low-pass filter, except it's all done digitally/mathematically.

I hope this helps clarify what the filters in the OSP do. Again, it's an oversimplification of what the FIR/CIC filters are used but should help you understand them better.

That said, for your application my advice is that you create a 10,000 step frequency list. This should be very straightforward. Let me know how that works out for you and we can look at other options/tradeoffs.

Good luck
Marcos
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 8 of 22
(10,386 Views)
Hello,

10,000 steps in the frequency sweep is not enough. Therefore, I have descided to use streaming. If I can stream at 100 MB/s then I can run the Arb at 50 MS/s which means my maximum frequency would be about 16 MHz or so. I will use a frequency doubler at the output of the arb to achieve a high output frequency.

My question though is: what is the maximum streaming rate I can achieve using the MXIe, linking my PC to the PXI devices, to the PXI 5441?

I have downloaded the Win32IO Streaming API, and run a benchmark on Reading data from my hard-drive. Using a RAID 0 configuration with two hard-drives (2x WD2500YS) I can Read data from the disk to RAM at about 120 MB/s. Then I use the "niFGEN streaming from disk Maximum Transfer Rate.vi" and it tells me that the maximum streaming rate I can achieve is 50 MB/s. Is there anyway I can increase that? (Currently the 5441 is in Slot 6 of the PXI 1036 chassis, does this make any difference?)

Thanks for your help,
Paul
0 Kudos
Message 9 of 22
(10,307 Views)
Hello

That's really unfortunate that 10,000 1 ms steps won't suffice for your application, and that you cannot extend the total duration of the frequency list.

Streaming over PCI at 100 MB/s sounds a little bit like a stretch. Theoretical peak is around 133 MB/s (4 bytes bus width @ 33.3 MHz) but in practice you get less, especially if you are going over a PCI bridge (MXI). The rate is affected by many factors, other PCI traffic and precise system configuration among them, so you won't know for sure until you try to benchmark it. Hopefully someone who's done more work with streaming applications can give you some hints on how to change your configuration to get a little bit more speed out of it.

Good luck

Marcos




Message Edited by kirsch on 03-04-2008 02:16 PM
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 10 of 22
(10,294 Views)