0% found this document useful (0 votes)
116 views

Teaching Chemical Engineering With Matlab Simulink and Tclab

The document discusses teaching chemical engineering with MATLAB, Simulink, and TCLab. It describes the products and how they can be used at various stages of chemical engineering education from introductory courses to reinforcing concepts and applications in industry. It provides examples of resources like online courses, interactive programming with Live Editor, and automatically grading assignments. It also gives examples of how chemical engineering topics like reaction kinetics, process control, and data science can be taught using these tools. Customer examples describe various industrial applications of MATLAB and Simulink for process optimization, wastewater treatment, and bioreactor control.

Uploaded by

Miracle Uzoma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

Teaching Chemical Engineering With Matlab Simulink and Tclab

The document discusses teaching chemical engineering with MATLAB, Simulink, and TCLab. It describes the products and how they can be used at various stages of chemical engineering education from introductory courses to reinforcing concepts and applications in industry. It provides examples of resources like online courses, interactive programming with Live Editor, and automatically grading assignments. It also gives examples of how chemical engineering topics like reaction kinetics, process control, and data science can be taught using these tools. Customer examples describe various industrial applications of MATLAB and Simulink for process optimization, wastewater treatment, and bioreactor control.

Uploaded by

Miracle Uzoma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Teaching Chemical Engineering with MATLAB,

Simulink and TCLab


Aycan Hacioglu, Ph.D. ([email protected])
Customer Success Engineer
Samvith Rao ([email protected])
Industry Marketing
John D. Hedengren, Ph.D. ([email protected])
Associate Professor, Brigham Young University

© 2020 The MathWorks, Inc.


1
Our Products

▪ MATLAB is a programming environment for


algorithm development, data analysis, MATLAB
visualization, and numeric computation.
▪ Simulink is a graphical environment for designing,
Simulink
simulating, and testing systems.

▪ 100 add-on products for specialized tasks. Helicopter Simulation Model

2
Integrating Computational Thinking to Chemical Engineering Curriculum

Introduce Reinforce Industry Getting Help


Applications

3
Self-paced courses FREE COURSES (1-3 hours)
MATLAB Onramp
Simulink Onramp
Machine Learning Onramp
Deep Learning Onramp
Reinforcement Learning Onramp
Image Processing Onramp
Signal Processing Onramp
Simscape Onramp
Stateflow Onramp
Control Design Onramp with Simulink
Optimization Onramp

FOCUSED COURSES
FOUNDATIONAL COURSES (17-21 hours)
MATLAB Fundamentals
MATLAB Programming Techniques
MATLAB for Financial Applications
MATLAB for Data Processing and Visualization
Image Processing with MATLAB
Machine Learning with MATLAB
Deep Learning with MATLAB
COMPUTATIONAL MATH COURSES (2-3 hours)
Introduction to Linear Algebra
Solving Ordinary Differential Equations
Introduction to Statistical Methods
https://www.mathworks.com/academia/targeted/online-learning.html
https://matlabacademy.mathworks.com/ Solving Non-Linear Equations
Introduction to Symbolic Math 4
Creating and Hosting Custom Apps

MATLAB Apps Using Virtual Labs to Teach Reaction Engineering at Lund University
5
Interactive programming with Live Editor

Features

• Teach with interactive documents

• Accelerate exploratory
programming

• Create an interactive narrative

• Publish consistent reports

www.mathworks.com/products/matlab/live-editor.html
https://www.mathworks.com/products/matlab/live-script-gallery.html 6
MATLAB Grader for automatically grading MATLAB code
in any learning environment
“The approach enables
students to learn more quickly
from their mistakes on their
own.”

– Dr. Bob Canfield, Virginia Tech

https://www.mathworks.com/products/matlab-grader.html
Visit grader.mathworks.com
7
Integrating Computational Thinking to Chemical Engineering Curriculum

Introduce Reinforce Industry Getting Help


Applications

8
Resources for Chemical Engineering Courses with MATLAB
Reaction Kinetics Fluid Dynamics

