Skip to content

feat(adrc): Add Active Disturbance Rejection Control (ADRC) component#627

Open
finger563 wants to merge 6 commits into
mainfrom
feat/adrc
Open

feat(adrc): Add Active Disturbance Rejection Control (ADRC) component#627
finger563 wants to merge 6 commits into
mainfrom
feat/adrc

Conversation

@finger563
Copy link
Copy Markdown
Contributor

Description

Motivation and Context

How has this been tested?

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Hardware

  • I have updated the design files (schematic, board, libraries).
  • I have attached the PDFs of the SCH / BRD to this PR
  • I have updated the design output (GERBER, BOM) files.

Copilot AI review requested due to automatic review settings May 30, 2026 20:42
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

✅Static analysis result - no issues found! ✅

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new adrc component providing Active Disturbance Rejection Control utilities: a Han tracking differentiator and four ADRC controllers (linear and Han nonlinear, first- and second-order), together with an example application and the corresponding documentation and CI wiring.

Changes:

  • New components/adrc component (header-only logic in adrc.hpp plus stub .cpp, CMake, manifest, README, example).
  • Documentation added: doc/en/adrc.rst, doc/en/adrc_example.md, Doxyfile entries, and index entry.
  • CI wiring: build.yml matrix entry and upload_components.yml upload entry.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
components/adrc/include/adrc.hpp Core ADRC classes (TD + 4 controllers)
components/adrc/src/adrc.cpp Empty translation unit including the header
components/adrc/CMakeLists.txt Component registration requiring base_component
components/adrc/idf_component.yml IDF component manifest
components/adrc/README.md Component-level overview
components/adrc/example/CMakeLists.txt Example project cmake
components/adrc/example/README.md Example overview
components/adrc/example/main/CMakeLists.txt Example main component registration
components/adrc/example/main/adrc_example.cpp Simulated plants exercising all 4 controllers
doc/Doxyfile Adds adrc header and example to Doxygen INPUT/EXAMPLE_PATH
doc/en/index.rst Adds adrc entry to docs toctree
doc/en/adrc.rst Long-form ADRC documentation and tuning guide
doc/en/adrc_example.md Includes the example README
.github/workflows/build.yml Adds ADRC example to CI matrix (esp32)
.github/workflows/upload_components.yml Adds ADRC to component upload list

Comment thread components/adrc/include/adrc.hpp Outdated
Comment thread components/adrc/include/adrc.hpp
Comment thread components/adrc/include/adrc.hpp Outdated
@finger563 finger563 self-assigned this May 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Comment thread components/adrc/example/main/adrc_example.cpp
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Comment thread components/adrc/include/adrc.hpp Outdated
Comment thread components/adrc/include/adrc.hpp Outdated
Comment thread components/adrc/include/adrc.hpp Outdated
Comment thread components/adrc/include/adrc.hpp Outdated
Comment thread components/adrc/include/adrc.hpp Outdated
Comment thread components/adrc/example/CMakeLists.txt
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Comment on lines +165 to +170
/// Get the most recently computed state.
/// @return Current differentiator state.
const State &get_state() const {
std::lock_guard<std::recursive_mutex> lk(mutex_);
return state_;
}
Comment on lines +172 to +177
/// Get the active differentiator configuration.
/// @return Current configuration.
const Config &get_config() const {
std::lock_guard<std::recursive_mutex> lk(mutex_);
return config_;
}
Comment on lines +302 to +307
/// Get the current controller state.
/// @return Current state.
const State &get_state() const {
std::lock_guard<std::recursive_mutex> lk(mutex_);
return state_;
}
Comment on lines +309 to +314
/// Get the active configuration.
/// @return Current configuration.
const Config &get_config() const {
std::lock_guard<std::recursive_mutex> lk(mutex_);
return config_;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants