text:
In my category theory blog posts, I stated many theorems, but I didn’t provide many proofs. In most cases, it’s enough to know that the proof exists. We trust mathematicians to do their job. Granted, when you’re a professional mathematician, you have to study proofs, because one day you’ll have to prove something, and it helps to know the tricks that other people used before you. But programmers are engineers, and are therefore used to taking advantage of existing solutions, trusting that somebody else made sure they were correct. So it would seem that mathematical proofs are irrelevant to programming. Or so it may seem, until you learn about the Curry-Howard isomorphism–or propositions as types, as it is sometimes called–which says that there is a one to one correspondence between logic and programs, and that every function can be seen as a proof of a theorem. And indeed, I found that a lot of proofs in category theory turn out to be recipes for implementing functions. In most cases the problem can be reduced to this: Given some morphisms, implement another morphism, usually using simple composition. This is very much like using point-free notation to define functions in Haskell. The other ingredient in categorical proofs is diagram chasing, which is very much like equational resoning in Haskell. Of course, mathematicians use different notation, and they use lots of different categories, but the principles are the same.

I want to illustrate these points with the example from Emily Riehl’s excellent book Category Theory in Context. It’s a book for mathematicians, so it’s not an easy read. I’m going to concentrate on theorem 6.2.1, which derives a formula for left Kan extensions using colimits. I picked this theorem because it has calculational content: it tells you how to calculate a particular functor.

It’s not a short proof, and I have made it even longer by unpacking every single step. These steps are not too hard, it’s mostly a matter of understanding and using definitions of functoriality, naturality, and universality.

There is a bonus at the end of this post for Haskell programmers.

## Kan Extensions

I wrote about Kan extensions before, so here I’ll only recap the definition using the notation from Emily’s book. Here’s the setup: We want to extend a functor $F$, which goes from category $C$ to $E$, along another functor $K$, which goes from $C$ to $D$. This extension is a new functor from $D$ to $E$.

To give you some intuition, imagine that the functor $F$ is the Rosetta Stone. It’s a functor that maps the Ancient Egyptian text of a royal decree to the same text written in Ancient Greek. The functor $K$ embeds the Rosetta Stone hieroglyphics into the know corpus of Egyptian texts from various papyri and inscriptions on the walls of temples. We want to extend the functor $F$ to the whole corpus. In other words, we want to translate new texts from Egyptian to Greek (or whatever other language that’s isomorphic to it).

In the ideal case, we would just want $F$ to be isomorphic to the composition of the new functor after $K$. That’s usually not possible, so we’ll settle for less. A Kan extension is a functor which, when composed with $K$ produces something that is related to $F$ through a natural transformation. In particular, the left Kan extension, $Lan_K F$, is equipped with a natural transformation $\eta$ from $F$ to $Lan_K F \circ K$.

(The right Kan extension has this natural transformation reversed.)

There are usually many such functors, so there is the standard trick of universal construction to pick the best one.

In our analogy, we would ideally like the new functor, when applied to the hieroglyphs from the Rosetta stone, to exactly reproduce the original translation, but we’ll settle for something that has the same meaning. We’ll try to translate new hieroglyphs by looking at their relationship with known hieroglyphs. That means we should look closely at morphism in $D$.

## Comma Category

The key to understanding how Kan extensions work is to realize that, in general, the functor $K$ embeds $C$ in $D$ in a lossy way.

There may be objects (and morphisms) in $D$ that are not in the image of $K$. We have to somehow define the action of $Lan_K F$ on those objects. What do we know about such objects?

We know from the Yoneda lemma that all the information about an object is encoded in the totality of morphisms incoming to or outgoing from that object. We can summarize this information in the form of a functor, the hom-functor. Or we can define a category based on this information. This category is called the slice category. Its objects are morphisms from the original category. Notice that this is different from Yoneda, where we talked about sets of morphisms — the hom-sets. Here we treat individual morphisms as objects.

This is the definition: Given a category $C$ and a fixed object $c$ in it, the slice category $C/c$ has as objects pairs $(x, f)$, where $x$ is an object of $C$ and $f$ is a morphism from $x$ to $c$. In other words, all the arrows whose codomain is $c$ become objects in $C/c$.

A morphism in $C/c$ between two objects, $(x, f)$ and $(y, g)$ is a morphism $h : x \to y$ in $C$ that makes the following triangle commute:

In our case, we are interested in an object $d$ in $D$, and the slice category $D/d$ describes it in terms of morphisms. Think of this category as a holographic picture of $d$.

But what we are really interested in, is how to transfer this information about $d$ to $E$. We do have a functor $F$, which goes from $C$ to $E$. We need to somehow back-propagate the information about $d$ to $C$ along $K$, and then use $F$ to move it to $E$.

So let’s try again. Instead of using all morphisms impinging on $d$, let’s only pick the ones that originate in the image of $K$, because only those can be back-propagated to $C$.

This gives us limited information about $d$, but it’ll have to do. We’ll just use a partial hologram of $d$. Instead of the slice category, we’ll use the comma category $K \downarrow d$.

Here’s the definition: Given a functor $K : C \to D$ and an object $d$ of $D$, the comma category $K \downarrow d$ has as objects pairs $(c, f)$, where $c$ is an object of $C$ and $f$ is a morphism from $K c$ to $d$. So, indeed, this category describes the totality of morphisms coming to $d$ from the image of $K$.

A morphism in the comma category from $(c, f)$ to $(c', g)$ is a morphism $h : c \to c'$ such that the following triangle commutes:

So how does back-propagation work? There is a projection functor $\Pi_d : K \downarrow d \to C$ that maps an object $(c, f)$ to $c$ (with obvious action on morphisms). This functor loses a lot of information about objects (completely forgets the $f$ part), but it keeps a lot of the information in morphisms — it only picks those morphisms in $C$ that preserve the structure of the comma category. And it lets us “upload” the hologram of $d$ into $C$

Next, we transport all this information to $E$ using $F$. We get a mapping

$F \circ \Pi_d : K \downarrow d \to E$

Here’s the main observation: We can look at this functor $F \circ \Pi_d$ as a diagram in $E$ (remember, when constructing limits, diagrams are defined through functors). It’s just a bunch of objects and morphisms in $E$ that somehow approximate the image of $d$. This holographic information was extracted by looking at morphisms impinging on $d$. In our search for $(Lan_K F) d$ we should therefore look for an object in $E$ together with morphisms impinging on it from the diagram we’ve just constructed. In particular, we could look at cones under that diagram (or co-cones, as they are sometimes called). The best such cone defines a colimit. If that colimit exists, it is indeed the left Kan extension $(Lan_K F) d$. That’s the theorem we are going to prove.

To prove it, we’ll have to go through several steps:

1. Show that the mapping we have just defined on objects is indeed a functor, that is, we’ll have to define its action on morphisms.
2. Construct the transformation $\eta$ from $F$ to $Lan_K F \circ K$ and show the naturality condition.
3. Prove universality: For any other functor $G$ together with a natural transformation $\gamma$, show that $\gamma$ uniquely factorizes through $\eta$.

All of these things can be shown using clever manipulations of cones and the universality of the colimit. Let’s get to work.

## Functoriality

We have defined the action of $Lan_K F$ on objects of $D$. Let’s pick a morphism $g : d \to d'$. Just like $d$, the object $d'$ defines its own comma category $K \downarrow d'$, its own projection $\Pi_{d'}$, its own diagram $F \circ \Pi_{d'}$, and its own limiting cone. Parts of this new cone, however, can be reinterpreted as a cone for the old object $d$. That’s because, surprisingly, the diagram $F \circ \Pi_{d'}$ contains the diagram $F \circ \Pi_{d}$.

Take, for instance, an object $(c, f) : K \downarrow d$, with $f: K c \to d$. There is a corresponding object $(c, g \circ f)$ in $K \downarrow d'$. Both get projected down to the same $c$. That shows that every object in the diagram for the $d$ cone is automatically an object in the diagram for the $d'$ cone.

Now take a morphism $h$ from $(c, f)$ to $(c', f')$ in $K \downarrow d$. It is also a morphism in $K \downarrow d'$ between $(c, g \circ f)$ and $(c', g \circ f')$. The commuting triangle condition in $K \downarrow d$

$f = f' \circ K h$

ensures the commuting condition in $K \downarrow d'$

$g \circ f = g \circ f' \circ K h$

