# yellowbooker/standard-coupling-matrix-synthesis-code architecture

> Architecture diagram of the GitHub repository yellowbooker/standard-coupling-matrix-synthesis-code, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yellowbooker/standard-coupling-matrix-synthesis-code
- Repository: https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code

## Overview

This MATLAB toolbox synthesizes generalized-Chebyshev coupling matrices, transforms them into standard filter topologies, and includes lossy-filter and predistortion workflows. The README documents the main entry points and the purpose of the named functions, but no source excerpts were provided; therefore, implementation-level calls from the entry points are not asserted.

Main entry points: [`CM2arrow.m`](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CM2arrow.m) (Arrow conversion), [`Rotate.m`](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Rotate.m) (Matrix rotation), [`EPF2Y.m`](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/EPF2Y.m) (EPF to Y), [`Y2CMtrans.m`](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Y2CMtrans.m) (Y to coupling matrix)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_synthesis["Synthesis"]
  node_gmain["Lossless entry"]
  node_general["General Chebyshev"]
  node_chebyepf["Chebyshev polynomials<br/>[Cheby2EPF.m]"]
  node_epfy["EPF to Y<br/>[EPF2Y.m]"]
  node_unitary["Unitary check<br/>[CheckUnitary.m]"]
end

subgraph group_matrix["Matrix transforms"]
  node_ycm["Y to coupling matrix<br/>[Y2CMtrans.m]"]
  node_rotate["Matrix rotation<br/>[Rotate.m]"]
  node_folded["Folded conversion<br/>[to_foldedCM.m]"]
  node_arrow["Arrow conversion<br/>[CM2arrow.m]"]
end

subgraph group_topology["Topology extraction"]
  node_ct["CT extraction<br/>[CTExtract.m]"]
  node_box["Box extraction<br/>[BoxExtract.m]"]
  node_box6["Extended box extraction<br/>[Box6dExtract.m]"]
  node_cq["CQ extraction<br/>[CQExtract.m]"]
end

subgraph group_special["Lossy and predistortion"]
  node_lmain["Lossy entry<br/>[LossyFilterMain.m]"]
  node_pmain["Predistortion entry"]
  node_epfyl["Lossy EPF to Y<br/>[EPF2Ylossy.m]"]
  node_lossycm["Lossy matrix conversion<br/>[LossyCM2PCP.m]"]
  node_lossdist["Loss redistribution<br/>[LossDistribution.m]"]
  node_pred["Predistortion synthesis<br/>[Predistortion.m]"]
  node_adaptive["Adaptive predistortion"]
end

subgraph group_response["Response analysis"]
  node_response["S-parameter response<br/>[CMFC_Response.m]"]
end

node_user(("Filter designer"))

node_user -->|"runs"| node_gmain
node_user -->|"runs"| node_lmain
node_user -->|"runs"| node_pmain
node_chebyepf -->|"provides EPF"| node_epfy
node_epfy -->|"provides Y"| node_ycm
node_epfyl -->|"provides Y"| node_ycm
node_rotate -->|"rotates matrix"| node_folded
node_rotate -->|"rotates matrix"| node_arrow
node_arrow -->|"extracts CT"| node_ct
node_arrow -->|"extracts box"| node_box
node_arrow -->|"extracts extended box"| node_box6
node_arrow -->|"extracts CQ"| node_cq
node_lossycm -->|"redistributes loss"| node_lossdist
node_response -.->|"checks response"| node_unitary

