Batteries in Montreal vs Mexico.

Tobias Grether-Murray
9 min readDec 18, 2021

I made a video on this same topic and experiment that you can watch here if you prefer video! It shows the simulation more hands-on.

One recurring theme you’ll come across when doing a deep dive into alternative energy is that there are no perfect solutions yet. By that I mean everything has a tradeoff. Nuclear energy hardly pollutes…but people are scared of it and reactors are expensive. You can capture energy from the sun…now where are you going to store it? Most solutions face this kind of dilemma.

Every expert I speak to leads me to ask myself more questions. For example, a few weeks ago, I was on the phone with Karl Rudisill — founder and CEO of Element One Technologies. He is focused on hydrogen solutions, and on our call he challenged me to think about the variability of wind and solar with his funny quote:

“Why are we shifting towards weather-dependent technologies to correct the weather? This is upside-down thinking.”

The intermittent/weather-dependent nature of the most popular renewables like solar and wind is what makes energy storage innovation so crucial in the upcoming years. The tide is shifting more and more towards solar and wind, and if we’re going to transition to a highly weather-dependent energy grid we need storage to keep the lights on at night, to be blunt.

Thinking about the weather-storage dilemma made me curious about something: I wondered about lithium-ion batteries (LIBs) — the batteries we use every day. What effects does the weather have on them, and why do they behave a certain way? I decided to conduct a simulation to answer my question. But first, I should go through how LIBs work.

Disclaimer: If you already know how LIBs work, you can skip down to my experiment to see what I did and what I took away!

Simply put: lithium-ion battery cells consist of an anode, a cathode, and something special in between.

There are many different LIB chemistries, but the one I tested was lithium cobalt oxide (LiCoO2). The general way of functioning for LIBs is the same for each chemistry.

On the left side of this image is the cathode; the positive terminal of the battery cell. The cathode is made of cobalt oxide (CoO2). On the right is the anode; the negative terminal. The anode is made of graphite; pure carbon but in a crystalline form.

“Hold on, I thought these had lithium!” You’re right. Here’s the thing: I lied to you. The cathode and the anode aren’t always made of one thing or the other. Depending on how discharged your battery is, the cathode or anode will have a different percentage composition of lithium. I’ll give you an example:

Imagine you’re working from home — this shouldn’t be so hard to imagine :) Because you’re working from home, you keep your computer battery charging all day: it’s at 100%. In this case, all the lithium atoms are at the anode. They stack themselves in between the graphite layers like such:

The stacking of lithium atoms in between the layers of graphite is called intercalation. Notice the crystalline structure of the graphite. Source

Now, let’s say the opposite. You spend your whole day working on your laptop at a café and forget your charger: the battery dies. At this point, all of the lithium atoms are at the cathode, intercalated in between the cobalt oxide layers:


Electricity is produced by the reaction that happens in between these two end situations.

I have to say, I’m impressed by how clever the design of these batteries is.

Remember the café? Let’s start there. You arrive at the café with your fully charged computer to start your day’s work. All the lithium atoms are intercalated in between the graphite layers. But there’s something else I didn’t mention about lithium atoms. They desperately want to get rid of their 1 valence electron. So, when you turn on your computer and start working, the system that powers your computer provides a path for the lithium electron to leave by. Once the electrons jump away from the lithium atom and go through the powering system, they reach the other side and attach to the cobalt atoms which are positively charged because oxygen has taken their valence electrons.

At the same time as the electrons are changing sides through the wire, the lithium atoms also change sides to balance the negative charges from the electrons at the other side. However, instead of moving by the wire they move by means of the electrolyte (the special thing in between that I mentioned at the beginning)…

The definition of an electrolyte is: a liquid or gel that contains ions and can be decomposed by electrolysis. In this case, the electrolyte is comprised of lithium salts dissolved in a mixture of solvents. This way, there are already lithium ions in the electrolyte which increases the efficiency of the battery: having lithium ions in the electrolyte means that when one lithium ion gets kicked off the anode/cathode, that same ion doesn’t have to travel all the way to the other side, an ion in the solution can take its place at the opposite end. The electrolyte doesn’t let electrons pass through.

Basically, the whole process is a game of balancing charges. Let me just recap with some helpful images from Branch Education’s video.

First, when your battery is fully charged, all the lithium atoms and their valence electrons are intercalated at the anode. When you discharge your battery, electrons are separated from the lithium atoms which creates lithium ions. The electrons flow through the wire to the cathode and the lithium ions move through the electrolyte to the other side to balance the cathode’s accumulating negative charge.

Flow of electrons up through the circuit. Moving of the lithium ions from right (anode) to left (cathode) through the electrolyte.
Some of this image is inaccurate, since the electrolyte is actually everywhere surrounding the anode and cathode. One thing missing in this image is the separator; a component of the battery cell I didn’t mention. Its job is to be a physical barrier between the anode and the cathode; if they touched, the reaction would be so fast it could cause a fire.

