Skip to main content
ClaudeWave
ES, Spanish
Skill1.2k estrellas del repoactualizado 6d ago

matlab-estimate-sar

This MATLAB Antenna Toolbox skill computes Specific Absorption Rate (SAR) in biological tissue near or inside antennas using three approaches: birdcage coils with volumetric phantoms for MRI applications, conformal arrays with custom 3D tissue shapes for external antennas, and direct E-field calculations for implantable devices. Use it when assessing RF exposure compliance, modeling tissue absorption, calculating point or mass-averaged SAR, or validating regulatory standards like FCC or ICNIRP limits.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-estimate-sar && cp -r /tmp/matlab-estimate-sar/skills-catalog/rf-and-mixed-signal/matlab-estimate-sar ~/.claude/skills/matlab-estimate-sar
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# SAR Estimation Skill

You are an expert RF and antenna engineer assisting with Specific Absorption Rate (SAR) estimation. Use MATLAB Antenna Toolbox to model antennas near biological tissue, compute internal E-fields, and calculate SAR for regulatory compliance assessment.

## When to Use

- User wants to compute SAR from an antenna near or inside biological tissue
- User wants to assess RF exposure compliance (FCC/ICNIRP limits)
- User wants to model a birdcage coil for MRI SAR analysis
- User asks about tissue absorption, power deposition, or RF safety
- User wants to compute point SAR or mass-averaged SAR (1g/10g)
- User is designing an implantable antenna and needs SAR estimation

## When NOT to Use

- User wants to design the antenna itself — use `matlab-design-antenna`
- User wants RF propagation/coverage analysis — use `matlab-analyze-rf-propagation`
- User wants RCS or scattering — use `matlab-analyze-rcs`

## SAR Formula

$$\mathrm{SAR} = \frac{\sigma |E|^2}{2\rho} \quad [\mathrm{W/kg}]$$

where:
- $\sigma$ = tissue conductivity (S/m)
- $|E|$ = electric field magnitude inside tissue (V/m)
- $\rho$ = tissue mass density (kg/m^3)

The conductivity relates to loss tangent via: $\sigma = \omega \varepsilon_0 \varepsilon_r \tan\delta$

## Three Approaches

| Approach | Antenna | Tissue Model | Tissue Properties | Best For |
|----------|---------|--------------|-------------------|----------|
| `birdcage` + `Phantom` | Birdcage MRI coil only | Volumetric tetrahedral mesh (struct) | Arbitrary εr and LossTangent (no cap) | MRI SAR with realistic tissue |
| `conformalArray` + `shape.Custom3D` | Any antenna (dipole, PIFA, etc.) | Surface triangulation with catalog material | Limited to catalog (LossTangent ≤ 0.03) | Phone/device SAR (antenna outside tissue) |
| Direct `EHfields` + SAR formula | Any antenna (pcbStack, catalog) | Post-processing only (no tissue in solver) | Real values in formula (no cap) | Implantable antenna SAR |

**Key limitation:** The `dielectric` class enforces `LossTangent <= 0.03`. Real tissue (brain at 900 MHz: tanδ ≈ 0.36) exceeds this cap. Only `birdcage.Phantom` bypasses this limit using a custom struct format. The direct `EHfields` approach avoids this cap by applying tissue conductivity in the SAR formula rather than in the solver.

## Approach 1: birdcage + Phantom (Full Tissue Properties)

The `birdcage` antenna is the ONLY object that supports volumetric dielectric bodies via its `Phantom` property. The phantom is included directly in the MoM solver.

### Phantom Data Format

```matlab
phantom = struct( ...
    Points=vertices, ...      % N x 3 vertex coordinates (meters)
    Tetrahedra=elements, ...  % M x 4 tetrahedral element connectivity
    EpsilonR=epsR, ...        % Relative permittivity (scalar)
    LossTangent=tanD);        % Dielectric loss tangent (scalar, no cap)
```

### Shipped Phantoms

- `humanheadcoarse.mat` -- 584 vertices, 2818 tetrahedra (fast)
- `humanheadfine.mat` -- finer resolution (more accurate, slower)

Both provide variables `P` (vertices) and `T` (tetrahedra). Apply `scaleFactor = 0.003` to get physical dimensions.

### Workflow

```matlab
freq = 128e6;  % 3T MRI Larmor frequency

% Tissue properties (gray matter at 128 MHz)
tissueEpsR = 77;
tissueSigma = 0.51;  % S/m
tissueRho = 1040;    % kg/m^3
omega = 2 * pi * freq;
eps0 = 8.854e-12;
tanD = tissueSigma / (omega * eps0 * tissueEpsR);

% Load phantom
load humanheadcoarse.mat
scaleFactor = 0.003;
phantom = struct( ...
    Points=scaleFactor * P, ...
    Tetrahedra=T, ...
    EpsilonR=tissueEpsR, ...
    LossTangent=tanD);

% Create birdcage with phantom
bc = birdcage(Phantom=phantom);
figure;
show(bc);

% Compute E-fields inside head
gridSpacing = 0.02;
[obsPoints, insideMask] = createObservationGrid(phantom.Points, gridSpacing);
[E, ~] = EHfields(bc, freq, obsPoints');

% Calculate SAR
E_mag_sq = abs(E(1,:)).^2 + abs(E(2,:)).^2 + abs(E(3,:)).^2;
SAR_point = tissueSigma * E_mag_sq / (2 * tissueRho);
```

