Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- FPGAs and Programmable Solutions
- FPGA Intellectual Property
- DC in the CIC-FIR filter result

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-09-2015
12:21 AM

1,474 Views

DC in the CIC-FIR filter result

Hi All,

I have attached a figure showing my filter issue. Please subtract 28 MHz from the x axis values (it was a typo). It is apparent that there is a strong DC peak in the plot. My question is how to reduce the DC to the noise level? This fft result is generated by the following process: Input signal: 28.05 MHz (generated from signal generator) Input sample rate: 160 MHz Output sample rate: 250 KHz NCO frequency: 28 MHz CIC decimation rate: 160 Fir decimation rate: 4 Cutoff frequency (fir filter): 100 KHz The design is doing digital down-conversion for the input signal with total decimation rate 640. First, the mixer generates the baseband I and Q signals, input signal multiplied with cos and (-sin) from NCO. Then the cic filter does decimation by 160 for both baseband I and Q signals. The results of cic filter are sent to the fir filter to perform the cic compensation and decimation by 4. The plot shows the result of fft of (y = I + Q*j). The peak at 50KHz is correct (28.05 MHz on the plot) but the peak on 0 Hz (28MHz) is wrong. Many Thanks, LeeLink Copied

14 Replies

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-09-2015
03:48 AM

73 Views

Looks like you have overlooked dc gain in your system. Most likely your cic filter.

In fact cic filter or fir or mixer must take care of dc. for cic dc gain = (R*M)^N (R = 64 in your case, M is comb stages, N = cascade stages). If dc gain is only due to cic then if (R*M)^N is power of 2 you can discard lsbs to get unity dc gain and so avoid designing division. For fir if sum of coeffs = 1 (normalised) then it is ok otherwise rescale them.
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-13-2015
02:27 AM

73 Views

Hi Kaz,

Thanks a lot for the reply. Lee
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-13-2015
03:02 AM

73 Views

Hi Kaz,

How to reduce DC in the mixer stage? I think my dc is generated from the mixer stage. I checked the baseband I and the 0 frequency is -5 dbm and (+-)50KHz is +66 dbm when the noise level is about -47 dbm. I guess I need to reduce the DC to around noise level. These results are from ModelSim. (Note the digram above is from the FPGA not modelsim). I have discarded 28 bits from the cic output so the DC should be not from cic. The sum of fir coefficient is 4. I will rescale it to 1. Many Thanks, Lee
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-13-2015
08:12 AM

73 Views

You can check dc gain of CIC and FIR by injecting it with step input.

if you can't achieve unity by discarding LSBs then you can rescale FIR to any value compensate for overall gain. Mixer will cause dc if there is power in a frequency that is shifted to dc at mixing. For example if your NCO is at 1MHz then any power in 1MHz (or its multiples) will move to dc (or alias to dc). You wiil then need LPF before mixing.
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-17-2015
06:56 AM

73 Views

Hi Kaz,

Thanks for the comments. I will update you how we actually solved the DC issue next week. Lee
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-20-2015
06:20 AM

73 Views

Hi Kaz,

My DC issue was mainly happening in the mixing. I have attached the matlab plot of my baseband results. The input is 28.05 MHz which is 124 dBm above 28MHz where as the nco 28 MHz cosine/sin is 115 dBm above 28.05MHz. These show that the input and nco sin/cos does not cause major DC. However, in the 16 bit baseband result (i+j*Q), the DC is 1 dBM and the 50KHz peak is 82 dBm. This is a strong DC. Interestingly, in the 32 bit baseband plot, the DC has been reduced to -71dBm. This shows that increase in the baseband bit width reduces the DC significantly. Do you have any idea why? Many Thanks, Lee
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-20-2015
08:15 AM

73 Views

I think you are confused.

dBm has no meaning here, you probably mean dB. Even dB depends on how you see spectrum. Don't worry about these figures. Why you mention nco cosine only? I expect nco to be cos/sin what matters is this: Your input signal is centred at 28.05MHz and is real only I assume. Ok what s your nco frequency? that is the key to any dc. if your nco is -28.05 or +28.05 then you are pushing signal to dc
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-20-2015
11:50 PM

73 Views

Hi Kaz,

NCO's sin and cos frequency is 28MHz. So the baseband signal has a strong peak at 50KHz (28.05 - 28 MHz = 50 KHz). 28.05 MHz Input bit width: 16 bits 28 MHz NCO bit width: 16 bits The 32 bit baseband signal (I+j*Q) shows the relatively small DC. But 16 bit baseband (casting the lower 16 bits) shows very strong DC, as shown in the plot above . Why is that? Many Thanks, Lee
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-21-2015
05:15 AM

73 Views

you should keep the MSBs otherwise you distort the signal. remove 15 LSBs.

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-21-2015
06:38 AM

73 Views

I used 16 MSBs and still got strong DC.

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-21-2015
07:32 AM

73 Views

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-21-2015
11:59 PM

73 Views

Hi Kaz,

I got two major peaks in the 16 bit baseband signal. The main peak is 82 dB at 50 KHz and the second peak is 1 dB of DC whereas the noise level is around -100 dB. This 1dB DC is not acceptable. Once I extended the baseband signal to 32 bits, the DC reduced to -71 dB where as the 50KHz still still the same 82 dB. This reduced DC is what I want. I just have no idea why extending the baseband bit width reducing the DC level. I copied this technique from a project without knowing what is the theory behind it. Lee
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-22-2015
08:07 AM

73 Views

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-23-2015
01:47 AM

73 Views

Thanks for the comments

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.