---
title: 'dkpy: Robust Control for LTI Systems'
url: https://www.emergentmind.com/topics/dkpy
type: topic
---

# dkpy: Robust Control for LTI Systems

Searching arXiv for the specified paper and closely related robust-control references.
arxiv_search.query({"search_query":"id:2511.13927","start":0,"max_results":5})
arxiv_search.query({"search_query":"all:\"dkpy: Robust Control with Structured Uncertainty in Python\"","start":0,"max_results":10})
dkpy is an open-source Python package for the analysis and synthesis of robust controllers for linear time-invariant (LTI) systems subject to structured uncertainty. Its core functionality is built around $μ$-analysis (structured singular-value analysis) and $μ$-synthesis (DK-iteration) to assess robust stability and performance, and to design controllers that guarantee stability and performance across all admissible perturbations. It also provides tools to characterize unstructured uncertainty from frequency-response data of perturbed plant models (multi-model uncertainty characterization). The package is presented in "dkpy: Robust Control with Structured Uncertainty in Python" [2511.13927].

## 1. Scope and problem setting

Models used for control design are, to some degree, uncertain. Model uncertainty must be accounted for to ensure the robustness of the closed-loop system. In this setting, $μ$-analysis and $μ$-synthesis methods allow for the analysis and design of controllers subject to structured uncertainties. These tools can also be applied to robust performance problems, because such problems are fundamentally robust control problems with structured uncertainty [2511.13927].

The package addresses LTI systems with structured uncertainty and provides two main capabilities. First, it supports robust controller analysis and synthesis through $μ$-analysis and DK-iteration. Second, it offers tools for model uncertainty characterization using data from a set of perturbed systems. The open-source project is available at `https://github.com/decargroup/dkpy`.

A plausible implication is that dkpy is intended to support a workflow in which uncertainty characterization, generalized-plant construction, robust analysis, and robust synthesis are performed within a single Python environment. That implication follows from the coexistence of uncertainty-weight fitting, structured singular-value computation, and DK-iteration in the same package.

## 2. Mathematical framework for structured uncertainty

In many multi-input multi-output systems, uncertainties arise in specific subsystems, such as actuator dynamics or sensor gains, and can be modeled by a block-diagonal perturbation $\Delta(s)$ in which each block is either a repeated scalar uncertainty $\delta_i I$ or a full complex block $\Delta_j$ [2511.13927]. The uncertainty structure is defined as

$$
\Delta_\omega = \{ \operatorname{diag}(\{\delta_i I_{r_i}\}, \{\Delta_j\}) \mid \delta_i\in\mathbb{C}, \Delta_j\in\mathbb{C}^{m_j\times m_j} \},
$$

and the set of admissible perturbation systems is

$$
\Gamma = \{ \Delta(s)\in RH_\infty \mid \|\Delta(s)\|_\infty\le 1 \text{ and } \Delta(j\omega)\in\Delta_\omega \ \forall\ \omega \}.
$$

Given a complex matrix $M\in\mathbb{C}^{n\times n}$ and uncertainty structure $\Delta_\omega$, the structured singular value is

$$
\mu_\Delta(M) = \frac{1}{\min\{\|\Delta\|_2 : \det(I-M\Delta)=0,\ \Delta\in\Delta_\omega\}},
$$

for which no closed form exists. In practice, one uses the upper bound

$$
\mu_\Delta(M) \le \bar{\mu}_\Delta(M) = \min_{D\in D_{\Delta_\omega}} \ \bar{\sigma}(DMD^{-1}),
$$

where

$$
D_{\Delta_\omega} = \{ D \text{ diagonal scaling commuting with every } \Delta\in\Delta_\omega \},
$$

and $\bar{\sigma}$ denotes the maximum singular value.

For a feedback interconnection $F_\ell(P,K)$, robust stability holds if and only if

$$
\sup_\omega \mu_\Delta(F_\ell(P,K)(j\omega)) \le 1.
$$

