Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Center Frequency for niFgen OSP Advanced?

Hi all,
 
I'm just wondering how can I set the output frequecny using the niFgen_OSP_Advanced_Example.
 
This are my setting
 
# of samples: 4
IQ Rate: 3.125M
Interpolation for FIR Filter: 4
Interpolation for CIC Filter: 8.
 
The selected samples will be 3.125M * 4 * 8 = 100M as shown.  By dividing it by the # of samples, it will be 100M/4 = 25M.
 
But why am I not able to see a frequencey at 25MHz? 
 
I can only see a signal at 25Hz if I enable the Carrier Frequency.  Is it a must for me to turn that on?  Won't that affect the performanace of the AWG? 
Jieyi
0 Kudos
Message 1 of 27
(9,127 Views)
Hello Jieyi.
According to the way you configured the example, you are generating a 4 sample complex waveform at 3.125 MS/s (which is your IQ Rate). The FIR and CIC filters act on the data as low-pass filters. So your sine tone, with so few samples per cycle, will be practically filtered out completely.

If all you want is a 25 MHz sine tone coming out, you should use Function Generator mode, not OSP mode (which is used for upconverting complex signals). If you must use OSP mode or are learning how to use OSP mode, the way to get a 25 MHz sine tone would be to use DC as your data, use Real instead of Complex Data Processing Mode, and turn on the NCO (numerically controlled oscillator) which generates a carrier that is multiplied by your data. Set the carrier frequency to 25 MHz and you're all set.

Hope this clarifies how OSP works on the 5441.

Marcos
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 2 of 27
(9,118 Views)
My eventual goal is to produce a sweeping sine wave that will be fed on to my upcoverter, 5610. 
 
Streaming of data is also one of my concern.  That's why I used OSP as this will help lessen the work load of my CPU and memory.  I need the memory to stream my data.
 
 
So am I right to say that I will need the NCO to obtain my 25KHz Sine wave, if i'm to use the OSP?  Are they any other alternatives?
 
Jieyi
0 Kudos
Message 3 of 27
(9,103 Views)
Ok, it seems you are programming the 5441 Arb and the 5610 Upconverter separately, as opposed to pair them as a 5671 and program them using a single API (NI-RFSG). I don't know why you want to do it that way, perhaps you can explain that separately.

As far as the NI 5441 by itself is concerned, I'd like to understand your application better...
  • Is all you want to do a frequency sweep?
  • What is the starting frequency and ending frequency of your sweep?
  • How long does the sweep need to take, total?
  • How many steps do you need in the sweep, or do you need the frequency changes to be countinuous?
I have a few ideas in mind, but need to understand your application better.

Marcos
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 4 of 27
(9,099 Views)
The final center frequencey which I wish to operate at will be 2.35GHz.
 
I will like to sweep at a range of +/- 200KHz and it will be phase countinuous.  And also, it will start with sine wave, after which, I will change it to BPSK.
 
Hence my plan is to use the AWG to generate a 25MHz signal, after which I will upcovert it to 2.35GHz using the upconverter.
Jieyi
0 Kudos
Message 5 of 27
(9,087 Views)

Hey Jieyi,

There are two approaches to generate sinewave using I&Q signals.

The fundamental formula for generating IF waveform using I&Q signals is:

IF (t) = I(t)*cos(Wc*t)- Q(t)*sin(Wc*t);

where IF(t) is the IF waveform
I(t), Q(t) are I&Q waveforms
Wc is the carrier frequency

One way as Markos mentioned is to set I(t) as DC value.
In this case, it would setting I=1, Q=0. Then IF(t)= cos(Wc*t). This means that the waveform generated in this mode, IF signal generated will have same frequency as carrier frequency. To change frequency of IF waveform in this mode, you would have to change carrier frequency (Wc). To change carrier frequency on the fly, we can modify the property node "Carrier Frequency". YWe can do multiple updates to the carrier frequency to get frequency sweep. However, this will be software timed.

Another way is to make I and Q signals as sine and cosine signals.

In this case, IF(t)= cos(wx*t)*cos(Wc*t)- wx(t)*sin(Wc*t) = cos((wc+wx)*t+theta)

Notice that in this case, the frequency of the output signal is Wc+Wx. In this mode, we can keep Wc constant and modify Wx on the fly. To change IF frequency in this case, we would have to constantly sweep the Wc(t) by changing the frequency content of I&Q signals. You can download a chirp signal for the I/Q signals which are out of phase and sweep the IF waveform.