All this shows that the new cone that defines the colimit of $F \circ \Pi_{d'}$ contains a cone under $F \circ \Pi_{d}$.

But that diagram has its own colimit $(Lan_K F) d$. Because that colimit is universal, there must be a unique morphism from $(Lan_K F) d$ to $(Lan_K F) d'$, which makes all triangles between the two cones commute. We pick this morphism as the lifting of our $g$, which ensures the functoriality of $Lan_K F$.

The commuting condition will come in handy later, so let’s spell it out. For every object $(c, f:Kc \to d)$ we have a leg of the cone, a morphism $V_d^{(c, f)}$ from $F c$ to $(Lan_K F) d$; and another leg of the cone $V_{d'}^{(c, g \circ f)}$ from $F c$ to $(Lan_K F) d'$. If we denote the lifting of $g$ as $(Lan_K F) g$ then the commuting triangle is:

$(Lan_K F) g \circ V_{d}^{(c, f)} = V_{d'}^{(c, g \circ f)}$

In principle, we should also check that this newly defined functor preserves composition and identity, but this pretty much follows automatically whenever lifting is defined using composition of morphisms, which is indeed the case here.

## Natural Transformation

We want to show that there is a natural transformation $\eta$ from $F$ to $Lan_K F \circ K$. As usual, we’ll define the component of this natural transformation at some arbitrary object $c$. It’s a morphism between $F c$ and $(Lan_K F) (K c)$. We have lots of morphisms at our disposal, with all those cones lying around, so it shouldn’t be a problem.

First, observe that, because of the pre-composition with $K$, we are only looking at the action of $Lan_K F$ on objects which are inside the image of $K$.

The objects of the corresponding comma category $K \downarrow K c'$ have the form $(c, f)$, where $f : K c \to K c'$. In particular, we can pick $c' = c$, and $f = id_{K c}$, which will give us one particular vertex of the diagram $F \circ \Pi_{K c}$. The object at this vertex is $F c$ — exactly what we need as a starting point for our natural transformation. The leg of the colimiting cone we are interested in is:

$V_{K c}^{(c, id)} : F c \to (Lan_K F) (K c)$

We’ll pick this leg as the component of our natural transformation $\eta_c$.

What remains is to show the naturality condition. We pick a morphism $h : c \to c'$. We know how to lift this morphism using $F$ and using $Lan_K F \circ K$. The other two sides of the naturality square are $\eta_c$ and $\eta_{c'}$.

The bottom left composition is $(Lan_K F) (K h) \circ V_{K c}^{(c, id)}$. Let’s take the commuting triangle that we used to show the functoriality of $Lan_K F$:

$(Lan_K F) g \circ V_{d}^{(c, f)} = V_{d'}^{(c, g \circ f)}$

and replace $f$ by $id_{K c}$, $g$ by $K h$, $d$ by $K c$, and $d'$ by $K c'$, to get:

$(Lan_K F) (K h) \circ V_{K c}^{(c, id)} = V_{K c'}^{(c, K h)}$

Let’s draw this as the diagonal in the naturality square, and examine the upper right composition:

$V_{K c'}^{(c', id)} \circ F h$.

This is also equal to the diagonal $V_{K c'}^{(c, K h)}$. That’s because these are two legs of the same colimiting cone corresponding to $(c', id_{K c'})$ and $(c, K h)$. These vertices are connected by $h$ in $K \downarrow K c'$.

But how do we know that $h$ is a morphism in $K \downarrow K c'$? Not every morphism in $C$ is a morphism in the comma category. In this case, however, the triangle identity is automatic, because one of its sides is an identity $id_{K c'}$.

We have shown that our naturality square is composed of two commuting triangles, with $V_{K c'}^{(c, K h)}$ as its diagonal, and therefore commutes as a whole.

## Universality

Kan extension is defined using a universal construction: it’s the best of all functors that extend $F$ along $K$. It means that any other extension will factor through ours. More precisely, if there is another functor $G$ and another natural transformation:

$\gamma : F \to G \circ K$

then there is a unique natural transformation $\alpha$, such that

$(\alpha \cdot K) \circ \eta = \gamma$

(where we have a horizontal composition of a natural transformation $\alpha$ with the functor $K$)

As always, we start by clearly stating the goals. The proof proceeds in these steps:

1. Implement $\alpha$.
2. Prove that it’s natural.
3. Show that it factorizes $\gamma$ through $\eta$.
4. Show that it’s unique.

We are defining a natural transformation $\alpha$ between two functors: $Lan_K F$, which we have defined as a colimit, and $G$. Both are functors from $D$ to $E$. Let’s implement the component of $\alpha$ at some $d$. It must be a morphism:

$\alpha_d : (Lan_K F) d \to G d$

Notice that $d$ varies over all of $D$, not just the image of $K$. We are comparing the two extensions where it really matters.

We have at our disposal the natural transformation:

$\gamma : F \to G \circ K$

or, in components:

$\gamma_c : F c \to G (K c)$

More importantly, though, we have the universal property of the colimit. If we can construct a cone with the nadir at $G d$ then we can use its factorizing morphism to define $\alpha_d$.

This cone has to be built under the same diagram as $(Lan_K F) d$. So let’s start with some $(c, f : K c \to d)$. We want to construct a leg of our new cone going from $F c$ to $G d$. We can use $\gamma_c$ to get to $G (K c)$ and then hop to $G d$ using $G f$. Thus we can define the new cone’s leg as:

$W_c = G f \circ \gamma_c$

Let’s make sure that this is really a cone, meaning, its sides must be commuting triangles.

Let’s pick a morphism $h$ in $K \downarrow d$ from $(c, f)$ to $(c', f')$. A morphism in $K \downarrow d$ must satisfy the triangle condition, $f = f' \circ K h$:

We can lift this triangle using $G$:

$G f = G f' \circ G (K h)$

Naturality condition for $\gamma$ tells us that:

$\gamma_{c'} \circ F h = G (K h) \circ \gamma_c$

By combining the two, we get the pentagon:

whose outline forms a commuting triangle:

$G f \circ \gamma_c = G f' \circ \gamma_{c'} \circ F h$

Now that we have a cone with the nadir at $G d$, universality of the colimit tells us that there is a unique morphism from the colimiting cone to it that factorizes all triangles between the two cones. We make this morphism our $\alpha_d$. The commuting triangles are between the legs of the colimiting cone $V_d^{(c, f)}$ and the legs of our new cone $W_c$:

$\alpha_d \circ V_d^{(c, f)} = G f \circ \gamma_c$

Now we have to show that so defined $\alpha$ is a natural transformation. Let’s pick a morphism $g : d \to d'$. We can lift it using $Lan_K F$ or using $G$ in order to construct the naturality square:

$G g \circ \alpha_d = \alpha_{d'} \circ (Lan_K F) g$

Remember that the lifting of a morphism by $Lan_K F$ satisfies the following commuting condition:

$(Lan_K F) g \circ V_{d}^{(c, f)} = V_{d'}^{(c, g \circ f)}$

We can combine the two diagrams:

The two arms of the large triangle can be replaced using the diagram that defines $\alpha$, and we get:

$G (g \circ f) \circ \gamma_c = G g \circ G f \circ \gamma_c$

which commutes due to functoriality of $G$.

Now we have to show that $\alpha$ factorizes $\gamma$ through $\eta$. Both $\eta$ and $\gamma$ are natural transformations between functors going from $C$ to $E$, whereas $\alpha$ connects functors from $D$ to $E$. To extend $\alpha$, we horizontally compose it with the identity natural transformation from $K$ to $K$. This is called whiskering and is written as $\alpha \cdot K$. This becomes clear when expressed in components. Let’s pick an object $c$ in $C$. We want to show that:

$\gamma_c = \alpha_{K c} \circ \eta_c$

Let’s go back all the way to the definition of $\eta$:

$\eta_c = V_{K c}^{(c, id)}$

where $id$ is the identity morphism at $K c$. Compare this with the definition of $\alpha$:

$\alpha_d \circ V_d^{(c, f)} = G f \circ \gamma_c$

If we replace $f$ with $id$ and $d$ with $K c$, we get:

$\alpha_{K c} \circ V_{K c}^{(c, id)} = G id \circ \gamma_c$

which, due to functoriality of $G$ is exactly what we need:

$\alpha_{K c} \circ \eta_c = \gamma_c$

Finally, we have to prove the uniqueness of $\alpha$. Here’s the trick: assume that there is another natural transformation $\alpha'$ that factorizes $\gamma$. Let’s rewrite the naturality condition for $\alpha'$:

$G g \circ \alpha'_d = \alpha'_{d'} \circ (Lan_K F) g$

Replacing $g : d \to d'$ with $f : K c \to d$, we get:

$G f \circ \alpha'_{K c} = \alpha'_d \circ (Lan_K F) f$

The lifiting of $f$ by $Lan_K F$ satisfies the triangle identity:

$V_d^{(c, f)} = (Lan_K F) f \circ V_{K c}^{(c, id)}$

where we recognize $V_{K c}^{(c, id)}$ as $\eta_c$.

We said that $\alpha'$ factorizes $\gamma$ through $\eta$:

$\gamma_c = \alpha'_{K c} \circ \eta_c$

which let us straighten the left side of the pentagon.

This shows that $\alpha'$ is another factorization of the cone with the nadir at $G d$ through the colimit cone with the nadir $(Lan_K F) d$. But that would contradict the universality of the colimit, therefore $\alpha'$ must be the same as $\alpha$.

This completes the proof.

This post would not be complete if I didn’t mention a Haskell implementation of Kan extensions by Edward Kmett, which you can find in the library Data.Functor.Kan.Lan. At first look you might not recognize the definition given there:

data Lan g h a where
Lan :: (g b -> a) -> h b -> Lan g h a

To make it more in line with the previous discussion, let’s rename some variables:

data Lan k f d where
Lan :: (k c -> d) -> f c -> Lan k f d

This is an example of GADT syntax, which is a Haskell way of implementing existential types. It’s equivalent to the following pseudo-Haskell:

Lan k f d = exists c. (k c -> d, f c)

This is more like it: you may recognize (k c -> d) as an object of the comma category $K \downarrow d$, and f c as the mapping of $c$ (which is the projection of this object back to $C$) under the functor $F$. In fact, the Haskell representation is based on the encoding of the colimit using a coend:

$(Lan_K F) d = \int^{c \in C} C(K c, d) \times F c$

The Haskell library also contains the proof that Kan extension is a functor:

instance Functor (Lan k f) where
fmap g (Lan kcd fc) = Lan (g . kcd) fc

The natural transformation $\eta$ that is part of the definition of the Kan extension can be extracted from the Haskell definition:

eta :: f c -> Lan k f (k c)
eta = Lan id

In Haskell, we don’t have to prove naturality, as it is a consequence of parametricity.

The universality of the Kan extension is witnessed by the following function:

toLan :: Functor g => (forall c. f c -> g (k c)) -> Lan k f d -> g d
toLan gamma (Lan kcd fc) = fmap kcd (gamma fc)

It takes a natural transformation $\gamma$ from $F$ to $G \circ K$, and produces a natural transformation we called $\alpha$ from $Lan_K F$ to $G$.

This is $\gamma$ expressed as a composition of $\alpha$ and $\eta$:

fromLan :: (forall d. Lan k f d -> g d) -> f c -> g (k c)
fromLan alpha = alpha . eta

As an example of equational reasoning, let’s prove that $\alpha$ defined by toLan indeed factorizes $\gamma$. In other words, let’s prove that:

fromLan (toLan gamma) = gamma

Let’s plug the definition of toLan into the left hand side:

fromLan (\(Lan kcd fc) -> fmap kcd (gamma fc))

then use the definition of fromLan:

(\(Lan kcd fc) -> fmap kcd (gamma fc)) . eta

Let’s apply this to some arbitrary function g and expand eta:

(\(Lan kcd fc) -> fmap kcd (gamma fc)) (Lan id g)

Beta-reduction gives us:

fmap id (gamma g)

which is indeed equal to the right hand side acting on g:

gamma g

The proof of toLan . fromLan = id is left as an exercise to the reader (hint: you’ll have to use naturality).

## Acknowledgments

I’m grateful to Emily Riehl for reviewing the draft of this post and for writing the book from which I borrowed this proof.


text:
# A radioactive nucleus (initial mass number A and atomic number Z) emits 3 $\alpha$ particles and 2 positrons. The ratio of number of neutrons to that of protons in the final nucleus will be
( A ) $\large\frac{A-Z-12}{Z-4}$
( B ) $\large\frac{A-Z-8}{Z-4}$
( C ) $\large\frac{A-Z-4}{Z-8}$
( D ) $\large\frac{A-Z-4}{Z-2}$

format: plain


text:
# Tricks

Written by: Alian713

## 1. Setting and Unsetting Costs¶

A house normally costs 25 wood, but what if we want to make it cost, lets say, 10 stone instead?

One might attempt something like this:

 1 2 3 4 const int HOUSE = 70; xsEffectAmount(cSetAttribute, HOUSE, cStoneCost, 10, 1); xsEffectAmount(cSetAttribute, HOUSE, cWoodCost, -2, 1);

This is a reasonable guess for how to do it, but unfortunately this does not work. The stone cost does not get added to the house, and instead of unsetting the wood cost, making a house actually gives back 2 wood to the player!

There is however a trick that can achieve this:

 1 2 3 4 5 const int HOUSE = 70; xsEffectAmount(cMulAttribute, HOUSE, cStoneCost, -1, 1); xsEffectAmount(cSetAttribute, HOUSE, cStoneCost, 10, 1); xsEffectAmount(cMulAttribute, HOUSE, cWoodCost, -2, 1);

This same trick does not work for changing technology costs.


text:
# 21.7: Rank-One <mu>

Although we do not have methods for computing $$\mu$$ exactly, there is one particular situation where this is possible. This situation occurs if $$M$$ has rank 1, i.e

$M=a b^{*}\nonumber$

where $$a, b \in \mathbb{C}^{n}$$. Then it follows that $$\mu$$ with respect to $$\Delta_{0}$$ containing complex diagonal perturbations is given by

$\frac{1}{\mu(M)}=\inf _{\Delta \in \Delta_{0}}\left\{\sigma_{\max }(\Delta) \mid \operatorname{det}(I-M \Delta)=0\right\}\nonumber$

However,

\begin{aligned} \operatorname{det}(I-M \Delta) &=\operatorname{det}\left(I-a b^{*} \Delta\right) \\ &=\operatorname{det}\left(I-b^{*} \Delta a\right) \end{aligned}\nonumber

$\begin{array}{l} =\operatorname{det}\left(I-\left[\Delta_{1} \cdots \Delta_{n}\right]\left[\begin{array}{c} \overline{b_{1}} a_{1} \\ \overline{b_{2}} a_{2} \\ \vdots \\ b_{n} a_{n} \end{array}\right]\right) \\ = 1-\left[\Delta_{1} \cdots \Delta_{n}\right]\left[\begin{array}{c} b_{1} a_{1} \\ b_{2} a_{2} \\ \vdots \\ b_{n} a_{n} \end{array}\right] \end{array}\nonumber$

and $$\sigma_{\max }(\Delta)=\max _{i}\left|\Delta_{i}\right|$$. Hence,

$\frac{1}{\mu(M)}=\inf _{\Delta_{1}, \ldots, \Delta_{n}}\left\{\max _{i}\left|\Delta_{i}\right|\left[\left[\Delta_{1} \cdots \Delta_{n}\right]\left[\begin{array}{c} \overline{b_{1}} a_{1} \\ b_{2} a_{2} \\ \vdots \\ b_{n} a_{n} \end{array}\right]=1\right\}\right.\nonumber$

Optimizing the RHS, it follows that (verify)

$\frac{1}{\mu(M)}=\frac{1}{\sum_{i=1}^{n}\left|\overline{b_{i}} a_{i}\right|} \leftrightarrow \mu(M)=\sum_{i=1}^{n}\left|\overline{b_{i}} a_{i}\right|\nonumber$

Notice that the SISO robust disturbance rejection problem is a rank-one problem. This follows since

$M=\left[\begin{array}{c} -W_{1} K \\ W_{2} \end{array}\right]\left[\frac{P_{0}}{1+P_{0} K} \quad \frac{1}{1+P_{0} K}\right]\nonumber$

Then

$\mu(M(j \omega))=\left|\frac{W_{1} P_{0} K}{1+P_{0} K}(j \omega)\right|+\left|\frac{W_{2}}{1+P_{0} K}(j \omega)\right|\nonumber$

which is the condition we derived before.

#### Coprime Factor Perturbations

Consider the class of SISO systems

$\Omega=\left\{\frac{N(s)}{D(s)} \mid N=N_{0}+\Delta_{1} W_{1}, D=D_{0}+\Delta_{2} W_{2},\left\|\Delta_{i}\right\|<1\right\}\nonumber$

where the nominal plant is $$N_{0}/D_{0}$$ with the property that both $$N_{0}$$ and $$D_{0}$$ are stable with no common zeros in the RHP. Assume that $$K$$ stabilizes $$N_{0}/D_{0}$$. This block diagram is shown in Figure 21.7.

Figure 21.7: Coprime Factor Perturbation Model

The closed loop block diagram can be mapped to the $$M- \Delta$$ diagram where

\begin{aligned} M &=\left[\begin{array}{cc} -\frac{W_{1} K}{D_{0}+N_{0} K} & -\frac{W_{1} K}{D_{0}+N_{0} K} \\ \frac{W_{2}}{D_{0}+N_{0} K} & \frac{W_{2}}{D_{0}+N_{0} K} \end{array}\right] \\ &=\left[\begin{array}{c} -\frac{W_{1} K}{D_{0}+N_{0} K} \\ \frac{W_{2}}{D_{0}+N_{0} K} \end{array}\right] [1 \ 1] \end{aligned}\nonumber

Hence, $$M$$ has rank 1 and

$\mu(M(j \omega))=\left|\frac{W_{1} K}{D_{0}+N_{0} K}\right|+\left|\frac{W_{2}}{D_{0}+N_{0} K}\right|\nonumber$

#### Robust Hurwitz Stability of Polynomials with Complex Perturbations

Another application of the structured singular value with rank one matrices is the robust stability of a family of polynomials with complex perturbations of the coeffcients. In this case let $$\delta =\left[\begin{array}{cccc} \delta_{n-1} & \delta_{n-2} & \ldots & \delta_{0} \end{array}\right]^{T}$$ and consider the polynomial family

$P(s, \delta)=s^{n}+\left(a_{n-1}+\gamma_{n-1} \delta_{n-1}\right) s^{n-1}+\ldots+\left(a_{0}+\gamma_{0} \delta_{0}\right)\nonumber$

where $$a_{i}$$, $$\gamma_{i}$$, and $$\delta_{i} \in \mathbb{C}$$ and $$\left|\delta_{i}\right| \leq 1$$. We want to obtain a condition that is both necessary and sufficient for the Hurwitz stability of the entire family of polynomials $$P(s, \delta)$$. We can write the polynomials in this family as

$P(s, \delta)=P(s, 0)+\tilde{P}(s, \delta)\label{21.20}$

$=\left(s^{n}+a_{n-1} s^{n-1}+\ldots+a_{0}\right)+\left(\gamma_{n-1} \delta_{n-1} s^{n-1}+\ldots+\gamma_{0} \delta_{0}\right)\label{21.21}\) which can also be rewritten as \[P(s, \delta)=P(s, 0)+\left[\begin{array}{ccc} 1 & 1 & \ldots 1 \end{array}\right]\left[\begin{array}{ccccc} \delta_{n-1} & 0 & 0 & \ldots & 0 \\ 0 & \delta_{n-2} & 0 & \ldots & 0 \\ \vdots & & \ddots & & \vdots \\ & & & \delta_{1} & 0 \\ 0 & 0 & \ldots & 0 & \delta_{0} \end{array}\right]\left[\begin{array}{c} \gamma_{n-1} s^{n-1} \\ \gamma_{n-2} s^{n-2} \\ \vdots \\ \gamma_{1} s \\ \gamma_{0} \end{array}\right]\nonumber$

We assume that the center polynomial $$P(s, 0)$$ is Hurwitz stable. This implies that the stability of the entire family $$P(s, \delta)$$ is equivalent to the condition that

$1+\frac{1}{P(j \omega, 0)}\left[\begin{array}{ccc} 1 & 1 & \ldots 1 \end{array}\right]\left[\begin{array}{ccccc} \delta_{n-1} & 0 & 0 & \ldots & 0 \\ 0 & \delta_{n-2} & 0 & \ldots & 0 \\ \vdots & & \ddots & & \vdots \\ & & & \delta_{1} & 0 \\ 0 & 0 & \ldots & 0 & \delta_{0} \end{array}\right]\left[\begin{array}{c} \gamma_{n-1}(j \omega)^{n-1} \\ \gamma_{n-2}(j \omega)^{n-2} \\ \vdots \\ \gamma_{1}(j \omega) \\ \gamma_{0} \end{array}\right] \neq 0\nonumber$

for all $$\omega \in \mathbb{R}$$ and $$\left|\delta_{i}\right| \leq 1$$. This is equivalent to the condition that

$\operatorname{det}\left(I+\frac{1}{P(j \omega, 0)}\left[\begin{array}{c} \gamma_{n-1}(j \omega)^{n-1} \\ \gamma_{n-2}(j \omega)^{n-2} \\ \vdots \\ \gamma_{1}(j \omega) \\ \gamma_{0} \end{array}\right]\left[\begin{array}{lll} 1 & 1 & \ldots 1 \end{array}\right] \Delta\right) \neq 0\nonumber$

for all $$\omega \in \mathbb{R}$$ and $$\Delta \in \Delta$$ with $$\|\Delta\|_{\infty} \leq 1$$. Now using the concept of the structured singular value we arrive at the following condition which is both necessary and sufficient for the Hurwitz stability of the entire family

$\mu(M(j \omega))<1\nonumber$

for all $$\omega \in \mathbb{R}$$, where

$M(j \omega)=\frac{1}{P(j \omega, 0)}\left[\begin{array}{c} \gamma_{n-1}(j \omega)^{n-1} \\ \gamma_{n-2}(j \omega)^{n-2} \\ \vdots \\ \gamma_{1}(j \omega) \\ \gamma_{0} \end{array}\right]\left[\begin{array}{lll} 1 & 1 & \ldots 1 \end{array}\right]\nonumber$

Clearly this is a rank one matrix and by our previous discussion the structured singular value can be computed analytically resulting in the following test

$\frac{1}{|P(j \omega, 0)|} \sum_{i=1}^{n}\left|\gamma_{n-i}\right||\omega|^{n-i}<1\nonumber$

for all $$\omega \in \mathbb{R}$$.


text:
I do remember you mentioning that & how it was your ticket to exit softly and give you time to build the passive income side. Most likely when I do exit it will either be through a sale of the business which would come along with a employment contract or if a worthy successor(s) can take it over, then the business is just another annuity throwing off income. Anyway, I’d enjoy writing a guest article after I survive the next few weeks of work and weddings.

Ethiopia’s main challenges are sustaining its positive economic growth and accelerating poverty reduction, which both require significant progress in job creation as well as improved governance. The government is devoting a high share of its budget to pro-poor programs and investments. Large scale donor support will continue to provide a vital contribution in the near-term to finance the cost of pro-poor programs.
This equation implies two things. First buying one more unit of good x implies buying {\displaystyle {\frac {P_{x}}{P_{y}}}} less units of good y. So, {\displaystyle {\frac {P_{x}}{P_{y}}}} is the relative price of a unit of x as to the number of units given up in y. Second, if the price of x falls for a fixed {\displaystyle Y} , then its relative price falls. The usual hypothesis is that the quantity demanded of x would increase at the lower price, the law of demand. The generalization to more than two goods consists of modelling y as a composite good.
One thing I notice about the debates on both tax policy and income inequality is that a lot of people seem to have relatively hazy ideas about how income is earned in America, and how much of each kind of income there is. For example, if someone is earning $300,000 a year, where is their income likely to be coming from? How much revenue is drawn from capital gains taxes? And how is income distributed between corporate shareholders and workers? People don't tend to have very strong priors about the answers to these questions, because they simply haven't yet learned what the relative sizes of different sources of income actually are. Peer-to-peer lending ($1,440 a year): I've lost interest in P2P lending since returns started coming down. You would think that returns would start going up with a rise in interest rates, but I'm not really seeing this yet. Prosper missed its window for an initial public offering in 2015-16, and LendingClub is just chugging along. I hate it when people default on their debt obligations, which is why I haven't invested large sums of money in P2P. That said, I'm still earning a respectable 7% a year in P2P, which is much better than the stock market is doing so far in 2018!
* I use Personal Capital to track all my finances in one place. It’s much easier to use their free software to follow 28 accounts on one platform than to log into various accounts to check my balances. They’ve also got great tools for x-raying your portfolio for excessive fees, recommending a more optimized asset allocation, and planning for retirement with their Retirement Planner.
A critical problem facing India's economy is the sharp and growing regional variations among India's different states and territories in terms of poverty, availability of infrastructure and socio-economic development.[394] Six low-income states – Assam, Chhattisgarh, Nagaland, Madhya Pradesh, Odisha and Uttar Pradesh – are home to more than one-third of India's population.[395] Severe disparities exist among states in terms of income, literacy rates, life expectancy and living conditions.[396]
The theoretical generalization to more than one period is a multi-period wealth and income constraint. For example, the same person can gain more productive skills or acquire more productive income-earning assets to earn a higher income. In the multi-period case, something might also happen to the economy beyond the control of the individual to reduce (or increase) the flow of income. Changing measured income and its relation to consumption over time might be modeled accordingly, such as in the permanent income hypothesis.
The retail industry, excluding wholesale, contributed $482 billion (22% of GDP) and employed 249.94 million people (57% of the workforce) in 2016. The industry is the second largest employer in India, after agriculture.[153] The Indian retail market is estimated to be US$600 billion and one of the top-five retail markets in the world by economic value. India has one of the fastest-growing retail markets in the world,[243][244] and is projected to reach $1.3 trillion by 2020.[245][246]  I actually spent a year and a half working as an affiliate marketer (mostly selling drumming related products – lessons, kits ect). 5 years on and one of my one page sites (which I’ve not touched) still nets me about$150 a month. I won’t be retiring off that but only really now appreciate the reverse pyramid approach to entrepreneurship (working for nothing initially but later being paid without effort!)
Jawaharlal Nehru, the first prime minister of India, along with the statistician Prasanta Chandra Mahalanobis, formulated and oversaw economic policy during the initial years of the country's independence. They expected favourable outcomes from their strategy, involving the rapid development of heavy industry by both public and private sectors, and based on direct and indirect state intervention, rather than the more extreme Soviet-style central command system.[124][125] The policy of concentrating simultaneously on capital- and technology-intensive heavy industry and subsidising manual, low-skill cottage industries was criticised by economist Milton Friedman, who thought it would waste capital and labour, and retard the development of small manufacturers.[126] The rate of growth of the Indian economy in the first three decades after independence was derisively referred to as the Hindu rate of growth by economists, because of the unfavourable comparison with growth rates in other Asian countries.[127][128]

I came across your site and I love it! My husband and I work in corporate America and I own a consulting/coaching business. I have a goal to gross 1 MIL within the next 10 years I’ll be 40 then. How can I begin now? How do I find a millionaire mentor? We live in Philadelphia, PA all of our friends and family are mostly employed some with small businesses however i have huge goals I am working so hard to become a full time entrepreneur. Seems like everyone we know are all on the same level and I fear we’ll stay here of we don’t meet someone willing to show us how to level up. Any suggestions?
Multiple streams of Income covers this strategy. I highly recomend you read it if for that reason alone. Beats the typcial buy and hold (or is that buy and hope), dollar cost averaging and other so called sensible stategies which don't work unless you have a 20-30 year time horizon. Ask anyone who saw their investments plumet during the Jimmy Carter years back in the 70's how long they had to wait to get their investments back up to break even level. Want to take a guess? Would you believe 15 years? That is close.

Freelance writer: If you have a knack for writing, you can earn great money writing for others. Not sure how to start? Contact bloggers, who are always looking for great writing. As blogs grow, they can afford to pay freelancers good money for quality articles. Websites looking to build links also hire freelancers to write guest posts to be published on blogs and websites.
Perhaps a coworker purposefully tries to make your life miserable because they resent your success. Maybe you get passed over for a promotion and a raise because you weren’t vocal enough about your abilities, and mistakenly thought you worked in a meritocracy. Or maybe you have a new boss who decides to clean house and hire her own people. Whatever the case may be, you will eventually tire.

What spurred this blog post was an idea put forth by my friend at ESI Money in which he talks about how the first million is the hardest. ESI shares how his net worth growth has accelerated. The first million took 19 years of work (the clock starts when he started working, not at birth!) but the 2nd million took just 4 years and 9 months. J Money took this same idea and started at $100k, which took him 7yrs 11mos. Each of the next$100k milestones took close to 18 months each to reach.
Employee Income: This income almost everybody earns via a job. To cut it short if you are working for someone as an employee, you are making an employee income for yourself. This income carried the maximum risk with it, since all the decision making powers are in someone else’s hands. Once they decide to let you go, you would not make a living until you find another employee income.
The long-term growth prospective of the Indian economy is positive due to its young population, corresponding low dependency ratio, healthy savings[38] and investment rates, and increasing integration into the global economy.[39] India topped the World Bank's growth outlook for the first time in fiscal year 2015–16, during which the economy grew 7.6%.[40] Despite previous reforms, economic growth is still significantly slowed by bureaucracy, poor infrastructure, and inflexible labor laws (especially the inability to lay off workers in a business slowdown).[41]
Liquid Funds are those mutual fund schemes which are ideal for putting money for a very short period of time, preferably not more than three months. Since these funds invest in extremely short term Debt papers, they come with very low volatility and risks. Accrual funds are those funds which invest in Debt papers of short and medium tenures to generate interest income. These funds usually do not take any interest rate/credit risk but stick to earning interest.
You can uses tools such as Wordpress for your website platform. MailChimp to collect email addresses. Clickfunnels to create funnels and landing pages that are completely automated. Stripe to process payments. These are just a few tools I use but there are many more options for each part of your business. Find the ones that work for you and help you create systems. (Disclaimer: I was not paid to mention any of these companies).
During my first year as a financial advisor, I got a small base salary. After that, it was up to me to figure out how to find and retain new clients. Fortunately, I quickly learned how to market myself, meet new people, and set myself up for success. And over time, I made the connections I needed to grow my base of clients, earn a real income, and produce the type of results my clients wanted.
An obvious example is over exposure to bank stocks, which have been excellent investments for over a century.  Though a foundation of most portfolios, bank stocks do involve more risk at certain stages of the economic cycle than many realise.  Being less exposed to bank shares in the last few months could have preserved some capital.  So, a more diversified approach can help mitigate some of these risks.


text:
Org-mode fails to export when the plural cite macros of biblatex are used

When I try to export an Org buffer containing plural biblatex cite macros the export fails and I get the following message:

org-export-latex-preprocess: Wrong type argument: stringp, nil

A plural biblatex macros is macros, such as \autocites, \textcites, that can take multiple argument where each argument in curly braces is a bibliography reference and a concrete example is the following

\autocites[11]{someref}[22]{anotherref}

If the above example is placed in an Org-buffer and C-e L is pressed the export fails with the message quoted above.

How can I make Org-mode recognize plural biblatex cite macros so that export is successful?

I am running Org-mode 7.6 in Emacs 23.3.1.

-
Did you happen to look at lists.gnu.org/archive/html/emacs-orgmode/2009-05/msg00236.html ? It would seem to indicate the issue is partly within reftex. I do remember seeing some updates on the ML regarding bibtex/biblatex, export may be improved in 7.8. I haven't had to use LaTeX for documents in a while so can't really test for improvements (I have no bibliography to cite from at the moment) –  Jonathan Leech-Pepin Feb 1 '12 at 13:47
@JonathanLeech-Pepin I checked that post. It says "I've had to hack at a couple of reftex functions to change the regular expressions that are used to identify citation macros for" but it does not include the hacks. The others parts of the message is not relevant for this particular issue it seems. –  N.N. Feb 1 '12 at 21:23
@JonathanLeech-Pepin You do not need a bibliography to test this issue. It is enough to include something like \autocites[11]{someref}[22]{anotherref} in an empty Org-buffer to get the error for me. If the exporter get past the export phase and tries to compile to LaTeX it will be a success. –  N.N. Feb 2 '12 at 7:40

I think it may now be working, I just tested the following:

* test
- Inline LaTeX \autocites[11]{someref}[22]{anotherref}
- Latex single line block
#+latex: \autocites[11]{someref}[22]{anotherref}
- Latex code block
#+begin_latex
\autocites[11]{someref}[22]{anotherref}
#+end_latex

LaTeX export succeeded, however I was not able to have it push all the way to pdf (C-c C-e d). The LaTeX export succeded but it could not convert to pdf (I likely don't have my preamble or packages configured properly for it). I'm assuming if the latex comes out properly it should be able to be possible to get it to result in a pdf if required.

Latex export (missing preamble):

\section{test}
\label{sec-1}

\begin{itemize}
\item Inline \LaTeX{} \autocites[11]{someref}[22]\{anotherref\}
\item Latex single line block
\autocites[11]{someref}[22]{anotherref}
\item Latex code block
\autocites[11]{someref}[22]{anotherref}
\end{itemize}

Assuming this is the output you'd be expecting from that file, I'd guess that the issue has been resolved at some point between 7.6 and 7.8.

Further testing as requested

- Latex code block
#+begin_latex
\cites[11]{someref}[22]{anotherref}
\Cites[11]{someref}[22]{anotherref}
\parencites[11]{someref}[22]{anotherref}
\Parencites[11]{someref}[22]{anotherref}
\footcites[11]{someref}[22]{anotherref}
\footcitetexts[11]{someref}[22]{anotherref}
\smartcites[11]{someref}[22]{anotherref}
\Smartcites[11]{someref}[22]{anotherref}
\textcites[11]{someref}[22]{anotherref}
\Textcites[11]{someref}[22]{anotherref}
\supercites[11]{someref}[22]{anotherref}
\autocite[11]{someref}[22]{anotherref}
\Autocites[11]{someref}[22]{anotherref}
#+end_latex

becomes

\item Latex code block
\cites[11]{someref}[22]{anotherref}
\Cites[11]{someref}[22]{anotherref}
\parencites[11]{someref}[22]{anotherref}
\Parencites[11]{someref}[22]{anotherref}
\footcites[11]{someref}[22]{anotherref}
\footcitetexts[11]{someref}[22]{anotherref}
\smartcites[11]{someref}[22]{anotherref}
\Smartcites[11]{someref}[22]{anotherref}
\textcites[11]{someref}[22]{anotherref}
\Textcites[11]{someref}[22]{anotherref}
\supercites[11]{someref}[22]{anotherref}
\autocite[11]{someref}[22]{anotherref}
\Autocites[11]{someref}[22]{anotherref}

It seems it would therefore be working for all cases

-
Indeed, since you got past exportation and it tries to compile it seems to accept \autocites in 7.8. Did you try other plural variants too? A full test would try all of the macros in §3.6.3 of the biblatex manual: \cites, \Cites, \parencites, \Parencites, \footcites, \footcitetexts, \smartcites, \Smartcites, \textcites, \Textcites, \supercites, \autocite and \Autocites. All are testable with the same arguments, e.g. [11]{someref}[22]{anotherref}. –  N.N. Feb 2 '12 at 15:13
Added the extra test-cases –  Jonathan Leech-Pepin Feb 2 '12 at 15:29
Good to hear. Thanks for your effort! –  N.N. Feb 2 '12 at 15:41


text:
# can't open any folder

I cant do anything. I can move my cursor, but I can't open any folder, it starts thinking and then nothing happens. When I am trying to go to the low left corner to open any program it thinks very slow and then can't open it. I just don't know how to describe it. Simply nothing works. I am trying to open Firefox - a long hard thinking, there is a track of cursors when you moving cursor, than nothing happens. It just stops thinking.

What I think can be wrong. When I was working last time I downloaded some archived files. Ordinary, when I download files they go to some folder and next time, when I turn on my computer all this files start executing (I don't know why). It it is music, it starts playing, if it is pdf file, it opens. All automatically, without me. To stop this I should move this files to some other folder. So, I think now, when I turning on my computer, it is trying to open this archived files which I downloaded last time, and something goes wrong. And it just doesn't work at all. Nothing just works.

I tried to open hark disk on another computer (with ubuntu) - it doesn't works, I can see only 400 Mb or something like that. Yet my hard disk is 500 Gb.

Now I just don't know what to do. What can I do? My description must be not very helpful, but I am just user. My Fedora is in Russian. It is version 15.

edit retag close merge delete

Sort by » oldest newest most voted

Let us try a few things to narrow down your issue:

• Check to see if any filesystems are full with df -h . If you don't have 90% or more free space, delete until you do. Pay special attention to /tmp and /home.
• Open top in a separate TTY (Ctl+Alt+F3) and watch it to see what process is doing the 'thinking' .
• Check the integrity of your drive with smartctl . smartctl -a /dev/sda is probably appropriate if you have a single drive.
• Read /var/log/messages for anything that might indicate a problem. Paste it online and the link here if you aren't sure.
• Run a yum update and reboot, if you can.

Please comment back to let us know your results, so we can further assist.

more


text:
An electric battery is a device consisting of one or more electrochemical cells with external connections provided to power electrical devices such as flashlights, smartphones, and electric cars. When a battery is supplying electric power, its positive terminal is the cathode and its negative terminal is the anode. The terminal marked negative is the source of electrons that when connected to an external circuit will flow and deliver energy to an external device. When a battery is connected to an external circuit, electrolytes are able to move as ions within, allowing the chemical reactions to be completed at the separate terminals and so deliver energy to the external circuit. It is the movement of those ions within the battery which allows current to flow out of the battery to perform work. Historically the term "battery" specifically referred to a device composed of multiple cells, however the usage has evolved additionally to include devices composed of a single cell. Primary (single-use or "disposable") batteries are used once and discarded; the electrode materials are irreversibly changed during discharge. Common examples are the alkaline battery used for flashlights and a multitude of portable electronic devices. Secondary (rechargeable) batteries can be discharged and recharged multiple times using an applied electric current; the original composition of the electrodes can be restored by reverse current. Examples include the lead-acid batteries used in vehicles and lithium-ion batteries used for portable electronics such as laptops and smartphones. Batteries come in many shapes and sizes, from miniature cells used to power hearing aids and wristwatches to small, thin cells used in smartphones, to large lead acid batteries used in cars and trucks, and at the largest extreme, huge battery banks the size of rooms that provide standby or emergency power for telephone exchanges and computer data centers. According to a 2005 estimate, the worldwide battery industry generates US$48 billion in sales each year, with 6% annual growth. Batteries have much lower specific energy (energy per unit mass) than common fuels such as gasoline. In automobiles, this is somewhat offset by the higher efficiency of electric motors in producing mechanical work, compared to combustion engines. Go to Article ### Explanation by Hotspot Model ## Battery (electricity) ### Battery (electricity) Type Various cells and batteries (top-left to bottom-right): two AA, one D, one handheld ham radio battery, two 9-volt (PP3), two AAA, one C, one camcorder battery, one cordless phone battery Power source Electrochemical reactions, Electromotive force 1800s The symbol for a battery in a circuit diagram. It originated as a schematic drawing of the earliest type of battery, a voltaic pile. An electric battery is a device consisting of one or more electrochemical cells with external connections provided to power electrical devices such as flashlights, smartphones, and electric cars.[1] When a battery is supplying electric power, its positive terminal is the cathode and its negative terminal is the anode.[2] The terminal marked negative is the source of electrons that when connected to an external circuit will flow and deliver energy to an external device. When a battery is connected to an external circuit, electrolytes are able to move as ions within, allowing the chemical reactions to be completed at the separate terminals and so deliver energy to the external circuit. It is the movement of those ions within the battery which allows current to flow out of the battery to perform work.[3] Historically the term "battery" specifically referred to a device composed of multiple cells, however the usage has evolved additionally to include devices composed of a single cell.[4] Primary (single-use or "disposable") batteries are used once and discarded; the electrode materials are irreversibly changed during discharge. Common examples are the alkaline battery used for flashlights and a multitude of portable electronic devices. Secondary (rechargeable) batteries can be discharged and recharged multiple times using an applied electric current; the original composition of the electrodes can be restored by reverse current. Examples include the lead-acid batteries used in vehicles and lithium-ion batteries used for portable electronics such as laptops and smartphones. Batteries come in many shapes and sizes, from miniature cells used to power hearing aids and wristwatches to small, thin cells used in smartphones, to large lead acid batteries used in cars and trucks, and at the largest extreme, huge battery banks the size of rooms that provide standby or emergency power for telephone exchanges and computer data centers. According to a 2005 estimate, the worldwide battery industry generates US$48 billion in sales each year,[5] with 6% annual growth.

Batteries have much lower specific energy (energy per unit mass) than common fuels such as gasoline. In automobiles, this is somewhat offset by the higher efficiency of electric motors in producing mechanical work, compared to combustion engines.

## History

A voltaic pile, the first battery
Italian physicist Alessandro Volta demonstrating his pile to French emperor Napoleon Bonaparte

The usage of "battery" to describe a group of electrical devices dates to Benjamin Franklin, who in 1748 described multiple Leyden jars by analogy to a battery of cannon[6] (Benjamin Franklin borrowed the term "battery" from the military, which refers to weapons functioning together[7]).

Italian physicist Alessandro Volta built and described the first electrochemical battery, the voltaic pile, in 1800.[8] This was a stack of copper and zinc plates, separated by brine-soaked paper disks, that could produce a steady current for a considerable length of time. Volta did not understand that the voltage was due to chemical reactions. He thought that his cells were an inexhaustible source of energy,[9] and that the associated corrosion effects at the electrodes were a mere nuisance, rather than an unavoidable consequence of their operation, as Michael Faraday showed in 1834.[10]

Although early batteries were of great value for experimental purposes, in practice their voltages fluctuated and they could not provide a large current for a sustained period. The Daniell cell, invented in 1836 by British chemist John Frederic Daniell, was the first practical source of electricity, becoming an industry standard and seeing widespread adoption as a power source for electrical telegraph networks.[11] It consisted of a copper pot filled with a copper sulfate solution, in which was immersed an unglazed earthenware container filled with sulfuric acid and a zinc electrode.[12]

These wet cells used liquid electrolytes, which were prone to leakage and spillage if not handled correctly. Many used glass jars to hold their components, which made them fragile and potentially dangerous. These characteristics made wet cells unsuitable for portable appliances. Near the end of the nineteenth century, the invention of dry cell batteries, which replaced the liquid electrolyte with a paste, made portable electrical devices practical.[13]

## Principle of operation

Batteries convert chemical energy directly to electrical energy. A battery consists of some number of voltaic cells. Each cell consists of two half-cells connected in series by a conductive electrolyte containing anions and cations. One half-cell includes electrolyte and the negative electrode, the electrode to which anions (negatively charged ions) migrate; the other half-cell includes electrolyte and the positive electrode to which cations (positively charged ions) migrate. Redox reactions power the battery. Cations are reduced (electrons are added) at the cathode during charging, while anions are oxidized (electrons are removed) at the anode during charging.[14] During discharge, the process is reversed. The electrodes do not touch each other, but are electrically connected by the electrolyte. Some cells use different electrolytes for each half-cell. A separator allows ions to flow between half-cells, but prevents mixing of the electrolytes.

Each half-cell has an electromotive force (emf), determined by its ability to drive electric current from the interior to the exterior of the cell. The net emf of the cell is the difference between the emfs of its half-cells.[15] Thus, if the electrodes have emfs ${\displaystyle {\mathcal {E}}_{1}}$ and ${\displaystyle {\mathcal {E}}_{2}}$, then the net emf is ${\displaystyle {\mathcal {E}}_{2}-{\mathcal {E}}_{1}}$; in other words, the net emf is the difference between the reduction potentials of the half-reactions.[16]

The electrical driving force or ${\displaystyle \displaystyle {\Delta V_{bat}}}$ across the terminals of a cell is known as the terminal voltage (difference) and is measured in volts.[17] The terminal voltage of a cell that is neither charging nor discharging is called the open-circuit voltage and equals the emf of the cell. Because of internal resistance,[18] the terminal voltage of a cell that is discharging is smaller in magnitude than the open-circuit voltage and the terminal voltage of a cell that is charging exceeds the open-circuit voltage.[19] An ideal cell has negligible internal resistance, so it would maintain a constant terminal voltage of ${\displaystyle {\mathcal {E}}}$ until exhausted, then dropping to zero. If such a cell maintained 1.5 volts and stored a charge of one coulomb then on complete discharge it would perform 1.5 joules of work.[17] In actual cells, the internal resistance increases under discharge[18] and the open circuit voltage also decreases under discharge. If the voltage and resistance are plotted against time, the resulting graphs typically are a curve; the shape of the curve varies according to the chemistry and internal arrangement employed.

The voltage developed across a cell's terminals depends on the energy release of the chemical reactions of its electrodes and electrolyte. Alkaline and zinc–carbon cells have different chemistries, but approximately the same emf of 1.5 volts; likewise NiCd and NiMH cells have different chemistries, but approximately the same emf of 1.2 volts.[20] The high electrochemical potential changes in the reactions of lithium compounds give lithium cells emfs of 3 volts or more.[21]

## Categories and types of batteries

Batteries are classified into primary and secondary forms:

• Primary batteries are designed to be used until exhausted of energy then discarded. Their chemical reactions are generally not reversible, so they cannot be recharged. When the supply of reactants in the battery is exhausted, the battery stops producing current and is useless.[22]
• Secondary batteries can be recharged; that is, they can have their chemical reactions reversed by applying electric current to the cell. This regenerates the original chemical reactants, so they can be used, recharged, and used again multiple times.[23]

Some types of primary batteries used, for example, for telegraph circuits, were restored to operation by replacing the electrodes.[24] Secondary batteries are not indefinitely rechargeable due to dissipation of the active materials, loss of electrolyte and internal corrosion.

### Primary

Primary batteries, or primary cells, can produce current immediately on assembly. These are most commonly used in portable devices that have low current drain, are used only intermittently, or are used well away from an alternative power source, such as in alarm and communication circuits where other electric power is only intermittently available. Disposable primary cells cannot be reliably recharged, since the chemical reactions are not easily reversible and active materials may not return to their original forms. Battery manufacturers recommend against attempting to recharge primary cells.[25] In general, these have higher energy densities than rechargeable batteries,[26] but disposable batteries do not fare well under high-drain applications with loads under 75 ohms (75 Ω). Common types of disposable batteries include zinc–carbon batteries and alkaline batteries.

### Secondary

Secondary batteries, also known as secondary cells, or rechargeable batteries, must be charged before first use; they are usually assembled with active materials in the discharged state. Rechargeable batteries are (re)charged by applying electric current, which reverses the chemical reactions that occur during discharge/use. Devices to supply the appropriate current are called chargers.

The oldest form of rechargeable battery is the lead–acid battery, which are widely used in automotive and boating applications. This technology contains liquid electrolyte in an unsealed container, requiring that the battery be kept upright and the area be well ventilated to ensure safe dispersal of the hydrogen gas it produces during overcharging. The lead–acid battery is relatively heavy for the amount of electrical energy it can supply. Its low manufacturing cost and its high surge current levels make it common where its capacity (over approximately 10 Ah) is more important than weight and handling issues. A common application is the modern car battery, which can, in general, deliver a peak current of 450 amperes.

The sealed valve regulated lead–acid battery (VRLA battery) is popular in the automotive industry as a replacement for the lead–acid wet cell. The VRLA battery uses an immobilized sulfuric acid electrolyte, reducing the chance of leakage and extending shelf life.[27] VRLA batteries immobilize the electrolyte. The two types are:

Other portable rechargeable batteries include several sealed "dry cell" types, that are useful in applications such as mobile phones and laptop computers. Cells of this type (in order of increasing power density and cost) include nickel–cadmium (NiCd), nickel–zinc (NiZn), nickel metal hydride (NiMH), and lithium-ion (Li-ion) cells. Li-ion has by far the highest share of the dry cell rechargeable market. NiMH has replaced NiCd in most applications due to its higher capacity, but NiCd remains in use in power tools, two-way radios, and medical equipment.

In the 2000s, developments include batteries with embedded electronics such as USBCELL, which allows charging an AA battery through a USB connector,[28] nanoball batteries that allow for a discharge rate about 100x greater than current batteries, and smart battery packs with state-of-charge monitors and battery protection circuits that prevent damage on over-discharge. Low self-discharge (LSD) allows secondary cells to be charged prior to shipping.

### Cell types

Many types of electrochemical cells have been produced, with varying chemical processes and designs, including galvanic cells, electrolytic cells, fuel cells, flow cells and voltaic piles.[29]

#### Wet cell

A wet cell battery has a liquid electrolyte. Other names are flooded cell, since the liquid covers all internal parts, or vented cell, since gases produced during operation can escape to the air. Wet cells were a precursor to dry cells and are commonly used as a learning tool for electrochemistry. They can be built with common laboratory supplies, such as beakers, for demonstrations of how electrochemical cells work. A particular type of wet cell known as a concentration cell is important in understanding corrosion. Wet cells may be primary cells (non-rechargeable) or secondary cells (rechargeable). Originally, all practical primary batteries such as the Daniell cell were built as open-top glass jar wet cells. Other primary wet cells are the Leclanche cell, Grove cell, Bunsen cell, Chromic acid cell, Clark cell, and Weston cell. The Leclanche cell chemistry was adapted to the first dry cells. Wet cells are still used in automobile batteries and in industry for standby power for switchgear, telecommunication or large uninterruptible power supplies, but in many places batteries with gel cells have been used instead. These applications commonly use lead–acid or nickel–cadmium cells.

#### Dry cell

A dry cell uses a paste electrolyte, with only enough moisture to allow current to flow. Unlike a wet cell, a dry cell can operate in any orientation without spilling, as it contains no free liquid, making it suitable for portable equipment. By comparison, the first wet cells were typically fragile glass containers with lead rods hanging from the open top and needed careful handling to avoid spillage. Lead–acid batteries did not achieve the safety and portability of the dry cell until the development of the gel battery.

A common dry cell is the zinc–carbon battery, sometimes called the dry Leclanché cell, with a nominal voltage of 1.5 volts, the same as the alkaline battery (since both use the same zincmanganese dioxide combination). A standard dry cell comprises a zinc anode, usually in the form of a cylindrical pot, with a carbon cathode in the form of a central rod. The electrolyte is ammonium chloride in the form of a paste next to the zinc anode. The remaining space between the electrolyte and carbon cathode is taken up by a second paste consisting of ammonium chloride and manganese dioxide, the latter acting as a depolariser. In some designs, the ammonium chloride is replaced by zinc chloride.

#### Molten salt

Molten salt batteries are primary or secondary batteries that use a molten salt as electrolyte. They operate at high temperatures and must be well insulated to retain heat.

#### Reserve

A reserve battery can be stored unassembled (unactivated and supplying no power) for a long period (perhaps years). When the battery is needed, then it is assembled (e.g., by adding electrolyte); once assembled, the battery is charged and ready to work. For example, a battery for an electronic artillery fuze might be activated by the impact of firing a gun. The acceleration breaks a capsule of electrolyte that activates the battery and powers the fuze's circuits. Reserve batteries are usually designed for a short service life (seconds or minutes) after long storage (years). A water-activated battery for oceanographic instruments or military applications becomes activated on immersion in water.

### Cell performance

A battery's characteristics may vary over load cycle, over charge cycle, and over lifetime due to many factors including internal chemistry, current drain, and temperature. At low temperatures, a battery cannot deliver as much power. As such, in cold climates, some car owners install battery warmers, which are small electric heating pads that keep the car battery warm.

## Capacity and discharge

A device to check battery voltage

A battery's capacity is the amount of electric charge it can deliver at the rated voltage. The more electrode material contained in the cell the greater its capacity. A small cell has less capacity than a larger cell with the same chemistry, although they develop the same open-circuit voltage.[30] Capacity is measured in units such as amp-hour (A·h). The rated capacity of a battery is usually expressed as the product of 20 hours multiplied by the current that a new battery can consistently supply for 20 hours at 68 °F (20 °C), while remaining above a specified terminal voltage per cell. For example, a battery rated at 100 A·h can deliver 5 A over a 20-hour period at room temperature. The fraction of the stored charge that a battery can deliver depends on multiple factors, including battery chemistry, the rate at which the charge is delivered (current), the required terminal voltage, the storage period, ambient temperature and other factors.[30]

The higher the discharge rate, the lower the capacity.[31] The relationship between current, discharge time and capacity for a lead acid battery is approximated (over a typical range of current values) by Peukert's law:

${\displaystyle t={\frac {Q_{P}}{I^{k}}}}$

where

${\displaystyle Q_{P}}$ is the capacity when discharged at a rate of 1 amp.
${\displaystyle I}$ is the current drawn from battery (A).
${\displaystyle t}$ is the amount of time (in hours) that a battery can sustain.
${\displaystyle k}$ is a constant around 1.3.

Batteries that are stored for a long period or that are discharged at a small fraction of the capacity lose capacity due to the presence of generally irreversible side reactions that consume charge carriers without producing current. This phenomenon is known as internal self-discharge. Further, when batteries are recharged, additional side reactions can occur, reducing capacity for subsequent discharges. After enough recharges, in essence all capacity is lost and the battery stops producing power.

Internal energy losses and limitations on the rate that ions pass through the electrolyte cause battery efficiency to vary. Above a minimum threshold, discharging at a low rate delivers more of the battery's capacity than at a higher rate. Installing batteries with varying A·h ratings does not affect device operation (although it may affect the operation interval) rated for a specific voltage unless load limits are exceeded. High-drain loads such as digital cameras can reduce total capacity, as happens with alkaline batteries. For example, a battery rated at 2 A·h for a 10- or 20-hour discharge would not sustain a current of 1 A for a full two hours as its stated capacity implies.

### C rate

The C-rate is a measure of the rate at which a battery is being discharged. It is defined as the discharge current divided by the theoretical current draw under which the battery would deliver its nominal rated capacity in one hour.[32] A 1C discharge rate would deliver the battery's rated capacity in 1 hour. A 2C discharge rate means it will discharge twice as fast (30 minutes). A 1C discharge rate on a 1.6 Ah battery means a discharge current of 1.6 A. A 2C rate would mean a discharge current of 3.2 A. Standards for rechargeable batteries generally rate the capacity over a 4-hour, 8 hour or longer discharge time. Because of internal resistance loss and the chemical processes inside the cells, a battery rarely delivers nameplate rated capacity in only one hour. Types intended for special purposes, such as in a computer uninterruptible power supply, may be rated by manufacturers for discharge periods much less than one hour.

One should note that the C-rate presents a dimensional error: C is in fact expressed in ampere-hours and not in amperes like a current, and one can not express a current in ampere-hours. For this reason the concept It was introduced by the international standard IEC61434[33], It being equal to the capacity C divided by one hour, hence allowing a mathematically correct method of current designation. The figures used for expressing the discharge rate remain the same: one can speak of "2 It rate" instead of the dimensionally incorrect "2 C rate".

### Fast-charging, large and light batteries

As of 2012, lithium iron phosphate (LiFePO
4
) battery technology
was the fastest-charging/discharging, fully discharging in 10–20 seconds.[34]

As of 2013, the world's largest battery was in Hebei Province, China. It stored 36 megawatt-hours of electricity at a cost of \$500 million.[35] Another large battery, composed of Ni–Cd cells, was in Fairbanks, Alaska. It covered 2,000 square metres (22,000 sq ft)—bigger than a football pitch—and weighed 1,300 tonnes. It was manufactured by ABB to provide backup power in the event of a blackout. The battery can provide 40 megawatts of power for up to seven minutes.[36] Sodium–sulfur batteries have been used to store wind power.[37] A 4.4 megawatt-hour battery system that can deliver 11 megawatts for 25 minutes stabilizes the output of the Auwahi wind farm in Hawaii.[38]

Lithium–sulfur batteries were used on the longest and highest solar-powered flight.[39]

Battery life (and its synonym battery lifetime) has two meanings for rechargeable batteries but only one for non-chargeables. For rechargeables, it can mean either the length of time a device can run on a fully charged battery or the number of charge/discharge cycles possible before the cells fail to operate satisfactorily. For a non-rechargeable these two lives are equal since the cells last for only one cycle by definition. (The term shelf life is used to describe how long a battery will retain its performance between manufacture and use.) Available capacity of all batteries drops with decreasing temperature. In contrast to most of today's batteries, the Zamboni pile, invented in 1812, offers a very long service life without refurbishment or recharge, although it supplies current only in the nanoamp range. The Oxford Electric Bell has been ringing almost continuously since 1840 on its original pair of batteries, thought to be Zamboni piles.

### Self-discharge

Disposable batteries typically lose 8 to 20 percent of their original charge per year when stored at room temperature (20–30 °C).[40] This is known as the "self-discharge" rate, and is due to non-current-producing "side" chemical reactions that occur within the cell even when no load is applied. The rate of side reactions is reduced for batteries are stored at lower temperatures, although some can be damaged by freezing.

Old rechargeable batteries self-discharge more rapidly than disposable alkaline batteries, especially nickel-based batteries; a freshly charged nickel cadmium (NiCd) battery loses 10% of its charge in the first 24 hours, and thereafter discharges at a rate of about 10% a month. However, newer low self-discharge nickel metal hydride (NiMH) batteries and modern lithium designs display a lower self-discharge rate (but still higher than for primary batteries).

### Corrosion

Internal parts may corrode and fail, or the active materials may be slowly converted to inactive forms.

### Physical component changes

The active material on the battery plates changes chemical composition on each charge and discharge cycle; active material may be lost due to physical changes of volume, further limiting the number of times the battery can be recharged. Most nickel-based batteries are partially discharged when purchased, and must be charged before first use.[41] Newer NiMH batteries are ready to be used when purchased, and have only 15% discharge in a year.[42]

Some deterioration occurs on each charge–discharge cycle. Degradation usually occurs because electrolyte migrates away from the electrodes or because active material detaches from the electrodes. Low-capacity NiMH batteries (1,700–2,000 mA·h) can be charged some 1,000 times, whereas high-capacity NiMH batteries (above 2,500 mA·h) last about 500 cycles.[43] NiCd batteries tend to be rated for 1,000 cycles before their internal resistance permanently increases beyond usable values.

### Charge/discharge speed

Fast charging increases component changes, shortening battery lifespan.[43]

### Overcharging

If a charger cannot detect when the battery is fully charged then overcharging is likely, damaging it.[44]

### Memory effect

NiCd cells, if used in a particular repetitive manner, may show a decrease in capacity called "memory effect".[45] The effect can be avoided with simple practices. NiMH cells, although similar in chemistry, suffer less from memory effect.[46]

### Environmental conditions

Automotive lead–acid rechargeable batteries must endure stress due to vibration, shock, and temperature range. Because of these stresses and sulfation of their lead plates, few automotive batteries last beyond six years of regular use.[47] Automotive starting (SLI: Starting, Lighting, Ignition) batteries have many thin plates to maximize current. In general, the thicker the plates the longer the life. They are typically discharged only slightly before recharge.

"Deep-cycle" lead–acid batteries such as those used in electric golf carts have much thicker plates to extend longevity.[48] The main benefit of the lead–acid battery is its low cost; its main drawbacks are large size and weight for a given capacity and voltage. Lead–acid batteries should never be discharged to below 20% of their capacity,[49] because internal resistance will cause heat and damage when they are recharged. Deep-cycle lead–acid systems often use a low-charge warning light or a low-charge power cut-off switch to prevent the type of damage that will shorten the battery's life.[50]

### Storage

Battery life can be extended by storing the batteries at a low temperature, as in a refrigerator or freezer, which slows the side reactions. Such storage can extend the life of alkaline batteries by about 5%; rechargeable batteries can hold their charge much longer, depending upon type.[51] To reach their maximum voltage, batteries must be returned to room temperature; discharging an alkaline battery at 250 mA at 0 °C is only half as efficient as at 20 °C.[26] Alkaline battery manufacturers such as Duracell do not recommend refrigerating batteries.[25]

## Battery sizes

Primary batteries readily available to consumers range from tiny button cells used for electric watches, to the No. 6 cell used for signal circuits or other long duration applications. Secondary cells are made in very large sizes; very large batteries can power a submarine or stabilize an electrical grid and help level out peak loads.

## Hazards

### Explosion

A battery explosion is generally caused by misuse or malfunction, such as attempting to recharge a primary (non-rechargeable) battery, or a short circuit.

When a battery is recharged at an excessive rate, an explosive gas mixture of hydrogen and oxygen may be produced faster than it can escape from within the battery (e.g. through a built-in vent), leading to pressure build-up and eventual bursting of the battery case. In extreme cases, battery chemicals may spray violently from the casing and cause injury. Overcharging - that is, attempting to charge a battery beyond its electrical capacity - can also lead to a battery explosion, in addition to leakage or irreversible damage. It may also cause damage to the charger or device in which the overcharged battery is later used.

Car batteries are most likely to explode when a short-circuit generates very large currents. Such batteries produce hydrogen, which is very explosive, when they are overcharged (because of electrolysis of the water in the electrolyte). During normal use, the amount of overcharging is usually very small and generates little hydrogen, which dissipates quickly. However, when "jump starting" a car, the high current can cause the rapid release of large volumes of hydrogen, which can be ignited explosively by a nearby spark, e.g. when disconnecting a jumper cable.

Disposing of a battery via incineration may cause an explosion as steam builds up within the sealed case.

Recalls of devices using Lithium-ion batteries have become more common in recent years. This is in response to reported accidents and failures, occasionally ignition or explosion.[52][53] An expert summary of the problem indicates that this type uses "liquid electrolytes to transport lithium ions between the anode and the cathode. If a battery cell is charged too quickly, it can cause a short circuit, leading to explosions and fires".[54][55]

### Leakage

Many battery chemicals are corrosive, poisonous or both. If leakage occurs, either spontaneously or through accident, the chemicals released may be dangerous. For example, disposable batteries often use a zinc "can" both as a reactant and as the container to hold the other reagents. If this kind of battery is over-discharged, the reagents can emerge through the cardboard and plastic that form the remainder of the container. The active chemical leakage can then damage or disable the equipment that the batteries power. For this reason, many electronic device manufacturers recommend removing the batteries from devices that will not be used for extended periods of time.

### Toxic materials

Many types of batteries employ toxic materials such as lead, mercury, and cadmium as an electrode or electrolyte. When each battery reaches end of life it must be disposed of to prevent environmental damage.[56] Batteries are one form of electronic waste (e-waste). E-waste recycling services recover toxic substances, which can then be used for new batteries.[57] Of the nearly three billion batteries purchased annually in the United States, about 179,000 tons end up in landfills across the country.[58] In the United States, the Mercury-Containing and Rechargeable Battery Management Act of 1996 banned the sale of mercury-containing batteries, enacted uniform labeling requirements for rechargeable batteries and required that rechargeable batteries be easily removable.[59] California and New York City prohibit the disposal of rechargeable batteries in solid waste, and along with Maine require recycling of cell phones.[60] The rechargeable battery industry operates nationwide recycling programs in the United States and Canada, with dropoff points at local retailers.[60]

The Battery Directive of the European Union has similar requirements, in addition to requiring increased recycling of batteries and promoting research on improved battery recycling methods.[61] In accordance with this directive all batteries to be sold within the EU must be marked with the "collection symbol" (a crossed-out wheeled bin). This must cover at least 3% of the surface of prismatic batteries and 1.5% of the surface of cylindrical batteries. All packaging must be marked likewise.[62]

### Ingestion

Batteries may be harmful or fatal if swallowed.[63] Small button cells can be swallowed, in particular by young children. While in the digestive tract, the battery's electrical discharge may lead to tissue damage;[64] such damage is occasionally serious and can lead to death. Ingested disk batteries do not usually cause problems unless they become lodged in the gastrointestinal tract. The most common place for disk batteries to become lodged is the esophagus, resulting in clinical sequelae. Batteries that successfully traverse the esophagus are unlikely to lodge elsewhere. The likelihood that a disk battery will lodge in the esophagus is a function of the patient's age and battery size. Disk batteries of 16 mm have become lodged in the esophagi of 2 children younger than 1 year.[citation needed] Older children do not have problems with batteries smaller than 21–23 mm. Liquefaction necrosis may occur because sodium hydroxide is generated by the current produced by the battery (usually at the anode). Perforation has occurred as rapidly as 6 hours after ingestion.[65]

## Chemistry

### Primary batteries and their characteristics

Chemistry Anode (−) Cathode (+) Max. voltage, theoretical (V) Nominal voltage, practical (V) Specific energy (MJ/kg) Elaboration Shelf life at 25 °C, 80% capacity (months)
Zinc–carbon Zn MnO2 1.6 1.2 0.13 Inexpensive. 18
Zinc–chloride 1.5 Also known as "heavy-duty", inexpensive.
Alkaline
(zinc–manganese dioxide)
Zn MnO2 1.5 1.15 0.4–0.59 Moderate energy density.
Good for high- and low-drain uses.
30
Nickel oxyhydroxide
(zinc–manganese dioxide/nickel oxyhydroxide)
1.7 Moderate energy density.
Good for high drain uses.
Lithium
(lithium–copper oxide)
Li–CuO
Li CuO 1.7 No longer manufactured.
Replaced by silver oxide (IEC-type "SR") batteries.
Lithium
(lithium–iron disulfide)
LiFeS2
Li FeS2 1.8 1.5 1.07 Expensive.
Used in 'plus' or 'extra' batteries.
337[66]
Lithium
(lithium–manganese dioxide)
LiMnO2
Li MnO2 3.0 0.83–1.01 Expensive.
Used only in high-drain devices or for long shelf-life due to very low rate of self-discharge.
'Lithium' alone usually refers to this type of chemistry.
Lithium
(lithium–carbon fluoride)
Li–(CF)n
Li (CF)n 3.6 3.0 120
Lithium
(lithium–chromium oxide)
Li–CrO2
Li CrO2 3.8 3.0 108
Mercury oxide Zn HgO 1.34 1.2 High-drain and constant voltage.
Banned in most countries because of health concerns.
36
Zinc–air Zn O2 1.6 1.1 1.59[67] Used mostly in hearing aids.
Zamboni pile Zn Ag or Au 0.8 Very long life
Very low (nanoamp, nA) current
>2,000
Silver-oxide (silver–zinc) Zn Ag2O 1.85 1.5 0.47 Very expensive.
Used only commercially in 'button' cells.
30
Magnesium Mg MnO2 2.0 1.5 40

### Secondary (rechargeable) batteries and their characteristics

Chemistry Cell
voltage
Specific
energy

(kJ/kg)
Energy
density

(kJ/liter)
Inexpensive.
High-/low-drain, moderate energy density.
Can withstand very high discharge rates with virtually no loss of capacity.
Moderate rate of self-discharge.
Environmental hazard due to Cadmium – use now virtually prohibited in Europe.
Moderate energy density.
Moderate rate of self-discharge.
Higher discharge rates result in considerable loss of capacity.
Common use – Automobile batteries
NiMH 1.2 360 Nickel–metal hydride chemistry.
Inexpensive.
Performs better than alkaline batteries in higher drain devices.
Traditional chemistry has high energy density, but also a high rate of self-discharge.
Newer chemistry has low self-discharge rate, but also a ~25% lower energy density.
Used in some cars.
NiZn 1.6 360 Nickel-zinc chemistry.
Moderately inexpensive.
High drain device suitable.
Low self-discharge rate.
Voltage closer to alkaline primary cells than other secondary cells.
No toxic components.
Newly introduced to the market (2009). Has not yet established a track record.
Limited size availability.
AgZn 1.86
1.5
460 Silver-zinc chemistry.
Smaller volume than equivalent Li-ion.
Extremely expensive due to silver.
Very high energy density.
Very high drain capable.
For many years considered obsolete due to high silver prices.
Cell suffers from oxidation if unused.
Reactions are not fully understood.
Terminal voltage very stable but suddenly drops to 1.5 volts at 70–80% charge (believed to be
due to presence of both argentous and argentic oxide in positive plate – one is consumed first).
Has been used in lieu of primary battery (moon buggy).
Is being developed once again as a replacement for Li-ion.
LiFePO4 3.3
3.0
360 790 Lithium-Iron-Phosphate chemistry.
Lithium ion 3.6 460 Various lithium chemistries.
Very expensive.
Very high energy density.
Not usually available in "common" battery sizes.
Lithium polymer battery is common in laptop computers, digital cameras, camcorders, and cellphones.
Very low rate of self-discharge.

Terminal voltage varies from 4.2 to 3.0 volts during discharge.
Volatile: Chance of explosion if short-circuited, allowed to overheat, or not manufactured with rigorous quality standards.

## Solid state batteries

On 28 February 2017, The University of Texas at Austin issued a press release about a new type of solid-state battery, developed by a team led by Lithium-ion (Li-Ion) inventor John Goodenough, "that could lead to safer, faster-charging, longer-lasting rechargeable batteries for handheld mobile devices, electric cars and stationary energy storage".[68] More specifics about the new technology were published in the peer-reviewed scientific journal Energy & Environmental Science.

Independent reviews of the technology discuss the risk of fire and explosion from Lithium-ion batteries under certain conditions because they use liquid electrolytes. The newly developed battery should be safer since it uses glass electrolytes, that should eliminate short circuits. The solid-state battery is also said to have "three times the energy density" increasing its useful life in electric vehicles, for example. It should also be more ecologically sound since the technology uses less expensive, earth-friendly materials such as sodium extracted from seawater. They also have much longer life; ("the cells have demonstrated more than 1,200 cycles with low cell resistance"). The research and prototypes are not expected to lead to a commercially viable product in the near future, if ever, according to Chris Robinson of LUX Research. "This will have no tangible effect on electric vehicle adoption in the next 15 years, if it does at all. A key hurdle that many solid-state electrolytes face is lack of a scalable and cost-effective manufacturing process," he told The American Energy News in an e-mail.[69]

Almost any liquid or moist object that has enough ions to be electrically conductive can serve as the electrolyte for a cell. As a novelty or science demonstration, it is possible to insert two electrodes made of different metals into a lemon,[70] potato,[71] etc. and generate small amounts of electricity. "Two-potato clocks" are also widely available in hobby and toy stores; they consist of a pair of cells, each consisting of a potato (lemon, et cetera) with two electrodes inserted into it, wired in series to form a battery with enough voltage to power a digital clock.[72] Homemade cells of this kind are of no practical use.

A voltaic pile can be made from two coins (such as a nickel and a penny) and a piece of paper towel dipped in salt water. Such a pile generates a very low voltage but, when many are stacked in series, they can replace normal batteries for a short time.[73]

Sony has developed a biological battery that generates electricity from sugar in a way that is similar to the processes observed in living organisms. The battery generates electricity through the use of enzymes that break down carbohydrates.[74]

Lead acid cells can easily be manufactured at home, but a tedious charge/discharge cycle is needed to 'form' the plates. This is a process in which lead sulfate forms on the plates, and during charge is converted to lead dioxide (positive plate) and pure lead (negative plate). Repeating this process results in a microscopically rough surface, increasing the surface area, increasing the current the cell can deliver.[75]

Daniell cells are easy to make at home. Aluminium–air batteries can be produced with high-purity aluminium. Aluminium foil batteries will produce some electricity, but are not efficient, in part because a significant amount of (combustible) hydrogen gas is produced.