Process Design Heat Transfer

9
Teaching Data Science to Chemical Engineers

https://www.mathworks.com/academia/courseware/teaching-data-science-with-matlab.html
https://www.mathworks.com/videos/employing-machine-learning-to-correlate-fluid-properties-1622032109572.html
10
Integrating Computational Thinking to Chemical Engineering Curriculum

Introduce Reinforce Industry Getting Help


Applications

11
MATLAB and Simulink for Process Control in Industry

12
Customer Example: TATA Steel optimizes cooling tower
operation via MPC on digital twin
Challenge
• High energy consumption in cooling tower
• Changing weather conditions caused substantial variation
in operation

Solution
Water cooling tower for the blast furnace
• Mass and energy balance equations modeled in MATLAB
• Model optimized and parameters calibrated with plant data
• MPC controller implemented

Results
▪ Savings of $40K per year for one CT
▪ Variation in outlet water temperature reduced
▪ Hundreds of tons of CO2 reduction per year

http://www.digitalcreed.in/tata-steel/ Effect of Murphree efficiency on number of stages


Link to TATA Steel’s talk 13
Customer Example: Company Eliminates Environmental
Impact of Discharged Wastewater with pH Control System
Challenge
▪ To control pH levels in a wastewater treatment
facility that was performing inconsistently
▪ No programming experience
Solution
▪ Model plant in Sys Id Toolbox using process data
▪ Use Control System Toolbox to develop a controller
to find best parameter settings graphically Main Control Panel
▪ Implemented on Yokogawa DCS
Results “Using Model-Based Design with MATLAB and Simulink
▪ Acceptable pH levels rose to 100% from 84% enabled us to quickly try out multiple control strategies and
▪ Controller performance improved validate the system before putting it into operation. This
▪ Development streamlined in just 3 months approach saved us time and ensured a better product.”
- Process Engineer

14
Customer Example: Genentech Builds a Supervisory Control
Algorithm Development Platform for Bioreactors
Challenge
Accelerate the development of control algorithms for microbial
fermentations
Solution
Use MATLAB and OPC Toolbox to develop a continuous-uptime
supervisory control platform that enables rapid development,
debugging, and verification of algorithms A Genentech microbial pilot plant bioreactor

Results “By partnering with MathWorks Consulting, we developed a


▪ Algorithm development time cut from months robust platform for supervisory control with MATLAB and
to weeks transitioned our pilot plant to a modern automation control
▪ Flexible, reliable infrastructure deployed system. This enabled our researchers to rapidly take
▪ Potential errors identified in minutes algorithms from idea to implementation, simulation, and
deployment.”
Dr. Ryan Hamilton
Genentech
Link to user story 15
Import Aspen Dynamics and gPROMS models into Simulink to
develop your control strategy

MATLAB
Linearized
state space
model

Link to download
16
Simulink is the preferred platform for APC

Link to Slides
17
Customer Example: Tüpraş implements Control Loop
Performance Assessment Solution in MATLAB
Challenge
• Control loop performance deteriorates with time
• 5900 control loops spread across 4 refineries
• Expensive and non customizable enterprise software
Solution
• Use a variety of signal processing techniques – spectral Controller health monitoring system dashboard
analysis, correlation analysis, pattern recognition,
nonlinearity analysis, etc to diagnose the controller problems “MATLAB saved us a significant amount of
based on unique digital ‘signatures’
time and expense by enabling us to develop
Results our own software in-house. It also enabled us
▪ $12-20 Million annual savings to save millions of dollars in costs that would
▪ Analysis automated, customized and simplified through in- have resulted from poor controller
house solution performance.”
▪ Savings of 250 man days annually for control engineers
- Mehmet Yagci, Tüpraş 18
Link to user story
Sign up for capstone project – ‘Monitoring and control of a
bioreactor’
▪ Motivation & Benefits
– Help transition pharmaceutical manufacturing to Industry 4.0 through
application of APC
– Learn about real industrial challenges
– Learn MATLAB and Simulink
▪ Capstone Project on Github
– Modeling a penicillin bioreactor
– Analyze industrial ‘big data’ set (2.5 GB)
– Identify CPPs
– Develop control strategy

