text:
# Search by Topic

#### Resources tagged with Sequences similar to Divided Differences:

Filter by: Content type:
Stage:
Challenge level:

### There are 37 results

Broad Topics > Sequences, Functions and Graphs > Sequences

### Stretching Fractions

##### Stage: 4 Challenge Level:

Imagine a strip with a mark somewhere along it. Fold it in the middle so that the bottom reaches back to the top. Stetch it out to match the original length. Now where's the mark?

### Route to Root

##### Stage: 5 Challenge Level:

A sequence of numbers x1, x2, x3, ... starts with x1 = 2, and, if you know any term xn, you can find the next term xn+1 using the formula: xn+1 = (xn + 3/xn)/2 . Calculate the first six terms of this. . . .

### First Forward Into Logo 12: Puzzling Sums

##### Stage: 3, 4 and 5 Challenge Level:

Can you puzzle out what sequences these Logo programs will give? Then write your own Logo programs to generate sequences.

### Ordered Sums

##### Stage: 4 Challenge Level:

Let a(n) be the number of ways of expressing the integer n as an ordered sum of 1's and 2's. Let b(n) be the number of ways of expressing n as an ordered sum of integers greater than 1. (i) Calculate. . . .

### LOGO Challenge - Circles as Bugs

##### Stage: 3 and 4 Challenge Level:

Here are some circle bugs to try to replicate with some elegant programming, plus some sequences generated elegantly in LOGO.

### Dalmatians

##### Stage: 4 and 5 Challenge Level:

Investigate the sequences obtained by starting with any positive 2 digit number (10a+b) and repeatedly using the rule 10a+b maps to 10b-a to get the next number in the sequence.

### Farey Approximation

##### Stage: 5 Short Challenge Level:

Use Farey sequences to obtain rational approximations to irrational numbers.

### Tiny Nines

##### Stage: 4 Challenge Level:

Find the decimal equivalents of the fractions one ninth, one ninety ninth, one nine hundred and ninety ninth etc. Explain the pattern you get and generalise.

### LOGO Challenge - Sequences and Pentagrams

##### Stage: 3, 4 and 5 Challenge Level:

Explore this how this program produces the sequences it does. What are you controlling when you change the values of the variables?

### Series Sums

##### Stage: 4 Challenge Level:

Let S1 = 1 , S2 = 2 + 3, S3 = 4 + 5 + 6 ,........ Calculate S17.

### Ford Circles

##### Stage: 5 Challenge Level:

Small circles nestle under touching parent circles when they sit on the axis at neighbouring points in a Farey sequence.

### Seven Squares

##### Stage: 3 and 4 Challenge Level:

Watch these videos to see how Phoebe, Alice and Luke chose to draw 7 squares. How would they draw 100?

##### Stage: 3 and 4 Challenge Level:

Powers of numbers behave in surprising ways. Take a look at some of these and try to explain why they are true.

### Designing Table Mats

##### Stage: 3 and 4 Challenge Level:

Formulate and investigate a simple mathematical model for the design of a table mat.

### Farey Neighbours

##### Stage: 5 Challenge Level:

Farey sequences are lists of fractions in ascending order of magnitude. Can you prove that in every Farey sequence there is a special relationship between Farey neighbours?

### A Little Light Thinking

##### Stage: 4 Challenge Level:

Here is a machine with four coloured lights. Can you make two lights switch on at once? Three lights? All four lights?

### Vecten

##### Stage: 5 Challenge Level:

Join in this ongoing research. Build squares on the sides of a triangle, join the outer vertices forming hexagons, build further rings of squares and quadrilaterals, investigate.

### On the Importance of Pedantry

##### Stage: 3, 4 and 5

A introduction to how patterns can be deceiving, and what is and is not a proof.

### Charlie's Delightful Machine

##### Stage: 3 and 4 Challenge Level:

Here is a machine with four coloured lights. Can you develop a strategy to work out the rules controlling each light?

### Summing Squares

##### Stage: 4 Challenge Level:

Discover a way to sum square numbers by building cuboids from small cubes. Can you picture how the sequence will grow?

### Weekly Challenge 16: Archimedes Numerical Roots

##### Stage: 5 Challenge Level:

The problem is how did Archimedes calculate the lengths of the sides of the polygons which needed him to be able to calculate square roots?

### Generating Number Patterns: an Email Conversation

##### Stage: 2, 3 and 4

This article for teachers describes the exchanges on an email talk list about ideas for an investigation which has the sum of the squares as its solution.

### A Number Sequences Resource

##### Stage: 4 Challenge Level:

This resource contains interactive problems to support work on number sequences at Key Stage 4.

### Big Powers

##### Stage: 3 and 4 Challenge Level:

Three people chose this as a favourite problem. It is the sort of problem that needs thinking time - but once the connection is made it gives access to many similar ideas.

### Odd Differences

##### Stage: 4 Challenge Level:

The diagram illustrates the formula: 1 + 3 + 5 + ... + (2n - 1) = n² Use the diagram to show that any odd number is the difference of two squares.

### Loopy

##### Stage: 4 Challenge Level:

Investigate sequences given by $a_n = \frac{1+a_{n-1}}{a_{n-2}}$ for different choices of the first two terms. Make a conjecture about the behaviour of these sequences. Can you prove your conjecture?

### Sixational

##### Stage: 4 and 5 Challenge Level:

The nth term of a sequence is given by the formula n^3 + 11n . Find the first four terms of the sequence given by this formula and the first term of the sequence which is bigger than one million. . . .

### Squaresearch

##### Stage: 4 Challenge Level:

Consider numbers of the form un = 1! + 2! + 3! +...+n!. How many such numbers are perfect squares?

### Weekly Challenge 34: Googol

##### Stage: 5 Short Challenge Level:

Find the smallest value for which a particular sequence is greater than a googol.

### Triangles and Petals

##### Stage: 4 Challenge Level:

An equilateral triangle rotates around regular polygons and produces an outline like a flower. What are the perimeters of the different flowers?

### Triangles Within Triangles

##### Stage: 4 Challenge Level:

Can you find a rule which connects consecutive triangular numbers?

### Triangles Within Squares

##### Stage: 4 Challenge Level:

Can you find a rule which relates triangular numbers to square numbers?

### Changing Places

##### Stage: 4 Challenge Level:

Place a red counter in the top left corner of a 4x4 array, which is covered by 14 other smaller counters, leaving a gap in the bottom right hand corner (HOME). What is the smallest number of moves. . . .

### Three Frogs

##### Stage: 4 Challenge Level:

Three frogs hopped onto the table. A red frog on the left a green in the middle and a blue frog on the right. Then frogs started jumping randomly over any adjacent frog. Is it possible for them to. . . .

### Sums of Powers - A Festive Story

##### Stage: 3 and 4

A story for students about adding powers of integers - with a festive twist.

### Triangles Within Pentagons

##### Stage: 4 Challenge Level:

Show that all pentagonal numbers are one third of a triangular number.


text:
# Molecular Catalysis in “Green” Hydrogen Production Francesco Zaccaria, et al.

May 13, 2022

## Introduction

The current climate and energy crises urgently require the identification of a sustainable alternative to fossil-derived fuels. Molecular hydrogen is emerging as the leading candidate to fulfil this role, owing to its non-toxicity, high energy per unit mass (120 MJ kg−1) and zero combustion emissions (European Commission, 2020; IEA, 2020; Crabtree et al., 2004; Parra et al., 2019; Griffiths et al., 2021). The sustainable supply of H2 on a global scale, however, poses some serious technological challenges (Song et al., 2022). Both production and storage of H2 are, indeed, non-trivial. Even though it is one of the most abundant elements on Earth, hydrogen is not directly available as it is bound to other elements in natural organic and inorganic molecules, some of them being the feedstocks for a variety of industrial H2 production processes. To establish sustainability metrics for the latter processes, the scientific community has felt the need to attribute colors to hydrogen, which is, notoriously a colorless molecule (Figure 1) (Newborough and Cooley, 2020; Griffiths et al., 2021).

FIGURE 1. The colors of hydrogen production processes.

At present, the vast majority of commercial hydrogen is produced via steam reforming or partial oxidation of non-renewable fossil feedstocks, like coal (black hydrogen), natural gas (grey hydrogen) and lignite (brown hydrogen) (Griffiths et al., 2021). In a short-term perspective, many efforts are devoted to limit the carbon footprint of these production processes. Some examples include integrating them with carbon capture and utilization systems (CCSU; blue hydrogen), or opting for methane pyrolysis, which produces solid carbon residues as byproduct rather than gaseous CO2 (turquoise hydrogen) (Newborough and Cooley, 2020). Nevertheless, the transition from fossil to renewable raw materials is essential for long-term sustainable hydrogen production.

Water splitting (WS) appears to be the ideal approach in this respect, being based on a cheap, non-toxic and renewable starting material like H2O, and providing O2 as the only benign byproduct (Armaroli and Balzani, 2007):

The main limit of this approach lies in its unfavorable kinetics and thermodynamics. Using fossil-derived electricity to drive such energy demanding process is clearly unreasonable. Although relatively small amounts of “low-carbon hydrogen” are currently produced by water electrolysis using nuclear power (purple hydrogen) or grid electricity (yellow hydrogen) (Griffiths et al., 2021), the production of truly green hydrogen is necessarily bound to the combination of renewable feedstocks, like water, and energy sources, ideally sunlight (Lewis and Nocera, 2006; Armaroli and Balzani, 2007; Velazquez Abad and Dodds, 2020). This latter process would mimic natural photosynthesis, exploiting sunlight to drive the water oxidation (WO) half-reaction, and then using the resulting protons and electrons to reduce NADP+ to NADPH cofactor and, consequently, CO2 to carbohydrates (Kärkäs et al., 2014). In both cases, light is the primary energy source, while chemical bonds -of either H2 or NADPH- serve as a kind of accumulator to deliver the energy packages where needed.

To realize an artificial photosynthesis device two aspects are critical: 1) developing efficient systems for harvesting solar energy, and 2) optimizing its conversion into chemical energy in the form of H–H bonds. Two main types of devices are typically utilized: photovoltaic-coupled electrolyzers (PVE, Figure 2) and photoelectrochemical cells (PEC, Figure 2). In PVEs, a photovoltaic cell provides the necessary overpotential to drive WS in the electrolyzer; in PECs, sunlight is instead harvested by a photoanode having suitable valence band potentials to carry out the oxidative half-reaction, with the generated electrons being transferred to the photocathode for proton reduction (Ager et al., 2015). In both approaches, one of the main hurdles towards the development of efficient WS devices lies in the high overpotentials needed, especially for the WO half-reaction. The identification of highly active and robust catalysts is therefore essential for knocking down such unfavorable kinetic barriers.

FIGURE 2. Schemes of photovoltaic-coupled electrolyzers (PVE) and photoelectrochemical cells (PEC).

Over the last few decades, research in catalyst discovery and optimization has sparked, providing a plethora of catalytic systems for both half-reactions. Despite significant progress has been made, the identification of high-performing catalysts for large scale applications remains an open challenge.

Along with heterogeneous systems, molecular catalysts based on coordination compounds have drawn significant attention (Esswein and Nocera, 2007; Wang et al., 2009, Wang et al., 2012 M.; Eckenhoff and Eisenberg, 2012; Berardi et al., 2014; Zhang and Sun, 2019a; Barrozo and Orio, 2019). Their well-defined molecular nature offer some advantages, primarily in terms of atom efficiency, as molecular catalysts typically guarantee nearly 100% active metal centers; this is especially important when noble metals are employed (Zhang and Sun, 2019a; Macchioni, 2019). Furthermore, their reactivity can be tuned by structural tailoring to enhance activity. In this respect, it is also important to note that, with respect to heterogeneous systems, the activity of molecular catalysts can be more easily described in terms of performance parameters like turnover number (TON) and turnover frequency (TOF), facilitating kinetic and benchmarking studies that are essential for rational catalyst development (Kondo et al., 2021). These are the reasons why many efforts are devoted towards the development of water splitting devices involving molecular catalysts, having in durability and recyclability their Achilles’ heel.

