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.
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.
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 "
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?
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.
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.
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?
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
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.
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')
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;
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.
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
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.
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.
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.
Thank You! From Frisco, TX
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 "
i can't find the full code on github please someone help
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?
why we need to multiply the Q matrix with G and transpose
This is the process noise developemt process in KF. You can see the book by Alex becker for further info.
@@_ShihabulEhsan sure I'll have a look
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.
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.
Can you explain what you mean by Kalyan filter with the dynamical model
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?
Weird, compiling the code results in an error
have you found a solution?
@@cactustv8145 no
I think the basic linear algebra library has changed something causing this.
I think you have to use the basic linear algebra library version 3.3 to get it properly compiled
@pratik did you implemented vertical velocity flight controller into your esp drone?
to calculate altitude, isn't integrating the velocity and adding the previous altitude enough? whats 0.5*Ts^2 *acc_z,inertial for ?
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
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.
Could you show how to do it in a code please?
In the real code its allready like that ( line 44 ) => P=(I-K*H)*P;
Thanks for the heads up ! I had issues with the matrix incompatibility but turns out its the wrong matrix
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')
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;
@@parahoping did it work for you after these corrections?
Yes. The default BLA matrix data type is float. So the 10 also needs to be float.
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.
i'm not getting these values my valeus are like thousands of altidtute and velocity is like -4k to 2k
Thanks Bro.
You helped a lot.
Magistral video. Gracias
Any one able to convert this to python... ?
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
hii bikash, has your code working now??
Is acc really required?
I thought Parameter is enough …
First to make LIKE
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