# Question Please only solve parts e and f. Modelling, linearization, and simulation of two interacting tanks Fo Consider the process consisting of two interacting liquid tanks in the figure. The volumetric flow rate into tank 1 is Fo, the vol. flow rate from tank 1 to tank 2 is F₁, and the vol. flow rate from tank 2 is F₂. The height of the liquid level is h in tank 1 and ₂ in tank 2. Both tanks have the same cross-sectional area A. The flow rates F₁ and F2 depend on the liquid levels according to 2 7₂ F₁ = B√h₁h₂₁ F₂ = B₂√₂ where is a constant parameter. a) Derive a dynamic model for the process consisting of two coupled first-order differential equations with the liquid levels as dependent (output) variables and the incoming flow rate Fo as independent (input) variable. This means that the differential equations have the general form dh₁ dt dh₂ dt -= fi(h₁, h₂, Fo), = =f₂ (h₁, h₂, Fo) where f₁ and ₂ are the (nonlinear) functions to be determined. Note that all arguments , h₂, and Fo need not appear in both functions. Assume that the liquid density is constant. b) Linearize the two differential equations and the given constitutive relationship for F₂ at a steady-state (₁,₂,F). This will introduce "A-variables" that denote the deviation from the corresponding steady-state values. c) Assume that A=0.5 m and B=2 m² 5/h and that the process initially is at the steady-state defined by Fo= 2 m³/h. From this, the steady state-values of the other variables can also be calculated. Determine the linearized model using these numerical data. d) Simulate both for the nonlinear and the linearized model how h₁, h₂, and F₂ change as functions of time when Fo is changed (i) stepwise (i.e. “immediately”) from 2 m³/h to 2.5 m³/h, (ii) stepwise from 2 m³/h to 1.5 m³/h, (iii) sinusoidally with the average value 2 m³/h, amplitude 1 m³/h and frequency 2 cycles/h. Simulate all cases for 10 hours. The simulations are most easily done with SIMULINK or MATLAB and its ODE solver ode 45. e) Use MATLAB's plot command to plot how h₁, h₂, and F₂ change as functions of time for the tree cases. Plot h₁, h₂, and F₂ in different diagrams, but the nonlinear and linear simulations in the same diagram for each variable (to make comparisons easy). Note that we want plots of h₁, h₂, and F₂ even if A-variables have been used in the linear simulations. f) Based on these plots, do you think the linearized model is a "good" or "less good" approximation of the nonlinear system? Or is it not so clear? Please motivate! Consider, for example, whether there are remaining errors (after 10h) in some variables for step changes in the linearized model (as compared to the result with the nonlinear model).

B5MHYM The Asker · Mechanical Engineering

Please only solve parts e and f.

