1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Matlab Systems and Signals Problem [EE]

  1. Feb 21, 2010 #1
    1. The problem statement, all variables and given/known data

    Questions
    We ¯rst model the vocal tract by a simple second-order di®erential equation:
    d2y(t)/dt2 + B1dy(t)/dt+ C1y(t) = A1x(t);
    where A1 = 3:8469 £ 106, B1 = 325:6907, and C1 = 3:8469 . We denote
    this system by H1. Here, t is in seconds.
    Step 1.) Use MATLAB to compute and plot the impulse response h1(t) and the
    unit step response g1(t) of H1.
    Hints: use MATLAB's impulse and step functions.
    1
    For example, \Ts=1e-004; t=[0.0:Ts:0.1]; num1=[A1]; den1=[1 B1 C1];
    sys1=tf(num1, den1); h1=impulse(sys1, t), figure; plot(t, h1)".
    Step 2.) Assume the input x1(t) to H1 is given by
    x1(t) =
    1; when 0 <= t <= 5.0 * 10^-4;
    0; otherwise:
    (2)
    Compute and plot the output y1(t) using MATLAB.
    Hints: Create the input x1(t) by Ts=1e-004; x1=ones(5,1)", and then
    compute the output by \y1=conv(x1, h1)*Ts


    3. The attempt at a solution

    I'm 99% sure I got Question 1 with the following matlab code:
    A1 = 3.8469*10^6;
    B1 = 325.6907;
    C1 = 3.8469*10^6;

    num = [ A1 ];
    den = [ 1 B1 C1 ];

    tfunct = tf(num, den);
    Ts = 1e-004;
    t =[0.0:Ts:0.1];
    h1 = impulse(tfunct, t), figure;
    plot(t, h1);

    It works and I get a plot

    -----
    With question 2 I can't figure out how the hint is supposed to factor in the input x1(t). It somehow uses 'ones(5,1)', then conv( ones(5,1), h1); (where h1 is impulse from question 1).
    The answer I get definitely doesn't seem right though. This is my attempt at it:

    A1 = 3.8469*10^6;
    B1 = 325.6907;
    C1 = 3.8469*10^6;

    num = [ A1 ];
    den = [ 1 B1 C1 ];

    tfunct = tf(num, den);

    Ts = 1e-004;
    x1 = ones(5,1);

    t =[0.0:Ts:0.1];
    h1 = impulse(tfunct, t);
    y1 = (conv(x1, h1)*Ts);
    figure;
    plot(y1, t);

    ---------
    I'm just really not sure how input with constraints is factored in through the 'ones' function. Any ideas??

    Thanks
    Greg
     
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted