Skip to content
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

Custom Controller Backend Example: INDI and ADRC #21699

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

esaldiran
Copy link
Contributor

This is PR adds new INDI and ADRC controller to the as a custom controller backend. This is a continuation of work done in #21216.

These controllers were flight tested in their original implementation, but they have not been flight tested using the custom controller framework.

The readme file is also updated to reflect these new backend additions. I also a fixed a section related to the controller reset.

@esaldiran esaldiran force-pushed the custom-cont-ex-INDI-ADRC branch from beeedb7 to 227b9f3 Compare September 12, 2022 00:16
@tridge
Copy link
Contributor

tridge commented Sep 12, 2022

@esaldiran nice work!

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are the autotests in here to make sure the controllers can actually fly (and continue to fly into the future) the vehicle?

@esaldiran
Copy link
Contributor Author

Where are the autotests in here to make sure the controllers can actually fly (and continue to fly into the future) the vehicle?

I am going to add autotest. But, right now INDI backend can only be flown with quad frame class in x type due to inverse mixer calculation. I am trying to extend this to support all frame types under quad class.

@lixiaowei123
Copy link

hi,the code have a issue.
FAST_TASK(run_rate_controller), #if AC_CUSTOMCONTROL_MULTI_ENABLED == ENABLED FAST_TASK(run_custom_controller), #endif
when run run_custom_controller ,the run_rate_controller is running

@zhouzhiwen2000
Copy link
Contributor

hi,the code have a issue.
FAST_TASK(run_rate_controller), #if AC_CUSTOMCONTROL_MULTI_ENABLED == ENABLED FAST_TASK(run_custom_controller), #endif
when run run_custom_controller ,the run_rate_controller is running

I suppose this is intended, as the original controller should run right before the custom controller to generate the primary controller outputs.

@zhouzhiwen2000
Copy link
Contributor

BTW, is there a guide on tuning the parameters for ADRC? The SITL runs fine, but when I run it on a real copter, it oscillates like crazy, and tuning the b parameter only changes the frequency of the oscillation. I tried b within range 50-300, the oscillation persisted.

@esaldiran
Copy link
Contributor Author

esaldiran commented Jan 10, 2023

BTW, is there a guide on tuning the parameters for ADRC? The SITL runs fine, but when I run it on a real copter, it oscillates like crazy, and tuning the b parameter only changes the frequency of the oscillation. I tried b within range 50-300, the oscillation persisted.

@zhouzhiwen2000 I haven't read through ADRC formulation in detail but the implementation is based on PR #20243 and it references the following master thesis Robust active disturbance rejection control scheme for quadrotor UAVs experimental prototyping

@esaldiran
Copy link
Contributor Author

hi,the code have a issue. FAST_TASK(run_rate_controller), #if AC_CUSTOMCONTROL_MULTI_ENABLED == ENABLED FAST_TASK(run_custom_controller), #endif when run run_custom_controller ,the run_rate_controller is running

@lixiaowei123 This is by design. If the user wants to test a single axis(roll-pitch-yaw), we want the other axes to be controlled by the main controller.

@zhouzhiwen2000
Copy link
Contributor

zhouzhiwen2000 commented Jan 10, 2023

BTW, is there a guide on tuning the parameters for ADRC? The SITL runs fine, but when I run it on a real copter, it oscillates like crazy, and tuning the b parameter only changes the frequency of the oscillation. I tried b within range 50-300, the oscillation persisted.

@zhouzhiwen2000 I haven't read through ADRC formulation in detail but the implementation is based on PR #20243 and it references the following master thesis Robust active disturbance rejection control scheme for quadrotor UAVs experimental prototyping

OK, I will check that out, thanks.

@MichelleRos
Copy link
Contributor

MichelleRos commented Aug 16, 2023

I think we do need flight testing on these though (and setting default parameters to something sensible) - when I did testing on my ADRC PR, the performance was a little sketchy and we couldn't figure out what tuning to do in order to make it more flyable. People are fairly familiar with how to tune PIDs (and there's lots of tuning guides available), but ADRC doesn't work the same.

In order for ADRC to be a usable controller, we'd need advice somewhere on how a person can tune it to work with their specific vehicle. A parameter description like "ADRC pitch axis ESO bandwidth(rad/s)" (which I think I just got from the original PR I based mine on) won't make sense to a lot of people - they won't know whether they should increase or decrease it to improve performance.

But since this is for test controllers in any case, if you don't know ADRC, we probably could just keep it as is and someone who knows how to tune it can hopefully add some further info.

@Destinyrhx
Copy link

Can the project with ADRC added be compiled successfully?

@Destinyrhx
Copy link

Why are all the files in modules locked after I use command “git submodule update --init --recursive” on branch “custom-cont-ex-INDI-ADRC”?

@peterbarker peterbarker force-pushed the custom-cont-ex-INDI-ADRC branch from 227b9f3 to 9afe98d Compare February 23, 2025 08:12
@peterbarker
Copy link
Contributor

I have force-pushed @MichelleRos 's rebase of this PR onto master. It had bitrotted a touch. She flew it today quite successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants