Home › Forums › Bug Reports › FFT works, DFT not

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9287
    MarioK
    Participant

      There seems to be an issue regarding the DFT.

      #9295
      Max1499
      Participant

        Hello Mario,

        I assume you do not like the edged shape of the graph in the lower diagram. Obviously, uSimmics choses sampling frequency for the time2freq-function only depending on simulation stepwidth, as the automatically created maximum frequency value of the diagram is 1/2*stepwidth but rise and fall time of the source signal have no influence. Hence, the user has to chose the stepwidth small enough so that Nyquist’s theorem is not violated.
        In your second example the stepwidth of the simulation is 2.5ns but rise and fall time of the pulse are smaller (1ns and 2ns). If you decrease the stepwidth to 1ns (=500000 points) then you get the expected result. The rough upper side and lower side of the graph are purely graphical artefacts due to the high density of points.
        The fact that the value of 262144 yields a smooth graph in your first example is only an unfortunate coincidence.

        #9296
        MarioK
        Participant

          Hello Max,

          thanks for the feedback. I slightly changed my example. Made the edges factor 1000 slower. Then again, did the FFT, which means a power-of-two amount of data points, followed by a DFT with only one point more (or less). Result is the same Behavior. Instead of 2^18 points feel free to try 2^17 or 2^19 points and afterwards one point more or less. This is no problem in the stepsize you choose. You can also try to compare to spice results. The common spice derivatives do nothing else than resampling the timesignal to a given amount of datapoints in equidistant steps before computing the FFT or DFT.

          #9297
          MarioK
          Participant

            (Accidently simulated the customized setup in v.5.8. Just checked using 5.9. –> nothing changed.)

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.