view m-toolbox/classes/+utils/@math/getk.m @ 19:69e3d49b4b0c
database-connection-manager
Update ltpda_uo.fromRepository
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05)
parents
f0afece42f48
children
line source
+ − % GETK get the mathematical gain factor for a pole-zero model
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − %
+ − % DESCRIPTION
+ − %
+ − % A zpk model in matlab notation is an object of the type:
+ − %
+ − % (s-z1)...(s-zN)
+ − % zpk = k*----------------
+ − % (s-p1)...(s-pn)
+ − %
+ − % the zero-frequency-gain (zfg) of this object is obtained by the equation,
+ − % for s = 0.
+ − % LTPDA pzmodels are constructed by poles, zeros and zero-frequency-gain
+ − % (zfg). This means that the value stored in the 'gain' field of the model
+ − % is the zfg!
+ − % This function calculate k.
+ − %
+ − % CALL:
+ − %
+ − % k = getk(z,p,zfg)
+ − %
+ − % INPUT:
+ − %
+ − % z zeros
+ − % p poles
+ − % zfg zero frequency gain (model resp at zero frequency)
+ − %
+ − %
+ − % OUTPUT:
+ − %
+ − % k mathematical gain
+ − %
+ − % NOTE:
+ − %
+ − %
+ − %
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − % VERSION: $Id: getk.m,v 1.1 2010/02/19 14:59:04 luigi Exp $
+ − %
+ − % HISTORY: 08-10-2008 L Ferraioli
+ − % Creation
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − function k = getk(z,p,zfg)
+ −
+ − zrs = prod(-1*z);
+ − pls = prod(-1*p);
+ −
+ − k = zfg*pls/zrs;
+ −
+ − end
+ −
+ −
+ −
+ −
+ −
+ −
+ −