Posted: October 27th, 2022

# Process Control and Instrumentation Homework for Chemical Engineering

I need help on Process Control and Instrumentation homework for Chemical Engineering. There is a small part of the homework contain MatLab. Can you help please!

I have attached the book and the assignment.

Don't use plagiarized sources. Get Your Custom Essay on
Process Control and Instrumentation Homework for Chemical Engineering
Just from \$13/Page

CBE 43

0

Week 0

3

• Ch. 3

Laplace Transforms
Mathematical models of real processes often result in systems of linear ODEs.

The Laplace transform can reduce the time required to find a solution, by
converting ODEs to equations.

Let’s review Laplace transforms!

ℒ 𝑓 𝑡

= න
0

𝑓 𝑡 𝑒−𝑠𝑡𝑑𝑡 = 𝐹

𝑠

ℒ−1 𝐹 𝑠 = 𝑓

𝑡

Laplace Domain

𝑓(𝑡) 𝐹(𝑠)

Time Domain

Slide 03.0

1

Topics
• Laplace

transforms
• Solving

ODEs
• Properties

of

ℒ[ ]

• Example

3.6
• MATLAB

CBE 430
Week 03

• Ch. 3

Laplace Transforms
Constant function:

Unit step function:

Exponential:

Rectangular

Pulse:

ℒ 𝑎 = න
0

𝑎𝑒−𝑠𝑡𝑑𝑡 = −

𝑎

𝑠
𝑒−𝑠𝑡

0

=
𝑎

𝑠

ℒ 𝑓 𝑡

=
1

𝑠

Notice, the Laplace transform
doesn’t care what happens at 𝑡 < 0! So the unit step at 𝑡 = 0 is the same as the constant with 𝑎 = 1.

ℒ 𝑓(𝑡) = න
0

𝑒−𝑎𝑡𝑒−𝑠𝑡𝑑𝑡 = න
0

𝑒−(𝑠+𝑎)𝑡𝑑𝑡 = −
𝑒− 𝑠+𝑎 𝑡

𝑠 + 𝑎

0

=
1
𝑠 + 𝑎

𝑓 𝑡 = ቐ
0 𝑡 < 0 ℎ 0 ≤ 𝑡 <

𝑡𝑤

0 𝑡 ≥ 𝑡𝑤

ℒ 𝑓(𝑡) = න
0
𝑡𝑤

ℎ𝑒−𝑠𝑡𝑑𝑡 = −

𝑠
𝑒−𝑠𝑡 ቚ

0
𝑡𝑤

=

𝑠
1 − 𝑒−𝑡𝑤𝑠

𝑓 𝑡 = 𝑎

𝑓 𝑡 = 𝑆 𝑡 = ቊ
0 𝑡 < 0 1 𝑡 ≥ 0

𝑓 𝑡 = 𝑒−𝑎𝑡

Slide 03.0

2

Topics
• Laplace
transforms
• Solving
ODEs
• Properties

of ℒ[ ]
• Example

3.6
• MATLAB

CBE 430
Week 03
• Ch. 3

How About a Time Delay (Lag).

In chemical and biological processes, one function is often related to another by
a time delay (lag). The simplest example is:

𝑓𝑑 𝑡 = 𝑓 𝑡 − 𝜃 𝑆 𝑡 − 𝜃 𝑆 ensures that 𝑓𝑑 = 0 before the lag
time. This can happen when 𝑓 and 𝑓

𝑑

measure the same thing (e.g. a
temperature or concentration) at
different points in a , for
example.

What is the Laplace transform of 𝑓𝑑(𝑡)?

Slide 03.03

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

CBE 430
Week 03
• Ch. 3
How About a Time Delay (Lag).

𝑓𝑑 𝑡 = 𝑓 𝑡 − 𝜃 𝑆 𝑡 −

𝜃

ℒ 𝑓𝑑 𝑡 = ℒ 𝑓 𝑡 − 𝜃 𝑆 𝑡 − 𝜃