This framework makes the package specifically aligned with structured uncertainty descriptions based on block-diagonal perturbations rather than generic unstructured robustness margins.

## 3. $μ$-analysis, $μ$-synthesis, and DK-iteration

The package implements $μ$-analysis through computation of an upper bound on the structured singular value together with the associated scaling. This is the analysis step used to assess robust stability and robust performance over a frequency grid.

For controller design, the relevant optimization problem is the non-convex problem

$$
\min_{K(s),\,D(s)\in D_\Delta} \|D(s)\,F_\ell(P,K)(s)\,D^{-1}(s)\|_\infty.
$$

dkpy approaches this through DK-iteration, which alternates between controller synthesis and scaling computation. The procedure is described as follows [2511.13927]:

1. initialize $D(s)=I$
2. $K(s)=\arg\min_K \|D\,F_\ell(P,K)\,D^{-1}\|_\infty$
3. compute $\bar{\mu}_\Delta(j\omega)$ and $D_\omega$ at grid $\omega$
4. fit $D(s)$ to $D_\omega$
5. repeat until $\bar{\mu}_\Delta<1$ or max iterations reached

The significance of this organization is practical rather than purely formal. The synthesis step uses an $H_\infty$ controller design routine for fixed scaling, while the analysis step updates the frequency-dependent scale and the fitted dynamic $D(s)$. This suggests that dkpy is designed for iterative workflows in which analysis and synthesis are tightly coupled but implemented by separable software components.

## 4. Software architecture and implementation

dkpy is built on python-control and slycot. Its modular architecture is centered on abstract base classes (ABCs) and their implementations. The main abstractions cover controller synthesis, structured singular-value computation, dynamic $D$-scale fitting, and DK-iteration composition [2511.13927].

| ABC | Role | Implementations |
|---|---|---|
| `ControllerSynthesis` | abstract `synthesize` method | `HinfSynSlicot`, `HinfSynLmi`, `HinfSynLmiBisection` |
| `StructuredSingularValue` | abstract `compute_ssv` method | `SsvLmiBisection` |
| `DScaleFit` | abstract `fit` method | `DScaleFitSlicot` |
| `DkIteration` | composes synthesis, SSV, and D-fit | `DkIterFixedOrder`, `DkIterListOrder`, `DkIterAutoOrder`, `DkIterInteractiveOrder` |

The concrete synthesis implementations are differentiated by algorithmic backend. `HinfSynSlicot` uses SLICOT `SB10AD` for $H_\infty$ synthesis; `HinfSynLmi` is an LMI-based $H_\infty$ synthesis method; and `HinfSynLmiBisection` uses an LMI formulation with bisection on $\gamma$. For structured singular-value computation, `SsvLmiBisection` uses an LMI formulation with bisection to compute $\bar{\mu}$ and scaling $D(j\omega)$. For scale fitting, `DScaleFitSlicot` uses SLICOT `SB10YD` to fit stable minimum-phase $D(s)$ to a given $D(j\omega)$.

The DK-iteration layer is compositional: a `DkIteration` object contains one `ControllerSynthesis`, one `StructuredSingularValue`, and one `DScaleFit`. Its subclasses vary only in how they choose the order of the $D(s)$ fit over iterations. This separation of concerns indicates a design in which synthesis, analysis, and rational fitting can be replaced independently within a common iteration structure.

## 5. Uncertainty characterization and usage patterns

In addition to structured robust analysis and synthesis, dkpy provides high-level functions for multi-model uncertainty characterization from frequency-response data of perturbed plant models. The three functions are:

- `compute_uncertainty_residual_response`
- `compute_uncertainty_weight_response`
- `fit_uncertainty_weight`

The first function can, for example, solve $G_0 E = G_k - G_0$. The second uses an LMI to get optimal $W_\ell, W_r$. The third uses a log-Chebyshev method to fit stable, minimum-phase $W(s)$ [2511.13927].

