# Discrete Fourier Transform as Memory?

I am looking to ways to store data points in the format $$\left( x, y \right)$$ where $$x$$ goes from $$0$$ to $$255$$, while $$y$$ can be either $$0$$ or $$1$$: (e.g. $$\left[ 0, 1 \right]$$ $$\left[ 1, 1 \right]$$ $$\left[ 2, 0 \right]$$ etc...). See graph below.

This is basically a clock (each "$$x$$" value is one clock cycle) recording when a button was pressed ($$y = 0$$ is button open, $$y = 1$$ is button pressed).

This would be a uC and EEPROM work, but I would like to investigate the possibility of making it simpler.

I recall that a set of point can be represented by a Discrete Fourier Transform (DFT).

Would it be possible to have:

1. an Integrated Circuit (IC) that specifically just calculates DFT coefficients
2. Points $$\left( x, y \right)$$ to be recorded and fed to the IC.
3. IC calculates the DFT Coefficients and stores them in a memory (assuming said coefficient occupy way less than a full data set)
4. When a new point is fed to the IC, this IC "updates" the DFT coefficients so this last point is also represented by the DFT.

I imagine this is impossible/impractical for two reasons:

1. You cannot simply "update" a DFT: you have N points and calculates a DFT from these N points. It would not be possible to have one point and a DFT and just "include" this last point in an already calculated DFT.
2. A dedicated IC for DFT probably is just a uC, so I may as well use any commercial board out there and store data in an EEPROM.

However I would appreciate more details on why this would be impractical.

Thanks

• Regarding the second 1) in your question, you can have a look at the sliding DFT formula (one of the many links here: dsprelated.com/showarticle/776.php) which could be of help. It does exactly you suggest that cannot be done, adds the new data point and gets rid of the oldest one in a sliding manner. Oct 26, 2022 at 22:47
• Why do you want to do this? If you store the data "as is" you just need 1 bit per sample. It doesn't get much better than that. What do you hope to gain from the DFT ? Oct 26, 2022 at 23:41

An $$N$$ point DFT takes $$N$$ input samples and produces $$N$$ output samples… you won’t be saving any memory.