= න
0

𝑓 𝑡 − 𝜃 𝑆 𝑡 − 𝜃 𝑒−𝑠𝑡

𝑑𝑡

= න
0
𝜃

𝑓 𝑡 − 𝜃 0 𝑒−𝑠𝑡𝑑𝑡 + න
𝜃

𝑓 𝑡 − 𝜃 𝑒−𝑠𝑡𝑑𝑡

= න
𝜃

𝑓 𝑡 − 𝜃 𝑒−𝑠 𝑡−𝜃 𝑒−𝑠𝜃 𝑑 𝑡 − 𝜃

= 𝑒−𝑠𝜃න
0

𝑓 𝑡∗ 𝑒−𝑠𝑡

𝑑𝑡∗

ℒ[𝑓𝑑 𝑡 ] = 𝑒
−𝑠𝜃𝐹 𝑠

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.04

CBE 430
Week 03
• Ch. 3

Now you try one:

Use the property:

and the Euler formula for the cosine:

To find

ℒ 𝑥 𝑡 + 𝑦 𝑡 = ℒ 𝑥 𝑡 + ℒ 𝑦 𝑡

=
1
2
1

𝑠 − 𝑗𝜔
+

1

𝑠 + 𝑗𝜔

cos 𝜔𝑡 =
𝑒𝑗𝜔𝑡 + 𝑒−𝑗𝜔𝑡

2
; 𝑗 ≡ −1

ℒ[cos 𝜔𝑡 ] =
1

2
ℒ 𝑒𝑗𝜔𝑡 +

1

2
ℒ 𝑒−𝑗𝜔𝑡

=
1
2

𝑠 + 𝑗𝜔 + 𝑠 − 𝑗𝜔

𝑠2 +𝜔2

=

𝑠
𝑠2 +𝜔2

ℒ[cos 𝜔𝑡 ]

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.05

CBE 430
Week 03
• Ch. 3

𝑢 = 𝑡 𝑑𝑣 = 𝑒− 𝑠+𝑎 𝑡𝑑𝑡

𝑑𝑢 = 𝑑𝑡 𝑣

= −
1

𝑠 + 𝑎
𝑒− 𝑠+𝑎 𝑡

ℒ 𝑡𝑒𝑎𝑡 = −
𝑡𝑒− 𝑠+𝑎 𝑡

𝑠 + 𝑎
𝑡=0

𝑡=∞

+න
0

∞ 𝑒− 𝑠+𝑎 𝑡

𝑠 + 𝑎
𝑑𝑡

= 0 − 0 −
𝑒− 𝑠+𝑎 𝑡

𝑠 + 𝑎 2

𝑡=0

𝑡=∞
=
1
𝑠 + 𝑎 2

ℒ 𝑡𝑒−𝑎𝑡

Integration by parts! න
0

𝑢𝑑𝑣 = 𝑢𝑣 −න
0

𝑣𝑑𝑢

= න
0

𝑡𝑒−𝑎𝑡𝑒−𝑠𝑡𝑑𝑡 = න
0

𝑡𝑒− 𝑎+𝑠 𝑡𝑑𝑡

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.06

CBE 430
Week 03
• Ch. 3

One more important example…

The impulse (with area 𝑎): 𝑓 𝑡 = 𝑎𝛿 𝑡

ℒ 𝑓(𝑡) = lim

𝑡𝑤→0

𝑎

𝑡𝑤𝑠
1 − 𝑒−𝑡𝑤𝑠

Where 𝛿 𝑡 is the function. 𝛿 𝑡 has an area of 1, a
height of infinity, and a width of 0. This can be modeled as a pulse
of ℎ = 1/𝑡𝑤 as 𝑡𝑤 → 0. Using the result for the pulse…

Apply l’Hôpital’s rule (differentiate by 𝑡𝑤):

ℒ 𝑎𝛿 𝑡 = lim
𝑡𝑤→0

