filtering in matlab using 'built-in' filter design techniques

Поделиться
HTML-код
  • Опубликовано: 17 янв 2025

Комментарии • 123

  • @manhuynhkha
    @manhuynhkha 10 лет назад +5

    Perfect! You're the best teacher that I've ever seen. Good job, dude!

  • @rajeshbodade
    @rajeshbodade 10 лет назад +2

    Perfect! You're the best teacher that I've ever seen. Good job, Keep it up.

  • @Karikato
    @Karikato 10 лет назад +3

    Best explanation of the filters I've seen so far. Very good job showing the differences! :)

  • @mikeshaw714
    @mikeshaw714 10 лет назад

    Just like to say I find all your videos on FFT/MATLAB brilliant. Very clear and concise, they have definitely helped me understand the topic, a must view for anyone wanting to learn.

    • @ddorran
      @ddorran  10 лет назад

      Thanks for the comment. It's great to know these videos are helping out.

  • @ahhegab2
    @ahhegab2 10 лет назад +6

    Brilliant .. it ended my misery after suffering for a long time. Thanx Dave :)

  • @mostafahoseini8888
    @mostafahoseini8888 7 лет назад +2

    Simple, straightforward and helpful! Thank you.

  • @TheAhmedMAhmed
    @TheAhmedMAhmed 11 лет назад +7

    wonderful ! really helped me a lot in my project of my 1st Signals and Systems course;
    Thanks :)

  • @6400loser
    @6400loser 7 лет назад

    You are a goddamn life saver, David Dorran.

  • @seselian
    @seselian 5 лет назад

    You did a very good job, clear and easy to understand.

  • @markpage5108
    @markpage5108 11 лет назад

    I really like your videos, please keep doing them. I learn something from each one!

  • @dinghydan
    @dinghydan 9 лет назад

    At last a tutorial that normal people can understand!

  • @mshahrul
    @mshahrul 9 лет назад

    cheers david... u help a lot of people with this

  • @pratyushpradhan1844
    @pratyushpradhan1844 4 года назад

    brilliant explanation . this is what i was looking for.

  • @kishonpatel7161
    @kishonpatel7161 9 лет назад

    thnx a lot David. ur techniques in MATLAB r really outstanding and simple to understand. we will like to have more videos of urs in future. Thnx again :)

  • @TheGoodphy
    @TheGoodphy 9 лет назад +1

    Oh...This is what I "exactly" look for!! Thanks!!! It is really straightforwardly applicable now!

  • @rimzanrefaideen9168
    @rimzanrefaideen9168 7 лет назад

    Clear and simple.
    Really helped!!!!!

  • @mutiaaziza1394
    @mutiaaziza1394 6 лет назад +1

    perfect! very good tutorial. thank u so much Mr..

  • @stephenalabi3345
    @stephenalabi3345 10 лет назад

    David I really appreciate ur effort. The lecture is concise, clear and easy to understand. Please can you talk about Basspass filter?

    • @ddorran
      @ddorran  10 лет назад +1

      I will do something on bandpass filters when I get a chance - its on the to do list!
      I do have an example of a bandpass filter being used in Why Linear Phase Filters are Used which might be of some help.

  • @GaiaKnight11
    @GaiaKnight11 4 года назад

    Thank you very much! Excellent explanation!!

  • @aseramohammed4597
    @aseramohammed4597 5 лет назад +1

    What does it do this function
    Create signal (a,b)

  • @stupid8154
    @stupid8154 9 лет назад +1

    a real help , cheers !!

  • @MyawesumMe
    @MyawesumMe 10 лет назад

    what is "num_bins" in 3:14 ?

    • @ddorran
      @ddorran  10 лет назад +1

      it is the total number of frequency bins obtained from the fft function. See Using Matlab's fft function or How the Discrete Fourier Transform (DFT) works - an overview for an explanation of the term.

  • @aseramohammed4597
    @aseramohammed4597 5 лет назад +1

    Sir
    I wanna aske you about
    Create_signal_flow(b,a)
    In line 32 .
    What should I do to creat this function?

  • @dongdli4708
    @dongdli4708 6 лет назад

    Thank you very much! It helps me a lot.

  • @govindsahu15
    @govindsahu15 6 лет назад +1

    Sir, If we add higher order filter then there will be some delay in the signal. So, are there any methods to avoids/compensate such delay?
    Thanks

  • @nurahmedomar
    @nurahmedomar 5 лет назад

    This is a Digital filter, is there any similar video about an analog filter? Thanks.

  • @sumilangovinden
    @sumilangovinden 10 лет назад +2

    Excellent Stuff

  • @UtkarshSoni2512
    @UtkarshSoni2512 10 лет назад +2

    Very good tutorial :)

  • @aminehaine3301
    @aminehaine3301 7 лет назад

    good job :) you helped me a lot for my work :)

  • @vineeshms9561
    @vineeshms9561 9 лет назад

    superb....able to understand.thank you

  • @mdmonazirkhalifa3997
    @mdmonazirkhalifa3997 6 лет назад

    Sir which version of matlab u r using

  • @MyawesumMe
    @MyawesumMe 10 лет назад

    and was is the "floor" for in 6:21

    • @ddorran
      @ddorran  10 лет назад +4

      floor rounds down to the nearest integer. It's similar to round but will always round down. For example round(1.8) = 2, but floor(1.8) =1.
      If the decimal part of a number is less than 0.5 then floor and round will have the same result. for example floor(10.3) = 10 and round(10.3) = 10

  • @amineleking9898
    @amineleking9898 4 года назад

    Thank you so much David

  • @jyotimishra473
    @jyotimishra473 4 года назад

    I want to apply bandpass filter on a discrete signal, can you suggest any method for that?

  • @jimz92raisanz
    @jimz92raisanz 4 года назад

    impressive, you are really helpful sir , do you have the code for the LOW PASS FILTER WITH FINITE IMPULSE RESPONSE USING LEAST SQUARE TECHNIQUE SIR

  • @hienlevan6726
    @hienlevan6726 10 лет назад

    Thank you so much for your useful tutorial, David. I am trying to apply filter technique for my real data which is taken every 10 minutes average of raw data including so much noise data and some missing data also. I only know the frequency of system was designed at 20Hz. Could you recommend me how to apply filter method in general and how to define the optimal order of filter and which technique in filter method is better for my case. Thank you so much for your time in advance.

  • @unaihenry2964
    @unaihenry2964 5 лет назад

    Just question ; how can i design BPF in matlab without using fir function

  • @AbhilashaDAdak-iu7mw
    @AbhilashaDAdak-iu7mw 8 лет назад

    Do we need to enter four parameters in the 'butter' function for band pass and band reject filters?

    • @ddorran
      @ddorran  8 лет назад +1

      For a bandpass filter you would use [b a] = butter(3, [0.2 0.4], 'bandpass')
      There are still three parameters passed to the function though. Each function parameter is separated by a comma and the second parameter is an array containing two values i.e. 0.2 and 0.4.
      I can see why this could be described as four parameters but in terms of "function parameters" there are only three.

    • @AbhilashaDAdak-iu7mw
      @AbhilashaDAdak-iu7mw 8 лет назад

      David Dorran Thanks a ton.

  • @tdawg108
    @tdawg108 10 лет назад

    Thank you for your video, it was a great help. I managed to plot the amplitudes of both the Chebyshev and Butterworth filters but could you please advise me on how to plot the phase of these as well?

    • @ddorran
      @ddorran  10 лет назад +1

      The following should work:
      [H w] = freqz(b,a);
      plot(w,angle(H))

  • @abhimgowda8168
    @abhimgowda8168 9 лет назад

    sir , i am doing a project on voice recognition , can i know how to use these filters to remove the noise...please help me sir

  • @hmir9588
    @hmir9588 3 года назад

    thanks sir, But what about a signal exponentially sinusoid ?! and how to eliminate dc offset and exponential term getting a pure sinusoid? actually DC offset is easy to get rid of it. Waiting for your reply for eliminating exponential term of sinusoid.

  • @杰米老师
    @杰米老师 9 лет назад

    I really dont know how to express my gratitude. Thanks so much! do you have videos on how to filter without built-in-functions?

    • @ddorran
      @ddorran  9 лет назад

      +Jamirah Ama Ahmed I don't have any videos explicitly on this topic. However if you understand how a systems poles and zeros influence the frequency response then you can design any discrete filter you want without having to rely on built-in functions. Take a look at ruclips.net/video/m5TP2uG_O2M/видео.html

    • @杰米老师
      @杰米老师 9 лет назад

      I downloaded your pdf on basics of DSP! I always run away from Matlab during undergrad and now i need it for signal analysis etc etc for this Masters course I am taking. Your pdf is really helpful. Thank you so much. Wish I could email you or something! I am grateful!

    • @ddorran
      @ddorran  9 лет назад

      +Jamirah Ama Ahmed Thanks for letting me know my material is useful. It's nice to get that type of feedback. Good luck with your studies.

  • @Appleiphones1
    @Appleiphones1 8 лет назад

    i have 3 phase voltages and current.Now how can i obtain Fundamental components of current and voltage
    signals using DFT?

  • @Hyperbolicus86
    @Hyperbolicus86 9 лет назад

    thank you, great instruction

  • @thepyramid9777
    @thepyramid9777 8 лет назад

    i need function and simulink in power system by useing kalman filter..... can you help please ?

  • @ayaibdah5646
    @ayaibdah5646 3 года назад

    hello can you help me in question in Image processing ?

  • @ronaldinho711990
    @ronaldinho711990 8 лет назад

    thank you so much
    very useful explanation

  • @francescovatrano8687
    @francescovatrano8687 8 лет назад

    Hi David I used successfully what you show in this video but if it's possible i want to pose a question to you about filtered signal.
    I started with a signal composed by a sinusoid and noise. Than i filtered the signal by removing sinusoid . Now we have only noise and i have do demonstrate that noise have zero mean and it have a probability density function described by a Gaussian function.
    So I executed the command: sort(signal) in order to obtain a vector starting by lower value to higher value. Than i plotted histogram and the gaussian curve and now i have to do the ki square test but i have not idea how to do this.
    Can you suggest me a way?
    Thank you so much.

  • @husseinalgusab4129
    @husseinalgusab4129 10 лет назад

    Thank you very much for this video David but i have a question :
    I have a signal and i had filtered it according to your method but there is some discrete specified frequencies ( about 100 values ) in the range of frequencies which i had already removed, so how can i add these specified frequencies (where lies in the range of removing values of frequencies ) to the original signal so as not to remove these specified values of frequencies thank you very much

    • @ddorran
      @ddorran  10 лет назад +1

      So you have a filter that, for example, removes frequencies in the range of 100 to 200Hz, but you now realise that you actually need to keep frequencies around 150Hz. I hope I understand you correctly.
      One technique you could use is to first filter frequencies from 100 to 149Hz, giving you a new signal y1. You could then pass y1 through a filter which removes frequencies between 151 and 200Hz.
      There are other ways of doing this but this is probably the most straight forward
      for someone starting out.

    • @husseinalgusab4129
      @husseinalgusab4129 10 лет назад

      Thank you very very much, i really appreciate your fast answer it's very kind of you and yes, i mean exactly what you understand thank you very much sir

  • @benyaminzakariah9543
    @benyaminzakariah9543 8 лет назад

    Hi there.
    I'm working on my project called Audio Compressor. How can I compress my .wav file to different factors and how to make a spectograph from it?
    Thank you :)

  • @rollinfever
    @rollinfever 8 лет назад

    Great video but I need some help!
    I am trying to filter a .wav audio file. I transformed it using fft( ). When I transformed it, the peak magnitude of the noise that I want to filter is around 12000 (not sure the units). How can I make this peak smaller to match your 0 to 1 magnitude which works well with the butter function you used? Or is there any way I can make a filter that has a magnitude of 12000?
    Thanks!

  • @aseramohammed4597
    @aseramohammed4597 5 лет назад +1

    Please can anyone help me .

  • @lonesoldierx94
    @lonesoldierx94 9 лет назад

    Question: Hey, I'd like to use the freqz function and plot it simultaneously with pwelch or psd. Is that possible? I keep getting that they are not even values.

    • @ddorran
      @ddorran  9 лет назад

      +lonesoldierx94
      Here's some code that'll do the job. Basically I normalised the frequency axis (see ruclips.net/video/2IkdNsGQgEM/видео.html)
      I was expecting the output of pwelch to be the same as H^2 but for some reason it was out by a factor of 3 (that's the reason for the plot in green). I have no idea why at the moment.
      [b a ] = cheby1(7, 1, 0.5);
      H = freqz(b,a);
      x = randn(1, 10000);
      y = filter(b,a,x);
      P = pwelch(y,200);
      plot([0:length(H)-1]/length(H),abs(H).^2);
      hold on
      plot([0:length(P)-1]/length(P),P,'r');
      plot([0:length(P)-1]/length(P),P*3,'g');
      legend('abs(H)^2 where H= freqz(b,a)', 'psd from pwelch','psd*3')

    • @lonesoldierx94
      @lonesoldierx94 9 лет назад

      +David Dorran It works! Thank you!

  • @sultanalhammadi2910
    @sultanalhammadi2910 6 лет назад

    what if there is more than frequency component and there is noise between them? how would you filter it

  • @joeblow4938
    @joeblow4938 9 лет назад

    Is there some other tool besides MATLAB that plot these digital filter transfer functions easily?

    • @ddorran
      @ddorran  9 лет назад

      +Joe Blow You can try using Octave, Scilab or Python

  • @francescovatrano8687
    @francescovatrano8687 8 лет назад +1

    Can I create an high_pass filter in the same way?

  • @KelvinLeUT
    @KelvinLeUT 10 лет назад

    good explanation!

  • @harunyldrm2624
    @harunyldrm2624 7 лет назад

    Hello
    Engine vibration time domain data has been taken.
    How do I covert from time domain into crank angular domain?
    May you help me?

  • @aseramohammed4597
    @aseramohammed4597 5 лет назад +1

    Create_signal_flow(a,b)
    Can you give me the code sir please

    • @ddorran
      @ddorran  5 лет назад

      Its available at dadorran.wordpress.com/2012/09/26/create_signal_flow/ or by searching create_signal _flow using the search engine of your choice

  • @priyeshshah4750
    @priyeshshah4750 10 лет назад

    thanks this video really helped, I would like to know the a FIR method for filtering

  • @rajaduraikanniappan5327
    @rajaduraikanniappan5327 10 лет назад

    Hi..Thank you so much for this video. I would like to design a butterworth bandpass filter with different orders (eg. low pass filter of order 2 and high pass filter of order 8). So could you please help me, how this could be done?
    Thanks in advance.

  • @aakashdeep8716
    @aakashdeep8716 7 лет назад

    The filter you created is of amplitude 1. How can we change the amplitude of filter, if let say I want the amplitude to be 6?

    • @ddorran
      @ddorran  7 лет назад +1

      You can multiply the input or the output by 6. Multiplying all the b coefficients by 6 and then filtering would have the same effect.

    • @aakashdeep8716
      @aakashdeep8716 7 лет назад

      Thanks for the support. It worked.

  • @jyothiguntamukkala9392
    @jyothiguntamukkala9392 6 лет назад

    sir , how to design pso for low pass lcl filter please tell

  • @kinjalmacwan4866
    @kinjalmacwan4866 3 года назад

    Awesome! Thanks!

  • @dipalisinha3427
    @dipalisinha3427 6 лет назад

    sir, i have an eeg signal with the sampling rate 173.61 , duration 23.6 second, i want to implement the band pass filter having the freq. range 0.2 to 35 hz. would u plz help me

  • @MrUsamarao
    @MrUsamarao 9 лет назад +1

    Thank You Sire.. =D

  • @mohamadamin8122
    @mohamadamin8122 9 лет назад

    how to make the block diagram?

  • @saifalikhanpathan3422
    @saifalikhanpathan3422 8 лет назад

    how i can remove noise from a .wav file without using filter functions?

  • @rohandhankani3962
    @rohandhankani3962 7 лет назад

    TOP
    thank u very much sir for your help

  • @mustaphaalkhafaaf5512
    @mustaphaalkhafaaf5512 9 лет назад

    hi ,, grate video ,,, one question though ,, after all this how can engineers go and build the filter ,, after all this is just a matlab code , we dont have a real schematics and components ??!?!?! ... cheers

    • @mustaphaalkhafaaf5512
      @mustaphaalkhafaaf5512 9 лет назад

      +Mustapha Alkhafaaf it would be useful if we have option to turn to schematics

    • @ddorran
      @ddorran  9 лет назад

      +Mustapha Alkhafaaf by writing the code you have built the filter! Take a look at ruclips.net/video/sTXcb3k9wf8/видео.html.
      The schematic is the signal flow diagram. The components are multipliers and adders and memory which all exist in a computer and micro-controllers. In order to filter a continuous signal using a discrete filter you just need to get the signal on to the microcontroller - which is achieved using an analog to digital converter (see ruclips.net/video/ibj_13C5dyg/видео.html). Once the signal has been filtered by the microcontroller you can send it out of the micro using a digital to analog converter.
      Note that you could also build a filter using electrical components such as resistors, capacitors and op-amps.

    • @mustaphaalkhafaaf5512
      @mustaphaalkhafaaf5512 9 лет назад

      Cheer David for the explanation, you have mentioned the delay , I assume this available only in the processor with DSP capability not all micros or processors have this ... and to be honest with you i dont uderstand why do we need the delay .. why ?

    • @ddorran
      @ddorran  9 лет назад

      The delay is implemented by just storing data in memory - so all micros can implement discrete filters.
      The delay is a key element and filtering would not be possible without it. Look through the introductory videos to gain insight into this ruclips.net/video/-RM8VporjSY/видео.html

    • @mustaphaalkhafaaf5512
      @mustaphaalkhafaaf5512 9 лет назад

      many thanks

  • @tajammalnawaz5552
    @tajammalnawaz5552 7 лет назад

    how to set the cuttoff freq.?

  • @csmatyi
    @csmatyi 9 лет назад

    how do you determine the cutoff??? of 0.3??

    • @ddorran
      @ddorran  9 лет назад

      +Matthew Cserhati By examining the frequency content of the signal you can see that the noise occupies frequencies in the region of 0.5 to 0.8 (normalised frequency values).
      If you are using a low pass filter then the cutoff must be less than 0.5. By choosing a cutoff frequency less than 0.5 you will reduce higher frequencies by a greater amount. I selected 0.3 by trial an error - it reduced the noise by a visually pleasing amount that seemed to work well to illustrate the concept of filtering in the video.
      There are more formal ways to select the cutoff frequency and if you are interested then the following might help ruclips.net/video/DCCQJRJmgLo/видео.html

  • @vickysteev8964
    @vickysteev8964 8 лет назад

    Hi, i am Vicki
    Right now i am learning matlab, but i am just begginer at matlab, right now i want to learn about how to using low and high pass filter, Savitzky-Golay Filtering (SGOLAYFILT), mean and varians, and also find out the peak and valley point from the gyro and accelerometer signal, and all my data i get from excel.
    can You give me some tutorial or code how to make it
    I really hope You can help me to figure it out.
    Best Regards
    Vicki

  • @rohitkulkarni8873
    @rohitkulkarni8873 11 лет назад

    nice video sir...

  • @habibudinshams4414
    @habibudinshams4414 7 лет назад

    can you give me its code?

  • @Rkalla251
    @Rkalla251 11 лет назад

    dis guy is great

  • @balotrune7499
    @balotrune7499 5 лет назад

    thank you so much.

  • @hynesie11
    @hynesie11 5 лет назад

    Thank you thank you

  • @Captain_Rhodes
    @Captain_Rhodes 6 лет назад

    why are the normalized units pi*rad/sample? does anyone actually understand that? ive yet to see anybody explain it!

    • @ddorran
      @ddorran  6 лет назад +1

      There are 2 pi radians of a revolution in one cycle of a sinusoid. The maximum frequency that can be captured faithfully without aliasing will be half the sampling frequency. Therefore a sinusoid of 'maximum frequency' will have 2 samples per cycle. So over two samples the 'maximum frequency' sinusoid will have undergone 2 pi radians of a revolution, which equates to pi radians per sample.

    • @Captain_Rhodes
      @Captain_Rhodes 6 лет назад

      @@ddorran Thanks, that does make some sense. However what confuses me is that matlab says that the normalized frequency axis is defined as f/(fs/2): frequency divided by nyquist frequency. that should be units of cycles/sample right? Im starting to see what you mean, but in terms of the units I still dont get how that pi factors out

    • @ddorran
      @ddorran  6 лет назад +1

      ​@@Captain_Rhodes fnorm=f/(fs/2). f = w/(2*pi), where w is frequency in radians per second (rads/sec). fs is frequency in samples per second (samps/sec).
      fnorm=w/(pi*fs), therefore units can be expressed as rads/sec/(pi*samps/sec), which reduces to (rads/samps)/pi.
      Another way to think about this is that fnorm*pi = w/fs, so fnorm*pi has units of rads/samp.
      So if fnorm is 1 and we want to express this in radians per sample we'd have to multiply by fnorm by pi.
      The frequency axis should actually be labelled ( x pi radians per sample) to indicate that the normalised frequency should be multiplied by pi to get the frequency in radians per sample. I hadn't noticed this omission before.

    • @Captain_Rhodes
      @Captain_Rhodes 6 лет назад

      @@ddorran Thanks for your time. its much appreciated. All the best mate

  • @protocolfree
    @protocolfree 5 лет назад

    is this an analog filter ?! ( excuse my stupidity and ignorance )

    • @ddorran
      @ddorran  4 года назад

      No. It's a discrete filter.

  • @putianhe7692
    @putianhe7692 11 лет назад

    nice video

  • @azeemahamed3942
    @azeemahamed3942 8 лет назад

    how to perform for realtime bruvvvv

  • @uzidesigns23
    @uzidesigns23 3 года назад

    thankyou!

  • @alieng3002
    @alieng3002 6 лет назад

    goooooooooooooooooooooood

  • @الحمدللهاستغفرالله-ح1و

    Help me teacher

  • @chillingmeko
    @chillingmeko 8 лет назад

    @5:13 0.74 should be negative.

    • @ddorran
      @ddorran  8 лет назад

      +Ohmeko Ocampo It is correct. It should be positive.
      The reason why can be explained as follows (ruclips.net/video/HJEbuy4HSrM/видео.html is a related video):
      The b and a coefficients are associated with the general form of a difference equation which is written as follows:
      a0.y[n] + a1.y[n-1] + a2.y[n-2] + a3.y[n-3] + .. ... + ak.y[n-k] =
      b0.x[n] + b1.x[n-1] + b2.x[n-2] + b3.x[n-3] + .. ... + bm.x[n-m]
      when it is rewritten with the output y[n] on the left hand side the sign of the a terms change. Letting a0 =1 the general form becomes:
      y[n] = b0.x[n] + b1.x[n-1] + b2.x[n-2] + b3.x[n-3] + .. ... + bm.x[n-m] - a1.y[n-1] - a2.y[n-2] - a3.y[n-3] - .. ... - ak.y[n-k]

    • @chillingmeko
      @chillingmeko 8 лет назад

      David Dorran Woah, thanks so much. I had a difficult with this. XD

  • @mdmonazirkhalifa3997
    @mdmonazirkhalifa3997 6 лет назад

    Sir first define the signal 'x'

    • @ddorran
      @ddorran  6 лет назад

      It's defined in dadorran.wordpress.com/2013/10/18/filter-design-using-matlab-demo/

  • @mariamoosa4058
    @mariamoosa4058 8 лет назад +1

    I want to remove a 50Hz and 100Hz noise from a EEG signal. For that I need to design 2 notch filters. How do i do that?