The output response in Laplace space is then simply C s G indivudal s n F s The

The output response in laplace space is then simply c

This preview shows page 7 - 10 out of 11 pages.

7
Image of page 7
8
Image of page 8
1 % init symbolic variables 2 syms s t; 3 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 % define inputs 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7 % residence time 8 tau = 4; 9 % CSTR Transfer function 10 G s = 1/(tau * s+1); 11 % Impluse 12 F t impluse = dirac(t); 13 F s impluse = laplace(F t impluse, t, s); 14 % Heaviside 15 F t step = heaviside(t); 16 F s step = laplace(F t step, t, s); 17 % Ramp 18 F t ramp = t; 19 F s ramp = laplace(F t ramp, t, s); 20 21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 22 % calculate time domain responses with inverse laplace transform 23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 24 C t impluse = ilaplace(G s * F s impluse); 25 C t step = ilaplace(G s * F s step); 26 C t ramp = ilaplace(G s * F s ramp); 27 28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 29 % create functions from time domain responses 30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 31 fct impluse = matlabFunction(C t impluse); 32 fct step = matlabFunction(C t step); 33 fct ramp = matlabFunction(C t ramp); 34 35 36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 37 % Plot 3.a 38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 39
Image of page 9
Image of page 10

You've reached the end of your free preview.

Want to read all 11 pages?

  • Fall '09
  • CSTRs

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture