# Chemical Process Control

This repository comprises a collection of Jupyter/Python notebooks in support of **CBE 30338 Chemical Process Control** taught at the University of Notre Dame. These materials have been developed over a period time, earlier versions having been created in Matlab/Simulink and available here.

The links below display the notebooks as regular HTML web pages or, where indicated, as presentation slides. From there you can download the notebooks to execute on your laptop. To execute you will need to install a distributions of Jupyter and Python 3, such as the excellent Anaconda distribution available from Continuum Analytics.

Please me know if you any thoughts or suggestions on how these notebooks could be improved for the purposes of teaching and learning the principles of Chemical Process Control.

## 0. Getting Started with Python

- Getting Started with Python and Jupyter Notebooks
- Python Tutorial 1 2018
- Python Tutorial 2 2018
- Python Tutorial 3 2018
- Advanced Topic: Animation in Jupyter Notebooks

## 1. Using the Temperature Control Lab (TCLab)

- Getting Started with the Temperature Control Laboratory 2018
- Empirical Methods for Feedback Control 2018
- Coding Controllers with Python Generators
- Modeling Part 1 - Single Heater with Uniform Temperature 2018
- Modeling Part 2 - Dual Heaters with Uniform Temperature 2018
- Modeling Part 3 - Single Heater with Non-uniform Temperature 2018
- Modeling Part 4 - Dual Heater with Non-uniform Temperature

## 2. First and Second Order Linear Systems

- One Compartment Pharacokinetics [view as slides]
- Second Order Linear Models 2018
- Interacting Tanks
- Manometer Models and Dynamics

## 3. Nonlinear Models and Dynamics

- Gravity Drained Tank [view as slides]
- Blending Tank Simulation [view as slides]
- Continuous Product Blending
- Hare and Lynx Population Dynamics [view as slides]
- Exothermic Stirred-Tank Reactor
- Fed-Batch Bioreactor

## 4. Linear Approximation to Nonlinear Models

- Fitting a Linear Model to the Step Response of a Gravity Drained Tank
- Linear Approximation of a Process Model using Taylor Series
- Linear Approximation of a Multivariable Model using Taylor Series
- Fitting First-Order plus Time-Delay (FOPTD) to Step Response Data [view as slides]

## 6. PID Control

- PID Control
- Implementing PID Control with Python Yield Statement
- PID Control with Setpoint Weighting
- PID Control with Bumpless Transfer
- PID Control with Anti-Reset Windup
- Realizable PID Control
- PID Controller Tuning

## 7. Optimization

- Unconstrained Scalar Optimization
- Linear Production Model with Constraints
- Linear Programming
- Getting Started with Pyomo
- Pyomo Examples
- Linear Blending Problem
- Design of a Cold Weather Fuel
- Gasoline Blending
- State-Task Networks
- Scheduling State-Task Networks
- Firsst Order System in Pyomo
- Path Planning for a Simple Car

## 7. Spreadsheet Optimization

## 6. PID Control (Old)

- Implementing PID Control in Nonlinear Simulations
- Interactive PID Control Tuning with Ziegler-Nichols
- Balancing a Ball on a Beam with Proportional-Derivative Control
- Zero Order Hold and Interpolation
- Advanced Topic: A Modular Approach to Simulation using Python Generators

## 8. Frequency Domain Control Design

- Getting Started with Transfer Functions
- Closed-Loop Transfer Functions for Car Cruise Control
- Creating Bode Plots [view slides]
- Controller Tuning Rules in Frequency Domain
- Baroreflex as a Linear Control System

## Student Projects

This is a selection of about 1/3 of the student projects submitted in Spring, 2017.

- Wind Turbine Collective Blade Pitch Angle Control
- Insulin Control for Treating Type I Diabetes
- Modeling the Blending of Different Types of Chocolate
- Temperature Profile Optimization of the Brewing Process
- Municipal Wastewater Aeration
- T cell Therapy for Chronic Myelogenous Leukemia
- Control of a Reverse Osmosis Desalination Process
- Closed Loop Anesthesia Delivery (CLAD) System
- Autoregulation and Baroreflex Regulation in Mean Arterial Blood Pressure Maintenance
- Sailboat Mast Control