19 | Combine an accelerometer and barometer to measure altitude

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ม.ค. 2025

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

  • @dinhtrungche9619
    @dinhtrungche9619 11 หลายเดือนก่อน +7

    You sir, have the greatest drone tutorial I have ever seen. I love that you actually dives into the relevant theories. I certainly need to do a lot more reading, but this gave me the perfect guideline as to what to study. I learned more from you than 3 years in engineering school. Thank you.

  • @have_fun1107
    @have_fun1107 8 หลายเดือนก่อน +10

    These change solves the problem: Q = G * ~G*10.0f*10.0f; BLA::Matrix inv_L = Inverse(L);
    K=P*~H*inv_L; also remove the space after : to see the result in serial plotter.

  • @rokasbarasa1
    @rokasbarasa1 5 หลายเดือนก่อน +1

    Thank you for not simplifying the matrix calculations. It really helped to understand how it works and why you initialize it the way you do.

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

    Thank You! From Frisco, TX

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

    Such a great project, very well explained. I just notice, on the lines 171 and 173, you will have to remove the space after the label for the arduino IDE 2.0 in order to have a working plotter serial.
    the label shoud be "Serial.print("Altitude [cm]:");" without space beteewing the : and "

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

    i can't find the full code on github please someone help

  • @myetis1990
    @myetis1990 4 หลายเดือนก่อน

    hello, thanks for the great video,
    is it possible to use a magnetometer for this drone and does it worth?
    if we want to add this feature then how to apply Kalman filter?

  • @thebigelectrode
    @thebigelectrode 9 หลายเดือนก่อน +2

    why we need to multiply the Q matrix with G and transpose

    • @_ShihabulEhsan
      @_ShihabulEhsan 8 หลายเดือนก่อน

      This is the process noise developemt process in KF. You can see the book by Alex becker for further info.

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

      @@_ShihabulEhsan sure I'll have a look

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

    The performance can be improved if you can implement a kalman filter with the dynamical model of the system. this will involve computing the weight of the quadcopter. Also, the rates of both the accelerometer and barometer are not the same so as can be seen from the results there is a jump in the readings that might be because of the pressure data arriving at a lower rate than the accelerometer data. I will try this with my setup some time.

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

      Its normal I guess because of the fact that, the trust morely depends on the barometer sensor , it will close accurate value when the barometer data come in. Other drifting causes from accelerometer.

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

      Can you explain what you mean by Kalyan filter with the dynamical model

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

    My ESCs are turning on separately when I connect them to the receiver one by one, but they are not turning on when I connect all of them and start the drone. I've tried everything, I changed the teensy, I got a bigger battery, and re-assembled the whole upper part and its still not working. What can It be?

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

    Weird, compiling the code results in an error

    • @cactustv8145
      @cactustv8145 8 หลายเดือนก่อน

      have you found a solution?

    • @epicdaniel508
      @epicdaniel508 8 หลายเดือนก่อน

      @@cactustv8145 no

    • @_ShihabulEhsan
      @_ShihabulEhsan 8 หลายเดือนก่อน

      I think the basic linear algebra library has changed something causing this.

    • @pratikphadte
      @pratikphadte 7 หลายเดือนก่อน

      I think you have to use the basic linear algebra library version 3.3 to get it properly compiled

    • @_ShihabulEhsan
      @_ShihabulEhsan 7 หลายเดือนก่อน +1

      @pratik did you implemented vertical velocity flight controller into your esp drone?

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

    to calculate altitude, isn't integrating the velocity and adding the previous altitude enough? whats 0.5*Ts^2 *acc_z,inertial for ?

    • @LuisAngelFuentesAlvarez
      @LuisAngelFuentesAlvarez 4 หลายเดือนก่อน

      I think you have a point. However, if you remember the equations motions of a single particle in the space (UMA), to estimate its altitude we can use h = v0•t + (1/2)•g•t^2. Then, in this context, we can change the g -> AccZ measurement, and this results more effective

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

    There is a mistake in your equations. When updating your uncertainty (covariance matrix P) a posteriori, that is, after measurement, you should write $P(k) = (I-KH)P(k)$, with H being the observation matrix. Other than that, great video! Really informative and adequately paced, congratulations.

    • @SLab-ti8zp
      @SLab-ti8zp ปีที่แล้ว

      Could you show how to do it in a code please?

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

      In the real code its allready like that ( line 44 ) => P=(I-K*H)*P;

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

      Thanks for the heads up ! I had issues with the matrix incompatibility but turns out its the wrong matrix

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

    Hi. I'm following your project in the same way but on the board Arduino pro mini. And now I really need your help!
    I'm stuck at the two lines. The first one is line 39 K=P*~H*Invert(L); I kinda manage it by changing Invert to Inverse. But not sure.
    The second problem is line 169 Q = G * ~G*10*10; It seems like the matrix numbers are not matching, but it is hard to figure out how to fix them.
    PLEAS help me out!!
    The compilation error is
    : no match for 'operator*' (operand types are 'BLA::Matrix' and 'int')

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

      I had the same issue. For the Q = G * ~G * 10 * 10; I've changed the Matrix types to float like so:
      BLA::Matrix F; BLA::Matrix G;
      BLA::Matrix P; BLA::Matrix Q;
      BLA::Matrix S; BLA::Matrix H;
      BLA::Matrix I; BLA::Matrix Acc;
      BLA::Matrix K; BLA::Matrix R;
      BLA::Matrix L; BLA::Matrix M;
      And explicitly indicated that 10 is float and not int:
      Q = G * ~G * 10.0f * 10.0f;

    • @Sebastianltaylor
      @Sebastianltaylor 11 หลายเดือนก่อน

      @@parahoping did it work for you after these corrections?

    • @_ShihabulEhsan
      @_ShihabulEhsan 8 หลายเดือนก่อน

      Yes. The default BLA matrix data type is float. So the 10 also needs to be float.

    • @srijitmandal6853
      @srijitmandal6853 21 วันที่ผ่านมา

      the first problem is solved by changing the invert function to Inverse(). It was a trouble for me as well. I was thinking why all problems occur only with me in the world. seeing a person like you gives me a company. However, I solved the problem all by myself by looking into the datasheets in the official website. The second problem was solved by my copilot ai.

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

    i'm not getting these values my valeus are like thousands of altidtute and velocity is like -4k to 2k

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

    Thanks Bro.
    You helped a lot.

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

    Magistral video. Gracias

  • @ngweisheng996
    @ngweisheng996 10 หลายเดือนก่อน

    Any one able to convert this to python... ?

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

    Sir, I am doing the same project but I am getting an offset value of altitude of 5.32 cm and velocity of -29.5.. plz help me for getting the correct results

    • @dipanshudhote5671
      @dipanshudhote5671 4 หลายเดือนก่อน

      hii bikash, has your code working now??

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

    Is acc really required?
    I thought Parameter is enough …
    First to make LIKE

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

      It could be, but fusing the two using something like a Kalman filter provides more accurate data as even the barometer is going to have noisy data