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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
//! Linear time-invariant system analysis and alternate SISO representations.
//!
//! The broader control module is built around numerical primitives such as
//! Lyapunov/Stein solvers and balanced truncation. This `lti` layer sits above
//! that foundation and groups the user-facing model-analysis and
//! transfer-function-style APIs that are specifically about linear
//! time-invariant systems.
//!
//! The implementation is dense-first overall, with selected sparse state-space
//! workflows available:
//!
//! - dense state-space analysis lives in `analysis`
//! - dense sampled responses live in `response`
//! - sampled response metrics live in `response_metrics`
//! - fixed-timestep digital filtering helpers live in `sim`
//! - real-coefficient SISO alternate representations live in
//! `transfer_function`, `zpk`, and `sos`
//! - explicit continuous delay-aware process models live in `process_models`
//! - classical loop-analysis helpers live in `loop_analysis` and `root_locus`
//! - IIR design and order-selection helpers live in `filter_design`
//! - sparse CSC-backed state-space models support transfer evaluation,
//! frequency response, and discrete-time simulation through the same
//! conceptual API
//!
//! Broader sparse/operator-backed analysis, especially continuous-time
//! matrix-function actions and large-scale stability diagnostics, still belongs
//! beyond the scope of this layer until the required Krylov and
//! matrix-function machinery is added.
//!
//! # Two Intuitions
//!
//! 1. **Signal-flow view.** This is the part of the crate that answers
//! user-facing system questions: What are the poles? What does the step
//! response look like? What happens if I cascade two filters? How do I run
//! `filtfilt` on sampled data?
//! 2. **Representation view.** This is also the interoperability layer between
//! several mathematically equivalent descriptions of the same SISO system:
//! state space, transfer function, zero-pole-gain, second-order sections,
//! and delay-aware process models.
//!
//! # Glossary
//!
//! - **DC gain:** Steady-state gain, evaluated at `s = 0` or `z = 1`.
//! - **SOS:** Second-order sections, the canonical cascade form for designing,
//! storing, and composing realized IIR filters.
//! - **Delta-SOS:** A derived discrete-time execution form of SOS, used when
//! low normalized cutoffs make ordinary section recurrences ill-conditioned
//! near `z = 1`.
//! - **ZPK:** Zero-pole-gain representation.
//! - **`S`, `T`, `KS`, `PS`:** Classical loop-sensitivity channels.
//! - **Bode / Nyquist / Nichols:** Standard frequency-domain plotting data.
//! - **FOPDT / SOPDT:** First-/second-order-plus-dead-time process models.
//!
//! # Mathematical Formulation
//!
//! The layer revolves around transfer maps:
//!
//! - continuous: `G(s) = C (s I - A)^-1 B + D`
//! - discrete: `G(z) = C (z I - A)^-1 B + D`
//!
//! SISO alternate representations encode the same transfer map in different
//! coordinates:
//!
//! - polynomial ratio form (`TransferFunction`)
//! - zero/pole/root form (`Zpk`)
//! - sectioned factorization (`Sos`)
//! - delta-operator execution form of a discrete sectioned factorization
//! (`DeltaSos`)
//! - explicit delay process models (`FopdtModel`, `SopdtModel`)
//!
//! # Implementation Notes
//!
//! - Dense state space is the most complete representation and often serves as
//! the bridge between alternate forms.
//! - `Sos` is the canonical realized IIR representation for design,
//! storage, conversion, and algebra.
//! - `DeltaSos` is a derived discrete runtime basis for the same transfer map,
//! intended specifically for low-cutoff execution where ordinary SOS
//! coefficients approach tiny perturbations of `[1, -2, 1]`.
//! - Digital runtime filtering is intentionally implemented only on
//! `DiscreteStateSpace`, `DiscreteSos`, `DeltaSos`, and `Fir`, which are the
//! numerically credible execution forms.
//! - Frequency-domain helper surfaces are generally sampled-grid based rather
//! than symbolic.
//! - Continuous delay remains explicit in dedicated process-model types rather
//! than being folded into rational transfer functions.
//!
//! # Feature Matrix
//!
//! | Feature | Dense continuous | Dense discrete | Sparse continuous | Sparse discrete | TF/ZPK/SOS/FIR |
//! | --- | --- | --- | --- | --- | --- |
//! | State-space modeling | yes | yes | yes | yes | n/a |
//! | Pole / stability analysis | yes | yes | partial | partial | yes (SISO) |
//! | DC gain / transfer evaluation | yes | yes | yes | yes | yes |
//! | Time-domain simulation | yes | yes | partial | yes | FIR yes, SOS yes, Delta-SOS yes, TF/ZPK via conversion |
//! | Response metrics | yes | yes | no | no | yes (SISO) |
//! | Loop analysis (`S`, `T`, margins, Nyquist, Nichols) | yes (SISO) | yes (SISO) | no | no | yes (SISO) |
//! | Root locus | yes (SISO) | yes (SISO) | no | no | yes (SISO) |
//! | IIR filter design | analog only | digital only | n/a | n/a | yes |
//! | FIR / Savitzky-Golay | no | yes | n/a | n/a | FIR only |
//! | Explicit delay-aware process models | yes | limited | no | no | process-model types |
pub use sallen_key_lowpass_transfer_function;
pub use ;
pub use LtiError;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;