eng 470 - murdoch university · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and...

99
ENG 470 ENGINEERING HONOURS THESIS INVESTIGATION OF ENGINEERING SOFTWARE PACKAGES USED IN LEARNING AND TEACHING OF PROCESS CONTROL ENGINEERING AT MURDOCH UNIVERSITY SAHRIAH MOHAMED

Upload: others

Post on 23-Aug-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

ENG 470 ENGINEERING HONOURS THESIS

INVESTIGATION OF ENGINEERING

SOFTWARE PACKAGES USED IN

LEARNING AND TEACHING OF

PROCESS CONTROL ENGINEERING AT

MURDOCH UNIVERSITY

SAHRIAH MOHAMED

Page 2: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

I declare that this thesis is my own account of my own research. It contains as its main

content work that has not been previously submitted for a degree at any university.

Page 3: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

Abstract This project reviews some of the commonly used Engineering Software Packages in Learning

and Teaching of Process Systems and Process Control Engineering at Murdoch University.

The software packages include Excel in Microsoft Office, MatLab, Simulink, LabVIEW,

Simatic Step 7 (TIA Portal), and AspenONE. Different packages serve different purposes, but

all are useful for automation.

Microsoft Excel is one of the products under the Microsoft Office package. Murdoch

University is subscribing to the latest Office 365, which featured Excel 2016. Siemens AG

produces Simatic STEP 7, and it is for controlling Siemens controller. Among other STEP 7

families, the laboratory at Murdoch University uses S7-300. National Instruments developed

LabVIEW and releases the latest version of LabVIEW this year, which is LabVIEW 2017

and LabVIEW NXG 1.0. Murdoch University is using LabVIEW 2016. AspenONE produced

by Aspen Technology for simulation of chemical reactions. MathWorks provides MatLab and

Simulink and integrates amongst each other.

The project will investigate the software package one by one and will need about two to three

weeks each. This project will give a recommendation of which features that they have not

been used but could be useful for future teaching. This project will benefit the reader as

lecturers can pick up the advice from this project to make teaching easier for them. As for

students, they can check how they use the software.

Page 4: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

iv

TABLE OF CONTENTS 1 Introduction ........................................................................................................................ 1

2 Microsoft Excel .................................................................................................................. 3

2.1 Microsoft Excel for Teaching and Learning ............................................................... 3

2.1.1 Solver ................................................................................................................... 3

2.1.2 Microsoft Excel Data Exchange .......................................................................... 7

2.1.3 Storing Experimental Data from LabVIEW ........................................................ 7

2.2 Useful Features in Microsoft Excel ............................................................................. 8

2.2.1 Visual Basic for Applications (VBA) .................................................................. 8

2.2.2 State Machine..................................................................................................... 11

2.3 Conclusion ................................................................................................................. 14

3 MatLab.............................................................................................................................. 15

3.1 MatLab Toolboxes for Teaching and Learning ......................................................... 17

3.1.1 Optimization Toolbox ........................................................................................ 17

3.1.2 Symbolic Math Toolbox .................................................................................... 19

3.1.3 Control System Toolbox .................................................................................... 22

3.1.4 System Identification Toolbox ........................................................................... 24

3.2 Useful Features in MatLab Toolboxes ...................................................................... 26

3.2.1 Optimization Toolbox ........................................................................................ 26

3.2.2 Symbolic Math Toolbox .................................................................................... 35

3.2.3 Model Predictive Control Toolbox .................................................................... 39

3.2.4 Control System Toolbox .................................................................................... 56

3.3 Conclusion ................................................................................................................. 62

4 LabVIEW .......................................................................................................................... 63

4.1 LabVIEW for Teaching and Learning ...................................................................... 63

4.2 Useful Features in LabVIEW .................................................................................... 68

4.2.1 Control Design and Simulation Module ............................................................ 68

Page 5: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

v

4.2.2 MathScript RT Module ...................................................................................... 69

4.3 Conclusion ................................................................................................................. 72

5 TIA Portal ......................................................................................................................... 73

5.1 TIA Portal for Teaching and Learning ...................................................................... 74

5.1.1 PID Control ........................................................................................................ 74

5.1.2 State Machine..................................................................................................... 77

5.2 Conclusion ................................................................................................................. 79

6 Aspen ................................................................................................................................ 80

6.1 Conclusion ................................................................................................................. 82

7 Conclusion ........................................................................................................................ 83

8 Recommendation .............................................................................................................. 84

9 References ........................................................................................................................ 85

Page 6: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

vi

List of Abbreviations

Aspen Advanced System for Process Engineering

CHTS Continuous Heat Transfer System

D Derivative

DV Disturbance variable

ENG109 Engineering Computing Systems

ENG322 Process Control Engineering II

ENG447 Industrial Computer Systems Design

ENG448 SCADA Systems Architecture

EPL Eclipse Public License

Experion HS Experion Honeywell Software

HMI Human Machine Interface

I Integral

LabVIEW Laboratory Virtual Instrument Engineering Workbench

MatLab Matrix Laboratory

MEDE Microsoft Excel Data Exchange

MPC Model Predictive Control

ms millisecond

MV Manipulated variable

P Proportional

PC Personal Computer

PI Proportional, and Integral

PID Proportional, Integral, and Derivative

PLC Programmable Logic Controller

Page 7: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

vii

PV Process variable

RT Real Time

SISO Single Input Single Output

SST State Transition Tables

SCADA Supervisory Control and Data Acquisition

TIA Portal Totally Integrated Automation Portal

UI User Interface

UML Unified Modelling Language

VBA Visual Basic Application

Page 8: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

viii

List of Figures Figure 1: Excel solver to solve equation. ................................................................................... 4

Figure 2: Excel solver for curve fitting. ..................................................................................... 6

Figure 3: Plot of curve-fitting .................................................................................................... 7

Figure 4: Data result from curve-fitting ..................................................................................... 7

Figure 5: Write to spreadsheet in LabVIEW ............................................................................. 8

Figure 6: Example of VBA used for simulation of controlling the water level in a tank [8]. . 10

Figure 7: Microsoft Visio workspace. ..................................................................................... 12

Figure 8: State machine diagram for a petrol pump using Visio 2010. ................................... 13

Figure 9: State machine diagram for a petrol pump using ArgoUML ..................................... 14

Figure 10: MatLab families [16]. ............................................................................................. 16

Figure 11: Step response to process with delay. ...................................................................... 21

Figure 12: Root locus plot using rlocus function. .................................................................... 22

Figure 13: Root locus plot using sisotool function. ................................................................. 23

Figure 14: Importing data from Excel to MatLab workspace.................................................. 24

Figure 15: Curve fitting result.................................................................................................. 25

Figure 16: Result curve fitting using lsqcurvefit. .................................................................... 28

Figure 17: Result of curve fitting using fminunc. .................................................................... 29

Figure 18: Plots compare curve fitting methods. ..................................................................... 30

Figure 19: Three tanks system. ................................................................................................ 32

Figure 20: Three-tank system in Simulink. .............................................................................. 33

Figure 21: Controller parameters optimization using lsqnonlin function. ............................... 34

Figure 22: Optimized result. .................................................................................................... 35

Figure 23: Plot of simultaneous equations. .............................................................................. 37

Figure 24: Continuous heat transfer system............................................................................. 39

Figure 25: Simulink diagram without disturbance................................................................... 40

Figure 26: MPC controller options window. ........................................................................... 41

Figure 27: MPC designer window. .......................................................................................... 42

Figure 28: Window to design and linearise system for MPC controller.................................. 43

Figure 29: Plant response towards internal plant input step. ................................................... 44

Figure 30: Tuning tab............................................................................................................... 44

Figure 31: System response. .................................................................................................... 45

Figure 32: System response to fixing closed-loop performance. ............................................. 45

Page 9: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

ix

Figure 33: System response after changing prediction horizon to 5 ........................................ 46

Figure 34: System response to prediction horizon of 10. ........................................................ 47

Figure 35: System response to prediction horizon of 15. ........................................................ 47

Figure 36: Effect of control horizon in system setpoint tracking. ........................................... 48

Figure 37: Simulation block diagram. ..................................................................................... 49

Figure 38: System response. .................................................................................................... 50

Figure 39: System response after changing performance-tuning designer. ............................. 50

Figure 40: Performance tuning configuration. ......................................................................... 50

Figure 41: Effect of prediction horizon on disturbance rejection. ........................................... 51

Figure 42: Effect of control horizon on disturbance rejection. ................................................ 52

Figure 43: Effect of rate weight on disturbance rejection. ....................................................... 53

Figure 44: MPC controller design window. ............................................................................. 54

Figure 45: Block diagram for simulation. ................................................................................ 55

Figure 46: Feedback control system configuration. ................................................................. 56

Figure 47: 2-DOF control system configuration. ..................................................................... 56

Figure 48: PID Tuner first response......................................................................................... 57

Figure 49: Examine rise and settling time. .............................................................................. 57

Figure 50: Response towards increasing response time. ........................................................ 58

Figure 51: Response towards controller type change. ............................................................. 59

Figure 52: Controller parameters. ............................................................................................ 59

Figure 53: Root locus plot with rlocfind function. .................................................................. 61

Figure 54: Response plot from root locus analysis. ................................................................. 62

Figure 55: Block diagram of the program to run process plants.............................................. 64

Figure 56: Block diagram of air system control. ..................................................................... 65

Figure 57: Front panel of air system control. ........................................................................... 66

Figure 58: Result of using different controller parameters. ..................................................... 66

Figure 59: Process response towards set point and disturbance change. ................................. 67

Figure 60: Block diagram of LabVIEW simulation. ............................................................... 69

Figure 61: Front panel of LabVIEW simulation. ..................................................................... 69

Figure 62: Block diagram of LabVIEW MatLab script simulation. ........................................ 70

Figure 63: Root locus diagram using MatLab Script in LabVIEW. ........................................ 71

Figure 64: Front panel of LabVIEW MatLab Script simulation. ............................................. 72

Figure 65: Easy 500 Programmable Relay. ............................................................................. 73

Figure 66: Ladder diagram of the simulation process. ............................................................ 75

Page 10: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

x

Figure 67: Ladder diagram of simulation disturbance to process. ........................................... 75

Figure 68: Ladder diagram of process and disturbance simulation. ........................................ 76

Figure 69: Ladder diagram of controller block. ....................................................................... 77

Figure 70: State machine for Gantry apparatus. ...................................................................... 78

Figure 71: Ladder diagram for TAKE OBJECT state. ............................................................ 79

Figure 72: Aspen Plus model. .................................................................................................. 81

Figure 73: Aspen Plus Dynamic model. .................................................................................. 82

Page 11: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

xi

Acknowledgement

It is a great pleasure to acknowledge my deepest thanks and gratitude to Dr Linh Vu, for

suggesting the topic of this project, and her kind supervision. It is a great honour to work

under her supervision.

I would like to express my extreme sincere gratitude and appreciation to Mr Will Stirling,

for his kind endless help, generous advice and support during the study.

Page 12: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

1

1 Introduction This project will investigate some of the commonly used engineering software for teaching

and learning of Process System and Process Control Engineering at Murdoch University.

