# OID Analysis: Correction-Field Structure Diagnosis Results

> Date: 2026-06-15
> Project: DynamisLab -- Active hydrodynamic cloaking and illusion using DRL on a fluidic pinball.
> Analysis pipeline: OID (Observable-Inferred Decomposition) on correction fields (Delta-q_ctl).

---

## Executive Summary

Four key findings from the OID analysis pipeline:

1. **Force-relevant and signature-relevant correction structures systematically separate** across control tasks. In steady cloak, they are highly related (cosine similarity = 0.763); in Karman cloak, nearly orthogonal (-0.034); in illusion, increasingly anti-correlated as target diameter grows (from -0.082 to -0.932). This is the most striking result of the analysis.

2. **OID consistently and substantially outperforms POD** for predicting both force and future sensor signature. Across all periodic scenes, OID achieves R2 = 0.315-0.750 with 2 coordinates, while POD achieves R2 = -2.4 to 0.418. The success criterion ("m<=3 OID beats m<=3 POD") is satisfied for every scene.

3. **The separation is robust.** POD rank sensitivity tests (r=6,8,10,12,16) confirm Karman and illusion 1.0L/1.5L are very stable. Karman's force-sig separation is insensitive to the choice of convective delay tau_c (overlap ranges 0.11-0.31 across 10 different delays). The one exception is illusion 0.75L, which shows rank sensitivity and needs more data.

4. **OID coordinates are not control states.** Force-OID coordinates capture only 22.5% of action variance (vs 95.6% for raw sensor observations). This is expected and appropriate: OID identifies structures most relevant to forces and signatures, not to actions. Action-related coordinates require a separate causal-PCD analysis.

---

## 1. OID: What It Is and Why

### 1.1 The Problem with POD

Standard POD (Proper Orthogonal Decomposition) ranks flow structures by their **fluctuation energy**. The highest-energy modes capture the most "energetic" features of the flow -- typically the von Karman vortex shedding pair. But the DRL controller's objective is not "maximize energy" or "minimize energy." It is to match a downstream sensor signature, which may involve flow structures that are not the most energetic.

POD provides a useful unified coordinate system, but its ranking is by energy, not by task relevance.

### 1.2 The OID Idea

OID (Observable-Inferred Decomposition, Schlegel et al. 2012) is a generalization of POD that finds flow structures most correlated with a chosen **observable** of interest (e.g., total force, sensor error). The idea is:

1. Start with a POD coordinate system (the unified basis)
2. Choose an observable Y (e.g., total lift force, delayed sensor error)
3. Compute the cross-covariance matrix between POD coefficients A and observable Y
4. Perform SVD on this cross-covariance: `C_AY = U @ Sigma @ V.T`
5. The columns of U define directions in POD space that best predict the observable

The OID coordinates are:

```
z(t) = A(t) @ U
```

This is a simple rotation of the POD subspace. The singular values in Sigma tell us how much observable-relevant information each OID direction captures. The spatial modes are linear combinations of POD modes:

```
phi_k_OID(x,y) = sum_j U_{jk} * phi_j_POD(x,y)
```

### 1.3 The Correction-Field Preprocessing

Before OID, we must separate what the controller actually changed from what the flow inherently does. For each scene we construct three fields:

- **q_in**: Incident reference field (empty channel, or vortex street only)
- **q_blk**: Fixed pinball field (pinball present, zero rotation, natural shedding)
- **q_ctl**: Controlled pinball field (DRL policy active)

The two derived difference fields are:

- **Delta_q_blk = q_blk - q_in**: What the pinball's geometry does (passive blockage)
- **Delta_q_ctl = q_ctl - q_blk**: What the controller additionally does (active correction)

OID operates on Delta_q_ctl (the active correction), NOT on the raw controlled field. This separation prevents mixing up "structures that were already there" (inherent shedding) with "structures the controller introduced."

### 1.4 The OID Pipeline

