Thread Tools
Oct 16, 2020, 12:53 PM
Registered User

IMU temperature data on NT Bus


Hello Olli,

I'm trying to read the temperature of the IMU (MPU-9250 & ICM-42605) on the NT bus with the NT DataLogger (Temp 1+2)
but they stay at 0.

This is documented on the 'NT Data Logging' wiki page and I see that it has bee used already but it is not working for me...

BGC-V3.3 V2.54e
NTIMU-V2-MPU9250 V0.44
NTIMU-V3-ICM42605 V0.44

I did not try to upgrade the IMUs to V0.46, is it working in the latest version ?

Thank you.
Last edited by patrick99; Oct 16, 2020 at 01:34 PM.
Sign up now
to remove ads between posts
Oct 16, 2020, 01:02 PM
OlliW
Thread OP
I am not totally sure what the issue could be (there had been a bug which resulted in wrong temperatures, which I corrected some time ago, but it should not lead to 0 values), but I can tell you that with all latest firmwares it's working

you need however to enable gyro&acc raw logging
Oct 16, 2020, 02:41 PM
Registered User
Great, this was the reason, only Basic NT Logging was enabled, thank you !
Oct 16, 2020, 02:42 PM
OlliW
Thread OP
nevertheless, pay attention to that the temperature might be reported incorrectly, i.e., it would be good to go to the latest versions even if it's not just 0 now ...
Oct 16, 2020, 03:13 PM
Registered User
Quote:
Originally Posted by OlliW
@hvermeer

I am just looking at the NT log you have provided few posts up ... could you please tell me what sort of gimbal this is ????

I was think it is your 2 axis gimbal showing the freak out ... however, I see that

- you have the yaw axis enabled!!! How do you think the controller should work properly if you configure it as 3 axis?

- you don't have the encoder mode enabled ... why that?

- why do you get constantly increasing errors?

- are you sure you have configure Imu2 correctly?
This is my 3 axis gimbal that is installed on the ranger. It was a log prior to tuning it in preparation for today's flight.

This gimbal is just storm32 so no encoders.

I am 100% sure that I did not configure IMU2 correctly. Don't know why, but it wasn't calibrated until todays flight.
Oct 17, 2020, 09:58 AM
OlliW
Thread OP
ah, ok, thx for the clarification

the IMU2 needs not only be roughly calibrated, but especially the correct orientation needs to be chosen ... the data made me suspect that's not so
Oct 17, 2020, 11:17 AM
Registered User
Quote:
Originally Posted by OlliW
ah, ok, thx for the clarification

the IMU2 needs not only be roughly calibrated, but especially the correct orientation needs to be chosen ... the data made me suspect that's not so
You mean other than the things that the gimbal setup tools takes you through?

I believe that I have adjusted the yaw so that it is at almost an exact angle as well as setting the correct orientation in the beginning.

What suggests to you that it might not be chosen correctly? Please keep in mind that I sent you this log as an example, because about in the middle, the gimbal was moved to a almost 90 degree sideways orientation, that caused it to 'lose' it's bearings. After this, the gimbal became way more shaky, but this goes awayafter a complete reboot. This behavior I have known from the gimbal since the beginning.

Actually I think @HammerFPV made a mention of this too around page 116 in the T-Storm32 Thread.

P.s. If you are interested to see my latest Flight + Log, please see here -> Youtube Log
Oct 18, 2020, 12:36 AM
OlliW
Thread OP
I mean the Imu2 orientation (which should be set correctly by the gimbal setup tool). As said, the data made me wonder if it is correct, which means that it well could be correct, but I guess I would double check.

the issue HammerFPV reported was for a TSTorM32 gimbal, and thus not related to what you observed.

many thx for the logs and video. Looks good but still quite some vibs in the footage. The log indeed yield a stabilization level of ca +-0.1, which isn't too great. If you look at the FFT you'll see that much noise is in the 10-30 Hz range. This is probably the reason for the vibs.
Oct 18, 2020, 03:00 AM
OlliW
Thread OP
so, I did now a test version which logged the "real" I and D traces, in order to compare with the I and D traces reconstructed from the already available data in NTLoggerTool v0.45a, which I posted in the above

pl see the attached screen shots for the I pitch and D pitch traces.

as suspected/claimed, the info is clearly correct, except of this strange slope in the reconstructed I traces ...

the noise in the reconstructed D traces is just because of the limited resolution of the logged data

I've used my mobius test gimbal and it's not the best working gimbal, and, as said, I have no idea what I should learn now from the traces as regards improving the tuning, but you guys hopefully will teach me/us.
Oct 18, 2020, 05:35 AM
Registered User
Quote:
Originally Posted by OlliW
so, I did now a test version which logged the "real" I and D traces, in order to compare with the I and D traces reconstructed from the already available data in NTLoggerTool v0.45a, which I posted in the above

