1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Control theory linear algebra tools.
//!
//! This module provides a collection of algorithms for control system analysis
//! and synthesis, organized into sub-modules:
//!
//! | Sub-module | Contents |
//! |------------|----------|
//! | [`lyapunov`] | Continuous and discrete Lyapunov equation solvers (Bartels-Stewart) |
//! | [`riccati`] | CARE and DARE solvers (Newton / doubling) |
//! | [`lqr`] | LQR controller synthesis, iLQR for nonlinear systems |
//! | [`stability`] | Controllability / observability analysis, Gramians, Hankel singular values |
//!
//! # Quick start
//!
//! ```rust
//! use scirs2_linalg::control::lqr::{LqrController, LqrMode};
//! use scirs2_core::ndarray::array;
//!
//! // Double integrator: x'' = u
//! let a = array![[0.0_f64, 1.0], [0.0, 0.0]];
//! let b = array![[0.0_f64], [1.0]];
//! let q = array![[1.0_f64, 0.0], [0.0, 1.0]]; // state cost
//! let r = array![[1.0_f64]]; // input cost
//!
//! let ctrl = LqrController::new(
//! &a.view(), &b.view(), &q.view(), &r.view(), LqrMode::Continuous,
//! ).expect("LQR synthesis failed");
//!
//! println!("Optimal gain K = {:?}", ctrl.gain);
//! println!("Riccati solution P = {:?}", ctrl.p);
//! ```
//!
//! # References
//! - Anderson, B. D. O. & Moore, J. B. (1990). *Optimal Control: Linear Quadratic Methods*.
//! - Skogestad, S. & Postlethwaite, I. (2005). *Multivariable Feedback Design*, 2nd ed.
//! - Lancaster, P. & Rodman, L. (1995). *Algebraic Riccati Equations*. Oxford.
// ---------------------------------------------------------------------------
// Convenience re-exports
// ---------------------------------------------------------------------------
pub use ;
pub use ;
pub use ;
pub use ;