check ¤
Passivity assessment for Y-parameter models.
Ports
pass_check_Y_sweep_new.m→ passivity_sweep_Y + find_violation_bandsviolextremaY_eigenpairs_globalminima2.m→ find_violation_extrema
Functions:
| Name | Description |
|---|---|
find_violation_bands | Detect contiguous frequency bands where passivity is violated. |
find_violation_extrema | Find the worst-case violation point per eigenvalue channel per band. |
passivity_sweep_Y | Sweep the minimum eigenvalue of Re(Y(jω)) across all frequency points. |
find_violation_bands ¤
find_violation_bands(
gmin: ndarray, omega: ndarray, TOLG: float = 1e-06
) -> list[tuple[float, float]]
Detect contiguous frequency bands where passivity is violated.
Port of the band-detection logic in pass_check_Y_sweep_new.m.
A dummy stable point is prepended at ω = −1 with gmin = 777 so that violations that begin at the lowest sampled frequency are correctly detected. If a violation extends past the last sample, the upper band limit is set to 1000 × ω_max.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gmin | ndarray |
| required |
omega | ndarray |
| required |
TOLG | float | Eigenvalue tolerance; values within | 1e-06 |
Returns:
| Type | Description |
|---|---|
list[tuple[float, float]] | List of |
Source code in circulax/fitting/passivity/check.py
find_violation_extrema ¤
find_violation_extrema(
ss: SSModel, omega: ndarray, bands: list[tuple[float, float]], Nint: int = 21
) -> list[dict]
Find the worst-case violation point per eigenvalue channel per band.
For each violation band a dense grid of 2 × Nint (linear + log-spaced) test frequencies is generated, eigenpairs of Re(Y(jω)) are computed, eigenvalue continuity is tracked across frequency using :func:~circulax.fitting.passivity.eigtrack.track_eigenvalues, and the global minimum per channel is recorded.
Port of violextremaY_eigenpairs_globalminima2.m.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ss | SSModel | State-space model. | required |
omega | ndarray |
| required |
bands | list[tuple[float, float]] | List of | required |
Nint | int | Number of linear-spaced and log-spaced points per band (total ≤ 2 × Nint after deduplication). | 21 |
Returns:
| Type | Description |
|---|---|
list[dict] | List of dicts, one per (channel, band) pair with a negative minimum |
list[dict] | eigenvalue. Each dict has keys: |
list[dict] |
|
list[dict] |
|
list[dict] |
|
list[dict] |
|
Source code in circulax/fitting/passivity/check.py
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 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
passivity_sweep_Y ¤
Sweep the minimum eigenvalue of Re(Y(jω)) across all frequency points.
Port of pass_check_Y_sweep_new.m.
For Y-parameters, passivity requires the Hermitian part G(jω) = (Y(jω) + Y(jω)ᴴ) / 2 to be positive semi-definite at every frequency. gmin[k] = λ_min(G(jω_k)) is the passivity margin: negative values indicate violations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ss | SSModel | State-space model ( | required |
s | ndarray |
| required |
Returns:
| Name | Type | Description |
|---|---|---|
gmin | ndarray |
|
is_passive | bool |
|