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
59
//! Model-reduction building blocks and balanced front ends.
//!
//! This module groups the reduction-side layers:
//!
//! - [`hsvd`] for the reusable balancing core
//! - [`balanced`] for dense balanced realization and balanced truncation
//!
//! # Two Intuitions
//!
//! 1. **Compression view.** Reduction replaces a high-order model by a smaller
//! one that keeps the input-output behavior users care about.
//! 2. **Energy view.** Balanced methods rank states by joint
//! controllability/observability energy and discard weak directions first.
//!
//! # Glossary
//!
//! - **HSVD:** Hankel singular value decomposition.
//! - **Balanced truncation:** Projection-based model reduction built from HSVD.
//! - **Projection matrices:** Left/right maps used to assemble the reduced
//! model.
//!
//! # Mathematical Formulation
//!
//! Balanced reduction works by finding coordinates where controllability and
//! observability Gramians are simultaneously diagonal. Balanced realization
//! keeps the full numerical rank, while balanced truncation discards the
//! smallest Hankel singular directions.
//!
//! # Implementation Notes
//!
//! - HSVD is exposed as a reusable middle layer rather than being buried
//! inside balanced truncation.
//! - Dense and low-rank workflows share the same truncation and diagnostic
//! policy.
//! - Standard balanced truncation assumes asymptotic stability of the input
//! model.
//!
//! # Feature Matrix
//!
//! | Feature | Dense continuous | Dense discrete | Sparse / low-rank continuous | Sparse / low-rank discrete |
//! | --- | --- | --- | --- | --- |
//! | HSVD core | yes | yes | yes | yes |
//! | Balanced realization | yes | yes | no | no |
//! | Balanced truncation | yes | yes | yes | yes |
pub use ;
pub use ;