(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
This project consists primarily of a MATLAB function and complementary Java application. Its objective is to demonstrate the ability of Fourier Series to approximate an arbitrary data set, with increasing precision, and to show the convergence of the Fourier approximation onto the original data. The result is an interactive set of programs which illustrate this convergence geometrically with discrete parametric equations. Users can select a set of two signals, (x(t), y(t)), which are steadily reconstructed using more and more terms of their Fourier Series and displayed graphically via MATLAB.<br />
 
This project consists primarily of a MATLAB function and complementary Java application. Its objective is to demonstrate the ability of Fourier Series to approximate an arbitrary data set, with increasing precision, and to show the convergence of the Fourier approximation onto the original data. The result is an interactive set of programs which illustrate this convergence geometrically with discrete parametric equations. Users can select a set of two signals, (x(t), y(t)), which are steadily reconstructed using more and more terms of their Fourier Series and displayed graphically via MATLAB.<br />
  
[[File:9terms.png|350px]] [[File:33terms.png|350px]] [[File:1251terms.PNG|350px]]<br />
+
[[File:9terms.png|350px| 9 terms]] [[File:33terms.png|350px|33 terms]] [[File:1251terms.PNG|350px| 1251 terms]]<br />
 
Full video: [[Media:Hummingbird.avi|Hummingbird.avi]]<br />
 
Full video: [[Media:Hummingbird.avi|Hummingbird.avi]]<br />
  
Line 10: Line 10:
 
* Computes the discrete Fourier Series coefficients (a<sub>1</sub> through a<sub>N</sub>) for X(t) and Y(t)
 
* Computes the discrete Fourier Series coefficients (a<sub>1</sub> through a<sub>N</sub>) for X(t) and Y(t)
 
* Begins reconstructing both X(t) and Y(t) using only a<sub>0</sub>, then adds the a<sub>-1</sub> and a<sub>1</sub> complex exponential terms as a pair
 
* Begins reconstructing both X(t) and Y(t) using only a<sub>0</sub>, then adds the a<sub>-1</sub> and a<sub>1</sub> complex exponential terms as a pair
* a<sub>-i</sub> and a<sub>i</sub> terms are added in pairs for 1 ≤ i ≤ floor((N - 1) / 2).
+
* Adds the a<sub>-i</sub> and a<sub>i</sub> terms in pairs for 1 ≤ i ≤ floor((N - 1) / 2).
* if N even, a<sub>N / 2</sub> term is added at the end
+
* if N even, adds the a<sub>N / 2</sub> term at the end
* approximations are periodically graphed, and graphs are compiled into a video, which is displayed onscreen (and saved)
+
* periodically graphs approximations and compiles them into a video, which is displayed onscreen (and saved)
  
The Java Application allows the user to create graphical parametric datasets and save them for use with the MATLAB script. Its use is fairly straightforward.
+
The Java Application allows the user to create graphical parametric data sets and save them for use with the MATLAB script. Its use is fairly straightforward. If desired, the user may select an image to "trace" in a parametric data set, or simply construct one on white space.<br />
 +
 
 +
[[File:PdgInAction.PNG|400px| Parametric Data Set Generator in action]]<br />
 +
 
 +
General Directions:
 +
* Launch the Java .jar file
 +
* Input a parametric data set (draw a cool picture!)
 +
* save the data as a .csv
 +
* update the .csv and the .avi filenames in the ECE301RunPFSCV.m script; if the data set you entered was periodic (you connected the first and last points), set 'periodicity' to 1. Otherwise, set it to 0.
 +
* (in MATLAB) Run the script! That's it!
 +
 
 +
You will need: [[File:FSCBPallen388.zip]]
 +
 
 +
Notes: you will likely need to move the files in the .zip file into a new folder before running any of them. The MATLAB files run nicely in R2017b, and the Java Application was built for Java 10.0.1.
  
 
[[2018_Fall_ECE_301_Boutin | Back to ECE 301, Fall 2018]]
 
[[2018_Fall_ECE_301_Boutin | Back to ECE 301, Fall 2018]]

Latest revision as of 22:36, 11 November 2018

Convergence of Parametric Fourier Series Approximations

Author: Stone Allen

This project consists primarily of a MATLAB function and complementary Java application. Its objective is to demonstrate the ability of Fourier Series to approximate an arbitrary data set, with increasing precision, and to show the convergence of the Fourier approximation onto the original data. The result is an interactive set of programs which illustrate this convergence geometrically with discrete parametric equations. Users can select a set of two signals, (x(t), y(t)), which are steadily reconstructed using more and more terms of their Fourier Series and displayed graphically via MATLAB.

9 terms 33 terms 1251 terms
Full video: Hummingbird.avi

The MATLAB function performs the following:

  • Computes the discrete Fourier Series coefficients (a1 through aN) for X(t) and Y(t)
  • Begins reconstructing both X(t) and Y(t) using only a0, then adds the a-1 and a1 complex exponential terms as a pair
  • Adds the a-i and ai terms in pairs for 1 ≤ i ≤ floor((N - 1) / 2).
  • if N even, adds the aN / 2 term at the end
  • periodically graphs approximations and compiles them into a video, which is displayed onscreen (and saved)

The Java Application allows the user to create graphical parametric data sets and save them for use with the MATLAB script. Its use is fairly straightforward. If desired, the user may select an image to "trace" in a parametric data set, or simply construct one on white space.

Parametric Data Set Generator in action

General Directions:

  • Launch the Java .jar file
  • Input a parametric data set (draw a cool picture!)
  • save the data as a .csv
  • update the .csv and the .avi filenames in the ECE301RunPFSCV.m script; if the data set you entered was periodic (you connected the first and last points), set 'periodicity' to 1. Otherwise, set it to 0.
  • (in MATLAB) Run the script! That's it!

You will need: File:FSCBPallen388.zip

Notes: you will likely need to move the files in the .zip file into a new folder before running any of them. The MATLAB files run nicely in R2017b, and the Java Application was built for Java 10.0.1.

Back to ECE 301, Fall 2018

Alumni Liaison

Questions/answers with a recent ECE grad

Ryne Rayburn