University of California, Berkeley**We aren't endorsed by this school
Course
CHM ENG 162
Subject
Mechanical Engineering
Date
Dec 15, 2024
Pages
7
Uploaded by SargentGerbil3666
Lecture 11: Linearization & The Dynamics of First-Order SystemsCBE 162, Fall 2024October 8, 2024In this lecture, we will focus on two main concepts: (i) how to handle nonlinear ODE models by ap-proximating all nonlinear terms with linear ones; and (ii) investigate how first-order processes respond tocommon changes in the “environment” (inputs in the form of MVs or DVs).1Linearization of Nonlinear ModelsSo far, we have focused on solving linear ODEs. However, we have derived a number ofnonlinearmodelsfor different systems depending on the assumptions. A prominent example is the exponential dependence ofreaction rate on temperature. Classical process control methods have been developed based on linear ODEor TF models. Therefore, for nonlinear processes, we mustlinearizethe model so that we can directly applythe traditional process control methods.Before we discuss the main approach for linearizing nonlinear models, let us first practice classifyingODEs based on their structure.Example:Classify the following ODEs as linear or nonlinear (box nonlinear terms, if they exist).1.dydt+y=xLinear2.dydt+sin(y)=xNonlinear3.dydt+y=xyNonlinear4.ydydt+y=x2NonlinearHow can we handle these terms? We need to take advantage ofTaylor series expansion, which we formallydefine next.1.1Taylor Series ExpansionA Taylor series of a functionf(x) is an infinite sum of terms that are expressed in terms of the function’sderivatives at a single point. Therefore, we can define a Taylor series expansion for any real (or complex-valued) function that is infinitely differentiable at some pointxs.Let us start with the scalar case first(meaningxhas only one dimension) and then discuss the multivariate extension.1.1.1Single input variableThe Taylor series expansion around a pointxsis given by the power seriesf(x) =∞Xn=0f(n)(xs)n!(x−xs)n=f(xs) +f′(xs)1!(x−xs) +f′′(xs)2!(x−xs)2+· · ·|{z}higher order terms (H.O.T.),(1)1
wheren! denotes the factorial ofnandf(n)(xs) denotes thenth derivative offevaluated atxs. When weneglect the higher order terms (H.O.T.), the expansion becomes a linear approximationof the true function:f(x)≈f(xs) +dfdxx=xs(x−xs).(2)A simple illustration of a first-order Taylor series is provided in Figure 1. A key point of emphasis is that theaccuracy of the approximation is highest near the selected linearization pointxs– thus we will exclusivelyselect this to be our steady-state operating point and attempt to look at the behavior in a nearby regionto that point.Furthermore, we cannot trust our linearized model as we begin to deviate more and moreaway forxs; we would need to re-linearize around a new point and thus our analysis could be very differentdepending on where we want to operate our process.Figure 1: Illustration of linearization of a quadratic functiony=f(x) =x2.Question:Develop a linearized model forf(x) =kx2aroundxswherekis some constant.Answer:We can solve this problem by applying (2) such thatf(x)≈f(xs)|{z}kx2s+dfdxx=xs|{z}2kx|x=xs(x−xs) =kx2s+ 2kxs(x−xs)(3)Again, we highlight how the linearized model depends on the operating pointxs. Thus, we get an entirelydifferent model if we evaluate atxs= 1 versusxs=−1.1.1.2Multiple input variablesThe previous relationship only considered a single variable; however, we commonly have to deal with multiplevariables at once.We can generalize (2) to multivariate problems using the notion of partial derivatives,which is summarized in the following expressionf(x1, . . . , xn)≈f(x1,s, . . . , xn,s) +∂f∂x1x=xs(x1−x1,s) +· · ·+∂f∂xnx=xs(xn−xn,s),(4)wherex= [x1, . . . , xn]⊤is a vector ornvariables andxs= [x1,s, . . . , xn,s]⊤is the corresponding linearizationpoint.In this class, we will not typically deal with more than 1-3 variables.However, you can generally2
apply this approach to any number of variables.Question:Develop a linearized model forf(x, y) =xyaround the point (xs, ys).Answer:We can solve this problem by applying the multivariate linearization method in (4) such thatf(x, y)≈f(xs, ys) +∂f∂xxs,ys(x−xs) +∂f∂yxs,ys(y−ys),(5)=xsys+ys(x−xs) +xs(y−ys).where we have used the fact that∂f∂x=yand∂f∂y=x. Again, we see that the linearized model is a functionof the operating point (xs, ys).1.2Linearize ODE model to get Transfer FunctionNow that we have seen how to linearize nonlinear functions, we can use this approach in practice to derive atransfer function (TF) representation for a nonlinear model. The system of interest is summarized in Figure2; it is a model of an isothermal, constant volume CSTR undergoing a second-order reaction. Our goal is toderive a TF modelG(s) that relates the inputcA0(t) (inlet concentration that is the MV in this case) to theoutputcA(t) (the outlet concentration that is the CV in this case). We letFdenote the volumetric flowratethrough the CSTR, which is constant by assumption.Component A mole balance:ddt(V cA) =FcA0−FcA+rAV,(6a)Volume is assumed constant andrA=−kc2A, and we can apply both of these aboveVdcAdt=FcA0−FcA−kV c2A|{z}nonlinear.(6b)Linearization off(cA) =kV c2Aaround steady-state point ¯cA:f(cA)≈f(¯cA) +dfdcAcA=¯cA(cA−¯cA),(7a)Note that here we are using the bar notation to denote steady state!Substitute function and its derivativekV c2A≈kV¯c2A+ 2kV¯cA(cA−¯cA),(7b)Figure 2: Illustration and description of nonlinear CSTR exercise.3
Convert to deviation variable form:Plug (7b) into (6b):VdcAdt=FcA0−FcA−kV¯c2A−2kV¯cA(cA−¯cA),(8a)Subtract steady-state equation 0 =F¯cA0−F¯cA−kV¯c2Ato convert to deviation formVdcAdt=F(cA0−¯cA0)−F(cA−¯cA)−2kV¯cA(cA−¯cA),(8b)Recall ˜cA=cA−¯cA, ˜cA0=cA0−¯cA0, anddcAdt=d˜cAdt, which we can substitute aboveVd˜cAdt=F˜cA0−F˜cA−2kV¯cA˜cA,(8c)Group terms with ˜cAand move to other sideVd˜cAdt+ (F+ 2kV¯cA)˜cA=F˜cA0,(8d)Divide both sides of the equation by the constant (F+ 2kV¯cA)VF+ 2kV¯cA|{z}call thisτd˜cAdt+ ˜cA=FF+ 2kV¯cA|{z}call thisKp˜cA0,(8e)τd˜cAdt+ ˜cA=Kp˜cA0.(8f)Solve for TF using Laplace transform:Take Laplace transform of both sides of (8f):τs˜CA(s) +˜CA(s) =Kp˜CA0(s),(9a)(τs+ 1)˜CA(s) =Kp˜CA0(s).(9b)Rearrange to the following form of the TF:G(s) =CV(output)MV(input)=˜CA(s)˜CA0(s)=Kpτs+ 1|{z}*this is the TF.(9c)Notice how the gainKpand time constantτin the final form of the TF in (9c) both depend on thesteady-state value (or linearization point) ¯cA.2General Procedure for Obtaining Process ResponseNow that we have learned about linearization, which is our main tool in this class for dealing with nonlinearmodels, we can summarize the procedure for obtaining a dynamic process response in the following 8 steps:1. Define the problem and draw the process diagram (with assumptions)2. Derive mass and/or energy balance and linearize3. Transform to deviation variables4. Take Laplace transform (applyL[·] to both sides of equation)5. Rearrange forG(s) orY(s)•Complete the square or partial fractions may be needed6. If needed, perform calculations withG(s)4
•Does the system oscillate (complex roots), decay (all roots have negative real parts), or blow up(one root has non-negative real part) when a step is applied?•IVT / FVT (if applicable)•Other analysis methods that we will learn later in the class...7. Take inverse Laplace transform to get ˜y(t) =L−1[Y(s)]8. Convert back to original variables, e.g.,y(t) = ˜y(t) +yss.3First-Order SystemsRecall that the order of a TF is determined by the order of the denominator.Thus, the following ODErepresents a general form of a first-order system (in deviation variables):τdydt+y=Kpx,(10)with the corresponding TF model given byG(s) =Y(s)X(s)=Kpτs+ 1,(11)meaning we can uniquely represent any first-order system in terms of two parameters: the gainKpand thetime constantτ.3.1Step and Impulse ResponseHaving learned about transfer functions (TFs), we can now discuss the dynamic behavior of various processesin an organized way. Here, we will see how the outputy(t)⇔Y(s) of a general first-order TF (11) respondsto particular forms of the inputx(t)⇔X(s). Figure 3 shows howy(t) looks when a stepx(t) = ∆xγ(t)⇔X(s) = ∆x/sor an impulsex(t) =cδ(t)⇔X(s) =c(assumingKpandτare both positive) is appliedto the first-order process. Notice that we can use IVT and FVT to quickly study the initial and final timebehavior of the output.3.2Example: How to Interpret the Time Constant?Question:Find the time that a first-order system reaches∼63% of its final value under a step inputX(s) =∆xs.Answer:Assumingτis positive, FVT is applicable to the TF given in (11) – this gives us the followinglimt→∞y(t) = lims→0[sY(s)] = lims→0[sG(s)X(s)] = lims→0sKpτs+1∆xs=Kp∆x. We also can compute thefollowing time domain profile as shown in Figure 3y(t) =Kp∆x1−e−t/τγ(t).(12)Since we want to find the time that we reach 63% of the final value, we know thaty(t) = 0.63Kp∆x.Substituting above, we are searching for the value oftthat satisfies0.63Kp∆x=Kp∆x1−e−t/τγ(t)⇒0.63 = (1−e−t/τ)γ(t).(13)Since the right-hand side can only be positive whent >0, we know thatγ(t) = 1.Therefore, we canrearrange this expression to findt=−τln(0.37)|{z}≈−1⇒t=τ.(14)5
Figure 3: Step and impulse response dynamic profiles for a first-order system.Therefore, we see that the time constantτcan be interpreted as the time it takes for the system to reach∼63% of the new steady-state value under a step input change.You can go through a similar calculation to determine that we have reached∼95% of the new steady-statevalue in 3τand∼99% of the new steady-state value in 5τ.A plot of the normalized step response for afirst-order system is shown in Figure 4.6
Figure 4: Step response of a first-order system normalized by gain and time constant. Here,Kdenotes theprocess gain andMthe magnitude of the step change.7