Add files via upload

This commit is contained in:
2026-02-19 17:07:57 -05:00
committed by GitHub
parent 24cdb923e7
commit 50be69e21a

105
README.md Normal file
View File

@@ -0,0 +1,105 @@
# Active CRLH Transmission Line Modeler
A MATLAB simulation of an **active Composite Right/Left-Handed (CRLH) transmission line** with a frequency-dependent negative resistance element. The structure achieves controlled gain across a user-defined passband by embedding an active shunt element (modeled as a negative resistance `Rn`) within a periodic CRLH unit cell topology.
This is supplemental code for the paper "Negative Resistance Enabled Amplifying CRLH Transmission Lines With Uniform Insertion Gain" (https://ieeexplore.ieee.org/document/11366944)
---
## Background
CRLH transmission lines support both left-handed (LH) and right-handed (RH) wave propagation, enabling precise dispersion control. By introducing a frequency-shaped negative conductance into the shunt branch, this design compensates for losses and achieves net gain across the passband.
The unit cell uses a ** symmetric T-network topology** with:
- **Series branch**: Right-handed inductance `LR` + left-handed capacitance `CL`
- **Shunt branch**: Right-handed capacitance `CR` + left-handed inductance `LL` + active negative resistance `Rn(f)`
---
## Features
- Calculates CRLH element values (`LR`, `CR`, `LL`, `CL`) analytically from two frequency/phase design targets
- Models frequency-dependent negative resistance as `Rn(f) = -A·exp(α·f)`, fit to desired shunt conductance at two frequencies
- Cascades `n` unit cells in a **passiveactivepassive** symmetric arrangement
- Converts ABCD matrices to S-parameters
- Plots:
- Cascaded S-parameters (`S11`, `S21`)
- Dispersion diagram (`βp` vs. frequency)
- Shunt conductance vs. frequency
- Required `Rn(f)` vs. exact analytical solutions
- Single unit cell S-parameters with approximate insertion loss overlay
- Bloch impedance (real and imaginary)
- Outputs (in command window):
- Constituent CRLH parameters
- $R_n(\omega) exponential fit parameters
- $S_{21}$ at desired frequencies ($\omega_1$ and $\omega_2$)
- Maximum gain
---
## Dependencies
- [SPARAMS](https://github.com/njchorda/MATLAB-Touchstone-Reader) — provides `SPARAMS.abcd2s()` for ABCD-to-S-parameter conversion. Add as a submodule or clone separately and add to your MATLAB path.
- `closestIdx` — a utility function for finding the nearest index in a vector. Included in the bottom of the main file.
After cloning, add dependencies to your MATLAB path
---
## Usage
1. Open `Active_NRCRLH_Calcs.m` in MATLAB
2. Set your design parameters in the **Input parameters** section:
| Parameter | Description |
|-----------|-------------|
| `f1`, `f2` | Lower and upper frequency bounds of the passband (Hz) |
| `theta1`, `theta2` | Desired phase shifts at `f1` and `f2` (rad) |
| `n` | Number of unit cells (must be **odd** for passiveactivepassive symmetry) |
| `Z0` | Reference impedance (default: 50 Ω) |
| `G_desired` | Target shunt conductance (set as a fraction of `G_max`) |
3. Run the script — six figures will be generated automatically. You may need to tune the figX.Position parameter to fit them on your screen
---
## Design Equations
CRLH element values are solved analytically from the two phase/frequency constraints:
$$L_R = \frac{Z_0(\theta_1 \frac{\omega_1}{\omega_2} - \theta_2)}{n\,\omega_2\!\left(1 - \left(\frac{\omega_1}{\omega_2}\right)^2\right)}$$
$$C_R = \frac{\theta_1 \frac{\omega_1}{\omega_2} - \theta_2}{n\,\omega_2 Z_0\!\left(1 - \left(\frac{\omega_1}{\omega_2}\right)^2\right)}$$
with symmetric expressions for `LL` and `CL`.
The required negative resistance at each frequency satisfies:
$$G_{sh} = \frac{R_n}{R_n^2 + (\omega L_L)^2}$$
which is solved exactly at `f1` and `f2`, then fit with an exponential model across the full band.
---
## Output Figures
| Figure | Contents |
|--------|----------|
| 1 | Cascaded `S11` and `S21` (dB) |
| 2 | Dispersion: `βp` (deg) vs. frequency |
| 3 | Shunt conductance `G(f)` vs. frequency |
| 4 | `Rn(f)`: exponential fit vs. exact analytical solutions |
| 5 | Single unit cell S-parameters + approximate `S21` |
| 6 | Bloch impedance `ZB` (real and imaginary) |
---
## Notes
- `n` must be **odd** to maintain the passiveactivepassive cascade symmetry
- Loss-balanced condition (`Gsh = Rse/Z0²`) is available but commented out by default
- The Rollett (K-Δ) stability analysis block is present in the code but commented out — uncomment to assess unconditional stability across frequency
- Maximum achievable gain is estimated from the loss parameters and printed to the console on each run
---
## License
MIT License — see `LICENSE` for details.