```
Full field snapshots (500 steps)
  |
  v
Three-field decomposition: q_in, q_blk, q_ctl
  |
  v
Correction field: Delta_q_ctl = q_ctl - q_blk
  |
  v
POD on Delta_q_ctl -> coefficients A(t), modes phi(x,y)
  (rank sensitivity: r=6,8,10,12,16)
  |
  v
Choose observable Y:
  - Force-OID: Y = total force [Fx, Fy]
  - Signature-OID: Y = delayed sensor error e_s(t + tau_c)
  - Suppression-OID (steady only): Y = RMS fluctuation
  |
  v
Cross-covariance SVD: C_AY = (1/N) A^T Y = U Sigma V^T
  |
  v
OID coordinates: z(t) = A(t) @ U
OID modes: psi_k = sum_j U_{jk} * phi_j
```

### 1.5 Scene Setup

| Scene | Inflow | Uncontrolled | Controlled | SI | Action bias |
|-------|--------|-------------|------------|----|-------------|
| Steady cloak | Parabolic (uniform) | Pinball natural shedding | Rear cylinders at constant +-5.1U0 | 800 | [0, -5.1, 5.1] |
| Karman cloak | Upstream vortex street | Pinball disrupts street | PPO periodic rotation (d1a3o12_re100) | 800 | [0, -4, 4] |
| Illusion 0.75L | Parabolic | Pinball natural shedding | PPO (d1a3o14_075L_2U_400S) | 400 | [0, -2, 2] |
| Illusion 1.0L | Parabolic | Pinball natural shedding | PPO (d1a3o14_1L_2U_600S) | 600 | [0, -2, 2] |
| Illusion 1.5L | Parabolic | Pinball natural shedding | PPO (d1a3o14_15L_2U) | 800 | [0, -2, 2] |

System: 2D channel flow (1280x512 grid, 3 rotating cylinders, Re=100 code = Re_D=50 physical).
All models: PPO with Sin activation, SB3, 64x64 hidden layers.

---

## 2. Core Result: Force-vs-Signature Systematic Separation

### 2.1 The Monotonic Trend

**Figure 1** (the flagship figure) shows the cosine similarity between force-OID mode 1 and signature-OID mode 1 across all five scenes:

![Figure 1](src/OID_analysis/data/derived/figures/fig1_force_sig_overlap.png)
*File: `src/OID_analysis/data/derived/figures/fig1_force_sig_overlap.png`*

**Panel (a)** shows the signed overlap. A cosine similarity of +1 means the two modes point in identical directions; 0 means orthogonal; -1 means opposite directions.

**Panel (b)** shows the absolute overlap with three interpretation zones color-coded: green (same channel, |overlap| > 0.7), orange (partial separation, 0.3-0.7), red (orthogonal/separated, < 0.3). The gray arrow highlights the monotonic trend.

The trend is remarkably clean:

| Scene | Signed overlap | Separation level |
|-------|---------------|-----------------|
| Steady cloak | **+0.763** | Same channel |
| Karman cloak | **-0.034** | Nearly orthogonal |
| Illusion 0.75L | **-0.082** | Near-orthogonal |
| Illusion 1.0L | **-0.495** | Moderate separation |
| Illusion 1.5L | **-0.932** | Strongly opposite |

**Physical interpretation**: The DRL controller does not engage the same flow structures for all tasks:

- **Steady cloak**: The goal is to suppress natural shedding. Suppressing shedding IS suppressing force, so both objectives engage the same correction structures.
- **Karman cloak**: The goal is to let the incoming vortex street pass through undisturbed. The correction structures that preserve the street are orthogonal to those that would maximally alter the force. The controller must "stay out of the way" of natural force-generating modes.
- **Illusion**: The goal is to generate a target shedding pattern different from natural pinball shedding. Force-OID finds structures that modify the natural force, while signature-OID finds structures that generate the target frequency. These are increasingly different -- and eventually opposite -- as the target deviates further from the natural scale.

This monotonic trend from +0.763 through -0.034 to -0.932 is the most compelling evidence that **force-relevant and signature-relevant correction structures are not the same, and their divergence quantifies task difficulty**.

---

## 3. Robustness of the Core Result

### 3.1 POD Rank Sensitivity

**Figure 2** shows how the force-sig overlap changes when the POD truncation rank varies from 6 to 16:

![Figure 2](src/OID_analysis/data/derived/figures/fig2_rank_sensitivity.png)
*File: `src/OID_analysis/data/derived/figures/fig2_rank_sensitivity.png`*

Each subplot is one scene. The y-axis is force-sig overlap. Stability is measured by the standard deviation across ranks.