These software packages include Excel in Microsoft Office, Simatic STEP 7 (TIA Portal),

LabVIEW, AspenONE, MatLab, and Simulink. The software will be reviewed based on its

features that has been used and the utilization of the features during teaching and learning in

the University. Recommendation also will be given towards features that can help for

teaching and learning.

Microsoft Excel is a spreadsheet application developed by Microsoft and launched for

Windows in November 1987 [1]. Murdoch University now subscribes to Office 365, which

features the latest Microsoft Excel version, which is Excel 2016. Excel is used to store and

fetch numerical data in rows and columns format. Data can be visualised using charts and

graphs.

Simatic STEP 7 (TIA Portal) is the next generation after Simatic STEP 7 produced by

Siemens AG. The Totally Integrated Automation Portal (TIA Portal) allows users to

configure, program, test and diagnose the basic, advanced, and distributed controllers of each

generation, whether it is PLC- or PC-based, including software controllers [2]. TIA Portal not

only integrated with the basic software (STEP 7, WinCC, SINAMICS Startdrive,

SIMOCODE ES and SIMOTION SCOUT TIA) but also the new functionalities like

Multiuser and energy management in a single interface [3].

Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is systems engineering

software for applications that require testing, measurement, and control with rapid access to

hardware and data insights [4]. LabVIEW developed by National Instruments and the current

version used in Murdoch University is LabVIEW 2016. LabVIEW is used in test and

measurement, as well as process monitoring, control applications, and widely used from

transportation systems monitoring, to university laboratory classes; from automated parts

testing to industrial process control [5].

AspenONE is a product developed by AspenTech to reduce costs, increase capacity and

achieve operational excellence by integrating engineering, manufacturing and supply chain

operations [6]. AspenONE Engineering is a suite of products that focus on process

Page 13: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

2

engineering and optimisation. The process modelling analysis and design tools are integrated

and accessible through process simulators Aspen HYSYS and Aspen Plus [7].

MatLab is a matrix-based language that is optimised for solving engineering and scientific

problems. MathWorks develop MatLab and it is used for machine learning, signal processing,

image processing, computer vision, communications, computational finance, control design,

robotics, and much more [8]. The MatLab product family consist of parallel computing

toolboxes, math, statistics, and optimization toolboxes, control systems toolboxes, signal

processing and wireless communications toolboxes, image processing and computer vision

toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9].

MatLab and add-on toolboxes are integrated with each other and designed to work together.

Simulink is another product from MathWorks to support simulation, automatic code

generation, and continuous test and verification of embedded systems [10]. Simulink is a

block diagram environment for multidomain simulation and Model-Based Design and

provides a graphical editor, customizable block libraries, and solvers for modelling and

simulating dynamic systems [10]. It is integrated with MatLab allowing to incorporate

MatLab algorithms into models and export simulation results to MatLab for further analysis

[10].

This project will explore all special features from each software packages and points out

which features are used currently for teaching and learning. This project will look at these

used features to see whether the features are fully utilised or not. Apart from the used

features, this project will go over the unused features and discover whether the features can

be used for teaching and learning. For each of these functions, examples that worth

mentioning related to automation will be provided. To achieve these aims, the software

packages’ descriptions must be looked at.

Page 14: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

3

2 Microsoft Excel Microsoft Excel by Microsoft is a spreadsheet application that was first released for Windows

in November 1987 [1]. Murdoch University subscribes to Office 365 featuring Excel’s latest

version, Excel 2016. Numerical data can be stored and fetched in rows and columns format.

Data can be visualised using charts and graph. As Microsoft Excel offers powerful yet simple

usage, Excel is widely used at Murdoch University for teaching and learning purposes in

various engineering disciplines and other departments.

The usage of Excel serves various reasons in learning engineering: data storing from real

experiment and data is manipulated for validating model process in Excel. Other than that,

Excel has tools that can help in understanding state machines and simple programming. This

usage of Excel for teaching and learning process engineering are described in the following

section.

2.1 Microsoft Excel for Teaching and Learning

Microsoft Excel is widely used due to its simplicity and is easy to get software. Excel has

solver add-ins that are mainly used to solve equations and curve fitting. Other than that, Excel

Visual Basic Application is introduced in ENG109 (Engineering Computing Systems). Excel

also has Microsoft Excel Data Exchange that is used to read and write data from and to

Experion HS drove plant. Experion HS is a software to monitor and control automation plants

using real-time data and can be used by the plant’s personnel [2].

2.1.1 Solver

The solver in Microsoft Excel is an add-in that allows finding a maximum or minimum value

for an objective cell subject to constraints [3]. Solver adjusts the values in the decision

variable cells to satisfy the limits on constraints cells and produce the result on the objective

cell [3]. The solution can come from various methods: from linear programming and

nonlinear optimisation to genetic and evolutionary algorithms.

In one of the topics in ENG109 (Engineering Computing Systems), the solver in Excel is

used to solve various types of problems (accounting, business, and engineering) and Example

2-1 shows a solver implementation to find a suitable value of a resistor in a circuit.

Page 15: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

4

Example 2-1: Find value of resistor in a circuit using solver in Microsoft Excel.

The problem is to find the optimal value of a resistor to use in a circuit with given inductor

and capacitor values. The objective is to satisfy the dissipate charge to 1% of the resistor

value within 50ms after the switch is closed. Figure 1 showing the user interface as well as

the calculation of the problem.

By using the solver, the optimal value of the resistor that is satisfying the objective is

calculated. The value of the resistor is 300 ohms and the charge dissipated is 0.25 volts after

0.05 second. The value of the dissipated charge is 0.083% of the resistor value and is proven

satisfying the objective of the problem.

Figure 1: Excel solver to solve equation.

Page 16: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

5

One solver capability that always appeals to engineering is that solver can obtain best-fit line

(curve fitting) or regression analysis [4]. The equation is the predicted model of the data and

by subtracting the real data with the predicted data will gives out the error.

The user must have a deep understanding of the data as the user has to choose the predicted

equation based on the real data. Real data must be available in a spreadsheet, choose the

model equation, and initiate the model building process. The graphical window is a great

feature in teaching the principles of data modelling as this feature enable observing the

dynamics of the model building process. Example 2-2 shows modelling a water-level process

using regression analysis.

Example 2-2: Modelling real process by curve fitting.

The process to model is water level in a tank. The system is undergoing open loop testing and

the numerical data is saved in a spreadsheet. First, plot the data against time to get an idea of

how the model should be. Figure 2 illustrates the column set-up for solver calculation.

The column PV minus its steady state is to make sure that the process curve starts from zero.

When the process curve is fitted into a model curve without the value starts from zero, the

model curve may not be as precise as the process curve. The model column builds up from

the equation that is a prediction of the real data. Model value cannot be less than zero

according to its process variable value; hence, the column next to model column is to make

sure that there is no model value that is lower than zero. The next column is the error that

derives from model subtracts the data and error are squared on the next column.

In the solver parameters window, sum of square errors cell as the objective cell, and model

equation parameters (gain, time constant, and time delay) as decision variable cell. Plots of

model and data are in Figure 3, and the equation of the model can be derived from data in

Figure 4 is:

𝑓𝑓𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 = 0.819725271.2046𝑠𝑠+1

𝑒𝑒−33.28776𝑠𝑠 (1)

To choose the right controller for the process, it is important that the model is representing

the real process is as similar as possible. The process of Example 2-2 is from the pilot plant

investigations during ENG322 (Process Control Engineering II). The model affects the

controller parameters that are going to be used in the pilot plant.

Page 17: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

6

Figure 2: Excel solver for curve fitting.

Page 18: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

7

Figure 3: Plot of curve-fitting

Figure 4: Data result from curve-fitting

2.1.2 Microsoft Excel Data Exchange

Microsoft Excel Data Exchange (MEDE) is an integrated add-in Excel that allows user to

display real-time point value and history point value in a spreadsheet [5]. The point values

can be retrieved from the process can use MEDE Wizard or through cell formulas in Excel.

MEDE also allows user to write point value the MEDE Wizard or Excel’s cell formulas.

MEDE application for learning is to run and control process of a pilot plant that is available

in Murdoch University during ENG322 (Process Control Engineering II).

2.1.3 Storing Experimental Data from LabVIEW

Most common Excel’s purpose in learning and teaching in the University is to collect and store data

from experiments in the laboratory runs by the LabVIEW. There is specific block in the

LabVIEW that collects numerical and string data into the Excel’s spreadsheet. The block

marks by red rectangle in Figure 5.

Page 19: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

8

Figure 5: Write to spreadsheet in LabVIEW

2.2 Useful Features in Microsoft Excel

Apart from features that have been used, there are more that Microsoft Excel could use to

help teaching and learning Process Control Engineering at Murdoch University.

2.2.1 Visual Basic for Applications (VBA)

Excel Visual Basic for Applications (VBA) allows the user to perform recurring tasks or to

perform a task that is not addressed at the user interface (UI) [6] [7]. VBA is a programming

language that runs written macros, consisting of step-by-step procedures in Visual Basic.

VBA usually used to automate repetitive tasks. Say that a user has a few dozen workbooks,

each of which has a few dozen worksheets, and each of those needs to apply new formatting

to some fixed range of cells. The user can write explicit instructions for Excel to follow using

VBA and those tasks can be automated.

VBA can build new capabilities into Excel as new algorithms can be developed to analyse

data and display the results using Excel’s charting capabilities or even to integrate Excel with

other Office applications such as Microsoft Access. With the extended capabilities offered by

VBA, Excel can be used in a range of tasks from data visualisation to software prototyping

[1].

Topic related to VBA are available in ENG109 (Engineering Computing Systems) during the

first year of engineering degree in the University. This starts by looking at Macros and simple

programming concepts, the topic then concerns with programming using VBA and looks at

functions that add to Excel’s capabilities. A simple process can be simulated for further

Page 20: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

9

understanding with VBA. Example 2-3 will describe the process and its implementation with

VBA.

Example 2-3: Controlling water level in a tank simulation with Excel VBA.

The process is water level in a tank consisting of two inputs (Pump A and Pump B) and an

outlet pump with the initial level at 50% of the tank. The objective of the controller is to

maintain the water level at set point. Figure 6 consists of elements and data for the

simulation. The input and output usage is varying due to on/off button. The controller is

selectable between Proportional (P), Integral (I), Derivative (D), and combinations of these

three types of controllers. The equation below the graph is indicating active controller

elements.

The simulation starts with a ‘START PROGRAM’ button for filling the tank with water until

level at 50% of the tank. ‘ALL ON’ button activates the inlet pumps, the outlet pump, and all

three-controller elements. The level of water in the tank is changing throughout the

simulation. In case of manual control, control the opening of the valve using plus and minus

button available. Other elements to control include a bias value, level set point by tank empty

percentage, fast forward simulation, and clear graph function.

The top graph indicates real-time tank level, set point, and error, while the bottom graph-

shows the controller’s elements value changing throughout the simulation. The flow rate of

inputs and output is displayed right under each pump. The simulation can be a help in

understanding controller’s behaviour on different controller elements and effect of having

more than one input towards the controlled process.

Page 21: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

