Skip to content

Fix refgain controllers with integral action - #1222

Merged
murrayrm merged 1 commit into
python-control:mainfrom
marko1olo:fix-refgain-integral-action
Aug 14, 2026
Merged

Fix refgain controllers with integral action#1222
murrayrm merged 1 commit into
python-control:mainfrom
marko1olo:fix-refgain-integral-action

Conversation

@marko1olo

@marko1olo marko1olo commented Jun 7, 2026

Copy link
Copy Markdown

Summary

Fix create_statefbk_iosystem(..., feedfwd_pattern="refgain") when integral action is enabled.

The controller feedthrough matrix should use only the proportional state gain columns. The integral gain columns already define the controller output matrix, and including them again in D_lqr made the D matrix wider than the controller input vector.

Closes #1189.

Tests

  • python -m pytest control/tests/statefbk_test.py::test_refgain_pattern_integral_action control/tests/statefbk_test.py::test_refgain_pattern -q
  • python -m pytest control/tests/statefbk_test.py -q
  • python -m ruff check control/statefbk.py control/tests/statefbk_test.py
  • python -m compileall -q control\statefbk.py control\tests\statefbk_test.py
  • git diff --check

AI Disclosure: Codex (ChatGPT 5.5) was used during code navigation, initial drafting, and PR text preparation. All logic, code changes, and test cases have been manually reviewed, verified, and tested locally by the author in accordance with the NumPy AI Policy.

@murrayrm

murrayrm commented Aug 9, 2026

Copy link
Copy Markdown
Member

@marko1olo Please rebase off of main to trigger updated CI checks from PR #1243.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 94.743%. remained the same — marko1olo:fix-refgain-integral-action into python-control:main

@murrayrm
murrayrm merged commit c7ea9c9 into python-control:main Aug 14, 2026
24 checks passed
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.

bug in create_statefbk_iosystem, option refgain

3 participants