| Scene | std | Stability | Verdict |
|-------|-----|-----------|---------|
| Steady cloak | 0.10 | Moderate | Sign consistent, magnitude varies |
| **Karman cloak** | **0.07** | **Stable** | **Always near zero** |
| Illusion 0.75L | 0.26 | **Unstable** | **Needs more data** |
| **Illusion 1.0L** | **0.03** | **Stable** | **Monotonic trend confirmed** |
| **Illusion 1.5L** | **0.02** | **Stable** | **Strongly separated across all ranks** |

Three of five scenes are very stable. The exception (0.75L, std=0.26) is flagged for future investigation with longer time series.

### 3.2 Karman tau_c Sensitivity

For Karman cloak, the signature observable requires a convective delay tau_c (the time for flow structures to travel from pinball to downstream sensors). If tau_c is wrong, the signature-OID could be misaligned.

**Figure 4** sweeps tau_c from 0 to 60 steps (the shedding period is approximately 30 steps):

![Figure 4](src/OID_analysis/data/derived/figures/fig4_tauc_sensitivity.png)
*File: `src/OID_analysis/data/derived/figures/fig4_tauc_sensitivity.png`*

**Top panel**: Force-sig overlap stays between 0.11 and 0.31 across ALL tau_c values. The overlap is always near the orthogonal threshold. **The Karman force-sig separation is not an artifact of a bad delay choice.**

**Bottom panel**: Signature-OID R2 stays between 0.26-0.33 across all delays. Force-OID R2 is constant at 0.36 (since force has no delay). The signature prediction is modest but stable.

---

## 4. OID vs POD: Quantitative Advantage

### 4.1 Prediction Performance

**Figure 3** compares OID and POD for both force prediction and signature prediction, using m=2 coordinates:

![Figure 3](src/OID_analysis/data/derived/figures/fig3_oid_vs_pod_r2.png)
*File: `src/OID_analysis/data/derived/figures/fig3_oid_vs_pod_r2.png`*

**Panel (a)**: Force prediction. OID (blue bars) strongly outperforms POD (red bars) in every scene. POD gives negative R2 for illusion 0.75L and 1.0L (meaning it is worse than predicting the mean), while OID gives positive R2.

**Panel (b)**: Signature prediction. Sig-OID (green) outperforms POD (red) in every scene. The strongest effect is at 0.75L (OID R2=0.661 vs POD R2=-0.034).

Master comparison table:

| Scene | Task | OID R2 (m=2) | POD R2 (m=2) | OID wins? |
|-------|------|:-----------:|:-----------:|:---------:|
| Karman | Force | **0.750** | 0.418 | YES |
| Illusion 0.75L | Force | **0.435** | -2.426 | YES |
| Illusion 0.75L | Signature | **0.661** | -0.034 | YES |
| Illusion 1.0L | Force | **0.671** | -0.237 | YES |
| Illusion 1.0L | Signature | **0.586** | -0.160 | YES |
| Illusion 1.5L | Force | **0.640** | 0.264 | YES |
| Illusion 1.5L | Signature | **0.315** | 0.060 | YES |

### 4.2 Correction-Field Dimensionality

**Figure 5** confirms that correction fields are inherently low-dimensional:

![Figure 5](src/OID_analysis/data/derived/figures/fig5_pod_energy.png)
*File: `src/OID_analysis/data/derived/figures/fig5_pod_energy.png`*

All scenes capture 97.9-99.9% of correction-field fluctuation energy in just 5 POD modes. This justifies the "r=10" default truncation (safety margin) and confirms that the controller operates in a very low-dimensional correction space.

---

## 5. Steady Cloak: Suppression Metrics

**Figure 6** presents the physically meaningful metrics for steady cloak (replacing the inappropriate time-series R2):

![Figure 6](src/OID_analysis/data/derived/figures/fig6_steady_metrics.png)
*File: `src/OID_analysis/data/derived/figures/fig6_steady_metrics.png`*

| Metric | Value | Interpretation |
|--------|-------|---------------|
| Full-field RMS reduction | **99.43%** | Nearly complete fluctuation suppression |
| Recirculation area collapse | **38.55%** | The mean wake bubble shrinks significantly |
| Recirculation length change | **3.24%** | The bubble length barely changes |
| Fy (lift) RMS reduction | **83.29%** | Lift fluctuations strongly suppressed |