𝑎 1 − 𝑒−𝑡𝑤𝑠

𝑡𝑤𝑠
= lim

𝑡𝑤→0

𝑎𝑠𝑒−𝑡𝑤𝑠

𝑠
= 𝑎

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.07

CBE 430
Week 03
• Ch. 3

Why is this useful?

Finding Laplace transforms is fun and easy, but that’s not
why we use them. In fact, we usually don’t bother finding
them at all… we in a table (like Table 3.1
on pp. 40-41 of Seborg).

Laplace transforms are useful because they
help us to find solutions to differential
equations.

…here’s how… →

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.08

CBE 430
Week 03
• Ch. 3

Time-Derivatives
What is the Laplace transform of the time-derivative?

time derivative?

For the 𝑛𝑡ℎ derivative:

𝑑𝑓

𝑑𝑡
= න

0

∞𝑑𝑓

𝑑𝑡
𝑒−𝑠𝑡𝑑𝑡 = 𝑓𝑒−𝑠𝑡 ቚ

0

−න

0

𝑓 𝑡
𝑑 𝑒−𝑠𝑡

𝑑𝑡
𝑑𝑡

= −𝑓 0 + න
0

𝑓 𝑡 𝑠𝑒−𝑠𝑡𝑑𝑡

= −𝑓 0 + 𝑠ℒ 𝑓 𝑡

𝑑2𝑓

𝑑𝑡2
= ℒ

𝑑𝜙

𝑑𝑡
; where 𝜙 =

𝑑𝑓
𝑑𝑡

= −𝜙 0 + 𝑠 𝑠𝐹 𝑠 − 𝑓 0

= −𝑓 0 + 𝑠𝐹 𝑠

= 𝑠2𝐹 𝑠 − ቤ
𝑑𝑓

𝑑𝑡
𝑡=0

− 𝑠𝑓 0

This is awesome!
Now we can use
Laplace transforms
to replace first
derivatives!

𝑑𝑛 𝑓 𝑡

𝑑𝑡𝑛
= 𝑠𝑛𝐹 𝑠 − ෍

𝑚=0

𝑛−1

𝑠𝑚 อ
𝑑𝑛−1−𝑚𝑓 𝑡

𝑑𝑡𝑛−1−𝑚
𝑡=0

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.09

CBE 430
Week 03
• Ch. 3

A First-Order ODE Example

5

𝑑𝑦

𝑑𝑡
+ 4𝑦 = 2; 𝑦 0 = 1

5ℒ
𝑑𝑦

𝑑𝑡
+ 4ℒ 𝑦 = ℒ 2

5 𝑠𝑌 𝑠 − 𝑦 0 + 4

𝑌 𝑠 =
2

𝑠

5𝑠𝑌 𝑠 − 5 1 + 4𝑌 𝑠 =
2

𝑠

5𝑠 + 4 𝑌 𝑠 =
2

𝑠
+ 5

𝑌 𝑠 =
2

𝑠

5𝑠 +

4

+

5
5𝑠 + 4
ℒ[ ]

Solve
for 𝑌 𝑠

Now invert using Table
3.1. Notice that entries 5
and 6, and 9 and 10 are
equivalent alternative
representations.

𝑌 𝑠 =
2
5
1

𝑠 + 0

𝑠 +
4
5

+
1

𝑠 +
4
5

𝑦 𝑡 = −0.5 𝑒−0.8𝑡 − 1 + 𝑒−0.8𝑡

= 0.5 1 − 𝑒−0.8𝑡

Transform
equation

ℒ−1[ ]

Notice the gets
used here!

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.10

CBE 430
Week 03
• Ch. 3

A Higher-Order ODE Example

𝑑3𝑦

𝑑𝑡3
+ 6

𝑑2𝑦

𝑑𝑡2
+ 11

𝑑𝑦

𝑑𝑡
+ 6𝑦 = 1;

𝑌 𝑠 =
1

𝑠(𝑠3 + 6𝑠2 + 11𝑠 + 6)

