Tag Archives: Models

Solar Cells and the Lambert W Function

Computations for the one-diode model for solar cells, if done using the exact formula with Lambert W function, are likely to produce arithmetic overflow or underflow. That is a constraint on the ability to implement such calculations in Fortran or C, or on microcontrollers. The solution: use a coordinate transformation of the computation problem. If the problem were being solved on graph paper, the coordinate transformation would be achieved by using log-log graph paper.

I gave a talk at a recent conference, “Celebrating 20 years of the Lambert W function”. Title: Solar Cells and the Lambert W function. Joint work with my colleague S. R. Valluri. The slides are available at Researchgate, at this URL:

https://www.researchgate.net/publication/305991463

Best wishes,
Ken R.
11-Aug-2016

Non-Harmonic Fourier Series

2016 is the 200th anniversary of the publication of Joseph Fourier’s ideas for the solution of heat conduction and radiation problems using trigonometric series expansions. What we now call Fourier series. His ideas appeared in book form in 1822, but they first appeared in 1816 in a paper Theorie de la Chaleur (Extrait) which describes the book’s contents. It is appropriate to return to Fourier’s work. And there are gems to be found.

Chapter 5 of his book, The Analytical Theory of Heat (in English translation by Alexander Freeman), discusses the conduction of heat in a solid sphere. Fourier obtains a sine series which solves the differential equation. However, his series is not a harmonic series of the form of a weighted sum of terms sin(k*x) where the k are positive integers. Rather, Fourier’s solution is what we now call a non-harmonic series. It is a weighted sum of terms sin(b*x) where the b values are positive reals, moving steadily out roughly as do the integers. What are those values of b ? They are the solutions to an equation of the form b*cotan(b) = B. Those basic modes can be summed in a linear combination to match other constraints of a particular problem.

We have seen the equation b*cotan(b) = B previously. It is the solution for the bound state energy levels in a quantum mechanics problem, the one-dimensional finite square well.

This looks like fun. Fourier’s solution is very clever. William Thomson (Kelvin) worked on this topic also — it is the subject of Thomson’s first published paper. There is plenty to explore.

Just a heads-up, for anyone else who may be interested in this topic.

Best wishes,
Ken Roberts
08-Aug-2016

ps. Fourier’s book was republished by Dover. It is also online via the archive.org website.

Finding Good Recommendations

There are many online services which attempt to recommend movies, books, webpages etc that someone will like. In some implementations, recommendations are based upon finding new items that are liked by other users: If you like A, and someone else likes A and B, then B is perhaps a good recommendation for you. The difficulty is that establishing your profile can be a tedious task, as you have to initially indicate several items that you like. On the order of twenty items, perhaps.

A new algorithm, developed by Evgeny Frolov and Ivan Oseledets of the Skolkovo Institute, provides a much less time consuming, and likely more accurate, way of establishing your preferences. It uses information about items that you do not like, as well as about items that you like. Roughly stated, if you do not like item B, and those who like B also like C, then item C is perhaps not a good suggestion for you.

The details of their algorithm are subtle, and designed for efficient operation. It is not just graph searching. See Arxiv 1607.04228 for their paper — linked below — and a press release also linked below.

Best wishes,
Ken Roberts
01-Aug-2016


http://arxiv.org/abs/1607.04228

Evgeny Frolov and Ivan Oseledets — Fifty Shades of Ratings: How to Benefit from a Negative Feedback in Top-N Recommendations Tasks


Press Release — Skoltech scientists have created an algorithm that improves the quality of recommender systems

Raspberry Pi 3 Multi-Computer

It now makes sense to use Raspberry Pi 3 boards to build a multi-computer for serious scientific work. In a previous post on 25-Jan-2016 I described my tests using a Raspberry Pi 2 for density functional theory (DFT) calculations using the ELK software. The RP 2 operates at about 1-10th the speed of a Laptop purchased for scientific work, the laptop having an Intel i5-core processor and 4 GB of memory. Details in the previous post. Bottom line: RP version 2 is not economic for building a multi-computer for the ELK DFT tasks.

However, I have now had an opportunity to test the Raspberry Pi version 3, released earlier this year. It is faster, and completed the ELK calculations in 43 minutes elapsed time, vs 79 minutes on the RP version 2, and vs 8 minutes on the i5-core laptop. That means it takes 5.5 RP3 boards to equal the capability of the laptop. Since each RP3 (board only) costs $35 Cdn from a typical supplier (or $45 if one includes a power adaptor, or $75 if one wants a case, cables, etc as well), one can set up a config of about 6 RP3 boards for something like $250. The laptop costs $300 as a refurb system.

There are of course complexities. One has to mount the RP3 boards somewhere — a bit of lumber should suffice for home brew. And six power supplies can probably be replaced by a single supply of larger amperage capacity. Ethernet cables are needed, and a switch, but most tinkerers have that sort of stuff around. Still, all considered, one can probably build a very nice multi-computer out of RP3 boards at about three-quarters the cost of an equivalent multi-computer based upon i5-core refurb laptops.

I’m not planning to actually build this multi-computer. I already have what I need for my calculational tasks. But it’s nice to see the Raspberry Pi become suitable for this serious calculation.

Best wishes,
Ken Roberts
05-May-2016

Bernays on Propaganda

Propaganda is the title of a book by Edward Bernays published in 1928. A less provocative title might be Public Relations. Bernays was the pioneer of public relations.

The premise of Bernays’ book is that “in almost every act of our daily lives, whether in the sphere of politics or business, in our social conduct or our ethical thinking, we are dominated by the relatively small number of persons … who understand the mental proceses and social patterns of the masses.” [pp 9-10]. Is that bad? I suppose it depends upon one’s position in society. It is not egalitarian.

Regardless of one’s take on the ethics of propaganda, there is certainly a great deal of realism in Bernays’ view of the world. Anyone who hopes to improve the world should be aware of the ideas and methods described by Bernays.

I wish I had read Bernays’ book many decades ago when I was engaged in social justice and political endeavours. I was no great activist, but did fight many minor skirmishes. Perhaps, using Bernays’ ideas, some situations might have been handled better.

