Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Plot Group Delay using Matlab with S-prameters

Status
Not open for further replies.

sayyedjamal

Junior Member level 3
Junior Member level 3
Joined
Feb 28, 2013
Messages
27
Helped
2
Reputation
6
Reaction score
2
Trophy points
1,283
Location
Iran
Activity points
1,442
Hi there
Recently I tested a circuit and I just get S-parameters [in Mag (dB) and Phase (Deg.)]...now I want to plot Group Delay, and I don't know how to use Matlab's code to do that...

Could anybody help me?

Thx
 

It's -dPhi/dw, I have Phi and w as two vector...
 

If you want to do this numerically, then you could approximate the derivative using finite differences. As a simple example, let's assume Phi = sin(w). Then, the matlab code would be something like this:

Code:
close all; clear all; clc;

% Define some values for w
w = (0:999)*0.01;

% Define Phi
Phi = sin(w);

% Compute differences
dPhi = diff(Phi);
dw = diff(w);

% Approximate -dPhi/dw
result = -dPhi./dw;

% Plot Phi and -dPhi/dw
plot(w, Phi);
hold on;
plot(w(1:end-1) ,result, 'r');
legend('Phi', '-dPhi/dw');

I think it would be far better to differentiate Phi analytically, but I guess this may not be possible.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top