Transcribed Image Text: Modelling, linearization, and simulation of two interacting tanks Fo Consider the process consisting of two interacting liquid tanks in the figure. The volumetric flow rate into tank 1 is Fo, the vol. flow rate from tank 1 to tank 2 is F₁, and the vol. flow rate from tank 2 is F₂. The height of the liquid level is h in tank 1 and ₂ in tank 2. Both tanks have the same cross-sectional area A. The flow rates F₁ and F2 depend on the liquid levels according to 2 7₂ F₁ = B√h₁h₂₁ F₂ = B₂√₂ where is a constant parameter. a) Derive a dynamic model for the process consisting of two coupled first-order differential equations with the liquid levels as dependent (output) variables and the incoming flow rate Fo as independent (input) variable. This means that the differential equations have the general form dh₁ dt dh₂ dt -= fi(h₁, h₂, Fo), = =f₂ (h₁, h₂, Fo) where f₁ and ₂ are the (nonlinear) functions to be determined. Note that all arguments , h₂, and Fo need not appear in both functions. Assume that the liquid density is constant. b) Linearize the two differential equations and the given constitutive relationship for F₂ at a steady-state (₁,₂,F). This will introduce "A-variables" that denote the deviation from the corresponding steady-state values. c) Assume that A=0.5 m and B=2 m² 5/h and that the process initially is at the steady-state defined by Fo= 2 m³/h. From this, the steady state-values of the other variables can also be calculated. Determine the linearized model using these numerical data. d) Simulate both for the nonlinear and the linearized model how h₁, h₂, and F₂ change as functions of time when Fo is changed (i) stepwise (i.e. “immediately”) from 2 m³/h to 2.5 m³/h, (ii) stepwise from 2 m³/h to 1.5 m³/h, (iii) sinusoidally with the average value 2 m³/h, amplitude 1 m³/h and frequency 2 cycles/h. Simulate all cases for 10 hours. The simulations are most easily done with SIMULINK or MATLAB and its ODE solver ode 45. e) Use MATLAB's plot command to plot how h₁, h₂, and F₂ change as functions of time for the tree cases. Plot h₁, h₂, and F₂ in different diagrams, but the nonlinear and linear simulations in the same diagram for each variable (to make comparisons easy). Note that we want plots of h₁, h₂, and F₂ even if A-variables have been used in the linear simulations. f) Based on these plots, do you think the linearized model is a "good" or "less good" approximation of the nonlinear system? Or is it not so clear? Please motivate! Consider, for example, whether there are remaining errors (after 10h) in some variables for step changes in the linearized model (as compared to the result with the nonlinear model).
More
Transcribed Image Text: Modelling, linearization, and simulation of two interacting tanks Fo Consider the process consisting of two interacting liquid tanks in the figure. The volumetric flow rate into tank 1 is Fo, the vol. flow rate from tank 1 to tank 2 is F₁, and the vol. flow rate from tank 2 is F₂. The height of the liquid level is h in tank 1 and ₂ in tank 2. Both tanks have the same cross-sectional area A. The flow rates F₁ and F2 depend on the liquid levels according to 2 7₂ F₁ = B√h₁h₂₁ F₂ = B₂√₂ where is a constant parameter. a) Derive a dynamic model for the process consisting of two coupled first-order differential equations with the liquid levels as dependent (output) variables and the incoming flow rate Fo as independent (input) variable. This means that the differential equations have the general form dh₁ dt dh₂ dt -= fi(h₁, h₂, Fo), = =f₂ (h₁, h₂, Fo) where f₁ and ₂ are the (nonlinear) functions to be determined. Note that all arguments , h₂, and Fo need not appear in both functions. Assume that the liquid density is constant. b) Linearize the two differential equations and the given constitutive relationship for F₂ at a steady-state (₁,₂,F). This will introduce "A-variables" that denote the deviation from the corresponding steady-state values. c) Assume that A=0.5 m and B=2 m² 5/h and that the process initially is at the steady-state defined by Fo= 2 m³/h. From this, the steady state-values of the other variables can also be calculated. Determine the linearized model using these numerical data. d) Simulate both for the nonlinear and the linearized model how h₁, h₂, and F₂ change as functions of time when Fo is changed (i) stepwise (i.e. “immediately”) from 2 m³/h to 2.5 m³/h, (ii) stepwise from 2 m³/h to 1.5 m³/h, (iii) sinusoidally with the average value 2 m³/h, amplitude 1 m³/h and frequency 2 cycles/h. Simulate all cases for 10 hours. The simulations are most easily done with SIMULINK or MATLAB and its ODE solver ode 45. e) Use MATLAB's plot command to plot how h₁, h₂, and F₂ change as functions of time for the tree cases. Plot h₁, h₂, and F₂ in different diagrams, but the nonlinear and linear simulations in the same diagram for each variable (to make comparisons easy). Note that we want plots of h₁, h₂, and F₂ even if A-variables have been used in the linear simulations. f) Based on these plots, do you think the linearized model is a "good" or "less good" approximation of the nonlinear system? Or is it not so clear? Please motivate! Consider, for example, whether there are remaining errors (after 10h) in some variables for step changes in the linearized model (as compared to the result with the nonlinear model).