This Review highlights the role which molecular catalysts might have in the pursuing of sustainable global energy supply. The discussion will focus on both half-reactions of water splitting, namely the hydrogen (HER) and oxygen (OER) evolution reaction, summarizing selected milestones, persisting bottlenecks, and foreseeable prospects.

## Hydrogen Evolving Reaction Catalysts

In nature, reversible H2 oxidation is catalyzed by [FeFe], [FeNi] or Fe hydrogenase enzymes (Zhang and Sun, 2019a) in combination with cofactors/coenzymes that contribute synergistically to reaction thermodynamics.

As outlined before, proton reduction is realized in the laboratory either electrochemically (Wang M. et al., 2012) or photochemically (Sakai and Ozawa, 2007; Stoll et al., 2015; Eckenhoff, 2018; Amaro-Gahete et al., 2021). With a few exceptions, most classes of catalysts are active in both processes. Herein we will focus on electrocatalysis, aiming at sketching out the main branches of research in homogeneous HER and setting future directions in catalyst design.

The obvious starting point has been to take inspiration from natural enzymes. Rauchfuss and coworkers demonstrated in 2001 the suitability of the structural hydrogenase model 1 (Figure 3) in electrocatalytic H2 generation (Gloaguen et al., 2001). Since then, the field has become very active (Capon et al., 2005, 2009), but hydrogenase models revealed to suffer from poor solubility in water and scarce resistance towards strong acids. Therefore, most studies are performed in organic media, which are not an ideal choice when designing a sustainable device for WS. Hydrophilic substitution (Na et al., 2006) or encapsulation in cyclodextrins (Singleton et al., 2010) can all be used to solubilize hydrogenase models in water, but applications are still very limited. [NiFe] models such as 2 also show moderate activity at 400–430 mV overpotential, with rate constants in the order of 50 s−1 in CH2Cl2 (Barton and Rauchfuss, 2010). Mn dimers 3 and 4, with structural features resembling hydrogenase cores, showed higher activities than [FeFe] and [FeNi] models. These species can reduce protons at moderate overpotentials (550-650 mV) in either DMF or MeCN, with TOF up to 44600 s−1 (Hou et al., 2014; Hou and Fan, 2014).

FIGURE 3. Structures of hydrogen evolution catalysts 118.

Overall, such catalytic performance is still not satisfactory enough to foresee applications of hydrogenase models in H2 generation technologies in the next future. In stark contrast, mononuclear complexes of earth-abundant metals offer a solid alternative, with some species showing activities comparable (or even higher) than that of natural enzymes (TOF or kcat in the order of 1–2 × 104 s−1) (Frey, 2002). It must be noted that a direct comparison between different systems is difficult, owing to the very different experimental conditions used in electrocatalysis. Particular attention must be paid to overpotentials, as highly active systems tend to work at high overpotentials. The ideal catalyst should show high activity at low overpotential and only very few electrocatalysts are able to do so, as yet.

Striving for the ideal HER electrocatalyst, a few families of compounds stood out during the past two decades. A first notable example is the class of polypyridyl (Zee et al., 2015) and pyridyl-amine complexes of Mo, Co. (Sun et al., 2011), Ni (Zhang et al., 2014c) and Cu. Long, Chang and co-workers reported that the Mo(II) species 5 activates water catalytically and, under controlled electrolysis conditions at pH = 7, produces H2 with TOF approaching 2.4 s−1 and TON values of 6.1 × 105 at an overpotential of 640 mV (Karunadasa et al., 2010). Complex 6, a soluble mimic of molybdenite (Karunadasa et al., 2012), a very efficient heterogeneous HER catalyst (Jaramillo et al., 2007), also catalyzes electrochemical proton reduction in both MeCN and water, with optimal activity observed at pH = 3. A TOF up to 280 s−1 was observed at 828 mV overpotential. Interestingly, both 5 and 6 showed catalytic activity for H2 production when tested with seawater. The Cu complex 7 is another remarkably active catalyst, evolving H2 with a kobs of over 10000 s−1 at pH = 2.5 and 420 mV overpotential. Mechanistically, the reaction is supposed to occur upon two consecutive PCET events, affording a Cu(II) hydride intermediate with a protonated ligand, which undergoes H2 elimination and regenerates the catalyst (Zhang et al., 2014b).

Cobalt glyoximate complexes are also excellent catalysts for H2 electroproduction, offering cheaper alternatives to Pt and showing high activities at reduced overpotentials (Artero et al., 2011). Co(III) complexes 8, which are active in proton reduction in DMF/[HNEt3][Cl] and, particularly at low acid loading, show higher activities when more electron-donating groups are introduced (TON of 100 over 2.5 h, when R = H, 8a). To improve water solubility, Zhang and co-workers functionalized the pyridine ring with a triazole-glucose pendant group and obtained complex 8d, an electrocatalyst able to work under neutral conditions at an overpotential of 341 mV (Yin et al., 2015). Co(II) glyoximates 9 are comparatively more active and reduce protons from a broad set of acids with modest to low pKa in MeCN at very low overpotentials. For example, HOAcF is reduced at less than 50 mV overpotential with an estimated kobs of 770 s−1 (Hu et al., 2005).

To overcome the instability of cobaloximes towards hydrolysis, imine/oxime catalysts have been developed. This class of catalysts is a notable step forward, as they retain catalytic activity in neat water. Complex 10 catalyzes proton reduction in water at pH = 2.2 with a rather low overpotential of 390 mV, affording 23 turnovers (McCrory et al., 2012). More recently, Zong, Lu and Sakai reported the Co macrocyclic complex 11, which represents a kind of evolution of the imine glyoxymate scaffold (Wang et al., 2019). 11 is an extremely efficient electrocatalyst and can reduce protons at pH = 7 with a kcat of 2210 s−1at 680 mV overpotential. On top of its good catalytic performance, 11 is tolerant to O2 and CO, making a good candidate for application in H2 generation devices and fuel cells.

The combination of multidentate azophosphine ligands and first row transition metals originates an outstanding class of electrocatalysts for H2 oxidation and production (Dubois and Dubois, 2009). Following up on previous work (Wilson et al., 2006), Bullock, DuBois and coworkers reported in 2011 that the dicationic Ni(II) complex 12 is a robust and highly efficient catalyst for proton reduction in MeCN, using [(DMF)H]OTf (pKa = 6.1) as proton source (Helm et al., 2011). Catalytic activity was observed at an overpotential of 625 mV and a remarkable TOF of 106000 s−1 was obtained in the presence of traces of H2O. The ability of the pendant–N group to act as a positioned proton relay is proposed to be the key mechanistic concept, mimicking somehow what is proposed to occur in natural [FeFe] hydrogenases (Léger and Bertrand, 2008). A similar concept was later explored by Masuda with the Ni(II) phosphinopyridyl complex 13, containing amino groups able to act as proton relay. 13 catalyzes HER in MeCN/[NBu4][ClO4] using acetic acid as proton source, with TOF values up to 8400 s−1at an overpotential of 590 mV (Tatematsu et al., 2016). To enhance water solubility of this class of compounds, DuBois and co-workers functionalized the–N groups of the [Ni(PR2NR2)]2+ motif with biomimetic aminoacidic fragments, such as glycine and arginine (Dutta et al., 2014). These functionalized complexes showed reversible catalytic activity, even at elevated temperatures, and could be used for both H2 oxidation and production. The arginine derivative 14 revealed to resist a broad set of pH conditions, ranging from 0.0 to 6.0, and showed high TOF values at 348K, comparable to those of [NiFe] hydrogenases. 14 tolerates exposure to CO, therefore showing great potential for working in fuel cells.

Another branch of HER electrocatalysts is constituted by homoleptic metal-dithiolenes, which emerged after the first reports by Holland/Eisenberg (McNamara et al., 2011) and Sarkar (Begum et al., 2010). In 2015, Jones and coworkers showed that also the heteroleptic diphosphine-dithiolene complex 15 catalyzes HER in THF, with TOF up to 1240 s−1 and overpotentials as low as 265 mV (Gan et al., 2015). Even though catalytic performance of 15 is promising, its poor solubility in water hampers any real-life application. In 2017, Yamauchi, Sakai and coworkers reported the anionic Ni complex 16, which is water soluble and catalyzes HER at relatively low overpotentials (330–400 mV at pH 4–6). Bulk electrolysis experiments reached a turnover number of 20000 over 24 h, indicating that this family of catalysts is highly durable (Koshiba et al., 2017). Mechanistically, a series of consecutive, ligand-based, PCET events is proposed to be the origin of the reduced overpotentials (Aimoto et al., 2018).

A last branch involves metal porphyrins, which have long been known to be active electrocatalysts for H2 production but did not attract much interest owing to poor activity and high overpotentials (Kellett and Spiro, 2002). However, proper tuning of functional group can increase the catalytic performance of these species and, at the same time, impart a high solubility in water. For example, the group of Bren reported in 2014 that acetylated cobalt mycroperoxidase-11 (17) is an active bioorganometallic catalyst for proton reduction. In aqueous solution at pH 7.0, 17 showed promising initial TOF (6.7 s−1 after 10 min) and TON values (2.4 × 104), at an overpotential of 852 mV. Such an enhancement of activity was ascribed to the presence of the axial imidazole group from the peptide unit. Interestingly, 17 tolerates exposure to oxygen and retains catalytic activity in air, which is an important feature for the ideal catalyst for hydrogen evolution. However, the activity of 17 decreases over time owing to degradation under electrolytic conditions (Kleingardner et al., 2014). To enhance catalyst’s durability, Hung and coworkers used the p-sulfonatophenyl complex 18 for electrocatalytic proton reduction in neutral water, obtaining good performance both in terms of TOF (up to 1.8 s−1) and TON (1.9 × 104) over a 73 h reaction time at 876 mV overpotential (Beyene et al., 2015).

## Oxygen Evolution Reaction Catalysts

OER is the half-reaction of WS providing the electrons and protons necessary for hydrogen liberation. It requires a complex series of multielectron/multiproton transfers and represents the thermodynamic and kinetic bottleneck of the overall process:

To guarantee good activity and durability, efficient water oxidation catalysts (WOCs) must be able to easily accumulate multiple charges at the metal center without triggering degradation processes. The nature of the metal center is therefore crucial and evolution of ancillary ligands for WOCs has followed rather specific routes for each catalytically active transition element (vide infra).

Noble metals like ruthenium and iridium have shown the overall most promising performances (Blakemore et al., 2015; Matheu et al., 2019), and this is why many groups are trying to develop WOCs with a “noble metal atom economy” approach to minimize the use of such precious elements (Ledendecker et al., 2019; Macchioni, 2019). Starting from the Meyer’s “blue dimer” cis-[(H2O)RuIII(bpy)2 (μ-O)RuIII(bpy)2(OH2)]4+ (19, Figure 4), the first well-characterized molecular WOC ever reported (Gersten et al., 1982), research initially focused on developing dinuclear Ru-WOCs, designed to favor O–O bond formation via intramolecular interaction of two metal-oxo (I2M) fragments (Romain et al., 2009). Although this design principle has sometimes proven flawed, since some dinuclear catalysts actually lead to O–O bond formation via water nucleophilic attack (WNA) at a single Ru=O center (Cape and Hurst, 2008; Liu et al., 2008; Romain et al., 2009; Neudeck et al., 2014) or other more peculiar pathways (Ertem and Concepcion, 2020), it provided some interesting catalyst families like those featuring 3,5-bis(2-pyridyl)pyrazolate (Sens et al., 2004) and rigid polypyridyl (Zong and Thummel, 2005; Xu et al., 2010; Kagalwala et al., 2021) ligands. Complexes 20 and 21, reported by the groups of Llobet and Thummel respectively, are two notable examples of such a class of catalysts. 20 catalyses the oxidation of water to molecular oxygen driven by CAN with a TOF value of 0.014 s−1 and TON of 512, whereas 21 showed a higher TOF value of 0.046 s−1 and a TON of 538 under similar conditions.