10

Figure 6: Example of VBA used for simulation of controlling the water level in a tank [8].

Page 22: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

11

2.2.2 State Machine

Unified Modeling Language (UML) is a standardized modeling language to specify,

visualize, and document models of systems [9]. It is a set of diagrams that helps to develope

systems by expressing the design of the systems [10]. UML primary goals summarize by

Page-Jones in Fundamental Object-Oriented Design are as follows [10] [11]:

• To provide users with a ready-to-use, expressive visual modeling language so the

users can develop and exchange important models

• To provide extensibily and specialization mechanisms to extend the core concepts

• To be independent of particular progarmming languages and development processes

• To provide a formal basis for understanding the modeling language

• To support higher-level development concepts such as collaborations, frameworks,

aptterns, and components

• To integrate best practices

State machine is a type of UML. A state machine is a type of workflow that executes a

certain number of states. An activity is triggering into and out of a state. A transition is

represented by an arrow or branch allows the state to jump from one to another based on a

condition. The state machine can be represented in a diagram as in Figure 7. State machine

diagram can be a use before programming starts as a plan that will ease out the programming

process. One can follow the state machine diagram for programming and easily troubleshoot

program based on the diagram.

State machine is great for any process or problems that can be grouped into discrete steps. It

is great for user interfaces, communications protocols, and some pattern recognition tasks

[12]. Each state represents summarisation of system operation that can simplify the

complicated process from thousands of lines of code into a few dozen of states and easy to

understand chunks.

A state machine allows easy program modification to a specific implementation, and

hardware or software restrictions. It is easy to add a new state to an existing state without

having to revise the whole programs. This is in comparison to complicated programs that

may share huge amounts of code in no intuitive ways. Microsoft Excel did not provide tools

or add-ins explicitly to build state diagram but Excel can be used to build state table; another

way to express states and events in state transition table.

Page 23: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

12

State transition table is not an UML because it did not made up from a cumulative of

diagrams instead it is a table contains of rows and columns of data. Example 2-4 featuring

two easy-to-get software that can build state machine diagram explicitly.

Example 2-4: Microsoft Visio and ArgoUML to draw state machine diagram.

The process to be implemented into a state machine is getting petrol from a petrol station and

pays using a credit card.

Microsoft Visio is a diagramming application and part of the Microsoft Office family.

Microsoft Visio tool UML (Unified Modelling Language) Model Drawing allowing users to

design state machine diagrams. The workspace that available is illustrated in Figure 7. The

shapes that are going to be used in the diagram are available in the left pane of the

workspace. The state machine diagram drawn with Microsoft Visio is in Figure 8. Unlike

ArgoUML that will be discussed later, the diagram cannot provide details of each state in the

diagram. The details are in the comment section for each state but not showing up in the

diagram.

Figure 7: Microsoft Visio workspace.

Page 24: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

13

Figure 8: State machine diagram for a petrol pump using Visio 2010.

ArgoUML is an open source UML modelling tool and can run on any Java platform.

ArgoUML is free to download available on http://argouml-

downloads.tigris.org/nonav/argouml-0.34/ArgoUML-0.34-setup.exe website. It is licensed

under the Eclipse Public License (EPL) 1.0 and supports the following diagram types [13]:

• Class diagram

• Statechart diagram

• Activity diagram (including Swimlanes)

• Use Case diagram

• Collaboration diagram

• Deployment diagram (includes Object and Component diagram in one)

• Sequence diagram

The state diagram in Figure 9 shows more details than state machine diagram in Figure 8

hence it will be more help for developers to program the process. ArgoUML is easier to

design diagrams due to its intuitive and smooth modelling process. The mouse gives hints on

each element that can be placed on the diagram. Both software were used to learn and design

state machine diagrams.

Page 25: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

14

Figure 9: State machine diagram for a petrol pump using ArgoUML

2.3 Conclusion

Microsoft Excel is a simple yet powerful application. It is used for teaching and learning

Process Control Engineering at Murdoch University from first- to fourth-year students. The

most common function of Excel is the usage of its solver add-in and for storing data from

LabVIEW. Utilizing Microsoft Excel application, Microsoft Excel Data Exchange may be

used to write and read data from Experion HS plant. The Visual Basic Application can be a

help for students when there is no simulation application licence available. Using the example

presented in this section, the controller can be introduced to first-year students. State machine

diagram can be drawn using Microsoft Visio and ArgoUML.

Page 26: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

15

3 MatLab MatLab (Matrix Laboratory) is a product of MathWorks that combines iterative analysis and

design processes in a desktop environment with matrix and array mathematics programming

language [14]. MathWorks is releasing MatLab products for student use that are accessible

from iPhone, iPad, and Android devices using MatLab or any web browser using MatLab

Online [15]. MatLab that are installed for class usage in Murdoch University is MatLab

Classroom license (R2016b) and is used extensively in learning engineering units.

MatLab comes with seventeen toolboxes including Simulink as illustrated in Figure 10. Out

of these toolboxes, excluding Simulink, there are four frequently used toolboxes in class. The

toolboxes are Optimization Toolbox, Symbolic Math Toolbox, Control System Toolbox, and

System Identification Toolbox. The usage of these toolboxes in class are detailed in the next

section.

Page 27: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

16

Figure 10: MatLab families [16].

Page 28: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

17

3.1 MatLab Toolboxes for Teaching and Learning

This section is discussing MatLab features that have been used in teaching and learning of the

Process Control Engineering. The discussion is about MatLab toolboxes and functions in the

toolboxes.

3.1.1 Optimization Toolbox

The optimization toolbox is providing functions to find parameters that minimise or

maximise objectives while satisfying constraints [17]. The functions that are usually used in

class are fmincon, and fminunc. These functions are used in third-year units for Engineering

Technology students, and Instrumentation and Control Engineering Honours students.

fmincon is used to find a minimum of a constrained nonlinear function. Example 3-1 shows

the usage of fmincon to solve the optimisation problem.

Example 3-1: Minimizing objective function with constraints.

Minimize (𝑥𝑥) = 4𝑥𝑥12 + 5𝑥𝑥22 , subject to 2𝑥𝑥1 + 3𝑥𝑥2 = 6.

Solution: Three m-files are needed to solve this problem. One function file is to define the

objective function, another function file is to define the constraints, and one m-file to run the

optimization function.

obj722.m

function [f] = obj722(X)

f = 4*X(1)^2 + 5*X(2)^2;

confuneq722.m

function [c, ceq] = confuneq722(X)

c = [ ];

ceq = 2*X(1) + 3*X(2) – 6;

main22.m

X0 = [1 3];

options = optimset(‘LargeScale’,’off’);

[X, fval] = fmincon(‘obj722’,X0,[],[],[],[],[],[],’confuneq722’,options)

[c, ceq] = confuneq(X)

Page 29: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

18

The results for 𝑥𝑥1 and 𝑥𝑥2 are 1.0714 and 1.2857 respectively. The final value of the objective

function is 12.8571.

fminunc is use to find minimum of unconstrained nonlinear function. Example 3-2 shows

optimization using fminunc.

Example 3-2: Minimizing objective function without constraints [18].

Minimize these functions:

i) 𝑓𝑓(𝑥𝑥) = 𝑥𝑥4 − 𝑥𝑥 + 1

ii) 𝑓𝑓(𝑡𝑡) = (125 − 50𝑡𝑡 + 5𝑡𝑡2) 100[1+0.5(1.5𝑡𝑡−3)(0.25)]4

iii) 𝑓𝑓(𝑥𝑥) = 100(𝑥𝑥2 − 𝑥𝑥12)2 + (1 − 𝑥𝑥1)2

iv) 𝑓𝑓(𝑥𝑥) = (𝑥𝑥1 − 2)4 + (𝑥𝑥1 − 2)2𝑥𝑥22 + (𝑥𝑥2 + 1)2

Each optimisation problem needs two m-files; one function file for defining the objective

function, and one m-file to run the optimisation function.

Answer:

i) obj11.m

function f = obj11(X)

f = X^4 – X + 1;

end

obj11main.m

X0 = 4;

[X, fval] = fminunc(‘obj11’,X0)

The result is 𝑥𝑥 = 0.63 and the final value is 0.5275.

ii) obj12.m

function f = obj12(X)

f = -((125 – 50*X + 5*X^2) * 100) / (1 + 0.5*(1.5*X^-3) * (0.25))^4;

end

obj12main.m

X0 = 5;

Page 30: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

19

[X, fval] = fminunc(‘obj12’,X0)

The result is 𝑥𝑥 = 0.7590e8 and the final value is -4.7619e20.

iii) obj13.m

function f = obj13(X)

f = 100 * (X(2) – X(1)^2)^2 + (1 – X(1))^2;

end

obj13main.m

X0 = [5 6];

[X, fval] = fminunc(‘obj13’,X0);

The result are 𝑥𝑥1 = 1.0007, 𝑥𝑥2 = 1.0014 and the final value is 8.8266e-7.

iv) obj14.m

function f = obj14(X)

f = (X(1) – 2)^4 + (X(1) – 2)^2 * (X(2)^2) + (X(2) + 1)^2;

end

obj14main.m

X0 = [4 4];

[X, fval] = fminunc(‘obj14’,X0)

The result are 𝑥𝑥1 = 2.00, 𝑥𝑥2 = -1.00 and the final value is 1.8093e-10.

3.1.2 Symbolic Math Toolbox

Theories of the Laplace transform, Pade approximation, and Taylor series [19] are taught in

class and students are encouraged to solve problems related to these theories by hand. Despite

that, MatLab does provide functions to help in solving those problems in a matter of seconds.

The functions are laplace, ilaplace, pade, and taylor. Example 3-3 shows usage of these

functions to solve related problems.

Example 3-3: Symbolic Math Toolbox functions usage [18].

i) Transform 𝑓𝑓(𝑡𝑡) = −1.25 + 3.5𝑡𝑡𝑒𝑒−2𝑡𝑡 + 1.25𝑒𝑒−2𝑡𝑡.

syms t s

Page 31: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

20

f = -1.25 + 3.5*t*exp(-2*t) + 1.25*exp(-2*t);

F = laplace(f,t,s)

Fs = simplify(F)

The result is 𝐹𝐹 = 54(𝑠𝑠+2)

+ 72(𝑠𝑠+2)2 −

54𝑠𝑠

and 𝐹𝐹𝐹𝐹 = 𝑠𝑠−5𝑠𝑠(𝑠𝑠+2)2

ii) Transform 𝐹𝐹(𝐹𝐹) = 24𝑠𝑠(𝑠𝑠+8)

into 𝐹𝐹(𝑡𝑡).

syms F s

F = 24 / (s*(s + 8));

Ft = ilaplace(F)

The result is 𝐹𝐹(𝑡𝑡) = 3 − 3𝑒𝑒−8𝑡𝑡

iii) Transform 𝑌𝑌(𝐹𝐹) = 4𝑠𝑠2+4𝑠𝑠+4𝑠𝑠2(𝑠𝑠2+3𝑠𝑠+2)

into 𝑌𝑌(𝑡𝑡) using partial fraction.

syms s