Source

19
Integrating Computational Thinking to Chemical Engineering Curriculum

Introduce Reinforce Industry Getting Help


Applications

20
Getting Help
MATLAB for Academia Help Center

MATLAB Central Customer Success Team

• Curriculum Support
• Research Support
• Awareness Resources

21
MATLAB and Simulink Events 2021 AIChE Annual Meeting

• Integrating Data Science to Chemical Engineering


Curriculum Using MATLAB

• Teaching Hands-on Process Control Courses with


Arduino Based TCLab, MATLAB and Simulink

• Prediction of Atoms in Molecules with MATLAB Graph


Convolutional Network

• Parallel and GPU Computing with MATLAB and Simulink


for Chemical Engineering

https://www.mathworks.com/company/events.html https://aiche.confex.com/aiche/2021/meetingapp.cgi/ModuleProgramBook/0

22
Resources

MathWorks - Academia
MATLAB and Simulink for the Chemicals and Petrochemicals Industry

Fluid Dynamics Process Control


▪ Simscape Fluids ▪ Simulink
▪ Three Constant Head Tanks Documentation Example ▪ Control System Toolbox
▪ Hydraulic Resistive Tube Documentation Example ▪ Water Tank Simulink Model Documentation Example
▪ Design Internal Model Controller for Chemical Reactor
Reaction Kinetics Plant Documentation Example
▪ SimBiology ▪ Teaching Controls with MATLAB and Simulink
▪ Chemical Kinetics with MATLAB File Exchange Entry
▪ Teaching Chemistry with MATLAB Process Design
▪ SimBiology Documentation Example for Reaction ▪ Linking MATLAB to Process Simulators
Kinetics ▪ Design and Cosimulate Control of High-Fidelity
Distillation Tower with Aspen Dynamics Documentation
Heat Transfer Example
▪ Partial Differential Equation Toolbox
▪ Heat Transfer Documentation Examples
23
Teaching Chemical Engineering with
MATLAB, Simulink and TCLab
Joshua Hammond
Research Assistant
John Hedengren
Associate Professor
Brigham Young University

24
Webinar and Interactive Module Interest

25
Overview

▪ Automation needed across industries


▪ 35 Lesson Modules
▪ Pocket-sized lab overview
– Teaching resource with learning objectives
– MATLAB, Simulink, and Live Script demos
▪ Collaborative community resources

26
Automation Impact Across Industries

Medical Automation People Transportation Product Transportation

Oil and Gas Industry

New Topics: Data Science, Analytics, Machine Learning, Cybersecurity, Digitalization


27
MATLAB, Simulink, and Live Script Resources

▪ Dynamics and Control Course


– Learning Modules (35)

– Theory: Lesson
– Simulation: Assignment
– Lab: Temperature Control

– Course
▪ https://apmonitor.com/pdc
– MathWorks Modules
▪ https://github.com/APMonitor/mdc

28
Learning from Instructor Perspective

29
Learning from Student Perspective: Foundations

30
Learning from Student Perspective: Active Learning

31
Learning from Student Perspective: Synthesize

32
Pocket Sized, Transient Heat Transfer Lab

33
Hardware Overview

Actuator
Controller Heaters

Sensors
apmonitor.com/heat.htm
T (oC)

34
MATLAB with TCLab
lab = tclab; % load TCLab

lab.LED(80)

disp(lab.T1)

lab.Q1(50)

35
MATLAB with TCLab
lab = tclab; % load TCLab

lab.LED(80)

disp(lab.T1)
disp(lab.T2)

lab.Q1(50)
lab.Q2(0)

36
Lab Exercises 1-4

37
Simulink with TCLab

38
Manual Control in Simulink

39
Lab Exercises 5-10

40
FOPDT Graphical Fit

