FFT Example: 1D Signal | Teradata Vantage - FFT Example: 1D Signal - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

In this example, the signal is one-dimensional (1D).

Input

InputTable: fft_input
id1 timestep value1
1 1 1
2 1 2
2 2 3
3 1 4
3 2 5
3 3 6
3 4 7

SQL Call

CREATE MULTISET TABLE fft_output_1 AS (
  SELECT * FROM FFT (
    ON fft_input AS InputTable PARTITION BY id1 ORDER BY timestep
    USING
    TargetColumns ('value1')
  ) AS dt
) WITH DATA;

Output

The first row represents the input sequence of length one. Its FFT is the single value in the sequence (1).

The second and third rows represent the input sequence of length two. Its FFT has only real values.

The final four rows represent the input sequence of length four. Its FFT has conjugal symmetry.

SELECT * FROM fft_output_1;
 id_0 timestep real_value1         imag_value1 
 ---- -------- ------------------- ----------- 
    3        3                -2.0         0.0
    3        2                -2.0         2.0
    3        4 -1.9999999999999998        -2.0
    3        1                22.0         0.0
    1        1                 1.0         0.0
    2        2                -1.0         0.0
    2        1                 5.0         0.0

Download a zip file of all examples and a SQL script file that creates their input tables.