14
An algorithm for interpolate discrete time signals Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 1 Bertalan Csanádi ÓE KVK HTI E-mail: [email protected]

An Algorithm for Interpolate Discrete Time Signals

Embed Size (px)

Citation preview

Page 1: An Algorithm for Interpolate Discrete Time Signals

An algorithm for interpolate discrete time signals

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 1

Bertalan CsanádiÓE – KVK – HTI

E-mail: [email protected]

Page 2: An Algorithm for Interpolate Discrete Time Signals

Short introduction

Sometimes the right sampling frequency is not enough for the offline or post processing, that needs a resample or an interpolation for the measurements or simulating

Sometimes the sample number is under the necessary limit

Example:

Some FM radio simulation need at least 2,1MHz sampled audio signal

In the field of the studiotechnic some audio is sampled in 44,1KHz and audio from other source is sampled in 192KHz and the problem is to editthis two sinal in one time line

Cs.B. Harmonic interpolation, Budapest, 2010. november 4. 2

Page 3: An Algorithm for Interpolate Discrete Time Signals

Sampling theorem

Main is the Nyquist-Shannon law, which says the sampling frequency must have two times greater than the highest harmonic member of the input signal

That means, the gate opener signals first harmonic is two times greater than the sampled signal

But this is not the all, it also means that if choose a right sampling frequency, and use a right anti-aliasing filter, the sampled data frequency members are harmonic

Now if we have a method to transform signals to the frequency field, do the steps and transform back, than we get the full harmonic interpolation of the original signal

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 3

Page 4: An Algorithm for Interpolate Discrete Time Signals

Continuous and discrete Fourier transformation

Continuous Fourier transform

Discrete Fourier transform

Fast Discrete Fourier Transform

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 4

Page 5: An Algorithm for Interpolate Discrete Time Signals

Multidimensional Fourier transform

Method

On the original matrices do the transform by rows and do it by the columns to.

Input matrix X;

Y = fft(X);

Y = fft(Y’);

Results

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 5

Page 6: An Algorithm for Interpolate Discrete Time Signals

The algorithm

Input array x;

Output array y;

<y greater than x>

X = fft(x)/lenght(x);

Y(0..(lenght(X)/2)) = X(0..(lenght(X)/2));

Y((lenght(Y)-lenght(X)/2)..(lenght(Y))=X((lenght(X)/2)..(lenght(X)));

y = ifft(Y)*lenght(Y);

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 6

Page 7: An Algorithm for Interpolate Discrete Time Signals

Results in vectors

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 7

Page 8: An Algorithm for Interpolate Discrete Time Signals

Results in vectors

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 8

Page 9: An Algorithm for Interpolate Discrete Time Signals

Results in vectors

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 9

Page 10: An Algorithm for Interpolate Discrete Time Signals

Results in matrices

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 10

Page 11: An Algorithm for Interpolate Discrete Time Signals

Results in matrices

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 11

Page 12: An Algorithm for Interpolate Discrete Time Signals

Results in matrices

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 12

Page 13: An Algorithm for Interpolate Discrete Time Signals

References

Numerical Recipes The art of scientific computing, third edition, William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery

ISBN: 978-0-521-88068-8

Mathworks Matlab Online Help

www.Mathworks.com

Matlab Central

www.mathworks.com/matlabcentral

Cs.B. Harmonic interpolation, Budapest, 2010. november 4.. 13

Page 14: An Algorithm for Interpolate Discrete Time Signals

Thanks for Your attention!

14Cs.B. Harmonic interpolation, Budapest, 2010. november 4..

Bertalan Csanádi([email protected])