Y = (4*s^2 + 4*s + 4) / (s^2 * (s^2 + 3*s + 2));

Ys = partfrac(Y)

ilaplace(Ys)

The result is 𝑌𝑌𝐹𝐹 = 4𝑠𝑠+1

− 3𝑠𝑠+2

− 1𝑠𝑠

+ 2𝑠𝑠2

and inverse laplace 2𝑡𝑡 + 4𝑒𝑒−𝑡𝑡 − 3𝑒𝑒−2𝑡𝑡 − 1

iv) List 11+𝑥𝑥

in 10th order of Taylor series

syms x

G = taylor(1/(1 + x),’Order’,10)

The result is 𝐺𝐺 = −𝑥𝑥9 + 𝑥𝑥8 − 𝑥𝑥7 + 𝑥𝑥6 − 𝑥𝑥5 + 𝑥𝑥4 − 𝑥𝑥3 + 𝑥𝑥2 − 𝑥𝑥 + 1

v) Plot the step response of 𝐻𝐻 = 32𝑠𝑠+1

𝑒𝑒−4𝑠𝑠 and its Pade approximation at 3 and 5

order.

s = tf(‘s’)

Page 32: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

21

H1 = 3/(2*s + 1);

delay = exp(-4*s);

Hs = H1*delay;

step(Hs)

hold on

H2 = pade(delay,5);

H = H1*H2;

step(H)

hold on

H3 = pade(delay,3);

Hp = H1*H3;

step(Hp)

The result of the plots is in Figure 11.

Figure 11: Step response to process with delay.

Page 33: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

22

3.1.3 Control System Toolbox

The Control System Toolbox provides functions to analyse, design, and tune linear control

systems [20]. Functions that are usually used in class are the rlocus and sisotool. The rlocus

function will compute the root locus of a single input single output (SISO) open-loop model.

Meanwhile, the sisotool function will compute bode and root locus of SISO open-loop

model. The response towards selected controller gain is displaying in the same windows.

Example 3-4 shows the usage of these functions in a MatLab script.

Example 3-4: Tuning process using open-loop tuning method.

The transfer function of the process is 𝐻𝐻 = 6(2𝑠𝑠+1)(4𝑠𝑠+1)(6𝑠𝑠+1)

(2)

s = tf(‘s’);

H = 6 / ((2*s + 1) * (4*s + 1) * (6*s + 1));

rlocus(H)

sisotool(H)

The result from this run is illustrated in Figure 12 and Figure 13 for the rlocus and sisotool

functions respectively.

Figure 12: Root locus plot using rlocus function.

Page 34: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

23

Figure 13: Root locus plot using sisotool function.

Page 35: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

24

3.1.4 System Identification Toolbox

The System Identification Toolbox provides functions and Simulink blocks to construct

mathematical models of dynamic systems from measured input-output data [21]. The ident

function is usually used to get model parameters from data available in MatLab workspace.

Example 3-5 shows how the ident function is used.

Example 3-5: Getting model parameters from input-output data.

First, import the data into the MatLab workspace as two column vectors as demonstrated by

Figure 14. Variable ‘mv’ is the input data, and ‘pv’ is the output data. To open the System

Identification app, type ‘systemIdentification’ or ‘ident’ in the MatLab Command Window.

Figure 14: Importing data from Excel to MatLab workspace.

Select appropriate models such as some poles, zero, delay, and integrator. Poles and zeros are

determining the dynamic behaviour of a transfer function model [22]. Poles are the

numerator in the transfer function while zeros are the denominator in the transfer function

[22]. Delay term in transfer function is represented as 𝑒𝑒−∝𝑠𝑠 with α is the time delay value

[23]. Integrator term means adding ‘s’ term on the denominator of the transfer function [23].

For this example, a model with delay is chosen as the data exhibit no response right after

input is changed. Figure 15 shows the estimation fit of the data is 86.04%, and this is a good

Page 36: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

25

fit. 80% and above fit is the best fit. The model parameters obtained from this curve fitting

process are 𝐺𝐺(𝐹𝐹) = 0.901271+1.7512𝑠𝑠

𝑒𝑒−0.2185𝑠𝑠 (3).

Figure 15: Curve fitting result.

MatLab has been an important simulation application for teaching and learning Process

Control Engineering at Murdoch University. Various features of MatLab has been explored

and used accordingly. On top of that, there are a few functions and application of MatLab that

can help in the process of teaching and learning but has not been used yet. Next section will

enlighten these features and provide useful examples.

Page 37: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

26

3.2 Useful Features in MatLab Toolboxes

MatLab is a powerful simulation tool, and there are more than what has been used. This

section is giving an in-depth discussion of these functions and application that has not been

used yet while providing relevant examples for the features.

3.2.1 Optimization Toolbox

fminunc function can fit curves by using the sum of squares of the residuals as the objective

function. Other than that, lsqcurvefit function also can fit curves from data. Example 3-6

shows how to do curve fitting using both functions.

Example 3-6: Curve fitting using Optimization Toolbox function.

The data is obtained by importing from Excel into a MatLab workspace.

t = Time;

y = Output;

plot(t,y,’r’)

title(‘Data points’)

% Function : First-order-with-time-delay

% x(1) = k

% x(2) = tau

% x(3) = alpha

% A = 10

F = @(x,xdata)x(1)*10*(1-exp(-(xdata-x(3))/x(2)));

x0 = [1 1 2];

[x,resnorm,~,exitflag,output] = lsqcurvefit(F,x0,t,y)

hold on

plot(t,F(x,t),’b’)

hold off

Fsumsquares = @(x)sum((F(x,t)-y).^2);

opts = optimoptions(‘fminunc’,’Algorithm’,’quasi-newton’);

[xunc,ressquared,eflag,output] = fminunc(Fsumsquares,x0,opts)

Page 38: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

27

hold on

plot(t,F(xunc,t),’g’)

hold off

msol = 0.819725*10*(1-exp(-(t-33.28776)/271.2046));

hold on

plot(t,msol,’black’)

hold off

The model parameters that result from running the code are

𝑓𝑓𝑠𝑠𝑠𝑠𝑙𝑙𝑙𝑙𝑙𝑙𝑠𝑠𝑠𝑠𝑠𝑠𝑙𝑙𝑙𝑙𝑡𝑡 = 0.6334240.7907𝑠𝑠+1

𝑒𝑒−16.0570𝑠𝑠 (4)

𝑓𝑓𝑙𝑙𝑓𝑓𝑙𝑙𝑓𝑓𝑙𝑙𝑓𝑓𝑙𝑙 = 0.6334240.8068𝑠𝑠+1

𝑒𝑒−16.0514𝑠𝑠 (5)

Note that while the results are almost identical, the fminunc function uses more iteration (43

iterations) compared to lsqcurvefit function iteration (16 iterations) to do so. Figure 16 and

Figure 17 are showing the result generated by MatLab and show the number of iteration for

both functions.

Page 39: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

28

Figure 16: Result curve fitting using lsqcurvefit.

Page 40: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

29

Figure 17: Result of curve fitting using fminunc.

The result is compared with curve fitting done in Excel using its solver add-ins. Recalling

model parameter equation from Example 2-2,

𝑓𝑓𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 = 0.819725271.2046𝑠𝑠+1

𝑒𝑒−33.28776𝑠𝑠 (1)

and Figure 18 shows the plots of data output and model parameters obtained in three different

ways; it is obvious that the models from these ways are identical. In the future, other than

using solver add-ins in Excel that needs quite a lot of calculation for curve fitting, fminunc

and lsqcurvefit functions can do the job and give the same answer.

Page 41: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

30

Figure 18: Plots compare curve fitting methods.

Another function within the Optimization Toolbox that has not been used yet but would be

useful is lsqnonlin. This function is to perform least squares fit on tracking of the output.

Using this function, controller parameters can be optimised by minimising the error between

a process output and its setpoint.

Page 42: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

31

Example 3-7 demonstrates optimising the controller parameters in a Simulink model with

multiobjective functions using lsqnonlin.

Example 3-7: Three tanks system controller parameters optimisation.

Page 43: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

32

Figure 19: Three tanks system.

The model is of three non-interacting tanks with a level controller in Tank 3 shown in Figure

19. To control the level in Tank 3, the inlet flow rate to the first tank, F0, will be manipulated

based on a signal from a feedback controller. The transfer function of the model is

𝑔𝑔(𝐹𝐹) = 6(2𝑠𝑠+1)(4𝑠𝑠+1)(6𝑠𝑠+1)

(6)

The system is modelling in Simulink with the controller parameters inside the PID block

being Kp, Ki, and Kd. These unknowns are the variables to be optimised in MatLab script.

The set-up of Simulink model is showing in Figure 20.

Page 44: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

33

Figure 20: Three-tank system in Simulink.

The Simulink model is then saved as a model under file name threetankspid.mdl. This

extension is to deploy Simulink model as generated code that can be in MatLab workspace.

Next, defining controller parameters as variables in MatLab function file. Kp, Ki, and Kd

unknowns are defined in ctrlthree.m function file. The simset function is telling the sim

function to simulate the current workspace by ‘SrcWorkspace’ to ‘Current’. The error signal

is defined by F, which is obtained from the Simulink model outport.

ctrlthree.m

function F = ctrlthree(pid)

Kp = pid(1);

Ki = pid(2);

Kd = pid(3);

opt = simset(‘solver’,’ode8’,’SrcWorkspace’,’Current’);

[~,~,yout] = sim(‘threetanks’,[0 100],opt);

F = yout-1;

main_ctrlthree.m

threetankspid

pid0 = [0.6 0.1 0.1];

options = optimset(‘LargeScale’,’off’,’Display’,’iter’,’TolX’,0.001,’TolFun’,0.001);

pid = lsqnonlin(@ctrlthree,pid0,[],[],options);

Kp = pid(1); Ki = pid(2); Kd = pid(3);

Page 45: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

34

The variable options passed to lsqnonlin defined the criteria and display characteristics. In

this case, the algorithm is medium-scale, display output, and gives termination tolerances for

the step and objective function of approximately 0.001. The optimization gives the solution

for the proportional, integral, and derivative (Kp, Ki, Kd) gains of the controller after 56

function evaluations as shown in Figure 21.

Figure 21: Controller parameters optimization using lsqnonlin function.

The resulting closed-loop step response is shown in Figure 22.

Page 46: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

35

Figure 22: Optimized result (Percentage (%) vs Time (s)).

3.2.2 Symbolic Math Toolbox

The Symbolic Math Toolbox can help in solving the nonlinear equations and simultaneous

equations using solve function. Example 3-8 is solving the nonlinear equation and

simultaneous equation based on these steps to solve one or more equations using the solve

function.

Step 1: Define the variables in the equations as symbolic using the “syms” command.

Step 2: Define the equations.

Step 3: Solve the equations using the “solve” command.

Step 4: If there is more than one solution, decide which is reasonable and select it.

Step 5: Check the solution by substituting it back into the original equation(s).

Example 3-8: Solving various nonlinear equations symbolically using solve function.

i) Solve equation 𝑎𝑎𝑥𝑥2 + 𝑏𝑏𝑥𝑥 + 𝑐𝑐 = 0 symbolically.

