18_Ch7_ExamplesW12

18_Ch7_ExamplesW12 - Page - 1 - of 6 CHE 361: Chapter 7...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Page - 1 - of 6 CHE 361: Chapter 7 Examples Chapter 7 = Development of Empirical Dynamic Models from Step Response Experiment 1 = "empirical" -working with real process and doing experiments with measured inputs and outputs, not based on mass/energy balances and other "fundamental" physical relationships 2 = "dynamic model" -what we want to get, in CHE361 we study TFs G(s), could also be time series analysis, impulse response coefficients, frequency characteristics of process, etc. 3 = "step response" -choice of input for the experiment, could also be rectangular pulse, sin wave, pseudo-random binary pulses 4 = "data" - real world data = noise & errors, not always “nice” curves (Air Liquide, UTexas) 7.1 - Development of Models by Linear and Nonlinear Regression Differences between "linear" and "nonlinear" in this sense (1) y "simple" linear in x, y = mx+b (2) y linear in coefficients of higher powers of x, y= Cnxn + ... + C1x + C0 Attractive forms since calculation of parameters is NOT iterative (trial-and-error) Nonlinear = like fitting step response of first-order with no time delay and known gain, τ appears non-linearly in y(t) = K (1-e-t/τ) = this form arises when a differential equation is linear + 1st-order, e.g. heat or mass transfer IVP experiments which could be transformed into deviation variables and then analyzed by step2g easily = mathematical software which enables you to do NONLINEAR parameter estimation. Matrix formulation of general linear estimation: Given a set of measured outputs in a vector y = A x P with functions of measured input forming the matrix A, then the vector of parameters P can be found from P = (ATA)-1AT y For a linear model y = mx+b, the least squares approach leads to the "normal" equations, as presented in statistics courses (CBEE 213) : Example 7.1 least-squares solution for “linear regression” for best linear and quadratic models (little difference in errors). 7.2 Graphical Fitting of First-order Models using Step Tests, M = size of step FOPTD = First-Order Plus Time Delay model a) b) c) d) e) t63.2 point, y/KM = 0.632 at t = τ + θ, Fig. 7.3 initial slope = KM/τ, Example 7.2, Fig. 7.4 inflection point = max slope pt., Fig. 7.5 all data -> ln(fraction incomplete) vs. t, slope = -1/τ, intercept = θ/τ 2 point fit, t35.3 and t85.3, Sundaresan and Krishnaswamy equations (7-19) 7.3 Fitting Second-order Models using Step Tests: Example 7.3 Smith - uses Fig. 7.7 after finding t20 and t60 as shown in Fig. 7.8 (t-s adjusted for time delay) Page - 2 - of 6 CHE 361: Chap. 7 = Development of Empirical Models from Process Data (also review CHE211 Felder + Rousseau text = Chap. 2 pgs. 22-30 “Process Data Representations and Analysis” = how to use graphs) Here the change in the input was a unit step, M = 1. Chapter 7 - Demo data in standard CHE 361 Format = t,y,y' columns 0.0000000e+000 3.0000000e+000 0.0000000e+000 Linear interpolation t ( y ): 5.0000000e-001 3.0000000e+000 0.0000000e+000 1.0000000e+000 3.0000000e+000 0.0000000e+000 (y− y ) 1.5000000e+000 3.0000000e+000 0.0000000e+000 t = 1 ( t2 − t1 ) t1 + 2.0000000e+000 3.0000000e+000 0.0000000e+000 ( y2 − y1 ) 2.5000000e+000 3.2626203e+000 2.6262030e-001 3.0000000e+000 3.5402569e+000 5.4025686e-001 t20 = ____________ 3.5000000e+000 3.8209977e+000 8.2099771e-001 4.0000000e+000 4.0965752e+000 1.0965752e+000 4.5000000e+000 4.3614413e+000 1.3614413e+000 t35.3 = ____________ 5.0000000e+000 4.6120613e+000 1.6120613e+000 5.5000000e+000 4.8463760e+000 1.8463760e+000 6.0000000e+000 5.0633941e+000 2.0633941e+000 t60 = ____________ 6.5000000e+000 5.2628838e+000 2.2628838e+000 7.0000000e+000 5.4451414e+000 2.4451414e+000 t63.2 = ____________ 7.5000000e+000 5.6108183e+000 2.6108183e+000 8.0000000e+000 5.7607933e+000 2.7607933e+000 8.5000000e+000 5.8960784e+000 2.8960784e+000 9.0000000e+000 6.0177512e+000 3.0177512e+000 9.5000000e+000 6.1269057e+000 3.1269057e+000 1.0000000e+001 6.2246196e+000 3.2246196e+000 1.0500000e+001 6.3119307e+000 3.3119307e+000 1.1000000e+001 6.3898227e+000 3.3898227e+000 t85.3 = ____________ 1.1500000e+001 6.4592165e+000 3.4592165e+000 1.2000000e+001 6.5209659e+000 3.5209659e+000 1.2500000e+001 6.5758565e+000 3.5758565e+000 1.3000000e+001 6.6246064e+000 3.6246064e+000 1.3500000e+001 6.6678687e+000 3.6678687e+000 1.4000000e+001 6.7062351e+000 3.7062351e+000 1.4500000e+001 6.7402393e+000 3.7402393e+000 1.5000000e+001 6.7703616e+000 3.7703616e+000 1.5500000e+001 6.7970330e+000 3.7970330e+000 1.6000000e+001 6.8206395e+000 3.8206395e+000 1.6500000e+001 6.8415258e+000 3.8415258e+000 1.7000000e+001 6.8599997e+000 3.8599997e+000 1.7500000e+001 6.8763355e+000 3.8763355e+000 1.8000000e+001 6.8907771e+000 3.8907771e+000 1.8500000e+001 6.9035415e+000 3.9035415e+000 1.9000000e+001 6.9148215e+000 3.9148215e+000 1.9500000e+001 6.9247881e+000 3.9247881e+000 2.0000000e+001 6.9335928e+000 3.9335928e+000 2.0500000e+001 6.9413703e+000 3.9413703e+000 2.1000000e+001 6.9482395e+000 3.9482395e+000 2.1500000e+001 6.9543060e+000 3.9543060e+000 2.2000000e+001 6.9596631e+000 3.9596631e+000 2.2500000e+001 6.9643934e+000 3.9643934e+000 2.3000000e+001 6.9685700e+000 3.9685700e+000 2.3500000e+001 6.9722574e+000 3.9722574e+000 2.4000000e+001 6.9755128e+000 3.9755128e+000 2.4500000e+001 6.9783866e+000 3.9783866e+000 2.5000000e+001 6.9809236e+000 3.9809236e+000 ′ == Assumed final value y∞ 4.0000 KM Page - 3 - of 6 Chapter 7 CHE 361 Data Fitting Problem 4 Y', output deviation variable 3.5 3 2.5 2 1.5 1 0.5 0 0 5 15 10 20 25 Time Simple 1st-order Methods Method 1 : Time constant from Initial slope and final value of y’ y '(t ) = KM (1 − e − (t −θ ) /τ ) ( S (t − θ ) ) = 0.632 KM at t =τ + θ = t63.2 . With no time delay KM (1 − e − t /τ ) = KM y∞ = 4.00 and= 2.00 and the initial slope (at t = = KM / τ θ θ) Initial slope from the data = _____________________ so τ = __________ Method 2 : Time to reach 63.2 % of final value From the data, t63.2 (when y ' = 0.632 KM ) =τ + θ = __________ so τ = __________ Page - 4 - of 6 Method 3 : ln(FractionIncomplete) vs. t Method = a method for first-order with time delay 0.7032 ln ( y_inf - y) / y_inf ) >> FracIncomplete Enter final steady-state value of y-deviation variable expected (4) : 4 slope_m = -0.2396 FractionIncomplete = (y_inf - y)/y_inf; intercept_b = Y = log(FractionIncomplete); % MATLAB log(x) natural log 0.7032 tau = % Neglect first 5 points where y' = 0 4.1736 tfit=t(6:length(t)); theta = Yfit=Y(6:length(t)); 2.9350 C = polyfit(tfit,Yfit,1); % C(1)x + C(2) first-order For t,Y = ln(FractionIncomplete) slope_m = C(1) ans = intercept_b = C(2) 0 0 tau = -1/slope_m 0.5000 0 theta = tau * intercept_b 1.0000 0 1.5000 0 2.0000 0 2.5000 -0.0679 (check ln Y by hand, y’ = 0.26262, y’_inf = 4.0000, y’ at t=0 = 0) 3.0000 -0.1451 3.5000 -0.2297 4.0000 -0.3204 4.5000 -0.4161 5.0000 -0.5159 5.5000 -0.6191 From "polyfit" MATLAB function, slope_m = -0.2396, intercept_b = 6.0000 -0.7254 6.5000 -0.8341 7.0000 -0.9449 7.5000 -1.0576 ln(Fraction Incomplete) Plot , tau = 4.17 and theta = 2.94 8.0000 -1.1718 1 8.5000 -1.2874 9.0000 -1.4042 9.5000 -1.5220 10.0000 -1.6407 0 10.5000 -1.7602 11.0000 -1.8803 11.5000 -2.0010 12.0000 -2.1223 -1 12.5000 -2.2440 13.0000 -2.3661 13.5000 -2.4885 14.0000 -2.6113 -2 14.5000 -2.7343 15.0000 -2.8575 15.5000 -2.9810 -3 16.0000 -3.1047 16.5000 -3.2285 17.0000 -3.3524 17.5000 -3.4765 -4 18.0000 -3.6007 18.5000 -3.7249 19.0000 -3.8493 19.5000 -3.9737 -5 20.0000 -4.0982 20.5000 -4.2228 21.0000 -4.3474 -6 21.5000 -4.4721 0 5 10 15 20 25 22.0000 -4.5968 22.5000 -4.7215 Time 23.0000 -4.8463 23.5000 -4.9711 24.0000 -5.0959 24.5000 -5.2207 25.0000 -5.3456 >> Note: “Fit” your straight line only to the data points after t = time delay y(0) = 0, deviation variable. y (∞) − yi t −θ θ −1 Yplot, i = ti + ln = −i == mx + b Eqn (7-17) on pg 120, SEMD3 τ τ τ y (∞ ) thus τ = -1 / m and θ = τ b , where m is the slope of the line and b is the intercept value where t = 0. Page - 5 - of 6 Method 4 : One more first-order plus time delay method from SEMD3: an example of a twopoint method for FOPTD = Sundaresan and Krishnaswamy (S&K) This method uses two data points: t35.3 and t85.3 , which are the times when 35.3 % and 85.3 % of total change has occurred during a step response experiment. Here you do not subtract the time delay from these values. Then the time delay and time constant can be found from those two values of time using the following approximation equations (derived from many examples): θ= 1.3t35.3 − 0.29t85.3 and τ =) 0.67 ( t85.3 − t35.3 see Eqn. (7-19) on page 120 SEMD3 t35.3 = __________ t85.3 = __________ Calculated θ = __________ Calculated τ = __________ Number Method 1 Descriptor Initial slope G(s) Results (Only small t data used) Method 2 63.2 % change point, t63.2 (Est. of time delay and 1 point) Method 3 plot ln[( y∞ − yi ) / y∞ ] versus t GMethod 3 4e −2.9 s = 4.2 s + 1 ( Fit of ln transformation of data) Method 4 S & K, t35.3 and t85.3 (Two point fit) MATLAB topic = Computer-aided nonlinear fitting = “step2g” program = min ∑ ( errori 2 ) by choice of transfer function parameters K ,τ , θ for first-order with time delay all i =1 Page - 6 - of 6 2nd-order G(s) Method: Smith Method for second-order transfer functions without time delay using the two plots in Figure 7.7 pg.121 (but plot is for NO time delay). With time delay, subtract the assumed time delay from the measured t20 and t60 to get values for use with Figure 7.7 below for Smith’s Method. t2= t20,measured − θ ________________ = 0, Smith t6= t60,measured − θ ________________ = 0, Smith ζ (from the plot) = __________ τ (from the plot) = __________ GSmith Method = 4e −θ s = (τ 1s + 1)(τ 2 s + 1) ________________________________ ...
View Full Document

This note was uploaded on 03/01/2012 for the course CHE 361 taught by Professor Staff during the Winter '08 term at Oregon State.

Ask a homework question - tutors are online