IF-RIO

cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed: the unexpected ripple in ASK modulation

The unexpected ripple when bit switching

I made the OOK modulation and OOK demodulation example together to build a ASK transceiver. On the transmitter side I send out the bit stream through the DAC and then use the ADC to capture the data on the receiver side. I connect the AO to AI and got the preliminary result.(See screenshot attached). I keep the carrier wave on all the time, and when the data is coming I switched to the data and then switched back to the carrier wave. Basically, It works BUT I noticed that when bit switching (either 0->1 or 1->0), there are unexpected ripple which is quite large. I can’t find the reason, is it because of the DAC filter? If so, how to modify it? The symbol rate is 80k symbol/s and Samples/symbol=125, so the DAC CIC interpolation factor is 5. I tried the other combination of the symbol rate and samples/symbol, the ripple also appeared. Thanks again for your help!

 

Sunny



帖子被xy_se在06-05-2008 04:12 PM时编辑过了
0 Kudos
Message 1 of 9
(6,703 Views)
Hi, Sunny.

The overshoots you're seeing at the waveform edges are classic Gibbs phenomenon responses and are caused by the 4x-interpolating FIR filter in the AD9857 (the DAC). See, for example:

http://en.wikipedia.org/wiki/Gibbs_phenomenon

The problem comes about because you're feeding a signal with theoretically unlimited bandwidth into the DAC - the square wave spectrum consists of an infinite sequence of harmonics. The FIR filter passes the spectrum unchanged up to about 0.4 times the input sample rate (the I/Q data rate) and then the response rolls off abruptly. The result is a spectrum with harmonics up to about 0.4 times the sample rate and then suddenly nothing above that. Whenever a signal has a spectrum with significant power at one frequency and an absence of power nearby, you can expect that the time-domain waveform has some sort of ringing. And that's what you have here.

The solution is to limit the spectrum of your signal to 0.4 times the sample rate by filtering it before you send it to the DAC. I would be inclined to try a Gaussian filter or a Bessel filter, both of which tend to preserve the transient response, although other readers of this board will no doubt have more valuable suggestions.

Hope this helps,
Ed

0 Kudos
Message 2 of 9
(6,696 Views)
Thanks! That makes sense.
Based on your reply, I have one more question:
I directly modified the OOK modulation example provided by NI (hopefully you know that), and what I did is to pass the raw bit stream to the FPGA and assmble the data inside the SCTL driven by the DAC clock. So I have to realize the filter in the FPGA? That would be difficult. Or is there any way else I can incorporate the FIR filter? I know there is a filter design toolkit provided by NI, but it is on the host PC.


0 Kudos
Message 3 of 9
(6,690 Views)
Hello Sunny,
With your current approach (sending the bit stream to the 5640R, and having the onboard FPGA do all the processing), you would need to implement the filter in the FPGA as well.
The other approach is to modulate (and filter) the bitsream on the host, sending the resultant IQ data to the 5640R. If you modulated the data on the host, the application for the 5640R would essentially just be to stream the data created from the host to the 5640R. This would allow you to pre-process your data on the host and minimize the 5640R programming. However, the drawback is you don't get on the fly processing done by the FPGA.

Regards,
Andy Hinde
National Instruments
0 Kudos
Message 4 of 9
(6,663 Views)
Thanks very much!

I plan to implement the FIR filter in the FPGA.I used the DFD to generate the fxp coefficients and then took use of DFD built-in tool to transfer them into integer and downloaded them to the FPGA. I realized a 5 order FIR in the FPGA, but my question is:
1. Shall the cut-off frequency of the FIR filter be set to exactly 0.4 times of the IQ sampling frequency, or be under it a little bit, or be over it a little bit?
2. I doubt if the 5 order FIR can really solve the problem? I use the windowed method to design it, is it OK? Otherwise , shall I use FIR filter with more oreders? or Shall I use a 5 order IIR instead(if so, which type? Bessel? Ecliptical?etc??)

I searched NI web, and didn't get any explicit answer about this.

Please help me.

Sunny
0 Kudos
Message 5 of 9
(6,641 Views)
Hi, Sunny.

>>1. Shall the cut-off frequency of the FIR filter be set to exactly 0.4 times of the IQ sampling frequency, or be under it a little bit, or be over it a little bit?<<

It probably won't be too critical. Ideally, you'd want it to pass no power at and above 0.4 times the sample rate, but it's probably acceptable to pass a little bit if it means a faster transient. You'll know when you have too much power above 0.4 when you start to see some ripple in the transient response.


>>2. I doubt if the 5 order FIR can really solve the problem? I use the windowed method to design it, is it OK? Otherwise , shall I use FIR filter with more oreders? or Shall I use a 5 order IIR instead(if so, which type? Bessel? Ecliptical?etc??)<<

See my attempt at generating a filter attached. It generates coefficients for an 8-tap FIR filter using a Kaiser-Bessel window. The cutoff is slightly above 0.4 times the sample rate, but I think that will be OK. If for some reason you're going to generate the signal at 2x the sample rate and decimate by 2, just make it a 16-tap filter by changing the 8 to a 16.

Hope this helps,
Ed

0 Kudos
Message 6 of 9
(6,633 Views)
Thanks, EBL!

I looked at your method and got the float-point coefficients, but I am not sure how to transfer those coefficients to  integer(I16) because I rely on DFD to transfer it before.


0 Kudos
Message 7 of 9
(6,622 Views)
Hi, Sunny.

Well, I'm not entirely sure of the scaling, since I really haven't used DFD much, but I usually multiply the numbers by 32768 and then round to nearest integer. This will by no means produce an optimal quantization, but it might work just fine for your application. Try it, and if you have any problems, post back and hopefully we can figure them out.

Ed

0 Kudos
Message 8 of 9
(6,611 Views)
Hi Sunny,
i am sreenivasulu.
i need to generate OOK modulation.
using Mathscript i generated,but using modulation tool kit i am unable to generate.i tried to generate using ASK ,but i failed.
So please upload  your OOK modulation VIs.
i am using ni 5640r card version 1.1 and LabVIEW 8.2

Thanking you so much
Sreenivasulu
0 Kudos
Message 9 of 9
(6,579 Views)