FIGURE 4. Structures of ruthenium (1925), iridium (2632) and iron (3339) based water oxidation catalysts.

An important breakthrough in the field occurred in 2005, when Thummel and coworkers reported for the first time a series of mononuclear Ru complexes displaying water-oxidation activity (Zong and Thummel, 2005). In particular, the complex 22 with the methyl substituent showed the best performances reaching a TOF value of 0.014 s−1 and TON of 580 using CAN as sacrificial oxidant. Since then, the growing awareness that “one site is enough” (Concepcion et al., 2008) allowed to speed up Ru-catalyst development by focusing on simpler monomolecular species. Pyridyl based ligands were widely used (Wasylenko et al., 2010; Yagi et al., 2011; Kaveevivitchai et al., 2012; Kimoto et al., 2012; Tamaki et al., 2014). However, significant improvement in the catalytic activity for water oxidation was not achieved until the introduction of carboxylate-containing ligands into the catalyst structure, lowering the oxidation potential of Ru(II) to Ru(III). The family of Ru-bda catalysts, introduced by the group of Sun (Duan et al., 2009, 2012; Zhang and Sun, 2019b), is a most notable example (bda = 2,2′-bipyridine-6,6′-dicarboxylate). Complex 23 with the methyl substituent exhibits good catalytic performances in WO driven by CAN (Wang L. et al., 2012), and under electro- and photochemical conditions (Duan et al., 2010). The stabilizing effect of the introduced anionic carboxylate fragments appeared crucial to obtaining high activities (TON of 2000 and TOF of 41 s−1 using CAN as SO and 180 mV overpotential in electrocatalytic WO) (Duan et al., 2009; Wang et al., 2012b).

Several bda-ligand variations have been proposed to tune the redox properties of the metal center and/or the relay properties of the ancillary ligand (Matheu et al., 2015; Shaffer et al., 2017; Zhan et al., 2019; Vereshchuk et al., 2020; Yang et al., 2021). In particular, in complex 24 the use of phosphonate rather than carboxylate groups allowed to achieve a record TOF of 16000 s−1at pH = 7 with an overpotential of 530 mV (upon in situ ligand oxidation) (Vereshchuk et al., 2020). Also the axial ligands have drawn significant attention, due to their ability to facilitate Ru=O coupling by establishing intermolecular π-π stacking (Duan et al., 2013; Richmond et al., 2014; Wang et al., 2014; Creus et al., 2016; Fan et al., 2016; Xie et al., 2018) or, in some specific cases, electrostatic (Yi et al., 2021) interactions.

It should be noted, however, that such astonishingly high activities are often obtained at rather high catalyst concentrations, in the order of 10−3–10−5 M, to minimize the kinetic limitations of the bimolecular I2M mechanism that is characteristic of this catalyst class. Interestingly, Sun and coworkers have recently shown that the use of asymmetrically substituted pyridine axial ligands improves π-π stacking interactions, mitigating concentrations effects on activity; for instance, the TOF of the 3,4-dibromopyridine catalyst 25 drops from 460 s−1at [Ru] = 100 µM to a still noticeable TOF of 31 s−1at [Ru] = 1 µM in CAN-driven OER (Timmer et al., 2021). Alternative and more elaborate strategies have been proposed, for instance, by Reek and coworkers who exploited self-assembled nanospheres to increase local catalyst concentration (Yu et al., 2018). High activities at low concentrations can be achieved also with supramolecular Ru-bda macrocycles, following a WNA rather than I2M mechanism for reasons that remain to be fully understood and possibly related to the reduced mobility of the metal complexes in solution (Schulze et al., 2016).

The development of Ir-WOCs has been at least as prolific as that of Ru-based ones (Thomsen et al., 2015). Even though the first example, reported by Bernhard and coworkers in 2008, features two phenylpyridine ligands coordinated at an octahedral metal center (complex 26) (McDaniel et al., 2008), the evolution of molecular Ir-WOCs has mostly focused on pseudo-tetrahedral Cp-complexes, first reported by Crabtree and coworkers in 2009 (Hull et al., 2009). A plethora of Ir-Cp complexes with (mostly bidentate) ligands has been proposed as water oxidation catalysts. To name but a few, these include complex 27 bearing the 2-(2′pyridyl)-2-propanolate (pyalc) ligand proposed by Crabtree and coworkers (Sharninghausen et al., 2016; Yang et al., 2016; Michaelos et al., 2017), complexes 28, 29 and 30 with different carbene ligands introduced by the groups of Albrecht, Bernhard and Hetterscheid (Lalrempuia et al., 2010; Hetterscheid and Reek, 2011; Venturini et al., 2014; Woods et al., 2014; Navarro et al., 2018; Vivancos et al., 2018), and complex 31 bearing the pyridine-carboxylate (pica) fragment introduced by Macchioni and coworkers (Bucci et al., 2012; Menendez Rodriguez et al., 2017a; Van Dijk et al., 2020; Rodriguez et al., 2021).

Comparing activity of these systems is difficult, as discussed above. Rather few electrochemical studies have been reported for molecular Ir-WOCs. The simple [CpIr(H2O)3]2+ (32) (Blakemore et al., 2011), as well as many other Cp and non-Cp catalysts (Van Dijk et al., 2020), easily undergo degradation to oxide nanoparticles under electrochemical OER conditions. Yet, 27, having a strongly electron donating and oxidation resistant pyridine-alkolate ligand, was found to remain homogenous under electrocatalytic WO conditions up to 680 mV overpotential (Schley et al., 2011), although some particle formation has been observed in chronoamperometric studies at higher potentials (670 mV) (Van Dijk et al., 2020). Also some pyridyl-triazolylidene Ir-WOCs remain molecular entities and deliver a stable 120 µA current at 1.8 V vs. RHE; only minor decomposition to catalytically inactive nanoparticles occurs (Olivares et al., 2020).

Catalytic performances in WO driven by sacrificial oxidants have been more widely explored, and some benchmarking studies are available with both CAN (Koelewijn et al., 2016) and NaIO4 (Menendez Rodriguez et al., 2017b). In particular, the most active molecular Ir-WOCs in combination with NaIO4 appear to be the simplest [CpIr(H2O)3]2+ (TOF = 7 s−1 in NaIO4-driven WO) and [Ir(OH)6]2- (TOF = 9 s−1), (Menendez Rodriguez et al., 2017b), even though the actual molecular vs. heterogeneous nature of the latter species has been debated (Savini et al., 2010; Hintermair et al., 2012; Menendez Rodriguez et al., 2017b).

This observation relates to a key issue in Ir-catalyzed WO, that is, the identification of the active species. Several spectroscopic studies revealed that catalyst activation involves in situ oxidative degradation of the Cp (Savini et al., 2011; Wang et al., 2012a; Hintermair et al., 2013; Ingram et al., 2014; Zuccaccia et al., 2014; Sharninghausen et al., 2016; Yang et al., 2016). This leads to small molecules like acetic and formic acid, which are released in the reaction medium, and oxygenated fragments like substituted acetylacetonates, which likely remain coordinated at iridium. Strong experimental evidence supporting the latter hypothesis has been reported in a recent catalytic study on differently substituted Cp’-WOCs, demonstrating that intrinsic catalyst activity depends on the substituent on the Cp’ fragment (Gatto et al., 2021).

The fate of the non-Cp ligands is far less explored. The above mentioned ligands are more oxidation resistant than Cp and often assumed to remain coordinated at iridium during catalysis (Sharninghausen et al., 2016; Yang et al., 2016; Hu et al., 2021). However, as elegantly demonstrated by Fukuzumi and co-workers, even robust ligands like bipyridine can undergo decomposition if decorated with attackable substituents like–OH (Hong et al., 2012). Furthermore, albeit not degraded under OER conditions, differently substituted X-pica ligands likely detach from iridium upon catalyst activation (Rodriguez et al., 2021); this implies that [CpIr (X-pica)]+ complexes lead to the same active species formed with the simpler [CpIr(H2O)3]2+, with variations in catalytic activity being determined by the ease of ligand detachment. It remains to be proven whether this applies also to other types of ancillary ligands, but it is worth mentioning that this might explain the difficulties in developing Ir-WOCs more active than [CpIr(H2O)3]2+.

Along with Ru and Ir, several WOCs based on earth-abundant elements have been reported (Kärkäs and Åkermark, 2016; Lloret-Fillol and Costas, 2019; Kondo et al., 2021; Zhang et al., 2021). Initially, efforts focused on Mn (Najafpour et al., 2016), aiming at mimicking the Mn/Ca cubane active complex of natural Photosystem II (Kanaby et al., 2011; Kanady et al., 2014). Then, other elements have drawn significant attention, such as Co (Artero et al., 2011; Du and Eisenberg, 2012), Ni (Du and Eisenberg, 2012; Hessels et al., 2020a), Cu (Lee et al., 2020), and Fe (Du and Eisenberg, 2012; Casadevall et al., 2019; Liu et al., 2019). Herein, the most extensively studied metal, iron, is discussed as representative case.

Despite some early indications in the 1980s (Elizarova et al., 1981), the search for Fe-WOCs sparked in 2010 with the report on iron-centered tetraamido macrocyclic ligands (Fe-TAML) by Bernhard and Collins (Ellis et al., 2010). Among all, complex 33 exhibits the highest activity but very poor durability (TOF = 1.3 s−1; TON = 10), which could be somewhat improved using a Biuret-Modified ligand (TOF = 0.8 s−1; TON = 220 under photochemical conditions) (Panda et al., 2014).

The larger family of well-defined Fe-WOCs is based on non-heme, multidentate aminopyridine ligands (Codolà et al., 2013, 2019; Zhang B. et al., 2014; To et al., 2015; D’Agostini et al., 2021). For instance, complex 34 bearing the N,N′-bis(pyridin-2-ylmethyl)-cyclohexane-1,2-diamine (mcp) ligand have proved to be rather stable against decomposition in chemically driven WO (Fillol et al., 2011), but also under electrochemical conditions with an onset overpotential of 0.47 V (D’Agostini et al., 2021). 1-(2′ -pyridylmethyl)-1,4,7-triazacyclononane (pytacn) ligands have been widely studied showing how activity increases with electron withdrawing substituents in para position of the pyridine ring and non-hindering substituents in ortho (Codolà et al., 2013; D’Agostini et al., 2021). Complex 35 bearing the nitro substituted pyridine showed the best performances in this series with a TOF of 0.23 s-1 and TON of 180. Importantly, in order to be active, all these Fe(NNNN) complexes require the two labile ligands to be in cis-position with each other, as nicely demonstrated by Hetterscheid and co-workers by comparing cis-[Fe (cyclam)Cl2]Cl (cyclam = 1,4,8,11-tetraazacyclotetradecane; 36), which catalyzes WO at 0.47 V overpotential, and its trans-analogue, which is inactive in OER (Kottrup and Hetterscheid, 2016).

Aiming at improving the stability of high valent intermediates, Meyer and coworkers also proposed to use anionic rather than neutral tetradentate ligands, like bis(pyridine-2-ylmethyl)]amino-N-quinolin-8-yl-acetamido. The resulting complex 37 was found to be an effective electrocatalyst in propylene carbonate–water mixtures (Coggins et al., 2014), but not in aqueous solutions (Zhang B. et al., 2014).

