How Signals Are Sampled and Stored As A Fourier Transform?

In summary,To store signals in a Fourier Transform function, you would start with a table of amplitude values, do an FFT on that table, and use the values in F to compute the function of "x" based on sines and cosines.
  • #1
iScience
466
5
This question is a little basic but.. how are signals stored in a Fourier Transform function f(t)?

In my PDE class we were always given a base function to put in terms of sin and cos. But when taking a bunch of samples, all I end up with is a table/array over some time T. How might I use this to store it in a Fourier Transform function (dft)?
 
Technology news on Phys.org
  • #2
iScience said:
This question is a little basic but.. how are signals stored in a Fourier Transform function f(t)?
Um ... the same way they are stored as anything, Hint: we use a computer.
I have a feeling you want to ask a different question...
 
  • #3
Simon Bridge said:
I have a feeling you want to ask a different question...

Of course, here you go:

In my PDE class we were always given a base function to put in terms of sin and cos. But when taking a bunch of samples, all I end upwith is a table/array over some time T. How might I use this to store it in a Fourier Transform function (dft)?

If you could specify what I could perhaps clarify HERE, in the actual meat of the question, that would be better thanks.
 
  • #4
Let's see if I understand you ... you have sampled a signal - so you have amplitude values at discrete time intervals ... and you want to know how to turn that into it's Fourier transform?
 
  • #5
yyup! I mean the only thing I'm tripped up on is turning that table into a function. I can take a given function and express it with sines and cosines via the Fourier Transform, but I need to know how to turn those amplitude values into a function for me to use the Fourier Transform.
 
  • #6
If the actual signal is f(t), then your sample set is ##\sum_n f_n\delta(t-n\Delta t)## ... so that is what you transform.
Here ##f_n = f(n\Delta t)## and ##\delta(t)## is the Dirac delta function.

You are basically doing a "discrete Fourier transform".What we'd normally do it put the sample series in a vector and use the FFT function.
 
  • #7
iScience said:
yyup! I mean the only thing I'm tripped up on is turning that table into a function. I can take a given function and express it with sines and cosines via the Fourier Transform, but I need to know how to turn those amplitude values into a function for me to use the Fourier Transform.
I think I understand your question differently that Simon has. You're talking about a "table" and you're posting in the "Programming and Computer Science" forum, so I am assuming that we are dealing with Discrete Fourier Transforms.

I presume you started with a table "S" of signal amplitudes.
Then you probably performed (or want to perform) an FFT on that table yielding a new table in the frequency domain "F" (as described by Simon.

For example, in pseudo code:
Code:
int t;
complex S(32), F(32);
for t=0 to 31 {  S = amplitudeFunction(n); }
F = FFT(S);
The value in F can now be used to compute the function of "x" based on sines and cosines as follows:
1) Compute w=2*pi/length(F) = pi/32
2) For n=0 to 31 compute [itex]R_{n} = f_{n} \times (cosine(w)+i \space sine(w)) / length(F)[/itex]
3) S(x) will be the sum of those sine and cosine terms (the Rn's).

Those last steps are basically an inverse Fourier Transform.
Here it is in MatLab:
Code:
function ProblemFFTi()
  ts=[0:31];
  S = AnyFunc(ts);
  F = fft(S,32);
  SB = InvFFT(ts,F);
  ss = SB ./ S;
  ss = SB ./ S;  % A break point here will show that SB and S are equal.
end

function [x] = AnyFunc(t)
  x = ((t-16)/15).^2;
  x(x>1) = 1-x(x>1);
end

function [x] = InvFFT(t,F)
  ln = length(F);
  w0 = 2*pi*transpose(0:(ln-1))/(ln);
  ct = cos(w0*t);
  st = 1i*sin(w0*t);
  x = (F * (ct + st))/ln;
end
 

Related to How Signals Are Sampled and Stored As A Fourier Transform?

1. What is a Fourier Transform?

A Fourier Transform is a mathematical tool used to decompose a signal into its individual frequency components. It converts a signal from the time domain to the frequency domain, allowing us to analyze the signal's frequency content.

2. Why do we need to sample signals?

Sampling signals is necessary because most signals in the real world are continuous, meaning they have an infinite number of data points. By sampling a signal at regular intervals, we can convert it into a discrete signal that can be easily stored and processed.

3. How are signals sampled?

Signals are sampled by using an analog-to-digital converter (ADC). The ADC takes measurements of the signal at regular intervals and converts them into a digital representation that can be stored and processed.

4. What is the Nyquist-Shannon sampling theorem?

The Nyquist-Shannon sampling theorem states that in order to accurately reconstruct a continuous signal from its sampled version, the sampling rate must be at least twice the highest frequency component of the signal. This means that the minimum sampling rate should be equal to twice the highest frequency of the signal.

5. How are signals stored as a Fourier Transform?

The Fourier Transform of a signal is typically stored as a complex-valued array, where each element represents the amplitude and phase of a specific frequency component. The array can then be used to reconstruct the signal in the frequency domain or converted back to the time domain using the inverse Fourier Transform.

Similar threads

  • Programming and Computer Science
Replies
7
Views
3K
  • Differential Equations
Replies
4
Views
2K
  • Topology and Analysis
Replies
7
Views
2K
  • Programming and Computer Science
Replies
2
Views
2K
Replies
26
Views
5K
  • Calculus and Beyond Homework Help
Replies
1
Views
846
  • Calculus and Beyond Homework Help
Replies
3
Views
398
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Electrical Engineering
Replies
4
Views
963
Replies
3
Views
1K
Back
Top