Visually Explained: Kalman Filters

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 มิ.ย. 2024
  • A visual introduction to Kalman Filters and to the intuition behind them.
    -----------------------------------------------
    Timestamps:
    0:00 Intro
    4:30 Kalman Filters
    5:37 Prediction Step
    7:14 Update Step
    -----------------------------------------------
    Typos:
    - at 3:00. A car going at 60 km/h would be 1 km away after 1 minute, not 1 hour.
    - around 9:00, the Kalman gain Kx is not only between -1 and 1, it is actually nonnegative because it corresponds to an observed variable x. (Kxdot can still be negative of course if x and xdot are negatively correlated.)
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 72

  • @orestesmas
    @orestesmas 3 ปีที่แล้ว +184

    Hey, at 60 km/h, after 1 hour you are 60 km away, not one! 🙂
    Perhaps you meant 1 minute later...
    Anyway, the animation is nice, but the voice sounds a bit "echoey"/ metallic. Perhaps is my phone, though.
    Also, the left-side terms in the first equation seem a bit misaligned vertically.
    Can't finish the video now. More comments (perhaps) later.

    • @VisuallyExplained
      @VisuallyExplained  3 ปีที่แล้ว +50

      Thanks for the detailed feedback!
      - "at 60 km/h, after 1 hour you are 60 km away, not one!" Good catch!
      - "... the voice sounds a bit "echoey"/ metallic ..." I will try to fix that in the future.
      - "the left-side terms in the first equation seem a bit misaligned vertically." Yeah ... that's because of the animation with matrices that follows, I didn't think it was worth spending time on it to fix it. But it's good to know that it is noticeable.

    • @joegriffith1683
      @joegriffith1683 ปีที่แล้ว +11

      @@VisuallyExplained also your avatar is 1 millimeter too far to the left, unacceptable. xx

    • @Elmaxsivu
      @Elmaxsivu ปีที่แล้ว +2

      XD omg. next time i will jump to the comments faster. Been beating myself up for 15 min thinking I forgot basic motion principles. :D I even tried converted to miles since he mentioned California (thought maybe he got the unit wrong) :D. The video is top quality though.

    • @MashMash
      @MashMash ปีที่แล้ว

      @@joegriffith1683 (perhaps)

    • @ismzaxxon
      @ismzaxxon ปีที่แล้ว +1

      @@Elmaxsivu lol. Star trek, modern SciFi and NASA use kilometres :)

  • @Daemonop1
    @Daemonop1 2 ปีที่แล้ว +54

    "The surprise term is the difference between what you have predicted and what you have measured. The larger this is, the more surprised you are - and the more you question everything that you learned at University."

  • @fifaham
    @fifaham 3 ปีที่แล้ว +12

    Very well explained - Bravo to you

  • @hexalgo5506
    @hexalgo5506 3 ปีที่แล้ว +8

    Good job. Very clear explanation

  • @ayenewyihune
    @ayenewyihune 8 หลายเดือนก่อน +1

    i love such videos when i start a new topic. thanks!

  • @luzhang7537
    @luzhang7537 2 ปีที่แล้ว +10

    I agree that 1 hour 1 km is very confusing, which is slower than the walking speed

  • @mohamedwassimbaba3646
    @mohamedwassimbaba3646 ปีที่แล้ว

    Nice :) happy to see your again via your videos 🙂

  • @hoerbschmidt618
    @hoerbschmidt618 ปีที่แล้ว

    great explanation to establish a general understanding of the topic. Thx!!

  • @user-qp8hb3xd4b
    @user-qp8hb3xd4b 3 ปีที่แล้ว +5

    Wow thank you. What an exposition!

  • @nickst2797
    @nickst2797 2 ปีที่แล้ว +6

    NIce! Can you also make one for Extended Kalman Filters?

  • @asdjajsdjasjd
    @asdjajsdjasjd 2 ปีที่แล้ว +2

    I just came to your channel, great videos. Have you ever considered making a video about the connection between kalman filters and what happens if you design a luenberger observer with the riccati controller formula?

  • @joebates93
    @joebates93 6 หลายเดือนก่อน

    Fantastic video. Really explained this topic well

  • @akhils7311
    @akhils7311 ปีที่แล้ว +2

    Hey, It was great explanation. I have a question at video time 10:52, where the predicted state x_(t+1) + h has a common term K Which is multiplied with (y_t+1 - Hx_(t+1)), and my question is how significant the measurement state i.e. y_(t) in this calculation. I did not get where is that being considered. And also could you clarify how the current state system is considered i.e. x_(t) as mentioned at video time 5:14.

  • @mengfan9959
    @mengfan9959 2 ปีที่แล้ว

    Best short video for KF so far

  • @nadilaayunovanti3892
    @nadilaayunovanti3892 2 ปีที่แล้ว

    thank you to making this video, it's clear enough

  • @justinarmer3918
    @justinarmer3918 ปีที่แล้ว +41

    Saying something is ‘visually explained’ because equations were displayed visually might be missing the spirit of the title.

  • @michaelwirtzfeld7847
    @michaelwirtzfeld7847 3 ปีที่แล้ว +13

    Nice. You indicate that the Kalman gain term can be between -1 and 1, but only explain the case when it is 0 and when it is 1. I would add a note in the video to a reference describing why it could be -1 or edit the audio to remove this statement.

    • @VisuallyExplained
      @VisuallyExplained  3 ปีที่แล้ว +3

      You make a valid point! While a Kalman gain like "Kx,xdot" can take negative values, "diagonal" Kalman gains like Kxx are always between 0 and 1. I will add this to the video description.

    • @puekai
      @puekai ปีที่แล้ว

      I was going to say this. How can you have something that is the ratio of two variances to be negative.

  • @mickjoris4039
    @mickjoris4039 ปีที่แล้ว

    Very good video. Thank you!

  • @pauliusztin
    @pauliusztin 2 ปีที่แล้ว

    Great video!

  • @puekai
    @puekai ปีที่แล้ว +1

    Nice video. May we know if P and Q should be given, or are they calculated online?

  • @peterkaladius6718
    @peterkaladius6718 ปีที่แล้ว

    Thank you very much!

  • @tymofei8586
    @tymofei8586 ปีที่แล้ว

    Why dont you take into account inaccurate initial conditions? I mean if initial position and velocity information is incorrect,besides perturbations,inaccuracy coming from initial conditions should propogate as well.Does that included in sigma_t ?

  • @aammoojanhastam3397
    @aammoojanhastam3397 5 หลายเดือนก่อน

    Hello sir, I would like to cite this video in my research paper can you kindly explain me how to? thank you.

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w 2 ปีที่แล้ว

    Superb explanation

  • @user-zl6ch8om5q
    @user-zl6ch8om5q 5 หลายเดือนก่อน

    very nice , thank you

  • @XuanJr.
    @XuanJr. 3 หลายเดือนก่อน

    If last year is anything to go by, the world is far from perfect.

  • @iloraishaque2594
    @iloraishaque2594 ปีที่แล้ว

    Fantastic

  • @rashasalim1259
    @rashasalim1259 3 ปีที่แล้ว +2

    Would it be possible to use the algorithm for tracking the vehicle position in real time. And I'm talking every second rather than hour?
    Thanks a lot for the great video!

    • @VisuallyExplained
      @VisuallyExplained  3 ปีที่แล้ว +2

      Absolutely! The algorithm is super fast, you can even use at a higher frequency than once every second (if your measurement instruments can keep up).

    • @rashasalim1259
      @rashasalim1259 3 ปีที่แล้ว

      Thanks a lot! We are trying to track the position using a mobile device. So we were looking for an algorithm that uses minimum processing power/ resources and now considering this as an option.

  • @alejandrocarrasco5648
    @alejandrocarrasco5648 2 ปีที่แล้ว

    I love you man. Thankssssssssssssssssssssssss

  • @phogbinh
    @phogbinh 2 ปีที่แล้ว +1

    Hi, thank you for sharing your knowledge on this difficult topic! May I ask for the derivation of next sigma = P + A sigma A transpose? I am struggling with the integrals xD
    Also, A needs to be invertible right?
    Thank you!!

    • @VisuallyExplained
      @VisuallyExplained  2 ปีที่แล้ว +5

      Sure!
      This is coming from the fact that
      x_next = Ax + u,
      so assuming u is independent from x, we get var(x_next) = var(Ax) + var(u)
      On the one hand, var(u) = P by assumption
      On the other hand, var(Ax) = A var(x)A^T (This is always true by the way, as long as the matrix A is deterministic)
      Since var(x) = Sigma_t, we get the result you stated.
      Note that we didn't need the fact that A is invertible. (A^T denotes the transpose of A, not the inverse).
      Hope this helps.

    • @phogbinh
      @phogbinh 2 ปีที่แล้ว +1

      @@VisuallyExplained Thank you for your response!!!
      Worked through the hassles with monstrous integrals and baffling matrix lemmas (inverse & determinant), truly frightening, but at the same time exciting.
      Got it, A needs not to be invertible!
      Also, do you recommend any texts on the history of inventing the Kalman Filter? That must be very fun to read.

  • @vishnuparappurath3466
    @vishnuparappurath3466 2 ปีที่แล้ว

    nice video

  • @alivecoding4995
    @alivecoding4995 ปีที่แล้ว

    Thanks! :)

  • @harishbattula9881
    @harishbattula9881 2 ปีที่แล้ว

    thanks

  • @locomotech6302
    @locomotech6302 2 ปีที่แล้ว

    thank you
    it is very clear !!
    But .. Excuse me, maybe I didn't understand something!
    It is obvious that counting one hour and at a speed of 60 km / h, the two distances 0.8 km and 1 km are false and far away!
    Don't you agree with me that the position should be around 60 km ??
    I hope you mean t = 1.00mn
    and not t = 1.00h

    • @VisuallyExplained
      @VisuallyExplained  2 ปีที่แล้ว

      Hey there, thanks for watching carefully! You are right, it’s a typo. It should be 1 minute instead of 1 hour exactly as you pointed out.

  • @andrewahlstrom8359
    @andrewahlstrom8359 2 ปีที่แล้ว +5

    It's difficult to keep track of what each equation refers to -- please name your variables descriptively.
    This concept was not visually explained: It used pictures, but it was explained for those who have a strong math background. When advertised as a visual explanation, I hoped for less of a mathematical explanation and more of a logical breakdown of the concept, with the math as a secondary support. Instead It feels like the math is the primary descriptor, and the explanation is very difficult to follow without a strong mathematical background.

    • @VisuallyExplained
      @VisuallyExplained  2 ปีที่แล้ว +4

      Hey there, thanks for watching! I understand where you are coming from. It's hard to calibrate the video to all backgrounds. This video's target are 1st and 2nd year engineering undergrads that have some familiarity with linear algebra and dynamical systems. If you don't come from a math background, it might be hard to follow all the equations in the video, especially towards the end. But hopefully you still get a sense of what Kalman Filters do, how they can be useful, and maybe have a clearer idea of what you should look up next related to Kalman filters. In any case, thanks a lot for leaving a comment, it helps me improve for the next videos.

  • @XuanJr.
    @XuanJr. 3 หลายเดือนก่อน

    Cool

  • @fifaham
    @fifaham 3 ปีที่แล้ว +3

    Sadly the car can not start moving at constant speed from time = 0+. \\\ In the beginning the speed starts from 0 then accelerates (Delta V / Delta t) until it reaches constant speed.

    • @VisuallyExplained
      @VisuallyExplained  3 ปีที่แล้ว +1

      You are absolutely right! Realistically, a car cannot go for a speed of 0 to V in no time (even for Tesla cars that are known for some insane accelerations). However, I have picked a stylized dynamics model here that only involves two state variables (position and velocity only, without acceleration) in order to make the problem two dimensional, and therefore easier to visualize and explain.

    • @fifaham
      @fifaham 3 ปีที่แล้ว

      @@VisuallyExplained That's what they taught us in the University in Physics and the real life is something else. In electrical engineering we have something called electric current at t = 0 and t = 0+ and t = 0- funny but true

  • @yogeshgangurde9834
    @yogeshgangurde9834 2 ปีที่แล้ว +1

    the first few seconds were true for me, except the whole Tesla thing >_

  • @firstdev1653
    @firstdev1653 2 ปีที่แล้ว

    Thanks for the awesome explanation 👏👏
    I would suggest adding some nice background music, it would be great

    • @VisuallyExplained
      @VisuallyExplained  2 ปีที่แล้ว +1

      Thanks for watching! I will try to incorporate your feedback in next videos.

    • @thorntontarr2894
      @thorntontarr2894 2 ปีที่แล้ว

      Why is background music "nice"? Should you not be listening to the lecture? You would catch the 1km vs. 60km error described above more easily without audio disturbances.

  • @satellite964
    @satellite964 2 ปีที่แล้ว +1

    Feedback. Please give the variables in the equation full names and descriptive names instead of single letter names such as “Q”. Thanks.

    • @ayasera_9501
      @ayasera_9501 ปีที่แล้ว

      Q is just the covariance of the noise, before learning KF you need to have some probability knowledge otherwise its gonna be hard

    • @satellite964
      @satellite964 ปีที่แล้ว +1

      @@ayasera_9501 Is is that difficult to explain sth from first principles in a simple manner?

    • @ayasera_9501
      @ayasera_9501 ปีที่แล้ว

      @@satellite964 i think the presenter just assumed the watcher might have this previous knowledge

  • @oussamasadki6788
    @oussamasadki6788 2 ปีที่แล้ว

    Good explanation, i bet you are Moroccan 😅, let me know if you are.

    • @VisuallyExplained
      @VisuallyExplained  2 ปีที่แล้ว +1

      Spot on! What gave it away?

    • @oussamasadki6788
      @oussamasadki6788 2 ปีที่แล้ว +1

      I figured it out just the way you speak xD, I am delighted there are such amazingly explained videos on youtube done by a Moroccan.
      I will be honoured to contact you on Facebook.
      I have already sent you a friend request.

  • @nanduneo1
    @nanduneo1 2 ปีที่แล้ว +1

    Ideal situation 1 km in one hour..far from ideal

  • @mandi8345
    @mandi8345 ปีที่แล้ว

    Thats weird....the mechanical speedo in my can isnt noisy at all....Maybe if youre using noisy sensors you need to invest in better designed sensors instead of those amazon cheapos. Also, before applying to Tesla please for the love of god, learn to program for failure modes.... The amount of videos of vehicle 'AI' systems freaking out at the moon because it thinks its a traffic light. Or a traffic light, being transported and freaking out because it cant see the color indicator, or at cones again on a truck....what if some youngin programmer decided to have the car slam on the brakes when one of these false positives come through? Yeah, the state of these systems arent actually road safe. 'It works' is NOT a end point. 'We cannot get it to screw up' is. Unfortunately too much has been invested into the 'it works, ship it' industry, that when they discover what we already knew since the 70s (computers only got faster since then, we're still computing in binary kiddies) that TEACHING A COMPUTER TO DRIVE IS ALMOST IMPOSSIBLE!!!! Sleep well knowing these 'it works, good enough, ship it' 3 ton machines are mindlessly following lines, not actually conceptualizing their environment...... Maybe when it runs over a kid instead of some bum, again, you people will listen....but I doubt it....

  • @midzy9639
    @midzy9639 ปีที่แล้ว

    bad audio

    • @VisuallyExplained
      @VisuallyExplained  ปีที่แล้ว +1

      Hey! Thanks for the feedback! I tried to improve the audio in the more recent videos, let me know what you think

  • @maxdefire
    @maxdefire 2 ปีที่แล้ว

    0:04 Worst outcome of graduation.