Zeros/Poles of Transfer Function on Matlab

Discussion in 'Programmer's Corner' started by tquiva, Feb 10, 2011.

  1. tquiva

    Thread Starter Member

    Oct 19, 2010
    176
    1
    I have a transfer function

    [​IMG]

    and am trying to find the effect of the parameters R and C on the transfer function of the circuit.

    I'm trying to use Matlab and have the following script:

    Code ( (Unknown Language)):
    1.  
    2. % Function H(s)
    3. syms C R;
    4. num1 = [2       0               0;];
    5. den1 = [1       1/(R*C)         1/(C^2);];
    6. [z,p,k] = tf2zp(num1, den1)
    I'm not sure if I'm using the correct code, but could someone please assist me with this problem?
     
  2. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    The problem is that lti system functions don't accept symbolic objects as arguments. You have to construct the function manually:
    Code ( (Unknown Language)):
    1.  
    2. syms s R C;
    3. TF =(2*s^2)/(1/C^2 + s^2 + s/(C*R))
    4.  
    and then investigate the effect of R and C:
    Code ( (Unknown Language)):
    1.  
    2. C_contribution=diff(TF,C);
    3. R_contribuition=diff(TF,R);
    4.  
     
Loading...