0% found this document useful (0 votes)
8 views85 pages

Applications of Matlab in Science and Engineering Tadeusz Michalowski PDF Download

The document discusses the book 'Applications of MATLAB in Science and Engineering' edited by Tadeusz Michałowski, which presents various applications of MATLAB across multiple scientific and engineering disciplines. It includes chapters on topics such as biological data interpretation, electrical engineering, and control systems, showcasing MATLAB's versatility in modeling and simulation. The book is available as an open-access resource, allowing users to explore MATLAB's capabilities in a wide range of applications.

Uploaded by

eshaqranesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views85 pages

Applications of Matlab in Science and Engineering Tadeusz Michalowski PDF Download

The document discusses the book 'Applications of MATLAB in Science and Engineering' edited by Tadeusz Michałowski, which presents various applications of MATLAB across multiple scientific and engineering disciplines. It includes chapters on topics such as biological data interpretation, electrical engineering, and control systems, showcasing MATLAB's versatility in modeling and simulation. The book is available as an open-access resource, allowing users to explore MATLAB's capabilities in a wide range of applications.

Uploaded by

eshaqranesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

Applications Of Matlab In Science And

Engineering Tadeusz Michalowski download

https://ebookbell.com/product/applications-of-matlab-in-science-
and-engineering-tadeusz-michalowski-2403210

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Nonlinear Optimization In Electrical Engineering With Applications In


Matlab Mohamed Bakr

https://ebookbell.com/product/nonlinear-optimization-in-electrical-
engineering-with-applications-in-matlab-mohamed-bakr-4419370

Processing Of Hyperspectral Medical Images Applications In Dermatology


Using Matlab 1st Edition Robert Koprowski

https://ebookbell.com/product/processing-of-hyperspectral-medical-
images-applications-in-dermatology-using-matlab-1st-edition-robert-
koprowski-5737244

Application Of Numerical Methods In Engineering Problems Using Matlab


M S H Alfurjan M Rabani Bidgoli Reza Kolahchi A Farrokhian M R Bayati

https://ebookbell.com/product/application-of-numerical-methods-in-
engineering-problems-using-matlab-m-s-h-alfurjan-m-rabani-bidgoli-
reza-kolahchi-a-farrokhian-m-r-bayati-49116406

Dynamics Of Structures With Matlab Applications Ashok K Jain

https://ebookbell.com/product/dynamics-of-structures-with-matlab-
applications-ashok-k-jain-10881364
Handbook Of Food Process Modeling And Statistical Quality Control With
Extensive Matlab Applications 2nd Ed Mustafa Ozilgen

https://ebookbell.com/product/handbook-of-food-process-modeling-and-
statistical-quality-control-with-extensive-matlab-applications-2nd-ed-
mustafa-ozilgen-4182256

Fundamentals Of Image Audio And Video Processing Using Matlab With


Applications To Pattern Recognition Ranjan Parekh

https://ebookbell.com/product/fundamentals-of-image-audio-and-video-
processing-using-matlab-with-applications-to-pattern-recognition-
ranjan-parekh-23432828

Practical Design And Application Of Model Predictive Control Mpc For


Matlabr And Simulinkr Users Nassim Khaled Bibin Pattel

https://ebookbell.com/product/practical-design-and-application-of-
model-predictive-control-mpc-for-matlabr-and-simulinkr-users-nassim-
khaled-bibin-pattel-48984036

Structural Dynamics Of Earthquake Engineering Theory And Application


Using Mathematica And Matlab 1st Edition S Rajasekaran

https://ebookbell.com/product/structural-dynamics-of-earthquake-
engineering-theory-and-application-using-mathematica-and-matlab-1st-
edition-s-rajasekaran-2485412

Structural Dynamics Of Earthquake Engineering Theory And Application


Using Mathematica And Matlab Sekaran Rajasekaran

https://ebookbell.com/product/structural-dynamics-of-earthquake-
engineering-theory-and-application-using-mathematica-and-matlab-
sekaran-rajasekaran-4344498
APPLICATIONS OF
MATLAB IN SCIENCE
AND ENGINEERING
Edited by Tadeusz Michałowski
Applications of MATLAB in Science and Engineering
Edited by Tadeusz Michałowski

Published by InTech
Janeza Trdine 9, 51000 Rijeka, Croatia

Copyright © 2011 InTech


All chapters are Open Access articles distributed under the Creative Commons
Non Commercial Share Alike Attribution 3.0 license, which permits to copy,
distribute, transmit, and adapt the work in any medium, so long as the original
work is properly cited. After this work has been published by InTech, authors
have the right to republish it, in whole or part, in any publication of which they
are the author, and to make other personal use of the work. Any republication,
referencing or personal use of the work must explicitly identify the original source.

Statements and opinions expressed in the chapters are these of the individual contributors
and not necessarily those of the editors or publisher. No responsibility is accepted
for the accuracy of information contained in the published articles. The publisher
assumes no responsibility for any damage or injury to persons or property arising out
of the use of any materials, instructions, methods or ideas contained in the book.

Publishing Process Manager Davor Vidic


Technical Editor Teodora Smiljanic
Cover Designer Jan Hyrat
Image Copyright Ali Mazraie Shadi, 2010. Used under license from Shutterstock.com
®
MATLAB (Matlab logo and Simulink) is a registered trademark of The MathWorks, Inc.

First published August, 2011


Printed in Croatia

A free online edition of this book is available at www.intechopen.com


Additional hard copies can be obtained from [email protected]

Applications of MATLAB in Science and Engineering, Edited by Tadeusz Michałowski


p. cm.
ISBN 978-953-307-708-6
free online editions of InTech
Books and Journals can be found at
www.intechopen.com
Contents

Preface IX

Chapter 1 Application of GATES and


MATLAB for Resolution of Equilibrium,
Metastable and Non-Equilibrium Electrolytic Systems 1
Tadeusz Michałowski

Chapter 2 From Discrete to Continuous Gene


Regulation Models – A Tutorial Using the Odefy Toolbox 35
Jan Krumsiek, Dominik M. Wittmann and Fabian J. Theis

Chapter 3 Systematic Interpretation of


High-Throughput Biological Data 61
Kurt Fellenberg

Chapter 4 Hysteresis Voltage


Control of DVR Based on Unipolar PWM 83
Hadi Ezoji, Abdol Reza Sheikhaleslami, Masood Shahverdi,
Arash Ghatresamani and Mohamad Hosein Alborzi

Chapter 5 Modeling & Simulation of Hysteresis


Current Controlled Inverters Using MATLAB 97
Ahmad Albanna

Chapter 6 84 Pulse Converter,


Design and Simulations with Matlab 123
Antonio Valderrábano González,
Juan Manuel Ramirez and Francisco Beltrán Carbajal

Chapter 7 Available Transfer Capability Calculation 143


Mojgan Hojabri and Hashim Hizam

Chapter 8 Multiuser Systems


Implementations in Fading Environments 165
Ioana Marcu, Simona Halunga,
Octavian Fratu and Dragos Vizireanu
VI Contents

Chapter 9 System-Level Simulations


Investigating the System-on-Chip
Implementation of 60-GHz Transceivers for
Wireless Uncompressed HD Video Communications 181
Domenico Pepe and Domenico Zito

Chapter 10 Low-Noise, Low-Sensitivity Active-RC


Allpole Filters Using MATLAB Optimization 197
Dražen Jurišić

Chapter 11 On Design of CIC Decimators 225


Gordana Jovanovic Dolecek and Javier Diaz-Carmona

Chapter 12 Fractional Delay Digital Filters 247


Javier Diaz-Carmona and Gordana Jovanovic Dolecek

Chapter 13 On Fractional-Order PID Design 273


Mohammad Reza Faieghi and Abbas Nemati

Chapter 14 Design Methodology with System


Generator in Simulink of a FHSS Transceiver on FPGA 293
Santiago T. Pérez, Carlos M. Travieso,
Jesús B. Alonso and José L. Vásquez

Chapter 15 Modeling and Control of


Mechanical Systems in Simulink of Matlab 317
Leghmizi Said and Boumediene Latifa

Chapter 16 Generalized PI Control of


Active Vehicle Suspension Systems with MATLAB 335
Esteban Chávez Conde, Francisco Beltrán Carbajal
Antonio Valderrábano González and Ramón Chávez Bracamontes

Chapter 17 Control Laws Design and Validation of Autonomous


Mobile Robot Off-Road Trajectory Tracking Based
on ADAMS and MATLAB Co-Simulation Platform 353
Yang. Yi, Fu. Mengyin, Zhu. Hao and Xiong. Guangming

Chapter 18 A Virtual Tool for Computer Aided


Analysis of Spur Gears with Asymmetric Teeth 371
Fatih Karpat, Stephen Ekwaro-Osire and Esin Karpat

Chapter 19 The Use of Matlab in Advanced


Design of Bonded and Welded Joints 387
Paolo Ferro

Chapter 20 ISPN: Modeling Stochastic with Input


Uncertainties Using an Interval-Based Approach 409
Sérgio Galdino and Paulo Maciel
Contents VII

Chapter 21 Classifiers of
Digital Modulation Based on the
Algorithm of Fast Walsh-Hadamard
Transform and Karhunen-Loeve Transform 433
Richterova Marie and Mazalek Antonin

Chapter 22 Novel Variance Based Spatial Domain


Watermarking and Its Comparison with
DIMA and DCT Based Watermarking Counterparts 451
Rajesh Kannan Megalingam, Mithun Muralidharan Nair,
Rahul Srikumar, Venkat Krishnan Balasubramanian
and Vineeth Sarma Venugopala Sarma

Chapter 23 Quantitative Analysis of Iodine Thyroid and


Gastrointestinal Tract Biokinetic Models Using MATLAB 469
Chia Chun Hsu, Chien Yi Chen and Lung Kwang Pan

Chapter 24 Modelling and


Simulation of pH Neutralization Plant
Including the Process Instrumentation 485
Claudio Garcia and Rodrigo Juliani Correa De Godoy
Preface

MATLAB (Matrix Laboratory) is a matrix-oriented tool for mathematical


programming, applied for numerical computation and simulation purposes. Together
with its dynamic simulation toolbox Simulink, as a graphical environment for the
simulation of dynamic systems, it has become a very powerful tool suitable for a large
number of applications in many areas of research and development. These areas
include mathematics, physics, chemistry and chemical engineering, mechanical
engineering, biological and medical sciences, communication and control systems,
digital signal, image and video processing, system modeling and simulation, statistics
and probability. Generally, MATLAB is perceived as a high-level language and
interactive environment that enables to perform computational tasks faster than with
traditional programming languages, such as C, C++, and Fortran.

Simulink is integrated with MATLAB as MATLAB/Simulink, i.e., data can be easily


transferred between the programs. MATLAB is supported in Unix, Macintosh, and
Windows environments. This way, Simulink is an interactive environment for
modeling, analyzing, and simulating a wide variety of dynamic systems.

The use of MATLAB is actually increasing in a large number of fields, by combining


with other toolboxes, e.g., optimization toolbox, identification toolbox, and others. The
MathWorks Inc. periodically updates MATLAB and Simulink, providing more and
more advanced software. MATLAB handles numerical calculations and high-quality
graphics, provides a convenient interface to built-in state-of-the-art subroutine
libraries, and incorporates a high-level programming language. Nowadays, the
MATLAB/Simulink package is the world’s leading mathematical computing software
for engineers and scientists in industry and education.

Due to the large number of models and/or toolboxes, there is still some work or
coordination to be done to ensure compatibility between the available tools. Inputs
and outputs of different models are to-date defined by each modeler, a connection
between models from two different toolboxes can thus take some time. This should be
normalized in the future in order to allow a fast integration of new models from other
toolboxes. The widespread use of these tools, is reflected by ever-increasing number of
books based on the MathWorks Inc. products, with theory, real-world examples, and
exercises.
X Preface

This book presents a review of some activities in modeling and simulation processes.

Chapter 1 is devoted to the Generalized Approach To Electrolytic Systems (GATES),


applicable for resolution of electrolytic systems of any degree of complexity with use
of iterative computer programs (e.g., one offered by MATLAB) applied to the set of
non-linear equations, where all physicochemical knowledge can be involved. The
Generalized Electron Balance (GEB), immanent in formulation of all redox systems, is
considered in categories of general laws of the matter preservation.

MATLAB programs are also related to biological sciences. Chapter 2 presents the
Odefy toolbox and indicates how to use it for modeling and analyzing molecular
biological systems. The concepts of steady states, update policies, state spaces, phase
planes and systems parameters are also explained. Applicability of Odefy toolbox for
studies on real biological systems involved with stem cell differentiation, immune
system response and embryonal tissue formation is also indicated.

Much of the data obtained in molecular biology is of quantitative nature. Such data are
obtained with use of 2D microarrays, e.g., DNA or protein microarrays, containing 104
- 105 spots arranged in the matrix form (arrayed) on a chip, where e.g., many parallel
genetic tests are accomplished (note that all variables in MATLAB are arrays). For
effective handling of the large datasets, different bioinformatic techniques based on
matrix algebra are applied to extract the information needed with the use of MATLAB.
A review of such techniques in provided in Chapter 3.

A reference of MATLAB to physical sciences is represented in this book by a series of


chapters dealing with electrical networks, communication/information transfer and
filtering of signals/data. There are Chapters: 4 (on a hysteresis voltage control
technique), 5 (on hysteresis current controlled inverters), 6 (on voltage source
converter), 7 (on power transmission networks), 8 (on fading in the communication
channel during propagation of signals on multiple paths between transmitter and
receiver), 9 (on wireless video communication), 10 (on active RC-filters done to
diminish random fluctuations in electric circuits caused by thermal noise), 11 (on comb
filter, used for decimation, i.e., reduction of a signal sampling rate), 12 (on fractional
delay filters, useful in numerous signal processing), and 13 (on tuning methods).

MATLAB is an interactive environment designed to perform scientific and engineering


calculations and to create computer simulations. Simulink as a tool integrated with
MATLAB, allows the design of systems using block diagrams in a fast and flexible
way (Chapter 14). In this book, it is applied for: mechanical systems (Chapter 15);
hydraulic and electromagnetic actuators (Chapter 16); control of the motion of
wheeled mobile robot on the rough terrain (Chapter 17); comparative study on spur
gears with symmetric and asymmetric teeth (Chapter 18); thermal and mechanical
models for welding purposes (Chapter 19). A toolbox with stochastic Markov model is
presented in Chapter 20.
Preface XI

Some operations known from statistical data analysis are also realizable with use of
MATLAB, namely: cluster analysis (modulation recognition of digital signals, Chapter
21) and pattern recognition (digital image watermarking, Chapter 22).

The last two chapters discuss the registration of radioactive iodine along the
gastrointestinal tract (Chapter 23), and acid-base neutralization in continuously stirred
tank reactor (Chapter 24).

Tadeusz Michałowski
Cracow University of Technology, Cracow
Poland
1

Application of GATES and MATLAB


for Resolution of Equilibrium, Metastable
and Non-Equilibrium Electrolytic Systems
Tadeusz Michałowski
Faculty of Chemical Engineering and Technology,
Cracow University of Technology, Cracow,
Poland

1. Introduction
The Generalized Approach To Electrolytic Systems (GATES) (Michałowski, 2001, 2010)
provides the possibility of thermodynamic description of equilibrium and metastable, redox
and non-redox, mono-, two- and three-phase systems, with the possibility of all
attainable/pre-selected physicochemical knowledge to be involved, with none simplifying
assumptions done for calculation purposes, where different types of reactions occur in batch
or dynamic systems, of any degree of complexity. The Generalized Electron Balance (GEB)
concept, devised and formulated by Michałowski (1992), and obligatory for description of
redox systems, is fully compatible with charge and concentration balances, and relations for
the corresponding equilibrium constants. Up to 1992, the generalized electron balance (GEB)
concept was the lacking segment needed to formulate the compatible set of algebraic
balances referred to redox systems. The GEB is also applicable for the systems where radical
species are formed. Shortly after GEB formulation, the GATES involving redox systems of
any degree of complexity, was elaborated.
In this chapter, some examples of complex redox systems, where all types of elementary
chemical reactions proceed simultaneously and/or sequentially, are presented. In all
instances, one can follow measurable quantities (potential E, pH) in dynamic and static
processes and gain the information about details not measurable in real experiments; it
particularly refers to dynamic speciation. In the calculations made according to iterative
computer programs, e.g., MATLAB, all physicochemical knowledge can be involved and
different “variations on the subject” are also possible; it particularly refers to metastable and
non-equilibrium systems. The Generalized Equivalent Mass (GEM) concept, also devised
(1979) by Michałowski (Michałowski et al., 2010), has been suggested, with none relevance
to a chemical reaction notation. Within GATES, the chemical reaction notation is only the
basis to formulate the expression for the related equilibrium constant.

2. GEB
In order to formulate GEB for a particular redox system, two equivalent approaches were
suggested by Michałowski. The first approach (Michałowski, 1994; Michałowski and Lesiak,
2 Applications of MATLAB in Science and Engineering

1994a,b) is based on the principle of a “common pool” of electrons, introduced by different


species containing the electron-active elements participating redox equilibria. The
disproportionation reaction is a kind of dissipation of electrons between the species formed
by dissipating element, whereas the transfer of electrons between two (or more) interacting
elements in a redox system resembles a “card game”, with active elements as gamblers,
electrons - as money, and non-active elements - as fans.
The second approach (Michałowski, 2010) results from juxtaposition of elemental balances
for hydrogen (H) and oxygen (O). For redox systems, the balance thus obtained is
independent on charge and concentration balances, whereas the related balance, when
referred to non-redox systems, is the linear combination of charge and concentration
balances, i.e. it is not a new, independent balance (Fig. 1). Any non-redox system is thus
described only by the set of charge and s concentration balances, together s+1 linearly
independent balances. Any redox system is described with use of charge, electron (GEB)
and s concentration balances, together s+2 linearly independent balances. Charge balance
results from balance of protons in nuclei and orbital electrons of all elements in all species
forming the electrolytic system considered.
For redox systems, the balance obtained according to the second approach can be
transformed (Michałowski, 2010) into the form ascribed to the first approach. In the second
approach, we are not forced to calculate oxidation degrees of elements in particular species;
it is an advantageous occurrence, of capital importance for the systems containing complex
organic compounds, their ions and/or radicals.
The principles of minimizing (zeroing) procedure, realized within GATES according to
iterative computer program, are exemplified e.g., in (Michałowski, 1994; Michałowski and
Lesiak, 1994a).

Fig. 1. The place of electron balance (GEB) within elemental balances.

3. General characteristics of electrolytic systems


Electrolytic systems can be considered from thermodynamic or kinetic viewpoints. The
thermodynamic approach can be applied to equilibrium or metastable systems. In
equilibrium systems, all reaction paths are accessible, whereas in metastable systems at
least one of the reaction paths, attainable (virtually) from equilibrium viewpoint, is
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 3

