Using Matlab's fft function

Поділитися
Вставка
  • Опубліковано 13 чер 2012
  • Explains how to interpret the values returned by matlabs fft function for well defined signals.
    Notes on the DFT is available at pzdsp.com/docs/
    The fft is an efficient implementation of the DFT discrete fourier Transform. For more tutorials on the DFT and FFT see • Video

КОМЕНТАРІ • 168

  • @jitendraitankar
    @jitendraitankar 10 років тому +38

    Thanks for the selfless service. It's helping many university students and research scholars around the globe.May God be with you all the way.Also, long live youtube and google.

  • @blink1747
    @blink1747 7 років тому +1

    Thanks David. I have watched this for four at different times. Yours help me visualise the frequencies. Keep the work going!

  • @taz3592
    @taz3592 3 роки тому +4

    This is a great tutorial on fft! I've watched it a few times over the years.

  • @Bananaramaslamma
    @Bananaramaslamma 11 років тому +2

    This has helped me advance my work on my thesis. Thank you so much!

  • @sibolivar
    @sibolivar 7 років тому +1

    You really did a wonderful job explaining this most complicated concept. Thank you.

  • @everythingengineeringwithk9461
    @everythingengineeringwithk9461 3 роки тому +1

    your videos are so helpful. I literally learned signal processing here.

  • @meeei85
    @meeei85 7 років тому +1

    Hi, thank you for your presentation. I have one question. What are the effects of sampling frequency on FFT?

  • @ddorran
    @ddorran  10 років тому +23

    f_hertz = bin_num/N*fs
    N = number of samples in the signal being analysed by the DFT
    fs = sampling frequency

    • @chrisschuller7055
      @chrisschuller7055 3 роки тому +1

      Actually f_hertz = (bin_num-1)/N*fs because Matlab's index starts at 1 (so index 1 corresponds to frequency f_hertz = 0)

  • @user-ge3ci4go7b
    @user-ge3ci4go7b 7 років тому

    Thanks! It's really useful! You've changed my life!

  • @ahmedgaafar5369
    @ahmedgaafar5369 3 роки тому

    thanks Dave for all the excellent videos you published, great contents and pleasure to hear your english accent as well.
    happy New Year.

  • @apbalaraju
    @apbalaraju 5 років тому +1

    Excellent explanation David Dorran sir.very helpful to me as a DSP Teacher. Thanks a lot

  • @cancinicincon
    @cancinicincon 10 років тому

    Thanks for the easy to understand video. May the force be with you!

  • @MattRidzonPE
    @MattRidzonPE 5 років тому +3

    Great video! Can you explain what the sampling frequency is? I am taking the FFT of my signal. The time domain data is 1 cycle and lasts 0.69 seconds long. So does that mean my sampling frequency is 1 / 0.69?

  • @rsa4510
    @rsa4510 6 років тому +1

    Great explanation. I really like the way you build the case for each step. I was able to follow pretty much all of the video. Thank you. I was wondering if by default the Matlab fft function would give the same answer if I was to use a flat top window (flattopwin)? In other words, is there a default window assumed in the fft function? I find windowing to be a bit confusing at this point, but I am always wondering if I need one.

  • @otsilekgaladua5485
    @otsilekgaladua5485 8 років тому +2

    thank you so much for making all the things clear to me. i read a lot of material but i couldnt really understand the idea of ffts and abs. You video helped me a lot more especially the relationship between the Bins and the freq. much much appreciated

    • @ddorran
      @ddorran  8 років тому

      +kutlo kgaladua Glad it helped. Nice to hear this feedback.

    • @otsilekgaladua5485
      @otsilekgaladua5485 8 років тому

      David Dorran hey David. do you have a video on the Goertzel algorithm?

  • @ganeshsasidharan5278
    @ganeshsasidharan5278 8 років тому

    Hello David
    Thank you for quick response
    I need to find the frequency without any leakage for a wav file like a piano wave file all the key frequency pressed using fft or any other code
    Thanks

  • @gangadharvenkataramanap7651
    @gangadharvenkataramanap7651 5 років тому

    Thank you so much, Sir. I have tried the same program what you explained, but I have used the 'sin' instead of 'cos' to get the time domain amplitudes (small x). Every thing is good except the phase shift is not matching. Could you please help me, I want to know where I made wrong.

  • @mehranhosseinzadeh8072
    @mehranhosseinzadeh8072 8 років тому

    You literally saved me. Many thanks

  • @m.a.k.8618
    @m.a.k.8618 7 років тому

    thank you ,that really helped me a lot, keep up the good work .

  • @Hurricoaster
    @Hurricoaster 8 років тому +2

    Great explanation!

  • @MrSteniorod
    @MrSteniorod 9 років тому

    Excellent video !! Solved most of my doubts

  • @lllniu
    @lllniu 12 років тому

    clear and straight forward,very helpful.it'll be great if any DC component involved.

  • @xicao1500
    @xicao1500 10 років тому

    Pretty sweet video man, thanks!

  • @kingsleylow1085
    @kingsleylow1085 6 років тому

    Hi David, very nice explanation. Appreciate a lot

  • @awjoybonik818
    @awjoybonik818 7 років тому

    Thank you very much for your knowledgeable video. I am working on EMG signal . I made a device which taking EMG signal from human body. The signal I took looks like good. But I don't know how to get frequency of this signal. I have ADC,sampling time,total sample and also used fft to get frequency. But its giving 0.03 Hz (Aprx.) which seems to me not correct. Because EMG signal frequency range is around 5-450 hz. So my question is do I need to change ADC or any other things thats give me correct frequency?

  • @KuanKevin
    @KuanKevin 10 років тому

    Thanks a lot! Very Clear! Good Teaching!

  • @CobraUniverse
    @CobraUniverse 11 років тому

    Hi David, this tutorial is very helpful. Thanks so much. I do have an enquiry. I am processing trajectory data (much like accelerometer data) from a patient who has neurological tremor. My data set consist of 2048 data points collected at 250Hz. I followed the tutorial but I do not know get the dominant frequency of the tremor. Would the solution be to convert the bins to Hz? If so, how do I go about doing so? Thanks again.

  • @bertmartin8463
    @bertmartin8463 10 років тому

    that was great and it worked perfectly :) the only thing is that it gives a value for the peak_val (eg.8.8012e+003) but the peak_location always appear to be 1, is there any way i could change this to get values because i need the height of the peak and the time at which it occured. Thanks again

  • @lebronicify
    @lebronicify 9 років тому +2

    Thanks, Do you know how to analyse non-stationary signals where the frequency changes with time? FFT doesn't seem to work with me or at least using it in the same way doesn't make any progress.

    • @ddorran
      @ddorran  9 років тому +1

      One approach is to segment the signal into frames and analyse each frame using the fft. There are issues related to frequency resolution in doing this but this process would be my starting point.
      ua-cam.com/video/wpXtsRpaLOA/v-deo.html - frame analysis
      ua-cam.com/video/eg8eebQPfAo/v-deo.html - frequency resolution

  • @eliseomelendez3504
    @eliseomelendez3504 7 років тому

    Does the magnitudes corresponds to the coefficients of the fft of that function?? Thank you in advance!!

  • @ryankang562
    @ryankang562 6 років тому

    wow best explanation on the internet

  • @LeBernardoapc
    @LeBernardoapc 5 років тому

    Hello David,
    I am conducting a series of tests with wave propagation but am now having some difficulties! I have a .csv with the information regarding the waveform (time, channelA [mV], channelB [mV]) and I need to know the dominant frequency of that wave. My problem with using the FFT to figure this out is that I don't have the wave function required in this tutorial neither the Frequency Sample (fs) because the trigger is a spring with a hardened point which contacts with the rock sample.
    Do you think you can help me?

  • @SergeyGorbikov
    @SergeyGorbikov 8 років тому

    you are my savior, thanks a lot

  • @LeBernardoapc
    @LeBernardoapc 5 років тому

    Hello David,
    I am conducting a series of tests with wave propagation but am now having some difficulties! I have a .csv with the information regarding the waveform (time, channelA [mV], channelB [mV]) and I need to know the dominant frequency of that wave. My problem with using the FFT to figure this out is that I don't have the wave function required in this tutorial neither the Frequency Sample (FS) mentioned in other tutorials because the trigger is a spring with a hardened point which contacts with the rock sample.
    Do you think you can help me?

  • @omegatechhd8332
    @omegatechhd8332 4 роки тому +1

    Thanks so much! You saved me!

  • @joselucascordeiro3083
    @joselucascordeiro3083 9 років тому +2

    Hello Dr.David.,
    I'd like to ask you the following: How do i get, via code in matLab, not via users analysis , the correspondent frequency of the amplitudes ploted?
    Thank You Very Much for the Atention,
    José Lucas

    • @ddorran
      @ddorran  9 років тому

      Jose Lucas Cordeiro This video might help ua-cam.com/video/tvrweDqrLSg/v-deo.html

  • @takatsomolekane7866
    @takatsomolekane7866 8 років тому +1

    Very helpful.
    Thank you for sharing.

  • @Mantroglodyte
    @Mantroglodyte 8 років тому

    Really wonderful explanation. Thanks for making this. I wonder if you could go on to explain how to change with window settings to give different amounts of bins when you plot the power.

    • @ddorran
      @ddorran  8 років тому

      Does the following video link help? ua-cam.com/video/2IkdNsGQgEM/v-deo.html

  • @khammassi.montassar-5781
    @khammassi.montassar-5781 7 років тому

    Thank you for this awsome video!!!! it was really helpfull

  • @ddorran
    @ddorran  11 років тому

    you would get a plot of the phase spectrum i.e. the phase values associated with each frequency bin.

  • @SchmidtKaiser97
    @SchmidtKaiser97 7 років тому +1

    Very informative! Does this also work if I have a set of discrete points instead of a continuous signal?

  • @cubepain92
    @cubepain92 7 років тому

    how do I get , sin wave amplitude in y-axis instead of magnitude

  • @michellevc3542
    @michellevc3542 10 років тому

    I need to understand why did you substracted 1/fs , could you explain it in some other video or tell me where can I found the explanation i.e some book. thanks a lot

  • @MrPorwal123
    @MrPorwal123 10 років тому

    should i need to deduct one every time to get the correct answer. please tell me David Javaid

  • @RaviBabooram
    @RaviBabooram 8 років тому

    How can I use FFT to determine if a sound wave is Harmonic?

  • @michellevc3542
    @michellevc3542 10 років тому

    thank you very muuuuch!!! I will appreciate if you keep analysing signals in frequency domain. :D

  • @rushdi03
    @rushdi03 10 років тому

    Thanks for the educative video, surely helped a lot.
    How to you convert bind to Hertz ? Thank you very much in advance. Much appreciated.

  • @ddorran
    @ddorran  11 років тому

    Do you have a rough idea of what frequency the tremor would be? You can send the data on for me to look at, on condition you'll allow me use the data for teaching/training purposes - I'm always trying to get interesting real-world signals for my students to analyse!

  • @vevasam
    @vevasam 10 років тому

    Thank you so much. Very helpful video.

  • @nanacedo5028
    @nanacedo5028 6 років тому

    hello i am working on a FMCW Project and have a problem to plot the baseband Signal after mixing the recive Signal and the transmited one.?? please help me!!!! :( :( :(

  • @MrForeverBlues
    @MrForeverBlues 10 років тому

    Hey I need help. I want to do 8 sampling of this signal, how should the code be like?
    Fs=1000;
    T=1/Fs;
    L=8;
    n=(-2:L-3)*T;
    x=cos(((pi/4)*n)+pi/6);
    X=fft(x);
    y=length(X);
    X_mag=abs(x);
    X_phase=angle(X);
    stem(X_mag);
    X_phase=angle(-1);

  • @SurenMaharjan
    @SurenMaharjan 6 років тому

    I would like to fourier transform four columns, one column represents pixel values at 0 degree phase, second column 90 degrees, third 180 and fourth 270 degrees, so i would like to create amplitude image from amplitude data after fourier transform. i have binary .raw file images. how can i do this? i fread the images, convert the pixel values in four columns, and get amplitude data. but i could not see the image.

  • @DrAlejandroRSaid
    @DrAlejandroRSaid 9 років тому

    Dear Dr. David,
    Could you tell me what bibliographic reference did you use to know that the factor of N/2 can be used for each spectrum beam to represent the amplitud of the sinusoids ?

    • @ddorran
      @ddorran  9 років тому +1

      Alejandro Rodríguez I can't remember where I first read it. Any DSP text book will mention this. dspguide.com is an online book you can check out.

  • @dangtrungnam2809
    @dangtrungnam2809 8 років тому

    Thank you for your instruction.

  • @kevinnugent8309
    @kevinnugent8309 3 роки тому

    Hi David, very good presentation. One question I have is that the 3 bin values seen in the freq. bin plot were 31, 46 and 61 instead of 30 (750*20/500), 45 (750*30/500) and 60 (750*40/500). Why the values seen in the freq. bin plot are +1 the expected calculated values?

    • @ddorran
      @ddorran  3 роки тому +1

      The index into a Matlab array starts at 1 and by default Matlab will plot the indices of the array against the values in the array. Most programming languages and mathematical notation will use 0 as am index to the first element in an array. The first bin is referred to as the 0th bin.

  • @fatimahs_bestie
    @fatimahs_bestie 10 років тому

    How to use DFFT in image processing? thanks for the video

  • @husseinalgusab4129
    @husseinalgusab4129 10 років тому

    thank you very much on this very well discussion and learning FFT function i think your method to illustrate this concept is ideal thanks very very much

  • @bertmartin8463
    @bertmartin8463 10 років тому

    Hi I was wondering if it was possible to do a FFT in matlab with data from an external file. I have a text fill with 10000 results and i need to put these into a fourier transform and then plot this and then find the peak on this plot. Any thanks would be amazing, thanks

  • @nikostikis
    @nikostikis 9 років тому +1

    Nice tutorial.

  • @Khalid1981z
    @Khalid1981z 11 років тому

    Great tutorial.. thx a lot!

  • @huitetdemi
    @huitetdemi 7 років тому +1

    Thanks for the video! This is a great introduction.
    I'm wondering how you can find the frequencies and amplitudes from the FFT without reading them off the plot. In this case, we knew the frequencies in advance, but how would I find that they were exactly 20, 30 and 40 Hz if I only had the FFT? Thanks!

    • @ddorran
      @ddorran  7 років тому +1

      You would use some code to find peaks within the magnitude spectrum.
      For example in matlab it would be something like the following:
      fs = 1000;
      N = length(x);
      X = fft(x);
      X_mags = abs(X(1:N/2)); %magnitude spectrum of first half
      [pk_vals pk_locs] = findpeaks(X_mags);
      %remove pks below a threshold
      inds = find(X_mags(pk_locs) < 1);
      pk_locs(inds) = [];
      %determine frequencies associated with the peaks
      pk_freqs = (pk_locs-1)/N*fs

    • @huitetdemi
      @huitetdemi 7 років тому

      Thank you very much for the quick reply!

    • @lxmnification
      @lxmnification 7 років тому

      Hi David, Thank you for the video. I have one question, why are the peaks shifted right by one frequency bin?

    • @ddorran
      @ddorran  7 років тому

      It's down to how matlab indexes its arrays. The first element in a matlab array has an index of 1 which corresponds to bin number 0. This isn't an issue in most other programming languages where the first element of an array uses an index of 0.

    • @lxmnification
      @lxmnification 7 років тому

      Okay. And does bin number zero represent the dc quantity in the signal?

  • @dailynewthought3832
    @dailynewthought3832 6 років тому

    Hi dear Dr. David ,
    As i know that you know well of FFT(Fast Fourier Transformation).
    FFT are working in 2^N Data , But how to do calculate MATLAB without 2^N data
    i am face a problem that MATLAB are work without 2^n Data, but i am not able to do this Please Help me

  • @shuangzhao5575
    @shuangzhao5575 11 років тому

    Very useful!! Thanks a lot!!

  • @ddorran
    @ddorran  10 років тому

    Try the following (it should work if there is just numerical data in the file which is formatted neatly i.e. spaced or with each value on a new line):
    ip = load('filename.txt');
    X = abs(fft(ip));
    plot(X)
    [peak_val peak_location] = max(X)

  • @Kashif_Javaid
    @Kashif_Javaid 11 років тому

    What happened if you plot the X_angle?

  • @AdityaSingh-ks3zc
    @AdityaSingh-ks3zc 9 років тому +1

    its very nice lecture.

  • @canergiritli2077
    @canergiritli2077 Рік тому

    sen adamsın bilader.

  • @yrv2016
    @yrv2016 9 років тому

    Very helpful - thank u very much

  • @r0bertfrank
    @r0bertfrank 2 роки тому

    is the right hand side mirror image information pre-filter ringing?

    • @ddorran
      @ddorran  2 роки тому

      Hi Rob. They are associated with what are referred to as negative frequencies. Check out ua-cam.com/video/M1bLPZdNCRA/v-deo.html.

  • @ashusharma3578
    @ashusharma3578 8 років тому

    Hi David,
    How can we decide sampling frequency for a continuous signal?

    • @abdullahmohamed519
      @abdullahmohamed519 8 років тому +1

      +Ashu Sharma it supposed to be twice or greater than that frequency of your continous signal. Nyquist criterea.

  • @MuhammadIrfan-kv6ez
    @MuhammadIrfan-kv6ez 9 років тому +5

    Hello Dr. David,
    can you tell me the logic mathematically as to why fft function produces a mirror on the right side after half of sampling frequency?

    • @ddorran
      @ddorran  9 років тому +2

      Muhammad Irfan First point I'd like to make is that this is only the case when you are dealing with signals which have no imaginary terms.
      The reason for the mirror image requires an understanding of negative frequency complex exponentials which is explained in ua-cam.com/video/M1bLPZdNCRA/v-deo.html
      Complex exponentials can be visualied as shown in ua-cam.com/video/K_C7htSXORY/v-deo.html

    • @MuhammadIrfan-kv6ez
      @MuhammadIrfan-kv6ez 9 років тому +2

      David Dorran Thank you very much :)

    • @dragoncurveenthusiast
      @dragoncurveenthusiast 6 років тому

      I don't know whether this is correct, but here is an intuitive answer:
      Isn't it because of potential aliasing which could have happened during the sampling?
      A continuous sine wave at 0.95 times the sampling frequency (0.95*Fs) would be sampled in the same way as a continuous sine at 0.05*Fs due do aliasing.
      Thus, the sampled signal resulting from a continuous 0.05*Fs sine wave could be the result of sampling a 0.05*Fs or a 0.95*Fs sine wave, which is why both show up on the fft
      (The same sampled signal could also originate from a sine wave at 1.05*Fs or 1.95*Fs, but the fft spectrum ends at 1*Fs, which is why we don't see those frequencies on the spectrum.)
      Disclaimer:
      I haven't yet watched the video on negative frequency complex exponentials and do not know what those are. Maybe my answer is circular reasoning, because the next question could be: "Why does a 0.95*Fs sine alias as a 0.05*Fs sine?"
      Please, anybody who knows more about this than I do:
      Does my answer make sense? Is there an error in my understanding of the matter?

    • @Zxymr
      @Zxymr 5 років тому +1

      Not sure if this would still help, considering you commented 9 months ago. Anyway, your reasoning is not wrong per se, but as you've figured, it's circular reasoning. Aliasing is the consequence of the negative frequencies, and not the other way round.
      - For discrete time signals, the frequency spectrum is periodic with period f_s (there are many sources that explain this; see DTFT & DFT).
      - This means that the frequency components from -0.5f_s to 0 (bin -0.5N to -1) are the same as the components from 0.5f_s to f_s (bin 0.5N to N -1). N is the number of bins in a period.
      - I can take a period in the frequency domain to be from -0.5f_s to 0.5f_s (bin -0.5N to 0.5N -1) instead of 0 to f_s (bin 0 to N -1).
      - Most importantly, for real signals in the time domain, the component of any frequency -f_k is the conjugate of the component of f_k. In math terms, F(-f_k) = (F(f_k))*.
      - In terms of bins, the component of bin -k is the conjugate of the component of bin k: F[-k] = (F[k])*.
      - The reason why they are conjugates is because when we combine the sinusoids to reconstruct the time domain signal, we need the imaginary terms to cancel. If F[-k] ≠ (F[k])*, the imaginary terms do NOT cancel and we end up with a complex time domain signal.
      - Complex conjugates have the same magnitude: |F[-k]| = |F[k]|. Also, don't forget the periodicity: F[k] = F[N+k].
      - This means that |F[k]| = |F[N-k]| = |F[N+k]| = |F[2N-k]| = ...
      - Aliasing just follows as a natural consequence of the above. The "mirroring" would be the first 2 terms.

  • @mohammadbarzegar6102
    @mohammadbarzegar6102 8 років тому

    It was fantastic video. Thanksssss

  • @gu4801
    @gu4801 8 років тому

    how to get frequency using fft function with guide?

  • @ddorran
    @ddorran  10 років тому +1

    yes. There is a difference of one between Matlab's indexing of its arrays and the corresponding bin number.
    X(1) in matlab refers to bin 0, for example.
    Note that this is an unusual approach to indexing. Most programming languages will use 0 to refer to the first element in an array.

    • @callanokane8728
      @callanokane8728 4 роки тому

      David Dorran hi, thanks for the great video! I am trying to plot fft for a set of discrete points but I am unsure how to calculate what the frequency on the x axis should be?

    • @callanokane8728
      @callanokane8728 4 роки тому

      David Dorran for reference I have solved a system of 3 differential equations (Lorenz system) so I am not sure what Fs would be

  • @amineleking9898
    @amineleking9898 9 років тому

    Thank you very much sir !!!

  • @ramandeepk6923
    @ramandeepk6923 4 роки тому

    Hi David
    thank you for this great video, but i am confused on how you specified fs or sampling frequency. Actually I am performing fft and psd analysis of pressure values (fluctuations) over time (with a fixed time step dt) , so will the sampling frequency be 1/dt?

    • @ddorran
      @ddorran  4 роки тому +1

      yes Ramandeep. It'll be 1/dt.

    • @ramandeepk6923
      @ramandeepk6923 4 роки тому

      David Dorran thank u so much :) do you a video on PSD using pwelch functions and windows used for this function ? :)

    • @ddorran
      @ddorran  4 роки тому +1

      I'm afraid not

  • @ernestamoore4385
    @ernestamoore4385 9 років тому +1

    Would is the difference between taking the abs(fft(X))/length(X) and multiplying X by its complex conjugate? I saw this being done but what changes is the scaling of the Y axis.

    • @ddorran
      @ddorran  9 років тому +2

      It is the case that if x = a+jb, then abs(x) = sqrt(x*conj(x)).
      So you could determine the magnitude by multiplying the result of the fft by its conjugate and finding the square root of the result. Howeve you'd still need to scale by the length to get the amplitude of the corresponding time-domain components.

    • @ernestamoore4385
      @ernestamoore4385 9 років тому

      David Dorran Thank you for the prompt answer! I'm not a mathematician, if I may, could I ask what would be the other cases that are not x = a+jb? You mean, not always I can take the fft and apply that rule?

    • @ddorran
      @ddorran  9 років тому

      Gahariet Melanthios You can use that rule always for the fft. Apologies for the confusion.

    • @ernestamoore4385
      @ernestamoore4385 9 років тому

      David Dorran Great, and thanks! By the way, where are you from? Exotic accent.

    • @ddorran
      @ddorran  9 років тому +1

      Gahariet Melanthios Ha ha! My accent has certainly never been described as exotic before! I'm from Ireland!

  • @8ytan
    @8ytan 8 років тому +25

    The fuck happened to you mic 13 minutes in?

  • @marshmelows
    @marshmelows 5 років тому +3

    Thank you so much for this vid, it helped a lot! Also ASMR voice

  • @jassimjaved3309
    @jassimjaved3309 3 роки тому +1

    Thank you.

  • @atakanarikan
    @atakanarikan 9 років тому

    Hello Dr. David,
    I need to find the difference between dropping sounds of Copper and Gold using frequency peak. So far I took the fft(); of both sound files and plotted the amplitude/freq. diagram. How should I continue with my progress?
    Thanks!

    • @ddorran
      @ddorran  9 років тому +1

      Atakan Arıkan You could look for differences in the plots that reoccur for multiple drops and use those features to differentiate between the two sounds.

    • @erhanbozdogan7601
      @erhanbozdogan7601 9 років тому

      Uuu8u. Pcsaaa! ... :
      Apollonkyyyt! Cdx9kxkxkiop0nkmzkkxo

  • @tn-me5ss
    @tn-me5ss 6 років тому

    tnx. It is very useful. Please make a video on matlab pwelch...

  • @haydermosa3601
    @haydermosa3601 4 роки тому

    Thank you very much

  • @MrPorwal123
    @MrPorwal123 10 років тому

    your bin no here is 31 for lower frequency one. it is giving me 31/1.5*2 which is not exactly what you have assumed as 20 Hz.

  • @amr.a-m8350
    @amr.a-m8350 3 роки тому

    Good tutorial video

  • @IbrahimAli-kx9kp
    @IbrahimAli-kx9kp 2 роки тому

    Your video is great, thanks... Just if you can enhance the recording quality, it'd be much better 🌸

    • @ddorran
      @ddorran  2 роки тому +1

      Yeah. It's not great. When I put the video up I didn't anticipate it would become popular!

  • @ddorran
    @ddorran  11 років тому

    I'm afraid the answer is quite involved and requires a good understanding of the Discrete Fourier Transform (DFT). Check out the chapter on the DFT on the dspguide website.

  • @suyashsharma5272
    @suyashsharma5272 8 років тому

    Hello David,
    I am new to FFT concept and i have been going through all your playlists to learn more about digital signal processing using matlab. Many thanks for the wonderful job you have done here to help us all out.
    Here in this video,
    1) How did we get the initial magnitude values for all the frequencies? Like i have no idea how did you get the value over 2000 for the lowest frequency and then in the ratio 3:1:2 for the remaining 2 frequencies.
    2) I am also unable to make sense of why we would divide by number of samples to find the absolute value while we have already used the abs function to find our absolute values.
    It seems like we already had it multiplied somewhere and we just divided by the number of samples to bring it back to the 3:1:2 ratio.
    I am really confused in this concept of getting the absolute and also the 1st point.
    Kindly help!

    • @suyashsharma5272
      @suyashsharma5272 8 років тому

      And going through the video over and over i also came to realise that : We have a column of 1500 samples which have 1500 signal value at every sample point. We perform FFT over every sample point and generate Frequency domain information from time domain information in exactly 1500 rows in a column. What i do not understand is that i take up row number equal to the value of my frequencies and find out the magnitudes of these rows is the highest.
      All i mean to say is i find it surprising that the a column of 1500 time samples transforms into a column of 1500 frequencies and then we just pick up the right frequencies and see that they have the magnitudes in the ratio of their amplitudes.

    • @suyashsharma5272
      @suyashsharma5272 8 років тому

      I saw it again and realized that the bins just do not simply relate to the frequencies. Infact then you show there is a relation and i zoomed in to find out that the frequencies 20,30 & 40 and sitting at bin numbers 31,46 & 61. And the bins and frequencies in this case are also very close because of the number of samples not being very different from the Max frequency.
      I changed my time to 2.0s (2000 samples) and the frequency values shifted to 41,61 & 81.
      So now my confusion that the bin values were directly related to the exact frequency values is busted.

  • @vladbio
    @vladbio 10 років тому

    Hy David, ty for the video. I would like to restore the X from the magnitude and the freq. I use F = mag_X.*exp(t.*sqrt(-1)) to d it but I can't get the normalization of t right. What t should be in our example? Thanks in advance

    • @ddorran
      @ddorran  10 років тому +1

      The following should get you on the right track for real signals.
      t = (0:N-1)*1/fs; % N is the length of the signal
      F = mag_X/(N/2)*cos(2*pi*freq_X*t + phase_X);

    • @vladbio
      @vladbio 10 років тому

      ty

    • @satishchandraharimangalara5348
      @satishchandraharimangalara5348 3 роки тому

      @@ddorran Hi, why do we divide it by (N/2)? If we do so, do these correspond to Fourier series coefficients?

  • @someswardutta4935
    @someswardutta4935 8 років тому

    Hey David,
    I tried the angle to find out the phase of the signals. Its not returning the exact values of the phase those are used in the signal but an order of 10^-2 less or higher than those values. I am using Matlab 2013a, 2011a. What could be the possible reason for that? Would appreciate your help.

    • @ddorran
      @ddorran  8 років тому

      +Someswar Dutta You'll notice that in the example that I provided I had exactly an integer number of cycles in the signal I analysed. If this isn't the case then the phase values are less predictable.

  • @iktor514
    @iktor514 7 років тому +1

    Спасибо!

  • @abiramime
    @abiramime 8 років тому

    Y=y1+y2+y3+.....yn. I have Y signal. i want to extract y1 y2 y3 .... yn signals out of it. I used fft function and got the frequency spectrum. but the frequency domain didn't consist of any particular-clear peaks. I have tried zero padding and windowing too.
    The objective is 1) to get the information about every sine wave 2) if i combine all the sine waves together i should get back of the original signal.
    Is there any direct method to extract every sine wave from fft. ?
    Thanks in advance.

    • @ddorran
      @ddorran  8 років тому

      If y1, y2,etc. are sinusoids of different frequencies then this is possible (even relatively straightforward) but of they are more general signals then this becomes extremely complicated. The problem is known as source separation in audio signal processing and there are numerous approaches which are quite complex.

  • @francescovatrano8687
    @francescovatrano8687 7 років тому

    Hi david! thank you for yours helpfull video tutorials. I would like to make a question to you. I'm trying to do the fft of a vector(X) with 2000 values. I started calculating b=fft(x); then i found the modulus c=abs(b) and finally i plotted c: plot(c).
    I think the result it's not correct because observing the plot i can see two peaks on the left hand side and only one on the right hand side. Now i know tha my starting signal it's generated by a sin+gaussian noise so i imagine that i should obtain a plot with only two simmetrical peaks. i hope in some help. thank you for your great job

    • @ddorran
      @ddorran  7 років тому

      Is there a peak at bin 0? If so then you have DC offset in your signal. The DC component is a special case and isn't 'reflected' on to the right hand side of the double sided spectrum.

    • @francescovatrano8687
      @francescovatrano8687 7 років тому

      David Dorran no i generated my signal with sin(2*pi*100000*t) plus and additive white gaussian noise. i acquired my signal with an oscilloscope in a time-window of 2 ms. So i have no DC signal. i supposed that maybe it's because my vector have not a power of two elements. what do you think about that?

    • @ddorran
      @ddorran  7 років тому +1

      The power of 2 is irrelevant. If the discrete signal has no DC component and contains only real values, i.e. no imaginary terms, then it has to be symmetrical.

    • @campbelllatausha1994
      @campbelllatausha1994 7 років тому

      Francesco Vatrano every other day and the other side of things to be a great day to get to the inbox to the inbox to the phone and I will have a good time and the kids are in the bank account details are as below the email and any other questions please feel like I was wondering how much I love the opportunity and I have a

    • @campbelllatausha1994
      @campbelllatausha1994 7 років тому

      Francesco Vatrano to TD by TD TD Rd Ed he ifg August IH he is not a problem for me know if you are not in a few weeks ago I was thinking about you but I am a very good and the kids are doing well I was wondering if I have a good time and consideration and time for me to be able to make sure to check the attached file for my son is a good day to day basis for further details on the sake I have been able to make sure to my other email I sent from my frame and the guy that was in the past and present to the inbox by boomerang view Post by the end up in a few days and then you can get the chance to see the status is a great weekend to get to know what to say that the phone with you and your family and I have a great weekend to get the chance of getting a little more about your order has been off for me to be a problem with my own family and I will get back with you to the phone with me on my way to do it is not a

  • @srinivaschowdaryappasani2248
    @srinivaschowdaryappasani2248 7 років тому

    nice explanation

  • @neurochannels
    @neurochannels 5 років тому

    Great video, especially like that you named two variables with the same letter! :/

  • @NicoCarosio
    @NicoCarosio 10 років тому

    THANKKSSS!!

  • @maitriborthakur7360
    @maitriborthakur7360 2 роки тому

    I am confused how to use exponential function of x

  • @abrahamkristanto8531
    @abrahamkristanto8531 4 роки тому

    So is it amplitude or magnitude. Can anybody explain to me the difference?

    • @ddorran
      @ddorran  4 роки тому +1

      Magnitude doesn't have a sign or direction associated with it. So an amplitude of -1.25 has a magnitude of 1.25.

  • @67artun
    @67artun 8 років тому

    Sir i have transfer fcn. in z-domain H(z) and i want to plot |H(w)|,,,,how can i do that, and can you make a tutorial about this topic, that would be great , thanks in advance

    • @ddorran
      @ddorran  8 років тому

      +67artun substitute z with e^(jw) in the H(z) expression to get H(w)

  • @anthonysaliba3774
    @anthonysaliba3774 6 років тому

    The best