PID-Analyzer
PID-Analyzer copied to clipboard
Compatibility with KISS
Hello @Plasmatree ,
I just discovered this tool and it looks very interesting so thank you very much for this! I'm mainly using a KISS FC V2 ATM but I ran into a few issues. Here is my log (100% log rate, no debug set): GOPR0173.TXT
I get the following error message:
INFO 2018-04-30 20:33:14,848 PID-Analyzer.py:562: PID-Analyzer 0.31
INFO 2018-04-30 20:33:14,848 PID-Analyzer.py:563: Hello Pilot!
INFO 2018-04-30 20:33:14,848 PID-Analyzer.py:572: Interactive mode: Enter log file, or type close when done.
Balckbox log file path (type or drop here): LOG00015.TXT
Optional plot name:kisstest
WARNING 2018-04-30 20:33:23,625 PID-Analyzer.py:518: Ignoring BBL session '...\\test2\\LOG00015_temp0.TXT', 61B < 500000B.
Decoding log '...\LOG00015_temp1.TXT' to '...\test2\LOG00015_temp1.01.csv'...
Log 1 of 1, start 00:51.011, end 04:07.178, duration 03:16.166
Statistics
Looptime 999 avg 75.4 std dev (7.5%)
I frames 6085 36.9 bytes avg 224832 bytes total
P frames 187419 20.6 bytes avg 3854044 bytes total
E frames 2 9.0 bytes avg 18 bytes total
Frames 193504 21.1 bytes avg 4078876 bytes total
Data rate 986Hz 20943 bytes/s 209500 baud
92 frames failed to decode, rendering 1354 loop iterations unreadable. 2686 iterations are missing in total (2685ms, 1.37%)
INFO 2018-04-30 20:33:25,760 PID-Analyzer.py:308: Reading log 0...
INFO 2018-04-30 20:33:26,469 PID-Analyzer.py:328: Done!
INFO 2018-04-30 20:33:26,470 PID-Analyzer.py:200: Processing:
Traceback (most recent call last):
File "PID-Analyzer.py", line 591, in <module>
File "PID-Analyzer.py", line 524, in run_analysis
File "PID-Analyzer.py", line 364, in __init__
File "PID-Analyzer.py", line 381, in _csv_iter
File "PID-Analyzer.py", line 201, in __init__
File "PID-Analyzer.py", line 339, in find_traces
ValueError: could not convert string to float:
Failed to execute script PID-Analyzer
Line 339 is trying to parse the "tpa_breakpoint" header but it doesn't exist.
So I added this manually which worked but I have no clue if this value is ok and/or if it impacts the results:
H tpa_breakpoint:1650
Then I got a similar error at line 348. Which is trying to parse the rollPID, pitchPID and yawPID headers. So I tried to add them manually (these are my kiss pids):
H rollPID:4.2,0.05,16
H pitchPID:5.8,0.055,18
H yawPID:8,0.05,3
After that the graph showed up but something is not right. Maybe not only the scaling? See
Dividing all pids by 10 seem to change the scaling and the graphs look better. But is this correct?
See
Let me know if there's anything else I can do to help, Hervé
Oh, never tried kiss. Didn't know that the logs are compatible! Can you upload/send the log?
@Plasmatree It's there in the description. Thanks a lot ;)
I had a look at it, but it's not that straight forward. Problem is that I don't know the exact PID and RC-input implementation of kiss since it's closed source.
Differences to betaflight I noticed:
- The gyro scale is different
- the PID-scaling factors are unknown (~10x compared to betaflight?)
- the PID-values are not saved in the log header
These are all necessary. I will search some more, or maybe even ask their support. Nonetheless thanks for the inspiration! ;)
Hi @Plasmatree The PID scaling may very well be 10x for roll and pitch as the values I put there are quite similar to many people and it does fly very very well. For yaw they probably have another scaling. There is an option called "yaw filter strength" in the GUI which is set by default to 35 (which is what I'm using). Maybe this impacts the scaling. But yes, better ask them what's going on exactly ;) The main developer is "juuuut" (Felix) on rcgroups.
Either using the same formulas in this app or emulating them I would think PIDs would be scalable between RF/BF/Kiss without too much fuss.
https://apocolipse.github.io/RotorPirates/
Version 0.51 seems to work somehow with a Kiss V2 log file without the need to add anything manually to the lofgile. The PID and TPA infos are missing as Kiss does not write those to the logfile. But the general Charts seem to look ok (as far as I can tell without having any real knowledge about this ;-) ) I tried some tuning and it seems to be working with my little understanding. at last Changes in P and D have the desired effects. Increasing I however does not move the lines up, instead it goes down. And I seems to have some dampening effects that I did not expect. Don't know if this is a Kiss specific thing though.
Haha, sweet! That wasn't really planned. :D The gyro scale is still different. What's you max rate? Something 1100deg/s?
edit: Try to set a static notch to ~410hz ;)
Yea I'm running 1027° on roll and pitch and 70° on yaw. I'm running the adaptive filter from kiss, so notch should normaly not be requiered. however I might give it a try just for fun ;-)
With this current tune I'm not quiet sure if D is not too high on pitch, as it seems as if D is oscilation quiet a bit when looking at the data with blackbix explorer:
If the dynamic notch is similar to bf, it fails >400hz. That's where your motor noise is amplified by the d-term (top right corner: 70-100% throttle, ~410hz). Put a notch on there, preferably in gyro and mybe skip on the d-term notch instead (it's even possible that the d-term notch supports a resonance at higher frequencies, since it induces additional phaseshift between P and D, but that's someting I'm currently investigating myself.) It seems like you got a frame (?) resonance at 100hz on pitch (constant horizontal line). Maybe D on pitch is really slightly high, since also the reponse looks a bit over damped.
Hi ! so is this version kiss compatible without any add on the txt log ?