Page 1 of 5
MATLAB Review + Simulation
CHE 361
A vertical cylindrical tank is constructed with holes in its side such that the flow rate of liquid out
of the tank is proportional to the height of liquid in the tank. The height of the tank is 2.00
meters a
Page 1 of 6
MATLAB Review + Simulation
CHE 361
A vertical cylindrical tank is constructed with holes in its side such that the flow rate of liquid
out of the tank is proportional to the height of liquid in the tank. The height of the tank is 2.00
meters a
Page 1 of 3
Computer Shortcut: freqg.p
CHE 361
Task: Use the MATLAB "program" file freqg.p to determine the frequency response of:
G( s) =
2e 0.2 s
for the freqency range of from 0.01 to 10 rad/min
10s + 1
Then check the amplitude ratio and phase angle at
Page 1 of 2
% BodeCHE361.m
%
%
%
%
%
A simple program to make a Bode plot for first-order process
using MATLAB bode function and using "short-cut" method
for first-order with time delay process.
Dr. K.L. Levien, Oregon State University
Chemical Engineerin
Fig 14 Bode
Fig 14.2 Bode
diagram for a
first-order process
(no time delay)
time delay)
Slope = -1
All G(s) have the
same plot of normalized
ARN vs (omega*tau) !
Assymptotes at lower & higher frequencies
Fig 14.3 Bode diagram for second-order processes
Al
freq_resp 1/2
Frequency Responses: t "domain"
1
1/(2*3.14159)s+1
Sine Wave1
Transfer Fcn1
CHE 361
+
7
+
Constant1 Sum1
+
9
+
Constant2 Sum2
1
1/(2*3.14159)s+1
Sine Wave2
Transfer Fcn2
+
1
+
Constant3 Sum3
Mux
+
3
+
Constant4 Sum4
1
1/(2*3.14159)s+1
Sine W
u '(t ) = A sin ωt sinusoidal input to 1st-order G ( s )
ω
K
Y '( s ) =
= G ( s )U '( s )
A 2
2
KA
τ s + 1 s + ω
=
y '(t )
ωτ e − t /τ − ωτ cos ωt + sin ωt )
(
freqresp2.mdl =
ω 2τ 2 + 1
Frequency Response
KA
Adjust the Forcing Function
y l '(t )
Speed-up Effect of Zero (Overdamped 2nd-order) Step Response
So … a zero “speeds-up” the response of a process = but Why? and How?
Simple example: poles at -0.2 and -1 with a zero at -0.5, thus
= 5, τ z 2, τ 2 1 then for a gain of 1:
τ1 = =
K (τ s + 1)
2s
Bode_fit 1/8
Identifying G(s) from a Bode Plot
CHE 361
Bode plots contain the frequency response of a transfer function model G(s) (for example generated by
using freqg) or obtained from an analysis of input/output data from an experiment (for example a
P
pulse_test 1/5
Pulse Testing Experiments
CHE 361
Read pgs 344-348 of SEM1 text attached - note the input is called x(t).
The analysis of a pulse test allows the calculation of the frequency response of a linear
system. Characteristics of the "test" are:
(
Bioreactor Pulse Testing = 3 Hints
CHE 361
Hint #1. When doing a pulse test, the analysis is easiest to interpret when the the transfer
function has a positive gain. In order to simplify the Bode plot that will be produced when your
bioreactor G(s) natura
Chap 14 = Frequency Response Analysis of Process Dynamics
CHE 361
SEMD3 = EXERCISE 14.3 pg. 268. (In-class)
A data acquisition system for environmental monitoring is used to record the temperature of an
airstream as measured by a thermocouple. It shows an
EXAM 2 preview/review
CHE 361
Winter 2012
Remember. Midterm # 2 is 10 - 11:50 am Thur. Mar. 1, 2012 in Kearney 212.
Bring your own (Textbook+), paper, pencils, calculator with charged batteries, etc.
(Textbook+) = SEMD3, KLL handouts, notes and your own H
Page 1 of 10
Base Case G(s) = Bio2x2Glocal.p Numerical Linearization CHE 361
> Bio2x2Glocal
(after modifying and saving bioreac2x2.mdl
Enter flow rate F = (1 for nominal ss) = 1
Enter feed nutrient conc. Ni = (5.2 for nominal ss) = 5.2
Enter estimate of S
G (s) =
CHE 361 - Bioreactor Project
output =
input =
"BUGS" FOR : _ / # _ (TEAM Name / # )
Student signed initials: _
A. Your BUG Kinetic Constants:
_
_
base metabolic rate
M = _
(0.001 - 0.2 g food/h) / g bugs)
maximum growth rate
max = _
(0.1 - 3.0 h-1
Page - 1 - of 10
Numerical Method to Solve Initial Value Problems (IVPs) CHE 361
Both Euler and RK4 use fixed step size in time.
(Can be used with nonlinear as well as linear ordinary differential Equations, ODEs)
_
Given either a single equation or a set
Page 1 of 6
CHE 361: Least-squares Fit of Step Responses: step2g
First copy the Simulink example file "HW5_1sim.mdl" from the class web site into your
directory folder where all your other MATLAB files for this course are stored. Then start
MATLAB and "br
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 balan
Page 1 of 2
Complex Conjugate Pair of Roots
CHE 361
It sometimes happens in process dynamics problems that we obtain part of Y(s) that looks like:
A
A
Y ( s) = + + + +
s r+ s r
After evaluation of the constants in this partial fraction expansion, this
+
2nd
1. Step Input
order G(s)
A sudden change in a process variable can be approximated by
a step change of magnitude, M:
In analyzing process dynamic and process control systems, it is
important to know how the process responds to changes in the
importa
Page - 1 - of 2
Inclass Heat Loss
CHE 361
Done Thur Week 2
Exercise 4.10 pg. 71 - Physical example of input/output relationship and transfer
function. Review Section 2.4 = Dynamic Models of Representative Processes,
2.4.1 Stirred-Tank Heating Process (Con
Transfer Functions
Definition of the transfer function:
of the transfer function:
Convenient representation of a linear, dynamic model.
Let G(s) denote the transfer function between an input, x, and an
output, y. Then, by definition:
x ( t ) input
y ( t
1. Standard notation in dynamics and control
(shorthand notation) = how you communicate
with other engineers.
other engineers
2. Converts differential calculus mathematics to
algebraic operations, very useful for:
Initial Value Problems (IVPs).
Chapter 3
CHE 361: PREVIEW
MODELING EQUATIONS - Ordinary Differential Equation Models from Mass and Energy Balances
A.
Develop equations: rate of accumulation and other rates
B.
Operating point: steady-state and deviation variables
C.
Linearization
D.
Laplace trans
Rev: 6-14-11
Corrections for the 2nd Printing of SEMD, 3/e
Page Column
Location
Correction
6
37
50
60
both
right
left
left
Fig. 1.6
Fig. E2.13
One line below (3-91)
Eq. (4.13)
Move x1 down so it is aligned with mass fraction.
Raise the wavy line for the l
Rev: 10-3-10
Corrections for the First Printing of SEMD, 3/e
Page Column
Location
vii
vii
ix
13
42
50
Right
Right
Left
Left
Left
Right
1st line
2ndt line
7 lines from bottom
Fig. 1.12
Entry 6 in Table 3.1
Fig. 3.3b
50
51
53
53
62
63
66
71
71
72
Left
Left