Di- or even multi-metallic catalysts have been reported as well, aiming at facilitating the rate-limiting O–O bond formation as discussed above for Ru-WOCs (Panda et al., 2014; Das et al., 2016; Okamura et al., 2016; Kottrup et al., 2018). These include, for instance, the iron-tetrapyridyl electrocatalysts 38 and 39, first reported by the group of Tummel (Wickramasinghe et al., 2015), exhibiting some of the lowest overpotentials among Fe-WOCs of 300–400 mV (Wickramasinghe et al., 2015; Kottrup et al., 2018).

## Concluding Remarks and Outlook

The versatility of molecular catalysts clearly emerges from the results summarized in the above sections. In particular, it appears evident that ancillary ligand modification represents an effective handle for properties tuning, which still offers large possibilities for further improvement. Establishing straightforward structure-properties correlations remains arduous at this stage, the main hurdle being the limited understanding of reaction mechanisms and (pre)catalyst speciation. Nevertheless, some successful examples of ligand tailoring might help orienting future research, like DuBois’ aza-diphosphino cyclic ligands with their proton relay properties (Helm et al., 2011) or the axial ligands establishing π-π stacking interactions in Ru-bda catalysts (Duan et al., 2013; Richmond et al., 2014; Wang et al., 2014; Creus et al., 2016; Fan et al., 2016; Xie et al., 2018). Increasing the currently very limited number of systematic catalyst screenings to buildup robust and consistent experimental databases is essential in this respect (Garrido-Barros et al., 2017; Craig et al., 2019; Craig and García-Melchor, 2021; Kondo et al., 2021). Improving activity/lowering the necessary overpotential is still an open challenge in HER and especially in OER. Nevertheless, it should be emphasized that rather high maximum TOFs are now accessible with the latest generation catalysts, and it is reasonable to expect that ligand design can quite easily lead to further improvement. Indeed, rather than catalytic activity, the biggest challenge for molecular catalysts regards stability (Limburg et al., 2012).

OER is more problematic than HER in this respect, due to the harsher reaction conditions needed in the former case. In situ ligands modifications are very common under the strongly oxidative reaction conditions necessary for both chemical and photo/electrochemical WO. Often, they are functional to the generation of the active species, as in the above discussed case of Ir-WOCs (Savini et al., 2011; Wang et al., 2012a; Hintermair et al., 2013; Ingram et al., 2014; Zuccaccia et al., 2014; Sharninghausen et al., 2016; Yang et al., 2016; Gatto et al., 2021), but also for ruthenium (Liu et al., 2014, 2018; Lòpez et al., 2014; Akhtar et al., 2016; Kagalwala et al., 2017; Vereshchuk et al., 2020) and earth-abundant catalysts (Hong et al., 2013; Kottrup and Hetterscheid, 2016; Codolà et al., 2019). In many other cases, however, they are strongly detrimental, typically leading to the formation of metal oxide nanoparticles. A relevant example is the pentanuclear iron complex reported by Masaoka and coworkers in 2016 (Okamura et al., 2016), whose catalytic activity was later attributed to iron oxide material deposited on the electrode surface (Pelosin et al., 2020). This is extremely problematic for earth-abundant WOCs (Chen et al., 2013; Parent et al., 2014; Hessels et al., 2020b), but certainly non-negligible also in the case of noble metals (Depasquale et al., 2013; Lewandowska-Andralojc et al., 2014; Van Dijk et al., 2020). The use of strongly electron donating, polydentate ligands has proven effective in mitigating this problem for Fe-WOCs (Casadevall et al., 2019), and similarly positive results have been obtained, for instance, with the pyalc ligand for Ir-WOCs (Schley et al., 2011); yet, catalyst stability remains difficult to optimize and still unsatisfactory for commercial applications.

It is worth emphasizing here that preventing and/or understanding catalyst in situ modifications would also facilitate the identification of rational design principles. The abovementioned results on CpIr-WOCs probably represent a most advanced, yet still intricate, case in this respect. By combining the information derived from several spectroscopic and kinetic studies (Savini et al., 2011; Wang et al., 2012a; Hong et al., 2012; Hintermair et al., 2013; Ingram et al., 2014; Zuccaccia et al., 2014; Sharninghausen et al., 2016; Yang et al., 2016; Gatto et al., 2021; Hu et al., 2021; Rodriguez et al., 2021), some important hints on the structure of the active species emerge: it is likely a multimetallic oxo-species containing fragments deriving from Cp oxidative degradation and, at least in most cases, no other ancillary ligands of the parental precatalysts (Yang et al., 2016; Gatto et al., 2021; Rodriguez et al., 2021). This hypothesis of a multimetallic, possibly nanocluster, active species calls for a strong integration of homogenous and heterogeneous catalysis approaches (Li et al., 2021).

Regarding the applications of molecular catalysts, another important aspect to consider is the integration of these systems in photo/electrochemical devices for large scale hydrogen production. All the above discussed examples refer to molecular catalysts in homogenous phase in laboratory scale experiments, but these conditions can be hardly applied in industrial plants. First, the use of a molecular catalyst in electrolytic solution would be limited by only a small fraction of the catalyst being active in the diffusion layer around the electrode. Second, it would hamper the recovery and recycle of active metal, which is particularly important for noble metals.

Effective strategies for the heterogenization are therefore needed for molecular catalysts to become suitable for commercial applications (Materna et al., 2017; Rosser and Reisner, 2017; Zhang and Sun, 2019a; Macchioni, 2019; Zahran et al., 2019; Xiao et al., 2021; Yi et al., 2021). They require elaborate optimization of the composition, morphology and particle size of the support, as well as engineering of the ancillary ligand for anchoring the organometallic complex; compatibilization with the electrode material is another critical aspect.

Several notable examples of heterogenized catalysts have been reported in both HER and OER. To name but a few, Artero and coworkers effectively grafted a diimine–dioxime cobalt complex onto the surface of a carbon nanotube electrode, catalyzing HER with a TON of 55000 at an overpotential of 350 mV in aqueous solutions (Andreiadis et al., 2013); even better performances were obtained with a nickel bisdiphosphine catalyst supported on multiwalled carbon nanotubes, reaching 100,000 turnovers at 20 mV overpotential in aqueous sulfuric acid solution (Alan et al., 2009). Alternative supports have also been reported, like metal organic surfaces (Clough et al., 2015). In OER, metal oxide supports are commonly used, and proved successful for instance in combination with a dimeric Ir-pyalc catalyst (TON >1 × 106at 250 mV overpotential) (Sheehan et al., 2015), Ir-bipyridine (TON >5 × 105 and TOF >6.7 s−1at 280 mV overpotential) (Joya et al., 2012) catalysts. Also IrCp-N-dimethylimidazolin-2-ylidene catalysts immobilized on a polycrystalline gold electrode exhibited good stability with a TOF of 2.9 s−1at an applied overpotential of 430 mV (Diaz-Morales et al., 2014). It is worth mentioning that molecular catalysts can be also used to enhance the performance of photoactive materials like BiVO4 (Wan et al., 2018) and WO3 (Klepser and Bartlett, 2014), or simply serve as well-defined precursors for the controlled deposition of metal atoms in the electrode surface.

These examples show how integrating molecular complexes with suitable supports represents a frontier in catalysis for water splitting. The close cooperation between material scientists and organometallic chemists will guarantee significant progress in this field.

## Author Contributions

AM designed the review discussing it with all authors. AM and FZ wrote most of the paper. All authors contributed in finding relevant literature results to illustrate in the paper.

## Conflict of Interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

## Publisher’s Note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

## Acknowledgments

The University of Perugia and MIUR (AMIS, “Dipartimenti di Eccellenza—2018–2022” programs) are gratefully acknowledged for financial support.

## Abbreviations

WS, water splitting; OER, oxygen evolving reaction; HER, hydrogen evolving reaction; WO, water oxidation; WOC, water oxidation catalysts; TON, turnover number; TOF, turnover frequency; Cp, pentamethylcyclopentadienyl; NADPH, nicotinamide adenine dinucleotide phosphate; PEC, photoelectrochemical cell; PVE, photovoltaic-coupled electrolyzer; DMF, dimthylformamide; PCET, proton-coupled electron transfer; SO, sacrificial oxidant; CAN, cerium ammonium nitrate; bda, 2,2′-bipyridine-6,6′-dicarboxylate; pyalc, 2-(2′pyridyl)-2-propanolate.

format: plain


text:
# Errors and Diagnostics¶

## Logging¶

LensKit algorithms and evaluation routines report diagnostic data using the standard Python logging framework. Loggers are named after the corresponding Python module, and all live under the lenskit namespace.

Algorithms usually report erroneous or anomalous conditions using Python exceptions and warnings. Evaluation code, such as that in lenskit.batch, typically reports such conditions using the logger, as the common use case is to be running them in a script.

## Warnings¶

In addition to Python standard warning types such as warnings.DeprecationWarning, LensKit uses the following warning classes to report anomalous problems in use of LensKit.

class lenskit.DataWarning

Warning raised for detectable problems with input data.


text:
## CryptoDB

### Yongsoo Song

#### Publications

Year
Venue
Title
2019
EUROCRYPT
Since Cheon et al. introduced a homomorphic encryption scheme for approximate arithmetic (Asiacrypt ’17), it has been recognized as suitable for important real-life usecases of homomorphic encryption, including training of machine learning models over encrypted data. A follow up work by Cheon et al. (Eurocrypt ’18) described an approximate bootstrapping procedure for the scheme. In this work, we improve upon the previous bootstrapping result. We improve the amortized bootstrapping time per plaintext slot by two orders of magnitude, from $\sim$∼1 s to $\sim$∼0.01 s. To achieve this result, we adopt a smart level-collapsing technique for evaluating DFT-like linear transforms on a ciphertext. Also, we replace the Taylor approximation of the sine function with a more accurate and numerically stable Chebyshev approximation, and design a modified version of the Paterson-Stockmeyer algorithm for fast evaluation of Chebyshev polynomials over encrypted data.
2018
EUROCRYPT
2017
ASIACRYPT

#### Coauthors

Hao Chen (1)
Jung Hee Cheon (2)
Ilaria Chillotti (1)
Kyoohyung Han (1)
Miran Kim (2)
Andrey Kim (2)


text:
## Diffusion processes and the asymptotic bulk gap probability for the real Ginibre ensemble    [PDF]

Peter J. Forrester
It is known that the bulk scaling limit of the real eigenvalues for the real Ginibre ensemble is equal in distribution to the rescaled $t \to \infty$ limit of the annihilation process $A + A \to \emptyset$. Furthermore, deleting each particle at random in the rescaled $t \to \infty$ limit of the coalescence process $A + A \to A$, a process equal in distribution to the annihilation process results. We use these inter-relationships to deduce from the existing literature the asymptotic small and large distance form of the gap probability for the real Ginibre ensemble. In particular, the leading form of the latter is shown to be equal to $\exp(-(\zeta(3/2)/(2 \sqrt{2 \pi}))s)$, where $s$ denotes the gap size and $\zeta(z)$ denotes the Riemann zeta function. A determinant formula is derived for the gap probability in the finite $N$ case, and this is used to illustrate the asymptotic formulas against numerical computations.
View original: http://arxiv.org/abs/1306.4106


text:
# How can I express this optimization problem in CVX?

The optimization problem is as below

Here s are the optimization variables and h and w are vectors of compatible sizes.
Let us consider, the parameters \alpha, \beta, \phi, h and w are known.

Then how can I express this in CVX

