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: % FSAN xDSL simulation tool manual % Bingham, "ADSL, VDSL, and Multicarrier Modulation", 2000 %% =========================================================================== %% =========================================================================== % Copyright (C): % 1999 by Telia Research AB, Lulea, Sweden; % 2000 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Project : FSAN xDSL simulation tool % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se) % % CVS: $Id: getZin.m,v 1.1 2000/11/10 10:18:25 tono Exp $ %% =========================================================================== % Change History % 1999-08-11 (DaB) Created % 2000-03-14 (ToNo) Modified how cables are defined (now in a list) % 2000-04-03 (UvAn) Changed according to new interface of getTwoPortModel % 2000-07-05 (GS) Modified for also accepting bridged tap directly at LT % 2000-07-17 (ToNo) Added comments, split out a function getABCD %% =========================================================================== Zl = Zterm; Zs = Zterm; fi_tot = getABCD(ex,start,stop,topology,f,Zterm); Zin = (fi_tot{1,1}.*Zl+fi_tot{1,2})./(fi_tot{2,1}.*Zl+fi_tot{2,2}); % Test to generate the Zin on the NT side at the same time ZinNT = -(fi_tot{2,2}.*Zs-fi_tot{1,2})./(-fi_tot{2,1}.*Zs+fi_tot{1,1}); % My