Notch Filters - Theory and Software Implementation - Phil's Lab #39

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

Phil’s Lab

Phil’s Lab

Күн бұрын

Everything from notch filter basics, uses of a notch filter, through to derivation, discretisation of an analogue prototype/model, and final implementation on an embedded system (STM32 microcontroller) using the C programming language.
[SUPPORT]
Free trial of Altium Designer: www.altium.com/yt/philslab
PCBA from $0 (Free Setup, Free Stencil): jlcpcb.com/RHS
Patreon: / phils94
[LINKS]
Git: github.com/pms67
IIR Filters: • IIR Filters - Theory a...
Z-Transform: • Z-Transform - Practica...
Real-Time Implementation of Analogue Filters: • Real-Time Software Imp...
Tustin Transform: en.wikipedia.org/wiki/Bilinea...
[TIMESTAMPS]
00:00 Introduction
00:25 Altium Designer Free Trial
00:54 Content
1:26 Notch Filter Baiscs
3:01 Analogue Notch Filter
5:29 Standard Form Transfer Function
5:57 Example Frequency Responses
6:21 Discretisation
8:37 Digital Notch Filter
8:54 Pre-Warping
9:33 Analogue vs Digital Frequency Response
10:06 Practical Considerations
11:28 Software Implementation (STM32CubeIDE)
12:25 Filter Initialisation and Update Functions
14:48 Main.c Filter and Test Set-Up
15:39 Demonstration
ID: QIBvbJtYjWuHiTG0uCoK

