MATLAB Fourier Synthesis: Create Signal from Spectrum

In summary, the conversation discusses how to use Fourier synthesis to recreate a signal from a frequency spectrum. The speaker suggests using an inverse transform, but also mentions potential problems and suggests looking at examples and the manual for assistance. They also mention the possibility of using a discrete cosine transform, but note that it may not work for all signals.
  • #1
Branny12000
16
0
Hi I wanted to check how to do a Fourier synthesis to recreate a signal from a frequency spectrum. So I basically have the frequency spectrum so I have the power of the fundamental frequency and the harmonics. Is there a way I can do a synthesis to create a time signal?
 
Physics news on Phys.org
  • #2
If you have the spectra you should be able to just do an inverse transform (ifft).
There are a few things that can cause problems (read up on the fftshift command in the manual); but it should not be very difficult.

Have a look at some examples in the manual.
 
  • #3
is there are a way I can do it from Fourier synthesis using a version of the code
for i =1:n (N = no of harmonics)
y = y + p(n)*cos(2*pi*n*f*t)

end

where P(n) is the power and f is the fundamental frequency
 
  • #4
Only if the original Fourier transform was done using a discrete cosine transform and the signal had some unusual properties(I think?); the inverse transform fir the cosine transform is as far as I know more complicated than what you have in your program
Hence, I guess the answer is perhaps yes for some signals but not in general.

Have a look at the wiki for discrete cosine transforms if this is really what you need. If your spectra was calculated from the usual FFT you need to use the IFFT function.
 
  • #5


Hello,

Thank you for your question. MATLAB has a built-in function called "ifft" which stands for inverse fast Fourier transform. This function can be used to reconstruct a time signal from a frequency spectrum. The steps to perform a Fourier synthesis using MATLAB are as follows:

1. Create a vector of frequencies corresponding to the frequency spectrum you have. This can be done using the "linspace" function.

2. Use the "ifft" function to perform the inverse Fourier transform on the frequency spectrum. This will give you a complex-valued vector.

3. Take the real part of the complex vector to get the time signal.

4. Plot the time signal using the "plot" function to visualize the reconstructed signal.

It is important to note that the frequency spectrum should be in the form of a complex vector with the first element representing the power of the fundamental frequency and subsequent elements representing the harmonics.

I hope this helps. Best of luck with your Fourier synthesis!
 

1. What is MATLAB Fourier Synthesis?

MATLAB Fourier Synthesis is a tool that allows you to create a signal from a given spectrum using the fast Fourier transform (FFT) algorithm. It is a powerful tool commonly used in signal processing and analysis.

2. How do I use MATLAB Fourier Synthesis to create a signal from a spectrum?

To use MATLAB Fourier Synthesis, you first need to have a spectrum of the signal you want to create. Then, using the FFT algorithm, you can convert the spectrum into a time-domain signal. This can be done by using the ifft function in MATLAB.

3. What type of signals can be created using MATLAB Fourier Synthesis?

MATLAB Fourier Synthesis can be used to create a variety of signals, including continuous-time signals, discrete-time signals, and even digital signals. It is not limited to any specific type of signal and can be used for a wide range of applications.

4. Can I customize the parameters of the signal created using MATLAB Fourier Synthesis?

Yes, you can customize the parameters of the signal created using MATLAB Fourier Synthesis. This includes the frequency, amplitude, and phase of the signal. You can also apply different window functions to the spectrum to modify the signal's shape and characteristics.

5. Is MATLAB Fourier Synthesis difficult to learn?

MATLAB Fourier Synthesis can be complex for beginners, but with some practice and understanding of the FFT algorithm, it can be mastered easily. There are also many online resources and tutorials available to help you learn and use this tool effectively.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
752
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • Electrical Engineering
Replies
4
Views
842
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • General Math
Replies
12
Views
1K
  • Classical Physics
2
Replies
47
Views
2K
Back
Top