Three ways can solve this equation:

1) By specifying the equation using single quotation marks:

syms x a b c;

eq = ‘a*x^2+b*x+c=0’

[x] = solve (eq, x)

Page 47: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

36

2) If the right-hand side of the equation is not specified, then solve assumes that the

expression equals zero:

syms x a b c;

expn = a*x^2+b*x+c

[x] = solve (expn, x)

3) Use double-equal sign inside the solve command to define the equation:

syms x a b c;

[x] = solve (a*x^2+b*x+c==0, x)

All approach will give the same answer:

ii) Solve this set of equations:

2𝑥𝑥 − 3𝑦𝑦 + 4𝑧𝑧 = 5

𝑦𝑦 + 4𝑧𝑧 + 𝑥𝑥 = 10

−2𝑧𝑧 + 3𝑥𝑥 + 4𝑦𝑦 = 0

In MatLab script:

syms x y z

eq1 = ‘2*x-3*y+4*z = 5’

eq2 = ‘y+4*z+x = 10’

eq3 = ‘-2*z+3*x+4*y = 0’

[x, y, z] = solve (eq1, eq2, eq3, x, y, z)

Note that x, y, and z are in not any particular order when defining the equation

variables; unlike the numerical method in MatLab using matrices with \ or inv.

However, in the output, the variables have to be in alphabetical order regardless how

they are written in the command. For example, if the output is written [z, x, y] rather

than [x, y, z], the result produced for z is actually x, that for x is actually y, and that

for y is actually z.

Page 48: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

37

The results are in symbolic and if needed, convert to numeric form:

𝑥𝑥 = −5

37,𝑦𝑦 =

4537

, 𝑧𝑧 =16574

iii) Solve simultaneous nonlinear equation:

𝑦𝑦 = 2𝑒𝑒𝑥𝑥𝑎𝑎𝑎𝑎𝑎𝑎 𝑦𝑦 = 3 − 𝑥𝑥2

In MatLab:

syms x y;

eq1 = ‘y = 2*exp(x)’, eq2 = ‘y = 3-x^2’,

[x, y] = solve (eq1, eq2, x, y)

exp1 = ‘y-2*exp(x)’; exp2 = ‘y-3+x^2’;

ezplot(exp1), hold on; ezplot(exp2); hold off

The result can be visualised through the usage of ‘ezplot’. Move everything to the

left-hand side of the equations since ‘ezplot’ plots expressions and not equations. The

approximate value of the solutions (intersections) can be obtained in Figure 23.

Figure 23: Plot of simultaneous equations.

Page 49: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

38

By clicking on the intersection, it will give the approximate values of x and y. For

equation with an infinite number of solutions, it is helpful to plot the equation and see

the solution approximately.

Page 50: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

39

3.2.3 Model Predictive Control Toolbox

MatLab has an application called MPC Designer under its Model Predictive Control Toolbox.

The application is capable of designing and simulating MPC controller for a process.

Example 3-9 is to understand further on how the usage of this toolbox for learning model

predictive controller, consider continuous heat transfer system (CHTS) as the case study.

Example 3-9: CHTS system with MPC controller.

The CHTS composed of one shell-tube heat exchanger [24]. Hot glycol circulates through the

shell and is assumed to be perfectly mixed. Then, heat flow between hot media and tube

increases the energy amount inside the tube, in which water flows. Figure 24 depicts such

heat transfer unit:

Figure 24: Continuous heat transfer system.

The objective is to control outlet water temperature (TE21) by manipulating water flowrate

through the TIC36 valve opening. Thus this is a 1x1 system. Both servo (outlet water

temperature setpoint change) and regulation problems (disturbance rejection) can be

performed using MPC. In an instant, the variables in a CHTS unit are as following:

• Manipulated variable (MV): water stream (valve - TIC36)

• Process variable (PV): outlet water temperature (TE21)

• Disturbance variable (DV): glycol temperature setpoint (TIC4)

Page 51: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

40

The transfer function model of the relationship between MV and PV is a first-order plus

delay type:

𝑇𝑇𝑇𝑇21(𝑠𝑠)𝑇𝑇𝑇𝑇𝑇𝑇36(𝑠𝑠)

= 0.71055.966𝑠𝑠+1

𝑒𝑒−5.64𝑠𝑠 (7)

In addition, the relationship between DV and PV is a third order plus delay and zero type:

𝑇𝑇𝑇𝑇21(𝑠𝑠)𝑇𝑇𝑇𝑇𝑇𝑇4(𝑠𝑠)

= 2.516𝑠𝑠+0.26053145𝑠𝑠3+426.6𝑠𝑠2+62.4𝑠𝑠+1

𝑒𝑒−24𝑠𝑠 (8)

Steady state values for TIC36 (opening percentage), TIC4 (°C), and TE21 (°C) are 75.02°,

60.0° and 16.45° respectively.

To use the toolbox in Simulink, first, implement equation (MV to PV) in a Simulink block

diagram to simulate step changes over the outlet water temperature (TE21). Next, connect the

MPC controller block that can be found under Model Predictive Control Toolbox tab in

Simulink Library Browser and start to design a controller. The final block diagram that will

be used in this example is demonstrated in Figure 25.

Figure 25: Simulink diagram without disturbance.

Before starting to design the controller, the system must be in its steady state; the initial and

final value of the TE21 set point is 0°. Double click on the MPC controller block to open

MPC controller block parameters as Figure 26. Uncheck the measured disturbance (md) as

Page 52: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

41

there is no disturbance involve at this stage. Apply changes and proceed to design the

controller by clicking on Design button.

Figure 26: MPC controller options window.

It will open MPC Designer window as shown in Figure 27 and click on MPC structure in

Figure 28 to define and linearise the plant process.

Page 53: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

42

Figure 27: MPC designer window.

Page 54: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

43

Figure 28: Window to design and linearise system for MPC controller.

The graph that displayed in the window (Figure 29) is the plant response towards a unit of set

point change using the internal plant. Now, the plant is ready for controller design.

Page 55: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

44

Figure 29: Plant response towards internal plant input step.

First, set the prediction and control horizons, which can be found in Tuning tab (Figure 30) as

one and check if a stable closed-loop response is obtained. Change the default MV constraint

to -75° as minimum and 25° as maximum (all variables within MPC are in deviation form,

thus -75° corresponds to zero opening and 25° corresponds to full opening).

Figure 30: Tuning tab.

After doing all these configurations, export the controller to MatLab’s workspace and

simulate with a TE21 set point change of 2°𝐶𝐶. The following closed-loop response is

obtained:

Page 56: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

45

Figure 31: System response.

It is clear in Figure 31 that the system became unstable with such parameters by being too

fast, and this situation can be fixed by sliding down the closed-loop performance towards

robust and state estimation towards slower, then study the response graph. Figure 32 shows

the response of the robust closed-loop performance and slowest state estimation.

Figure 32: System response to fixing closed-loop performance.

Page 57: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

46

By a simple change over the speed of the system, it was able to obtain a stable yet sluggish

closed-loop response. Next, this example will explore the effect of prediction and control

horizons on set point tracking problem. It is possible to tune the system response faster by

adjusting the value for prediction horizon accordingly. Try changing the prediction horizon to

5 export the controller again, and the response will look similar to Figure 33.

Figure 33: System response after changing prediction horizon to 5

According to graphs in Figure 33, a better response for TE21 set point change was obtained

by settling time around 120 seconds and no oscillations over both MV and PV; it is possible

to obtain a faster response yet oscillatory when the prediction horizon is set as 10 seconds or

higher values as shown in Figure 34.

Page 58: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

47

Figure 34: System response to prediction horizon of 10.

In addition, for a prediction horizon of 15 seconds shows in Figure 35.

Figure 35: System response to prediction horizon of 15.

One is encouraged to try different values for the prediction horizon and further explore

system’s stability by increasing prediction horizon (P).

Page 59: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

48

The control horizon M has a very slight effect in the system as observed in Figure 36, thus

making the prediction horizon the main parameter in this case. Of course, the performance

tuning slider has a significant relevance when tuning the controller for a certain desired

response, and one is welcomed to explore the effect of such parameter by moving down

(slower response or robust performance) and moving up (faster response or aggressive

performance) its slider. The effect of this slider will be better explored when simulating a

multivariable system.

Figure 36: Effect of control horizon in system setpoint tracking.

To include a disturbance model into CHTS, it is necessary to include equation (7) in page 40

during the simulation, which is the transfer function model relating TE21 (outlet temperature)

to the TIC4 set point (hot glycol temperature). Normally, the glycol temperature is kept

constant during the process by another heat transfer apparatus, which is connected to the heat

exchanger shell outlet, however in case of failure in this apparatus the glycol temperature,

may be altered, leading the system to a new steady state. Thus, the next part will simulate the

disturbance rejection in the system as the set point change over TIC4, again exploring the

effects of prediction and control horizons.

The simulation block diagram will look like Figure 37.

Page 60: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

49

Figure 37: Simulation block diagram.

Again, before designing the controller, the system must be primarily in its steady state; no

step in both setpoint. Set these configurations before exporting controller to MatLab

workspace:

• Leave sample time at 1s and set prediction and control horizon as 1°

• Set MV constraints -75° as minimum and 25° as maximum

The response towards disturbance set point change at five is as illustrated in Figure 38. Move

the performance-tuning designer until the response towards the set point change look like

Figure 40. Always export the controller configuration before simulating in Simulink. The

performance tuning bar configuration looks like in Figure 39. The response is stable yet

sluggish so from here, tuning the controller using prediction and control horizon is starting.

Page 61: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

50

Figure 38: System response.

Figure 39: System response after changing performance-tuning designer.

Figure 40: Performance tuning configuration.

Page 62: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

51

Figure 41 depicts the impact of prediction horizon when rejecting disturbance in the system;

values within a range of 50 seconds were tested, and results are showing in the said figure.

Figure 41: Effect of prediction horizon on disturbance rejection.

It is interesting that a prediction horizon larger than 20 seconds gives minimal improvements

to TE21 set point tracking. This kind of behaviour is common in MPC controllers true to both

prediction and control horizons. However these values are varying from system to system,

and one should look for these values in order to assess sensibility of a plant regarding

predictive parameters.

Let the prediction horizon remain at 20 seconds and start to test the effect of control horizon

when disturbance is introduced in CHTS. Within a range of 15, the control horizon’s

influence when a 5°C step change in TIC4 set point is detected is demonstrated in Figure 42.

Page 63: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

52

Figure 42: Effect of control horizon on disturbance rejection.

As previously mentioned, increasing the control horizon tunes the controller to be more

aggressive, thus the control moves assume more considerable magnitudes when dealing with

MVs, undergoing considerable overshoots and undershoots; a simple way to compensate such

variations is to introduce a smaller weight on the input by going to Weight tab and try rate

weight values less than 0.1. For example, one may choose a control horizon of two and test

rate weights of from 0.2 to 0.01 and check for oscillations in the closed-loop response as well

as is stability. Figure 43 depicts such sensitivity analysis:

Page 64: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

53

Figure 43: Effect of rate weight on disturbance rejection.

