symmetric vs asymmetric Fourier series

18 views (last 30 days)
Jeff
Jeff on 2 Dec 2017
I have experimental data that in some respect can be modelled by an asymmetric triangle function (1-t) for 0<=t<=1. It is not quite linear as shown in the plots.pdf, but for simplicity sake it can be approximated as such. The attached m-file generates an 8th order Fourier series to fit the asymmetric triangle. It also examines the effect of making the asymmetric triangle symmetric. The frequency content, 2*pi*k/T, for both triangles is still the same. Of course the Fourier coefficients will be different, but it appears the convergence is superior for the symmetric triangle as indicated by the plot fit statistics Rsquared & RMS error.
I could do this with my experimental data by mirroring it about t=0. Is this a bad idea? If I can do the symmetric case I think I can fit the data with much fewer terms. If anyone has experience on these matters I would appreciate your comments.
If you wish to run my scripts, run the FriedlanderFourierSeriesb.m. That routine calls FriedlanderFourierSeries2.m automatically. To toggle between the symmetric vs asymmetric case simply comment out either line 8 or 9 accordingly.

Answers (1)

David Goodmanson
David Goodmanson on 2 Dec 2017
Edited: David Goodmanson on 2 Dec 2017
Hi Jeff, Yes it's a bad idea, assuming that a Friedlander fourier series is just a particular way of obtaining the usual fourier series. Each triangle on its own has the same basic frequency content, but when you chunk them together you lose the abrupt discontinuity at the beginning. That discontinuity has a lot of frequency content, so the fourier coefficients are not at all the same.
Here's an example using a 31 point fft. The two sets of fourier coefficients are normalized to have the same peak value so that the comparison is more obvious. (Don't take the x axis as actual frequencies, it's merely proportional to frequency). Note that the transform of the chunked-together version has a lot less frequency content relative to its peak.
x = -1.5:.1:1.5;
y1 = exp(-x); % one
y1(x<0) = 0;
y2 = exp(-abs(x)); % both of them
z1 = fftshift(fft(ifftshift(y1)));
z2 = fftshift(fft(ifftshift(y2)));
z1norm = abs(z1)/max(abs(z1));
z2norm = abs(z2)/max(abs(z2));
plot(x,z1norm,'o',x,z2norm,'o')
legend('one','both')
  8 Comments
Jeff
Jeff on 6 Dec 2017
OK, you are talking about the magnitude of the Fourier coefficients & their rate of reduction in magnitude with frequency?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!