If you are using NI PXI-5610 and NI PXI-5441, you can use NI-RFSG driver for generating required signal.

The particular example of interest I would recommend for your application to get started is to use
"C:\Program Files\National Instruments\LabVIEW 8.2\examples\instr\niRFSG\niRFSGExamples.llb\Large Arbitrary Waveform Generation.vi".

This examples downloads the complete chirp signal before the start of generation. However, you can modify this program to do streaming. I can help you on that if this example doesn't suffice.

Let me know if I am not clear on anything.

Can you elaborate more on "it will start with sine wave, after which, I will change it to BPSK" and I would be more than happy to help you out.

Thanks,
Kalyan

Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 6 of 27
(9,063 Views)
One note to add to Kalyan's comments:

For frequency sweeps or BPSK, using Real Data Processing Mode (instead of Complex) will allow you to store twice as much data on the device's memory (or stream twice as many samples per second) since Real data takes half as much space as Complex data. It will also be easier to create the waveforms in your program.

I don't know all the details on your specific application, but to keep things much simpler for you as far as programming the device is concerned, I recommend you create and download your waveforms to the signal generator's onboard memory ahead of generation.
Of course, this is not possible in all scenarios: if the required playtime is very long and a script can't be used, or if the full waveform is not known ahead of start of generation, then streaming will be your only option.

Good luck.

Marcos
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 7 of 27
(9,056 Views)
Hi Kalyan
 
Thanks for your help. 
 
As quote from you,

"Another way is to make I and Q signals as sine and cosine signals.

In this case, IF(t)= cos(wx*t)*cos(Wc*t)- wx(t)*sin(Wc*t) = cos((wc+wx)*t+theta)

Notice that in this case, the frequency of the output signal is Wc+Wx. In this mode, we can keep Wc constant and modify Wx on the fly. To change IF frequency in this case, we would have to constantly sweep the Wc(t) by changing the frequency content of I&Q signals. You can download a chirp signal for the I/Q signals which are out of phase and sweep the IF waveform. "

Am I right to say that the Wc will be set to fixed value, ie for my case 25MHz on the Carrier Frequency, while I will do a sweep, using the ramp function, on the Wx, which is the frequency of the I&Q signal?

 

Jieyi
0 Kudos
Message 8 of 27
(9,027 Views)

Hi Jieyi,

Am I right to say that the Wc will be set to fixed value, ie for my case 25MHz on the Carrier Frequency, while I will do a sweep, using the ramp function, on the Wx, which is the frequency of the I&Q signal?

Yes, you would set the carrier frequency to 25MHz. Regarding the sweep of frequency for I/Q signals. You can notice that in one of the subVI's the example I referred, we ramp the frequency of I/Q signals. To create I/Q array from the frequency ramp in time-domain, we make use of polar notation.

To perform this operation easily in LabVIEW:

1) Create a Ramp signal for the frequencies you want to sweep with Sampling Rate = I/Q Rate.

For example, if you want to sweep from 25.5MHz- 26MHz. Then you would create Ramp Signal which will sweep from 0.5-1MHz after setting the carrier frequency to 25MHz.

 You can notice that in RFSG driver examples.

C:\Program Files\National Instruments\LabVIEW 8.2\instr.lib\niRFSG\niRFSGExamplesSupport.llb\rfsg_Get Next Chirp Waveform Fragment for Large Waveform Example.vi .

 If you don't have RFSG driver installed, attached VI demonstrates this operation and you can modify it accordingly for your application.

2) Then feed the output to the theta input of "Polar to Complex" function in LabVIEW. Essentially you are sweeping theta of  "r*exp(j*theta)" with r=1. This will create the complex array I(t)+j * Q(t)

3) The rectangular co-ordinates of this complex array will give us I(t) &Q(t) signals needed for the generation of IF signal.

Let me know if I am not clear on anything.

Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 9 of 27
(9,017 Views)
Hi Kalyan
 
Attached is the screen shot of the part of the program, niFgen_OSP_Advanced_Example.vi, which I have editted. 
 
Is this the way to do it? There seems to be some error when I run it.
 
Hope you can help me out in this.
 
A million thanks...
Jieyi
0 Kudos
Message 10 of 27
(9,000 Views)