As can be noticed that, as the rate weight is decreased, the control moves (and so the

controlled variable behaviour) have a role of diminishing overshoots, yet the system becomes

more oscillatory until the point of turning completely unstable, which is the case for input

rate weight values less than 0.02.

The MPC block includes a feedforward controller add-on that measures disturbance variables

and takes corrective action before they make the process go to a new steady state. To activate

the feedforward control, tick the measured disturbance box in MPC controller window as in

Figure 44.

Page 65: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

54

Figure 44: MPC controller design window.

Then connect TIC4 signal to a new port that has available in MPC block as in Figure 45.

Page 66: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

55

Figure 45: Block diagram for simulation.

Next start to design the controller and start with prediction and horizon values as 1 to check

system stability. One is encouraged to explore the effect of prediction and control horizons

over a MPC/feedforward controller by introducing several distinct values for these

parameters, as well as the influence of different input rate weights in the system.

Page 67: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

56

3.2.4 Control System Toolbox

The Control System Toolbox provides a PID Tuner application that can design controllers

automatically. PID Tuner is suitable for system configuration to illustrate in Figure 46 and

Figure 47. Example 3-10 showing how PID Tuner is used.

Figure 46: Feedback control system configuration.

Figure 47: 2-DOF control system configuration.

Example 3-10: Tuning three tanks system using PID Tuner

First, create the plant model and open PID Tuner to design a PI controller for a first pass

design.

s = tf(‘s’);

gs = 6 / ((2*s + 1) * (4*s + 1) * (6*s + 1));

pidTuner(gs,’pi’)

The PID Tuner automatically designs a controller of the type specified (here, PI). The

controller is designed for a balance between performance (response time) and robustness

(stability margins). PID Tuner displays the closed-loop step response of the system with the

designed controller as in Figure 48.

Page 68: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

57

Figure 48: PID Tuner first response.

PID Tuner as shown in Figure 49 allows the user to examine reference tracking rise time and

settling time by right-clicking on the plot and select Characteristics.

Figure 49: Examine rise and settling time.

Page 69: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

58

Seen in Figure 49, the initial PI controller design provides a rise time of 9.01 s and settling

time of 40.5 s. Both results are slow and can get better easily by changing the response time.

This will improve the loop performance, and the response plot automatically updates with the

new design shown in Figure 50.

Figure 50: Response towards increasing response time.

The new response has an unacceptably long settling time. To achieve faster response speed,

the algorithm must sacrifice stability. For this purpose, the user can add derivative action to

controller gives PID Tuner more freedom to achieve adequate phase margin with a fast

response speed as shown in Figure 51.

Page 70: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

59

Figure 51: Response towards controller type change.

Parameters in Figure 52 shows the rise time and settling time are now fast and acceptable.

The user can use the Response Time slider to make further adjustments to the response.

Figure 52: Controller parameters.

Page 71: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

60

The controller parameters are tuned and can be used in controlling the plant. This application

can be used for determining controller type for a process or system with ease. The user does

not have to know the exact type of controller for a system in the first place and can just try

any type of controller. After that, they can change the controller type based on the response

given by the app. This application also helps in designing controller in term of tuning to

certain desired response. The user can easily slide the response time and transient behaviour

slider to tune the controller.

Other than the PID Tuner application, the Control System Toolbox has rlocfind and sgrid

function that can help during root locus analysis. rlocfind function is helping in determining

controller gain in root locus plot while sgrid function will showing the controller gain that is

true for defined damping coefficient and natural damping. Example 3-11 showing how to

perform a root locus analysis.

Example 3-11: Root locus analysis on a process.

Find controller gain for the process that will give 5% overshoot and rise time under 10

seconds.

s = tf(‘s’);

H = 6 / ((2*s + 1) * (4*s + 1) * (6*s + 1));

Rlocus(H)

axis([-2 0.5 -2 2])

zeta = 0.69;

Wn = 1.8;

sgrid(zeta,Wn)

[kd,poles] = rlocfind(H)

HCL = feedback(kd*H,1)

step(HCL)

Page 72: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

61

Figure 53: Root locus plot with rlocfind function.

Figure 53 shows all possible closed-loop pole locations for a pure proportional controller.

Based on design criteria (5% overshoot and 10 second rise time), to determine which part of

the locus is acceptable, MatLab provides the ‘sgrid’ command to plot lines of constant

damping ratio and natural frequency. For this problem, for an overshoot less than 5%, the

damping ratio (zeta) must be greater than 0.69 and to get a rise time of 1 second, the natural

frequency (Wn) must be greater than 1.8). In Figure 53, the two dotted lines at about a 45-

degree angle indicate pole locations with damping ratio, ζ = 0.7; in between these lines, the

poles have zeta larger than 0.7 and smaller than 0.7 when outside these lines. The semicircle

indicates pole locations with a natural frequency, Wn = 1.8 where as inside the circle, Wn is

less than 1.8 and outside the circle, Wn is larger than 1.8. Then use ‘rlocfind’ to choose poles

satisfying the design criteria.

The plot shown in Figure 54 is resulting from Kc selected at the point -0.1842 + 0.1115i and

Kc = 0.0391.

Page 73: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

62

Figure 54: Response plot from root locus analysis.

3.3 Conclusion

MatLab is an essential simulation application using its toolboxes. Apart from its Optimization

Toolbox, Symbolic Math Toolbox, Control System Toolbox, and System Identification

Toolbox that has been used in class, there are more functions that have not been used yet but

can be helping for learning and teaching Process Control Engineering at Murdoch University.

The functions and example have been presented in above section.

Page 74: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

63

4 LabVIEW LabVIEW or Laboratory Virtual Instrument Engineering Workbench is a graphical

programming environment developed by National Instrument. The program is designed by

connecting functional nodes via wires through which data will flow. This is different from

imperative programming languages where the program is built with text statements such as C

and C++. Student version system has the same functionality with the LabVIEW full

development system [25]. The difference is that the LabVIEW Student Edition comes with a

watermark on the front panel and block diagram [25]. The Student Edition is also available

for 6-month free as an evaluation version [26]. This offer available at National Instrument

website [26].

LabVIEW is mainly used during the second- and third-year of the Engineering course.

Experiments in Instrumentation and Control Engineering laboratory are running LabVIEW

shared variables. Other than the usage in class, LabVIEW is also running plants in the pilot

plant area. In the next section, it will be discussing the features of LabVIEW that has been

used in class.

4.1 LabVIEW for Teaching and Learning

LabVIEW is an interactive program development and execution system. As mentioned

above, LabVIEW is used to run process plants in the laboratory. The plants are based on a

water system and an air system. It is made possible by use of the shared variable in

LabVIEW. Figure 55 shows the block diagram of a program that is used to run the systems.

The analogue and digital input and output are read from the sensor place at the systems.

Page 75: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

64

Figure 55: Block diagram of the program to run process plants.

LabVIEW is a powerful real-time application where the user can use its built-in controller to

control systems in real-time. Using this, students are learning to control the systems using a

classical controller and advanced controller. Example 4-1 and Example 4-2 are showing how

the built-in controller is used for a system in the laboratory.

Example 4-1: Controlling air pressure using different PID parameters.

The process variable is air pressure in a tank and the manipulated variable is a valve. Figure

56 showing the configuration of the controller using built-in PID block in LabVIEW. The

block used is a PID Advanced block where controller behaviour can be on or off according to

an MV Manual button. If the button is true, then the controller is not working while if the

button is false, the controller will control the system to the set point. The MV Manual button

decides whether to control the system automatically or manually using valve opening.

Page 76: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

65

Figure 56: Block diagram of air system control.

The manual and auto Boolean indicator are to indicate the process state whether manual or

using automatic control. The controller parameters are defined in PID gains in front panel as

shown in Figure 57. The set point also can be changed from the front panel. The objective is

to compare different controller parameters using auto-tune parameter from the PID block and

the parameter that is obtained using another tuning method. By activating an auto-tune

button, the controller parameters will be visible.

Page 77: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

66

Figure 57: Front panel of air system control.

The result is visible in Figure 58. It is obvious that using an auto-tune parameter can achieve

set point faster than using the other parameters. The auto-tune parameter causes the process

to overshoot and longer settling time.

Figure 58: Result of using different controller parameters.

Page 78: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

67 Figure 59: Process response towards set point and disturbance change.

Page 79: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

68

Example 4-2: Controlling a system with cascade controller.

The water system has two sensors that measure flow and level. Using these sensors, a cascade

controller can be implemented to control the system. The primary loop is level, and the

secondary loop is flow. Using a PID controller block as the controller, the controller

performance is tested through set point and disturbance change. Figure 59 shows the response

of process using cascade controller. It is obvious that the process takes a long time to settle

down after disturbance change. This is showing that the controller needs to be tuned more so

that the disturbance change will not show much on the process variable.

4.2 Useful Features in LabVIEW

LabVIEW as installed at Murdoch University comes with two additional modules: Control

Design and Simulation Module and MathScript RT Module. These two modules can be

useful for teaching and learning and will be discussed below.

4.2.1 Control Design and Simulation Module

The Control Design and Simulation Module by LabVIEW allows users to implement both

model-based and measurement-based design. The module integrating measurements with a

design for system identification, model calibration, and model validation. Then, the model

can be deployed to a real-time process for control implementation. To explore using the

module, Example 4.3 is implementing a process with disturbance to control with PID

controller.

Example 4.3: Process simulation with Control Design and Simulation Module

The process transfer function is 𝑔𝑔 = 250𝑠𝑠2+15𝑠𝑠+1

(9) and the system has disturbance of 𝑔𝑔𝑑𝑑 =

250𝑠𝑠2+15𝑠𝑠+1

(10). The controller is a PID and the system has been tested for the regulatory

problem and servo problem. Figure 60 shows the block diagram configuration for the

problem. At the left top of the loop, the time of simulation can be change and for this loop,

the time is 100 of iteration. The set point and disturbance can be changed during the

simulation is running. The collector block is to collect data from the simulation and save

them in an Excel file.

Page 80: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

69

Figure 60: Block diagram of LabVIEW simulation.

Figure 61: Front panel of LabVIEW simulation.

Figure 61 shows result from the simulation run. In the graph, the set point changes from 0 to

1 and then change again from 1 to 5. After some time, the disturbance is change from 0 to 3

causing the process to overshoot for a while before settling back to set point. The controller

parameters also can be changed at the front panel.

4.2.2 MathScript RT Module

The user can use this text-based environment to write functions and scripts. Processing the

scripts are using LabVIEW MathScript in the LabVIEW MathScript Window or a MathScript

Node. Unfortunately, National Instruments has removed this application during LabVIEW’s

2009 update. After the update, the user had to buy the MathScript RT Module separately.

LabVIEW has a MatLab script node that calls the MatLab software to execute scripts. This

ability needs MatLab to be at version 6.5 or later and the MatLab version installed in the

University is 9.1.

Page 81: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

70

The script can be written in MatLab environment and then calling the .m file using the

MatLab script node in LabVIEW or writing the script directly in the node. One fallback when

writing script directly in the node is LabVIEW does not point out any syntax error and

consume the error together when compiling the script. This is resulting in LabVIEW error

where the simulation cannot be running.

