Jump to content

Yannick

Members
  • Posts

    20
  • Joined

  • Last visited

Posts posted by Yannick

  1. 34 minutes ago, D@n said:

    Not quite sure what problem you are having as the plots look good from here.  (I can't read the scale, though, on those images ...)

    1. In chart one, you create two 100 kHz signals and multiply them together.  That will create a signal near DC, and a signal at 200 kHz.  200kHz is significantly above your filter cutoff, so ... it's gone.  That leaves you with the signal near DC.  (I assume you are sampling in the MHz range still ...)  The fact that the signal near DC is not constant could be just a transient effect of your filter ... from here and with no more details I can't tell.
    2. In the second chart, the two 20kHz signals multiplied together create a signal at 40 kHz and one near zero again.  (If this doesn't make sense, work the double angle trig formulas and it should)  The 40kHz signal component is quite obvious on the chart.  Since 40kHz is below your cutoff, it passes right through without a problem.  You can also see an initial startup transient, much like I would expect.

    @D@n

     

    I am totally agree with your explanations and the simulation shows exactly what I was expecting, of course. 

     

    34 minutes ago, D@n said:

    Going back to your explanation above, I'm not sure it makes sense.  Ignoring the fixed point issues, a DDS should produce a sinewave between -1 and 1, not -1/2 and 1/2. 

    Yes, I believed that it was between -1 and 1 but when I read this (picture 1), I made the conclusion of the [-1/2 ; 1/2] range. I'm probably totally wrong (probably a misunderstanding as english is not my native language as you probably guessed ^^). 

     

    34 minutes ago, D@n said:

    If your coefficients have 2N bits each, your result goes from 2N to 4N bits, etc.

    My coefficients have 16 bits and the result of the multiplication as well, however the output width calculated by the FIR is 36 bits (picture 2) and finally, 40 bits as it is shown in the previous pictures of simulations (as it has to be a multiple of 8 if I well understood).

     

    My main question was how to interpret this 40 bits vector, so if I  follow your reasoning, in the first case where the signal is filtered, the amplitude of the output near DC is 0 ? 

    Besides, why do I have negative values with this 40bits vector ? 

    amplitude mode.png

    32 bits.png

  2. @D@n,

    Okay, I understand some points ! But, I'm not sure to have well understood how to know the amplitude of the filter output.

    In the both cases here, I have 2 sine wave generated by a DDS, in unit circle mode which means, the range is [-0.5 ; 0.5]. Then, the two signals are multiplied. It gives me the signal called "result" with a [0 ; 1] range. Finally, this signal is low pass filtered (cut off frequency of the filter is 100 kHz) and I obtain this value on 40 bits which I don't understand. I don't know how to interpret it. 

    Picture 1 : the 2 sine waves have a frequency of 100 kHz each

    Picture 2 : the 2 sine waves have a frequency of 20 kHz each

    100.png

    20.png

  3. Hello,

    I'm building this filter, generating a .COE file in Matlab, which I use in the FIR compiler IP. Here are two screenshots of the settings. Do you know if the difference between the two pictures, in terms of magnitude, are just a displaying fact or if there is a real amlpification involved by the FIR compiler ? If it's the case, do you know how to fix it to generate the same filter as I designed in Matlab, so without gain ? 

    Kind regards, 

     

    Yannick

     

     

    Matlab filter.png

    vivado filter.png

×
×
  • Create New...