41
Lab Exercises 11-16

42
PID Tuning

43
Automatic Control in Simulink

44
Model Predictive Control

45
Estimation with Model Predictive Control

46
Data Science with TCLab
English
https://github.com/APMonitor/data_science

Spanish
https://github.com/APMonitor/ciencia_de_datos

47
TCLab for Machine Learning

48
TCLab for Instructor Evaluation
▪ Send email to [email protected]
– Name
– Shipping Address
– Course Information
▪ Arrives in 2-3 business days (US)
▪ Arrives in 6-20 business days (International)
▪ Student lab kits on Amazon
– https://amzn.to/2FopcMp

49
Community Teaching Resources
CACHE Teaching Resources Resourcium.org

50
Thanks to Collaborators
▪ Many collaborators have enabled this community resource
– Melda Ulusoy @ MathWorks
– Samvith Rao @ MathWorks
– Aycan Hacioglu @ MathWorks
– Abe Martin @ BYU, NAVAIR
– Junho Park @ BYU
– Colin Anderson @ BYU
– Nathanael Nelson @ BYU
– Jeff Kantor @ Notre Dame
– Carl Sandrock @ Univ. of Pretoria, proquo ai
– Paulo Moura Oliviera @ UTAD in Portugal
– John Anthony Rossiter @ Univ. of Sheffield
51
Additional Information
References
▪ Moura Oliveira, P.B., Hedengren, J.D., Solteiro Pires, E.J., Swarm-Based design of Proportional Integral and Derivative Controllers
using a Compromise Cost Function: An Arduino Temperature Laboratory Case Study, Special Issue: Algorithms for PID Controller,
Algorithms, 13(12), 315, DOI: 10.3390/a13120315, 2020. Article
▪ Hedengren, J.D., Kantor, J., Computer Programming and Process Control Take-Home Lab, Computer Aids for Chemical Engineering
(CACHE) News, Summer 2020. Article
▪ Moura Oliveira, P., Hedengren, J., Rossiter, J.A., Introducing Digital Controllers to Undergraduate Students Using the TCLab Arduino
Kit, 21st IFAC World Congress, Berlin, Germany, July 12-17, 2020.
▪ Moura Oliveira, P., Hedengren, J., Boaventura, J., Bridging Theory to Practice: Feedforward and Cascade Control with TCLab Arduino
Kit, 14th International Conference on Automatic Control and Soft Computing (CONTROLO), Bragança, Portugal, July
2020. Proceedings
▪ Park, J., Martin, R.A., Kelly, J.D., Hedengren, J.D., Benchmark Temperature Microcontroller for Process Dynamics and Control,
Computers & Chemical Engineering, Special Issue in Honor of Thomas F. Edgar, 135, 6 April 2020. Preprint | Article
▪ Rossiter, J.A., Jones, B.L., Pope, S., Hedengren, J.D., Evaluation and Demonstration of Take-Home Laboratory Kit, Invited Session:
Demonstration and poster session, 12th IFAC Symposium on Advances in Control Education, July 7-9, 2019, 52 (9), pp. 56-61,
Philadelphia, PA, USA. Preprint
▪ Hedengren, J.D., Martin, R.A., Kantor, J.C., Reuel, N., Temperature Control Lab for Dynamics and Control, AIChE Annual Meeting,
Orlando, FL, Nov 2019. Abstract
▪ Moura Oliveira, P., Hedengren, J.D., An APMonitor Temperature Lab PID Control Experiment for Undergraduate Students, 24th IEEE
Conference on Emerging Technologies and Factory Automation (ETFA), Sep 10th - 13th, 2019, pp. 790-797, Zaragoza,
Spain. Preprint Paper
▪ Park, J., Patterson, C., Kelly, J., Hedengren, J.D., Closed-Loop PID Re-Tuning in a Digital Twin By Re-Playing Past Setpoint and Load
Disturbance Data, AIChE Spring Meeting, New Orleans, LA, April 2019.
52
Questions and Discussion

53

You might also like