The MathScript RT Module is generally compatible with .m file syntax so, user can save time

by reusing existing .m files together with LabVIEW code for acquisition, analysis or data

presentation [27]. The module has built-in LabVIEW GUI (Graphical User Interface) that is

providing libraries of engineering and scientific controls, such as knobs, dial, and switches

[27]. User can take advantage from this feature to add user interface and controls to the .m

files [27]. In addition, user can deploy .m files code to real-time applications without any

code translations [27].

Example 4-3 is replicating Example 3-11 of finding controller gain using rlocfind function

but with different process and objective.

Example 4-3: Determining controller gain using rlocfind function in LabVIEW.

The process is as defined in Figure 62 and the objective is the response has 5% overshoot and

rise time of 1 second. The syntax used is the same as syntax in the MatLab environment. The

last line of the script is to align the data to be displayed in columns instead of in rows.

LabVIEW MatLab Script node does not export data in the form of rows; hence, it is

important to check the data before displaying them.

Figure 62: Block diagram of LabVIEW MatLab script simulation.

Page 82: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

71

Figure 63 showing root locus diagram after determining the controller gain. This is the same

window that appears if the script is running in its native environment, MatLab. For this

example, the controller gain is 360.891, and the poles are as seen in Figure 64. The response

is not satisfying the objective; the controller gain needs to be chosen again.

Figure 63: Root locus diagram using MatLab Script in LabVIEW.

Page 83: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

72

Figure 64: Front panel of LabVIEW MatLab Script simulation.

4.3 Conclusion

LabVIEW is usually used in the laboratory to run experiments and collect data. LabVIEW

has built-in controller blocks that can be used to control processes in real-time. Besides its

real-time properties, LabVIEW also has simulation module that is Control Design and

Simulation Module. Various process and disturbance can be simulated thanks to this module.

LabVIEW also can be integrated with MatLab using MatLab Script node in LabVIEW. It is

using the same syntax as writing script in MatLab environment.

Page 84: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

73

5 TIA Portal Totally Integrated Automation Portal or TIA Portal is a one-stop-centre for programming

across different devices of Siemens such as Step 7 and WinCC. TIA Portal is a home to

configure, program, test, and diagnose the controllers. Students are learning programming

basic through Easysoft by Moeller (Eaton) which installed in easy 500 Programmable Relays

as Figure 65. The language is ladder logic, and the student is learning to program problems

using the programmable relays. After that, students are programming Siemens Step 7

controller using TIA Portal.

Figure 65: Easy 500 Programmable Relay.

Siemens’ S7-300 Programmable Logic Controller (PLC) [28] is available in the Industrial

Control System Engineering laboratory for teaching and learning and mainly has been used

during ENG311 (PLC Systems). The S7-300 controller falls under advanced controller type

together with Siemens’ S7-400 PLC [29] and Siemens’ S7-1500 PLC [30]. Advanced

controller by Siemens are for low- and mid-performance ranges. It is a space-saving compact

controller featuring a modular design. The controller system is expandable according to

user’s needs using a wide range of modules. S7-300 is versatile for networking, and their

distributed structure is simple to implement. It is also easy to handle due to the uncomplicated

design without a fan. These characteristics of S7-300 make it suitable for class usage and unit

teaching.

As mentioned above, TIA Portal is integrating with SIMATIC controllers to allow consistent

storage of data, smart library concept, and a uniform operating philosophy. The system

integration permits diagnostics with efficient fault analysis. Troubleshooting with TIA Portal

cuts commissioning times and minimises downtimes in production. Integration of TIA Portal

providing technology functions for counting and measuring tasks, closed-loop control and

motion control into all SIMATIC controllers. The next section is discussing the usage of TIA

Portal in class for teaching and learning Process Control Engineering at Murdoch University.

Page 85: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

74

5.1 TIA Portal for Teaching and Learning

The usage of S7-300 in class is firstly for its digital input and output to automate various

condition of the digital process. Lighting up lights in a certain sequence is one of the essential

problems. Then, exploring its analogue input and output capabilities through simulation of

controlling a process and connecting two or more devices in TIA Portal to build a system of

master-slave devices and a Human Machine Interface (HMI) device. Lastly, learning the state

machine approach as discussed in section 2.2.2 to tackle complicated design process.

5.1.1 PID Control

The S7-300 provides PID control block for continuous process and allows for switching

between manual control and automatic control. The block is not limited to PID controller

only; the user can choose the elements of the controller to suit usage. An optimization option

is not available in S7-300; it is only available for S7-1200 and S7-1500. Example 5-1 shows a

process simulation being controlled over two S7-300 devices.

Example 5-1: Controlling a simulated process using S7-300

The process simulation is in an S7-300 controller while the PID block that will be controlling

the process is in another S7-300 controller. The system has been defined in the TIA Portal.

Figure 66 showing the process build from difference equation. Building the equation is

making use of the arithmetic blocks such as multiplication, addition, and subtraction blocks.

This equation is a function block so that the block can be called from the main loop.

Page 86: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

75

Figure 66: Ladder diagram of the simulation process.

Figure 67: Ladder diagram of simulation disturbance to process.

Figure 67 illustrates disturbance equation that is built on the same basis as the process

equation. Making use of arithmetic blocks and is in a function to be called later. Use OB35 or

cyclic interrupt block to run the process, and disturbance simulation as the block is allowing

the user to change the loop time. Figure 68 shows the process and disturbance block in the

OB35 block. The move block is to move error values, and step input is from potentiometer as

the analogue input. The X_PUT block is to send the process value to the controller block at

the address of 2.

Page 87: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

76

Figure 68: Ladder diagram of process and disturbance simulation.

As the controller is receiving process value from the process and disturbance simulation

blocks, the controller sending the value of controller to the process using the same block,

X_PUT block at address 3. Figure 66 shows the PID controller block as well as the X_PUT

block. This ladder logic is also in OB35 and running at the same time. The response graph is

visible on the HMI screen. The set point value and disturbance value can come from

potentiometer or from control on the HMI screen.

Page 88: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

77

Figure 69: Ladder diagram of controller block.

5.1.2 State Machine

A state machine is an approach for programming. State machines cut down programming

time by minimising code size. It is easier to troubleshoot as the code is in smaller chunks and

the implementation of the code is in a systematic way. Example 5-2 is about implementing a

state machine approach to run a pneumatic machine.

Example 5-2: State machine implementation for Gantry apparatus

The machine consists of four pneumatic cylinders that will move a pneumatic suction cup

left, right, up and down. The pneumatic elements are aligning themselves at a horizontal rod.

The objective of the machine is to sort and place disks according to their heights. There are

three different heights; one height disks, two disks height, and three disks height. A switch

sensor is installed on the suction cup that is indicating the cup has reached disks. The disks

initially are stacked on each other at a place on the machine, and this place is unknown for

the machine.

Page 89: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

78

The programs first need to find the stack before bringing the disks to a designated place

according to its height. Figure 70 shows a fragment of the state machine diagram. S2.4

(SORT AND PLACE H0) is specifically to bring a disk from its original place, H0 to its

sorting place that is H1. After the disk’s height is known, one-height disk is placed at H2,

two-height disk is placed at H3, and three-height disk is placed at H4.

Figure 70: State machine for Gantry apparatus.

Page 90: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

79

Figure 71: Ladder diagram for TAKE OBJECT state.

Each state results in two networks of ladder logic. As an example, the first state is TAKE

OBJECT state; Figure 71 is showing the ladder logic for the state. The first network is for the

action of the state. For this state, the actions are to start the suction cup, stopping the down

pneumatic cylinder, and this happens for two seconds. The second network is a transition

network where all the conditions to enter and exit a state are defined. The conditions to enter

the stage are either RETURN DOWN H0 state, and suction cup switch are on, or both

S23_Down state and suction cup switch are on. The condition to exit the state is when

OBJECT UP H0 state is activated.

5.2 Conclusion

After reviewing the Siemens S7-300 and TIA Portal usage in class, it is obvious that the

features of S7-300 has been explored and used for teaching and learning Process Control

Engineering at Murdoch University. The features has been utilized to its fullest.

Page 91: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

80

6 Aspen The Advanced System for Process Engineering (Aspen) is a process simulation software

package that is widely used in industry. AspenTech release Aspen packages as a solution for

many engineering problems. These are briefly the programs and their capabilities:

• Aspen Basic Engineering is an industry-leading process engineering solution that enables

global organisations to seamlessly and accurately tie together all aspects of a front-end

design and basic engineering. It integrates all major process simulation programs,

equipment design programs, cost estimation, and in-house design tools [31].

• Aspen Economic Evaluation allows companies to rapidly and confidently evaluate capital

investment projects early in the design process, understand the economic implications of

engineering decisions, and effectively manage the project [32].

• Aspen Exchanger Design and Rating (EDR) provides a range of heat exchanger design

and rating software which integrate with Aspen Plus and Aspen HYSYS process

simulation to enable process engineers, and thermal and mechanical equipment specialists

to collaborate effectively [33].

• Aspen HYSYS is a workflow-oriented process simulation software for the optimisation of

conceptual design and operations and the most comprehensive solution for modelling the

gas plant [34].

• Aspen Plus is a steady state simulator, predicts process behaviour using engineering

relationships such as mass and energy balances, phase and chemical equilibrium, and

reaction kinetics. With reliable physical properties, thermodynamics data, realistic

operating conditions, and rigorous equipment models, engineers can simulate actual plant

behaviour [35].

• Aspen Properties is to provide physical property data, methods, models, and algorithms

for user to perform calculations [36]. Other than that, Aspen Properties models such as

thermophysical and transport property estimation, phase-equilibrium calculations, and

solubility modeling from experimental data can be accessed through the Aspen Properties

Add-In for Microsoft Excel [36].

During ENG308 (Advanced Process Engineering), Aspen Plus is used for process simulation,

sensitivity analysis, and optimisation. Other than that, Aspen Plus is capable of data

Page 92: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

81

regression that is fitting data to existing models in Aspen. Figure 72 shows a system

configuration in Aspen Plus. The system is to separate two components from the feed stream

composition. Aspen Plus can set the composition of the desired element as objective and

eventually manipulate a variable to achieve the objective.

Figure 72: Aspen Plus model.

Aspen Plus Dynamic is a modelling tool that is dynamic for plant operations and process

design [37]. It can help users to study and understand the dynamics of real plant operations.

To get the model for Aspen Plus Dynamic, the model is exported from Aspen Plus steady-

state model. To export the model from Aspen Plus, a few data are required to calculate vessel

geometry that is required for vessel volume, initial vessel filling that is to calculate starting

liquid holdup, process heat-transfer method, and equipment heat transfer options whether

equipment heat capacity or environmental heat transfer.

The usage of Aspen Plus Dynamic in class should be increasing since Aspen Plus model

properties are steady and not changing over time while Aspen Plus Dynamic has the ability to

model the varying behaviour of a system that is changing over time. This will give more

insight into how a real process in the industry works. Other than that, Aspen plus Dynamic

can be used to analyse the dynamic response of a complex system. Figure 73 showing the

same system with Figure 72 exported to Aspen Plus Dynamic. The controller can be added to