So … a word to the wise — which means you, dear reader! — Bernays’ book is worth one’s attention. It’s a fast read, and decently written. The examples are a bit antique in some ways — 88 years ago — but the book is up to date in essentials.

Best wishes,
Ken Roberts
02-May-2016

Links:

Wikipedia article about the book:
https://en.wikipedia.org/wiki/Propaganda_%28book%29

Wikipedia articla about Edward Berneys:
https://en.wikipedia.org/wiki/Edward_Bernays

Online text of Propaganda, book by Bernays:
http://www.historyisaweapon.com/defcon1/bernprop.html

Scan of first edition of the book, open source:
https://archive.org/details/Propaganda1928ByEdwardL.Bernays

Bernays-Propaganda-cover-png

Clarity, Delusion, and Focus

Clear and focused thinking is important for progress when working on a task, such as understanding a situation. One brings to bear whatever one has deduced from previous encounters with a similar situation, as well as whatever one has learned from study of books — history or worked problems, as appropriate. Yet clear and focused thinking is also very closely related to delusional thinking. Clarity and focus can also prevent one from including important information that might bear upon the matter. Another person, observing one’s reasoning, might categorize such a problem formulation or investigative framework as delusional.

For instance, Freeman Dyson, recalling his work in the Operational Research Section of the British RAF Bomber Command during the second world war, tells how his and colleagues’ inability to go beyond operational dogma was a contributing factor to their failure to deduce the existance of a German fighter anti-bomber weapon system: “Schräge Musik”. This weapon involved guns pointing upward from the fighter at an angle of about 60 degrees from the horizontal. The fighter could fly underneath the bomber, observe its outline against the night sky, and shoot up at it; without the bomber crew being aware of an impending attack.

Dyson’s words: “I later applied the same method of analysis to the question of whether experience helped crews to survive. Bomber Command told the crews that their chances of survival would increase with experience, and the crews believed it. They were told, After you have got through the first few operations, things will get better. This idea was important for morale at a time when the fraction of crews surviving to the end of a 30-operation tour was only about 25 percent. I subdivided the experienced and inexperienced crews on each operation and did the analysis, and again, the result was clear. Experience did not reduce loss rates. The cause of losses, whatever it was, killed novice and expert crews impartially. This result contradicted the official dogma, and the Command never accepted it. I blame the ORS, and I blame myself in particular, for not taking this result seriously enough. The evidence showed that the main cause of losses was an attack that gave experienced crews no chance either to escape or to defend themselves. If we had taken the evidence more seriously, we might have discovered Schräge Musik in time to respond with effective countermeasures.
Source URL: https://www.technologyreview.com/s/406789/a-failure-of-intelligence/ (Dyson, 2006)

Another illustration, which is similar in nature, is inherent in some post-war comments by the German general Siegfried Westphal:
“Propaganda must be flexible, although it must not be forgotten that the tune cannot be changed from day to day. Under certain circumstances it can be a very dangerous poison since it may influence or frustrate the decisions of its propagators against their will. Examples of this can be found on both the German and Allied sides during the war and also after it.” (S. Westphal, “The German Army in the West”, Cassell & Co, 1951, page 16).

We can observe numerous illustrations of such delusional behaviour, believing one’s own propaganda, nowadays.

The risks of clarity and focus are not restricted to military or political situations. Scientific investigation, and organizational structure, are also worth considering in the context of the clarity – delusion – focus model.

Best wishes,
Ken Roberts
10-Feb-2016

How to Find Papers

A site named “ResearchGate” has become one of my tools for locating papers. The site is a bit annoying at times. Sort of like Facebook, for scholarly work. There is a continual stream of “helpful” emails, and popups asking one to consider a job posting, or add a publication, etc etc. Rather like a hyperactive and gossipy personal assistant. Also, there is a lack of confidentiality — if one “follows” a particular paper, to be apprised of future citations of it, all of one’s contacts are advised that one is following that paper. So if one wants to work under the radar, then ResearchGate is not the tool for you. Be advised!

However, on the plus side: ResearchGate is excellent as a way of finding out what a person has published, who has cited it, what that person has published, and so on. I recently was looking at a paper by Neil Turok, “On quantum tunneling in real time”, and wanted to find out if anyone had cited it. Web of Science / Knowledge said not. But Google Scholar reported some related papers, and one of them led me to a paper by Carl Bender and Daniel Hook which cites the Turok paper. And that, in turn, via Hook’s ResearchGate publications list, led me to the very interesting and stimulating paper by Bender and Hook, Arxiv 1011.0121, “Quantum tunneling as a classical anomaly”.

That enables me to return to a subject I’ve been interested in for some time, whether the complex plane tangencies of the Lambert W lines with the strength contours of a quantum well, represent sensitivities which have a physical implication — for example, whether one can devise a sensor which uses that tangency. The QWIP, quantum well infrared photodetector, which is found in night vision apparatus, is an example of such a sensor. In general, a sensor can be made by conditioning a quantum well device at or near a context which changes the number of bound states or a tunneling probability, and then allowing the environment to stress the sensor — changing the energy, changing a dimension, changing temperature, and so on. Finding the Bender and Hook papers, and a couple of Turok papers, offers the possibility of a new look at that topic.

Best wishes,
Ken Roberts
31-Jan-2016

ELK Software and Raspberry Pi

ELK is a software package for density functional theory calculations. Raspberry Pi is an inexpensive computer. I was interested in whether the RasPi might be useful for ELK calculations. This post reports on some timing tests.

ELK is open source software, written in Fortran, available via the SourceForge link given below. ELK runs its calcs on multiple parallel processors. My typical config for using ELK is to run on a two-core or four-core processor such as an Intel i3, i5 or i7 based Laptop, with Linux (Slackware) as the operating system, and OpenMP as the task coordination mechanism. I usually run several jobs, with various parameter choices, exploring some material model. Each job might take from a few hours to a couple days, depending upon the fineness of the grid used for modelling. On a supercomputer cluster, I have in the past run up to 100 jobs concurrently, with a selection of parameter choices, in order to develop an understanding of how the parameters affect the calculation results for the material.