The installation paths are:

```bash
pip install decargroup-dkpy
```

or

```bash
git clone https://github.com/decargroup/dkpy
cd dkpy
pip install -e .
```

A basic $μ$-analysis example is given in the following form:

```python
from control import ss, feedback
from dkpy.analysis import SsvLmiBisection
# define uncertain plant P(s) via lower LFT or as frequency response
L = feedback(P_nominal, K)
ssv = SsvLmiBisection(block_structure=Δω, freq_grid=logspace(-2,2,50))
mu_upper, Djw = ssv.compute_ssv(L)
print("Peak μ̄ =", max(mu_upper))
```

A basic DK-iteration example is given as:

```python
from dkpy.synthesis import DkIterListOrder
# build generalized plant Pgen from plant, weights, uncertainty blocks
dk = DkIterListOrder(
    synthesis_method='HinfSynLmi',
    ssv_method='SsvLmiBisection',
    dfit_method='DScaleFitSlicot',
    fit_orders=[4,4,4],
    freq_grid=logspace(-2,2,100)
)
K_robust, info = dk.synthesize(Pgen, block_structure=Δω)
print("Designed K(s):", K_robust)
print("Final μ̄ peak:", info['mu_peak'])
```

These examples show that the expected workflow is explicit: define the uncertainty structure, construct either the loop interconnection or the generalized plant, compute $\bar{\mu}$ for analysis or invoke DK-iteration for synthesis, and inspect the peak upper bound.

## 6. Reported applications, domains, and current limitations

Two example applications are described in the package documentation associated with the paper. The first is multi-model uncertainty characterization for an actuator bundle. The sequence is: load nominal $G_0(j\omega)$ and off-nominal $G_k(j\omega)$ data; compute $E_k(j\omega)=\text{solve } G_0E=G_k-G_0$ for each $k$; compute $W_{\ell,\mathrm{opt}}(j\omega), W_{r,\mathrm{opt}}(j\omega)=\texttt{compute\_uncertainty\_weight\_response}(E_k,\texttt{ block='mult\_input'})$; and fit $W_\ell(s)=\texttt{fit\_uncertainty\_weight}(W_{\ell,\mathrm{opt}}(j\omega), n=4)$. This yields multiplicative input weights $W_\ell(s)$ and $W_r(s)=I$ for the generalized plant [2511.13927].

The second example is robust controller synthesis for lateral aircraft dynamics. The steps are: build $P_{\mathrm{gen}}$ with aerodynamic model, actuator model $\pm W_\ell$, $W_r$, and performance weights; use `DkIterListOrder` with 3 iterations and 4th-order $D(s)$ fits; obtain a result in which $\bar{\mu}$ reduces below $1$; and simulate step responses across 40 sampled $\Delta(s)$. The reported outcome is good tracking and limited performance degradation observed.

The domains listed for application are aerospace flight control, automotive chassis control, power electronics, process control, and robotics—anywhere structured uncertainty modeling reduces conservatism. This suggests that the package is intended for settings in which uncertainty has a meaningful subsystem structure and where preserving that structure is preferable to collapsing it into a single unstructured bound.

The paper also states current limitations. In version `v0.1.9`, dkpy supports only complex block-diagonal uncertainty and LTI perturbations, unstructured multi-model characterization for additive or multiplicative uncertainty, and uses a fixed set of solver algorithms (`SLICOT`, `MOSEK`). Planned enhancements include support for real-parametric uncertainty (real $μ$), mixed complex-real block structures, alternative scaling and $μ$-analysis methods such as DK-pole shifting, integration of time-delay uncertainty, improved auto-scheduling of fit orders and grid refinement, and expanded examples and tutorials in robotics and power systems. With its open architecture, dkpy invites the community to contribute new synthesis routines, structured uncertainty classes, and improved characterizations within a fully Pythonic, open-source ecosystem [2511.13927].

Source: https://www.emergentmind.com/topics/dkpy