function [Zin, ZinNT] = getZin(ex,start,stop,topology,f,Zterm); %getZin - Get the input impedance % between start and stop node in the topology % % Parameter: ex experiment struct % Parameter: start start node % Parameter: stop stop node % Parameter: topology Scenario Topology % Parameter: f Frequency axis % Parameter: Zterm Termination Impedance % Returns: Zin Input impedance % % Example(s): % segs = size(ex.tt.topology); % f = ex.param.frequency.f; % Zin = getZin(ex,1,segs(1),ex.tt.topology,f,ex.param.Zterm); % semilogx(f,Zin); % % Reference: % Chen "DSL simulations Techniques and Standards Development", 1998 %% =========================================================================== %% =========================================================================== % Copyright (C): % 2000-2001 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Project : FSAN xDSL simulation tool % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % % CVS: $Id: getZin.m,v 1.2 2001/12/18 09:44:45 tono Exp $ %% =========================================================================== % Change History % 2000-07-17 (ToNo) Split out a function getABCD to be able to do this % 2001-12-17 (ToNo) Fixed a reverse impedance %% =========================================================================== Zl = Zterm; Zs = Zterm; fi_tot = getABCD(ex,start,stop,topology,f,Zterm); % From Starr Eq. 3.7 (or Chen p.48) Zin = (fi_tot{1,1}.*Zl+fi_tot{1,2})./(fi_tot{2,1}.*Zl+fi_tot{2,2}); % We can also calculate the reverse impedance (Chen p.53) ZinNT = (fi_tot{2,2}.*Zs+fi_tot{1,2})./(fi_tot{2,1}.*Zs+fi_tot{1,1});