UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
923 Views
Registered: ‎10-16-2018

FIR compiler stopband

Jump to solution

Hi ,

According to the Tfilter tool paramters (first attached picture) and the frequncy response of FIR IP core (second attached picture) the passband is : 16 kHz to 17 kHz, and stopband1 is: 0 to 15.5 kHz and stopband2 is: 17.5 kHz to 24 kHz .   

I tested (simulated) the filter with 16 kHz , 24 kHz , 64 kHz, 500 kHz, and 1000 kHz. The simulation results are shown below respectively. 16kHz_35dB.JPG16 kHz

 

24kHz_35dB.JPG24 kHz

 

64kHz_35dB.JPG64 kHz

 

500kHz_35dB.JPG500 kHz

 

1000kHz_35dB.JPG1000 kHz

 

I noticed there is no attenuation in each of 24 kHz, 64 kHz !!!

While 500 kHz, 1000 kHz appeared attenuated.

The question is: why the FIR filter doesn't attenuate the frequencies that are loccated in the stopband?

Note :in each attached picture the first sinwave is the input to the FIR Filter, while the second one is the output (filtered). 

Thanks.

Tags (1)
Filter_parameters_T2.JPG
freq_response_FIR_IP.JPG
TheDesign.JPG
0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
616 Views
Registered: ‎10-16-2018

Re: FIR compiler stopband

Jump to solution

Because of continous follow up and analyzing from @bruce_karaffa , @nmanitri  to my issues with FIR on this thread  , I succeeded to reject the frequencies in the stopband .

As shown below passing 16 kHz:

 passing_16kHz.JPG16 kHz

And below rejecting 24 kHz :rejecting_24kHzb.JPG24 kHz

But one more question. Why at the begining some cycles appeared (circled by red) then the FIR beahve as expected ?

Thanks.

View solution in original post

0 Kudos
11 Replies
900 Views
Registered: ‎06-21-2017

Re: FIR compiler stopband

Jump to solution

Can you post the complete set up of both the FIR filter and the DDS?

Explorer
Explorer
894 Views
Registered: ‎10-16-2018

Re: FIR compiler stopband

Jump to solution

Hi @bruce_karaffa ,

Kindly, see the attached pictures below, for DDS compiler.DDS1.JPGDDS1

 

DDS2.JPGDDS2

 

DDS3.JPGDDS3

 

DDS3b.JPGDDS3b

 

DDS4.JPGDDS4

 

DDS5.JPG

Thank you for your follow up.

Tags (1)
0 Kudos
Explorer
Explorer
890 Views
Registered: ‎10-16-2018

Re: FIR compiler stopband

Jump to solution

Hi @bruce_karaffa ,

Kindly see the attached pictures below, for FIR complier.

 

FIR1.JPG
FIR2.JPG
FIR3.JPG
FIR3b.JPG
FIR4.JPG
FIR4b.JPG
0 Kudos
Explorer
Explorer
886 Views
Registered: ‎10-16-2018

Re: FIR compiler stopband

Jump to solution

Hi @bruce_karaffa ,

Kindly, 

the attached pictures are the complement of FIR compiler settings screen shots.

I am gratefull for you.

FIR5.JPG
FIR5b.JPG
FIR6.JPG
0 Kudos
Highlighted
848 Views
Registered: ‎06-21-2017

Re: FIR compiler stopband

Jump to solution

The DDS configuration is a part of the problem.  You have generating both a SINE and a COSINE.  The two signals are concatenated in the tdata output.  According to the DDS Compiler Product Guide, your DDS configuration has six bits of sine wave sign extended to 8 bits in the upper byte, and 6 bits of cosine sign extended to 8 bits in the lower byte.  You should be producing only one of the two, either a sine or a cosine if you want a clean output in this application.  If you want to produce both, split the output at the byte boundary and send each separately to different filters. 

On a separate note, six bits won't produce a very clean sine wave.  You will only get about 35 dB of dynamic range.  For most cases, you will want to use more bits.  Your filter has a 16 bit input.  Why not set the DDS to produce a 16 bit sinusiod?

Explorer
Explorer
822 Views
Registered: ‎10-16-2018

Re: FIR compiler stopband

Jump to solution

Hi @bruce_karaffa ,

Thank you for your notes. 

I tested my DDSs with sine output only, and the result of FIR filters were a bit better. As shown below:

 16kHz_35dB.JPG16 kHz

 

24kHz_35dB.JPG24 kHz

 

500kHz_35dB.JPG64 kHz

 

500kHz_35dB.JPG500 kHz

 

1000kHz_35dB.JPG

 