inaccessible, i.e. the activation barriers for some reaction paths are not crossed, and the
resulting reactions cannot proceed, under defined conditions. It particularly refers to
aqueous electrolytic systems, where less soluble gaseous species, such as H2 or O2, can
virtually be formed, provided that this process is not hampered by obstacles of different
nature. However, formation of the presupposed gas bubbles in the related solution, needs
a relatively great expenditure of volumetric work, ΔL    p  dV , made against the
surrounding solution, by gas molecules forming the bubble. The ΔL value can be
recalculated on an overvoltage ΔU = ΔL/q, where q is the charge consumed/released in
the (virtual) reduction/oxidation process. Owing to the fact that the particular bubble
assumes a macroscopic dimension, ΔL and then ΔU values are high. Particularly,
ΔU referred to the (presupposed) formation of O2, cannot be covered by the oxidation
potential of MnO4-1 in aqueous medium and the (virtual) reaction 4MnO4-1 + 4H+1 =
4MnO2 + 3O2 + 2H2O does not occur, even at elevated temperatures. Another kind of
obstacles resulted from formation of a hydroxide/oxide layer on surface of a metal
(e.g., Mg, Al) introduced into pure water; these layers protect further dissolution of the
metal and formation of H2.
One can distinguish static (batch) and dynamic electrolytic systems, resolvable within
GATES. The dynamic process, most commonly applied in laboratory practice, is the
titration, where titrant (T) is added into titrand (D), and the D+T system is thus formed. In
D+T systems considered in chemical analysis, different (acid–base, redox, complexation
or/and precipitation, extended on two- and three-phase (liquid-liquid extraction systems)
types of reactions may occur simultaneously and/or sequentially and, moreover, a
particular type of a reaction, e.g., complexation, can be exemplified by different
representatives, e.g., different ligands.
Modelling the electrolytic systems consists of several interacting steps, indicated in Fig. 2.
The collected preliminary data are of qualitative and quantitative nature. The qualitative
aspect refers to specification of particular components (species), whereas quantitative aspect
relates to equilibrium constants, involving particular species of the system. Later on, only
the steps involved with calculations, data handling and knowledge gaining will be
discussed.

4. Rules of conservation
In chemical systems, one can refer to different rules of conservation, due to elements,
protons, electrons and external charges of species – particularly the species entering the
electrolytic systems, where none nuclear transformations of elements occur. Some rules of
conservation are interrelated, and this fact is referred to systems of any degree of
complexity. This way, the problem of interdependency of the balances arises. Starting from
the rules of conservation viewpoint, it is assumed, that any electrolytic system, composed of
condensed (liquid, liquid+solid, liquid1+liquid2, or liquid1+liquid2+solid) phases
(Michałowski and Lesiak, 1994a) is separated from its surroundings by diathermal walls,
that enable any process in the closed system to proceed under isothermal conditions. In such
systems, the mass transport can occur only between the phases consisting such a system. In
thermodynamic considerations of dynamic electrolytic systems it is also assumed that all the
processes occur in quasistatic manner.
4 Applications of MATLAB in Science and Engineering

Fig. 2. Steps of modelling any electrolytic system: 1 – Collection of preliminary data;


2 – Preparation of computer program; 3 – Calculations and data handling; 4 – Gaining of
knowledge.
As were stated above, the linear combination of elemental balances for hydrogen (H) and
oxygen (O), referred to redox systems in aqueous media, provides the balance equivalent to
GEB, in its primary form. In formulation of the balances, formation of hydrated forms
X zi i ×n i H 2 O (ni ≥ 0) of ionic (zi≠0) and/or nonionic (zi=0) species X zii is admitted in
considerations. The GEB, referred to a redox system, is fully compatible with other (charge
and concentration) balances related to this system and is linearly independent from that
balances.

5. Formulation of GEB
5.1 Batch redox systems
5.1.1 Fenton reagent
The Fenton reagent is usually obtained by mixing FeSO4 and H2O2 solutions. In order to
describe this redox system quantitatively, let us consider the monophase system (solution)
of volume V0 [L], composed of N01 molecules of FeSO4·7H2O, N02 molecules of H2O2 and
N0W molecules of H2O introduced with H2O2 solution (e.g., perhydrol), and NW molecules of
H2O as the solvent. The solution: H2O (N1), H+1 (N2, n2), OH-1 (N3, n3), OH (N4, n4), H2O2 (N5,
n5), HO2-1 (N6, n6), HO2 (N7, n7), O2-1 (N8, n8), O2 (N9, n9), Fe+2 (N10, n10), FeOH+1 (N11, n11),
FeSO4 (N12, n12), Fe+3 (N13, n13), FeOH+2 (N14, n14), Fe(OH)2+1 (N15, n15), Fe2(OH)2+4 (N16, n16),
FeSO4+1 (N17, n17), Fe(SO4)2-1 (N18, n18), HSO4-1 (N19, n19), SO4-2 (N20, n20), where Ni is the
number of entities Xi with mean number ni of hydrating water particles attached to it, ni ≥ 0.
Balances for H and O are as follows:

2·N1+N2·(1+2n2)+N3·(1+2n3)+N4·(1+2n4)+N5·(2+2n5)+N6·(1+2n6)+
N7·(1+2n7)+N8·2n8+N9·2n9+N10·2n10+N11·(1+2n11)+N12·2n12+ (1)
N13·2n13+N14·(1+2n14)+N15·(2+2n15)+N16·(2+2n16)+N17·2n17+N18·2n18+
N19·(1+2n19)+N20·2n20=14·N01+2·N02+2·N0W+2·NW
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 5

N1+N2·n2+N3·(1+n3)+N4·(1+n4)+N5·(2+n5)+N6(2+n6)+N7(2+n7)+
N8·(2+n8)+N9·(2+n9)+N10·n10+N11(1+n11)+N12·(4+n12)+N13·n13+
(2)
N14·(1+n14)+N15·(2+n15)+N16·(2+n16)+N17·(4+n17)+N18·(8+n18)+
N19(4+n19)+N20·(4+n20)=11·N01+2·N02+N0W+NW
From (1) and (2) we have

-N2+N3+N4+2N5+3N6+3N7+4N8+4N9+ N11+8N12+N14+
(3)
2N15+2N16+8N17+16N18+7N19+8N20=8N01+2N02
Adding the sides of (3) and:

+N2–N3–N6–N8+2N10+N11+3N13+2N14+N15+4N16+N17–N18–N19–2N20=0

6N01=6N12+6N17+12N18+6N19+6N20
after cancellation of similar terms, one obtains the relation

N4+2N5+2N6+3N7+3N8+4N9+2N10+2N11+2N12+
(4)
3N13+3N14+3N15+6N16+3N17+3N18=2N01+2N02
Dividing the sides of (6) by NA·V0, we get the simple form of GEB related to this system

[OH]+2·([H2O2]+[HO2-1])+3·([HO2]+[O2-1])+4·[O2]+
2·([Fe+2]+[FeOH+1]+[FeSO4])+3·([Fe+3]+[FeOH+2]+[Fe(OH)2+1]+ (5)
2·[Fe2(OH)2+4]+[FeSO4+1]+[Fe(SO4)2-1])=2·C01+2·C02
where [Xi] = Ni/( NA·V0), C0j = N0j/( NA·V0). Hydrating water particles at the corresponding
species Xi are omitted in (5), for simplicity of notation. Eq. (5) involves only the elements
participating redox equilibria; the electrons of sulfur in sulfate species do not participate the
redox equilibria. Note that the radical species (OH, HO2) are involved in (5), and O2 is the
biradical.
For redox systems, the balance obtained according to the second approach can be
transformed into the form ascribed to the first approach. However, in the second approach
we are not forced to define/calculate oxidation degrees of elements; it is a very
advantageous occurrence, of capital importance for the systems with complex organic
compounds, their ions and/or radicals.

5.1.2 A generalizing notation


Let us consider the electrolytic system, where the species of HpOqXr+z·npqrzH2O type (z =
zpqrz = 0, ±1, ±2,…; npqrz ≥ 0) are formed after introducing the substance HPOQXR·nH2O into
water. From comparison of the elemental balances, we get the equation (Michałowski, 2010)

 (r  ZX +p-2q-z)  [HpOq X+z


r  n pqrz H 2 O]=(R  Z X +P-2Q)  C (6)
pqrz

where ZX is the atomic number for the element X; the set of indices (p,q,r,z) covered by the
sum in (6) is different from: (2,1,0,0) for H2O, (1,0,0,1) for H+1, and (1,1,0,–1) for OH–1. It is
assumed that HPOQXR·nH2O does not react (as oxidizing or reducing agent) with water, i.e.
products of water oxidation or reduction are not formed. For example, after introducing Br2
(X = Br; P=Q=n=0, R=2; ZX = ZBr = 35) into water, the following bromine species are formed
6 Applications of MATLAB in Science and Engineering

as hydrates in the disproportionation process: HBrO3 (p=r=1, q=3, z=0), BrO3-1 (p=0, r=1,
q=3, z=–1), HBrO (p=q=r=1, z=0), BrO-1 (p=0, q=r=1, z=–1), Br2 (p=q=z=0, r=2), Br3-1 (p=q=0,
r=3, z=–1), Br-1 (p=q=0, r=1, z= –1). Applying Eq. 6, we get (Michałowski, 1994)

(ZBr–5)([HBrO3]+[BrO3-1])+(ZBr–1)([HBrO]+[BrO-1])+2ZBr[Br2]+
(7)
(3ZBr+1)[Br3-1]+(ZBr+1)[Br-1]=2ZBr·C
where C [mol/L] is the total concentration of Br2. In (7), hydrating water particles are
omitted, for simplicity.
For comparative purposes, one can refer to (a) Br2 (C) + KBr (C1); (b) NaBrO (C2); (c) KBrO3
(C3) + KBr (C1) solutions. In all instances, the left side of (7) is identical, whereas the right side
is as follows: 2ZBrC + (ZBr+1)C1 for (a); (ZBr-1)C2 for (b); (ZBr-5)C3 + (ZBr+1)C1 for the case (c).

5.2 Dynamic redox systems


In physicochemical/analytical practice, a dynamic system is usually realized according to
titrimetric mode, where V mL of titrant (T) is added into V0 mL of titrand (D). Assuming
additivity in volumes, V0+V of D+T system is thus formed. In common redox titrations, two
or more elements, represented by different species, can participate redox equilibria.

5.2.1 FeSO4+H2SO4+KMnO4
This system be referred to titration of V0 mL D, composed of FeSO4 (C0) + H2SO4 (C1), with V
mL of C mol/L KMnO4 as T. The electron balance (GEB) has the form (Z1 = 25 for Mn, Z2 = 26
for Fe):

(Z1-7)[MnO4-1] + (Z1-6)[MnO4-2] + (Z1-3)([Mn+3] + [MnOH+2] +


γ1[MnSO4+1] + γ2[Mn(SO4)2-1]) + (Z1-2)([Mn+2] + [MnOH+1] + [MnSO4]) +
(8)
(Z2-2)([Fe+2] + [FeOH+1] + [FeSO4] + (Z2-3)([Fe+3] + [FeOH+2] + [Fe(OH)2+1] +
2[Fe2(OH)2+4] + [FeSO4+1] + [Fe(SO4)2-1]) - ((Z2-2)C0V0 + (Z1-7)CV)/(V0+V) = 0
The symbols: γ1 and γ2 in (8) are referred to the pre-assumed sulphate complexes (see Fig.
18A); γ1 = 1, γ2 = 0 if only MnSO4+1 is pre-assumed, and γ1 = γ2 = 1 if both (MnSO4+1 and
Mn(SO4)2-1) complexes be pre-assumed.

5.2.2 KIO3+HCl+H2SeO3(+HgCl2)+ ascorbic acid


An interesting/spectacular example is the titration of V0 mL of D containing KIO3 (C0
mol/L) + HCl (Ca mol/L) + H2SeO3 (CSe mol/L) + HgCl2 (CHg mol/L) with V mL of C
mol/L ascorbic acid (C6H8O6) as T. For example, the electron balance (GEB) referred to this
system can be written as follows (Michałowski, 2010):

(Z1+1)[I–1]+(3Z1+1)[I3–]+2Z1([I2]+[I2])+(Z1–1)([HIO]+[IO–1])+(Z1–5)([HIO3]+[IO3–1])+
(Z1–7)([H5IO6]+[H4IO6–1]+[H3IO6–2])+(Z2–2)([Hg+2]+[HgOH+1]+[Hg(OH)2])+
(Z2–2+Z1+1)[HgI+1]+(Z2–2+2(Z1+1))[HgI2]+(Z2–2+3(Z1+1))[HgI3–1]+
(Z2–2+4(Z1+1))[HgI4–2]+2(Z2–1)([Hg2+2]+[Hg2OH+1])+Z3([C6H8O6]+[C6H7O6–1]+
[C6H6O6–2])+(Z3–2)[C6H6O6]+(Z4+1)[Cl–1]+2Z4[Cl2]+(Z4–1)([HClO]+[ClO–1])+
(Z4–3)([HClO2]+[ClO2–1])+(Z4–4)[ClO2]+(Z4–5)[ClO3–1]+(Z4–7)[ClO4–1]+ (9)
(Z1+Z4)[ICl]+(Z1+2(Z4+1))[ICl2–1]+(2Z1+Z4+1)[I2Cl–1]+(Z2–2+Z4+1)[HgCl+1]+
(Z2–2+2(Z4+1))[HgCl2]+(Z2–2+3(Z4+1))[HgCl3–1]+(Z2–2+4(Z4+1))[HgCl4–2]+
(Z5–4){[H2SeO3]+[HSeO3–1]+[SeO3–2])+(Z5–6)([HSeO4–1]+[SeO4–2])–
((Z1–5)C0V0+(Z2–2+2(Z4+1))CHgV0+Z3CV+(Z4+1)CaV0+(Z5–4)CSeV0)/(V0+V)=0
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 7

where Z1, Z2, Z4, Z5 are atomic numbers for I, Hg, Cl and Se, respectively; Z3 is the number
ascribed to ascorbic acid. The following terms were introduced in there:
  = 1, valid under assumption that solid iodine (I2) is present in the system considered;
 = 0, for a system not saturated against solid iodine (I2 refers to soluble form of iodine);
  = 1 refers to the case, where Se(VI) species were involved; at  = 0, the Se(VI) species
are omitted;
  = 1 refers to the case, where Hg(I) species were involved; at  = 0, the Hg(I) species are
omitted.

6. Charge and concentration balances


The set of balances referred to non-redox systems consists of charge and concentration
balances. For redox systems, this set is supplemented by electron balance (GEB).
For example, the charge and concentration balances referred to C mol/L Br2 (see section
5.1.2)

[H+1]–[OH-1]–[BrO3-1]–[BrO-1]–[Br3-1]–[Br-1]=0 (10)

[HBrO3] + [BrO3-1] + [HBrO] + [BrO-1] + 2[Br2] + 3[Br3-1] + [Br-1] = 2C (11)


are supplemented by Eq. (7), i.e. (7), (10) and (11) form the complete set of balances related
to aqueous solution of Br2 (C mol/L).
Charge and concentration balances referred to the systems 5.2.1 and 5.2.2 are specified in
(Michałowski and Lesiak, 1994b, Michałowski et al., 1996) and (Michałowski and Lesiak,
1994b, Michałowski, 2010), respectively. For example, the species involved in the system
5.2.2 enter s+2 = 7 balances: GEB, charge balance, and five concentration balances; K+1 ions,
as a sole potassium species in this system, enters simply the related charge balance, i.e.
concentration balance for K+1 is not formulated. Generally, concentration balances are not
formulated for the species not participating other (acid-base, complexation, precipitation or
redox) equilibria in the system considered.

7. Equilibrium constants
Different species in the system are interrelated in expressions for the corresponding
equilibrium constants, e.g., ionic product of water, dissociation constants (for acidic species),
stability constants of complexes, solubility products, standard potentials (E0i) for redox
reactions, partition constants in liquid-liquid extraction systems. Except E0i, all equilibrium
constants are formulated immediately on the basis of mass action law.
The redox systems are completed by relations for standard potentials (E0i), formulated on
the basis of the Nernst equation for potential E, referred to i-th redox reaction notation,
written in the form ...  zi e 1  ... , where zi > 0 is the number of electrons (e-1) participating
this reaction. First, the equilibrium constant (Kei) for the redox reaction is formulated on the
basis of mass action law and then the relations:

K ei  10zi E0i /S and [e 1 ]  10  E/S (12)

are applied, where S = RT/F·ln10, and T , R, F are as ones in the Nernst equation. Both types
of constraints, i.e. balances and the expressions for equilibrium constants, are of algebraic
8 Applications of MATLAB in Science and Engineering

nature. It enables to consider the relations as common algebraic equations, nonlinear in their
nature.
In order to avoid inconsistency between the equilibrium constants values found in
literature, the set of independent equilibrium constants is required. One should also be
noted that some species are presented differently, see e.g., pairs: AlO2-1 and Al(OH)4-1;
H2BO3-1 and B(OH)4-1; IO4-1 and H4IO6-1, differing in the number of water molecules
involved. The species compared here should be perceived as identical ones and then cannot
enter the related balances, side by side, as independent species.
The balances and complete set of interrelations resulting from expressions for independent
equilibrium constants are the basis for calculations made according to an iterative computer
program, e.g., MATLAB. The results thus obtained can be presented graphically, at any pre-
assumed system of coordinates, in 2D or 3D space.
The procedure involved with the terms β and γ expresses the principle of “variation on the
subject” applied to the system in question. The system considered in 5.2.2 is described with
use of the set of 36 independent equilibrium constants in the basic version, i.e. at β=γ=0.
More equilibrium data are involved, if some “variations on the subject” be done, i.e. when
some reaction paths are liberated. In the “variations” of this kind, further physicochemical
data are applied (see section 11.2).

8. Calculation procedure
The balances, related to a dynamic system and realised according to titrimetric mode, can be
written as a set of algebraic equations

Fk (x(V))=0 (13)

where x(V) = [x1(V), ... , xn(V)]T is the vector of basic (independent, fundamental) variables
xi = xi(V) (scalars) related to a particular V–value, i.e. volume of titrant added. The number
(n) of variables is equal to the number of the balances. At defined V–value, only one vector,
x = x(V), exists that turns the set of algebraic expressions Fk(x(V)) to zero, i.e. Fk(x(V)) = 0
(k=1,...,n) and zeroes the sum of squares

n
SS(V)=  (Fk (x(V)))2 =0 (14)
k=1

for any V–value. If xs(V) is the vector referred to starting (s) values for basic variables related
to a particular V–value, then one can expect that xs(V) ≠ x(V) and

n
SS(V)=  (Fk (x s (V)))2 >0 (15)
k=1

The searching of x(V) vector values related to different V, where Fk(x(V)) = 0 (k=1,...,n), is
made according to iterative computer programs, e.g., MATLAB. The searching procedure
satisfies the requirements put on optimal x(V) values, provided that SS value (Eq. 15) is
lower than a pre–assumed, sufficiently low positive –value, >0, e.g.,  = 10–14. i.e.
n
SS(V)=  (Fk (x(V)))2 <δ
k=1
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 9

However, the iterative computer programs are (generally) designed for the curve–fitting
procedures where the degree of fitting a curve to experimental points is finite. In this case,
the criterion of optimisation is based on differences SS(V,N+1) – SS(V,N) between two
successive (Nth and N+1th) approximations of SS(V)–value, i.e.

SS(V,N+1)-SS(V,N) <δ (16)

at a sufficiently low –value. However, one should take into account that the inequality
(16) can be fulfilled at local minimum different from the global minimum. It can happen if
the starting values xs(V) are too distant from the true value x(V) where the equality
(14) is fulfilled. In this case, one should try (repeat) the calculations for new xs(V) values
guessed.
The choice of –value depends on the scale of analytical concentrations considered. To
‘equalise’ the requirements put on particular balances, it is advised to apply ‘normalised’
balances, obtained by dividing the related balance by total (analytical) concentration
involved in this balance.
In all simulated titrations considered below, the following regularities are complied:
1. The independent variables xi = xi(V) are introduced as the (negative) powers of 10 (as
the base number);
For any [X] > 0 one can write [X]  10log[X] = 10–pX, where pX = – log[X]. One should be noted
that [X] > 0 for any real pX value, pX  . It particularly refers to protons (X = H+) and
electrons (Eq. 12). Such choice of the basic variables improves the course of iteration
procedure.
2. The changes in the system are made according to titrimetric mode, with volume V taken
as the steering variable.
3. It is advisable to refer the fundamental variables to the species whose concentrations
predominate at the start for calculations.
The minimizing procedure starts at the V–value, V = Vs, that appears to be ‘comfortable’
from the user’s viewpoint, where the starting xs(V) values are guessed. Then the
optimisation is realised, with negative step put on the V–variable, up to V = V(begin) close
to zero value. The possible changes in the phase composition during the iteration procedure
should also be taken into account. It particularly refers to formation/disappearance of a
solid phase(s) or a change in equilibrium solid phase; the latter problem is raised in section
12. For this purpose, the expressions identical with the forms of the corresponding solubility
products should be ‘peered’ during the simulated procedure. In the system considered in
section 5.2.2, the solid iodine, I2, is formed within defined V-range.
The results thus obtained enable to calculate all variables of interest. It refers both to
fundamental variables such as E, pH and concentrations, and other concentrations of interest.
For example, the Br2 + H2O (batch) system is described by three balances: (7), (10), (11).
In this case, one can choose three fundamental variables: pH, E and pBr, involved with
concentrations and referred to negative powers of the base 10: [H+1] = 10-pH, [e-1] = 10-E/S
(Eq. 12), [Br-1] = 10-pBr. Three independent variables involved in three balances give here a
unique solution for (x1, x2, x3) = (pH, E, pBr), at a pre-assumed C value (Eq. 11). On this basis,
one can calculate concentrations of all other species, e.g.:

[BrO3-1]=106A(E–1.45)+6pH–pBr;[Br2]=102A(E–1.087)–2pBr (17)
where the fundamental variables are involved; A = 1/S (Eq. 12).
10 Applications of MATLAB in Science and Engineering

In a simulated titration, as a representation of dynamic system, the set of parameters


involve: volume V0 of D and concentrations of reagents in D and T. Volume V of T is a
steering variable/parameter value, at a given point of the titration.
The results of calculations provide the basis for graphical presentation of the data, in 2D or
3D space, that appears to be very useful, particularly in the case of the titrations. The curves
for concentrations of different species Xj as a function of volume V are named as speciation
curves, plotted usually in semi-logarithmic scale, as the log[Xj] vs. V relationships.
For comparative purposes, it is better to graph the plots as the function of the fraction
titrated

CV
Φ= (18)
C 0  V0

where C0 is the concentration [mol/L] of analyte A in D of initial volume V0, V is the volume
[mL] of T added up to a given point of titration, C [mol/L] – concentration of a reagent B
(towards A) in T; e.g., for the D+T system presented in section 5.2.2 we have: A = IO3-1, B =
C6H8O6. The course of the plots E = E(V) and/or pH = pH(V) (or, alternately, pH = pH(Φ)
and/or E = E(Φ)) is the basis to indicate the equivalence point(s) according to GEM
(Michałowski et al., 2010), with none relevance to the chemical reaction notation.
The plots pH = pH(V) and/or E = E(V) can also be obtained experimentally, in
potentiometric (pH or E) titrations. Comparing the experimental plots with the related
curves obtained in simulated titrations, (a) one can check the validity of physicochemical
data applied in calculations, and (b) to do some “variations on the subject” involved with
reaction pathways and/or incomplete/doubtful physicochemical data.

9. Graphical presentation of the data referred to redox systems


9.1 Aqueous solutions of Br2 (batch system)
The properties of aqueous bromine (Br2, C mol/L) solutions, considered as a weak acid, are
presented in Figures 3a-d, for different C values (Eq. (11)). As wee see, E decreases (Fig. 3a)
and pH increases with decrease in C value. The pH vs. E relationship is nearly linear in the
indicated C-range (Fig. 3c). The Br2 exists as the predominating bromine species at higher C
values (Fig. 3d); it corresponds with the speciation plots presented in Fig. 4.

9.2 Examples of redox titration curves


9.2.1 Titration in Br2+NaOHandHBrO+NaOHsystems
As a result of NaOH addition into the solution of (a) Br2, (b) HBrO, acid-base and redox
reactions proceed simultaneously; a decrease in E is accompanied by pH growth, and
significant changes in E and pH at equivalence/stoichiometric points occur, see Figs. 5a,b.
Both titrations are involved with disproportionation reactions, formulated on the basis of
speciation curves (Fig. 6). From comparison of ordinates at an excess of NaOH we have
log[BrO3-1] - log[BrO-1]  4; i.e. [BrO3-1]/[BrO-1]  104, and then the effectiveness of reaction

3Br2+6OH-1=BrO3-1+5Br-1+3H2O (19)
exceeds the effectiveness of reaction

Br2 + 2OH-1 = BrO-1 + Br-1 + H2O


Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 11

by about 104. Note that the stoichiometries of both reactions are the same, 3 : 6 = 1 : 2.
Concentration of Br-1 ions, formed mainly in reaction (19), exceeds [BrO3-1] by 5, at higher
pH values.

9.2.2 Titration in I2+NaOH system


The iodine speciation curves related to titration of V0 = 100 mL of D containing iodine (I2,
0.01 mol/L) with V mL of C = 0.1 mol/L NaOH are presented in Fig. 7. Owing to limited
solubility of iodine in water, at V = 0, a part of iodine remains as a solid phase, s < C0. This
two-phase system exists up to V = 11.2 mL; for V > 11.2 mL we have [I2s] = 0. In the course
of further titration, concentration [I2] of dissolved iodine decreases as the result of advancing
disproportionation. After crossing the stoichiometric point, i.e. at an excess of NaOH added,
the main disproportionation products are: IO3-1 and I-1, formed in the reaction

3I2 + 6 OH-1 = IO3-1 + 5I-1 + 3H2O (20)


From Fig. 6 it results that, at an excess of NaOH added, the effectiveness of reaction (20)
exceeds the one for reaction

I2 + 2 OH-1 = IO-1 + I-1 + H2O


by about 2.5·109. The E = E(V) and pH = pH(V) curves related to titration of iodine (I2) in
presence/absence of KI in D with NaOH admixtured (or not admixtured) with CO2 as T are
presented in Figures (5) and (6). The titration curves related to liquid-liquid extraction
systems (H2O+CCl4) were considered in (Michałowski, 1994a).

Fig. 3. The curves involved with C mol/L Br2 solutions in pure water, plotted at the
coordinates indicated [4].
12 Applications of MATLAB in Science and Engineering

Fig. 4. Concentrations of (indicated) bromine species at different –logC values for C mol/L Br2.

Fig. 5. Theoretical titration curves for: (A) E = E(V) and (B) pH = pH(V), at V0 = 100 mL of
C0 = 0.01 mol/L (a) Br2, (b) HBrO titrated with V mL of C = 0.1 mol/L NaOH.

Fig. 6. Speciation of bromine species during titration of V0 = 100 mL of C0 = 0.01 mol/L (A)
Br2, (B) HBrO titrated with V mL of C = 0.1 mol/L NaOH.
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 13

Fig. 7. The speciation curves plotted for I2 + NaOH system.

9.2.3 Titration of KIO3+KI+H2SO4 with Na2S2O3


The pH changes can result from addition of a reagent that - apparently - does not appear, at
first sight, acid-base properties. Rather unexpectedly, at first sight, Na2S2O3 solution acts on
the acidified (H2SO4) solution of KIO3 (or KIO3 + KI) as a strong base (like NaOH) see Fig.
8A,B (Michałowski, et al., 1996; Michałowski, et al., 2005). This reaction, known also from
qualitative chemical analysis, can be derived from the related speciation plots as

IO3-1 + 6S2O3-2 + 3H2O = I-1 + 3S4O6-2 + 6OH-1

A B

Fig. 8. Theoretical (A) pH vs. V, (B) E vs. V relationships for titration of V0 = 100 mL of KIO3
(0.05 mol/L) + KI (CI mol/L) + H2SO4 (0.01 mol/L) as D with Na2S2O3 (0.1 mol/L) as T,
plotted at CI = 0.1 mol/L (curve a) and CI = 0 (curve b).

9.2.4 Titration of FeSO4 + H2SO4 with KMnO4


The plots related to the system where V0 = 100 mL of FeSO4 (C0 = 0.01 mol/L) + H2SO4 (Ca =
1.0 mol/L) is titrated with V mL of C = 0.02 mol/L KMnO4 are presented in Fig. 9. It was
assumed there that the complexes MnSO4+1 and Mn(SO4)2-1 are not formed in the system; i.e.
γ1 = γ2 = 0 in Eq. (8) and in the related concentration balances for Fe, Mn and S.
14 Applications of MATLAB in Science and Engineering

Fig. 9A indicates the effect resulting from complexation of Fe+3 and Fe+2 by SO4-2 ions; the
course of titration curve a differs significantly from the curve b, where complexes FeSO4,
FeSO4+1 , Fe(SO4)2-1 and MnSO4 were omitted in the related balances. The pH change in this
system (Fig. 9B) results mainly from consumption of protons in reaction MnO4-1 + 8H+1 +
5e-1 = Mn+2 + 4H2O. Namely, MnO4-1 acts also in acid-base reaction, in multiplied extent
when compared with a strong base action, like “octopus” (Michałowski, et al., 2005). Greater
pH changes in this system are protected by presence of great excess of H2SO4 that acts as
buffering agent and acts against formation of solid MnO2 in reaction MnO4-1 + 4H+1 + 3e-1 =
MnO2 + 2H2O. The species Xi are indicated at the corresponding dynamic speciation curves
plotted in Figures 9C,D.

A
B

Fig. 9. The plots of (A) E = E(), (B) pH = pH() and log[Xi] vs.  relationships for
different (C) Mn and (D) Fe species Xi, related to simulated titration presented in
section 9.2.4. (Michałowski and Lesiak, 1994b; Michałowski, 2001, 2010)

9.2.5 Titration of KIO3+HCl+H2SeO3(+HgCl2)with ascorbic acid


In common redox titrations, two or more elements, represented by different species, can
participate redox equilibria. An interesting/spectacular example is the titration of V0 mL of
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 15

D containing KIO3 (C0 = 0.01mol/L) + HCl (Ca = 0.02 mol/L) + H2SeO3 (CSe = 0.02 mol/L) +
HgCl2 (CHg mol/L) with V mL of C mol/L ascorbic acid (C6H8O6) as T, considered e.g., in
(Michałowski and Lesiak, 1994b; Michałowski, 2001, 2010). From Fig. 10A,B we see that the
presence of HgCl2 in D transforms the curve a into curve b.
Moreover, Fig. 10b provides (rarely met) example, where pH of the D+T system passes
through maximum; such a case was stated first time in (Michałowski and Lesiak, 1994b).
The extreme pH values of the curves a and b in Fig. 10B correspond to the points of maximal
drop on the curves a and b in Fig.10A. The non-monotonic shapes of pH vs. Φ relationships
were also stated e.g., for D+T systems with VSO4 in acidic (H2SO4) media titrated with
KMnO4 or K2Cr2O7 (Michałowski and Lesiak, 1994b), KI titrated with chlorine water
(Michalowski, et al., 1996).

Fig. 10. The plots of: (A) E = E(Φ) and (B) pH = pH(Φ) relationships for D+T system specified
in section 9.2.5, referred to absence (curve a) and presence (CHg = 0.07 mol/L, curve b) of
HgCl2 in D.

Fig. 11. The plots of speciation curves for different iodine species at C0 = 0.01, Ca = 0.02, CSe =
0.02, and CHg = 0 (in Fig. A) or CHg = 0.07 (in Fig. B); I2(s) and I2 – solid and soluble iodine
species.
16 Applications of MATLAB in Science and Engineering

The speciation curves for iodine species in this system are presented in Fig. 11A,B. Among
others, on this basis one can state that the growth in pH on the curve a in Fig. 11B within
Φ  <0, 2.5> can be explained by the set of reactions:

2IO3-1+5C6H8O6+2H+1=I2+5C6H6O6+6H2O

2IO3-1+5C6H8O6+2H+1=I2+5C6H6O6+6H2O

2IO3-1+5C6H8O6+2H+1+I-1=I3-1+5C6H6O6+6H2O
where protons are consumed. This inference results from the fact that within this Φ-interval
a growth in concentration of I2, I2 i I3-1, and decrease in concentration of IO3-1 occur; in this
respect, the main components are considered.

10. GATES as a tool for description of multi-step procedure and validation of


physicochemical data
This section provides the detailed description of the complex procedure referred to
iodometric determination of cupric ions. According to the procedure applied in this method,
acidic (H2SO4) solution of CuSO4 is neutralized first with NH3 solution until the blue colour
of the solution, resulting from presence of Cu(NH3)i+2 species, is attained. Then acetic acid is
added in excess, to secure pH ca. 3.5. The resulting solution is treated with an excess of KI,
forming the precipitate of CuI:

2Cu+2+4I-1=2CuI+I2;2Cu+2+4I-1=2CuI+I2;2Cu+2+5I-1=2CuI+I3-1
At a due excess of KI, I2 is not formed. The mixture (D) thus obtained is titrated with sodium
thiosulphate solution as T:

I2+2S2O3-2=2I-1+S4O6-2;I3-1+2S2O3-2=3I-1+S4O6-2
Let us assume that V0 = 100 ml of the solution containing CuSO4 (C0 = 0.01 mol/L), H2SO4
(Ca = 0.1 mol/L), NH3 (CN = 0.25 mol/L) and CH3COOH (CAc = 0.75 mol/L), be treated
with V1 = 5.8 mL of CI = 2.0 mol/L KI and then titrated with V ml of C = 0.1 mol/L
Na2S2O3.
On the first stage (Fig.12), we apply the following balances, Fi = Fi(x(V)) = 0 (co – current
concentration of CuI):

F1=co+[Cu+1]+[CuNH3+1]+[Cu(NH3)2+1]+[CuI2–1]+[Cu+2]+[CuOH+1]+[Cu(OH)2]+
[Cu(OH)3–1]+[Cu(OH)4–2]+[CuSO4]+[CuIO3+1]+[CuNH3+2]+[Cu(NH3)2+2]+ (21)
[Cu(NH3)3+2]+[Cu(NH3)4+2]+[CuCH3COO+1]+[Cu(CH3COO)2]–C0V0/(V0+V)=0

F2=co+[I–1]+2([I2]+[I2])+3[I3–1]+[HIO]+[IO–1]+[HIO3]+[IO3–1]+
(22)
[H5IO6]+[H4IO6–1]+[H3IO6–2]+2[CuI2–1]+[CuIO3+1]–CIV/(V0+V)=0

F3=[HSO4–1]+[SO4–2]+[CuSO4]–(C0+Ca)V0/(V0+V)=0 (23)

F4=[NH4+1]+[NH3]+[CuNH3+1]+2[Cu(NH3)2+1]+[CuNH3+2]+2[Cu(NH3)2+2]+ (24)
3[Cu(NH3)3+2]+4[Cu(NH3)4+2]–CNV0/(V0+V)=0
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 17

F5=[CH3COOH]+[CH3COO–1]+[CuCH3COO+1]+
2[Cu(CH3COO)2]–CAcV0/(V0+V)=0 (25)

F6=[H+1]–[OH–1]+[Cu+1]–[CuI2–1]+2[Cu+2]+[CuOH+1]–[Cu(OH)3–1]–
2[Cu(OH)4–2]+[CuIO3+1]–[I–1]–[I3–1]–[IO–1]–[IO3–1]–[H4IO6–1]–2[H3IO6–2]–[HSO4–1]–
(26)
2[SO4–2]+[CuNH3+1]+[Cu(NH3)2+1]+2[CuNH3+2]+2[Cu(NH3)2+2]+2[Cu(NH3)3+2]+
2[Cu(NH3)4+2]+[CuCH3COO+1]+CIV/(V0+V)–[CH3COO–1]+[NH4+1]=0

F7=(Z1–1+Z2+1)co+(Z1–1)([Cu+1]+[CuNH3+1]+[Cu(NH3)2+1])+
(Z1–1+2(Z2+1))[CuI2–1]+(Z1–2)([Cu+2]+[CuOH+1]+[Cu(OH)2]+[Cu(OH)3–1]+
[Cu(OH)4–2]+[CuSO4]+[CuNH3+2]+[Cu(NH3)2+2]+[Cu(NH3)3+2]+
(27)
[Cu(NH3)4+2]+[CuCH3COO+1]+[Cu(CH3COO)2])+(Z1–2+Z2–5)[CuIO3+1](Z2+1)[I–1]+
(3Z2+1)[I3–1]+2Z2([I2]+[I2])+(Z2–1)([HIO]+[IO–1])+(Z2–5)([HIO3]+[IO3–1])+
(Z2–7)([H5IO6]+[H4IO6–1]+[H3IO6–2])–((Z1–2)C0V0+(Z2+1)CIV)/(V0+V)=0
where Z1 = 29 for Cu, Z2 = 53 for I. At high excess of I–1, solid I2 is not formed,  = 0 in (22)
and (27).
Concentrations of different species in (22) – (27) are involved in the relations (A = 1/S, Eq. (12)):

[NH4+1] = 109.35[H+1][NH3],
[CH3COOH] = 104.65[H+1][CH3COO–1],
[CuOH+1] = 107[Cu+2][OH–1],
[Cu(OH)2] = 1013.68[Cu+2][OH–1]2,
[Cu(OH)3–1] = 1017[Cu+2][OH–1]3,
[Cu(OH)4–2] = 1018.5[Cu+2][OH–1]4,
[CuSO4] = 102.36[Cu+2][SO4–2],
[CuIO3+1] = 100.82[Cu+2][IO3–1],
[CuI2–1] = 108.85[Cu+1][I–1]2,
[CuNH3+2] = 103.39[Cu+2][NH3],
[Cu(NH3)2+2] = 107.33[Cu+2][NH3]2,
[Cu(NH3)3+2] = 1010.06[Cu+2][NH3]3,
[Cu(NH3)4+2] = 1012.03[Cu+2][NH3]4,
[CuNH3+1] = 105.93[Cu+1][NH3], (28)
[Cu(NH3)2+1] = 1010.86[Cu+1][NH3]2,
[CuCH3COO+1] = 102.24[Cu+2][CH3COO–1],
[Cu(CH3COO)2] = 103.3[Cu+2][CH3COO–1]2,
[I2] = [I–1]2102A(E–0.62),
[I3–1] = [I–1]3102A(E–0.545),
[IO–1] = [I–1] 102A(E–0.49)+2pH–28,
[IO3–1] = [I–1]106A(E–1.08)+6pH,
[HIO] = 1010.6[H+1][IO–1],
[HIO3] = 100.79[H+1][IO3–1],
[H5IO6] = [I–1]108A(E–1.26)+7pH,
[H4IO6–1] = 10pH–3.3[H5IO6],
[H3IO6–2] = [I–1]108A(E–0.37)+9pH–126,
[Cu+2] = [Cu+1]10A(E–0.153)
18 Applications of MATLAB in Science and Engineering

A B

Fig. 12. The (A) E vs. V and (B) pH vs. V relationships during addition of 2.0 mol/L KI into
CuSO4 + NH3 + HAc system, plotted at pKso = 11.96.

[Cu+1][I–1] = Kso (29)


On the second stage, we take: V = V1, V0’ = V0 + V1 = 25 + 5.8 = 30.8 mL, and apply the
balances:

F1=co+[Cu+1]+[CuNH3+1]+[Cu(NH3)2+1]+[CuI2–1]+[Cu+2]+[CuOH+1]+
[Cu(OH)2]+[Cu(OH)3–1]+[Cu(OH)4–2]+[CuSO4]+[CuIO3+1]+[CuNH3+2]+ (30)
[Cu(NH3)2+2]+[Cu(NH3)3+2]+[Cu(NH3)4+2]+[CuCH3COO+1]+[Cu(CH3COO)2]+
[CuS2O3–1]+[Cu(S2O3)2–3]+[Cu(S2O3)3–5]–C0V0/(V0’+V)=0

F2=co+[I–1]+2([I2]+[I2])+3[I3–1]+[HIO]+[IO–1]+
[HIO3]+[IO3–1]+[H5IO6]+[H4IO6–1]+[H3IO6–2]+ (31)
2[CuI2–1]+ [CuIO3+1]–CIV1/(V0’+V)=0

F3=[HSO4–1]+[SO4–2]+[CuSO4]–(C0+Ca)V0/(V0’+V)=0 (32)

F4=[NH4+1]+[NH3]+[CuNH3+1]+2[Cu(NH3)2+1]+
[CuNH3+2]+2[Cu(NH3)2+2]+3[Cu(NH3)3+2]+ (33)
4[Cu(NH3)4+2]–CNV0/(V0’+V)=0

F5=[CH3COOH]+[CH3COO–1]+[CuCH3COO+1]+2[Cu(CH3COO)2]–CAcV0/(V0’+V)=0 (34)

F6=[H2S2O3]+[HS2O3–1]+[S2O3–2]+2[S4O6–2]+[CuS2O3–1]+
(35)
2[Cu(S2O3)2–3]+3[Cu(S2O3)3–5]–CV/(V0’+V)=0

F7=[H+1]–[OH–1]+[Cu+1]–[CuI2–1]+2[Cu+2]+[CuOH+1]–[Cu(OH)3–1]–
2[Cu(OH)4–2]+[CuIO3+1]–[I–1]–[I3–1]–[IO–1]–[IO3–1]–[H4IO6–1]–2[H3IO6–2]–
[HSO4–1]–2[SO4–2]+[CuNH3+1]+[Cu(NH3)2+1]+2[CuNH3+2]+2[Cu(NH3)2+2]+ (36)
2[Cu(NH3)3+2]+ 2[Cu(NH3)4+2]+[CuCH3COO+1]+CIV1/(V0’+V)–
[CH3COO–1]+[NH4+1]+2CV/(V0’+V)–[HS2O3–1]–2[S2O3–2]–
2[S4O6–2]–[CuS2O3–1]–3[Cu(S2O3)2–3]–5[Cu(S2O3)3–5]=0
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 19

F8=(Z1–1+Z2+1)co+(Z1–1)([CuNH3+1]+[Cu(NH3)2+1])+(Z1–1+2(Z2+1))[CuI2–1]+
(Z1–2)([Cu+2]+[CuOH+1]+[Cu(OH)2]+[Cu(OH)3–1]+[Cu(OH)4–2]
+[CuSO4]+[CuNH3+2]+[Cu(NH3)2+2]+[Cu(NH3)3+2]+[Cu(NH3)4+2]+
[CuCH3COO+1]+[Cu(CH3COO)2])+(Z1–2+Z2–5)[CuIO3+1]+(Z2+1)[I–1]+
(3Z2+1)[I3–1]+2Z2([I2]+[I2])+(Z2–1)([HIO]+[IO–1])+(Z2–5)([HIO3]+[IO3–1])+ (37)
(Z2–7)([H5IO6]+[H4IO6–1]+[H3IO6–2])+2(Z3–2)([H2S2O3]+[HS2O3–1]+
[S2O3–2])+4(Z3–2.5)[S4O6–2]+(Z1–1+2(Z3–2))[CuS2O3–1]+
(Z1–1+4(Z3–2))[Cu(S2O3)2–3]+(Z1–1+6(Z3–2))[Cu(S2O3)3–5]–
((Z1–2)C0V0+(Z2+1)CIV1+2(Z3–2)CV/(V0’+V)=0
where Z3 = 16 for S. The additional relationships are as follows:

[H2S2O3]=102.32[H+1]2[S2O3–2],
[HS2O3–1]=101.72[H+1][S2O3–2],
[CuS2O3–1]=1010.3[Cu+1][S2O3–2],
(38)
[Cu(S2O3)2–3]=1012.2[Cu+1][S2O3–2]2,
[Cu(S2O3)3–5]=1013.8[Cu+1][S2O3–2]3,
[S4O6–2]=[S2O3–2]2102A(E–0.09)
To perform the calculation, one should choose first the set of independent (fundamental)
variables. On the first stage, one can choose the variables: x = x(V) = (x1,...,x7), where
xi = xi(V), involved in the relations:

x1=pH, x2=E,x3=-log[I–1], x4=-logco,


(39)
x5=-log[SO4–2], x6=-log[NH4+1], x7=-log[CH3COO–1]
On the second stage, this set should be supplemented by the new variable x8 = -log[S4O6–2],
i.e. x = (x1,...,x8).
From calculations it results that addition of KI solution (first stage) causes first a growth
followed by a drop in potential value (Fig.12A). It is accompanied by a growth in pH–value
(Fig.12B). On the stage of Na2S2O3 titration, potential E drops significantly at the vicinity of
 = 1 (Fig.13A). It is accompanied by a slight growth in pH–value (Fig.13B). Fig.13A

Fig. 13. The (A) E vs. Φ relationships plotted in close vicinity of Φ = 1 at pKso for CuI equal
(a) 11.96, (b) 12.6 and (b); (B) pH vs. Φ relationship plotted at pKso = 11.96.
20 Applications of MATLAB in Science and Engineering

indicates also a small difference between the plots of the related titration curves, calculated
for two pKso values: 11.96 and 12.6, found in literature. The speciation curves for some
species on the stage of titration with Na2S2O3 solution, are evidenced in Fig.14. One should
be noticed that sulphate and thiosulfate species do not enter the same (elemental) balance,
see Eqs. (32) and (35); the thiosulfate species are not oxidised by sulphate, i.e. the
synproportionation reaction does not occur.

11. Other possibilities offered by GATES in area of redox systems


Potentiometric titration is a useful/sensitive method that enables, in context with the
simulated data obtained according to GATES, to indicate different forbidden paths of
chemical reactions. Simply, the shapes of E = E() and pH = pH() functions differ
substantially at different assumptions presupposed in this respect. In order to confirm the
metastable state according to GATES, one should omit all possible products forbidden by
reaction barrier(s) in simulated calculations. Otherwise, one can release some reaction paths
and check “what would happen” after inclusion of some species as the products obtained
after virtual crossing the related reaction barriers. Such species are included into the
balances and involved in the related equilibrium constants. This way one can also explain
some phenomena observed during the titration or even … correct experimental data. Mere
errors or inadvertences made in experimental titrations and on the step of graphical
presentation of the results, can be indicated this way.

Fig. 14. The speciation curves plotted for titration of CuSO4 + NH3 + HAc + KI with Na2S2O3;
pKso = 11.96 for CuI; HAc = CH3COOH.

11.1 GATES as a tool for correction/explanation of experimental data


The effect of HgCl2 on the shape of titration curves E = E(), referred to the system 9.2.5,
was indicated in Fig. 10A. The shapes of those curves are in accordance with ones obtained
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 21

experimentally. Namely, the curve in Fig. 15A is similar to the curve a in Fig. 10A, and the
curve in Fig. 15B is similar to the curve b in Fig. 10A.
One can also notice some differences, however. First, the experimental data (potential E
values, (1)) obtained in the system with calomel reference electrode were erroneously
recalculated (2) when referred to normal hydrogen electrode (NHE scale) (Erdey, et al.,
1951/2); simply, the potential of the calomel electrode was subtracted from (not added to)
the experimental E-values. These errors were corrected in (Erdey and Svehla, 1973). The
theoretical curves in Fig. 10A fall abruptly in the immediate vicinity of V = 0. Namely,
E = 1.152 V at V = 0 for the curves a and b; at V = 0.01 mL, E equals 1.072 V for A and
1.068 V for B (in NHE scale). In this context one should be noted that the second
experimental points in Figs. 15A,B, far distant from V = 0, are connected by a rounded line.
One can also explain diffused indications in E values, registered in the middle part of the
titration curve in Fig. 15A. After comparison with the speciation curves plotted in Figs.
11A,B, one can judge that these fluctuations can be accounted for kinetics of the solid iodine
(I2(s)) precipitation/dissolution phenomena.

11.2 Testing the reaction paths


Referring again to the system 9.2.5, one can release some reaction paths, particularly the
ones involved with oxidation of Se(IV)-species and reduction of Hg(II)-species. The paths
are released by setting β = 1 or/and γ = 1 in Eq. (9), in charge balance and in
concentration balances for Se and Hg. Inspection of the plots presented in Figures 16 and
17, and comparison with the plots in Fig. 10A,B leads to conclusion, that β = γ = 0 in the
related balances, i.e. oxidation of Se(IV) and reduction of Hg(II) do not occur during the
titration.

11.3 Validation of equilibrium data


Equilibrium data involved with electrolytic systems refer, among others, to stability
constants of complexes and solubility products of precipitates. It results from the fact that
the equilibrium data values attainable in literature are scattered or unknown.
Some doubts arise when some equilibrium data are unknown on the stage of collection of
equilibrium data (Fig. 1). One can also check up the effect involved with omission of some
types of complexes.
For example, the curve b plotted in Fig. 9A refers to omission of sulphate complexes in the
related balances, referred to the system 9.2.4. The comparison of the corresponding plots
provides some doubts related to the oversimplified approach applied frequently in
literature. In this system, there were some doubts referred to possible a priori complexes of
Mn(SO4)i+3-2i type; the related stability constants are unknown in literature. To check it, the
calculations were made at different stability constants values, K3i, pre-assumed for this
purpose, [Mn(SO4)i+3-2i] = K3i[Mn+3][ SO4-2]i. From Fig. 18 we see that, at higher K3i values
(comparable to ones related to Fe(SO4)i+3-2i complexes), the new inflection points appears at
Φ = 0. 25 and disappears at lower K3i values assumed in the simulating procedure.
Comparing the simulated curves with one obtained experimentally, one can conclude that
the complexes Mn(SO4)i+3-2i do not exist at all or their stability constants are small. Curves a
and b in Fig. 13A illustrate the effect of discrepancy between different equilibrium constant
values, here: solubility product for CuI.
22 Applications of MATLAB in Science and Engineering

Fig. 15. The experimental titration curves copied from (Erdey, et al., 1951/2).

Fig. 16. The E vs. Φ relationships plotted under assumption that (i)  =  = 0 – curve 125 ;
(ii)  = 1,  = 0 – curve 124; (iii)  = 0,  = 1 – curve 135; (iv)  =  = 1 – curve 134; C0 = 0.01,
Ca = 0.02, CSe = 0.02, CHg = 0.07, C = 0.1 [mol/L].

Fig. 17. The pH vs. Φ relationships plotted for the system in section 5.2.2 under assumption
that (i)  =  = 0 – curve 134 ; (ii)  = 1,  = 0 – curve 135; (iii)  = 0,  = 1 – curve 234;
(iv)  =  = 1 – curve 235; C0 = 0.01, Ca = 0.02, CSe = 0.02, CHg = 0.07, C = 0.1 [mol/L].
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 23

Fig. 18. (A) Fragments of hypothetical titration curves plotted for different pairs of stability
constants (K1, K2) of the sulphate complexes Mn(SO4)i+3–2i: 1 – (104, 107), 2 – (103, 106),
3 – (102.5, 105), 4 – (102, 104), 5 – (104, 0), 6 – (103, 0), 7 – (102, 0), 8 – (0, 0) and (B) the titration
curve obtained experimentally; FeSO4 (C0 = 0.01 mol/L) + H2SO4 (Ca = 0.1 mol/L) as D titrated
with C = 0.02 mol/L KMnO4 as T (Michałowski and Lesiak, 1994b; Michałowski, 2010).

12. Resolution of non-equilibrium two-phase electrolytic batch systems with


struvite
Some salts are not the equilibrium solid phases and transform into another solid phases
when introduced into pure water or aqueous solution of a strong acid, or a strong base,
and/or CO2. Such instability characterizes, among others, some ternary salts, such as
struvite, MgNH4PO4 (Michałowski and Pietrzyk, 2006) or dolomite, MgCa(CO3)2
(Michałowski and al., 2009). Resolution of such systems is realizable within GATES, with
use of iterative computer programs, such as MATLAB.
For the study of struvite + aqueous solution system, let us apply the following notations:
pC0 = –logC0; pCCO2 =– logCCO2, pCb = –logCb; pr1 = MgNH4PO4, pr2 = Mg3(PO4)2,
pr3 = MgHPO4, pr4 = Mg(OH)2, pr5 = MgCO3; pri – precipitate of i–th kind (i = 1,...,5) with
molar concentration [pri]; ppri = – log[pri]; Ksoi – solubility product for pri (i=1,...,5).
The instability of struvite in aqueous media can be confirmed in computer simulations,
done with use of iterative computer program MATLAB, realized within GATES. The
approach to this non-redox system is based on charge and concentration balances,
together with expressions for equilibrium constants, involving all physicochemical
knowledge on the system in question, collected in (Michałowski and Pietrzyk, 2006). In
some instances, the dissolution process consists of several steps, where different solid
phases are formed.

12.1 Formulation of the system


The behavior of this system can be followed on the basis of formulation referred to the
system where pure pr1 is introduced into aqueous solution containing dissolved CO2
(CCO2 mol/L) + KOH (Cb mol/l) + HCl (Ca); initial (t = 0) concentration of pr1 in the system
equals C0 mol/L. Taking ppr1 = -log[pr1] as the steering variable, and denoting x = (x1,…,x5)
at CCO2 > 0, we write the balances Fi(x(ppr1)) = 0 formulated as follows:
24 Applications of MATLAB in Science and Engineering

F1=[pr1]+3[pr2]+[pr3]+[pr4]+[Mg+2]+[MgOH+1]+[MgH2PO4+1]+
[MgHPO4]+[MgPO4–1]+[MgNH3+2]+[Mg(NH3)2+2]+ (40)
[Mg(NH3)3+2]+[MgHCO3+1]+[MgCO3]–C0=0

F2=[pr1]+[NH4+1]+[NH3]+[MgNH3+2]+2[Mg(NH3)2+2]+3[Mg(NH3)3+2]–C0=0 (41)

F3=[pr1]+2[pr2]+[pr3]+[H3PO4]+[H2PO4–1]+[HPO4-2]+[PO4- (42)
3]+[MgH PO +1]+[MgHPO ]+[MgPO –1]–C =0
2 4 4 4 0

F4=[H+1]–[OH–1]++[NH4+1]+2[Mg+2]+[MgOH+1]–[HCO3–1]–2[CO3-2]+
[MgH2PO4+1]–[MgPO4–1]+[MgHCO3+1]+2[MgNH3+2]+ (43)
2[Mg(NH3)2+2]+2[Mg(NH3)3+2]–[H2PO4–1]–2[HPO4-2]–3[PO4–3]=0

F5=[H2CO3]+[HCO3–1]+[CO3-2]+[MgHCO3+1]+[MgCO3]–CCO2=0 (44)
where (in Eq. 43)

 = Cb – Ca (45)
On defined stage of pr1 dissolution, concentrations of some (or all) solid phases assumed
zero value. To check it, the qi values:

q1=[Mg+2][NH4+1][PO4-3]/Kso1; q2=[Mg+2]3[PO4-3]2/Kso2;
q3=[Mg+2][HPO4-2]/Kso3; (46)
q4=[Mg ][OH–1]2/Kso4; q5=[Mg+2][CO3-2]/Kso5
+2

for different potentially precipitable species pri (i=1,...,5) were ‘peered’ in computer program
applied for this purpose.
Concentration of MgCO3, i.e. [pr5], has not been included in the concentration balances (40)
and (44) specified above. Simply, from the preliminary calculations it was stated that, at any
case considered below, pr5 does not exist as the equilibrium solid phase.
At the start for calculations, the fundamental variables were chosen, namely:

x1=pMg=–log[Mg+2], x2=pNH3=–log[NH3],
x3=pHPO4=–log[HPO4-2], (47)
x4=pH, x5=pHCO3=–log[HCO3–1]
At CCO2 = 0 (pCCO2 = ), Eq. (44) does not enter in the set of balances and four fundamental
variables, x = (x1,…,x4), are applied

x1=pMg=–log[Mg+2],x2=pNH3=–log[NH3],x3=pHPO4=–log[HPO4-2],x4=pH (48)
and the sum of squares

SS = i=1n [Fi(x, ppr1)]2 (49)


is taken as the minimized (zeroed) function; n=5 at CCO2 > 0 and n=4 at CCO2 = 0.
At further steps of pr1 dissolution in defined medium, the variable ppri = –log[pri], related
to concentration [pri] of the precipitate pri formed in the system, was introduced against the
old variable (e.g., pMg), when the solubility product Ksoi for the precipitate pri was attained;
some changes in the algorithm were also made. Decision on introducing the new variable has
been done on the basis of ‘peering’ the logqi values (Eq.(46)). This way, one can confirm that
the solid species pri is (or is not) formed in the system, i.e. logqi = 0 or logqi < 0.
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 25

Generally, the calculation procedure and graphical presentation was similar to one
described in the paper (Michałowski and Pietrzyk, 2006). It concerns particular species and
values for the solubility or dissolution (s, mol/L) of pr1, expressed by the formula

s=[Mg+2]+[MgOH+1]+[MgH2PO4+1]+[MgHPO4]+[MgPO4–1]+
(50)
[MgNH3+2]+[Mg(NH3)2+2]+[Mg(NH3)3+2]
at CCO2 = 0, or

s’ = s + [MgHCO3+1] + [MgCO3] (51)


at CCO2 > 0.

12.2 The struvite dissolution – graphical presentation


The results of calculations, presented graphically in Figs. 19 – 21, are referred to two
concentrations C0 [mol/L] of pr1: pC0 = 3 and 2, when introduced it (t = 0) into aqueous
solution of CO2 (CCO2 mol/L) + KOH (Cb mol/L), Ca = 0. Particular cases: CCO2 = 0 and Cb = 0,
were also considered.

(a) (b) (c)

(d) (e) (f)


Fig. 19. The logqi vs. ppr1 relationships for different pri (i = 1, ... ,5), at different sets of
(pC0, pCCO2, pCb) values: (a) (3, 4, ); (b) (3, , ); (c) (3, 4, 2); (d) (2, 4, ); (e) (2, 4, 2);
(f) (2, 2, ).
26 Applications of MATLAB in Science and Engineering

In further parts of this chapter, two values: Cb = 0 and Cb = 10–2 [mol/L] for KOH
concentration will be considered. The calculations will be done for different concentrations
of CO2, expressed by pCCO2 values, equal 2, 3, 4, 5 and .
The results obtained provide the following conclusions.
At pC0 = 3, pCCO2 = 4 and pCb = , the solubility product Kso2 for pr2 is attained at ppr1 =
3.141 (Fig. 19a), and then pr2 is precipitated

3pr1 = pr2 + HPO4-2 + NH3 (52)


This process lasts, up to total depletion of pr1 (Fig.20a), i.e. the solubility product for pr1 is
not attained (q1 < 1). The pH vs. ppr1 relationship is presented in Fig. 21a. Before Kso2 for pr2
is attained, the values: [pr2] = [pr3] = [pr4] = 0 were assumed in Eqs. (40) and (42). Then,
after Kso2 attained, [pr2] is introduced into (40) and (42), as the new variable. The related
speciation curves are plotted in Fig.20a. The plots in Figs. 19a, 20a and 21a can be compared
with ones (Figs. 19b, 20b, 21b), related to pC0 = 3, pCCO2 =  and pCb =  (i.e. CCO2=Cb=0).
The course of speciation curves (Figs. 20a,20b) testifies on account of the validity of the
reaction notation (52), that involves the predominating species in the system.

(a) (b) (c)

(d) (e) (f)


Fig. 20. The log[Xi] vs. ppr1 relationships for indicated components Xi at different sets of
(pC0, pCCO2, pCb) values: (a) (3, 4, ); (b) (3, , ); (c) (3, 4, 2); (d) (2, 4, 2); (e) (2, 2, );
(f) (2, 2, ) (detailed part of Fig. e).
At pC0 = 3, pCCO2 = 4 and pCb = 2, i.e. for the case of pr1 dissolution in alkaline media
(Cb >> CCO2), the pr4 precipitates
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 27

pr1 + 2OH-1 = pr4 + NH3 + HPO4-2 (53)


nearly from the very start of pr1 dissolution, ppr1 = 3.000102 (Fig.19c,20c). The
transformation of pr1 into pr4 lasts up to the total pr1 depletion.
At pC0 = 2, pCCO2 = 4 and pCb = , the solubility product for pr2 is attained at ppr1 = 2.013
(Fig. 19d) and pr2 precipitates according to reaction (52) up to ppr1 = 2.362, where the
solubility product for pr1 is crossed and the dissolution process is terminated. At
equilibrium, the solid phase consists of the two non-dissolved species pr2 + pr1. The pH vs.
ppr1 relationship is presented in Fig. 21c.
At pC0 = 2, pCCO2 = 4 and pCb = 2, the process is more complicated and consists on three stages
(Fig.19e). On the stage 1, pr4 precipitates first (Eq. 53), nearly from the very start of pr1
dissolution, up to ppr1 = 2.151, where Kso2 for pr2 is attained. Within the stage 2, the solution is
saturated toward pr2 and pr4. On this stage, the reaction, expressed by the notation

2pr1 + pr4 = pr2 + 2NH3 + 2H2O (54)


occurs up to total depletion of pr4 (at ppr1 = 2.896), see Fig.20d. On the stage 3, the reaction

3pr1 + 2OH-1 = pr2 + 3NH3 + HPO4-2 + 2H2O (55)


occurs up to total depletion of pr1, i.e. solubility product (Kso1) for pr1 is not crossed. The
pH changes, occurring during this process, are presented in Fig. 21d.

(a) (b) (c)

(d) (e)
Fig. 21. The pH vs. ppr1 relationships plotted at different sets of (pC0, pCCO2, pCb) values: (a)
(3, 4, ); (b) (3, , ); (c) (2, 4, ); (d) (2, 4, 2); (e) (2, 2, ).
28 Applications of MATLAB in Science and Engineering

At pC0 = 2, pCCO2 = 2 and pCb = , after the solubility product for pr3 attained (line ab at
ppr1 = 2.376), pr3 is the equilibrium solid phase up to ppr1 = 2.393 (line cd), where the
solubility product for pr2 is attained, see Fig.19f. For ppr1  < 2.393, 2.506 >, two
equilibrium solid phases (pr2 and pr3) exist in the system. Then, at ppr1 = 2.506, pr3 is
totally depleted (Fig.20e,2f), and then pr1 is totally transformed into pr2. On particular
steps, the following, predominating reactions occur:

pr1 + 2H2CO3 = Mg+2 + NH4+1 + H2PO4–1 + 2HCO3–1 (56)

pr1 + H2CO3 = pr3 + NH4+1 + HCO3–1 (57)

pr1 + 2pr3 = pr2 + NH4+1 + H2PO4–1 (58)

3pr1 + 2H2CO3 = pr2 + 3NH4+1 + H2PO4–1 + 2HCO3–1 (59)


At ppr1 > 2.506, only pr2 is the equilibrium solid phase. The pH vs. ppr1 relationship is
presented in Fig. 21e.
All the reaction equations specified above involve predominating species of the related
systems. All them were formulated on the basis of the related speciation plots (Figs. 20a–20f)
and confronted with the related plots of pH vs. ppr1 relationships. Particularly, OH–1 ions
participate the reactions (53) and (55) as substrates and then pH of the solution decreases
during the dissolution process on the stages 1 and 3 (see Fig. 21d). On the stage 2, we have
pH  constant (see Eq. 58 and Fig. 21d). A growth in concentration of NH3 and HPO4–2 is
also reflected in the reactions (53) – (55) notations.

12.3 Composition of the solid phase when equimolar quantities of reagents are mixed
In this section, the solid products obtained after mixing equimolar solutions of MgCl2 and
NH4H2PO4 are considered at CCO2 = 0, i.e. in absence of CO2. The concentrations are then
equal C mol/L for magnesium, nitrogen and phosphorus (CMg = CN = CP = C). It will be
stated below that the solid phase composition is also affected by the C value.

Fig. 22. The [pri] vs pH plots at C = 0.0075 mol/L.


Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 29

The relations between concentrations of different precipitates were calculated at pKso1=12.6,


pKso2=24.38 and different C-values (0.0075, 0.02 and 0.06) assumed and presented
quantitatively in Figs. 22-24. In all instances, the values: pKso3 = 5.5, pKso4 = 10.74 and all
other physicochemical data cited in [1] were assumed; pr5 is not precipitated at any
instances considered in this system. Particularly, at C = 0.0075 it is seen that concentrations
of pr1 and pr2 are comparable at pH ca 9.

Fig. 23. The [pri] vs pH plots at C = 0.02 mol/L.

Fig. 24. The [pri] vs pH plots at C = 0.06 mol/L.


The equilibrium constants values quoted in literature for particular species formed in the
system in question are divergent. It refers, among others, to different values for pKso1 and
pKso2 quoted in literature. The calculations were done on the following way.
When the solubility product (Ksoi) for a particular precipitate (pri) has been crossed, the
concentration [pri] was involved in the related balances. At any case, the pH values
30 Applications of MATLAB in Science and Engineering

(pH  13) were related to the systems with the equilibrium solid phase(s) involved. To omit
the concentration of the points referred to different -values, only a part of them were
plotted in the related figures (Fig. 25ab,c). Except for the data specified in Fig. 25c, where pr1
exists as the sole solid phase within pH ca 7 – 9, irrespectively on the C-value assumed on
the ordinate. In other instances, pr1 is accompanied by pr2.

(a) (b) (c)


Fig. 25. The regions for indicated precipitates in (pH, C) area, calculated at different
literature data for (pKso1 , pKso2) pair: (a) (12.6, 24.38); (b) (13.15, 24.38); (c) 13.15, 23.1);
pKsp3 = 5.5, pKso4 = 10.74 and other equilibrium data as ones quoted in [1].

13. A reference to kinetics in batch systems


GATES can be considered as the most general thermodynamic approach to electrolytic
systems. However, one can find some reference of GATES to kinetic systems, and oscillating
reactions in particular (Michałowski et al., 1996). The Belousov-Zhabotinsky (BZ) and the
Bray-Liebhafsky (BL) systems, where temporal oscillations take place in continuously stirred
batch reactors, are well-known examples there. Their oscillating behavior is not sufficiently
known till now, as yet. The assumption of a perfect, vigorous stirring (with a stirrer or inert
gas) under isothermal conditions enables the transport (diffusion) phenomena to be omitted
in mathematical description of the process in question. One of the BZ oscillating systems is
based on oxidation of organic components containing active methylene (-CH2-) group (e.g.,
malonic or citric acid) with BrO3-1 ions, in presence of cerium Ce+4/Ce+3 pair, in acidic
(H2SO4) media.
To elucidate the kinetics of oscillation, exhibited by changes in potential and/or absorbance
of the system, some mathematical models were applied. For example, the model known as
Oregonator was usually applied for description of BZ reaction in homogeneous, perfectly
mixed batch systems. Although a number of papers appear each year in chemical
periodicals, an expected turning-point in generalizing approach has not set in, however
(Györgyi and Field, 1992).
The oscillating reactions can proceed at constant volume and constant total concentrations
of all components consisting the system (solution). It enables the related balances involved
in the system to be applied. Note that radical species can also be involved within GATES,
compare with Eq. (5).
All oscillating reactions known hitherto are based on electron-transfer phenomena. As a
particular case, a system containing a constant, defined number of reagents mixed together,
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 31

can be considered. Thus, s+2 balances and their time derivatives, written in general forms
(Michałowski et al., 1996):

ij  [X j
zj
]i  0 (60)
j

z
d[ X j j ]
ij  dt
0 (61)
j

(i = 1,…,s+2) are valid. Eqs. (60) and (61) form a set of 2(s+2) linearly independent equations
(60), completed by linearly independent relations between concentrations of some species.
All primary, intermediate and final products originated from organic substance (e.g.,
malonic acid) should be involved in (60) and (61), also as complexes with other ions. A due
set of parameters, of both thermodynamic (e.g., standard potentials, stability constants of
complexes, dissociation constants) and kinetic (rate constants) nature, are involved in there.
In closed systems, with diathermal walls securing isothermal course of reactions, equations
(60) and (61) are considered as (independent on time) constraints put on concentrations and
rated of reactions in the system.
The time-derivatives in Eq. (61) can be expressed as follows

z
d[ X j j ]
  k ju  f u ( x)   k jv  f v ( x) (62)
dt u v

where kjw – rate constants, w = u, v, kjw ≥ 0, fu(x), fv(x) – functions involving rationally
selected concentrations [Xl]. Some species entering the balances (60), e.g., [Na+1] introduced
by sodium bromate in BZ system, do not participate the oscillation reactions and their
concentrations remain unchanged, e.g., d[Na+1]/dt = 0.
The set of independent variables should be then formulated. For example, bromine species
can be expressed by relations similar to (16), obtained on the basis of mass action law, and
formulae (12). The choice of independent variables is conditioned by appropriate measuring
devices applied; e.g., [Br-1] is measured with ion-selective bromine electrode, potential E –
with platinum indicator electrode, pH – with glass electrode – all inserted with a reference
electrode, in perfectly mixed cell (reactor).
Concentrations of some components cannot be directly measured with a specific, indicator
electrode. In such instances, other analytical techniques must be put in work; e.g., Ce(IV)
species absorb light and this property can be exploited for analytical purposes. Absorbance
A, measured at wavelength λ, can be expressed by equation

A   j  [X j j ]
z
(63)
j

involving the species in defined λ-range; ωj = ωj(λ) are the coefficients defined as products of
molar absorptivities, εj = εj(λ), and the path length (l) of light in cuvette, ωj = εj·l. It enables
any system of this kind to be resolved.
The measuring cell applied for determination of kinetic parameters should provide the
possibility of simultaneous measurements of different parameters in situ, at different
32 Applications of MATLAB in Science and Engineering

moments of time t. The parameters considered can be found in iterative manner, through
fitting the above equations to experimental data registered at different t values. Resolution
of the equations and discrimination of the model may provide the temporal relationships, yj
= yj(t), namely: [Xj] = fj(t), E = E(t), pH = pH(t), A = A(t). The relationships can be presented
graphically, in 2D and 3D space.
The rudimentary formulation of balances (60) and (61) requires, among others, a deep
knowledge of intermediate species formed during gradual oxidation of the organic
substance (considered as the paliwo of this reaction). The experience is also needed to
distinguish between the processes proceeding instantly (where equilibrium constants are
only involved) and ones of kinetic nature, where rate constants are also applied.
Some limitations are caused by nature of the species formed; e.g., a limited solubility of CO2
in BZ or O2 in BL has to be taken into account (Gyorgyi et al., 1992).

14. Conclusions
The computer simulation realized within GATES with use of iterative computer programs,
e.g., MATLAB, provides quite a new quality in knowledge gaining. It enables to follow the
details of the process, registered with use of measurable quantities, such as pH and/or
potential E. When referred to redox systems, it enables to gain incomparably better
knowledge (Michałowski, 2010) than one offered hitherto by the well-known Pourbaix
diagrams. GATES enables to avoid the necessity of quantitative inferences based on
fragile/rachitic chemical reaction notation, involving only some of the species existing in the
system. From the GATES viewpoint, the ‘stoichiometry’ can be perceived only as a
mnemonic term. In calculations, the metastable state is realised by omission of potential
products in the related balances, whereas ‘opening’ a reaction pathway in metastable state is
based on insertion of possible (from equilibrium viewpoint) products in the related
balances. One can also test the interference effects, of different kind.
Concentrations of the species in redox systems cover frequently much wider range of values
than in non-redox systems. For example, the concentrations of oxidized forms of chloride in
the system 9.2.5 are negligibly small in comparison with [Cl-1]; concentration of Cl2 (the
oxidized chlorine species of the highest concentration) is smaller than 10-14 mol/L. The
concentrations of heptavalent iodine specie are lower than 10-20 mol/L in this system
(Michałowski and Lesiak, 1994b). However, this information is not attainable a priori, i.e.
before starting for calculations. Consideration of the generalized model before prior
knowledge on the relative contents of different species, is the great advantage of GATES.
The course of the plots referred to different species enables to distinguish between the main
and accompanying reactions, see e.g., Figs. 6 and 7.
Some details inherent in two-phase systems cannot be tracked experimentally, with use of
physicochemical or analytical instrumentation known hitherto. For example, any electrode
introduced into two-phase system is the extraneous body acts as a centre of crystallisation in
two-phase systems and disturbs e.g., nucleation processes occurred in such systems.
Moreover, the indications of a measuring system lag behind the processes that, additionally,
are based on the assumption that the process occurs uniformly within the whole system
tested. The mixing device applied for this purpose is another kind of extraneous body,
affecting similarly as the electrodes. Then the simulation of the dynamic processes according
to GATES with use of the iterative computer program, e.g., MATLAB, involving all
attainable (and pre-selected) physicochemical knowledge appears then to be the one and
Application of GATES and MATLAB for Resolution of
Equilibrium, Metastable and Non-Equilibrium Electrolytic Systems 33

only way to track them efficiently. It refers both to batch and dynamic systems, whose
speciation can be followed this way.
Application of the simulating procedure (optimization a priori) enabled to apply some
essential modifications and significant improvements of in the models applied for
physicochemical and analytical needs Michałowski et al., 2008; Michałowski et al., 2011;
Ponikvar et al., 2008).
According to author’s experience, the main difficulties in the right description of redox
systems arise on the line of junction between thermodynamics and kinetics; this line is not
precisely defined in many metastable systems. One should notice that involving some
species or a group of species in the balances is tantamount with ‘overthrowing’ the potential
barrier for a reaction that is effective from thermodynamic viewpoint, but does not proceed
with respect to the kinetics involved. All the inferences are based on firm, mathematical
(algebraic) foundations, not on an extremely ‘fragile’ chemical notation principle that is only
a faint imitation of a true, algebraic notation. The approach proposed allows to understand
far better all physicochemical phenomena occurring in the system in question and improve
some methods of analysis. All the facts testify very well about the potency of simulated
calculations made, according to GATES, on the basis of all attainable physicochemical
knowledge. Testing the complex redox and non–redox systems with use of iterative
computer programs deserves wider popularisation among physico-chemists and chemists–
analysts.
The generalised approach to electrolytic systems (GATES), with the generalized electron
balance (GEB) concept included, is the most general theory related to thermodynamic
description of equilibrium and metastable electrolytic systems, of any degree of complexity.
Within GATES, all attainable/preselected physicochemical knowledge can be involved.
GATES is related to non-redox and redox (batch and dynamic) systems. The GEB, results
from elemental balances for H and O. Within GATES, stoichiometry is the derivative
concept only.
All electrolytic systems can be reconstructed on the basis of three fundamental laws
obligatory in GATES: (1) law of charge conservation, (2) conservation of elements, (3) law of
mass action. Other laws known in chemistry originate from these laws. Summarizing, the
GATES can be perceived as the introductory step for theory of everything (TOE) in
chemistry of electrolytic systems.

15. References
Erdey, L., Bodor, E., Buzas,H., (1951/52), Fresenius' Zeitschrift für Analytische Chemie, 134 22-,
ISSN: 0016-1152.
Erdey, L., Svehla, G., Ascorbinometric Titrations, Akadémiai Kiadó, Budapest 1973.
Györgyi, L., Field, R.J. (1992), A three-variable model of deterministic chaos in the Belousov–
Zhabotinsky reaction, Nature Vol. 355, (27 February), pp. 808-810; ISSN : 0028-0836
Gyorgyi, L., Field, R.J., Noszticzius, Z., McCormic, W.D., Swinney, H.L., (1992),
Confirmation of high flow; rate chaos in the Belousov- Zhabotinsky reaction,
Journal of Physical Chemistry, Vol. 96, Issue 3, pp. 1228-1233; ISSN 0022-3654.
Michałowski, T., (1994), Calculation of pH and potential E for bromine aqueous solution,
Journal of Chemical Education, Vol. 71, Issue 7, pp. 560-562, ISSN: 0021-9584
Michałowski, T., Lesiak, A., (1994a). Acid-base titration curves In disproportionating redox
systems, Journal of Chemical Education, Vol. 71, Issue 8, pp. 632-636, ISSN: 0021-9584.
34 Applications of MATLAB in Science and Engineering

Michałowski, T., Lesiak, A., (1994b). Formulation of generalized equations for redox
titration curves, Chemia Analityczna (Warsaw), Vol. 39, pp. 623-637, ISSN: 0009-2223.
Michalowski, T, Wajda, N., Janecki, D.,(1996), An unified quantitative approach to
electrolytic systems, Chemia Analityczna (Warsaw), Vol. 41, Issue 4, pp. 667-685,
ISSN: 0009-2223.
Michałowski, T. (2001), Calculations in Analytical Chemistry with Elements of Computer
Programming (in Polish), ISBN: 83-7242-173-0, Cracow University of Technology,
Cracow, Poland; ISBN: 83-7242-173-0.
Michalowski, T., Rymanowski, M., Pietrzyk, A., (2005), Nontypical Brønsted Acids and
Bases, Journal of Chemical Education, Vol. 82, Issue 3, pp. 470-472, ISSN: 0021-9584.
Michałowski, T.., Pietrzyk, A., (2006), A thermodynamic study of struvite+water system,
Talanta, 68 (2006) 594-601; ISSN 0039-9140.
Michałowski, T., Kupiec, K., Rymanowski, M. (2008), Numerical analysis of the Gran
methods, Analytica Chimica Acta, Vol. 606, Issue 2, (January 14), pp. 172-183. ISSN:
0003-2670.
Michałowski,T., Borzęcka, M., Toporek, M., Wybraniec, S., Maciukiewicz, P., Pietrzyk, A.,
(2009) Quasistatic Processes in Non-Equilibrium Two-Phase Systems with Ternary
Salts: II. Dolomite + Aqueous Media, Chem. Anal. (Warsaw) 54, 1203-1217
Michałowski, T. (2010). The Generalized Approach to Electrolytic Systems. I.
Physicochemical and Analytical Implications, Critical Reviews in Analytical
Chemistry, Vol. 40, Issue 1, (January, 2010) pp. 2-16, ISSN: 1040-8347
Michałowski, T., Pietrzyk A., Ponikvar-Svet, M., Rymanowski M. (2010), The Generalized
Approach to Electrolytic Systems: II. The Generalized Equivalent Mass (GEM)
Concept, Critical Reviews in Analytical Chemistry, Vol. 40, Issue 1 (January, 2010), pp.
17–29, ISSN: 1040-8347.
Michałowski, T., Pilarski, B., Ponikvar-Svet, M., Asuero, A.G., Kukwa, A., Młodzianowski,
J., (2011), New methods applicable for calibration of indicator electrodes, Talanta,
Vol. 83, Issue 5, pp. 1530-1537; ISSN 0039-9140.
Ponikvar, M., Michałowski, T., Kupiec, K., Wybraniec, S., Rymanowski, M. (2008),
Experimental verification of the modified Gran methods applicable to redox
systems, Analytica Chimica Acta, Vol. 628, Issue 2 (3 November), pp. 181-189 ISSN:
0003-2670.
0
2

From Discrete to Continuous Gene Regulation


Models – A Tutorial Using the Odefy Toolbox
Jan Krumsiek1,2 , Dominik M. Wittmann1,3 and Fabian J. Theis1,3
1 Institute of Bioinformatics and Systems Biology, Helmholtz Zentrum München
2 Center of Life and Food Sciences, Technische Universität München
3 Department of Mathematics, Technische Universität München

Germany

1. Introduction
Vital functions of living organisms, such as immune responses or the metabolism, are
controlled by complex regulatory networks. These networks comprise, amongst others,
regulatory genes called transcription factors and cascades of information-processing proteins
such as enzymes. The ultimate goal of the increasingly popular systems biology approach is to
set-up extensive computer models that closely reflect the real-life behavior of these biological
networks (Kitano, 2002; Werner, 2007). With a reasonable in silico implementation at hand,
novel predictions, e.g. about the effect of gene mutations, can be generated by the computer.
The two basic modes of regulation we concentrate on here, are inhibition and activation
between two factors. Figure 1A visualizes the relation between the concentrations of
e.g. two transcription factors, which are linked by an activation (left-hand figure) or inhibition
(right-hand figure). Figure 1B shows a network of interacting activations and inhibitions as it
might be found in living cells. While a single regulatory interaction can easily be understood,
the complex wiring of several interactions, even for a medium-scale model as depicted here,
renders the manual investigation of the system’s dynamics unfeasible. For further information
on the concepts of regulation, we refer biologically interested readers to Alon (2006).
Classical computational modeling approaches attempt to describe biochemical reaction
networks as systems of ordinary differential equations (ODEs) (Klipp et al., 2005; Tyson
et al., 2002). This requires detailed knowledge about the molecular mechanisms in order
to implement precise kinetic rate laws for each biochemical reaction. However, for many
biological systems, and especially gene-regulatory networks, only qualitative information
about interactions, like “A inhibits B“, is available. A well-established workaround for
this lack of information is the application of discrete modeling approaches. In Boolean
methodology we abstract from actual molecule quantities and assign each player in the system
the state on or off (e.g. active or inactive). Despite their simplicity, Boolean models have been
shown to provide valuable information about the general dynamics and capabilities of the
underlying system (Albert & Othmer, 2003; Fauré et al., 2006; Samaga et al., 2009).
To bridge the gap between discrete and fully quantitative models, we developed Odefy,
a MATLAB- and Octave-compatible toolbox for the automated transformation of Boolean
36
2 Applications of MATLAB in Science and Engineering
Lithography

Fig. 1. A Two basic modes of regulation, e.g. between two genes and their proteins. If the
regulatory factor (red) constitutes an activatory influence towards another factor (blue), it
will increase the activity of the blue factor, whereby the magnitude of this activation is
dependent on the expression of the red factor itself. Inhibition acts analogously, but the
expression of both factors is anti-correlated. B Regulatory interactions are part of complex
gene-regulatory networks which can be analyzed only by means of computational tools.

models into systems of ODEs (Krumsiek et al., 2010; Wittmann et al., 2009a). Odefy
implements a canonical way of transforming Boolean into continuous models, where the
use of multivariate polynomial interpolation allows transformation of logic operations into a
system of ODEs. Furthermore, we optionally apply sigmoidal Hill functions to get reasonable
approximations of real gene regulation dynamics. The Odefy software provides convenient
access to different model sources, the conversion process itself and various analysis and
export methods. After generating the ODEs, the user can easily adjust model parameters and
perform time-course simulations using Odefy’s graphical user interface. The ODE systems
can be exported to MATLAB script files for further usage in MATLAB programs, to ODE script
files for the R computing platform, to the SBML format, or to the well-established MATLAB
Systems Biology Toolbox (Schmidt & Jirstrand, 2006). Due to the nice mathematical properties
of the produced ODEs and the integration with state-of-the-art modeling tools, a variety of
analysis methods can be immediately applied to the models generated by Odefy, including
bifurcation analysis, parameter estimation, parameter sensitivity analysis, and the like.
This chapter is organized as follows. First, we will review the theoretical background of the
Odefy method by introducing Boolean models, the interpolation process and Hill functions
as a generalization of Michaelis-Menten kinetics. Next, the general structure of the Odefy
toolbox as well as details about model representation and input formats are discussed. In
the major part of this chapter, we will guide the reader through four sample applications of
our toolbox, which include both regular Boolean modeling as well as Odefy-converted ODE
models, see Table 1 for a detailed overview. The Odefy toolbox can be freely downloaded
from http://hmgu.de/cmb/odefy. All codes and additional files used in the examples
throughout this chapter are located at http://hmgu.de/cmb/odefymaterials.

2. Mathematical backgrounds
In the following, we provide a brief introduction to Boolean models in general, and the
automatic conversion of Boolean models into continuous systems of ordinary differential
equations. For more detailed information on these topics, we refer the reader to the papers
Krumsiek et al. (2010); Thomas (1991); Wittmann et al. (2009a).
From Discrete
Tutorial Usingto
theContinuous Gene Regulation Models – A Tutorial Using the Odefy Toolbox 373
From Discrete to Continuous Gene Regulation
Models – A Odefy Toolbox

qualitative quantitative
knowledge data

refinement of model
experimental design
explanation of data,
representation
mathematical

Boolean continuous
model model
transformation

Fig. 2. Qualitative knowledge of regulatory interactions can readily be transformed into


Boolean models. The models are then automatically converted to a continuous ODE model
by our approach, making them suitable for quantitative analysis and comparison to real data.
Figure taken from Wittmann et al. (2009a)
Section Biological system Odefy techniques
4 Toy example the graphical user interface, the toolbox’s main
functionalities, definition of Boolean models
in the yEd graph editor, adjustment of initial
values and parameters, Boolean and ODE
time-course simulations
5 The genetic toggle switch advanced model input, advanced
functionalities from the MATLAB command
line, generating the Boolean state-transition
graph, finding Boolean steady-states,
phase-plane visualizations
6 Differentiation of mid- and hindbrain automated model selection
7 Large-scale model of T-cells export options, connecting Odefy to the SB
toolbox, model to .mex compilation
Table 1. Overview of the biological systems and Odefy techniques explained in sections 4–6.

2.1 Boolean models


In a Boolean model, the actual concentration or activity of each factor is abstracted to be either
’on’ or ’off’, active or inactive, 1 or 0. In a system of N factors with discretized time, regulatory
interactions can be described by a set of Boolean update rules that determine the value of each
factor xi at the next time step t + 1, dependent on all factors in the current time step:

xi (t + 1) := Bi xi1 (t), xi2 (t), . . . , xiNi (t) ∈ {0, 1} , i = 1, 2, . . . N .

Boolean update functions Bi could, for instance, be represented as multidimensional truth


tables, containing an assignment of zero or one for each combination of input factors. A
38
4 Applications of MATLAB in Science and Engineering
Lithography

more convenient and intuitive way of representing Boolean update functions is the usage
of symbolic equations with logical operators. For example,

A(t + 1) = ( B(t) ∨ C (t)) ∧ ¬ D (t)

represents a regulatory interaction where A will be ’on’ in the next time step if and only if at
least one of the activators B and C is present and the inhibitor D is absent. For simplicity, we
leave out time dependencies in the Boolean equations:

A = (B ∨ C) ∧ ¬D

Some exemplary evaluations for this equation: (i) if B=1,C=0,D=0 then A will be 1; (ii)
likewise, if B=0,C=1,D=0 then A=1; (iii) if D=1, then A=0 regardless of the values of B and
C.
When computing the follow-up state for the next time point t + 1 from the current time point
t, two principal updating schemes can be employed (cf. Fauré et al. (2006)). When following
a synchronous updating policy, the states of all factors are updated at the same time. On the
other hand, when performing asynchronous updating, the value of only one factor is changed
during each time step. For the latter case, an update order for the players in the system is
required. In Odefy, one can either provide a predefined update order (e.g. B, A, D, C) that will
be followed, or one can let the toolbox randomly select a player at each new time step.

2.2 From Boolean models to ordinary differential equations


We now describe how to generate a system of ordinary differential equations (ODEs), given a
set of Boolean update functions Bi . The main idea is to convert the above discrete model into
a continuous ODE model, where each species xi is allowed to take values xi ∈ [0, 1], and its
temporal development is described by the ordinary differential equation

1  
ẋi = Bi xi1 , xi2 , . . . , xiNi − xi .
τi

The right-hand side of this equation consists of two parts, an activation function Bi describing
the production of species xi and a first-order decay term. An additional parameter τi is
introduced to the system, which can be understood as the life-time of species xi . Bi can be
considered a continuous homologue of the Boolean update function. The key point is how it
can be obtained from Bi in a computationally efficient manner. We present here three concrete
approaches of extending a Boolean function to the continuous interval [0,1]. The basis of all
three transformation methods are the so-called BooleCubes:

" #
1 1 1 N
I
B ( x1 , x2 , . . . , x N ) := ∑ ∑ ··· ∑ B( x1 , x2 , . . . , x N ) · ∏ ( xi xi + (1 − xi ) (1 − xi ))
x1 =0 x2 =0 x N =0 i =1

which we obtain by multilinear interpolation of the Boolean function B, cf. Figure 3A.
I
The functions B are affine multilinear. Many molecular interactions, however, are known
to show a switch-like behavior, which can be modeled using sigmoidal Hill functions
f ( x ) = x n / ( x n + kn ), see Figure 3B. Hill functions are a generalization of the well-known
Other documents randomly have
different content
their approving of an armed hypocrisy,” was not more applicable to
the rulers of Barbary than to the people of England. “Puffed up with
their successes, they forgot their obedience, and these saints denied
the king the fifth part of their spoils.... By which it appeared that
they took up arms, not out of love for their country and zeal for their
religion, but out of desire of rule.” There is, indeed, nothing in these
utterances which need have prevented the writer from consistently
promoting the Revolution of 1688; yet his principles seem to have
carried him far in the opposite direction; and it is interesting to
remember that the assertor in Convocation of the doctrine of
indefeasible hereditary right was the father of the author of the
Whig Examiner and the Freeholder. However decidedly Joseph may
have dissented from his father’s political creed, we know that he
entertained admiration and respect for his memory, and that death
alone prevented him from completing the monument afterwards
erected in Lancelot’s honour in Lichfield Cathedral.
Of Addison’s mother nothing of importance is recorded. His second
brother, Gulston, became Governor of Fort St. George, in the East
Indies; and the third, Lancelot, followed in Joseph’s footsteps so far
as to obtain a Fellowship at Magdalen College, Oxford. His sisters,
Jane and Anna, died young; but Dorothy was twice married, and
Swift records in her honour that she was “a kind of wit, and very like
her brother.” We may readily believe that a writer so lively as
Lancelot would have had clever children, but Steele was perhaps
carried away by the zeal of friendship or the love of epigram when
he said, in his dedication to the Drummer: “Mr. Dean Addison left
behind him four children, each of whom, for excellent talents and
singular perfections, was as much above the ordinary world as their
brother Joseph was above them.” But that Steele had a sincere
admiration for the whole family is sufficiently shown by his using
them as an example in one of his early Tatlers:
“I remember among all my acquaintance but one man
whom I have thought to live with his children with
equanimity and a good grace. He had three sons and one
daughter, whom he bred with all the care imaginable in a
liberal and ingenuous way. I have often heard him say he
had the weakness to love one much better than the other,
but that he took as much pains to correct that as any
other criminal passion that could arise in his mind. His
method was to make it the only pretension in his children
to his favour to be kind to each other, and he would tell
them that he who was the best brother he would reckon
the best son. This turned their thoughts into an emulation
for the superiority in kind and tender affection towards
each other. The boys behaved themselves very early with
a manly friendship; and their sister, instead of the gross
familiarities and impertinent freedoms in behaviour usual
in other houses, was always treated by them with as
much complaisance as any other young lady of their
acquaintance. It was an unspeakable pleasure to visit or
sit at a meal in that family. I have often seen the old
man’s heart flow at his eyes with joy upon occasions
which would appear indifferent to such as were strangers
to the turn of his mind; but a very slight accident, wherein
he saw his children’s good-will to one another, created in
him the god-like pleasure of loving them because they
loved each other. This great command of himself in hiding
his first impulse to partiality at last improved to a steady
justice towards them, and that which at first was but an
expedient to correct his weakness was afterwards the
measure of his virtue.”[5]
This, no doubt, is the set description of a moralist, and to an age in
which the liberty of manners has grown into something like license it
may savour of formalism and priggishness; but when we remember
that the writer was one of the most warm-hearted of men, and that
the subject of his panegyric was himself, full of vivacity and impulse,
it must be admitted that the picture which it gives us of the Addison
family in the rectory of Milston is a particularly amiable one.
Though the eighteenth century had little of that feeling for natural
beauty which distinguishes our own, a man of Addison’s imagination
could hardly fail to be impressed by the character of the scenery in
which his childhood was passed. No one who has travelled on a
summer’s day across Salisbury plain, with its vast canopy of sky and
its open tracts of undulating downland, relieved by no shadows
except such as are thrown by the passing cloud, the grazing sheep,
and the great circle of Stonehenge, will forget the delightful sense of
refreshment and repose produced by the descent into the valley of
the Avon. The sounds of human life rising from the villages after the
long solitude of the plain, the shade of the deep woods, the coolness
of the river, like all streams rising in the chalk, clear and peaceful,
are equally delicious to the sense and the imagination. It was,
doubtless, the recollection of these scenes that inspired Addison in
his paraphrase of the twenty-third Psalm:
“The Lord my pasture shall prepare,
And feed me with a shepherd’s care.
· · · · · ·
When in the sultry glebe I faint,
Or on the thirsty mountain pant,
To fertile vales and dewy meads
My weary wandering steps he leads,
Where peaceful rivers, soft and slow,
Amid the verdant landscape flow.”
At Amesbury he was first sent to school, his master being one Nash;
and here, too, he probably met with the first recorded adventure of
his life. It is said that having committed some fault, and being fearful
of the consequences, he ran away from school, and, taking up his
abode in a hollow tree, maintained himself as he could till he was
discovered and brought back to his parents. He was removed from
Amesbury to Salisbury, and thence to the Grammar School at
Lichfield, where he is said to have been the leader in a “barring out.”
From Lichfield he passed to the Charter House, then under the
charge of Dr. Ellis, a man of taste and scholarship. The Charter
House at that period was, after Westminster, the best-known school
in England, and here was laid the foundation of that sound classical
taste which perfected the style of the essays in the Spectator.
Macaulay labours with much force and ingenuity to prove that
Addison’s classical acquirements were only superficial, and, in his
usual epigrammatic manner, hazards the opinion that “his knowledge
of Greek, though doubtless such as was, in his time, thought
respectable at Oxford, was evidently less than that which many lads
now carry away every year from Eton and Rugby.” That Addison was
not a scholar of the class of Bentley or Porson may be readily
admitted. But many scattered allusions in his works prove that his
acquaintance with the Greek poets of every period, if cursory, was
wide and intelligent: he was sufficiently master of the language
thoroughly to understand the spirit of what he read; he undertook
while at Oxford a translation of Herodotus, and one of the papers in
the Spectator is a direct imitation of a jeu d’esprit of Lucian’s. The
Eton or Rugby boy who, in these days, with a normal appetite for
cricket and football, acquired an equal knowledge of Greek
literature, would certainly be somewhat of a prodigy.
No doubt, however, Addison’s knowledge of the Latin poets was, as
Macaulay infers, far more extensive and profound. It would have
been strange had it been otherwise. The influence of the classical
side of the Italian Renaissance was now at its height, and wherever
those ideas became paramount Latin composition was held in at
least as much esteem as poetry in the vernacular. Especially was this
the case in England, where certain affinities of character and
temperament made it easy for writers to adopt Roman habits of
thought. Latin verse composition soon took firm root in the public
schools and universities, so that clever boys of the period were
tolerably familiar with most of the minor Roman poets. Pope, in the
Fourth Book of the Dunciad, vehemently attacked the tradition as
confining the mind to the study of words rather than of things; but
he had himself had no experience of a public school, and only those
who fail to appreciate the influence of Latin verse composition on
the style of our own greatest orators, and of poets like Milton and
Gray, will be inclined to undervalue it as an instrument of social and
literary training.
Proficiency in this art may at least be said to have laid the
foundation of Addison’s fortunes. Leaving the Charter House in 1687,
at the early age of fifteen, he was entered at Queen’s College,
Oxford, and remained a member of that society for two years, when
a copy of his Latin verses fell into the hands of Dr. Lancaster, then
Fellow and afterwards Provost of the College. Struck with their
excellence, Lancaster used his influence to obtain for him a
demyship at Magdalen. The subject of this fortunate set of verses
was “Inauguratio Regis Gulielmi,” from which fact we may
reasonably infer that even in his boyhood his mind had acquired a
Whig bias. Whatever inclination he may have had in this direction
would have been confirmed by the associations of his new college.
The fluctuations of opinion in Magdalen had been frequent and
extraordinary. Towards the close of Elizabeth’s reign it was notorious
for its Calvinism, but under the Chancellorship of Laud it appears to
have adopted, with equal ardour, the cause of Arminianism, for it
was among the colleges that offered the stoutest opposition to the
Puritan visitors in 1647-48. The despotic tendencies of James II.,
however, again cooled its loyalty, and its spirited resistance to the
king’s order for the election of a Roman Catholic President had given
a mortal blow to the Stuart dynasty. Hough was now President, but
in consequence of the dispute with the king there had been no
election of demies in 1688, so that twice the usual number was
chosen in the following year, and the occasion was distinguished by
the name of the “golden election.” From Magdalen Addison
proceeded to his master’s degree in 1693; the College elected him
probationary Fellow in 1697, and actual Fellow the year after. He
retained his Fellowship till 1711.
Of his tastes, habits, and friendships at Oxford there are few
records. Among his acquaintance were Boulter, afterwards
Archbishop of Dublin—whose memory is unenviably perpetuated, in
company with Ambrose Phillips, in Pope’s Epistle to Arbuthnot,
“Does not one table Bavius still admit,
Still to one Bishop Phillips seem a wit?”—
and possibly the famous Sacheverell.[6] He is said to have shown in
the society of Magdalen some of the shyness that afterwards
distinguished him; he kept late hours, and read chiefly after dinner.
The walk under the well-known elms by the Cherwell is still
connected with his name. Though he probably acted as tutor in the
college, the greater part of his quiet life at the University was
doubtless occupied in study. A proof of his early maturity is seen in
the fact that, in his nineteenth year, a young man of birth and
fortune, Mr. Rushout, who was being educated at Magdalen, was
placed under his charge.
His reputation as a scholar and a man of taste soon extended itself
to the world of letters in London. In 1693, being then in his twenty-
second year, he wrote his Account of the Greatest English Poets; and
about the same time he addressed a short copy of verses to Dryden,
complimenting him on the enduring vigour of his poetical faculty, as
shown in his translations of Virgil and other Latin poets, some of
which had recently appeared in Tonson’s Miscellany. The old poet
appears to have been highly gratified, and to have welcomed the
advances thus made to him, for he returned Addison’s compliment
by bestowing high and not unmerited praise on the translation of the
Fourth Book of the Georgics, which the latter soon after undertook,
and by printing, as a preface to his own translation, a discourse
written by Addison on the Georgics, as well as arguments to most of
the books of the Æneid.
Through Dryden, no doubt, he became acquainted with Jacob
Tonson. The father of English publishing had for some time been a
well-known figure in the literary world. He had purchased the
copyright of Paradise Lost; he had associated himself with Dryden in
publishing before the Revolution two volumes of Miscellanies;
encouraged by the success which these obtained, he put the poet, in
1693, on some translations of Juvenal and Persius, and two new
volumes of Miscellanies; while in 1697 he urged him to undertake a
translation of the whole of the works of Virgil. Observing how
strongly the public taste set towards the great classical writers, he
was anxious to employ men of ability in the work of turning them
into English; and it appears from existing correspondence that he
engaged Addison, while the latter was at Oxford, to superintend a
translation of Herodotus. He also suggested a translation of Ovid.
Addison undertook to procure coadjutors for the work of translating
the Greek historian. He himself actually translated the books called
Polymnia and Urania, but for some unexplained reason the work was
never published. For Ovid he seems, on the whole, to have had less
inclination. At Tonson’s instance he translated the Second Book of
the Metamorphoses, which was first printed in the volume of
Miscellanies that appeared in 1697; but he wrote to the publisher
that “Ovid had so many silly stories with his good ones that he was
more tedious to translate than a better poet would be.” His study of
Ovid, however, was of the greatest use in developing his critical
faculty; the excesses and want of judgment in that poet forced him
to reflect, and his observations on the style of his author anticipate
his excellent remarks on the difference between True and False Wit
in the sixty-second number of the Spectator.
Whoever, indeed, compares these notes with the Essay on the
Georgics, and with the opinions expressed in the Account of the
English Poets, will be convinced that the foundations of his critical
method were laid at this period (1697). In the Essay on the Georgics
he seems to be timid in the presence of Virgil’s superiority; his
Account of the English Poets, besides being impregnated with the
principles of taste prevalent after the Restoration, shows deficient
powers of perception and appreciation. The name of Shakespeare is
not mentioned in it, Dryden and Congreve alone being selected to
represent the drama. Chaucer is described as “a merry bard,” whose
humour has become obsolete through time and change; while the
rich pictorial fancy of the Faery Queen is thus described:
“Old Spenser next, warmed with poetic rage,
In ancient tales amused a barbarous age—
An age that yet uncultivate and rude,
Where’er the poet’s fancy led pursued,
Through pathless fields and unfrequented floods,
To dens of dragons and enchanted woods.
But now the mystic tale, that pleased of yore,
Can charm an understanding age no more;
The long-spun allegories fulsome grow,
While the dull moral lies too plain below.”
According to Pope—always a suspicious witness where Addison is
concerned—he had not read Spenser when he wrote this criticism on
him.[7]
Milton, as a legitimate successor of the classics, is of course
appreciated, but not at all after the elaborate fashion of the
Spectator; to Dryden, the most distinguished poet of the day,
deserved compliments are paid, but their value is lessened by the
exaggerated opinion which the writer entertains of Cowley, who is
described as a “mighty genius,” and is praised for the inexhaustible
riches of his imagination. Throughout the poem, in fact, we observe
a remarkable confusion of various veins of thought; an unjust
depreciation of the Gothic grandeur of the older English poets; a just
admiration for the Greek and Roman authors; a sense of the
necessity of good sense and regularity in writings composed for an
“understanding age;” and at the same time a lingering taste for the
forced invention and far-fetched conceits that mark the decay of the
spirit of mediæval chivalry.
With the judgments expressed in this performance it is instructive to
compare such criticisms on Shakespeare as we find in No. 42 of the
Spectator, the papers on “Chevy Chase” (73, 74), and particularly
the following passage:
“As true wit consists in the resemblance of ideas, and false
wit in the resemblance of words, according to the
foregoing instances, there is another kind of wit which
consists partly in the resemblance of ideas and partly in
the resemblance of words, which, for distinction’s sake, I
shall call mixed wit. This kind of wit is that which abounds
in Cowley more than in any author that ever wrote. Mr.
Waller has likewise a great deal of it. Mr. Dryden is very
sparing in it. Milton has a genius much above it. Spenser
is in the same class with Milton. The Italians even in their
epic poetry are full of it. Monsieur Boileau, who formed
himself upon the ancient poets, has everywhere rejected it
with scorn. If we look after mixed wit among the Greeks,
we shall find it nowhere but in the epigrammatists. There
are, indeed, some strokes of it in the little poem ascribed
to Musæus, which by that, as well as many other marks,
betrays itself to be a modern composition. If we look into
the Latin writers we find none of this mixed wit in Virgil,
Lucretius, or Catullus; very little in Horace, but a great
deal of it in Ovid, and scarce anything else in Martial.”
The stepping-stone from the immaturity of the early criticisms in the
Account of the Greatest English Poets to the finished ease of the
Spectator is to be found in the notes to the translation of Ovid.[8]
The time came when he was obliged to form a decision affecting the
entire course of his life. Tonson, who had a wide acquaintance, no
doubt introduced him to Congreve and the leading men of letters in
London, and through them he was presented to Somers and
Montague. Those ministers perhaps persuaded him, as a point of
etiquette, to write, in 1695, his Address to King William, a poem
composed in a vein of orthodox hyperbole, all of which must have
been completely thrown away on that most unpoetical of monarchs.
Yet in spite of those seductions Addison lingered at Oxford. To retain
his Fellowship it was necessary for him to take orders. Had he done
so, there can be no doubt that his literary skill and his value as a
political partizan would have opened for him a road to the highest
preferment. At that time the clergy were far from thinking it
unbecoming to their cloth to fight in the political arena or to take
part in journalism. Swift would have been advanced to a bishopric,
as a reward for his political services, if it had not been for the
prejudice entertained towards him by Queen Anne; Boulter, rector of
St. Saviour’s, Southwark, having made himself conspicuous by
editing a paper called the Freethinker, was raised to the Primacy of
Ireland; Hoadley, the notorious Bishop of Bangor, edited the London
Journal; the honours that were awarded to two men of such second-
rate intellectual capacity would hardly have been denied to Addison.
He was inclined in this direction by the example and advice of his
father, who was now Dean of Lichfield, and who was urgent on his
son to rid himself of the pecuniary embarrassments in which he was
involved by embracing the Church as a profession. A few years
before he had himself seemed to look upon the Church as his future
sphere. In his Account of the Greatest English Poets he says:
“I leave the arts of poetry and verse
To them that practise them with more success.
Of greater truths I’ll now propose to tell,
And so at once, dear friend and muse, farewell.”
Had he followed up his intention we might have known the name of
Addison as that of an artful controversialist, and perhaps as a
famous writer of sermons; but we should, in all probability, have
never heard of the Spectator.
Fortunately for English letters, other influences prevailed to give a
different direction to his fortunes. It is true that Tickell, Addison’s
earliest biographer, states that his determination not to take orders
was the result of his own habitual self-distrust, and of a fear of the
responsibilities which the clerical office would involve. But Steele,
who was better acquainted with his friend’s private history, on
reading Tickell’s Memoir, addressed a letter to Congreve on the
subject, in which he says:
“These, you know very well, were not the reasons which
made Mr. Addison turn his thoughts to the civil world; and,
as you were the instrument of his becoming acquainted
with Lord Halifax, I doubt not but you remember the
warm instances that noble lord made to the head of the
College not to insist upon Mr. Addison’s going into orders.
His arguments were founded upon the general pravity and
corruption of men of business, who wanted liberal
education. And I remember, as if I had read the letter
yesterday, that my lord ended with a compliment that,
however he might be represented as a friend to the
Church, he never would do it any other injury than
keeping Mr. Addison out of it.”
No doubt the real motive of the interest in Addison shown by Lord
Halifax, at that time known as Charles Montague, was an anxiety
which he shared with all the leading statesmen of the period, and of
which more will be said presently, to secure for his party the services
of the ablest writers. Finding his protégé as yet hardly qualified to
transact affairs of State, he joined with Lord Somers, who had also
fixed his eyes on Addison, in soliciting for him from the Crown, in
1699, a pension of £300 a year, which might enable him to
supplement his literary accomplishments with the practical
experience of travel. Addison naturally embraced the offer. He looked
forward to studying the political institutions of foreign countries, to
seeing the spots of which he had read in his favourite classical
authors, and to meeting the most famous men of letters on the
Continent.
It is characteristic both of his own tastes and of his age that he
seems to have thought his best passport to intellectual society
abroad would be his Latin poems. His verses on the Peace of
Ryswick, written in 1697 and dedicated to Montague, had already
procured him great reputation, and had been praised by Edmund
Smith—a high authority—as “the best Latin poem since the Æneid.”
This gave him the opportunity of collecting his various compositions
of the same kind, and in 1699 he published from the Sheldonian
Press a second volume of the Musæ Anglicanæ—the first having
appeared in 1691—containing poems by various Oxford scholars.
Among the contributors were Hannes, one of the many scholarly
physicians of the period; J. Philips, the author of the Splendid
Shilling; and Alsop, a prominent antagonist of Bentley, whose
Horatian humour is celebrated by Pope in the Dunciad.[9]
But the most interesting of the names in the volume is that of the
once celebrated Edmond, commonly called “Rag,” Smith, author of
the Ode on the Death of Dr. Pocock, who seems to have been
among Addison’s intimate acquaintance, and deserves to be
recollected in connection with him on account of a certain similarity
in their genius and the extraordinary difference in their fortunes.
“Rag” was a man of fine accomplishments and graceful humour, but,
like other scholars of the same class, indolent and licentious. In spite
of great indulgence extended to him by the authorities of Christ
Church, he was expelled from the University in consequence of his
irregularities. His friends stood by him, and, through the interest of
Addison, a proposal was made to him to undertake a history of the
Revolution, which, however, from political scruples he felt himself
obliged to decline. Like Addison, he wrote a tragedy modelled on
classical lines; but, as it had no political significance, it only pleased
the critics, without, like “Cato,” interesting the public. Like Addison,
too, he had an opportunity of profiting by the patronage of Halifax,
but laziness or whim prevented him from keeping an appointment
which the latter had made with him, and caused him to miss a place
worth £300 a year. Addison, by his own exertions, rose to posts of
honour and profit, and towards the close of his life became
Secretary of State. Smith envied his advancement, and, ignoring the
fact that his own failure was entirely due to himself, murmured at
fortune for leaving him in poverty. Yet he estimated his wants at
£600 a year, and died of indulgence when he can scarcely have been
more than forty years of age.
Addison’s compositions in the Musæ Anglicanæ are eight in number.
All of them are distinguished by the ease and flow of the
versification, but they are generally wanting in originality. The best
of them is the Pygmæo-Gerano-Machia, which is also interesting as
showing traces of that rich vein of humour which Addison worked
out in the Tatler and Spectator. The mock-heroic style in prose and
verse was sedulously cultivated in England throughout the
eighteenth century. Swift, Pope, Arbuthnot, and Fielding, developed
it in various forms; but Addison’s Latin poem is perhaps the first
composition in which the fine fancy and invention afterwards shown
in the Rape of the Lock and Gulliver’s Travels conspicuously
displayed itself.
A literary success of this kind at that epoch gave a writer a wider
reputation than he could gain by compositions in his own language.
Armed, therefore, with copies of the Musæ Anglicanæ for
presentation to scholars, and with Halifax’s recommendatory letters
to men of political distinction, Addison started for the Continent.
CHAPTER III.

ADDISON ON HIS TRAVELS.


Travelling in the seventeenth and eighteenth centuries involved an
amount of thought and precaution which would have seemed
inconvenient to the tourist accustomed to abandon himself to the
authority of guide-books, couriers, and railway companies. By ardent
spirits like Roderick Random it was regarded as the sphere of
enterprise and fortune, and not without reason, in days when
adventures were to be met with on almost every road in the country,
and in the streets and inns of the towns. The graver portion of
society, on the other hand, considered it as part of the regular
course of education through which every young man of position
ought to pass before entering into active life. French was the
universally recognised language of diplomacy. French manners and
conversation were considered to be the best school for politeness,
while Italy was held in the highest respect by the northern nations
as the source of revived art and letters. Some of the most
distinguished Englishmen of the time looked, it is true, with little
favour on this fashionable training. “Lord Cowper,” says Spence, on
the information of Dr. Conybeare, “on his death-bed ordered that his
son should never travel (it is by the absolute desire of the Queen
that he does). He ordered this from a good deal of observation on its
effects; he had found that there was little to be hoped, and much to
be feared, from travelling. Atwell, who is the young lord’s tutor
abroad, gives but a very discouraging account of it, too, in his
letters, and seems to think that people are sent out too young, and
are too hasty to find any great good from it.”
On some of the stronger and more enthusiastic minds the chief
effect of the grand tour was to produce a violent hatred of all foreign
manners. Dennis, the critic, for instance, who, after leaving
Cambridge, spent some time on the Continent, returned with a
confirmed dislike to the French, and ostentatiously displayed in his
writings how much he held “dragoons and wooden shoes in scorn;”
and it is amusing to find Addison at a later date making his Tory fox-
hunter declare this anti-Gallican temper to be the main fruits of
foreign travel.
But, in general, what was intended to be a school for manners and
political instruction proved rather a source of unsettlement and
dissipation; and the vigorous and glowing lines in which Pope makes
the tutor describe to Dullness the doings of the “young Æneas”
abroad, may be taken as a faithful picture of the travelled pupil of
the period:
“Intrepid then o’er seas and land he flew;
Europe he saw, and Europe saw him too.
There all thy gifts and graces we display,
Thou, only thou, directing all our way!
To where the Seine, obsequious as she runs,
Pours at great Bourbon’s feet her silken sons;
Or Tyber, now no longer Roman, rolls,
Vain of Italian arts, Italian souls:
To happy convents bosomed deep in vines,
Where slumber abbots purple as their wines:
To isles of fragrance, lily-silvered vales,
Diffusing languor in the panting gales:
To lands of singing or of dancing slaves,
Love-whispering woods, and lute-resounding waves.
But chief her shrine where naked Venus keeps,
And Cupids ride the lion of the deeps;
Where, eased of fleets, the Adriatic main
Wafts the smooth eunuch and enamoured swain.
Led by my hand, he sauntered Europe round,
And gathered every vice on Christian ground;
Saw every court, heard every king declare
His royal sense of operas or the fair;
The stews and palace equally explored,
Intrigued with glory, and with spirit whored;
Tried all hors-d’œuvres, all liqueurs defined,
Judicious drank, and greatly daring dined;
Dropped the dull lumber of the Latin store,
Spoiled his own language, and acquired no more;
All classic learning lost on classic ground;
And last turned air, the echo of a sound.”
It is needless to say that Addison’s experiences of travel were of a
very different kind. He left England in his twenty-eighth year, with a
mind well equipped from a study of the best authors, and with the
intention of qualifying himself for political employment at home,
after familiarising himself with the languages and manners of foreign
countries. His sojourn abroad extended over four years, and his
experience was more than usually varied and comprehensive.
Crossing from Dover to Calais, some time in the summer of 1699, he
spent nearly eighteen months in France making himself master of
the language. In December, 1700, he embarked at Marseilles for a
tour in Italy, and visited in succession the following places: Monaco,
Genoa, Pavia, Milan, Brescia, Verona, Padua, Venice, Ferrara,
Ravenna, Rimini, S. Marino, Pesaro, Fano, Sinigaglia, Ancona, Loreto,
Rome (where, as it was his intention to return, he only visited St.
Peter’s and the Pantheon), Naples, Capri, whence he came back to
Rome by sea, the various towns in the neighbourhood of Rome,
Siena, Leghorn, Pisa, Lucca, Florence, Bologna, Modena, Parma, and
Turin. Thus, in the course of this journey, which lasted exactly a
twelvemonth, he twice crossed the Apennines, and made
acquaintance with all the more important cities in the northern part
of the Peninsula. In December, 1701, he passed over Mont Cenis to
Geneva, proceeding then by Fribourg, Berne, Soleure, Zurich, St.
Gall, Linden, Insbruck, Hall, to Vienna, where he arrived in the
autumn of 1702. After making a brief stay in the Austrian capital he
turned his face homewards, and having visited the Protestant cities
of Germany, and made a rather longer stay in Hamburg than in any
other, he reached Holland in the spring of 1703, and remained in
that country till his return to England, some time in the autumn of
the same year.
During his journey he made notes for his Remarks on Italy, which he
published immediately on his return home, and he amused himself,
while crossing Mont Cenis, with composing his Letter to Lord Halifax,
which contains, perhaps, the best verses he ever wrote. Though the
ground over which he passed was well trodden, and though he
possessed none of the special knowledge which gives value to the
observations of travellers like Arthur Young, yet his remarks on the
people and places he saw are the product of an original mind, and
his illustrations of his route from the Latin poets are remarkably
happy and graceful. It is interesting, also, to observe how many of
the thoughts and suggestions which occurred to him on the road are
afterwards worked up into papers for the Spectator.
When Addison landed in France, in 1699, the power of Louis XIV., so
long the determined enemy of the English Revolution of 1688, had
passed its climax. The Peace of Ryswick, by which the hopes of the
Jacobites were finally demolished, was two years old. The king,
disappointed in his dreams of boundless military glory, had fallen
into a fit of devotion, and Addison, arriving from England with a very
imperfect knowledge of the language, was astonished to find the
whole of French literature saturated with the royal taste. “As for the
state of learning,” says he, in a letter to Montague, dated August,
1699, “there is no book comes out at present that has not
something in it of an air of devotion. Dacier has bin forced to prove
his Plato a very good Christian before he ventures upon his
translation, and has so far comply’d with ye tast of the age that his
whole book is overrun with texts of Scripture, and ye notion of præ-
existence, supposed to be stolen from two verses of ye prophets.
Nay, ye humour is grown so universal that it is got among ye poets,
who are every day publishing Lives of Saints and Legends in Rhime.”
Finding, perhaps, that the conversation at the capital was not very
congenial to his taste, he seems to have hurried on to Blois, a town
then noted for the purity with which its inhabitants spoke the French
language, and where he had determined to make his temporary
abode. His only record of his first impressions of Paris is a casual
criticism of “ye King’s Statue that is lately set up in the Place
Vendome.” He visited, however, both Versailles and Fontainebleau,
and the preference which he gives to the latter (in a letter to
Congreve) is interesting, as anticipating that taste for natural as
opposed to artificial beauty which he afterwards expressed in the
Spectator.
“I don’t believe, as good a poet as you are, that you can
make finer Lanskips than those about the King’s houses,
or with all yor descriptions build a more magnificent
palace than Versailles. I am, however, so singular as to
prefer Fontainebleau to the rest. It is situated among
rocks and woods that give you a fine variety of Savage
prospects. The King has Humoured the Genius of the
place, and only made of so much art as is necessary to
Help and regulate Nature, without reforming her too
much. The Cascades seem to break through the Clefts and
Cracks of Rocks that are covered over with Moss, and look
as if they were piled upon one another by Accident. There
is an artificial wildness in the Meadows, Walks, and
Canals, and ye Garden, instead of a Wall, is Fenced on the
Lower End by a Natural Mound of Rock-work that strikes
the eye very agreeably. For my part, I think there is
something more charming in these rude heaps of Stone
than in so many Statues, and wou’d as soon see a River
winding through Woods and Meadows as when it is tossed
up in such a variety of figures at Versailles.”[10]
Here and there, too, his correspondence exhibits traces of that
delicate vein of ridicule in which he is without a rival, as in the
following inimitable description of Le Brun’s paintings at Versailles:
“The painter has represented his most Xtian Majesty
under ye figure of Jupiter throwing thunderbolts all about
the ceiling, and striking terror into ye Danube and Rhine,
that lie astonished and blasted a little above the Cornice.”
Of his life at Blois a very slight sketch has been preserved by the
Abbe Philippeaux, one of the many gossipping informants from
whom Spence collected his anecdotes:
“Mr. Addison stayed above a year at Blois. He would rise
as early as between two and three in summer, and lie
abed till between eleven and twelve in the depth of winter.
He was untalkative while here, and often thoughtful;
sometimes so lost in thought that I have come into his
room and have stayed five minutes there before he has
known anything of it. He had his masters generally at
supper with him, kept very little company beside, and had
no amour whilst here that I know of, and I think I should
have known it if he had had any.”
The following characteristic letter to a gentleman of Blois, with
whom he seems to have had an altercation, is interesting as showing
the mixture of coolness and dignity, the “blood and judgment well
commingled” which Hamlet praised in Horatio, and which are
conspicuous in all Addison’s actions as well as in his writings:
“Sir,—I am always as slow in making an Enemy as a Friend, and am
therefore very ready to come to an Accommodation with you; but as
for any satisfaction, I don’t think it is due on either side when ye
Affront is mutual. You know very well that according to ye opinion of
ye world a man would as soon be called a Knave as a Fool, and I
believe most people wd be rather thought to want Legs than Brains.
But I suppose whatever we said in ye heat of discourse is not ye real
opinion we have of each other, since otherwise you would have
scorned to subscribe yourself as I do at present, Sr, yr very, etc.
A. Monsr L’Espagnol,
Blois, 10br 1699.”
The length of Addison’s sojourn at Blois seems to have been partly
caused by the difficulty he experienced, owing to the defectiveness
of his memory, in mastering the language. Finding himself at last
able to converse easily, he returned to Paris some time in the
autumn of 1700, in order to see a little of polite society there before
starting on his travels in Italy. He found the best company in the
capital among the men of letters, and he makes especial mention of
Malebranche, whom he describes as solicitous about the adequate
rendering of his works into English; and of Boileau, who, having now
survived almost all his literary friends, seems, in his conversation
with Addison, to have been even more than usually splenetic in his
judgments on his contemporaries. The old poet and critic was,
however, propitiated with the present of the Musæ Anglicanæ; and,
according to Tickell, said “that he did not question there were
excellent compositions in the native language of a country that
possessed the Roman genius in so eminent a degree.”
In general, Addison’s remarks on the French character are not
complimentary. He found the vanity of the people so elated by the
elevation of the Duke of Anjou to the throne of Spain that they were
insupportable, and he felt no reluctance to quit France for Italy. His
observations on the national manners, as seen at Blois, are
characteristic:
“Truly, by what I have yet seen, they are the Happiest
nation in the world. ’Tis not in the pow’r of Want or
Slavery to make ’em miserable. There is nothing to be met
with in the Country but Mirth and Poverty. Ev’ry one sings,
laughs, and starves. Their Conversation is generally
Agreeable; for if they have any Wit or Sense they are sure
to show it. They never mend upon a Second meeting, but
use all the freedom and familiarity at first Sight that a long
Intimacy or Abundance of wine can scarce draw from an
Englishman. Their Women are perfect Mistresses in this
Art of showing themselves to the best Advantage. They
are always gay and sprightly, and set off ye worst faces in
Europe with ye best airs. Ev’ry one knows how to give
herself as charming a look and posture as Sr Godfrey
Kneller cd draw her in.”[11]
He embarked from Marseilles for Genoa in December, 1700, having
as his companion Edward Wortley Montague, whom Pope satirises
under the various names of Shylock, Worldly, and Avidien. It is
unnecessary to follow him step by step in his travels, but the reader
of his Letter to Lord Halifax may still enjoy the delight and
enthusiasm to which he gives utterance on finding himself among
the scenes described in his favourite authors:
“Poetic fields encompass me around,
And still I seem to tread on classic ground;
For here the Muse so oft her harp has strung,
That not a mountain rears its head unsung;
Renowned in verse each shady thicket grows,
And every stream in heavenly numbers flows.”[12]
The phrase “classic ground,” which has become proverbial, is first
used in these verses, and, as will have been observed, Pope repeats
it with evident reference to the above passage in his satire on the
travels of the “young Æneas.” Addison seems to have carried the
Latin poets with him, and his quotations from them are abundant
and apposite. When he is driven into the harbour at Monaco, he
remembers Lucan’s description of its safety and shelter; as he
passes under Monte Circeo, he feels that Virgil’s description of
Æneas’s voyage by the same spot can never be sufficiently admired;
he recalls, as he crosses the Apennines, the fine lines of Claudian
recording the march of Honorius from Ravenna to Rome; and he
delights to think that at the falls of the Velino he can still see the
“angry goddess” of the Æneid (Alecto) “thus sinking, as it were, in a
tempest, and plunging herself into Hell” amidst such a scene of
horror and confusion.
His enthusiastic appreciation of the classics, which caused him in
judging any work of art to look, in the first place, for regularity of
design and simplicity of effect, shows it self characteristically in his
remarks on the Lombard and German styles of architecture in Italy.
Of Milan Cathedral he speaks without much admiration, but he was
impressed with the wonders of the Certosa near Pavia. “I saw,” says
he, “between Pavia and Milan the convent of the Carthusians, which
is very spacious and beautiful. Their church is very fine and curiously
adorned, but of a Gothic structure.” His most interesting criticism,
however, is that on the Duomo at Siena:
“When a man sees the prodigious pains and expense that
our forefathers have been at in these barbarous buildings,
one cannot but fancy to himself what miracles of
architecture they would have left us had they only been
instructed in the right way; for, when the devotion of
those ages was much warmer than that of the present,
and the riches of the people much more at the disposal of
the priests, there was so much money consumed on these
Gothic cathedrals as would have finished a greater variety
of noble buildings than have been raised either before or
since that time. One would wonder to see the vast labour
that has been laid out on this single cathedral. The very
spouts are loaden with ornaments, the windows are
formed like so many scenes of perspective, with a
multitude of little pillars retiring behind one another, the
great columns are finely engraven with fruits and foliage,
that run twisting about them from the very top to the
bottom; the whole body of the church is chequered with
different lays of black and white marble, the pavement
curiously cut out in designs and Scripture stories, and the
front covered with such a variety of figures, and overrun
with so many mazes and little labyrinths of sculpture, that
nothing in the world can make a prettier show to those
who prefer false beauties and affected ornaments to a
noble and majestic simplicity.”[13]
Addison had not reached that large liberality in criticism afterwards
attained by Sir Joshua Reynolds, who, while insisting that in all art
there was but one true style, nevertheless allowed very high merit to
what he called the characteristic styles. Sir Joshua would never have
fallen into the error of imputing affectation to such simple and
honest workmen as the early architects of Northern Italy. The effects
of Addison’s classical training are also very visible in his descriptions
of natural scenery. There is in these nothing of that craving
melancholy produced by a sense of the infinity of nature which came
into vogue after the French Revolution; no projection of the feelings
of the spectator into the external scene on which he gazes; nor, on
the other hand, is there any attempt to rival the art of the painter by
presenting a landscape in words instead of in colours. He looks on
nature with the same clear sight as the Greek and Roman writers,
and in describing a scene he selects those particulars in it which he
thinks best adapted to arouse pleasurable images in the mind of the
reader. Take, for instance, the following excellent description of his
passage over the Apennines:
“The fatigue of our crossing the Apennines, and of our
whole journey from Loretto to Rome, was very agreeably
relieved by the variety of scenes we passed through. For,
not to mention the rude prospect of rocks rising one
above another, of the deep gutters worn in the sides of
them by torrents of rain and snow-water, or the long
channels of sand winding about their bottoms that are
sometimes filled with so many rivers, we saw in six days’
travelling the several seasons of the year in their beauty
and perfection. We were sometimes shivering on the top
of a bleak mountain, and a little while afterwards basking
in a warm valley, covered with violets and almond-trees in
blossom, the bees already swarming over them, though
but in the month of February. Sometimes our road led us
through groves of olives, or by gardens of oranges, or into
several hollow apartments among the rocks and
mountains, that look like so many natural greenhouses, as
being always shaded with a great variety of trees and
shrubs that never lose their verdure.”[14]
Though his thoughts during his travels were largely occupied with
objects chiefly interesting to his taste and imagination, and though
he busied himself with such compositions as the Epistle from Italy,
the Dialogue on Medals, and the first four acts of Cato, he did not
forget that his experience was intended to qualify him for taking part
in the affairs of State. And when he reached Geneva, in December,
1701, the door to a political career seemed to be on the point of
opening. He there learned, as Tickell informs us, that he had been
selected to attend the army under Prince Eugene as secretary from
the King. He accordingly waited in the city for official confirmation of
this intelligence; but his hopes were doomed to disappointment.
William III. died in March, 1702; Halifax, on whom Addison’s
prospects chiefly depended, was struck off the Privy Council by
Queen Anne; and the travelling pension ceased with the life of the
sovereign who had granted it. Henceforth he had to trust to his own
resources; and though the loss of his pension does not seem to have
compelled him at once to turn homewards, as he continued on his
route to Vienna, yet an incident that occurred towards the close of
his travels shows that he was prepared to eke out his income by
undertaking work that would have been naturally irksome to him.
At Rotterdam, on his return towards England, he met with Jacob
Tonson, the bookseller, for whom, as has been said, he had already
done some work as a translator. Tonson was one of the founders of
the Kit-Kat Club, and in that capacity was brought into frequent and
intimate connection with the Whig magnates of the day. Among
these was the Duke of Somerset, who, through his wife, then high in
Queen Anne’s favour, exercised considerable influence on the course
of affairs. The Duke required a tutor for his son, Lord Hertford, and
Tonson recommended Addison. On the Duke’s approval of the
recommendation, the bookseller seems to have communicated with
Addison, who expressed himself, in general terms, as willing to
undertake the charge of Lord Hertford, but desired to know more
particulars about his engagement. These were furnished by the
Duke in a letter to Tonson, and they are certainly a very curious
illustration of the manners of the period. “I ought,” says his Grace,
“to enter into that affair more freely and more plainly, and tell you
what I propose, and what I hope he will comply with—viz., I desire
he may be more on the account of a companion in my son’s travels
than as a governor, and that as such I shall account him: my
meaning is, that neither lodging, travelling, nor diet shall cost him
sixpence, and over and above that my son shall present him at the
year’s end with a hundred guineas, as long as he is pleased to
continue in that service to my son, by his personal attendance and
advice, in what he finds necessary during his time of travelling.”
To this not very tempting proposal Addison replied: “I have lately
received one or two advantageous offers of ye same nature, but as I
should be very ambitious of executing any of your Grace’s
commands, so I can’t think of taking ye like employ from any other
hands. As for ye recompense that is proposed to me, I must take the
liberty to assure your Grace that I should not see my account in it,
but in ye hope that I have to recommend myself to your Grace’s
favour and approbation.” This reply proved highly offensive to the
Duke, who seems to have considered his own offer a magnificent
one. “Your letter of the 16th,” he writes to Tonson, on June 22,
1703, “with one from Mr. Addison, came safe to me. You say he will
give me an account of his readiness of complying with my proposal.
I will set down his own words, which are thus: ‘As for the
recompense that is proposed to me, I must confess I can by no
means see my account in it,’ etc. All the other parts of his letter are
compliments to me, which he thought he was bound in good
breeding to write, and as such I have taken them, and no otherwise;
and now I leave you to judge how ready he is to comply with my
proposal. Therefore, I have wrote by this first post to prevent his
coming to England on my account, and have told him plainly that I
must look for another, which I cannot be long a-finding.”
Addison’s principal biographer, Miss Aikin, expresses great contempt
for the niggardliness of the Duke, and says that, “Addison must
often have congratulated himself in the sequel on that exertion of
proper spirit by which he had escaped from wasting, in an
attendance little better than servile, three precious years, which he
found means of employing so much more to his own honour and
satisfaction, and to the advantage of the public.” Mean as the Duke’s
offer was, it is nevertheless plain that Addison really intended to
accept it, and, this being so, he can scarcely be congratulated on
having on this occasion displayed his usual tact and felicity. Two
courses appear to have been open to him. He might either have
simply declined the offer “as not finding his account in it,” or he
might have accepted it in view of the future advantages which he
hoped to derive from the Duke’s “favour and approbation;” in which
case he should have said nothing about finding the “recompense”
proposed insufficient. By the course that he took he contrived to
miss an appointment which he seems to have made up his mind to
accept, and he offended an influential statesman whose favour he
was anxious to secure.
To his pecuniary embarrassments was soon added domestic loss. At
Amsterdam he received news of his father’s death, and it may be
supposed that the private business in which he must have been
involved in consequence of this event brought him to England,
where he arrived some time in the autumn of 1703.
CHAPTER IV.

HIS EMPLOYMENT IN AFFAIRS OF


STATE.
Addison’s fortunes were now at their lowest ebb. The party from
which he had looked for preferment was out of office; his chief
political patron was in particular discredit at Court; his means were
so reduced that he was forced to adopt a style of living not much
more splendid than that of the poorest inhabitants of Grub Street.
Yet within three years of his return to England he was promoted to
be an Under-Secretary of State—a post from which he mounted to
one position of honour after another till his final retirement from
political life. That he was able to take advantage of the opportunity
that offered itself was owing to his own genius and capacity; the
opportunity was the fruit of circumstances which had produced an
entire revolution in the position of English men of letters.
Through the greater part of Charles II.’s reign the profession of
literature was miserably degraded. It is true that the King himself, a
man of wit and taste, was not slow in his appreciation of art; but he
was by his character insensible to what was serious or elevated, and
the poetry of gallantry, which he preferred, was quite within reach of
the courtiers by whom he was surrounded. Rochester, Buckingham,
Sedley, and Dorset are among the principal poetical names of the
period; all of them being well qualified to shine in verse, the chief
requirements of which were a certain grace of manner, an air of
fashionable breeding, and a complete disregard of the laws of
decency. Besides these “songs by persons of quality,” the principal
entertainment was provided by the drama. But the stage, seldom a
lucrative profession, was then crowded with writers whose fertile, if
not very lofty, invention kept down the price of plays. Otway, the
most successful dramatist of his time, died in a state of indigence,
and as some say, almost of starvation, while playwrights of less
ability, if the house was ill-attended on the third night, when the
poet received all the profits of the performance, were forced, as
Oldham says, “to starve or live in tatters all the year.”[15]
Periodical literature, in the shape of journals and magazines, had as
yet no existence; nor could the satirical poet or the pamphleteer find
his remuneration in controversial writing the strong reaction against
Puritanism having raised the monarchy to a position in which it was
practically secure against the assaults of all its enemies. The author
of the most brilliant satire of the period, who had used all the
powers of a rich imagination to discredit the Puritan and Republican
cause, was paid with nothing more solid than admiration, and died
neglected and in want.
“The wretch, at summing up his misspent days,
Found nothing left but poverty and praise!
Of all his gains by verse he could not save
Enough to purchase flannel and a grave!
Reduced to want he in due time fell sick,
Was fain to die, and be interred on tick;
And well might bless the fever that was sent
To rid him hence, and his worse fate prevent.”[16]
In the latter part of this reign, however, a new combination of
circumstances produced a great change in the character of English
literature and in the position of its professors. The struggle of Parties
recommenced. Wearied with the intolerable rule of the Saints, the
nation had been at first glad to leave its newly-restored King to his
pleasures, but, as the memories of the Commonwealth became
fainter, the people watched with a growing feeling of disgust the
selfishness and extravagance of the Court, while the scandalous sale
of Dunkirk and the sight of the Dutch fleet on the Thames made
them think of the patriotic energies which Cromwell had succeeded
in arousing. At the same time the thinly-disguised inclination of the
King to Popery, and the avowed opinions of his brother, raised a
general feeling of alarm for the Protestant liberties of the nation. On
the other hand, the Puritans, taught moderation by adversity,
exhibited the really religious side of their character, and attracted
towards themselves a considerable portion of the aristocracy, as well
as of the commercial and professional classes in the metropolis—a
combination of interests which helped to form the nucleus of the
Whig party. The clergy and the landed proprietors, who had been
the chief sufferers from Parliamentary rule, naturally adhered to the
Court, and were nicknamed by their opponents Tories. Violent party
conflicts ensued, marked by such incidents as the Test Act, the
Exclusion Bill, the intrigues of Monmouth, the Popish Plot, and the
trial and acquittal of Shaftesbury on the charge of high treason.
Finding his position no longer so easy as at his restoration, Charles
naturally bethought him of calling literature to his assistance. The
stage, being completely under his control, seemed the readiest
instrument for his purpose; the order went forth, and an astonishing
display of monarchical fervour in all the chief dramatists of the time
—Otway, Dryden, Lee, and Crowne—was the result. Shadwell, who
was himself inclined to the Whig interest, laments the change:
“The stage, like old Rump pulpits, is become
The scene of News, a furious Party’s drum.”
But the political influence of the drama and the audience to which it
appealed being necessarily limited, the King sought for more
powerful literary artillery, and he found it in the serviceable genius of
Dryden, whose satirical and controversial poems date from this
period. The wide popularity of Absalom and Achitophel, written
against Monmouth and Shaftesbury; of The Medal, satirising the
acquittal of Shaftesbury; of The Hind and Panther, composed to
advance the Romanising projects of James II.; points to the vast
influence exercised by literature in the party struggle. Nevertheless,
in spite of all that Dryden had done for the Royal cause, in spite of
the fact that he himself had more than once appealed to the poet for
assistance, the ingratitude or levity of Charles was so inveterate that
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like