## Approach 2: conformalArray + shape.Custom3D (Any Antenna)

Use `conformalArray` to place any antenna alongside a dielectric head phantom. The `shape.Custom3D` object acts as a passive dielectric scatterer in the MoM problem -- no feed is required.

### Key Insight

`shape` objects can be placed directly as elements in `conformalArray.Element` without wrapping in `customAntenna`. They do not need a feed and participate as passive dielectric bodies in the full-wave solver.

### Workflow

```matlab
freq = 2.4e9;
c = physconst("LightSpeed");
lambda = c / freq;

% Load and scale head phantom
load humanheadcoarse.mat
scaleFactor = 0.003;
pts = scaleFactor * P;
pts = pts * (0.18 / (max(pts(:,1)) - min(pts(:,1))));  % 180mm width

% Extract surface triangulation
TR = triangulation(T, pts);
[surfFaces, surfVertices] = freeBoundary(TR);
headTri = triangulation(surfFaces, surfVertices);

% Create dielectric shape
headShape = shape.Custom3D(headTri);
headShape.Dielectric = "TMM10";  % highest-permittivity catalog material

% Design antenna
d = design(dipole, freq);

% Build conformalArray
arr = conformalArray;
arr.Element = {d, headShape};
arr.ElementPosition = [0.10 0 0; 0 0 0];
arr.Reference = "origin";

figure;
show(arr);
figure;
pattern(arr, freq);

% Compute E-fields inside head
gridSpacing = 0.015;
[obsPoints, insideMask] = createObservationGrid(pts, gridSpacing);
[E, ~] = EHfields(arr, freq, obsPoints');

% SAR computation (using TMM10 properties)
epsR = 9.8; tanD_mat = 0.0022; rho = 2270;
omega = 2 * pi * freq; eps0 = 8.854e-12;
sigma = omega * eps0 * epsR * tanD_mat;
E_mag_sq = abs(E(1,:)).^2 + abs(E(2,:)).^2 + abs(E(3,:)).^2;
SAR_point = sigma * E_mag_sq / (2 * rho);
```

## Observation Grid Generation

Filter a 3D grid to only include points inside the head volume:

```matlab
function [obsPoints, insideMask] = createObservationGrid(pts, gridSpacing)
    margin = gridSpacing;
    xVec = (min(pts(:,1))+margin) : gridSpacing : (max(pts(:,1))-margin);
    yVec = (min(pts(:,2)
matlab-access-datafeedSkill

>

matlab-analyze-ams-waveformSkill

Analyze AMS waveform data using Mixed-Signal Blockset utilities: phase noise measurement, clock jitter, anti-aliased resampling, timing measurements, lock time, INL/DNL, ADC/DAC calibration, HSpice import. Use when analyzing time-domain voltage from PLL/VCO/clock simulations, measuring phase noise from variable-step solver output, computing jitter, or resampling non-uniform data.

matlab-analyze-dataSkill

Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.

matlab-analyze-dependenciesSkill

Analyze the effective toolbox file set to produce a Dependency Manifest — classify all transitive dependencies as included, product, add-on, or external-unresolved, then present resolution options with tradeoffs. Use after matlab-define-toolbox-api when the spec is approved.

matlab-analyze-emSkill

S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pcb-pdn).

matlab-analyze-installed-antennaSkill

Analyze antennas installed on electrically large conducting platforms using MATLAB Antenna Toolbox. Loads platform geometry from STL/STEP/IGES, installs antenna elements, selects electromagnetic solvers (MoM-PO, FMM, MoM), and computes patterns, impedance, coupling, and efficiency. Use when the user wants to model an antenna on a vehicle, aircraft, ship, satellite, or other large structure.

matlab-analyze-pcb-pdnSkill

PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current density, power nets, or design rule checking on a PCB. Invoke BEFORE writing code — the PDN API chain is specialized and non-obvious. SKIP: importing a PCB file (use matlab-read-pcb-layout), EM field/S-parameter extraction (use matlab-analyze-em), material/stackup setup only (use matlab-manage-pcb-material), transmission line design (use matlab-design-pcb-txline).

matlab-analyze-rcsSkill

Calculate and visualize monostatic and bistatic radar cross section (RCS) using MATLAB Antenna Toolbox. Computes RCS of platforms, antennas, and arrays with PO, MoM, and FMM solvers, supporting HH/VV/HV/VH polarization, GPU acceleration, and near-field observation. Use when the user wants to compute, plot, or analyze radar cross section.