pl see the attached screen shots for the I pitch and D pitch traces.

as suspected/claimed, the info is clearly correct, except of this strange slope in the reconstructed I traces ...

the noise in the reconstructed D traces is just because of the limited resolution of the logged data

I've used my mobius test gimbal and it's not the best working gimbal, and, as said, I have no idea what I should learn now from the traces as regards improving the tuning, but you guys hopefully will teach me/us.
Nice! I'd be very interested to see!.

I adjusted my pids for the ranger gimbal and hopefully the performance will be better if I can find some good weather and time to make another flight.

Cheers
Oct 26, 2020, 11:44 AM
Registered User

Little guidence with PID tuning


Hey Ollie,

It has been a while since I have been able to fly with the NT logger, and I was able to capture some data during flight. I have been able to practice and dial in, both for better and for worse.

(See Pictures Attached)

To give you a summary, I have made 3 flights and adjusted the parameters accordingly after each flight. I started off with a PID deviation of ~0.1, but managed to get it ~0.06 to ~0.05 by dialing down both P and I slightly and increasing D. But it looked like some oscillation kept happening, thus I started tuning on the bench. I started the Gimbal up, and recorded a log where I moved the gimbal manually and watched how it settled. After 6 attempts, I managed to tune it in a way in which it settled without oscillating a bunch of times, but still kind of quickly. It led me to decrease the I value significantly, and almost doubling the P value.

Then I prepared for another flight, but things looked much worse for my gimbal. It appears that it no longer has any residual oscillations, but the performance is much worse.

Before moving back to the bench, I thought that I might seek for some advise from the master. You mentioned that the PID response is different from what I was used to, but I must really admit that I am kind of lost.

I realize too that by lowering the I drastically, and increasing the P I go against the advice that is given in the Tuning recipe to keep the I as high as possible. From the Logging results too, I notice that I has a major influence of the PIDsum. Basically towering the input that is given from the P and especially the D parameters; the I is doing all of the work.

Can you help me by pointing my head in the correct direction in knowing where to look? I am trying to grasp the mechanics of the PID that is being used in this gimbal. Having an I that is way more important than all of the other parameters goes completely against my previous beliefs.. Or giving me some advice on improving either one of my tunes?

I have uploaded a few video's

Before last tuning session
Stormy flight after last session
Link to four of the Logs

Supplement: I previously yielded my best results by setting i as high as possble, and finding the right P value to keep is from oscillating, but rather than just doing that I would really like to know how the mechanics work. :-)
Last edited by hvermeer; Oct 26, 2020 at 11:52 AM.
Oct 26, 2020, 12:20 PM
Registered User
supplement some of the images
Oct 26, 2020, 03:25 PM
OlliW
Thread OP
@hvermeer

so you've discovered through experiment that what is written is correct

the difference is because it is a 2nd order highly underdamped system, if you're interested in details you can check out my web page, I have the math there as well as some experiments and videos. The PID tuning rules as you know them are for FOPT systems

despite having researched the web heavily, I could not find any really useful tuning recipe for such systems. The one given in the wiki is the one which has emerged through experience in the early days, and there is not much more I would have to say

if one likes things to behave more similarly to what one knows one needs to use TStorM32

it may get repetitive however, it feels like it had been said so or similarly before

Oct 26, 2020, 04:23 PM
Registered User
Quote:
Originally Posted by OlliW
@hvermeer

so you've discovered through experiment that what is written is correct

the difference is because it is a 2nd order highly underdamped system, if you're interested in details you can check out my web page, I have the math there as well as some experiments and videos. The PID tuning rules as you know them are for FOPT systems

despite having researched the web heavily, I could not find any really useful tuning recipe for such systems. The one given in the wiki is the one which has emerged through experience in the early days, and there is not much more I would have to say

if one likes things to behave more similarly to what one knows one needs to use TStorM32

it may get repetitive however, it feels like it had been said so or similarly before

I have to admit that I already made an encoder attachment that I ordered along with the last batch of PCB's that I ordered, but I am never the one to easily give up.

I haven't gotten into the Storm Filters yet, it might offer yet some more improvements, and I was already pleased with the results that I've gotten.

The math is a little bit above my level, for now. Although I am very interested in it. I have done a few experiments of my own, and I might be able to better learn it's behavior in this way.

Will you eventually release the logging of seperate P I D parameters into a next release?

Herre
Oct 26, 2020, 10:30 PM
OlliW
Thread OP
learning by experiment is a very good approach, it's time consuming though

I don't plan to release any version with extra P I D logging, the reconstruction done in NTLoggerTool seems to be sufficiently good to me, and it's usefulness isn't yet really demonstrated. I think for the moment the NTLoggerTool approach is all it needs


Quick Reply
Message:

Thread Tools