SignalProcessing - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Signal Processing : Transforms : SignalProcessing/FFT

SignalProcessing

  

FFT

  

compute forward fast Fourier transform

  

InverseFFT

  

compute inverse fast Fourier transform

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

Calling Sequence

FFT(A)

FFT(A1, A2)

InverseFFT(A)

InverseFFT(A1, A2)

Parameters

A

-

Array of complex numeric values; the signal

A1, A2

-

Arrays of real numeric values corresponding to the real and imaginary parts of the signal

Options

• 

container     : Array or [Array, Array], predefined Array(s) for holding results

• 

inplace       : boolean, specifies that output should overwrite input

• 

normalization : name, type of normalization

Description

• 

The FFT(A) command computes the fast Fourier transform (FFT) of the Array A and returns the result in an Array with datatype complex[8]. With two Array arguments, invoked as FFT(A1, A2), the command interprets A1 and A2 as giving the real and imaginary parts of the input signal, respectively, and returns the result as a sequence of two Arrays with datatype float[8]. These Arrays are the real and imaginary parts of the output signal. For this calling sequence, A1 and A2 must have the same number of elements.

• 

The InverseFFT(A) command computes the inverse fast Fourier transform of the Array A and returns the result in an Array with datatype complex[8]. With two Array arguments, invoked as InverseFFT(A1, A2), the command interprets A1 and A2 as giving the real and imaginary parts of the input signal, respectively, and returns the result as a sequence of two Arrays with datatype float[8]. These Arrays are the real and imaginary parts of the output signal. For this calling sequence, A1 and A2 must have the same number of elements.

• 

Before the code performing the computation runs, the input Array(s) are converted to datatype complex[8] (for the calling sequences with A) or float[8] (for the calling sequences with A1 and A2) if they do not have that datatype already. For this reason, it is most efficient if the input Array(s) have this datatype beforehand.

• 

The number of elements of A must be a power of 2 greater than 2.  If you use FFT on a sample not satisfying this requirement, it will print a warning and use SignalProcessing:-DFT instead; similarly, if you use InverseFFT on such a sample, it will print a warning and use SignalProcessing:-InverseDFT.

• 

The code underlying these commands (in the Intel Integrated Performance Primitives (IPP) library, see software.intel.com/en-us/intel-ipp) does not support Arrays of dimension two or higher directly. However, when called with such an Array, these commands call the FourierTransform or InverseFourierTransform commands in the DiscreteTransforms package instead, which supports Arrays with dimension at most 5. In this case, the container option cannot be used.

  

For more information on Fourier transforms in Maple, including a summarized comparision of SignalProcessing[FFT], SignalProcessing[DFT], and DiscreteTransforms[FourierTransform], see Fourier Transforms in Maple.

• 

The option normalization must be one of the following: none, symmetric or full. If normalization is none, then the FFT is computed without any normalization. If it is symmetric, then the transforms are computed using 1N as the multiplier for both the forward and inverse transforms. If it is full, then 1N is used as the multiplier, where N is the length of A.

• 

If the container=C option is provided, and there is a single rtable argument A, then the results are put into C and C is returned.  In this case, the container C must be an Array having datatype complex[8] and size equal to that of A.

If the container = [C1, C2] option is provided, and there are two rtable arguments A1 and A2, then the results are put into C1 and C2 and they are returned. In this case, C1 and C2 must be Arrays having datatype float[8] and size equal to that of A1.

With this option, no additional memory is allocated to store the result.

• 

If the inplace or inplace=true option is provided, then A or A1 and A2 are overwritten with the results. In this case, the container option is ignored. Furthermore, if A is specified, it must have datatype complex[8], and if A1 and A2 are specified, they must have datatype float[8].

Thread Safety

• 

The SignalProcessing[FFT] and SignalProcessing[InverseFFT] commands are thread-safe as of Maple 17.

• 

For more information on thread safety, see index/threadsafe.

Examples

withSignalProcessing:

aGenerateTone8,1,1π,π:

bFFTa

b0.313389529138124+0.I0.3048683275277190.217855906643110I0.2348618517159140.831602078032569I0.505122513041503+0.841034786000823I0.425332211037795+0.I0.5051225130415030.841034786000823I0.234861851715914+0.831602078032569I0.304868327527719+0.217855906643110I

(1)

cInverseFFTb

c1.000000000000007.6422947495482410-18I0.4161468364414222.7114567558987110-17I0.653643621350037+7.6422947495482410-18I0.960170286323670+1.9249194552698310-17I0.1455000321309777.6422947495482410-18I0.839071530285352+1.5148897038037910-17I0.843853957257652+7.6422947495482410-18I0.1367372214521737.2835240317491710-18I

(2)

Normmapfnormal,ac

0.

(3)

bFFTa,'normalization'='full'

b0.110799930603213+0.I0.1077872308819260.0770236944544431I0.08303620399517600.294015734312827I0.178587777150818+0.297350700197479I0.150377645340946+0.I0.1785877771508180.297350700197479I0.0830362039951760+0.294015734312827I0.107787230881926+0.0770236944544431I

(4)

cInverseFFTb,'normalization'='full'

c0.125000000000000+0.I0.05201835455517781.8819707062066710-19I0.0817054526687546+0.I0.120021285790459+1.6582949115279710-18I0.0181875040163721+0.I0.104883941285669+1.8819707062066710-19I0.105481744657207+0.I0.01709215268152161.6582949115279710-18I

(5)

Normmapfnormal,ac

0.875000000000000000

(6)

A := Array( 1 .. 1024, proc( n )
       local s := 0;
       local m := n;
       while m <> 0 do
           s := s + irem( m, 10, 'm' )^2
       end end, 'datatype' = 'float'[ 8 ] ):

UFFTA&colon;

useplotsindisplaylistplotA&comma;listplotmap&real;&comma;U1..512&comma;listplotmap&Im;&comma;U1..512end use

We can also use the other calling sequence, to get the real and imaginary parts split. In this case, we have to explicitly specify the imaginary part of the input as 0.

zerosArray1..1024&comma;&apos;datatype&apos;&equals;&apos;float&apos;8&colon;

U1&comma;U2FFTA&comma;zeros&colon;

useplotsindisplaylistplotA&comma;listplotU11..512&comma;listplotU21..512end use

Compatibility

• 

The SignalProcessing[FFT] and SignalProcessing[InverseFFT] commands were introduced in Maple 17.

• 

For more information on Maple 17 changes, see Updates in Maple 17.

See Also

DiscreteTransforms[FourierTransform]

fourier_in_maple

SignalProcessing[DCT]

SignalProcessing[DFT]

SignalProcessing[DWT]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam