Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Center Frequency for niFgen OSP Advanced?

Hi Jieyi,

I still want to understand what you meant by "not able to track phase" in your previous posts. That will really help me help you better.

Solution to the above post:

I looked at your code and make some modifications in the implementation of the logic in LabVIEW.

I = A *cosw(wx *t) and Q = cos(wx*t) where wx is the frequency at the instant for the sweep.

Here t= N*dt where N is the current time index and dt is the IQ period (=1/IQ Rate)

In your code,

(a) I noticed that you weren't multiplying with N (a.k.a index of while loop) and

(b) instead of "dt", you were multiplying with "IQ Rate".

This should fix most of your problems. The other issue was that you were using "niFGen Util Create Frequency Sweep Data", this will give you a chirp signal. I am assuming that you are planning to sweep across the bandwidth linearly. Using "niFGen Util Create Frequency Sweep Data" will sweep non-linearly over the bandwidth.

I am attaching sample code which will take "Bandwidth" and "IQ Rate" as its input and output IQ Values. Use these IQ Values with niFGEN OSP Shipping Example to sweep through list with appropriate Carrier Frequency and IQ Rate.

For example to sweep from 24.8MHz to 25.2MHz. The Bandwidth = (25.2-24.8)MHz/2 = 200kHz and Carrier Frequency = (24.8+25.2)MHz/2 = 25MHz. I ran with the shipping example with IQ values generated by the attached program on hardware and I was able to see the corresponding sweep.

Since the Bandwidth is 200kHz, choose IQ Rate > 2*200kHz.

Hope this helps. Let me know if you run into issues.

 

 

Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 21 of 27
(4,804 Views)
Hi,
 
I need to generate a sweeping sine wave. Starting from the Center freq(CF) then sweep up to higher limit(HL), sweep down to lower limit(LL) and back to Center.
 
Flow:
CF -> HL
HL -> LL
LL ->CF
 
 
I need to keep track of the phase of the generated signal as wm will keep changing.  I do not wish my resultant signal to lost it's continuous phase.  My UUT require me to keep track of the phase.
 
Attached is the program which I have merged the help provided by u and the NI shipping example.  correct?
 
Jieyi
0 Kudos
Message 22 of 27
(4,781 Views)

Hi Jieyi,

The above attached VI will sweep from LL --> HL. This is because ramp signal is swept from -BW to BW.

To sweep from CF --> HL, we would create a ramp signal from 0 to BW. To sweep HL --> LL, we would create ramp signal from BW to -BW.

To sweep from LL --> CF, we would create a ramp signal from -BW to 0.

After creating these 3 ramp signals, we would combine them so that the signal will sweep as

CF -> HL
HL -> LL
LL ->CF
 
Let me know if I am not clear.
Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 23 of 27
(4,764 Views)
hi,
 
I have attached both the program and the screen shot of the results. 
 
For the niFgen_OSP_Advanced_Example(half), I am able to see it sweeping within the bandwidth range.  I can see the 'spike' moving.
 
For the niFgen_OSP_Advanced_Example(full), i don't seem to be able to see the sweeping effect.  is there any settings which I have configurated wrongly?
Jieyi
0 Kudos
Message 24 of 27
(4,714 Views)
My apologies for my previous post. I am able to solve it.
 
But how come it cannot move from CF>>UL>>LL>>CF.  What I observed is CF>>UL then LL>>UL.  After a few cycle, it will move from CF>>LL then UL>>LL.  I look thru the frequceny list array.  Everything seems to be running correct.  On theory it seems to work.
 
My settings are as follows
 
IQ Rate: 100k
Bandwidth: 200K
Samples: 1M
 
I also notice something.  When i change the bandwidth, there don't seems to be any changes reflected on my scope.  The bandwidth seems to be the same.
 
Thanks.
Jieyi
0 Kudos
Message 25 of 27
(4,687 Views)

Hi Jieyi,

Glad to hear that you were able to fix the problem and making progress. Can you post what setting fixed it?

When i change the bandwidth, there don't seems to be any changes reflected on my scope.  The bandwidth seems to be the same.

My first guess for this would be that the IQ rate you have set is not > 2*BW (as we are sweeping from -BW to BW).For example, you have chosen BW to 200kHz. The IQ rate should be greater than 2*200kHz= 400kHz.

Regarding your question on CF>>UL>>LL>>CF. I looked at the code and found that the logic needs to be changed little bit when combining the I/Q Points. I have attached modified code and you should the desired output. For one thing, I recommend using one of the Spectrogram example VI's installed with Spectral Measurement Toolkit to observe the frequency change over time. Also there was a factor of 0.5 which needed to be accounted for.

Let me propose my understanding of keeping track of phase. When you are moving from CF>>UL to UL>>LL you want to maintain the phase continuity, am I right?

Let me know if I am not clear on anything....

Thanks,

Kalyan

 

Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 26 of 27
(4,680 Views)

Hi,

My IQ Rate = 3.125M

BW = 200k

Sample = 1M

My IQ Rate is more than 2*200k.  But the resulted bandwidth is still bigger than 200k.

Let me propose my understanding of keeping track of phase. When you are moving from CF>>UL to UL>>LL you want to maintain the phase continuity, am I right?

Yes.  therefore, i don't think the new program, niFgen_OSP_Advanced_Example(up_down)2.vi, is not phase continuous.  The 'N' value breaks everything it chnage to another state.   Using the old program, 'N' will be running in continous. I have also increase the sampling rate to 2M for the state, UL>>LL. This is to maintan a standard 1M samples per state change, ie: CF>>UL, UL>>CF,CF>>LL, LL>>CF

Now I'm face with another problem. I think my system is unable to hold a sampling rate of more than 1M. Can I do streaming of data for the section of the program which generate the sweeping frequcy. or any other possilble way to overcome this problem.  My system is PXI-5441.

I have look through the sample, niFgen_Arb_Waveform_Streaming_Example.vi, but this don't seems to give a any guidance. Smiley Sad

 

 

Jieyi
0 Kudos
Message 27 of 27
(4,646 Views)