𝑑2𝑦

𝑑𝑡2
0

= 0; ቤ
𝑑𝑦

𝑑𝑡
0

= 0; 𝑦 0 = 0

How many IC’s do we need?

𝑑3𝑦

𝑑𝑡3
+ 6ℒ

𝑑2𝑦

𝑑𝑡2
+ 11ℒ

𝑑𝑦

𝑑𝑡
+ 6ℒ 𝑦 = ℒ 1

𝑠3𝑌 𝑠 + 6𝑠2𝑌 𝑠 + 11𝑠𝑌 𝑠 + 6𝑌 𝑠 =
1

𝑠

Find the (4) roots of the (4th-order)
polynomial in the denominator, so it
can be factored!
Roots are 𝑠 = 0, -1, -2, and -3. 𝑌 𝑠 =

1

𝑠(𝑠 + 1)(𝑠 + 2)(𝑠 + 3)

Perform .
𝑌 𝑠 =

𝛼1
𝑠
+

𝛼2

𝑠 + 1

+
𝛼3

𝑠 + 2
+

𝛼4

𝑠 + 3

𝛼1 =
1

6
; 𝛼2 = −

1

2
; 𝛼3 =

1

2
; 𝛼4 = −

1

6
Perform
Heaviside
expansion.

𝑦 𝑡 =
1

6

1

2
𝑒−𝑡 +

1

2
𝑒−2𝑡 −

1

6
𝑒−3𝑡

When did we
use the IC’s?!?!

ℒ[ ]
ℒ−1[ ]
Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.11

CBE 430
Week 03
• Ch. 3

What was that Heaviside thing?

𝑌 𝑠 =

𝑁 𝑠

𝐷 𝑠

=

1

𝑠(𝑠 + 1)(𝑠 + 2)(𝑠 + 3)
=
𝛼1
𝑠
+

𝛼2
𝑠 + 1
+
𝛼3
𝑠 + 2
+
𝛼4
𝑠 + 3

Find the coefficients 𝛼𝑖 using .

1. Multiply the whole equations by one of the terms in the denominator (for
example, the second one).

2. Choose 𝑠 so that all the remaining 𝛼𝑖 are . In this case, we
set 𝑠 = −1. Compute 𝛼2.

𝑠 + 1

𝑠 𝑠 + 1 𝑠 + 2 𝑠 + 3
= 𝛼2 + 𝑠 + 1

𝛼1
𝑠
+

𝛼3
𝑠 + 2

+
𝛼4

𝑠 + 3
1

−1 −1 + 2 [ −1 + 3]
= 𝛼2 =

1

−1 × 1 ×

2
= −

1
2

In general… 𝛼𝑖 = ቤ𝑠 + 𝑏

𝑖

𝑁 𝑠

𝐷 𝑠
𝑠=−𝑏𝑖

repeated roots?…

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.12

CBE 430
Week 03
• Ch. 3

An example with repeated roots
𝑑2𝑦

𝑑𝑡2
+ 4

𝑑𝑦

𝑑𝑡
+ 4𝑦 = 1; อ

𝑑2𝑦
𝑑𝑡2
0
= 0; ቤ
𝑑𝑦
𝑑𝑡
0

= 1; 𝑦 0 = 0

𝑠2𝑌 𝑠 − 𝑠𝑦 0 − ቤ
𝑑𝑦

𝑑𝑡
0

+ 4 𝑠𝑌 𝑠 − 𝑦 0 + 4𝑌 𝑠 =
1

𝑠

𝑠2𝑌 𝑠 − 1 + 4𝑠𝑌 𝑠 + 4𝑌 𝑠 =
1

𝑠

𝑠2 + 4𝑠 + 4 𝑌 𝑠 =
1

𝑠
+ 1 =

𝑠 + 1
𝑠

𝑌 𝑠 =
𝑠 + 1

𝑠 𝑠2 + 4𝑠 + 4

Use the Heaviside method
to find 𝛼1 and 𝛼3