the system and Aspen Plus Dynamic can only handle classical controller that is PID

controller. To overcome this limitation, AspenTech decided to integrate with MatLab to use

MatLab’s advanced controller package such as MPC package. By doing this, Aspen Plus

Dynamic model becomes the nonlinear model in MatLab and using MPC Designer

application; controller output value is sent to Aspen environment to see the dynamic response

of the system.

Page 93: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

82

Figure 73: Aspen Plus Dynamic model.

6.1 Conclusion

Aspen Plus has been used in class for simulation of chemical processes. The features is

Aspen has been explored and the used features is comprehensive in teaching and learning in

the University. Recommendation can be made to focus more on the Aspen Plus Dynamic for

teaching and learning in the University since in the Aspen Plus Dynamic, the controller can

be added and the dynamic response of the system can be observed. Focuses on the Aspen

Plus Dynamic can help students to experiment and analyse behaviour of the controller

implemented on the dynamic behaviour of the process.

Page 94: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

83

7 Conclusion Microsoft Excel has always used for its solver add-ins and data logging ability. Through this

project, Excel has bigger potential than that which is using Visual Basic for Application as a

simulation tool. The simulation can help when there are not simulation application licence

available and to introduce the student to controller behaviour on a process. MatLab is a

powerful simulation tool, and it was found that curve fitting could be done in MatLab instead

of using System Identification Toolbox. The usage of the functions can greatly reduce time

compared to curve fitting using Excel solver add-ins. The MPC Designer app is helping to

design and analyse controller performance on a system easily. It is easy to use and to

understand. An additional function for root locus analysis will be a great help to determine

precise controller gain.

LabVIEW is always used for its real-time application, but LabVIEW also provides Control

Design and Simulation Module to simulate processes from transfer functions. On top of that,

users can programs with the same syntax as MatLab script as LabVIEW has integrating

MatLab script into its environment. TIA Portal is used for PID controller and implementing

state machine. Aspen Plus has been used in class for simulating the chemical process and for

sensitivity analysis as well as optimisation. On top of that, Aspen Plus Dynamic should be

used more for the dynamic behaviour of the system and designing a classical controller for

the process. Integrating Aspen Plus Dynamic with MatLab advanced controller features is

expanding the Aspen model so that the process can be controlled with an advanced controller.

Concisely, this project investigated features from the software packages and gave

recommendations on which features should be included in teaching and learning. From this

project, I can review my knowledge towards the software packages and brush my practical

ability to use the software packages. For lecturers who read this project, they can use the

recommendation from this project to make teaching easier for them. As for the students, they

can benefits from this project by using the timesaving functions for the learning process.

Page 95: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

84

8 Recommendation Recommendations can be made for further work are as follows:

1. Explores state transition features in the MatLab software. In the MatLab, there is State

Transition Tables (STT) in Stateflow, which is a new feature in the MatLab version

R2012b [38]. Examples that is practical for teaching, and learning in the University

can be presented.

2. Presents more example for using VBA in Excel as this is relatively new feature that

can be used for teaching and learning in the University. The example can be to

simulate more complicated control strategy than PID controller that presents in this

thesis.

3. Explores features in TIA Portal used in ENG447 (Industrial Computer Systems

Design) and ENG448 (SCADA Systems Architecture) as the thesis is written without

the knowledge of these two units. These two units uses TIA Portal comprehensively

and the features needs to be evaluated based on the usage in the University.

Page 96: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

85

9 References [1] “Microsoft Office 97 Released to Manufacturing,” Microsoft, 19 November 1996.

[Online]. Available: https://news.microsoft.com/1996/11/19/microsoft-office-97-

released-to-manufacturing/. [Accessed 25 August 2017].

[2] “Experion HS,” Honeywell, 2018. [Online]. Available:

https://www.honeywellprocess.com/en-US/explore/products/control-monitoring-and-

safety-systems/scalable-control-solutions/Pages/experion-hs.aspx. [Accessed 4 June

2018].

[3] “Define and solve a problem by using Solver,” Microsoft, 2017. [Online]. Available:

https://support.office.com/en-us/article/Define-and-solve-a-problem-by-using-Solver-

9ed03c9f-7caf-4d99-bb6d-078f96d1652c. [Accessed 25 August 2017].

[4] “Using Excel's Solver to minimize the sum of squared error for a mathematical model,”

Excelets, 2017. [Online]. Available:

http://academic.pgcc.edu/~ssinex/excelets/Solver.pdf. [Accessed 25 August 2017].

[5] “Product Information Note: Experion HS Overview,” Honeywell, March 2015. [Online].

Available: https://www.honeywellprocess.com/library/marketing/notes/Experion-HS-

Overview-PIN.pdf. [Accessed 25 August 2017].

[6] TheDataLabs, “Why Use VBA in Excel?,” Youtube, 19 August 2017. [Online].

Available: https://www.youtube.com/watch?v=GoKstMogerk. [Accessed 25 August

2017].

[7] B. Chinowsky, “Getting Started with VBA in Excel 2010,” Office, 11 December 2009.

[Online]. Available: https://msdn.microsoft.com/en-

us/library/office/ee814737(v=office.14).aspx. [Accessed 25 August 2017].

[8] E. Clearly, “Excel Tank Reactor,” Youtube, 4 September 2012. [Online]. Available:

https://www.youtube.com/watch?v=wxItTzXz22M. [Accessed 25 August 2017].

[9] “Introduction to OMG's Unified Modeling Language (UML),” Unified Modeling

Language, July 2005. [Online]. Available: http://www.uml.org/what-is-uml.htm.

[Accessed 5 June 2018].

Page 97: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

86

[10] “What is Unified Modeling Language (UML)?,” Visual Paradigm, 2018. [Online].

Available: https://www.visual-paradigm.com/guide/uml-unified-modeling-

language/what-is-uml/. [Accessed 5 June 2018].

[11] M. Page-Jones, Fundamentals of Obejct-Oriented Design in UML, Boston, United

States: Addison-Wesley Professional, 1999.

[12] H. Wallace, “Using State Machines In Your Designs,” Atlantic Quality Design, 2003.

[Online]. Available: http://aqdi.com/articles/using-state-machines-in-your-designs-3/.

[Accessed 25 August 2017].

[13] I. Bansal, “ArgoUML: Free and Opeb Source UML Modelling Tool,” ilovefreesoftware,

14 October 2009. [Online]. Available:

http://www.ilovefreesoftware.com/14/windows/argouml-free-and-open-source-uml-

modelling-tool.html. [Accessed 25 August 2017].

[14] “MATLAB,” MathWorks, 2017. [Online]. Available:

https://au.mathworks.com/products/matlab.html. [Accessed 30 August 2017].

[15] “MATLAB Student,” MathWorks, 2017. [Online]. Available:

https://au.mathworks.com/academia/student_version.html. [Accessed 30 August 2017].

[16] “MATLAB Documentation,” The MathWorks, Murdoch, 2017.

[17] “Optimization Toolbox,” The MathWorks, Murdoch, 2017.

[18] “Optimization Toolbox,” Northwestern, 2004. [Online]. Available:

http://www.ece.northwestern.edu/local-apps/matlabhelp/toolbox/optim/fminunc.html.

[Accessed 25 August 2017].

[19] B. A. Ogunnaike and W. H. Ray, Process Dynamics, Modeling, and Control, Oxford,

New York: Oxford University Press, 1994.

[20] “Control System Toolbox,” The MathWorks, Murdoch, 2017.

[21] “System Identification Toolbox,” The MathWorks, Murdoch, 2017.

[22] Gonzo, “Understanding Poles and Zeros,” October 2004. [Online]. Available:

Page 98: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

87

http://web.mit.edu/2.14/www/Handouts/PoleZero.pdf. [Accessed 5 June 2018].

[23] K. Addams, “Example of Integrating Element,” SlidePlayer, 2015. [Online]. Available:

http://slideplayer.com/slide/2706264/. [Accessed 5 June 2018].

[24] J. E. Edwards, “Design and Rating Shell and Tube Heat Exchangers,” 29 August 2008.

[Online]. Available:

https://www.chemstations.com/content/documents/Technical_Articles/shell.pdf.

[Accessed 25 August 2017].

[25] “NI LabVIEW Student Edition,” Studica Inc, 2017. [Online]. Available:

http://www.studica.com/National-Instruments-students-ni-labview-mydaq/labview-

student-edition.html. [Accessed 13 October 2017].

[26] “Free 6-Month Evaluation of LabVIEW Student Edition for at-home training,” National

Instrument, 27 January 2017. [Online]. Available: https://forums.ni.com/t5/Projects-

Products/Free-6-Month-Evaluation-of-LabVIEW-Student-Edition-for-at-home/ta-

p/3497362. [Accessed 15 October 2017].

[27] “LabVIEW MathScript Module,” National Instruments, 2018. [Online]. Available:

http://www.ni.com/labview/mathscript/. [Accessed 5 June 2018].

[28] “S7-300 Automation System: Module Data,” Siemens AG, Nurnberg, 2017.

[29] “SIMATIC S7-400 advanced controller,” Siemens AG, Karlsruhe, Germany, 2017.

[30] “S7-1500/S7-1500F Technical Data,” 2015. [Online]. Available:

https://w3.siemens.com/mcms/programmable-logic-controller/en/advanced-

controller/s7-1500/cpu/Documents/s7-1500_techn_data_cpu_en.pdf. [Accessed 5 June

2018].

[31] “Aspen Basic Engineering,” aspentech, 2017. [Online]. Available:

https://www.aspentech.com/en/products/pages/aspen-basic-engineering. [Accessed 8

November 2017].

[32] “Aspen Economic Evaluation,” aspentech, 2017. [Online]. Available:

http://www.aspentech.com/products/aspen-economic-eval.aspx. [Accessed 8 November

Page 99: ENG 470 - Murdoch University · 2018. 9. 7. · toolboxes, test and measurement toolboxes, and database access and reporting toolboxes [9]. MatLab and add-on toolboxes are integrated

88

2017].

[33] “Aspen Exchanger Design & Rating,” aspentech, 2017. [Online]. Available:

http://www.aspentech.com/products/aspen-edr.aspx. [Accessed 8 November 2017].

[34] “Aspen HYSYS,” aspentech, 2017. [Online]. Available:

http://www.aspentech.com/products/aspen-hysys/. [Accessed 8 November 2017].

[35] “Aspen Plus,” aspentech, 2017. [Online]. Available:

http://www.aspentech.com/products/engineering/aspen-plus/. [Accessed 8 November

2017].

[36] “Aspen Properties,” aspentech, 2018. [Online]. Available:

https://www.aspentech.com/en/products/pages/aspen-properties. [Accessed 6 June

2018].

[37] “Aspen Plus Dynamics,” aspentech, 2017. [Online]. Available:

https://www.aspentech.com/en/products/engineering/aspen-plus-dynamics. [Accessed 8

November 2017].

[38] “Diagnostics in State Transition Tables,” MathWorks, 2018. [Online]. Available:

https://au.mathworks.com/help/stateflow/examples/diagnostics-in-state-transition-

tables.html. [Accessed 7 June 2018].