Пікірлер: 37
@roshandsouza2329
@roshandsouza2329 2 жыл бұрын
You create great content! from designing PCB to DSP! I had tough time implementing these filters on software! But you're videos really help me to understand. Thank you so much 🥰💕
@anotherwingover
@anotherwingover 2 жыл бұрын
That's the first time i hear about prewarping. It's always nice to learn something new 👍🏻
@largepimping
@largepimping 2 жыл бұрын
Phil, your videos are fascinating and really well done. Thank you for continuing to make them! However, I do have to give you a hard time, only because it made me chuckle... around the 6:15 mark you twice said "nodth witch" instead of "notch width." I was so engrossed in the material that I had to go back and listen to it about three times to make sure I heard it right.
@PhilsLab
@PhilsLab 2 жыл бұрын
Haha yes, I heard that while editing but decided to keep it in :D
@jose6417
@jose6417 2 жыл бұрын
Awesome video Phil! This gave me a great idea for a project I'm working on. Thanks for making this!
@davidpatry4195
@davidpatry4195 2 жыл бұрын
If you ever are looking to adopt, please consider my candidature. Thank you so much for these videos
@paryska991
@paryska991 2 жыл бұрын
Thank you, awesome content!
@uav.project8022
@uav.project8022 2 жыл бұрын
This content is really helpful for me. and i am waiting for the EKF software implamentation
@Ekstrapolator
@Ekstrapolator 2 жыл бұрын
One day I will try to implement one of this filters !!!
@danhellgren5671
@danhellgren5671 2 жыл бұрын
I must say you are a great teacher.. I must try the serial oscilloscope. I have two questions. I know that float uses single precision format, but can we always be sure that the FPU is used? Do you measure the execution time of your different parts of code?
@nikosant03
@nikosant03 Жыл бұрын
Hi Phil, thanks you for your effort!! I cloned the LittleBrain-STM32F4-Sensorboard repo but it doesn't include the NotchFilter library. Is there another repo that you have included?
@ytubeleo
@ytubeleo 2 жыл бұрын
Great video. At 16:11, the signal jumps 40% higher momentarily when you switch from 2 Hz to 3 Hz. This worries me that it could saturate the signal in many applications. Why does that happen? Is it just coincidence that it jumps to almost exactly 1.414x the amplitude, i.e., the square root of 2? Also, will this approach work well for narrow notch filters at higher frequencies, for example a 1 Hz notch filter at 50 Hz to remove powerline interference? Can it even do something like 1 Hz width at 10 kHz or is something going to fall apart? Thanks!
@PampostReturning
@PampostReturning 2 жыл бұрын
Thank you 😊❤️.
@merzougbouhamdi8352
@merzougbouhamdi8352 2 жыл бұрын
Thanks Sir
@myetis1990
@myetis1990 2 жыл бұрын
Good job Phil, thanks for the effort. You mentioned the applications of use as motor vibration noise elimination from accelerometer sensors, but as you know the props are spinning at variable speeds, so the vibration frequency may vary. So, how do we decide which freq to be notched?
@kersgames6382
@kersgames6382 7 ай бұрын
Maybe a bit late, but I got to this problem actually today. I was measuring my system by putting in a constant accelertion of a linear actuator, but because of a big mass which was undamped, a resonance in my measurement signal was determined. By putting a notch filter in my controller on the resonance frequency, the controller completely damped the resonance frequency. Another implementation can be that you indeed want to damp your input signal. Therefor, a moving notch filter can be applied (currently being implemented for a wide range of drone's). With that, your acceleration changes are damped, such that your accelerometer can actually measure your accelerations. It sounds not that intuative, but you think of it by blocking your input accelation from your measured accelerion.
@PhG1961
@PhG1961 2 жыл бұрын
Impressive !
@MrRonychakraborty
@MrRonychakraborty 2 жыл бұрын
Just awesome
@vasilikimantiou4897
@vasilikimantiou4897 9 ай бұрын
Great content as always! Can we do the same with the bluepill developing board?
@szymon4602
@szymon4602 2 жыл бұрын
15:39 "Serial monitor link in the desctription" it seems to be missing.
@Alan96555
@Alan96555 Жыл бұрын
I cant find the notch filter code in your github. Also, im trying to use the serial oscilloscope with DAC DMA, but i cant
@randybasil1715
@randybasil1715 2 жыл бұрын
can you build flight controller for model rocket tvc
@OASH_
@OASH_ 2 жыл бұрын
Hello Phil, Any news about the KiCAD PCB course you were planning to release. thanks!
@PhilsLab
@PhilsLab 2 жыл бұрын
Hi, Sorry for the delay - I'm really putting my head down to get this course finished now. Just need to do the voice overs and check the content, then it should be ready!
@matheusschlosserbasso5649
@matheusschlosserbasso5649 2 жыл бұрын
Awesome!!! Just one question. Why not use ZOH to discretize the tf?
@PhilsLab
@PhilsLab 2 жыл бұрын
Thank you, Matheus. There are many ways to discretise - I've just opted with this method in this case.
@lmmlStudios
@lmmlStudios 2 жыл бұрын
amazing
@jotabr570
@jotabr570 2 жыл бұрын
Hi Phil thank you and congratulations, this is excellent material. Are you planning to cover other filters like Chebyshev or Butterworth ? That would make this series very complete. Thanks again.
@obregr
@obregr 2 жыл бұрын
good contend
@PhilsLab
@PhilsLab 2 жыл бұрын
Thanks!
@carlosvargas2907
@carlosvargas2907 2 жыл бұрын
I think I love you
@oskarzajac8935
@oskarzajac8935 Жыл бұрын
instant like
@PhilsLab
@PhilsLab Жыл бұрын
Thanks!
@swilwerth
@swilwerth 2 жыл бұрын
I have a problem with a set of IIR filters where the filter computation of a bit stream needs to be done in parallel (to gain speed on a multicore system). So, the input stream is split on overlapping chunks of fixed sample count and sent each to the parallel filter threads, then the outputs of the filters are concatenated in order to assemble the output signal as it was done with a single filter. There are a major issue there. As the IIR are feedback type, the current output depends on previous values, so it produces edge distortion at the beginning of each block (it does not know the previous values). The question is. Are there a way to compute how many samples of the previous block are needed to minimize the start of the block edge distortion in a way the resulting distortion is less than a given error magnitude? (The procedure is to add N samples of the previous block to the beginning of the current one, the question is how to determine N given an arbitrary IIR) I guess it is something related to the maximum absolute value of the Z exponent on the transfer function and its weight. But I guess someone solved that before. Do you know some specific keywords for searching for this particular problem available solutions? Searching for parallel IIR implementations I found a summing solution, but not the one I described. In this one the filter is applied to different time portions of the input in parallel not the same portion and then the output summed.
@guntramblohm4179
@guntramblohm4179 3 ай бұрын
You're generating 100 samples per second, so, your sample rate is 100 Hz, and you're filtering out 50 Hz. Nice and fine. But if you have a much higher sample rate, say, 10 KHz, and still want to filter out 50 Hz, wouldn't you need a formula that stores many more of the previous samples (and converted results)?
@guntramblohm4179
@guntramblohm4179 3 ай бұрын
ok, that was a stupid question - the X and Y values are sufficient to describe a "correction wave", which, if subtracted from the original values, filters out the 50Hz signal. But you only need X and Y to describe that correction, not a memory of all previous values that describe how the parameters were found.
@meyou118
@meyou118 2 жыл бұрын
Altium is too expensive for hobbists... you sold out man! - im unsubscribing
PCB Design for Manufacturing Tips (DFM) - Phil's Lab #40
15:22
Phil’s Lab
Рет қаралды 35 М.
FIR Filter Design and Software Implementation - Phil's Lab #17
30:35
ПЕЙ МОЛОКО КАК ФОКУСНИК
00:37
Masomka
Рет қаралды 4,8 МЛН
Uma Ki Super Power To Dekho 😂
00:15
Uma Bai
Рет қаралды 37 МЛН
Surprise Gifts #couplegoals
00:21
Jay & Sharon
Рет қаралды 30 МЛН
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 20 МЛН
2-Layer PCB Design Tips - Phil's Lab #137
32:27
Phil’s Lab
Рет қаралды 16 М.
What the HECK is a NOTCH Filter?!
14:22
GR-Research
Рет қаралды 18 М.
Parallel Termination Basics - Phil's Lab #119
22:15
Phil’s Lab
Рет қаралды 20 М.
Applied DSP No. 9: The z-Domain and Parametric Filter Design
21:16
Youngmoo Kim
Рет қаралды 18 М.
Recursive RMS (STM32 Implementation) - Phil's Lab #103
21:11
Phil’s Lab
Рет қаралды 17 М.
Extended Kalman Filter - Sensor Fusion #3 - Phil's Lab #37
15:37
Phil’s Lab
Рет қаралды 55 М.
8. IIR Filters - Infinite Impulse Response - Digital Filter Basics
14:58
Op Amp Theory and Design - Phil's Lab #53
28:36
Phil’s Lab
Рет қаралды 41 М.
Why spend $10.000 on a flashlight when these are $200🗿
0:12
NIGHTOPERATOR
Рет қаралды 17 МЛН
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Рет қаралды 2,2 МЛН
❌УШЛА ЭПОХА!🍏
0:37
Demin's Lounge
Рет қаралды 331 М.
Any Sound & Call Recording Option Amazing Keypad Mobile 📱
0:48
Tech Official
Рет қаралды 326 М.
Android top🔥
0:12
ARGEN
Рет қаралды 1,2 МЛН