𝑌 𝑠 =
𝑠 + 1

𝑠 𝑠2 + 4𝑠 + 4
=
𝛼1
𝑠
+

𝛼2
𝑠 + 2

+
𝛼3

𝑠 + 2 2

Can’t use the Heaviside
method for 𝛼2 because
multiplication by 𝑠 + 2 ,
and setting
doesn’t eliminate the 𝛼3
term; it blows up.

𝛼1 =
0 + 1

02 + 4 0 + 4
=
1

4
; 𝛼3 =

−2 + 1

−2
=
1

2

Then just choose another 𝑠
to find 𝛼2; choose 𝑠 = −1

𝛼2 =
𝑠 + 1

𝑠(𝑠2 + 4𝑠 + 4)

1

4𝑠

1

2 𝑠 + 2 2
; 𝛼2 =

1

4

1

2
= −
1
4

The denominator is a 3rd-order
polynomial, so there must be 3 constants.

IC’s used here!

ℒ[ ]
Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.13

CBE 430
Week 03
• Ch. 3

Or, you can take the derivative
𝑌 𝑠 =

𝑠 + 1
𝑠 𝑠2 + 4𝑠 + 4
=
𝛼1
𝑠
+
𝛼2
𝑠 + 2
+
𝛼3
𝑠 + 2 2

For multiple repeated roots, or roots repeated several times, the derivative
method helps ensure you have to solve for all of the
unknown 𝛼𝑖. The general formula that you can use in this case is:

𝛼𝑖 =
1

𝑛 − 𝑖 !
lim
𝑠→−𝑏

𝑑𝑛−𝑖

𝑑𝑠𝑛−𝑖
𝑠 + 𝑏 𝑛

𝑁 𝑠
𝐷 𝑠

𝛼3 = ቤ𝑠 + 2
2
𝑁 𝑠

𝐷 𝑠
𝑠=−2

; 𝛼2 = อ
𝑑

𝑑𝑠
𝑠 + 2 2

𝑁 𝑠

𝐷

𝑠
s=−2

; 𝛼1 = ቤ𝑠
𝑁 𝑠

𝐷 𝑠
𝑠=0

𝛼3 =
1

2
; 𝛼2 = ቤ

𝑑

𝑑𝑠
1 +

1
𝑠
s=−2
= −
1

−2 2
= −

1

4
; 𝛼1 =

1
4

𝑌 𝑠 =
𝛼1

(𝑠 + 𝑏)
+

𝛼2
𝑠 + 𝑏 2

+⋯
𝛼𝑛

𝑠 + 𝑏 𝑛
+⋯ =෍

𝑖

𝑛
𝛼𝑖

𝑠 + 𝑏 𝑖
+⋯

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.14

CBE 430
Week 03
• Ch. 3

Heaviside expansion will

give complex 𝛼1,2 = −
1

3
𝑗

𝑌 𝑠 =
1

𝑠2 + 𝑠 + 2.5

=

𝛼1
𝑠 + 𝑏1

+
𝛼2

𝑠 + 𝑏2

𝑌 𝑠 =
𝑁 𝑠

𝐷 𝑠
; 𝐷 𝑠 = 𝑎𝑠2 + 𝑏𝑠 + 𝑐; 𝑏2 < 4𝑎𝑐 → 𝑐𝑜𝑚𝑝𝑙𝑒𝑥 𝑟𝑜𝑜𝑡𝑠

𝑏1, 𝑏2 =
−1 ± 12 − 4 1 2.5

2 1
= −

1

2
±

−9

2
= −
1

2
±
3

2
𝑗

Find 𝑏1 and 𝑏2 from the roots of 𝐷 𝑠

Instead, lets put 𝑌(𝑠) in the form of one of the entries in the Table 3.1
on p. 42. – How about number 17?

𝑌 𝑠 = 𝑐
𝜔

𝑠 + 𝑏 2 + 𝜔2
=