More recently I have been running jobs sequentially, using a more directed exploration of the parameter space vs model results. That latter approach allows for more interaction with the investigation as it progresses, and leads to better intuition. One of my beliefs is that the dynamic tension between improving calculation speed and improving model and math, leads to better understanding. That belief goes back decades, to some success I had in number theory problems by using the tension between calculation and description. To do the work faster, instead of using a faster computer, one can replace parts of the problem description with better math. Eventually, sometimes, the problem collapses into good math and a fairly rapid calculational model. I have a hope in the back of my wish list that certain DFT, QCD, and Molecular Dynamics problems will someday be discovered to have such simplifications.

Anyway, given that approach, I was interested in perhaps using the RasPi as an ELK machine, thereby leaving my main Linux laptop free for other work. The RasPi (couple of links below) has impressive specs, with the model 2B, the current product, having a quad-core processor, 1 GB memory, 8 GB to 32 GB of local disk (depending on the sD photo card installed) with net 4 GB to 28 GB of free storage for user files, an ethernet port, four usb ports for keyboard, mouse, etc, and … best of all … very modest cost. RasPi comes with Linux (Debian based) and a copy of Mathematica. Although I don’t use Mathematica at present, having “paid my dues” already by learning Maple, and not wishing to have to re-learn the quirks of a new tool unless necessary, the low cost access to Mathematica is a nice plus, of possible future benefit.

So, I ran some timing tests. The results in summary: ELK installs on RasPi with no difficulty (details below) and runs its post-install tests successfully. However, RasPi is slow in running ELK, taking 79 elapsed minutes to complete the collection of 18 test calculations. The “top” and “1” command sequence shows that all four of the processor threads were active, so the problem may lie with some other aspect — for example, speed of the sD card or the low (1 GB) memory resulting in less in-memory-buffer file access. Whatever. In contrast, my Intel i5-core based laptop (Lenovo ThinkPad T420 with disk replaced by a 1 TB drive, and Slackware installed instead of Windows) completes the test calculations in 8 minutes. With a 10x speed difference, the ELK approach is not cost effective. It might cost about $600 to get ten stripped down RasPi boards (with board itself, with only power and ethernet connected, and controlled via ssh login sessions), whereas the T420 laptop cost only $300 refurbished. So, I will stick with laptops. However, I look for the next generation of RasPi boards. I think it is an excellent product. There are other applications besides ELK. GROMACS, for molecular dynamics calculations, for instance, might be suitable for the RasPi. For the future.

Some details about the RasPi setup may be helpful to record, for others. The RasPi in Canada is available from canakit.com and one can find other suppliers elsewhere. I was pleased with the speed of delivery from Canakit. I got the full kit, eg with Wifi dongle, but one just needs a stripped down kit for second and subsequent RasPi boards. I replaced the 8 GB sD storage card with a 32 GB sD card, with the latest operating system version (Nov-2015) downloaded from the RasPi support website. The OS boots to an X-Windows screen, and one logs in as user “pi”. To get root access and a command line, I used “sudo passwd root” and set my own password on the root user. Then one can work a bit easier. The aptitude utility was used to install the software needed for ELK, including “aptitude xxx” commands where xxx was these in sequence: “update”, “search fortran”, “install gfortran”, “search openmp”, “install libblacs-openmpi1”, “search lapack”, “install liblapack3”, “search fft”, “install fftw3”. ELK was set up to use the GNU fortran compiler (gfortran), etc.

It is interesting that the ELK test runs produce some warning messages regarding IEEE floating point arithmetic errors: IEEE_INVALID_FLAG, IEEE_OVERFLOW_FLAG, IEEE_UNDERFLOW_FLAG, IEEE_DIVIDE_BY_ZERO. These exceptions are discussed in a post at SourceForge, URL given below. Although I found the specific recommendations of that post to be ineffective, the insight into cause, and why it “does not matter”, is useful — see the third comment in that post. It is something that can guide investigation. Running ELK on Slackware / Intel i5-core with gfortran does not produce those errors, though it produces identical test results. I think that is simply because floating point exception warnings have been turned off in the latter configuration.

That’s it about RasPi and ELK. Each device/program is worth one’s attention if it matches one’s objectives, as these do with my objectives. Neither is perfect, but they are understandable, affordable, open for improvement, and a net benefit for serious work.

URLs below.

Best wishes,
Ken Roberts
25-Jan-2016

For ELK density functional theory calculational software:
http://sourceforge.net/projects/elk/

For Raspbery Pi supply, and for community projects website:
https://www.element14.com/community/welcome
https://www.raspberrypi.org/

Discussion of ELK tests producing IEEE floating point exceptions:
http://sourceforge.net/p/elk/discussion/897820/thread/e87237ad/

[end]

Solar Cells 3

In this post I’ll talk about the one diode model for solar cells. A solar cell produces a current because, under illumination, exciton pairs — electrons and holes — are produced, and before the electrons and holes can recombine, they flow towards and out through the contact terminals of the solar cell.

A solar cell can be described by a “lumped parameters” model. There is a current source, which represents the current which the solar cell’s material would produce, under standard illumination, in the absence of any losses due to reverse flows or contact resistance. The reverse flow, or recombination of excitons, is represented as a diode in parallel with a shunt resistance. There is also another resistance in the model, due to the contact resistance and other limitations on the flow of electrons to outside the solar cell. That latter resistance is modelled as a resistor in series with the current source / diode / shunt resistor triplet.

Here is a circuit diagram. It’s easier to see an unambiguous circuit than to follow the verbiage in the previous paragraph. The output current and voltage produced by the solar cell are I and V. These two related quantities are measurables. One actually has several values of I and V — for instance Isc the short circuit current (when V is zero), and Voc the open circuit voltage (when I is zero), both under standard illumination. As well one can obtain a value Idk, the dark current when there is no illumination and the solar cell has a bias voltage V applied. However, the other parameters in the circuit diagram are components of the model, to be determined by choosing those parameters to fit the actual I-V curve measurements (see characteristic curve in prior post) against the model. Rs is a series resistance, Rp is a shunt resistance, Iph is the photocurrent, and I0 and n are diode parameters — to be discussed in the next paragraph. Actually, given the current direction convention in the circuit, the output of the solar cell is -I not I. That is just a convention, but it accounts for the shape of the I-V curve in previous post, which looks like a letter J. Solar cells (good ones, at least) are described as having a J-shaped I-V curve, so I have adopted a current direction convention which makes the curve look like a letter J.

