Repository navigation
feat: introduce LQG and State spaces - #143
Conversation
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ ACTION | actionlint | 6 | 0 | 0 | 0.06s | |
| ✅ CPP | clang-format | 309 | 4 | 0 | 0 | 1.44s |
| ✅ CPP | cppcheck | 309 | 0 | 0 | 12.35s | |
| ✅ DOCKERFILE | hadolint | 1 | 0 | 0 | 0.08s | |
| ✅ JSON | jsonlint | 8 | 0 | 0 | 0.46s | |
| ✅ JSON | prettier | 8 | 8 | 0 | 0 | 0.64s |
| markdownlint | 64 | 1 | 73 | 0 | 2.84s | |
| ✅ MARKDOWN | markdown-table-formatter | 64 | 20 | 0 | 0 | 0.31s |
| lychee | 180 | 31 | 0 | 2.17s | ||
| ✅ YAML | prettier | 13 | 6 | 0 | 0 | 0.71s |
| ✅ YAML | yamllint | 13 | 0 | 0 | 0.65s |
Detailed Issues
⚠️ SPELL / lychee - 31 errors
[IGNORED] url.https://github.com/.insteadOf | Unsupported: Error creating request client: builder error for url (url.https://github.com/.insteadOf)
[ERROR] https://gitlab-ci-token/ | Network error: error sending request for url (https://gitlab-ci-token/) Maybe a certificate error?
[403] https://gitlab.com/embedded-library/infrastructure/hal-st.git | Network error: Forbidden
[ERROR] file://doc/filters/solvers/DiscreteAlgebraicRiccatiEquation.md | Cannot find file
[ERROR] file://doc/filters/controllers/Pid.md | Cannot find file
[ERROR] file://doc/filters/controllers/Lqr.md | Cannot find file
[ERROR] file://doc/math/Geometry3D.md | Cannot find file
[ERROR] file://estimators/LinearRegression.md | Cannot find file
[ERROR] file://doc/NeuralNetwork.md | Cannot find file
[ERROR] file://doc/model/Model.md | Cannot find file
[ERROR] file://doc/losses/Loss.md | Cannot find file
[ERROR] file://doc/losses/Loss.md | Cannot find file
[ERROR] file://estimators/LinearRegression.md | Cannot find file
[ERROR] file://doc/optimizer/Optimizer.md | Cannot find file
[403] https://gitlab.com/embedded-library/infrastructure/embedded-infra-lib.git | Network error: Forbidden
[403] https://developer.arm.com/documentation/100166/latest/ | Network error: Forbidden
[403] https://developer.arm.com/documentation/dui0473/latest | Network error: Forbidden
[ERROR] https://mathweb.ucsd.edu/~sbuss/ResearchWeb/ikmethods/iksurvey.pdf | Network error: error sending request for url (https://mathweb.ucsd.edu/~sbuss/ResearchWeb/ikmethods/iksurvey.pdf) Maybe a certificate error?
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/12 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/9 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/27 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/7 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/15 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/24 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/3 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/1 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/6 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/4 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/2 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/13 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/26 | Network error: Not Found
[403] https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$ | Network error: Forbidden
📝 Summary
---------------------
🔍 Total..........238
✅ Successful.....198
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded.........8
❓ Unknown..........0
🚫 Errors..........31
Errors in doc/kinematics/InverseKinematics.md
[ERROR] https://mathweb.ucsd.edu/~sbuss/ResearchWeb/ikmethods/iksurvey.pdf | Network error: error sending request for url (https://mathweb.ucsd.edu/~sbuss/ResearchWeb/ikmethods/iksurvey.pdf) Maybe a certificate error?
Errors in .gitlab-ci.yml
[ERROR] https://gitlab-ci-token/ | Network error: error sending request for url (https://gitlab-ci-token/) Maybe a certificate error?
[403] https://gitlab.com/embedded-library/infrastructure/hal-st.git | Network error: Forbidden
[403] https://gitlab.com/embedded-library/infrastructure/embedded-infra-lib.git | Network error: Forbidden
Errors in doc/optimization/Optimizer.md
[ERROR] file://estimators/LinearRegression.md | Cannot find file
[ERROR] file://doc/NeuralNetwork.md | Cannot find file
[ERROR] file://doc/model/Model.md | Cannot find file
[ERROR] file://doc/losses/Loss.md | Cannot find file
Errors in doc/regularization/Regularization.md
[ERROR] file://doc/optimizer/Optimizer.md | Cannot find file
[ERROR] file://doc/losses/Loss.md | Cannot find file
[ERROR] file://estimators/LinearRegression.md | Cannot find file
Errors in doc/filters/active/KalmanFilter.md
[ERROR] file://doc/filters/controllers/Pid.md | Cannot find file
[ERROR] file://doc/filters/controllers/Lqr.md | Cannot find file
[ERROR] file://doc/filters/solvers/DiscreteAlgebraicRiccatiEquation.md | Cannot find file
Errors in doc/kinematics/ForwardKinematics.md
[ERROR] file://doc/math/Geometry3D.md | Cannot find file
Errors in doc/performance-optimization/README.md
[403] https://developer.arm.com/documentation/dui0473/latest | Network error: Forbidden
[403] https://developer.arm.com/documentation/100166/latest/ | Network error: Forbidden
Errors in CHANGELOG.md
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/26 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/27 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/12 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/9 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/15 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/1 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/6 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/2 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/7 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/3 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/4 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/13 | Network error: Not Found
[404] https://github.com/embedded-pro/embedded-numerical-toolbox/issues/24 | Network error: Not Found
Errors in .github/workflows/static-analysis.yml
[403] https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$ | Network error: Forbidden
⚠️ MARKDOWN / markdownlint - 73 errors
.github/agents/executor.agent.md:11:401 error MD013/line-length Line length [Expected: 400; Actual: 459]
.github/agents/executor.agent.md:11 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the executor agent for..."]
.github/agents/orchestrator.agent.md:18 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the orchestrator agent..."]
.github/agents/planner.agent.md:11:401 error MD013/line-length Line length [Expected: 400; Actual: 458]
.github/agents/planner.agent.md:11 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the planner agent for ..."]
.github/agents/reviewer.agent.md:14:401 error MD013/line-length Line length [Expected: 400; Actual: 456]
.github/agents/reviewer.agent.md:14 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the reviewer agent for..."]
.github/instructions/numerical-cpp.instructions.md:79:401 error MD013/line-length Line length [Expected: 400; Actual: 423]
.github/prompts/orchestrate.prompt.md:8:401 error MD013/line-length Line length [Expected: 400; Actual: 496]
.github/prompts/orchestrate.prompt.md:8 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Analyze the following task for..."]
CHANGELOG.md:29 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:45 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
doc/analysis/PowerDensitySpectrum.md:5:401 error MD013/line-length Line length [Expected: 400; Actual: 509]
doc/analysis/PowerDensitySpectrum.md:104:20 error MD056/table-column-count Table column count [Expected: 2; Actual: 6; Too many cells, extra data will be missing]
doc/analysis/PowerDensitySpectrum.md:104:17 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/analysis/PowerDensitySpectrum.md:104:20 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/analysis/PowerDensitySpectrum.md:104:32 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/analysis/PowerDensitySpectrum.md:104:38 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/analysis/PowerDensitySpectrum.md:104:45 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/analysis/PowerDensitySpectrum.md:104:135 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/control_analysis/FrequencyResponse.md:5:401 error MD013/line-length Line length [Expected: 400; Actual: 469]
doc/control_analysis/RootLocus.md:69 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
doc/control_analysis/RootLocus.md:113:13 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
doc/control_analysis/RootLocus.md:113:27 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
doc/control_analysis/RootLocus.md:113:1 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
doc/control_analysis/RootLocus.md:113:13 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
doc/controllers/Lqg.md:7:401 error MD013/line-length Line length [Expected: 400; Actual: 428]
doc/controllers/README.md:13:57 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/controllers/README.md:13:148 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/estimators/ExpectationMaximization.md:37:12 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
doc/estimators/ExpectationMaximization.md:37:23 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
doc/estimators/ExpectationMaximization.md:37:37 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
doc/estimators/ExpectationMaximization.md:37:1 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
doc/estimators/ExpectationMaximization.md:37:12 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
doc/estimators/ExpectationMaximization.md:37:23 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
doc/estimators/ExpectationMaximization.md:104:103 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/estimators/README.md:9:68 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/estimators/README.md:9:142 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/estimators/README.md:10:68 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/estimators/README.md:10:142 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/estimators/README.md:11:68 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/estimators/README.md:11:144 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:5:401 error MD013/line-length Line length [Expected: 400; Actual: 421]
doc/filters/active/KalmanSmoother.md:111:28 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:111:61 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:111:110 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:122:19 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:122:27 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:122:67 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:123:19 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:123:27 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:123:67 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:124:19 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:124:27 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:124:67 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:125:19 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:125:27 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/KalmanSmoother.md:125:67 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/filters/active/UnscentedKalmanFilter.md:11:401 error MD013/line-length Line length [Expected: 400; Actual: 468]
doc/filters/README.md:16:145 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/neural_network/model/Model.md:147:63 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/neural_network/model/Model.md:147:156 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/neural_network/model/Model.md:148:60 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/neural_network/model/Model.md:148:153 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/regularization/Regularization.md:100:32 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/regularization/Regularization.md:100:135 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
doc/windowing/window.md:5:401 error MD013/line-length Line length [Expected: 400; Actual: 415]
README.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "[
- Documentation: Custom Flavors
- Command:
npx mega-linter-runner@9.4.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,CPP_CPPCHECK,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT

Show us your support by starring ⭐ the repository
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Introduces a reusable discrete-time Linear Time-Invariant (LTI) state-space model and builds LQG (LQR + Kalman) support on top of it, updating existing controllers/filters/simulators to accept a unified plant representation.
Changes:
- Added
math::LinearTimeInvariantvalue type (A, B, C, D) with factories and unit tests, plus coverage instantiations. - Implemented an
Lqgcontroller (output-feedback) and added a Qt-based LQG simulator. - Refactored MPC and Kalman(-smoother) integrations to accept/propagate LTI plants and updated documentation accordingly.
Reviewed changes
Copilot reviewed 49 out of 49 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| simulator/filters/KalmanFilter/application/KalmanFilterSimulator.cpp | Switches Kalman filter simulator wiring to LinearTimeInvariant via SetPlant() |
| simulator/controllers/Mpc/view/MpcConfigurationPanel.hpp | Updates plant creation return type to math::LinearTimeInvariant<float, 2, 1> |
| simulator/controllers/Mpc/view/MpcConfigurationPanel.cpp | Returns LTI plants from UI-selected plant builders |
| simulator/controllers/Mpc/application/StateSpacePlant.hpp | Replaces dynamic StateSpacePlant struct with LTI-returning factory functions |
| simulator/controllers/Mpc/application/StateSpacePlant.cpp | Implements double-integrator and first-order+integrator as LTI plants |
| simulator/controllers/Mpc/application/MpcSimulator.hpp | Stores/configures MPC simulator plant as an LTI |
| simulator/controllers/Mpc/application/MpcSimulator.cpp | Constructs MPC from plant and steps state via plant.Step() |
| simulator/controllers/LqrCartPole/application/LqrCartPoleSimulator.hpp | Removes heap allocation (unique_ptr) in favor of std::optional for controller storage |
| simulator/controllers/LqrCartPole/application/LqrCartPoleSimulator.cpp | Recomputes gain using plant.Linearize() and uses in-place LQR controller |
| simulator/controllers/LqrCartPole/application/CartPolePlant.hpp | Adds Linearize() returning an LTI model |
| simulator/controllers/LqrCartPole/application/CartPolePlant.cpp | Implements Linearize() using WithFullStateOutput(A,B) |
| simulator/controllers/Lqg/view/LqgMainWindow.hpp | Adds main window for the new LQG simulator UI |
| simulator/controllers/Lqg/view/LqgMainWindow.cpp | Wires UI to run simulations and display time-series plots |
| simulator/controllers/Lqg/view/LqgConfigurationPanel.hpp | Adds configuration panel for LQG weights/noise/simulation settings |
| simulator/controllers/Lqg/view/LqgConfigurationPanel.cpp | Builds config and creates an LTI plant from UI settings |
| simulator/controllers/Lqg/view/CMakeLists.txt | Adds Qt view library target for LQG simulator |
| simulator/controllers/Lqg/application/LqgSimulator.hpp | Adds LQG simulator config/result types and simulator class |
| simulator/controllers/Lqg/application/LqgSimulator.cpp | Implements noisy step-response simulation using controllers::Lqg |
| simulator/controllers/Lqg/application/CMakeLists.txt | Adds LQG simulator application library target |
| simulator/controllers/Lqg/Main.cpp | Adds LQG simulator executable entry point |
| simulator/controllers/Lqg/CMakeLists.txt | Adds top-level CMake for LQG simulator target |
| simulator/controllers/CMakeLists.txt | Registers LQG simulator in the controllers simulator build |
| numerical/math/test/TestLinearTimeInvariant.cpp | Adds typed unit tests for LTI behavior and factories |
| numerical/math/test/CMakeLists.txt | Registers new LTI math test file |
| numerical/math/LinearTimeInvariant.hpp | Introduces the LTI value type and coverage extern templates |
| numerical/math/LinearTimeInvariant.cpp | Adds explicit template instantiations for coverage builds |
| numerical/math/CMakeLists.txt | Adds LTI header and coverage source to math target |
| numerical/filters/active/test/TestKalmanSmoother.cpp | Adds test ensuring LTI overload matches matrix overload |
| numerical/filters/active/test/TestKalmanFilter.cpp | Adds test for KalmanFilter::SetPlant() equivalence |
| numerical/filters/active/KalmanSmoother.hpp | Adds LTI-based Smooth() overload |
| numerical/filters/active/KalmanFilter.hpp | Adds LTI-based SetPlant() overloads |
| numerical/controllers/interfaces/StateFeedbackController.hpp | Renames/reshapes controller interface for state-feedback controllers |
| numerical/controllers/interfaces/OutputFeedbackController.hpp | Adds new interface for output-feedback controllers |
| numerical/controllers/interfaces/MpcController.hpp | Removes old MPC interface header |
| numerical/controllers/interfaces/CMakeLists.txt | Updates interface library sources list to new controller interfaces |
| numerical/controllers/implementations/test/TestStateFeedbackController.cpp | Adds tests asserting LQR/MPC derive from new state-feedback interface |
| numerical/controllers/implementations/test/TestMpc.cpp | Adds MPC constructor test for LTI parity with matrix ctor |
| numerical/controllers/implementations/test/TestLqr.cpp | Adds LQR constructor test for LTI parity with matrix ctor |
| numerical/controllers/implementations/test/TestLqg.cpp | Adds unit tests for LQG controller behavior and interface conformance |
| numerical/controllers/implementations/test/CMakeLists.txt | Registers new controller tests |
| numerical/controllers/implementations/Mpc.hpp | Makes MPC implement StateFeedbackController and adds LTI constructor |
| numerical/controllers/implementations/Lqr.hpp | Makes LQR implement StateFeedbackController and adds LTI constructor |
| numerical/controllers/implementations/Lqg.hpp | Adds LQG controller implementation |
| numerical/controllers/implementations/Lqg.cpp | Adds explicit LQG instantiations for coverage builds |
| numerical/controllers/implementations/CMakeLists.txt | Adds LQG sources and links filters dependency |
| doc/controllers/README.md | Adds LQG and LTI documentation links |
| doc/controllers/Lqg.md | Adds LQG algorithm documentation |
| doc/controllers/LinearTimeInvariant.md | Adds LTI model documentation |
| .vscode/launch.json | Adds a debug launch configuration for the LQG simulator |
|



No description provided.