Skip to content Skip to navigation

Connexions

You are here: Home » Content » Program 10: Split-Radix, DIF, One-Butterfly, FFT

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Program 10: Split-Radix, DIF, One-Butterfly, FFT

Module by: C. Sidney Burrus. E-mail the author

Summary: Split-Radix, DIF, One-Butterfly, FFT

Basic DIF Split Radix FFT Algorithm

Below is the Fortran code for a simple Decimation-in-Frequency, Split-Radix, one butterfly FFT to be followed by a bit-reversing unscrambler.

C   A DUHAMEL-HOLLMANN SPLIT RADIX  FFT PROGRAM
C   FROM: ELECTRONICS LETTERS, JAN. 5, 1984
C   COMPLEX INPUT DATA IN ARRAYS X AND Y
C   LENGTH IS  N = 2 ** M
C     C. S. BURRUS, RICE UNIVERSITY, MARCH 1984
C
C---------------------------------------------------------
    SUBROUTINE  FFT (X,Y,N,M)
    REAL X(1), Y(1)
C--------------MAIN FFT LOOPS-----------------------------
C
    N1 = N
    N2 = N/2
    IP = 0
    IS = 1
    A  = 6.283185307179586/N
    DO 10 K = 1, M-1
        JD = N1 + N2
        N1 = N2
        N2 = N2/2
        J0 = N1*IP + 1
        IP = 1 - IP
        DO 20 J = J0, N, JD
            JS = 0
        JT = J + N2 - 1
            DO 30 I = J, JT
            JSS= JS*IS
            JS = JS + 1
                C1 = COS(A*JSS)
                C3 = COS(3*A*JSS)
                S1 = -SIN(A*JSS)
                S3 = -SIN(3*A*JSS)
            I1 = I  + N2
            I2 = I1 + N2
            I3 = I2 + N2
            R1    = X(I ) + X(I2)
            R2    = X(I ) - X(I2)
            R3    = X(I1) - X(I3)
            X(I2) = X(I1) + X(I3)
            X(I1) = R1
C
            R1    = Y(I ) + Y(I2)
            R4    = Y(I ) - Y(I2)
            R5    = Y(I1) - Y(I3)
            Y(I2) = Y(I1) + Y(I3)
            Y(I1) = R1
C
            R1    = R2 - R5
            R2    = R2 + R5
            R5    = R4 + R3
            R4    = R4 - R3
C
            X(I)  = C1*R1 + S1*R5
            Y(I)  = C1*R5 - S1*R1
            X(I3) = C3*R2 + S3*R4
            Y(I3) = C3*R4 - S3*R2
  30            CONTINUE
  20        CONTINUE
        IS = IS + IS
  10    CONTINUE
    IP = 1 - IP
    J0 = 2 - IP
    DO 5 I = J0, N-1, 3
       I1 = I + 1
       R1    = X(I) + X(I1)
       X(I1) = X(I) - X(I1)
       X(I)  = R1
       R1    = Y(I) + Y(I1)
       Y(I1) = Y(I) - Y(I1)
       Y(I)  = R1
   5    CONTINUE
    RETURN
    END

References

    Content actions

    Download module as:

    PDF | EPUB (?)

    What is an EPUB file?

    EPUB is an electronic book format that can be read on a variety of mobile devices.

    Downloading to a reading device

    For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

    | More downloads ...

    Add module to:

    My Favorites (?)

    'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

    | A lens I own (?)

    Definition of a lens

    Lenses

    A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

    What is in a lens?

    Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

    Who can create a lens?

    Any individual member, a community, or a respected organization.

    What are tags? tag icon

    Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

    | External bookmarks