fig-1-diode

So, what about the diode? The standard diode model is called the Shockley model, and is described in many places on the net and in books. For an extended discussion focused on the particular context of solar cells see, for instance, “The Physics of Solar Cells”, by Jenny Nelson, chapters 1 and 6. The basic idea of a p-n junction diode is that current flows in one direction based upon the bias voltage across the diode, but it is offset by a thermal counterflow. The current through and voltage across the diode, say Idiode and V1, are related by the equation
Idiode = I0 [exp(q V1 / n k T) – 1]
where T denotes absolute temperature (degrees Kelvin), k denotes Boltzmann’s constant, and q is the magnitude of the electron charge.

There are two parameters in the Shockley diode model: I0 and n. The parameter n is called the “ideality factor”, and is 1 in an “ideal” diode, on the order of 1.05 for a real diode, and somewhere between 1 and 2 for a diode model used for a solar cell. As you can see, the assumption that a solar cell can be modelled using a diode is a bit of a stretch, but it is good enough for most practical purposes. It has the great advantage that there is lots of circuit modelling software for diode circuits. The parameter I0 is chosen to fit the data.

Now, one can write an equation to relate I and V for the one diode model of a solar cell. The voltage drop across the entire solar cell is V = I*Rs plus V1; that is, V1 = V – I*Rs. The current through the shunt resistance is V1/Rp. The current through the diode is Idiode as per the formula above. Putting everything together, and taking account of the sign conventions, one ends up with the equation
I = I0 [exp(q (V – I Rs) / n k T) + (V – I Rs)/Rp – Iph.
This equation is exact, at least insofar as the Shockley diode model and the other components in the one diode model are adequate as a description of actual solar cells. If one chooses a value of V, one can solve for the corresponding value of I. And vice versa. So the I-V curve corresponding to this equation can be drawn, and one can adjust the five parameters I0, Rs, Rp, n and Iph to fit the solar cell model to the actual I-V curve for a solar cell. (The parameters q and k are constants, and the parameter T reflects the working context of the solar cell, so they do not have to be adjusted to fit the model to the data.)

However, choosing a value of V and solving for I means solving an implicit equation. Likewise, choosing a value of I and solving for V also means solving an implicit equation. It would be nice to have an explicit equation, I = f(V) or V = f(I), either one. The difficulty is that I and V each appears both in linear terms and in exponential terms in the model equation above.

Those sorts of equations, involving exponentials and linear terms in a variable, often can be solved using the Lambert W function, and this equation is one which can be solved. The basic solutions were found by Jain and Kapoor in 2004 (see refs in working paper for the journal reference), and I will not bother to transcribe them here. J&K give explicit equations for both alternatives, I = f(V) and V = f(I). Because it is the V = f(I) form which turns out to be best for extending to the two diode model to be considered later, I will show the V = f(I) form here:
V = f(I) = I Rs + (I + Iph + I0) Rp
– (n k T / q) LamW((q / (n k T)) I0 Rp exp[(q / n k T) Rp (I + Iph + I0) ] )
where LamW() denotes the principal branch of the Lambert W function.

That’s a mess, I know. But at least it is an explicit expression. Given a value of I, one can calculate V. That calculation process is much less time-consuming than iterative refinement to solve an implicit equation of the form function(V,I) = 0.

However, there’s a problem. That particular formula V = f(I) can experience arithmetic overflow. And that’s where our working paper comes in. I’ll discuss some computational considerations, for the one-diode model, in the next post.

By the way … Merry Christmas !

Best wishes,
Ken Roberts
25-Dec-2015

Solar Cells 2

A solar cell produces an electric current when its material surface is illuminated. In order to standardize the methods of measuring solar cell performance, and comparing different cells, certain conventions are adopted. For instance, standard illumination, which is the amount and wavelengths of the light falling on the solar cell’s surface.

A typical solar cell might have an area of 2.2 cm^2. Sometimes the current produced by a solar cell is quoted as so-many amps (or milliamps or microamps) under standard illumination. That statistic is appropriate when considering a particular solar cell or comparing two models of solar cells. Other times the current produced by a solar cell is quoted as a “current areal density”, that is, so many amps per square centimeter of solar cell material. That statistic is appropriate when considering a proposed solar cell material, or comparing two types of material or two choices of processing options for preparing solar cells using a particular material.

Solar cells are assembled into modules, which are groups of individual solar cells connected together (eg, in series) pre-packaged for easy handling. Modules are built into arrays, which make up solar panels; the panel includes the structural framework. Solar panels are the structures one notices on roofs and in fields.

The context of our recent work has been a mathematical model which is used for describing individual solar cells. As you can see there are many other aspects of solar cells and solar panels which are worth investigation (and have been investigated). Our work is just one part of the efforts of thousands.

I’m no expert on solar power. But I want to share the bits of information (or misunderstanding!) which I’ve gathered during my work. In the rest of this post I’ll describe some general aspects of solar cell performance. The details of the math model I’ll discuss in other posts — or you can go directly to the working paper at Researchgate if you want.

There are two measurements on the performance of a solar cell which are relatively easy to make: Isc = the short circuit current, and Voc = the open circuit voltage. Isc is determined by the amount of current the solar cell will push when it is under standard illumination and its contacts are shorted (no voltage difference); that current is largely determined by the series resistance within the solar cell. Voc is determined as the voltage difference between the contacts of the solar cell, again under standard illumination, when the load is missing — ie, an open circuit (no current flowing), or the voltage into an infinite load. Under other loads, there is a current less than Isc, and a voltage difference less than Voc.

The “I-V characteristic” for a solar cell is the curve which relates the current and the voltage. The graph shows a typical example, for a silicon solar cell manufactured about 3 decades ago. The current is shown as a negative number because of the convention used in the test circuit. What you can see in this curve is that this solar cell has Isc about 102 milliamps and Voc about 520 millivolts. The solar cell puts out a fairly constant current, between 102 milliamps and 95 milliamps, regardless of the load resistance, as long as the voltage drop does not exceed say 420 millivolts. That is, the load resistance can be up to say 420/95 = 4.3 ohms. As the load resistance goes higher, the solar cell’s current output drops rapidly towards zero. A load resistance of about 4.3 ohms, for this solar cell, is the “sweet spot” when the I*V product is a maximum. Power equals I*V (for direct current circuits like a solar cell), and hence that sweet spot is known as the “maximum power point” or MPP of the solar cell. The “fill factor” or FF of the solar cell is the ratio between the I*V product at the MPP, and the Isc*Voc product.

fig-jk1-blue-png

The maximum power point can shift if the illumination on the solar cell changes. For example, if the solar cell falls into shadow. The calculations to determine the MPP for an array of solar cells, for load balancing, can represent a lot of work. The MPP can be estimated by searching, varying the load slightly, but sometimes the power curve will have multiple peaks, and automated searching may not find the optimal operating conditions. It is important to have a good mathematical model for the I-V characteristic, in order to rapidly find the MPP under changed illumination. Further, that model should be suitable for implementation on very inexpensive microprocessors, such as may be used in a field installation. That’s where the method which S. R. Valluri and I recently described in our working paper is likely to be most useful.

That’s it for this post. More later!

Best wishes,
Ken R.
20-Dec-2015

Solar Cells 1

This is the first of a series of posts I wish to make about solar cells. I am particularly interested in the diode models which are used to calculate the I-V characteristic curve of a solar cell. These models have an implicit equation relating current I and voltage V, and that implicit equation can be solved to give voltage as an explicit function of current, for instance. The solution uses the Lambert W function, which is what first led me to the topic of solar cell models.

The calculation of V = f(I) for a solar cell, using the exact formula, can be difficult using computer hardware arithmetic, such as in Fortran or C. Overflow of the arithmetic hardware may occur, because some intermediate numbers in the calculation are extraordinarily large. That poses a problem, since for many applications, such as load balancing of solar cell array panels, it is desirable to be able to perform solar cell calculations on inexpensive computer hardware, such as micro-controllers.

That situation led me in Spring 2015 to write a brief note (Arxiv 1504.01964) suggesting that a variant function y = g(x) = log(W(exp(x))), where W() is the principal branch of the Lambert W function, might be a better way to perform solar cell calculations. That article, though correct, was perhaps a bit terse. Recently S. R. Valluri and I have prepared a working paper which sets out the solar cell application of the y = g(x) function in detail, with example calculations for two actual silicon solar cells (one-diode model) and one actual organic solar cell (two-diode model).

Our working paper is now available on Researchgate at
https://www.researchgate.net/publication/287195509

My intent is, via a sequence of posts in this blog, to walk through that working paper. It may be enjoyable (for me, at least) to go through the material gradually, perhaps explaining some of the details which had to be condensed for the working paper itself.

Best wishes,
Ken Roberts
16-Dec-2015

Copper and Bismuth

Today I returned to a book about Density Functional Theory, A Practical Introduction, 2009, by David Sholl and Janice Steckel.  In their first chapter, pp 4-5, they describe the successful use of DFT to determine the reason why copper, ordinarily maleable, becomes brittle when bismuth is added, at a very low level — less than 100 ppm.  Ditto with lead and mercury inclusions.  They describe the work of Schweinfest, Paxton and Finnis (not seen) which determined that the cause was the large bismuth atoms, migrating to grain boundaries within the copper, causing a lack of cohesion between grains.  The original paper by SPF is in Nature, vol 432 (2004), pg 1008 ff.

That reminds me of Goldschmid’s description of the diffusion of copper into bismuth telluride (Bi2Te3), sectrion 6.3, pp 86-87 of his Introduction to Thermoelectricity, 2010.  Copper diffuses very readily into Bi2Te3.  Hence copper contacts soldered to a Bi2Te3 thermoelectric element give poor performance.  Nickel is a better choice of contact material.

There is more to be studied along these lines.  For instance, gold atoms, are almost as large /heavy as lead, etc.  Yet I would expect gold, because of its electronic structure, to be very compatible with copper, and not drastically affect the maleability of copper.  Something to investigate, theoretically and experimentally.

Best wishes,
Ken Roberts,
24-Aug-2015

SciELO Electronic Library

SciELO is a very good library of scientific publications, mostly from researchers in South American countries. It has articles in Spanish, Portuguese and English, and also has search engine interfaces in each of those languages. I’ve found it an excellent alternative resource for finding articles that do not show up in the customary search engines such as provided by my university’s libary catalogue. It contains about half a million articles.

The SciELO search engine is quite flexible. For instance, if one wants to find articles in Spanish or English, about diode (juntura) models which use the Lambert W function, one can use this search term: ((diode) OR (juntura)) AND (Lambert)

Here is a link to the English language search interface:
http://www.scielo.org/php/index.php

And a link to a Wikipedia article with some background about the project:
http://en.wikipedia.org/wiki/SciELO

And, so we have a nice picture to head up this post, here is the SciELO logo (of course, copyright owned by them):
scielo-logo

I like the pun in their name!

Best wishes,
Ken Roberts
31-July-2015

Trees are Air and Water

Trees are made from air and water. How much of the wood comes from air and how much comes from water? Let’s do the calculations.

Dry wood is mostly cellulose, chains of C6.H10.O5, molecular weight 6*12+10*1+5*16 = 162.

The production of cellulose, in overview, is 12*C.O2 (from air) + 10*H2.O (water) –> 2*C6.H10.O5 + 12*O2 (back to air). Each C.O2 has weight 44, each H2.O has weight 18, and each O2 has weight 32. Thus the formula, in terms of molecular weights, is 12*44 (carbon dioxide from air) + 10*18 (water) –> 2*162 (cellulose) + 12*32 (oxygen back to air).

Multiplied out, 528 grams of carbon dioxide from the air, plus 180 grams of water, makes 324 grams of cellulose and releases 384 grams of oxygen back to the air. The process uses 75 percent air and 25 percent water, by weight.

Incidentally, notice that the number of C.O2 gas molecules consumed in the formation of cellulose, equals the number of O2 gas molecules released. There is no change in air pressure as a result of tree growth. If there were an excess or deficit of gas molecules resulting from plant growth, we might expect some interesting breezes and weather effects near forests and fields. Every aspect this world fits together! I have a naturalist friend who says he can tell there is lots of oxygen in the area behind my house — which is surrounded by lush woods and growing plants. Maybe so. I used to be able to detect low oxygen in the stacks of a poorly ventilated library, where the many book pages were slowly oxidizing.

The above is not, however, the full story about the constituents of wood. Living trees are not dry wood. They contain about 50 percent by weight of water. So let’s revisit the calculation. Consider an amount of living tree, let’s say 200 grams. Half of it (100 grams) is 75 percent from air and 25 percent from water. The other half (100 grams) is 100 percent water. The total amount of living tree comes 37 percent from air and 63 percent from water.

There’s even more. Dry wood is not free of water. It contains about 12 percent water. So again consider an amount of dry wood, let’s say 200 grams. The majority of it, say 88 percent or 176 grams, comes 75 percent from air and 25 percent from water. The remaining 12 percent, 24 grams, is moisture trapped within the “dry” wood. Total water content of the 200 grams, as water or as cellulose partly derived from water, is 34 percent. The dry wood is two-thirds (66 percent) derived from air, and one-third water or derived from water.

Conclusion: Dry wood is mostly derived from air. Green wood is mostly either water or derived from water.

Here’s a nice tree experiment from about 350 years ago. It exemplifies scientific patience and careful observation. It also indicates how, despite careful and accurate observation, one can make a mistake by using the wrong model.

This experiment was performed by Jan (Johannes) Baptista van Helmont, and reported in 1648. Van Helmont wished to determine which of the four elements (earth, water, air, fire) was the predominant contributor to plants. More exactly, he believed that plants were mostly made from water, and wished to validate his hypothesis. Here is his report of his experiment, which took five years:

Van Helmont: “That all plants immediately and substantially stem from the element water alone I have learnt from the following experiment. I took an earthern vessel in which I placed two hundred pounds of earth dried in an oven, and watered with rain water. I planted in it the stem of a willow tree weighing five pounds. Five years later it had developed a tree weighing one hundred and sixty-nine pounds and and three ounces. Nothing but rain (or distilled water) had been added. The large vesel was placed in earth and covered by an iron lid with a tin-surface that was pierced with many holes. I have not weighed the leaves that came off in the four autumn seasons. Finally I dried the earth in the vessel again and found the same two hundred pounds of it diminished by about two ounces. Hence one hundred and sixty-four pounds of wood, bark and roots had come up from water alone.”

That quote is from William H. Brock’s book “The Chemical Tree: A History of Chemistry”, which has also been published under the alternative titles “The Fontana History of Chemistry” or “The Norton History of Chemistry”. It begins the introduction of Brock’s book and justifies his title “The Chemical Tree”. A well-written book, enjoyable reading.

Van Helmont’s mistake, is that his model did not include the invisible air, which it turns out contributes about three-quarters of the mass of the tree material. He also excludes sunlight (= energy = fire) from his contributing elements. And of course the earth is also necessary, for nutrients and trace materials, and for support and context for the tree’s life (growth medium). One might say, in the four-element categorization, that trees depend upon all four of the basic elements, and could not flourish were availability of any one of those elements blocked.

We make advances by relying upon our predecessors. Van Helmont was a creative and careful experimenter. But all experiments benefit from prior experiments and also from sincere critiques from others.

An article in Plant Science Bulletin by David Hershey has a very interesting discussion of Van Helmont’s experiment. There are predecessors, contemporaries and later scientists who made related experiements. Hershey draws some conclusions about the scientific process, and also about the teaching process. The best formatting of the article is at this URL:
http://helmont1.tripod.com/hersheypsb49-3.htm
but it is also available at Plant Science Bulletin, vol 49 no 3 (2003), at this URL:
http://botany.org/PlantScienceBulletin/psb-2003-49-3.php
The Hershey article also quotes the above paragraph of Van Helmont’s in a 1662 translation, rather archaic language but useful as there are subtle differences between the 1662 translation and the more recent translation. If I could read Latin, perhaps there would be other subtleties to discover. However, there are other avenues of investation to pursue, and Latin does not make my priority list. German though … very important for science, of the past century and contemporary work.

Let’s have a photo of Jan Baptista van Helmont:
Jan_Baptist_van_Helmont_portrait
There’s a story behind this portrait. It has been mis-identified as Robert Hooke (of whom no portrait exists). However, one can see by comparing with other images of Van Helmont, for example in one of his books, that this portrait is Van Helmont.

Articles from Wikipedia about wood drying (re moisture content), about cellulose, about Van Helmont:
https://en.wikipedia.org/wiki/Wood_drying
https://en.wikipedia.org/wiki/Cellulose
https://en.wikipedia.org/wiki/Jan_Baptist_van_Helmont

Best wishes,
Ken Roberts
22-Jun-2015

Leonardo’s Machines

There is an excellent exhibition of machines constructed from the drawings of Leonardo da Vinci. The exhibit is presently located in Lucca, Italy, at the Chiesa di San Cristoforo, on Via Fillungo, open daily 930 am to 730 pm. I originally saw this exhibit 2.5 years ago in Venice, and recently had another opportunity to view everything carefully. It is a marvelous experience, and if you should have the chance to study Leonardo’s machines, you will surely find it beneficial to your design activities.

The photo is of a self-propelled cart designed by Leonardo. It may have been designed for use in theatrical productions. The motive power is provided by two large spiral springs, wound inversely to one another, which turn the two drive wheels. There is an escapement mechanism which makes the motion smooth. A brake is provided. There is a small wheel for steering the cart. The entire assembly is very ingenious, and makes use of several of the mechanisms found elsewhere in Leonardo’s drawings. Reference folio 812r of the Codex Atlanticus.

leonardo-cart-CIMG0160-px800

The book “Leonardo’s Machines: Secrets and Inventions in the Da Vinci Codices”, edited by Mario Taddei and Edoardo Zanon, text by Domenico Laurenza, translated into English by Joan M. Reifsnyder, published in 2005 by Giunti Editore S.p.A., is closely related to the exhibition. If you cannot attend, perhaps you will have an opportunity to view this or another book.

The exhibition has a website: http://www.leonardoavenezia.com with some information. However, I noticeed only a brief mention of the Lucca exhibit at this website. I understand that the exhibit in Lucca is expected to remain there for several months. I am not certain that the Venice exhibition is continuing concurrently, but I believe that may be the case.

Best wishes,
Ken Roberts
04-May-2015

Grey County Waterfalls

Grey County, Ontario, Canada has many waterfalls. The terrain is rocky, trees changing from deciduous to cedars depending upon elevation, and water flows from the highlands, north or south. As a result, there are many pleasant places to walk among the woods, and waterfalls to encounter. Here is a photograph of (part of) one waterfall that I like especially. Unfortunately, I cannot remember whether this is Jones Falls or Walter’s Falls.

jones-falls-IGP9208

Here is a link to the county’s tourism info about waterfalls.
http://www.visitgrey.ca/travel-experiences/waterfalls-and-waterways/waterfall-tour/
The brochure linked from there is large, when printed, and the pdf file made available online does not have enough resolution to read all the descriptions and directions. The solution: if you visit Grey county, stop by one of the tourism booths and obtain a paper copy of the Waterfalls of Grey County brochure.

Water motion is very appealing to me. I like to stand along the edge of a placid shallow lake, and observe the formation of sand ripples. I consider the ability to model water motion one of the best tests of the capabilities of physics models. We are not very advanced at present. That is putting it politely. Turbulence, cavitation, foaming, and other dynamic behaviour of as “simple” a molecule as H2O, are still beyond our models. There is much opportunity for interesting work in future.

Best wishes,
Ken Roberts
23-Jun-2014

Mollifier Calculation 2

Carrying on with topic of a mollifier family. Actually, I want to talk about blending functions. They are, for me, the more interesting aspect of mollifiers.

A blending function is a function like g(x)=exp(-1/x) for x positive, and g(x)=0 for x zero or negative. The aspect of a blending function that is useful in defining a mollifier family is that the blending function is smooth, ie has derivatives of all orders, at its “blend” point of x=0. By defining a mollifier function f_A(z)=g(A-abs(z)) or similar structure, times a suitable normalizing coefficient, one obtains a “blip” function around the point Z which is nonzero only on a radius-A ball around the point z. This blip function f_A can be used as a smooth test function to average (by convolution) the values of an observation function (provided by data or by theoretical model) around z. Because f_A is nonzero only within a ball of radius A (it has bounded support, is the terminology) one can make various manipulations that are most convenient with integrals over finite regions. Applications include electrodynamics (Maxwell mentions blending functions), and statistical mechanics or particle physics — see the writings of C.N. Yang and T.D. Lee, or Wigner and Eisenbud — where it is convenient to make a hypothesis, for the development of the model, that one is working with functions which are bounded in their effect. To some extent the assumption of a blending function is a given. However, I’ve become interested in the blending functions themselves. So I’m going to focus on families of blending functions, not applications such as the definition of mollifier families.

I had an unfortunate mishap with WordPress’s post editor. I had written quite a bit of info, and making reference to taking of limits, wrote the character sequence dash-dash-greaterthan. What I had forgotten is that sequence of three characters is used to denote a comment in HTML coding. When I saved my post as a draft, the editor discarded the comments! Or rather, what it thought were comments. Very disappointing. Anyway, I’m going to put my thoughts on blending functions into a Latex/PDF document and post it to a website. Will link from here in another post.

I will mention here very briefly the core idea. Given a polynomial Q(y) which has degree at least 1, and positive top coefficient (ie, coefficient of highest nonzero term). Consider the set H of functions P(y)/exp(Q(y)) where P(y) is any polynomial. That set is closed under differentiation (try it out for yourself), and of course it is closed under multiplication by another polynomial in y. All those functions tend to zero as y tends to infinity, because the polynomial in the numerator is dominated by the exponential in the denominator. The prototype is h(y)=1/exp(y), which is the set H defined by Q(y)=y, and the particular numerator P(y)=1, but there are of course a whole family of functions h() in the set H.

Given a nonzero member h() of the set H, one can define the function g(x)=h(1/x) for positive x, and g(x)=0 for x zero or negative. Following the same line of reasoning as in the John Loftin writeup (linked via prior post), one proves that the functions g(x) are smooth, notably at x=0. So they are blending functions. Some care is needed to be sure that g(x) based upon arbitrary nonzero h() cannot be always zero after some number of differentiations (but that is true), and to verify that g(x) is eventually of one sign in a small enough neighborhood of x=0 (but that also is true), and to word the definition of blending function carefully enough to make the reasoning flow well (but that can be done). It is longer than I wish to risk trying to post via the WordPress editor! But you can work it out yourself in the meantime.

Then, one might wish to consider other functions in the denominator. For example, what about the set H of functions of the form P(y)/(exp(y)+const) which is getting into something like Fermi-Dirac integral behavior, seen for instance in the free electron gas model of metals.

Enough for now. I’m going to see if I can get the website set up. Will let you know a URL when have it ready.

Best wishes,
Ken Roberts
19-May-2014

Mollifier Calculation

Mollifiers are a concept that I missed in my prior math education; it is pleasant to encounter the concept now. Sometimes one has idea-knowledge about something, but there is not an attached vocabulary. The mental constructs, the objects and the ways they can be manipulated, do not have names. When someone else describes the objects and manipulations precisely and gives them names, suddenly one’s ideas become much clearer. Vocabulary facilitates thought. Thus it has been for me with the concept of a mollifier.

Briefly, a mollifier is a family of smoothing functions, consisting of localized blips. I will describe only in one dimension, real axis, but the concept extends to multiple dimensions. Suppose each blip function f_A to be non-zero only within distance A of the origin, non-negative, smooth, and have integral 1. You will recognize a family of approximations to the Dirac delta function. As A becomes smaller, approaching zero, f_A becomes more concentrated about the origin, but still maintains the area 1.

An example of a basis for a mollifier family is the blending function g() defined by g(x)=exp(-1/x) for x positive, zero otherwise. This is a smooth gradual rise, starting at x=0 and going to 1. Smoothness of g() at x=0 needs some proof, and I will give a reference below to a nice introductory article. Here is a graph of g(x) for x between 0 and 1.

mollifier-basis

The blending function g() starts very gradually at x=0; in fact smoothly, ie an infinitely number of derivatives exist at x=0 (and hence at all x values). As x goes to infinity, g(x) goes to 1, always monotonic. The important property of g() is that it blends smoothly from being always-zero for x negative, to becoming close to 1 as x gets large positive.

We wish to use the blending g() to define, given some positive parameter A, a smooth function f_A(z) which is suitable as one member of a mollifier family. That is, f_A(z) will be zero outside distance A from the origin, and have integral 1. The definition is f_A(z)=g(A-abs(z))/C_A where C_A is a constant chosen to make the integral of f_A equal 1. The A-abs(z) part will be negative for z outside the radius A from the origin. Taking g() of that provides a smooth transition on the boundary abs(z)=A. And dividing by C_A equal to the integral of g(A-abs(z)) normalizes f_A() to have integral 1.

You can see how to use the blending function g() to define other mollifier families, for instance one based upon g(A^2-abs(z)^2). In more than one dimension, for instance z=(z1,z2…zn), you can define abs(z) as the distance of the point z from the origin, hence abs(z)^2=z1^2+z2^2+…+zn^2. The important part, the core of the construct, is the availability of a smooth blending function g().

[OOPS — Hit Publish too soon. Will edit and close this off quickly. Return to topic in subsequent post.]

References: Article by John Loftin, Rutgers, about Mollifiers. Good introduction.

Click to access mollifier.pdf

Wikipedia article about Mollifiers (pretty abstract).
http://en.wikipedia.org/wiki/Mollifier

Best wishes,
Ken Roberts
18-May-2014

Where is Down?

Where is down from here? That seems a simple question, but has three different answers. Geometric down, static down, and dynamic down.

We live on the surface of a large rotating ball. The ball is slightly flattened, because of rotation, but the three meanings of down that I’m talking about do not depend upon any oddity of the shape of the earth. Let’s suppose that we live on the surface of a rotating ball which is made of sufficiently strong and stiff material that its deformations are negligible. Also that the ball has uniform density — no lumps of denser material within to produce gravitational anomalies. (I’m interested in gravitational anomalies, and the Earth’s geoid, etc, but those are subjects for another time.)

If we use geometry, we can identify the line from where we are standing, to the center of the earth, as being down. Let’s call that geometric down.

Now imagine hanging a plumb bob, a lead weight, at the end of a long almost weightless string (nylon cord). If we are not standing at one of the poles, there will be a centifugal force (or effect) which will cause the bob to hang out from the geometric down-line. That is static down. Or maybe static force down.

Suppose instead we drop another lead weight from the position above where we are standing. It will follow the line of static down, but will curve as it falls, accelerating along the static-down vector at each point in its path of falling, that acceleration adjusting the existing velocity vector of the weight. The result is that the weight will not pass thru the position of the lead weight at the end of the plumb bob. The name given to this effect is the Coriolis effect, or Coriolis force. That is dynamic down, or dynamic force down.

So imagine, you’re on stilts. Balanced on very long, straight stilts, maybe 100 meters tall. You’re standing “vertically”, with your stilts pointing along the static down-line. You’re using your hand to point towards the center of the earth, a direction which is a bit off to one side of your stilts — that is the geometric down-line. And it’s tricky, you’re sweating, and drops of sweat fall from your brow. Those drops follow a path towards the ground, starting along the static down-line parallel to your stilts, but then they deviate, curve away, and land elsewhere than the feet of your stilts.

What looks so simple a concept, “down”, fits within one word. But the world is not as simple as the language.

A popular book, some 45 years ago, was “Been Down So Long It Looks Like Up to Me”, by Richard Farina. It’s an enjoyable story, and the title reminds me of the ambiguity of “down” in our vocabulary.

Addition of Speed

Suppose C is a positive real number and we have a binary operation on the closed interval [0,C], denote the operation by *, which is associative, and satisfies the following other conditions: u*0 = u and 0*u for all reals u; u*C = C and C*u = C for all reals u; the differentials d(u*v)/du and d(u*v)/dv exist and are continuous in u and v; and, provided u and v are in the open interval (0,C) (that is, are neither 0 nor C), the differentials d(u*v)/du and d(u*v)/dv are strictly positive. Then, says the book I’m reading, there is a function f(u) defined on [0,C] such that f(u*v) = f(u) + f(v), for all u and v in [0,C], and f(u) is differentiable and strictly monotonic increasing.

That’s really nice. The prototype for that result is the rapidity of motion in special relativity. In that situation C of course denotes the universal maximum speed (of light). The point of the result is that there is a function f(u), where u denotes ordinary speed, let’s call f(u) the rapidity of that speed, which allows us to determine the speed of a combined motion by adding rapidities. That is, given object P moving with speed u with respect to object Q, and object Q is moving with speed v with respect to object R, in the same direction, then the speed of object P with respect to object R is given by the f-inverse of f(u)+f(v).

This is from page 6, and thereabouts, of the little book “Spacetime and Electromagnetism” by J. R. Lucas and P. E. Hodgson, Oxford, 1990. There’s much more in their book but I haven’t got there yet. It’s a delight to read. I hadn’t thought about the addition of velocities in special relativity in such general mathematical terms before.

There is an interesting possibility of a cross-over from those ideas (rapidity, ordinary trig and hyperbolic trig functions, and of course imaginary and real exponentials), and some problems I’ve been fiddling with in quantum mechanics. So often what we see in one context, a structure of ideas, has utility elsewhere in clarifying other topics which are seemingly unrelated.

I haven’t delved into the details of the Lucas and Hodgson material. It seems as if one should also have to assume that the operation * is commutative, as u*v = f-inverse of (f(u) + f(v)) is certainly commutative. So then the conditions on the * operation as stated above, imply commutativity? Which of the assumptions would break down, then, if the operator * were not commutative? Something to think about… Maybe play with functions on a sphere?

Best wishes,
Ken Roberts
30-Mar-2014