On the other side, I need to work with 35 dB SFDR, in order to reduce the harmonics in my system design (Frequency Hopping system). I tested my hops with 45 dB SFDR and the output of the FIR was much better as shown below:0_16kHz_45dB.JPG16 kHz

At the current time I am trying to receive my Frequency Hops using FIRs filters, but until know I don't know why the stopband is not stopping the undesired frequncies !!

Any more ideas and notes ? I am really interested in your replies .

Thanks.

 

0 Kudos
Explorer
Explorer
708 Views
Registered: ‎10-16-2018

Re: FIR compiler stopband

Jump to solution

Hi @bruce_karaffa ,

In order to control TVALID, I built my own impulse generator IP core . I run a simulation for the new design (attached) . But I don't know how to veiw the impulse response of the FIR filter using this impulse generator:

---------------------------------------------------------------------------------- 
-- Engineer: Ahmed Alfadhel
-- 
-- Create Date: 06/19/2019 09:46:48 PM
-- Design Name: 
-- Module Name: Impulse - Behavioral
-- Project Name: 
-- Target Devices: 
-- Tool Versions: 
-- Description: Clk = 200 MHz
-- 
-- Dependencies: 
-- 
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
-- 
----------------------------------------------------------------------------------


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.all;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx leaf cells in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity Impulse is
    Port ( clk : in STD_LOGIC;
           impulse_data : out STD_LOGIC_VECTOR (7 downto 0);
           Valid : out STD_LOGIC;
           Ready : in STD_LOGIC);
end Impulse;

architecture Behavioral of Impulse is

signal o_impulse    : std_logic_vector(7 downto 0) := X"00";
signal s_Valid    : std_logic := '0';
constant maxcount  : integer := 4000;

begin
   impulse_data <= o_impulse;
   Valid <= s_Valid;
   LFSR_proc: process(clk)
   
    variable counter: unsigned(14 downto 0) := to_unsigned(0, 15);
    
   begin
     if(rising_edge(clk)) then
        
        counter := counter +1;
        
          if (counter = maxcount) then
            o_impulse <= X"40";
            s_Valid <= '1';
            counter := (others => '0');
          else
            o_impulse <= X"00";
            s_Valid <= '0';
          end if;
     end if;
   end process LFSR_proc;

end Behavioral;

I attached the screen shots for the simulation. The second screen shot is just a zoom out  for the first one.

Kindly, could you plz, instruct me about how to view the impulse response for the FIR filter I am using.

Thanks,

simulation3fir.JPG
simulation4fir.JPG
Sys_design.JPG
0 Kudos
Explorer
Explorer
705 Views
Registered: ‎10-16-2018

Re: FIR compiler stopband

Jump to solution

Hi @bruce_karaffa ,

Previously, I viewed the impulse response on TFilter website.

I attached a snapshot for it.

Thanks.

 

Tfilter_Impulse Response.JPG
0 Kudos
688 Views
Registered: ‎06-21-2017

Re: FIR compiler stopband

Jump to solution

If you have a153 tap filter, you need to clock 153 samples through it to see the entire impulse response, one full scale value and the rest zeros.  This must be done when the filter is ready to accept data.  If you aren't using the filter's tready signal, you need to be sure to only shift a new sample into the filter at the sample rate you designed the filter for.  You will need to feed in zeroes at the 48 KHz rate and simulate for about 3.2 mS.  Long simulations are a drawback to low sample rate filters. 

Explorer
Explorer
617 Views
Registered: ‎10-16-2018

Re: FIR compiler stopband

Jump to solution

Because of continous follow up and analyzing from @bruce_karaffa , @nmanitri  to my issues with FIR on this thread  , I succeeded to reject the frequencies in the stopband .

As shown below passing 16 kHz:

 passing_16kHz.JPG16 kHz

And below rejecting 24 kHz :rejecting_24kHzb.JPG24 kHz

But one more question. Why at the begining some cycles appeared (circled by red) then the FIR beahve as expected ?

Thanks.

View solution in original post

0 Kudos
Scholar dgisselq
Scholar
603 Views
Registered: ‎05-21-2015

Re: FIR compiler stopband

Jump to solution

@ahmed_alfadhel,

This is called a "transient".  Transients tend to have a high bandwidth.  The filter, which only operates at or near a given frequency, cannot eliminate all transients.

As a classic example, consider if your sine wave suddenly went from a constant zero to full amplitude, and ever after that looked like the sine wave you wanted.  This would create frequency content all across the spectra.  A filter will only filter out of this extraneous content the frequency it was designed to get--not all of the effects of the transient.

Dan