-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[effectiveness] module and tool to log and process control effectiveness #2551
[effectiveness] module and tool to log and process control effectiveness #2551
Conversation
Very nice development Gautier! 😃 With the mixing, do I understand correctly that you want to be able to estimate the individual actuator control effectiveness from flying with a motor mixing matrix? And if you would be interested in the aggregated control effectiveness with motor mixing you would put an identity matrix there? I think that would be quite nice, but the risk is maybe that the control allocation is little bit more involved in the PPRZ motor mixing, (with scaling of the yaw command etc) such that the actuator commands may not be the same in reality as the ones on the drone. If that is what you want to do, wouldn't it make sense to log the actuator commands in the first place? Would it be possible to make the logger able to use other loggers as well, such as logger_file or one of the other SD loggers? With a wrapper maybe? I haven't tried it yet, but I'm excited to do so! Do you have a data file ready that I could maybe already see the script in action? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work Gautier!
{ | ||
"variables" : { | ||
"filt_cutoff" : 3.2, | ||
"act_dyn" : 0.008 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here it would be nice to put the time constant in rad/s, and then do the transformation to discrete time with the first order hold in the script such that it is irrespective of sample frequency. Also, this could be a property of an actuator as they can have different dynamics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but then embedded should also do that to make configuration easier, not sure it is already the case
"display" : [ | ||
{ | ||
"name" : "G1_P", | ||
"coef" : [0, 0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these coefs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the result is an array with commands in lines and inputs on columns, so you can select the one you want for a pretty print output with the display
section
The mixing matrix is not reflecting the motor mixing of the aircraft. It just tells for each commands (lines) which inputs (columns) should be considered. |
This is a test log that should work with |
Regarding the logger interface, it is not homogeneous in paparazzi, so it means a lot of |
This is an attempt to make a generic tool to log and process data used to estimate control effectiveness.
The module part can record all commands and imu data by default, plus a number of other sensor if required (position, speed, airspeed,...).
The ground tool is able to read the data and apply a series of filters before calling the optimization to find fitting parameters. A mixing matrix can also be applied to find cross talk like for full indi). Not all sensor models are implemented yet. The process is configured with a json file.
This is not really tested, only in the case of simple indi. And I'm not completely sure of the mixing part, so @EwoudSmeur , I would appreciate your opinion on this !
Hopefully some day we won't edit the code by hand for every aircraft to tune for indi ;)