click node_gmain "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/GChebyshevFilterMain.m"
click node_lmain "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/LossyFilterMain.m"
click node_pmain "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/PredistortionFilterMain.m"
click node_general "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/General_Chebyshev.m"
click node_chebyepf "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Cheby2EPF.m"
click node_epfy "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/EPF2Y.m"
click node_epfyl "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/EPF2Ylossy.m"
click node_unitary "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CheckUnitary.m"
click node_ycm "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Y2CMtrans.m"
click node_rotate "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Rotate.m"
click node_folded "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/to_foldedCM.m"
click node_arrow "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CM2arrow.m"
click node_ct "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CTExtract.m"
click node_box "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/BoxExtract.m"
click node_box6 "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Box6dExtract.m"
click node_cq "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CQExtract.m"
click node_lossycm "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/LossyCM2PCP.m"
click node_lossdist "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/LossDistribution.m"
click node_pred "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Predistortion.m"
click node_adaptive "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/AdaptivePredistortion.m"
click node_response "https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CMFC_Response.m"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gmain,node_general,node_chebyepf,node_epfy,node_unitary toneBlue
class node_ycm,node_rotate,node_folded,node_arrow toneAmber
class node_ct,node_box,node_box6,node_cq toneMint
class node_lmain,node_pmain,node_epfyl,node_lossycm,node_lossdist,node_pred,node_adaptive toneRose
class node_response,node_user toneIndigo
```

## Components

### Synthesis

- [Lossless entry](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/GChebyshevFilterMain.m): `GChebyshevFilterMain.m`
- [General Chebyshev](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/General_Chebyshev.m): `General_Chebyshev.m`
- [Chebyshev polynomials](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Cheby2EPF.m): `Cheby2EPF.m`
- [EPF to Y](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/EPF2Y.m): `EPF2Y.m`
- [Unitary check](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CheckUnitary.m): `CheckUnitary.m`

### Matrix transforms

- [Y to coupling matrix](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Y2CMtrans.m): `Y2CMtrans.m`
- [Matrix rotation](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Rotate.m): `Rotate.m`
- [Folded conversion](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/to_foldedCM.m): `to_foldedCM.m`
- [Arrow conversion](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CM2arrow.m): `CM2arrow.m`

### Topology extraction

- [CT extraction](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CTExtract.m): `CTExtract.m`
- [Box extraction](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/BoxExtract.m): `BoxExtract.m`
- [Extended box extraction](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Box6dExtract.m): `Box6dExtract.m`
- [CQ extraction](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CQExtract.m): `CQExtract.m`

### Lossy and predistortion

- [Lossy entry](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/LossyFilterMain.m): `LossyFilterMain.m`
- [Predistortion entry](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/PredistortionFilterMain.m): `PredistortionFilterMain.m`
- [Lossy EPF to Y](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/EPF2Ylossy.m): `EPF2Ylossy.m`
- [Lossy matrix conversion](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/LossyCM2PCP.m): `LossyCM2PCP.m`
- [Loss redistribution](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/LossDistribution.m): `LossDistribution.m`
- [Predistortion synthesis](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/Predistortion.m): `Predistortion.m`
- [Adaptive predistortion](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/AdaptivePredistortion.m): `AdaptivePredistortion.m`

### Response analysis

- [S-parameter response](https://github.com/yellowbooker/standard-coupling-matrix-synthesis-code/blob/main/CMFC_Response.m): `CMFC_Response.m`

### Other components

- **Filter designer**

## Connections

- Filter designer → Lossless entry: runs (evidence: `README.md`)
- Filter designer → Lossy entry: runs (evidence: `README.md`)
- Filter designer → Predistortion entry: runs (evidence: `README.md`)
- Chebyshev polynomials → EPF to Y: provides EPF (evidence: `README.md`)
- EPF to Y → Y to coupling matrix: provides Y (evidence: `README.md`)
- Lossy EPF to Y → Y to coupling matrix: provides Y (evidence: `README.md`)
- Matrix rotation → Folded conversion: rotates matrix (evidence: `README.md`)
- Matrix rotation → Arrow conversion: rotates matrix (evidence: `README.md`)
- Arrow conversion → CT extraction: extracts CT (evidence: `README.md`)
- Arrow conversion → Box extraction: extracts box (evidence: `README.md`)
- Arrow conversion → Extended box extraction: extracts extended box (evidence: `README.md`)
- Arrow conversion → CQ extraction: extracts CQ (evidence: `README.md`)
- Lossy matrix conversion → Loss redistribution: redistributes loss (evidence: `README.md`)
- S-parameter response → Unitary check: checks response
