Building a Digital Filter: How it works + Simulation + Example

  Рет қаралды 24,867

Robert Feranec

Robert Feranec

Күн бұрын

Everything important you need to know to start designing your own digital filters. Thank you very much C. Daniel Boschen.
Links:
- Daniel's Linked In: / danboschen
- FEDEVEL courses: fedevel.com/courses
Links to Dan Boschen's Courses:
ieeeboston.org/courses/
www.dsprelated.com/courses
Other relevant links:
Microchip MPLAB: www.microchip.com/en-us/tools...
Anaconda Distribution (includes Python tools and Jupyter Notebook): www.anaconda.com/download
SAM E51 Curiosity Nano Evaluation Kit: www.microchip.com/en-us/devel...
PMOD I2S2 ADC/DAC: digilent.com/reference/pmod/p...
Music used in the demo:
ISRC: USUAN1900041
Uploaded: 2019-12-18
credits:
"Adding the Sun" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons.org/licenses/b...
Chapters:
00:00 What is this video about
00:40 Our example explained
04:19 How filters work
07:48 What is a digital filter
10:46 Basic elements of digital filters
13:08 How filters manipulate with signal
15:00 Feed-forward (FIR) filter
19:39 Feed-back (IIR) filter
23:36 Biquad - Second Order Section (SOS)
28:49 The hardware we used
33:09 DMA explained
42:30 Audio file before filtering
44:16 Calculating filter coefficients
47:03 Our filter frequency response
48:59 Audio file after filtering
49:59 Explained how our filter works
54:52 C code of our filter
57:49 Daniel's courses
1:00:35 Setup for simulation - Jupyter and anaconda
1:05:14 Simulation - Initialization
1:10:38 Simulation - Showing the spectrum
1:13:04 Simulation - The filter
1:22:35 Simulation - Filtering audio file
1:25:47 Simulation - C code of filter
1:28:06 Explaining the code in microcontroller
1:34:33 The filter in C code of microcontroller
1:37:50 How to do this by yourself
------------------------------------------------------
Would you like to support me? It's simple:
- Sign up for online courses hosted on our platform: fedevel.com/
- You can also support me through Patreon: / robertferanec
- FEDEVEL Discord: / discord
It is much appreciated. Thank you,
- Robert