1
𝑠2 + 𝑠 + 2.5

This term has to give both

𝑠2 and 𝑠. So 𝑏 =
1

2
.

Now the denominator is:

𝐷 𝑠 = 𝑠 +
1

2
2

+ 𝜔2 = 𝑠2 + s +
1

4
+ 𝜔2 = 𝑠2 + s + 2.5

𝜔2 = 2.25; 𝜔 =

1.5

𝜔𝑐 = 1; 𝑐 =
2

3
𝑌 𝑠 =
2
3
1.5

𝑠 +
1
2

2

+ 1.52

𝑦 𝑡 =
2

3
𝑒−0.5𝑡sin(1.5𝑡)

Find 𝑐:

Complex roots will always give in the time domain.

Find 𝜔:
ℒ−1[ ]

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.15

CBE 430
Week 03
• Ch. 3

Some Properties of Laplace Transforms
1. The transform and reverse transform are both linear operations, allowing you to use superposition:

2. The theorem:

3. The initial value theorem:

4. The theorem:

5. Convolution:

6. When 𝐹 𝑠 has positive real denominator roots (𝑏𝑖 < 0), 𝑓(𝑡) will grow exponentially.

7. When 𝐹(𝑠) has complex denominator roots (𝑏𝑖
2< 0), 𝑓 𝑡 will oscillate .

8. When 𝐹(𝑠) has an exponential in 𝑠, 𝑓(𝑡) has a .

ℒ 𝑥 𝑡 + 𝑦 𝑡 = ℒ 𝑥 𝑡 + ℒ 𝑦 𝑡

lim
𝑡→∞

𝑦(𝑡) = lim
𝑠→0

[𝑠𝑌 𝑠 ]

𝐹 𝑠 = 𝐺 𝑠 𝐻 𝑠

𝑓 𝑡 = ℒ−1 𝐺 𝑠 𝐻 𝑠 = න
0

𝑡

𝑔 𝜏 ℎ 𝑡 − 𝜏 𝑑𝜏 = න
0

𝑡

𝑔 𝑡 − 𝜏 ℎ 𝜏 𝑑𝜏

lim
𝑡→0

𝑦(𝑡) = lim
𝑠→∞

[𝑠𝑌 𝑠 ]

ℒ 𝑓 𝑡 − 𝑡0 𝑆 𝑡 − 𝑡0 = 𝑒
−𝑡0𝑠𝐹(𝑠)

We’ll make use of these a lot.

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.16

CBE 430
Week 03
• Ch. 3

Let’s do Example 3.6

Check out how the CSTR works. (Are there
recirculation zones, dead zones, or other non-ideal
mixing?)

Do an impulse test with a tracer, compare the
concentration coming out, 𝑐2(𝑡), to the predicted
concentration assuming .

Compare the theoretical solutions of the responses
to (perfect) impulse, and (physically realizable)
rectangular pulse test.

Find:
a) The magnitude of an impulse that would model

the total amount of material added with the
pulse shown at the right.

b) The impulse and pulse responses of the reactant
concentration leaving the reactor, 𝑐.

𝑉 = 4 𝑚3

𝑞 = 2 𝑚3 𝑚𝑖𝑛𝑢𝑡𝑒−1

𝑐𝑖 = 1 𝑘𝑔𝑚𝑜𝑙 𝑚
−3

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.17

CBE 430
Week 03
• Ch. 3

Example 3.6(a)

Find:
a) The magnitude of an impulse that would

model the total amount of material added
with the pulse shown at the right.

𝑎𝛿 𝑡 ; 𝐴𝑖𝑚𝑝𝑢𝑙𝑠𝑒 = 𝑎

Define the 𝜒𝑖 = 𝑐𝑖 − ഥ𝑐𝑖 and 𝜒 = 𝑐 − ҧ𝑐
Where ഥ𝑐𝑖 and ҧ𝑐 are the respective values.

