0
$\begingroup$

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

Data set example

$\endgroup$
2
  • $\begingroup$ 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. $\endgroup$
    – ZaellixA
    Oct 26, 2022 at 22:47
  • 3
    $\begingroup$ 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 ? $\endgroup$
    – Hilmar
    Oct 26, 2022 at 23:41

1 Answer 1

2
$\begingroup$

Granted I've never heard about using the DFT as a data compression tool, I don’t see how it would benefit you:

If you need to retrieve the data somehow, you need a DFT (at least) the size of your input data.
An $N$ point DFT takes $N$ input samples and produces $N$ output samples… you won’t be saving any memory.

Arguably you will even add to the load since your input data is binary and the DFT output won’t be.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.