\exp\left(\sum\nolimits_{t=1}^{T}s_{t}{{\alpha}_{t}}\right)

subject to

\frac{1}{N}\left(\frac{{\exp (s_{t}{{\alpha}_{t}})}-1}{\phi_{t}}+\phi_{t}\beta_{t}^{2}\right)\leq{{{h}}_{t}^{\rm{H}}}{{{w}}_{t}}

You can let CVX invoke its successive approximation method (with appropriate warnings and caveats) for exp in both the objective and constraints and write the CVX code virtually identically to your formulation above, presuming that phi > 0 , which is necessary for the constraints to be convex.

% h and w of compatible dimensions with code below
cvx_begin
variable s(T)
minimize(exp(alpha'*s))
for t=1:T
1/2*((exp(alpha(t)*s(t))-1)/phi(t)+phi(t)*beta(t)^2) <= h(:,t)'*w(:,t)
end
cvx_end

Any vectorization is left as an exercise for the OP

With the transformation

s_{t}:=\log(r_{t})

We can equivalently express the optimization problem as

maximize {{\left( \prod\nolimits_{t=1}^{T}{r_{t}^{{{\alpha }_{t}}}}\right)}^{\frac{1}{\sum\nolimits_{t=1}^{T}{{{\alpha }_{t}}}}}}

subject to

\frac{1}{N}\left(\frac{{ (r_{t}}-1)}{\phi_{t}}+\phi_{t} \beta_{t}^{2}\right)\leq{h}_{t}^{\rm{H}}{{{w}}_{t}}

Which we call Weighted Geometric Mean optimization. CVX internally transforms this into an SOCP.

Then which method has lower computational complexity?


text:
# Using \subimport inside \newcommand

I am using the command \subimport and I am very happy with it. However, it doesn't seem to work when I use it inside a \newcommand environment.

My file structure is as follows:

./main.tex
./Macros/macros.tex
./Macros/Submodules/stringdiagrams.tex
./Macros/Submodules/symbols/somefile.tex

./main.tex is as follows:

\documentclass{article}

\usepackage{import}
\usepackage{tikz}

\import{Macros/}{macros}

\begin{document}

$\MyInlineFigure$
$\test$
\end{document}

My macros are written in a modular style, and every macro submodule is called from ./Macros/macros.tex, that looks as follows (it is a one-line file for this MWE):

\subimport{Submodules/}{stringdiagrams}

The file ./Macros/Submodules/stringdiagrams.tex contains some commands to display tikz figures in an inline environment. These files are kept in the folder ./Macros/Submodules/symbols. ./Macros/Submodules/stringdiagrams.tex looks as follows:

\newcommand{\MyInlineFigure}{
\subimport{symbols/}{somefile}
}

\newcommand{\test}{
\begin{tikzpicture} [scale=1,transform shape]
\node [fill=red] (mult) at (0,0) {};
\end{tikzpicture}
}

Finally, ./Macros/Submodules/symbols/somefile.tex is just

\begin{tikzpicture} [scale=1,transform shape]
\node [fill=red] (mult) at (0,0) {};
\end{tikzpicture}

Theoretically, the commands $\MyInlineFigure$ and $\test$ should produce the same output, and I should see two red squares. However, when I try to compile LaTeX cannot find somefile.tex.

If in ./Macros/Submodules/stringdiagrams.tex I replace \subimport{symbols/}{somefile.tex} with \input{Macros/Submodules/symbols/somefile.tex} then everything works.

If in main.tex I comment out $\MyInlineFigure$ then it compiles and correctly shows a red square, proving that

• \subimport is able to reach ./Macros/Submodules/stringdiagrams.tex
• The problem is not tikz.

In the end, it looks like \subimport is not working when I call it inside a \newcommand. Is there a way to fix it?

• It's very difficult to answer this question in the present form. You know your setup, we don't. Can you please add a simple example starting from \documentclass up to \end{document}? – egreg Apr 18 '17 at 8:56
• I edited my question, now it is a MWE. You can just copy-paste the contents of every file ad arrange them in the same file hierarchy I gave and the problem should be reproducible. Thanks, Fab – – Nigredo Apr 20 '17 at 18:49


text:
# Log Locations

Mac OS X

Logs for the subsystems are in the following files:

Debian/Ubuntu

Logs for the subsystems are in the following files:

RHEL/CentOS/Fedora/Amazon Linux

Logs for the subsystems are in the following files:

SmartOS

Logs for the subsystems are in the following files:

Source

Logs for the subsystems are in the following files:

Windows

For version >= 3.9.1

For Windows Server 2003, XP or older:

For Windows Server 2008, Vista and newer:


text:
partial rankings and aggregate ranks

Posted in Books, Kids, R, Statistics, Travel, University life with tags , , , , , , , , , on March 22, 2023 by xi'an

When interviewing impressive applicants from a stunning variety of places and background for fellows in our Data Science for Social Good program (in Warwick and Kaiserslautern) this summer, we came through the common conundrum of comparing ranks while each of us only meeting a subset of the candidates. Over a free morning, I briefly thought of the problem (while swimming) and then wrote a short R code to infer about an aggregate ranking, ρ, based on a simple model, namely a Poisson distribution on the distance between an individual’s ranking and the aggregate

$d(r_i,\rho)\sim\mathcal P(\lambda)$

a uniform distribution on the missing ranks as well as on the aggregate, and a non-informative prior on λ. Leading to a three step Gibbs sampler for the completion and the simulation of ρ and λ.

I am aware that the problem has been tackled in many different ways, including Bayesian ones (as in Deng et al., 2014) and local ones, but this was a fun exercise. Albeit we did not use any model in the end!

Data science for social good fellowships [DSSGx UK 2023]

Posted in Kids, Statistics, Travel, University life with tags , , , , , , , , , , , , , on November 9, 2022 by xi'an

Warwick is (again) running a 12-week summer programme bringing together some of the top student talents from data science, machine learning and artificial intelligence, all over the World, to work on real-world data science challenges and deliver positive social impact. Applications for DSSG 2023 are now OPEN! Click here for the application form (please read the information carefully) and click here for the FAQs for 2023. (The application also works for a similar programme in Kaiserslauten, Germany.

DSSG helps not-for-profit organisations and government bodies to achieve more with their data by enhancing their services, interventions and outreach, helping fulfil their mission of improving the world and people’s lives.

The programme gives not-for-profit organisations and government bodies unprecedented access to inspiring, top-tier data science talent. This helps build their capacity to use cutting-edge quantitative methods to address societal challenges in areas such as education, health, energy, public safety, transportation and economic development.

At the same time, it provides intensive case-based and supported training to students to create industry-standard data science products in collaboration with government agencies and NGOs, to deliver positive social impact. And it builds a world-wide community of data scientists who care about the social good.

In 2019, the University of Warwick together with the Alan Turing Institute brought DSSG to the UK. The University of Warwick has run it each year since and now preparation is well underway for DSSGx UK 2023, which will be held at the University of Warwick, UK, from 5 June to 25 August.

data assimilation and reduced modelling for high-D problems [CIRM]

Posted in Books, Kids, Mountains, pictures, Running, Statistics, University life with tags , , , , , , , , , , , , , , , , , on February 8, 2021 by xi'an

Next summer, from 19 July till 27 August, there will be a six week program at CIRM on the above theme, bringing together scientists from both the academic and industrial communities. The program includes a one-week summer school followed by 5 weeks of research sessions on projects proposed by academic and industrial partners.

Confirmed speakers of the summer school (Jul 19-23) are:

• Albert Cohen (Sorbonne University)
• Masoumeh Dashti (University of Sussex)
• Eric Moulines (Ecole Polytechnique)
• Anthony Nouy (Ecole Centrale de Nantes)
• Claudia Schillings (Mannheim University)

Junior participants may apply for fellowships to cover part or the whole stay. Registration and application to fellowships will be open soon.

Xmas tree at UCL, with a special gift

Posted in Books, pictures, Statistics, Travel, University life with tags , , , , , , , , , , , , , on November 26, 2019 by xi'an

Ph.D. students at UCL Statistics have made this Xmas tree out of bound and unbound volumes of statistics journals, not too hard to spot (especially the Current Indexes which I abandoned when I left my INSEE office a few years ago). An invisible present under the tree is the opening of several positions, namely two permanent lectureships and two three-year research fellowships, all in Statistics or Applied Probability, with the fellowship deadline being the 1st of December 2019!

Florence Nightingale Bicentennial Fellowship and Tutor in Statistics and Probability in Oxford [call]

Posted in Statistics, Travel, University life with tags , , , , , on July 29, 2019 by xi'an

Reposted: The Department of Statistics is recruiting a Florence Nightingale Bicentennial Fellowship and Tutor in Statistics and Probability with effect from October 2019 or as soon as possible thereafter. The post holder will join the dynamic and collaborative Department of Statistics. The Department carries out world-leading research in applied statistics fields including statistical and population genetics and bioinformatics, as well as core theoretical statistics, computational statistics, machine learning and probability. This is an exciting time for the Department, which relocated to new premises on St Giles’ in the heart of the University of Oxford in 2015. Our newly-renovated building provides state-of-the-art teaching facilities and modern space to facilitate collaboration and integration, creating a highly visible centre for Statistics in Oxford. The successful candidate will hold a doctorate in the field of Statistics, Mathematics or a related subject. They will be an outstanding individual who has the potential to become a leader in their field. The post holder will have the skills and enthusiasm to teach at undergraduate and graduate level, within the Department of Statistics, and to supervise student projects. They will carry out and publish original research within their area of specialisation. We particularly encourage candidates working in areas that link with existing research groups in the department to apply. The deadline for application is September 30, 2019.

If you would like to discuss this post and find out more about joining the academic community in Oxford, please contact Professor Judith Rousseau or Professor Yee Whye Teh. All enquiries will be treated in strict confidence and will not form part of the selection decision.


text:
# Required temperature for the reduction of iron oxide using carbon

When reducing iron oxide with carbon, must the substances be set alight or do they only need to be heated. Also, when the iron is formed will it immediately oxidise in the air?

• What is the difference between "set alight" and "be heated", really? Apr 2 '16 at 19:22

The direct reduction with carbon is only possible if the iron oxide ($\ce{Fe2O3}$, $\ce{Fe3O4}$, or $\ce{FeO}$) is present as a liquid.

$$\ce{FeO_n + nC -> Fe + nCO}$$

Accordingly, the required temperature is very high. Note the melting points of $\ce{Fe2O3}$ (1539 °C), $\ce{Fe3O4}$ (1597 °C), $\ce{FeO}$ (1377 °C), pure $\ce{Fe}$ (1538 °C), and the eutectic of iron containing 4.3 % carbon (about 1150 °C).

In the blast furnace process, solid iron oxides at lower temperatures are mainly reduced with carbon monoxide.

$$\ce{FeO_n + nCO -> Fe + nCO2}$$

The required carbon monoxide is produced from the exothermic reaction of carbon with oxygen

$$\ce{2C + O2 -> 2CO}$$

and from the endothermic Boudouard rection of carbon with carbon dioxide.

$$\ce{C + CO2 <=> 2CO}$$

A temperature well above 700 °C is required to favour the formation of carbon monoxide. Hence, a part of the carbon has to be burned in order to generate the required heat and to produce carbon monoxide.

Hot fine-dispersed iron would be quickly oxidized in air (for example, steel wool can burn in air) whereas fused iron is only oxidized at the surface of the liquid. Note that the pig iron produced in the blast furnace process has a high carbon content, which significantly lowers the melting point.


text:
# [SOLVED] ST7567 Graphic Display

#### jpanhalt

Joined Jan 18, 2008
9,037
I have an LG132643-DW-P1 graphic display from China (Yuxian, Laurellcd Store) that came with a 12-conductor FFC connector for SPI only. The controller is the Siltronics ST7567. The ST7565 is similar.

The specific chip I am using is the 16F1829 with Assembly. The SPI for that device does not allow a read, so it is send only. My problem is that regardless of the mode I use (0,1,2,3) a trial print to screen does nothing.

My question is whether anyone here has experience with either of those controllers in SPI mode? As you know, contrast is handled by code from the MCU and I have tried a range of contrasts from lowest to highest (i.e., 0..63 decimal). I can't rule out a defective screen. Two replacements are on order from mid-January via AliExpress. They presumably shipped January 20th by expedited e-packet, so the new year celebrations should not affect them, but they have not been received yet.

#### BobaMosfet

Joined Jul 1, 2009
1,056
And have you gotten the datasheet for the SITRONIX ST7567 (note the spelling) controller, which is what you need? Perhaps the display needs configured? I would first simply see if it response via SPI without an error in signal. Easy to do with a push-button to control signal input, and a scope to monitor signal lines.

https://www.newhavendisplay.com/appnotes/datasheets/LCDs/ST7567.pdf

Page 13, in particular begins to talk about the SPI signaling, which should be of interest to you.

Last edited:

#### jpanhalt

Joined Jan 18, 2008
9,037
Yes, I have the current datasheet v.1.7. I am using an SPI hook-up and code that I have used before. The timing diagrams seem to show the clock idles high and data are read on low to high transition (CKP= CKE = 1, Mode 2). The other common mode I have used in Mode 1 (CKP= CKE =0), but I have also tried the other two modes. Unlike some other SPI protocols I have used, commands are distinguished by the status of a separate pin, A0, and that status is read at the end of the byte. That is, somewhat like a 9th bit, but it is a separate pin. I keep that pin's status set (high or low) until after the byte is read (i.e., BF flag is set) and have tried several different delays from a few NOP's to 12 usec (MCU = 32 MHz, Tcy = 8 MHz, SPI clock = 2 MHz) without success.

That chip has a hardware reset. I have followed the sequence in the datasheet, which is also the same as an individual posted on the Internet. Spent this morning reconfirming the pinouts with a VOM.

It also hardware simulates, and I can see the data exchange from the PIC to the display in a watch window . Since in SPI, that display cannot be read, it returns all 1's to the SSP1BUF (buffer). The SSP1STAT,BF flag works as expected.

My replacement displays will hopefully get here this weekend so I an try another one.

Regards, John

#### Ian Rogers

Joined Dec 12, 2012
741
Hi John....
Looking at the datasheet it looks like there needs to be a latch on the 8th clock an A0 signal..

Lucky for us the SSPxIF is triggered just at that point, so using the interrupts you can set the latch on the 4th pin...

I haven't one to try but it looks easy enough to do..

#### BobaMosfet

Joined Jul 1, 2009
1,056
Looking at the pinout information (12-pin), I see A0 is held high when sending data, Low when sending instructions. Beyond that, I'd get a clear understanding of exactly how pins 10, 11, and 12 are powered. LCDs do not use constant voltage, they use a squarewave. Constant DC can burn them out. Make sure of what kind of power they are expecting you to provide for the LCD. It is unclear (since I don't have a datasheet for your display itself) as to whether or not they handle that aspect or not.

Here is another link you might find extremely helpful. You need to send a command to turn it on...

https://edeca.net/pages/the-st7565-display-controller/

Last edited:

#### jpanhalt

Joined Jan 18, 2008
9,037
Hi Ian and Boba,

My interpretation of the A0 latch it that it can be done either way. That is, one could use the IF or BF to set or clear A0 or just have it set appropriately before it is read . The later is a bit easier and seems to be what the examples I found use.

Here is what I am going on:

The datasheet is specific about reading data on the low-to-high transition, It also shows the idle states for CS and clock, but for A0 it doesn't show an edge transition and the idle state is what I interpreted as undefined (my code keeps it high). Later, I'll try using the BF (since I poll it) to toggle A0, since it is only a couple of lines of code.

As for pins 10-12, this device is only available as for <=3.3V. I didn't look at the schematics that carefully, but the configuration of the two capacitors is suggestive of a voltage doubler or quadrupler.

Here is snippet from a post by PAX Instruments that sold a device using this display through Adafruit for awhile (http://forum.espruino.com/conversations/271285/ )

C:
[LIST=1]
[*]spi.write([
[*]0xA2,//set the LCD bias to 1/9th
[*]0xA0,//horizontally "normal" (not flipped)
[*]0xC8,//vertically "flipped" (complements the command above)
[*]0x23,//the internal resistor divider set to 3 (from 0..7)
[*]0x2F,//power control, all internal blocks ON
[*]0x81,//enter dynamic contrast mode
[*]31,// Data for the dynamic contrast mode, set to 31 (from 0..63)
[*]0x40,//go back to the top left of the display
[/LIST]
And here is what I do:

Code:
;Mode 2
banksel   SSP1STAT       ;all SPI controls in Bank4                   |B4
clrf      SSP1STAT       ;CKE=1, SMP=1 (sample at middle)             |B4
bsf       SSP1STAT,6
movlw     b'00110001'    ;enable SPEN, set SPI CLK to Fosc/16
movwf     SSP1CON1       ;CKP=1,master clk =Fosc/x (see below)        |B4
movlb     2              ;                                            |B2
bsf       CSn            ;set high                                    |B2 WPU needed?
bsf       A0             ;idle high
bsf       RST            ;idle high
DelayCy   (10*msecs)
;*******************************************************************************
;Initialize 132x64 display
;*******************************************************************************
POR
bcf       RST
DelayCy   (100*msecs)
bsf       RST            ;use hardware reset
DelayCy   (1*msecs)      ;wait for reset to finish
That toggles RST to enter reset. Having A0 high or low didn't make a difference. Nor do those delays, but some authors say to give at least 1 us for the reset; some say more. Again, that made no difference. I then follow that with :
Code:
     movlw     b'10100010'    ;0xA2, bias 10 = 1/9, 11 = 1/7
call      PutCMD
movlw     b'10100000'    ;0xA0, seg direction = normal
call      PutCMD
movlw     b'11001000'    ;0xC8, com direction = flipped
;     movlw     b'11000000'    ;0xC0, com direction = normal
call      PutCMD
movlw     b'00100011'    ;0x23, set Regulation Ratio = 3.0
call      PutCMD
movlw     b'00101111'    ;0x2F, set power control
call      PutCMD         ;all internal blocks on
;     movlw     b'00011111'    ;0x1F, EV= 31 (center)
;     movwf     temp           ;second byte sent
;     movlw     b'10000001'    ;0x81, double command: Set EV
;     call      PutCMD2
movlw     b'10000001'    ;0x81, double command: Set EV
call      PutCMD
movlw     b'00011111'    ;0x1F, EV= 31 (center)
call      PutCMD         ;second byte sent
movlw     0x40           ;position start
call      PutCMD         ;
movlw     b'10101111'    ;0xAF, turn display ON
call      PutCMD
Lines 13-16 are an alternative to separate commands for a 2-command instruction. That made no difference. Line 23 is supposed to turn the display on, and it too makes no difference as the display is not on.

John

Edit: Toggling A0 didn't make a difference. Just hope the new displays arrive soon. Very unhappy with AliExpress.

Edit2: Fixed typo in code. The binary in line 9 for OX23 was shown as Ox25. That was a typo introduced in copying from my highly comment working version. Just to be safe, I retested with 0x23 and no change.

Last edited:

#### Ian Rogers

Joined Dec 12, 2012
741
Yeah! I think I misread that.... As long as A0 is HIGH/LOW at that clock point... I wish I had one to test..

#### Ian Rogers

Joined Dec 12, 2012
741
Hang on a Mo!! I have code for the ST7565 Looks identical... The SED1565 is the one they have copied from..

But As usual... I write in C..

#### jpanhalt

Joined Jan 18, 2008
9,037
Thanks for the encouragement. My displays (2) arrived today. Only one was broken that I can tell.

Anxious to try it, but the FPC cable pitch was smaller (0.5 mm pitch x 0.3 mm thick at the tab). So much for "specifications" that aren't there. Right now, I am trying to find a place that can get something to me next week. There are some options, Adafruit, eBay, Amazon, Proto-advantage, DigiKey, and others. I am trying to avoid buying the connector separately and doing the soldering. And so many specifications (like Amazon's) do not include thickness; although, 0.3 mm seems to be quite common.

I can't write C, but sometimes I can read enough of it for something like this to see the similarities. Anyway, my plans have stalled for another week. One of the things I like about this display is that it doesn't have a large surrounding bezel and the plastic has little legs on back that can snap into two slots on the PCB.

John

#### BobaMosfet

Joined Jul 1, 2009
1,056
@jpanhalt- The datasheet is pretty clear. You hold A0 high all the while that you send the display one type of data, and you hold it low all the while you send it another. This is the only way it knows whether you are sending it command data, or display data. You don't toggle it up and down on each clock cycle. So if a command takes 5 bytes of data, you hold A0 one way all the while sending that data, and then flip it the other way so the display knows the command is done. Same thing with data.

And yes, regarding pins 10,11, and 12, the caps are their to support the voltage doubling circuit in the chip-- but usually cap-based voltage doublers require pulsed waveforms. This is why I say this needs to be confirmed. Raw LCD displays are driven off of square wave-forms not straight DC, and so they may be utilizing this potentially already possible aspect for the doubler circuit. You could reach out to the LCD controller maker, if they have a web-page and perhaps they can answer this.

#### jpanhalt

Joined Jan 18, 2008
9,037
1) As for pulses, the ST chip has an oscillator,
Source=ST7567 datasheet
With built-in oscillation circuit and low power consumption power circuit, ST7567 generates LCD driving signal without external clock or power...
2) My reading of the byte transfer logic is that the status of A0 doesn't matter until the end, a "9th bit" so to speak. Albeit, it is on a different signal line. It is, of course, easy to do that before starting the SPI exchange, particularly since the LATx registers that should be used are in Bank 2 . Thus, CSn (out) and A0 are effectively in the same bank. Most of the other SPI-related (and I2C BTW) registers are in Bank 4. When I get a display working, I will test that assumption.

If I can trust Digikey and FedEx, I should be up and testing by Wednesday. I hate ordering from Digikey. It has so many goodies that I ended up spending $64 for a simple BOB (Adafruit) and FPC connector. I did add a few other things. #### BobaMosfet Joined Jul 1, 2009 1,056 Hi Ian and Boba, My interpretation of the A0 latch it that it can be done either way. That is, one could use the IF or BF to set or clear A0 or just have it set appropriately before it is read . The later is a bit easier and seems to be what the examples I found use. Here is what I am going on: View attachment 169778 The datasheet is specific about reading data on the low-to-high transition, It also shows the idle states for CS and clock, but for A0 it doesn't show an edge transition and the idle state is what I interpreted as undefined (my code keeps it high). Later, I'll try using the BF (since I poll it) to toggle A0, since it is only a couple of lines of code. As for pins 10-12, this device is only available as for <=3.3V. I didn't look at the schematics that carefully, but the configuration of the two capacitors is suggestive of a voltage doubler or quadrupler. Here is snippet from a post by PAX Instruments that sold a device using this display through Adafruit for awhile (http://forum.espruino.com/conversations/271285/ ) C: [LIST=1] [*]spi.write([ [*]0xA2,//set the LCD bias to 1/9th [*]0xA0,//horizontally "normal" (not flipped) [*]0xC8,//vertically "flipped" (complements the command above) [*]0x23,//the internal resistor divider set to 3 (from 0..7) [*]0x2F,//power control, all internal blocks ON [*]0x81,//enter dynamic contrast mode [*]31,// Data for the dynamic contrast mode, set to 31 (from 0..63) [*]0x40,//go back to the top left of the display [/LIST] And here is what I do: Code: ;Mode 2 banksel SSP1STAT ;all SPI controls in Bank4 |B4 clrf SSP1STAT ;CKE=1, SMP=1 (sample at middle) |B4 bsf SSP1STAT,6 movlw b'00110001' ;enable SPEN, set SPI CLK to Fosc/16 movwf SSP1CON1 ;CKP=1,master clk =Fosc/x (see below) |B4 movlb 2 ; |B2 bsf CSn ;set high |B2 WPU needed? bsf A0 ;idle high bsf RST ;idle high DelayCy (10*msecs) ;******************************************************************************* ;Initialize 132x64 display ;******************************************************************************* POR bcf RST DelayCy (100*msecs) bsf RST ;use hardware reset DelayCy (1*msecs) ;wait for reset to finish That toggles RST to enter reset. Having A0 high or low didn't make a difference. Nor do those delays, but some authors say to give at least 1 us for the reset; some say more. Again, that made no difference. I then follow that with : Code:  movlw b'10100010' ;0xA2, bias 10 = 1/9, 11 = 1/7 call PutCMD movlw b'10100000' ;0xA0, seg direction = normal call PutCMD movlw b'11001000' ;0xC8, com direction = flipped ; movlw b'11000000' ;0xC0, com direction = normal call PutCMD movlw b'00100011' ;0x23, set Regulation Ratio = 3.0 call PutCMD movlw b'00101111' ;0x2F, set power control call PutCMD ;all internal blocks on ; movlw b'00011111' ;0x1F, EV= 31 (center) ; movwf temp ;second byte sent ; movlw b'10000001' ;0x81, double command: Set EV ; call PutCMD2 movlw b'10000001' ;0x81, double command: Set EV call PutCMD movlw b'00011111' ;0x1F, EV= 31 (center) call PutCMD ;second byte sent movlw 0x40 ;position start call PutCMD ; movlw b'10101111' ;0xAF, turn display ON call PutCMD Lines 13-16 are an alternative to separate commands for a 2-command instruction. That made no difference. Line 23 is supposed to turn the display on, and it too makes no difference as the display is not on. John Edit: Toggling A0 didn't make a difference. Just hope the new displays arrive soon. Very unhappy with AliExpress. Edit2: Fixed typo in code. The binary in line 9 for OX23 was shown as Ox25. That was a typo introduced in copying from my highly comment working version. Just to be safe, I retested with 0x23 and no change. Your interpretation of A0 is wrong. I'm trying to tell you how it actually works. This is not guesswork on my part. Most of the LCD with controllers attached s out there work this way regarding a signal line telling the display whether you are sending it commands or data. Furthermore, you need to usually wait 5-15ms after each toggling for it to take effect. Thread Starter #### jpanhalt Joined Jan 18, 2008 9,037 I received a datasheet for my actual display, not just its controller. It differs mainly in recommended settings for the Booster ( 5 ver. 4), Regulator ratio (6.5 ver. 3.0), and EV (44 ver. 31) . New settings are given first. In brief, it was probably working, but the pixels weren't showing. It is fairly sensitive to those settings. Apparently my broad screens with different values did not hit the sweet spot. I will post cleaned code in the next day or two. I wanted to first clear up some things about delays and the timing of setting A0 low for commands, and by implication, high for data too. First off, I set the SPI clock to Fosc/4 = 8 MHz. That was just a convenience to make testing A0 easier. But it worked great at that 4xhigher clock rate. NO DELAYS were needed for writing commands or data. The only delay so far included in the code is 12 usecs right after Reset (RST) is released and set high. I have not taken the time to see whether even that is necessary. Second, A0 does NOT need to be set before starting the SPI exchange. Of course it works when that is done, and it requires less code to do, but it is not necessary. Here is my test code for PutCMD (A0 idles high): Code: PutCMD movlb 2 bcf CSn ; bcf A0 ;CMD/DAT bit, L=CMD movlb 4 movwf SSP1BUF ;set address to write to movlb 2 nop ;1 nop ;2 nop ;3 nop ;4 nop ;5 nop ;6 ; nop ;7 fail ; nop ;8 fail bcf A0 movlb 4 btfss SSP1STAT,BF bra$-1
movlb     2
bsf       A0             ;new 02/05  3:32
bsf       CSn
movlb     0
return
What that code does is move the byte to SSP1BUF to start the SPI exchange, then waits awhile, sets A0 low, then tests the BF flag to see whether transmission is done before returning. I determined that setting A0 low AFTER the BF is set will not work, and the timing sheets seems to show that it only needs to be set low before completion of the last bit (D0) to be transmitted. Of course, splitting that bit (D0) would be tricky.

My tests showed that I can add 6 NOP's, which corresponds to 6 SPI clocks, and it still works. With a 7th NOP, it fails.

Regards,
John

Edit: It has not escaped my attention that the "movlb 2" and "bcf A0" instructions count as 2 NOP's. I am just too lazy to slow the SPI clock down to refine the test. In any event, the time limit for clearing A0 is very close to the end of the 8th bit, which is what the datasheet says.

Last edited:

#### jpanhalt

Joined Jan 18, 2008
9,037
UPDATE

The display seems to be working fine. For reference, it is an LG132643-FFDWHUV from Laurel Electronics Co. , LTD in China. I have put a lot of comments in the code, which is how I keep my working routines.

Code:
;*******************************************************************************
;Setup SPI serial port
;*******************************************************************************
;;Mode 0                      ;CKP=0, CKE=1
banksel   SSP1STAT
clrf      SSP1STAT
bsf       SSP1STAT,6     ;CKE=1
movlw     b'00100000'    ;SPI clk = Fosc/16
movwf     SSP1CON1       ;CKP=0

;;Mode 1                      ;CKP=0,CKE=0
;     banksel   SSP1STAT       ;all SPI controls in Bank4                   |B4
;     clrf      SSP1STAT       ;CKE=0, SMP=0 (sample at middle)             |B4
;     movlw     b'00100001'    ;enable SPEN, set SPI CLK to Fosc/16
;     movwf     SSP1CON1       ;CKP=0,master clk =Fosc/x (see below)        |B4
;
;;Mode 2                      ;CKP=1,CKE=1
;     banksel   SSP1STAT       ;all SPI controls in Bank4                   |B4
;     clrf      SSP1STAT       ;CKE=1, SMP=1 (sample at middle)             |B4
;     bsf       SSP1STAT,6
;     movlw     b'00110001'    ;enable SPEN, set SPI CLK to Fosc/16
;     movwf     SSP1CON1       ;CKP=1,master clk =Fosc/x (see below)        |B4
;;Mode3                       ;CKP=1,CKE=0
;     banksel   SSP1STAT
;     clrf      SSP1STAT
;     movlw     b'00110001'
;     movwf     SSP1CON1
;NB: Modes 0,2,3 work with display.  Mode 1 does not.  Tested at Fosc/16 = 2 MHz.
;Modes defined as per Wikipedia. Reconfirmed with changes to DDRAM.
movlb     2              ;                                            |B2
bsf       CSn            ;idle high                                   |B2
bsf       A0             ;idle high
bcf       RST            ;idle low (hold in reset)
DelayCy   (10*msecs)     ;1 ms for power to stablize may be sufficient
Code:
;*******************************************************************************
;Initialize 132x64 display
;*******************************************************************************
POR
bsf       RST            ;release from Reset
movlw     26             ;delay d.26 = 9.875 usec delay
decfsz    WREG           ;delay
bra       $-1 ;delay ;Datasheet for the ST7567 suggests >5 usec delay after releasing from Reset, ;but other sources,including the Display datasheet, recomment >10 usec. Some ;sources even recommend just >1 usec. Other delays tried that work are d.13 ;(5 usec), d.3 (1.25 usec), 4x NOP (0.5 usec), and no delay. movlw b'10100010' ;0xA2, bias = 1/9 call PutCMD ; movlw 0xA0 ;seg direction = normal, 0xA1 = reversed call PutCMD ; movlw b'11001000' ;0xC0, com direction = normal, 0xC8 = reverse call PutCMD ; movlw 0xF8 ;set boost = x5, double command call PutCMD ; " movlw 0x01 ; " call PutCMD ; " movlw b'00100111' ;0x27, set Regulation Ratio = 6.5 call PutCMD ; movlw 0x81 ;double command: Set EV call PutCMD ; " movlw 0x2C ;EV = 44 dec call PutCMD ; " ;Other EV's tried: ;0x1F = EV= 31 (center) 31->blank ;0x23 = very faint ;0x2B = not bad ;0x2D = not much different from 0x2C ;set power control blocks on ; movlw b'00101100' ;0x2C,set booster on ; call PutCMD ;not essential ; movlw b'00101110' ;0x2E,set regulator on ; call PutCMD ;not essential movlw b'00101111' ;0x2F,set voltage follower on call PutCMD ;all internal blocks now on #essential movlw b'10101111' ;0xAF, turn display ON #essential call PutCMD call ClrDDRAM ; call LngDly ;############################################ bra TestScrn ;############################################ Blink ;screen commands only, do not affect DDRAM ; movlw 0xA5 ;turn all pixels on ; call PutCMD ; DelayCy (100*msecs) ;allows recognition ; movlw 0xA4 ;turn all pixels off ; call PutCMD ; DelayCy (100*msecs) ;allows recognition ; bra Blink ;### Not completely sure what these do: ### ; movlw 0xEE ;end RMW ; movlw 0xE0 ;start RMW ; call PutCMD ClrDDRAM ;Under Debug, stopwatch showed 57287 Tcy for ClrDDRAM ;or 7.160 msecs @ 32MHz fosc and SPI clk @ fosc/16. With SPI clk @ fosc/4 ;31367 Tcy required or 3.921 msecs. If called from program be sure to add a ;sufficient delay. ;The ST7567 is specified for 132x65, but the ;65th line (9th row) is only 1-bit high. Judging from the absence of a faint ;line on the screen for 9th row, it does not appear to be implemented and was ;not addressed in this code. movlw 0xB8 ;0xB7 +1 movwf temp _Erase movlw 1 subwf temp,f btfss STATUS,1 return ;DC clear when "borrow" movf temp,w call PutCMD ;set row (7..0) movlw 0x10 ;set column high byte = 0 call PutCMD ; " movlw 0x00 ;set column low byte = 0 call PutCMD ; " movlw 132 ;accounts for skip on 0 movwf count movlw 0x00 ;write all zeros _DoRow call PutDat ; " decfsz count,f bra _DoRow ;WREG should return with WREG=0 (works 02/14/19) bra _Erase Test screen: Code: ;******************************************************************************* TestScrn ;same as ClrDDRAM w/ different character written movlw 0xB8 ;0xB7 +1 movwf temp _Test movlw 1 subwf temp,f btfss STATUS,1 bra Main ;return ;DC clear when "borrow" movf temp,w call PutCMD ;set row (7..0) movlw 0x10 ;set column high byte = 0 call PutCMD ; " movlw 0x00 ;set column low byte = 0 call PutCMD ; " movlw 132 ;accounts for skip on 0 movwf count movlw 0xF0 ;write stripes, etc. ######################### _DoRows call PutDat ; " decfsz count,f bra _DoRows ;WREG should return with WREG=0 (works 02/14/19) bra _Test Main nop bra$-1
;*******************************************************************************
Called subroutines:
Code:
PutCMD
movlb     2
bcf       CSn
bcf       A0             ;CMD/DAT bit, L=CMD
movlb     4
movwf     SSP1BUF
btfss     SSP1STAT,BF
bra       $-1 bsf A0 ;new 02/05 3:32 bsf CSn movlb 0 return PutDat movlb 2 bsf A0 ;A0 should idle high bcf CSn movlb 4 movwf SSP1BUF ;put data btfss SSP1STAT,BF bra$-1
movlb     2              ;
bsf       CSn
movlb     0
return
;*******************************************************************************
LngDly
movlw    0x48
movwf    d1
movlw    0x71
movwf    d2
movlw    0x12
movwf    d3
Delay_0
decfsz    d1, f
bra      $+2 decfsz d2, f bra$+2
decfsz    d3, f
bra      Delay_0
return
And finally, a picture of the test pattern:

Edit: I forgot one little detail that might be important for those accustomed to character displays. The pages do not wrap, which might be an advantage for clearing the rest of a row of characters, since the SPI interface cannot read the screen.

Edit2: I forgot to mention that #### is used to highlight things that I would not normally include, such as LngDly in usable code. LngDly ≈ 1 second.

Last edited:


text:
WKB approximation question

I was reading some stuff on asymptotic analysis, but how do you get from the 1st line to the 2nd line?

$y \sim \frac{1+x}{2\lambda}\exp\left(\frac{\lambda x}{1+x}\right) - \frac{1+x}{2\lambda}\exp\left(\frac{-\lambda x}{1+x}\right)\\y(1) \sim\frac{1}{\lambda}\exp\left(\frac{\lambda}{2}\right) \text{as } \lambda \rightarrow \infty$

I see they substituted $x=1$, but where does the $- \frac{1+x}{2\lambda}\exp\left(\frac{-\lambda x}{1+x}\right)$ term go?

What does $y(1) \sim\frac{1}{\lambda}\exp\left(\frac{\lambda}{2}\right) \text{as } \lambda \rightarrow \infty$ actually mean? The main part im not sure about is the $\sim$.

-

1 Answer

$$f\sim g \quad (\text{as }x\rightarrow\infty)$$

reads "$f$ is asymptotic to $g$ as $x$ goes to infinity" . This means basically that $\lim_{x\rightarrow \infty} \frac{f}{g} = 1$ .

Because $e^x$ dominates $e^{-x}$ as $x$ becomes large (i.e. $e^{-x} \in \mathcal{o}(e^{x})$) they neglected the term with the negative exponent in the second line.

See also http://en.wikipedia.org/wiki/Asymptotics , http://en.wikipedia.org/wiki/Big_O_notation for some of the notation.

-
Thanks, understood it! – Jonathan May 13 '12 at 20:22


text:
# Will Gauss's law still hold in case of deviation from inverse square law?

Assume a spherical metallic shell over which a charge $Q$ is distributed uniformly.

Applying Gauss's law $\displaystyle\oint\textbf{E}\cdot d\textbf{a}=\frac{Q_{\text{enc.}}}{\epsilon_0}$ by considering a gaussian spherical surface concentric with the shell but with smaller radius, one can easily show that the electric field inside the shell is 0 since there is no enclosed charge within the gaussian surface.

What would change in the above analysis and result had the electrostatic interaction been different from the inverse square behavior (i.e., $1/r^{2+\epsilon}$ instead of $1/r^2$)?

-

You can't combine Gauss's law with different force laws than $|\vec E|\sim Q/r^2$ because $|\vec E|\sim Q/r^2$ actually follows from Gauss's law! It's because of the very equation you wrote down, $$\epsilon_0\int \vec{dS}\cdot \vec E = Q_{\rm inside}$$ When $\vec E$ is radial and spherically symmetric, the left hand side is equal to $4\pi R^2$ from the area times $|\vec E|$ which implies that $|\vec E|$ goes like $1/r^2$. So the assumptions of your problem can never be realized and your question makes no sense.

In different number of spatial dimensions $D$, $1/r^{2}$ is replaced by $1/r^{d-1}$.

-
I like to think about it as the other way around: One can derive Gauss' law from coulomb's law. The inverse-square comes from the fact that solid angle $\propto dS\cos\theta/r^2$, right? –  Manishearth Mar 1 '12 at 2:48

As discussed in another question (and I see that Lubos has touched on this as well), Coulomb's law is considered to be a consequence of Gauss's law in 3D space. If physical conditions were to change such that it and Coulomb's law became inconsistent with each other, Gauss's law would continue to hold, and Coulomb's law is the one that would need to be modified. So any deviation of the exponent in Coulomb's law from $-2$ would probably be taken as an indication of something funky going on with the dimensionality of space, not that Gauss's law is broken.

But for educational purposes, you could calculate what would happen if we throw Gauss's law out the window, and then postulate that, despite being in 3D space, Coulomb's law has an exponent other than $-2$ on the radius for some bizarre reason. Wikipedia has an article on the shell theorem which includes a derivation that applies almost unchanged to this case. (They do it for gravity, so for our purposes, just mentally replace the masses $M,m$ with charges $Q,q$.)

The charge within the shaded band is

$$\mathrm{d}Q = \frac{Q}{4\pi R^2} (2\pi R\sin\theta)(R\mathrm{d}\theta) = \frac{Q}{2}\sin\theta\,\mathrm{d}\theta$$

All the components of the force exerted by this charge on the test charge cancel out, except for the one along the left-right axis, which is $F\cos\phi$. So, if you assume the electrostatic force law is $F = \frac{k q_1 q_2}{r^{2+\epsilon}}$, the force exerted by the charge in the shaded band on the test charge $q$ is

$$\mathrm{d}F = \frac{k q\,\mathrm{d}Q}{s^{2+\epsilon}}\cos\phi = \frac{kqQ}{2}\frac{\cos\phi\sin\theta\,\mathrm{d}\theta}{s^{2+\epsilon}}$$

Using the law of cosines you can calculate that

\begin{align}\cos\phi &= \frac{r^2 + s^2 - R^2}{2rs} & \cos\theta &= \frac{r^2 + R^2 - s^2}{2rR} \\ & & \sin\theta\,\mathrm{d}\theta &= \frac{s}{rR}\mathrm{d}s\end{align}

Substituting these into the expression for force and integrating gives you

$$F = \frac{kqQ}{4r^2R}\int_{R-r}^{R+r}\frac{s^2 + r^2 - R^2}{s^{2+\epsilon}}\mathrm{d}s$$

which works out to

$$F = \frac{kqQ}{2(1 - \epsilon^2)r^2R^{\epsilon}}\Biggl[\frac{(1+\epsilon \frac{r}{R})}{(1 + \frac{r}{R})^{\epsilon}} - \frac{(1-\epsilon \frac{r}{R})}{(1 - \frac{r}{R})^{\epsilon}}\Biggr]$$

A graph of this force as a function of $\frac{r}{R}$ and $0 < \epsilon < 1$ would look roughly like this:

In particular, it's negative, so the force is inward, and it gets larger as you approach the edge of the sphere. If $\epsilon > 0$, the force would be outward instead of inward, but other than being reflected over the x-axis the graph would be qualitatively similar.

If $\epsilon = -1$, then you have to do the integral a little differently because you're integrating $1/s$. You would then wind up with

$$F = \frac{kqQ}{2r^2 R}\biggl(rR - (R^2 - r^2)\operatorname{tanh}^{-1}\frac{r}{R}\biggr)$$

although the graph is still not qualitatively different; it's still positive and increases as you move away from the center of the sphere.

-


text:
## ZDDs defined

ZDDs may seem unremarkable, as they resemble well-known data structures such as crit-bit trees or DFAs. Nonetheless, the conditions they must satisfy have far-reaching implications.

We define a ZDD $Z$ to be any directed acyclic graph such that:

1. A terminal node is either:

• the special node $\top$ (the "TRUE" node), or:

• the special node $\bot$ (the "FALSE" node).

2. Each nonterminal node satisfies the following conditions:

• The node is labelled with a positive integer $v$. This label need not be unique.

• The node has outdegree 2. One of the outgoing edges is named "LO" and the other is named "HI". In diagrams, we draw dotted lines for LO edges and solid lines for HI edges.

• A destination node is either terminal or labelled with an integer strictly larger than $v$. Thus we can omit arrowheads in diagrams because the edge directions can be inferred from the labels.

• The HI edge never points to the $\bot$ node.

3. There is exactly one node with zero indegree, which we call the root node. The above implies the root node is either terminal or labelled by the smallest integer in the dag.

4. If two nodes have the same label, then their LO or HI edges point to different nodes. In other words, there are no redundant nodes.

We call $Z$ an unreduced ZDD, if a HI edge points to $\bot$ or the last condition fails to hold.

In our first example, the universe $U$ was the letters of the alphabet. More generally, we consider a universe of size $n$, number the elements from 1 to $n$, and refer to an element by this number.

The dag rooted at any node in a ZDD is itself a valid ZDD. Thus we expect straightforward recursive descriptions of many ZDD algorithms and properties. Indeed, anyone comfortable with dynamic programming will feel at home with ZDDs.

## Representing a family

Let $F$ be a ZDD. Let $v$ be its root node. Then:

1. If $v = \bot$ then there can be no other nodes and $F$ represents $\emptyset$, the empty family.

2. If $v = \top$ then there can be no other nodes and $F$ represents the family containing just the empty set: $\{ \emptyset \}$. We call this the unit family, and denote it by $\epsilon$.

3. Otherwise $v$ has two children. Let $v_0$ be the LO node, and $v_1$ be the HI node. Let $F_i$ be the family represented by the ZDD rooted at $v_i$ which is known by inductive assumption. Then $F$ represents the family

$F_0 \cup \bigcup_{\alpha\in F_1} \alpha \cup \{v\} .$

In other words, as in real life, we divide the world between the haves and the have-nots: on the LO branch we have the sets in $F$ that don’t contain $v$:

$F_0 = \{ \alpha : \alpha \in F, v \notin \alpha \}$

and on the HI branch we have the sets in $F$ that do contain $v$, but we remove the $v$ before recording them:

$F_1 = \{ \alpha\setminus\{v\} : \alpha \in F, v \in \alpha \}$

Some examples:

The above is the family $\emptyset \cup \{\emptyset \cup \{2\}\} = \{ \{2\}\}$. This is $e_2$, an elementary family. Elementary families are those of the form $\{\{n\}\}$, and denoted by $e_n$.

More family photos:

The family $\{\emptyset\} \cup \{\emptyset \cup \{2\}\} = \{ \emptyset, \{2\}\}$.

The family $\{ \{2\} \} \cup \{ \emptyset\cup \{1\} \} = \{ \{1\}, \{2\}\}$.

The family $\epsilon \cup \{ \{1\} \cup \{2\} \} = \{ \{1, 2\}\}$.

## Features

Two ZDDs are identical if and only if the families they represent are identical (exercise). When we refer to a family as a ZDD, we mean the ZDD representing the family, and vice versa.

We can enumerate all sets in $F$ lexicographically (exercise).

We have $|F| = |F_0| + |F_1|$, thus we can recursively compute the number of sets in a ZDD. This also allows us to pick out, for instance, the 13th set out of a 42-member family (exercise). Random access is fast, and somewhat analogous to lazy evaluation in programming languages such as Haskell: the ZDD can produce desired family members quickly on demand. Thus any operation we can do on an array of sets, we can do with similar efficiency on a ZDD.

We can modify these techniques so that if we weight each element in the universe, after recursively visiting each node, we can find the sets in the family of maximum (or minimum) weight, and statistics such as the mean and standard deviation. We can compute interesting generating functions, such as one from which we can read off the number of sets of a given size. With an array representation of a family, we would have to visit each set. With a ZDD, we only have to visit each node, which is often much smaller.

As with data structures built from trees, we can convert recursive algorithms to iterative bottom-up algorithms. For conciseness we tend towards the former in our exposition, though the latter may be better in practice.

So ZDDs are nifty. If only we knew how to construct ZDDs for a given family.