The reverse process happens when charging your battery. The battery charger applies an external voltage to move current from the cathode to the anode, acting like a pump. Once all the lithium ions reach the anode and pair with their missing electrons, the battery is fully charged.

Charging of the battery.

Good! I’ve covered the basics, but before looking at my experiment, you might be wondering:

What’s the Advantage to Simulations?

To be brief, I’ll just say that battery simulations can save researchers and companies lots of money and time by building equivalent circuits (see below) of their battery and testing different conditions in simulation. For example, say you want to test the aging effects on your battery over two and a half years. Instead of testing for the full time period, you could test for the first 8 months and then simulate the future results.

By using simulations, we can speed up production and optimization of batteries by bypassing slow and costly real-world testing. Okay, now we can move on!

My experiment: simulating the performance of a LiCoO2 battery cell at different ambient temperatures.

Here’s what I did:

  • Downloaded a free trial of MatLab.
  • Created my simulation circuit in Simulink.
  • Ran the simulation and generated graphs to show differences.

Here’s the high-level view of my circuit:

You’ll understand why I put everything in a subsystem in a moment when you see how messy things can get 😆 Basically, the goal of this circuit is to output state of charge (SoC) and voltage values of the battery cells in a graph relative to the time of the simulation. Wondering what’s in the grey box? Let’s go deeper!

Another grey box! WOOHOO!

This first subsystem is the most important one. This is where the inputs are. On the left, you can see the batteries attached to enter the second subsystem. To the right, the outputs of the second subsystem (the organized data of SoCs and voltages). Let’s zoom in on the batteries to see what’s going on:

The 5 components of this image are: a battery model provided by MatLab, 2 constants, a controlled current source, and the wires connecting it all.

The battery model provided by MatLab is an example of what companies would build to simulate their battery cell. Masked under this block are lots of mathematical operations that when given certain inputs like the nominal voltage (V), rated capacity (Ah), initial cell temperature, ambient temperature, and time of simulation, will output data which I connected from the output (m) with a wire leading to one of the inputs of the second subsystem. This output data mimics how the battery would behave in real life given the same inputs.

Next, the constant “-2” provides a value to the controlled current source block. This block turns a mathematical value into an electrical value that can be used in a circuit. The controlled current source is attached to the “+” and “-” terminals of the battery block so it will discharge the battery by 2 amps/second. I made the discharge rate the same for every battery.

Lastly, I made 7 circuits like this changing only the constant value being inputed for the ambient temperature. The temperatures were: -40, -20, -10, 0, 10, 20, and 40 degrees Celsius. (Just in case you’re wondering, inside the second subsystem I simply separated the values being outputted by the batteries and rearranged the wires so that all the SoC values went somewhere separate from the voltage values.)

So, what were the results?

SoC (%) as a function of time (s).

I’ll first start with the SoC graph. As you can see above, at constant discharge, the LiCoO2 cell loses charge faster at lower temperatures. This can be explained through chemistry if we remember how LIBs work from above.

In colder temperatures, the battery’s capacity decreases because of higher internal resistance — the opposition to the flow of current within the battery. This is because the electrolyte becomes less conductive which lets less ions move from the anode to the cathode. Therefore, there are less available lithium ions and valence electrons for the same amount of current discharge → a lower battery capacity & a faster drain. However, a cold unused “on-the-shelf” battery will discharge less fast than a warm identical one because chemical reactions occur faster in higher temperatures. And yes, in case you didn’t know, your battery drains slowly without you having to use it!

Let’s look at voltage:

Voltage (V) as a function of time (s).

We see almost the same thing here as in the SoC graph: lower temperatures = lower voltage. Think of voltage as the pressure of a power source that pushes the electrons. Higher resistance in the cold → lower pressure. Just like a pipe:

The green stuff can be compared to the resistance of a battery cell. Source

This means that LIBs are always better in hot weather! Right?

Well…not really. Perhaps if what you’re optimizing for is highest voltage, but there are other factors to take into account: safety and aging among others. LIBs run the risk of blowing up when they reach an internal temperature of 60 degrees Celsius and above. That’s much easier to reach in 40-degree weather vs 20-degree weather. In addition, the aging speed of a cell is faster at higher temperatures.

So, don’t let me misguide you, there are some advantages to a battery in Montreal compared to a battery in Mexico. The truth is, lithium-ion batteries — just like most things in engineering — don’t perform well at extremes. Although this can be annoying, we should be grateful for the improvements that are being made with LIBs and that we have access to great technology to accelerate these improvements.

As the world transitions more and more towards renewables and needs better energy storage, given the time crunch of the climate problem, simulations will likely play a key role in energy storage speedy innovation.

If you enjoyed this article, I send out a newsletter once a month to update people on my projects like this one. I’d love for you to join!