matlab-fit-rational-model

Fit S-parameter data to rational models and compute time-domain responses.

883|109|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-fit-rational-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-fit-rational-model
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/rf-and-mixed-signal/matlab-fit-rational-model
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-fit-rational-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables you to convert frequency-domain S-parameter measurements into rational models and then derive physically meaningful time-domain responses for verification, simulation, and export.

Core Features & Use Cases

  • Rational model fitting for RF networks: Fit S-parameter data using the rational object to create broadband, compact mathematical representations.
  • Time-domain analysis from fitted models: Compute TDR, impulse, step, and arbitrary transient responses derived from the rational fit.
  • Model verification and physical constraints: Validate fit accuracy in the frequency domain and enforce causality/passivity before downstream use.
  • Export for simulation ecosystems: Generate SPICE subcircuits or Verilog-A models from the fitted rational representation.

Quick Start

Fit the attached S-parameter file default.s2p with rational, verify the S21 fit against the original data, and plot the time-domain step response in nanoseconds.

Frequently Asked Questions about matlab-fit-rational-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert S-parameter frequency-domain data into time-domain responses?

S-parameter frequency-domain data is fitted to rational function models, which then derive physically meaningful time-domain responses like TDR, impulse, and step responses for verification and simulation.

Can I export fitted rational models to SPICE subcircuits or Verilog-A?

Yes, fitted rational representations can be exported to generate SPICE subcircuits or Verilog-A models, allowing integration of broadband RF S-parameter data into standard simulation ecosystems.

How do I enforce passivity and check causality for RF S-parameter rational models?

Causality and passivity checks are performed using iscausal and ispassive functions, and makepassive is applied to enforce physical constraints on the fitted rational model before downstream use.

Does RF Toolbox support time-domain reflectometry and transient analysis from S-parameters?

Yes, RF Toolbox supports rational fitting of S-parameters and computes time-domain reflectometry, impulse, step, and arbitrary transient responses using functions like stepresp, impulse, and timeresp.

What is the best way to fit broadband RF S-parameters into a compact mathematical model?

Broadband RF S-parameters are fitted using the rational object to create compact mathematical representations via vector fitting or AAA fitting, enabling accurate broadband modeling and frequency response verification.

Why does my time-domain step response from S-parameter data show non-causal behavior?

Non-causal behavior occurs when the rational model lacks enforced causality. Applying the iscausal check and using makepassive ensures the fitted S-parameter model meets physical constraints for accurate transient responses.