𝜒𝑖,𝑝𝑢𝑙𝑠𝑒 = ൝
6 − 1 𝑘𝑔𝑚𝑜𝑙 𝑚−3 0 ≤ 𝑡 < 0.25

0 𝑘𝑔𝑚𝑜𝑙 𝑚−3 𝑡 < 0; 0.25 ≤ 𝑡

𝐴𝑝𝑢𝑙𝑠𝑒 = 1.25 𝑘𝑔𝑚𝑜𝑙 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 𝑚
−3

∴ 𝜒𝑖,𝑖𝑚𝑝𝑢𝑙𝑠𝑒 = 1.25 𝛿(𝑡)

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.18

CBE 430
Week 03
• Ch. 3

Example 3.6(b)

Find:
b) The impulse and pulse responses of the reactant concentration

leaving the reactor, 𝑐. (Let’s find 𝜒, instead.)

𝑉
𝑑𝑐

𝑑𝑡
= 𝑞 𝑐𝑖 − 𝑐

Write a species mole balance on the tracer:

𝑉
𝑑 𝑐 − ҧ𝑐

𝑑𝑡
= 𝑞 𝑐𝑖 − ഥ𝑐𝑖 − 𝑐 − ҧ𝑐

state: ഥ𝑐𝑖 = ҧ𝑐

Convert this mole balance to a differential
equation for the 𝜒.

𝑑𝜒

𝑑𝑡
=
𝑞

𝑉
𝜒𝑖 − 𝜒 =

1

𝜏
𝜒𝑖 − 𝜒

𝜒 0 = 0

Now replace the inlet
concentration (perturbation)
with 𝜒𝑖,𝑝𝑢𝑙𝑠𝑒 and 𝜒𝑖,𝑖𝑚𝑝𝑢𝑙𝑠𝑒.

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.19

𝑉
𝑑 ҧ𝑐

𝑑𝑡
= 𝑞 ഥ𝑐𝑖 − ҧ𝑐 = 0

CBE 430
Week 03
• Ch. 3

Example 3.6(b) continued

Impulse:

𝑑𝜒

𝑑𝑡
=
1

𝜏
(𝜒𝑖 − 𝜒)

𝑑𝜒
𝑑𝑡
=
1

𝜏
𝜒𝑖,𝑖𝑚𝑝𝑢𝑙𝑠𝑒 − 𝜒

=
1

𝜏
𝑎𝛿 𝑡 − 𝜒

𝑠𝑋 𝑠 − 𝜒 0 =
1

𝜏
𝑎 −

𝑋 𝑠

𝑋 𝑠 = 𝑎
1

𝜏𝑠 + 1

𝜒 𝑡 =
𝑎

𝜏
𝑒− Τ𝑡 𝜏

Pulse:
𝑑𝜒
𝑑𝑡
=
1

𝜏
𝜒𝑖,𝑝𝑢𝑙𝑠𝑒 − 𝜒 𝑠𝑋 𝑠 − 𝜒 0 =

5

𝜏𝑠
1 − 𝑒−0.25𝑠 −

𝑋 𝑠

𝜏1

𝑋 𝑠 = 5
1

𝑠 𝜏𝑠 + 1

− 𝑒−0.25𝑠

1
𝑠 𝜏𝑠 + 1

𝜒 𝑡 = 5 1 − 𝑒− Τ𝑡 𝜏 − 5 1 − 𝑒− 𝑡−0.25 /𝜏 𝑆(𝑡 − 0.25)

This is a time lag!

Transform this term,
then change 𝑡 to 𝑡 −
0.25 and multiply by
the step function.𝜒 𝑡 = ቐ

5 1 − 𝑒− Τ𝑡 𝜏 ; 𝑡 < 0.25

5 𝑒− Τ𝑡−0.25 𝜏 − 𝑒− Τ𝑡 𝜏 ; 𝑡 ≥ 0.25

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.20

CBE 430
Week 03
• Ch. 3
Example 3.6(b) continued
𝑑𝜒
𝑑𝑡
=
1
𝜏
(𝜒𝑖 − 𝜒)
𝜒 𝑡 =
𝑎

