Mercurial > hg > ltpda
view m-toolbox/classes/+utils/@math/getdc.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 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% GETDC get the DC 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) or DC gain of this object is obtained by % the equation, for s = 0. % LTPDA pzmodels are constructed by poles, zeros and DC gain. This means % that the value stored in the 'gain' field of the model is the dc gain! % This function calculate k. % % CALL: % % dc = getdc(z,p,k) % % INPUT: % % z: zeros % p: poles % k: gain coefficient % % % OUTPUT: % % dc: dc gain of the model % % NOTE: % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % VERSION: $Id: getdc.m,v 1.2 2010/02/22 15:14:17 luigi Exp $ % % HISTORY: 08-10-2008 L Ferraioli % Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function dc = getdc(z,p,k) zrs = prod(-1*z); pls = prod(-1*p); dc = k*zrs/pls; end