01-24-2008 09:19 PM
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.
01-30-2008 09:14 PM
01-31-2008 12:51 PM
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
02-12-2008 01:31 AM
02-15-2008 01:01 AM
02-15-2008 11:23 AM
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.
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
02-22-2008 11:16 AM
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.