𝜏1
𝑒− Τ𝑡 𝜏

𝜒 𝑡 = ቐ
5 1 − 𝑒− Τ𝑡 𝜏 ; 𝑡 < 0.25

5 𝑒− Τ𝑡−0.25 𝜏 − 𝑒− Τ𝑡 𝜏 ; 𝑡 ≥ 0.25
Impulse:
Pulse:

0.6

0.5

0.4

0.3

0.2

0.1

0.0

1086420

Time, t (min)

impulse
pulse

𝑎 = 1.25

𝜏 =
𝑉

𝑞
= 2 𝑚𝑖𝑛𝑢𝑡𝑒𝑠

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.21

CBE 430
Week 03
• Ch. 3

Laplace transforms using MATLAB

MATLAB can really help with
Laplace transforms!

Use symbolic math toolbox
and commands

laplace

ilaplace

Consider from slide 04.06 …

>>syms t f(t)

>>f =

t*exp(-t)

f =

t*exp(-t)

>> F = laplace(f)

F =

1/(s + 1)^2

>> f = ilaplace(F)

f =

t*exp(-t)
Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.22

CBE 430
Week 03
• Ch. 3
Laplace transforms using MATLAB

Consider from slide 03.10:

>>syms t y(t)

>>dydt = diff(y,t)

dydt(t) =

diff(y(t), t)

>>laplace(5*dydt + 4*y==2)

ans =

5*s*laplace(y(t), t, s) – 5*y(0) + 4*laplace(y(t), t, s) == 2/s

Interpret this:

5
𝑑𝑦

𝑑𝑡
+ 4𝑦 = 2; 𝑦 0 = 1

Define t and y(t) as symbolic variables. Make
sure to tell MATLAB that y is a function of t.

Next, create a symbolic variable for
the . (You can also define
higher order derivatives with diff.)

Take the Laplace transform of the defining
equation! Remember to use ==.

5𝑠𝑌 𝑠 − 5𝑦 0 + 4𝑌 𝑠 =
2

𝑠
Compare to slide 03.10

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.23

CBE 430
Week 03
• Ch. 3
Laplace transforms using MATLAB

Take care defining constants and variables!

>>syms t y1(t) a

>>Y1 = laplace(y1)

Y1 =

laplace(y(t), t, s)

>>A = laplace(a)

A = 1/s^2

Matlab didn’t know what you wanted the independent variable to be, so it a. This
is the Laplace transform of .

To take the Laplace transform of a constant, a:

>>syms a, t, s

>>laplace(a, t, s)

ans =

a/s

Expected behavior. What will happen for a?

???
What is this ?!!

y1 is a function, a is just another variable.

This tells MATLAB everything it needs to know:
• Take the Laplace transform of a;
• Use t as the independent variable;
• Use s is the Laplace-domain independent variable.
(Otherwise, MATLAB has to guess what you want!)

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.24

CBE 430
Week 03
• Ch. 3

Summary
1. Laplace transforms convert time-domain functions to equivalent functions in a Laplace

domain. The independent variable 𝑠 is .

2. This is useful for solving differential equations, because derivatives are converted to
algebraic equations when converting from the time domain to the Laplace domain.

3. Conversion to the Laplace domain decomposes a function helps to find characteristic ,
frequencies, and .

4. Some features of the time-domain solution can be easily identified in the Laplace domain (e.g.
an exponential decay, a sinusoidal oscillation, a time lag). We’ll get more practice at identifying
these. →With experience you can tell a lot about time-domain dynamics without inverting the
Laplace-domain equations!

5. You can use MATLAB laplace and ilaplace

Topics
• Laplace
transforms
• Solving
ODEs
• Properties
of ℒ[ ]
• Example
3.6
• MATLAB

Slide 03.25

### Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

## Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
\$0.00

Order your essay today and save 20% with the discount code Newyr