The large area collapse with minimal length change is interesting: the controlled wake becomes **narrower** but not **shorter**. This suggests the control primarily suppresses lateral (y-direction) fluctuations rather than shortening the streamwise extent of the recirculation zone.

---

## 6. OID and the Control Law

### 6.1 White-Box Chain

**Figure 7** answers: do OID coordinates capture the full control law?

![Figure 7](src/OID_analysis/data/derived/figures/fig7_whitebox_summary.png)
*File: `src/OID_analysis/data/derived/figures/fig7_whitebox_summary.png`*

| Model | Action R2 | Meaning |
|-------|:---------:|---------|
| obs -> act | **0.956** | PPO baseline: raw sensors predict actions |
| OID coord -> act | **0.225** | Force-OID coordinates capture 22.5% of action variance |
| OID+force -> act | **0.233** | Adding force doesn't help |

This is NOT a failure. OID is designed to find structures relevant to **observables** (force, signature), not to **actions**. Force-OID coordinates are physics-interpretable coordinates (what correction structures affect force), not control-state coordinates (what the controller internally uses). An action-related coordinate would require a separate causal-PCD analysis using the action itself as the observable.

---

## 7. Open Items and Caveats

1. **Illusion 0.75L rank sensitivity** -- The force-sig overlap varies with POD rank (std=0.26). This needs investigation with a longer time series or phase-resampled data.

2. **Karman future-signal R2** -- Signature-OID gives R2 near zero for Karman. This is under investigation. Possible causes: (a) the delayed error observable has artificially low variance due to target alignment; (b) tau_c needs scene-specific estimation using cross-correlation.

3. **No mode-to-field mapping** -- OID spatial modes (psi_k) are computed but not yet visualized as flow field plots. This would answer: "where in the physical domain does the force-sig separation live?" (near-body vs downstream). CCD zone analysis already suggests the answer is zone-dependent.

4. **PCD (whitened) did not outperform simple OID** -- The more complex whitened cross-correlation did not improve results. The simple cross-covariance SVD is sufficient for the current data quality.

5. **No cross-validation** -- The current R2 values are from 70/30 split on a single rollout. Cross-validation across multiple independent rollouts would strengthen the results.

6. **Data independence** -- All scenes use the same correction-field protocol (Delta-q_ctl = q_ctl - q_blk), ensuring fair cross-scene comparison. The illusion-position q_blk was collected separately from the cloak-position q_blk (geometry is different: front_x 19 vs 30, sensor_x 30 vs 40).

---

## 8. Figures

All figures in `src/OID_analysis/data/derived/figures/`:

| Figure | File | Description |
|--------|------|-------------|
| 1 | `fig1_force_sig_overlap.png` | **Flagship**: Force-OID vs signature-OID overlap across all 5 scenes. Signed and absolute versions with monotonic trend. |
| 2 | `fig2_rank_sensitivity.png` | POD rank sensitivity (r=6,8,10,12,16) of force-sig overlap. 5 subplots, one per scene. |
| 3 | `fig3_oid_vs_pod_r2.png` | OID vs POD prediction R2. Left: force. Right: signature. All 4 periodic scenes. |
| 4 | `fig4_tauc_sensitivity.png` | Karman tau_c sensitivity. Top: overlap vs delay. Bottom: R2 vs delay. 10 delays tested. |
| 5 | `fig5_pod_energy.png` | Correction-field POD energy capture (5 modes, cumulative %). |
| 6 | `fig6_steady_metrics.png` | Steady cloak suppression metrics: RMS reduction, recirculation collapse, force reduction. |
| 7 | `fig7_whitebox_summary.png` | White-box chain: obs->act vs OID->act vs OID+force->act. Horizontal bar chart. |

---

## 9. References

- Sch12: Schlegel et al. "On least-order flow representations for aerodynamics and aeroacoustics." JFM 2012.
- Lyu23: Lyu et al. "Canonical correlation decomposition for data-driven analysis."
- Kan17b: Kantsios et al. "Body-connected near wake as primary force determinant."
- Che19, Che21b: Chen-Liu line on rotation first rewriting near-body source terms.
- Tad10: Tadmor et al. "Low-dimensional state for flow control."