Пікірлер: 47
@iskogproductions6728
@iskogproductions6728 Ай бұрын
I had tens of hours of digital signal processing and signal filtering lectures, but this is the most intuitive course I've come across. Thank you for the clear explanations.
@MrLRankin2
@MrLRankin2 Ай бұрын
Finally! Someone that can actually explain digital filters so that we mere humans can actually understand.
@robegatt
@robegatt Ай бұрын
And enthusiastically does so !
@geofflethbridge8732
@geofflethbridge8732 Ай бұрын
I think that was a great presentation of DSP, and it was great to see your enthusiasm for the subject and teaching. :)
@thomhpl
@thomhpl Ай бұрын
Nice demo! I did something very similar a few days ago to add some low pass filtering for a speed sensor in a motor control loop firmware, using a jupyter notebook as well to design a simple FIR filter. I actually then used python to directly generate C code containing the array with the filter coefficients.
@videogenie1236
@videogenie1236 Ай бұрын
Just watched the presentation of the two PCB's. I like the dev kit pcb"s and ordered them for delivery tomorrow from RS Components in the UK. 🇬🇧 Thank-you both
@rosskappa5410
@rosskappa5410 Ай бұрын
God bless people like you.
@muhdiversity7409
@muhdiversity7409 Ай бұрын
Excellent content, Robert. Thank you so much for sharing.
@em2129
@em2129 Ай бұрын
Thank you! This is the best video I have seen on this topic so far!
@ketankothari247
@ketankothari247 29 күн бұрын
Beautifully explained sir 👏 👌 ❤️
@benish0r
@benish0r Ай бұрын
Very cool video and Dan is an absolutely amazing teacher. I should know, as I am one of his students :-)
@BigA1
@BigA1 Ай бұрын
The subject material is very well presented - thank you.
@hmpeter
@hmpeter Ай бұрын
Excellent video, thank you guys! 😀
@lacyrjoao2553
@lacyrjoao2553 Ай бұрын
Your blog are great and you're great, great, great.
@MusicBent
@MusicBent Ай бұрын
Digital signal processing was one of my favorite college courses. The math was tough, but learning how to make practical IIR and FIR filters was a great payoff. Audio is a great way to experiment because you can experience it. Most of my work nowadays is in RF / software defined radio processing which I also find fascinating
@user-uk5ep9hm5k
@user-uk5ep9hm5k Ай бұрын
It was very informative. Thanks a lot.
@Sanjeev...
@Sanjeev... Ай бұрын
Good dsp presentation thanks
@AnalogDude_
@AnalogDude_ Ай бұрын
Cool video, the low and hi pass filter? Cool that digilent PCB, Mouser has it.
@ziegelhof
@ziegelhof Ай бұрын
Dakujem za velmi uzitocne video
@jeanclaudejosephbadji5418
@jeanclaudejosephbadji5418 Ай бұрын
Just amazing!
@jeanclaudejosephbadji5418
@jeanclaudejosephbadji5418 Ай бұрын
Thank you very much
@youtubeaccount931
@youtubeaccount931 Ай бұрын
Fantastic
@landspide
@landspide Ай бұрын
Probably get away with software fpu in this case, not sure how fast the processor but would be surprised if it couldn't keep up. Very good presentation for beginners though, impressive!!!
@robegatt
@robegatt Ай бұрын
120 Mhz means at that sample frequency it is little more than 1000 machine code instructions per channel to do the filtering... not so sure it would fit a software fp.
@landspide
@landspide Ай бұрын
@@robegatt yeah good point, one would have to try to be sure..
@expertis307
@expertis307 Ай бұрын
Excelente !!!!
@kabandajamir9844
@kabandajamir9844 Ай бұрын
So nice thanks sir
@rabie-et8zg
@rabie-et8zg Ай бұрын
the problem of delay you can remove it by using a zero phase shift filters , great video Robert
@danboschen9613
@danboschen9613 Ай бұрын
This is a real time filter and zero-phase filters are non-causal (so will only work with post processing and can’t be applied here).
@robertpeters9438
@robertpeters9438 Ай бұрын
It would be great to have a video delay to match the audio filter delay.
@ebubekiralparslancaliskan3985
@ebubekiralparslancaliskan3985 24 күн бұрын
Thank you very much for the video, but I want you to add Turkish subtitles, I am looking forward to your feedback
@xxportalxx.
@xxportalxx. Ай бұрын
One thing I wish was brought up: layering stages. For instance in the 1khz tone example he showed a tighter filter takes longer to build, would there be an advantage to layering a looser filter with a tight filter to decrease that initial blip while still getting that tight rejection? Or would the loose filter make the tight filter redudndant? If you wanted to reject multiple bands do the two stages add delay independently, or is the delay the same as if they were applied individually? Do you add these stages to do so, or is there a means to merge them into a smaller structure?
@danboschen9613
@danboschen9613 Ай бұрын
Great questions and thoughts @xxportalxx !! Cascading multiple second order sections (one after the other if that is what you mean by layering) is the common approach to implement higher order filters. The big advantage in doing this is isolating the filter poles from interacting with each other leading to higher stability implementations, especially when the poles are close to the frequency axis ("higher Q" resonators). That's the primary advantage, and the delay and performance is predicted by the prototype higher order filter. If we used that approach to isolate two different frequencies as the notch filter demonstrated here, the delay (which is only in vicinity of the notch and creates the start-up transient) is as it would be for each filter individually, as long as they are separated sufficiently to not interact with each other. The deeper details are beyond the scope of this short video or what I could fairly answer in a comment, but it is something I go into as part of the "DSP for Wireless Communications" course referenced in the link (where we have much more time and the right context to explain). That course is coming up next month!
@xxportalxx.
@xxportalxx. Ай бұрын
@danboschen9613 Amazing presentation, and thank you for your response. DSP is generally presented as a black box above us mere mortals, very eye opening demonstration that it doesn't have to be out of reach.
@biswajit681
@biswajit681 Ай бұрын
Magnetics design for SMPS please
@fas9600
@fas9600 Ай бұрын
I understand there are specialized courses, but it would be great if you could share the demo jupyter notebook. thanks.
@biiber
@biiber Ай бұрын
some MCU vendors (like ST) have dedicated hardware (FMAC) to do these calculations in fixed point numbers. so the DMA could stream directly to and from the FMAC and the CPU can do other things or sleep. just want to point out how solid this concept is that it is implemented in hardware.
@25.muhammadhilmihaidary60
@25.muhammadhilmihaidary60 Ай бұрын
wow
@chinametal
@chinametal Ай бұрын
The algorithm presented in 54:52 will not work.....the variables must retain the previous information, so they cannot be reset every time they enter in the function. They have to be outside, that is, be global and not local. I think that's it..... the programmers can confirm it or not!
@danboschen9613
@danboschen9613 Ай бұрын
@chinametal they are defined as “static variables” which means they retain their state from call to call.
@robegatt
@robegatt Ай бұрын
Optimized version would not pass coefficients everytime.
@Jindraxx20
@Jindraxx20 Ай бұрын
3rd to view 1st to like the video (>.
@RobertFeranec
@RobertFeranec Ай бұрын
The first 2 views were mine (before publishing) so you are the first one to see it after publishing :)
@ulbed
@ulbed Ай бұрын
You can hear the 1 khz tone in the background all the time. Very annoying. Now I need to build a filter before watching this video.
@danboschen9613
@danboschen9613 Ай бұрын
Ha ha! I am 1 KHz tone deaf from all the testing I did
@outgoingbot
@outgoingbot Ай бұрын
Professor was on some BS when asked where his notch filter coefficients came from.
@lakwejh
@lakwejh Ай бұрын
Wish I had my teachers explained this clearly......on the other hand may be I should have paid more attention
Antennas Part I: Exploring the Fundamentals of Antennas - DC To Daylight
13:55
🌊Насколько Глубокий Океан ? #shorts
00:42
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 3,8 МЛН
ОДИН ДЕНЬ ИЗ ДЕТСТВА❤️ #shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН
How To Design and Manufacture Your Own Chip
1:56:04
Robert Feranec
Рет қаралды 26 М.
Why 50 Ohms?
2:19
Quaxys
Рет қаралды 8 М.
The Problem with Wind Energy
16:47
Real Engineering
Рет қаралды 413 М.
Top Fifteen Mistakes People Make When Designing Prototype PCBs
12:26
Cosplay Light and Sound
Рет қаралды 131 М.
PCB Ground Loops and How to Prevent Them
13:01
Altium Academy
Рет қаралды 13 М.
malicious javascript injected into 100,000 websites
12:28
Low Level Learning
Рет қаралды 149 М.
The Affordable Micro Shredder for 3D Printing Waste - RMRRF2024
31:35
I tried finding Hidden Gems on AliExpress AGAIN! (Part 9)
15:00
GreatScott!
Рет қаралды 893 М.
DIY sonar scanner (practical experiments)
14:30
bitluni
Рет қаралды 1 МЛН
Best mobile of all time💥🗿 [Troll Face]
0:24
Special SHNTY 2.0
Рет қаралды 618 М.
CY Superb Earphone 👌 For Smartphone Handset
0:42
Tech Official
Рет қаралды 826 М.
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 7 МЛН