Space Travel - Some Thoughts

I've been reading a few books about space travel and humans living off Earth recently, the latest two being:

  1. Beyond - Our Future In Space by Chris Impey,
  2. Blue Mars by Kim Stanley Robinson.

And these have got me thinking about our near term prospects for travelling both within the solar system and beyond. This is a fascinating area, and one where experts know so much more than me, but I just wanted to pull together some of my thoughts on this from reading these (and other) excellent books and resources.

The Big Picture

Humans love to explore, Chris Impey's book has a really good chapter on this where he discusses the human journey from sub-saharan Africa. Where I didn't feel so comfortable was on some of his arguments around the biological determinism of some people's risk aversion vs others. He may have painted a sound picture of the science but I'd like to investigate more - I'm always very sceptical of claims like this. Anyway, the point he makes is that we, as humans, are always looking for the next frontier and that naturally this now means we are looking to explore the planets and stars.

In the medium to long term, it's also clear that being a multi-planetary species will increase our odds of long-term survival, since we (to borrow a software analogy) won't have a 'single point of failure'. We'll be more robust as a species to any extinction level events since these will almost always only occur at the planetary level.

In the nearer term, space also means big business and potentially a huge resource source for future endeavours. In Beyond, Impey covers this point a few times, highlighting ideas around mining asteroids for resources etc. What Impey is excellent at doing in this book is always caveating these ideas with reasonable calculations of required energy and financial expenditure. It's so easy to assume "we'll go mine the moon for Helium" without realising that it probably isn't worth the huge cost required.

Stanley Robinson's book's are also excellent on this point. There is no waving of a technological magic wand that makes colonisation (and later terraforming) of Mars look easy. Everything is painstakingly shown to be a series of small wins, each with (well explained) incremental improvements in technology and reasonable expenditures of time and energy. The only time where there is a bit of a 'hand wave' explanation for a piece of technology is in the 'gerontological treatments' developed in the first of the Mars trilogy books (Red Mars). These treatments allow for the large extension of human lifetime and create a whole host of interesting psychological, political and even economic considerations both on Mars and Earth, but as mentioned are not exactly 'near term' technology by the sounds of things. Then again, rapid progress in medicine and the current thrust for innovation in gerontology may prove me wrong in the near future, but I am definitely no expert in this area (this interview with Laura Deming in the FT was really interesting).


Big Rockets (Some Assembly Required)

I am always fascinated by questions around visiting and colonising other planets because to me, as alluded to above, it just seems so damn hardImpey highlights this fact with some interesting calculations around the required energy and fuel expenditure needed to get to the nearest stars.

For example, the first calculation is one done by NASA [1], apparently to get to a school bus size payload to Alpha Centauri in 900 years (Alpha Centauri is 4.37 light years from the Sun, so this is about equivalent to travelling at 0.48% the speed of light) would require more chemical rocket fuel than there is mass in the universe .... So no chance there really.

The next rung up in complexity / speculative tech becomes fission or fusion based pulse propulsion engines,  but apparently even a fusion engine would still require 1011 kg of fuel, or roughly "1000 supertankers worth", to get to our nearest stellar neighbour in under a millennium. So again pretty damn hard.

Even when Impey considers matter-antimatter rockets (loved by science fiction aficianados), and assuming 100% conversion to kinetic energy of the fuel, we're still talking about "the energy consumption of the entire United States for six months" to get a 2k ton space shuttle to Alpha Centauri in approx. fifty years .... As I said, travelling to another star is really damn hard.

Ok, so what happens if we rein in our ambition a bit and consider planetary rather than interstellar travel. This is where the Mars Trilogy comes in. When the 'first hundred' explorers set off on the Ares spacecraft, they are aiming to reach Mars using a Type II Hohmann transfer orbit in about 300 days. This is not far off what's typically deemed the time it takes to get to Mars using current technology, given a launch during the appropriate window, which can give you a travel time from between 9 months to 1.5 years [2]. So this means that it's definitely feasible to get to the Red Planet in a reasonable timescale. It still won't be easy due to having to deal with the psychological and physical challenges of travelling for that long in space but lets leave that to the side for the moment.

If we stick with that potential technology stack for the moment, how long will it take to explore the rest of the solar system?

A simple way to do this is to simply use the travel times for different probes we have sent across the solar system as a good base estimate. Missions with personnel may take different times for a variety of reasons but let's assume we can use these probe travel times as a useful approximation. This article lists a good number of bodies we've sent probes to, but here are some highlights:

  1. Venus - 15 months (Magellan mission). This is interesting as Venus is closer to us than Mars in terms of distance from the Sun, but this mission must have taken this long due to the choice of transfer orbit and departure window.
  2. Jupiter - 6 years (Galileo mission).
  3. Neptune - 12 years (Voyager missions). The voyager missions were designed to study the 4 gas giant planets (Voyager 1 Jupiter and Saturn, Voyager 2 Uranus and Neptune). Calculations in 1965 revealed that there would be a once in 176 year alignment of the planets that meant a single spacecraft could technically explore all four of the gas giants. Voyager 2 was launched first and then Voyager 1 launched a few months later in 1977. Voyager 2 was so named because it would reach Jupiter and Saturn after Voyager 1. The full timelines and a lot more information about the Voyager missions are given here in a pretty amazing set of resources from NASA.

It should be clear from these numbers than using our current technology, or something close to it, to explore the solar system will still be, yup you guessed it, pretty damn hard!

One ray of light coming from the Mars Trilogy books is (spoiler alert!), when late in Blue Mars 'fusion pulse propulsion' technology is developed (similar to that mentioned above in the discussion of Beyond). As I stated above, this still makes getting to nearby stars pretty hard but, as explored in the booked, it would act to drastically shrink the subjective size of the solar system. In the book, travel time between the planets goes from months and years to weeks and days, and drastically reduces or removes the need for complex transfer orbits. This acts to accelerate the development and intensify the political manoeuvering of the different colonies throughout the solar system, leading to a period of rapid expansion of the human races civilisational footprint known as the Accelerando. Now, don't get me wrong, the prospect of creating a pulsed fusion propulsion system is not one we can currently entertain for the near future, since we haven't even been able to generate sustainable net energy gain in a fusion reactor. This doesn't mean it is not attainable in the next few decades however, and if it does become feasible, it is clear that the implications for solar system travel are potentially more transformative than for the prospective of interstellar travel.


In summary, I'd recommend reading 'Beyond' by Chris Impey and the Mars Trilogy by Kim Stanley Robinson. Even if they tell you that space travel on the interplanetary and interstellar scales is pretty damn hard, they are still great reads packed with interesting science and fun speculation about what's possible in humanity's near future.


[1] I've linked to the page quoted as a source in 'Beyond', but it looks like the page no longer has the original calculation (it seems to have been archived).

[2] More information about transfer times to Mars in this article:



Educating Clients about Machine Learning and AI

The responsibilities of a data scientist or machine learning engineer can vary tremendously depending your industry, the company you work for, the type of projects you typically work on and what stage of your career you are at. An important and, I believe, commonly overlooked skill that is key to master if you want to progress in your data science career however is ‘teaching the client’.

I know that there will be many ways of interpreting what I mean by this so I am going to focus on a very specific problem often faced by data scientists who have to map out the problem with clients (either internal or external):

How do you communicate the ideas, concepts and potential utility of machine learning and AI to non-experts in a way that:

  1. Empowers them to make decisions based on fact and not hype,
  2. Helps them understand the what is required to successfully implement machine learning and AI,
  3. Manages their expectations.

This is no easy task, but in this article I am going to share some of the things I have learned from discussing, designing and executing machine learning projects with a variety of clients and managers. Hopefully there will be something in my experience that you can apply to your own work!

WTF is AI, WTF is ML?

It is so important not to go in all guns blazing when explaining what may be a complex solution to a client. Focus on the high level concepts, what data you are using and, most importantly, if and how it solves their problem.

The best place to start with someone who has heard only tangentially about machine learning or AI is to try and define it for them. The key is not to go all heavy in jargon like these from wikipedia:

In computer science AI research is defined as the study of “intelligent agents”: any device that perceives its environment and takes actions that maximize its chance of successfully achieving its goals.[1] Colloquially, the term “artificial intelligence” is applied when a machine mimics “cognitive” functions that humans associate with other human minds, such as “learning” and “problem solving”

Machine learning is a field of computer science that uses statistical techniques to give computer systems the ability to “learn” (e.g., progressively improve performance on a specific task) with data, without being explicitly programmed.”

That’s not to say there is anything wrong with these descriptions, they are just a bit … academic. Some of the ways I’ve tried to explain machine learning and AI to clients is by saying something like the following:

You can think of the field of AI as simply the study of how we make computers behave, act and solve problems like humans or animals. Machine learning is a subset of AI where algorithms don’t have to be programmed with hard coded rules (‘if this is the case, then do that’) in order to solve a problem but they work out how to solve specific types of problem through exposure to data.”

Now admittedly this is quite similar to the above, but I feel that it’s a bit less intimidating for a non-scientist or someone new to the field (as most business managers and clients are likely to be!).

Another great tactic is to give examples/concrete use cases. For example, imagine you want to predict the number of umbrellas that you are going to sell in a shop because you want to make sure you have enough stock. You have a look at the data and it’s clear that when it rains, more umbrellas are sold. So you hard code a rule in your system that says ‘if weather forecast predicts rain, order 100 umbrellas’. That’s a very basic way to solve the problem but a client will clearly understand this as your “baseline”. You can then tell them that if you wanted to do this with machine learning, you take the data and tell a machine learning algorithm that the number of umbrella’s is the “target” and the other data are what can be used for predicting this target. The algorithm then takes in the data and produces a model so that when you feed it similar data to what you’ve fed it before (for example the day of the week, the weather forecast and how many umbrellas you sold over the past week) then it makes a prediction with a given accuracy. The first is you hard coding a solution, the second is a machine learning or data science solution.

This is a bit contrived, but I feel that a concrete example like this covers a lot of technical topics, like “targets”, “covariates/features”, “training/testing”, “lift” and even “autoregression” without splattering jargon everywhere. An example like this can be used in many contexts, and most people will get the transferability to any other prediction problem.

Can we get one of them AlphaGo’s? Managing expectations

The next thing you have to do is educate your client or partner on the reality of all of this cool capabilities. A lot of people will have seen AlphaGo beat Lee Sedol or computer vision software successfully count the number of faces in a crowd and think that your problem must be easy. It is very rarely the case.

To manage expectations, just tell the client what you think is feasible given what you know about their data and set up. If you have successfully completed projects with similar starting points before then you are onto a winner, since you can draw quite heavily on this experience and use it as an excellent example. Don’t panic if you haven’t though, managing expectations is still very doable.

First, always make sure people are aware that machine learning is really centred around doing one of the following:

  1. Classifying something — telling you what something is,
  2. Predicting something — telling you what is likely to happen,
  3. Grouping something — pointing out things which are similar.

The optional 4th point to add to this list is ‘Solving something — acting intelligently to achieve a goal’ (read ‘reinforcement learning’), but if the client is new to ML this could create more confusion than is necessary at this point.

Using these stripped back and simplified definitions of classification, regression and clustering then the client can hopefully see a bit more clearly mind than what ML is actually useful for, and they can reign in their expectations accordingly. They can also then hopefully see (with your guidance) that if an algorithm is good at classifying something (e.g computer vision counting faces), then it doesn’t mean the same algorithm can ‘predict something’ (forecast umbrella sales). This helps to highlight the fact that its ‘horses for courses’ when it comes to ML and there is ‘no free lunch’.

Secondly, always bring it back to the ultimate goal, which is to solve a given (business) problem for the minimum amount of investment (time, energy, money). If it is not going to be necessary to predict the number of umbrellas to 99% accuracy every day then it isn’t even worth thinking about. Reiterate the Pareto principle that in many cases ‘80% of the effects arise from 20% of the causes’, so past a certain point you’ll only get small gains for a lot more effort.

Finally, to help reign in expectations, it is sometimes important to highlight that when some company makes a big announcement about some new amazing machine learning system ,they are only showing you the sparkling whites and not their dirty laundry. Any of these highly publicised systems (computer vision as a service systems from cloud providers are one particular case) will have areas where it doesn’t apply, can produce erroneous results and often will have been the result of an army of people with a lot of resources focussed on producing this one particular tool. This doesn’t mean you can’t solve your client’s problem, it just means that they have to be aware that machine learning projects are like any other project, more ambitious goals will require more resource. It’s that simple.

We Are Stardust

Article originally published at

The human body consists of around 37.2 trillion cells, each made up of different kinds of molecules, and each containing several different types of atoms that are categorised into elements. These elements, built into molecules like DNA, RNA, enzymes, proteins, haemoglobin and others, constantly execute an array of processes within your body that keep you alive and functioning.

But where do all of these building blocks come from? The answer to this question may seem somewhat surprising. The simplest elements in the universe can be traced back to the Big Bang itself, but the majority of the elements inside our bodies can be traced back to processes that occur inside stars. We are all stardust.

Stellar Nucleosynthesis

Stars are huge thermonuclear power plants that release vast amounts of energy into space, mainly through the fusion of simple elements into heavier elements. For stars with a mass up to one and a half times that of our sun, the main process is the fusing of hydrogen to form helium. Energy released in this process counterbalances the effect of gravity such that as long as the star has hydrogen to burn, it does not collapse.

This process of nuclear fusion occurs in most stars over periods spanning billions of years. Our Sun has been burning hydrogen for around 4.5 billion years, and we estimate that it has about another 4.5 billion years of fuel left. Although the main nuclear reaction occurring in the star produces helium by fusing hydrogen atoms, sometimes the reaction goes further. In the core of stars with masses close to that of the Sun, helium atoms can fuse together to create beryllium, which can then fuse with helium to create carbon, the most important element for life on Earth. Heavier stars (more than eight times the mass of the sun) can create even heavier elements, such as the calcium and iron that are integral for your body to function.

Stellar Death, Terrestrial Life

As a star runs out of fuel and reaches the end of its life several things may happen, depending on its mass. If a star is large enough (about greater than three times the mass of the Sun), after it has used up its hydrogen fuel it begins fusing helium in a cooling, expanding outer shell. These ‘Red Supergiants’ continue burning for around a million years or so before instantly collapsing under their gravitational interactions. This collapse causes one final rebound due to energetic interactions within the core and the star explodes into a spectacular ‘supernova’, throwing elemental products out into interstellar space.

Smaller stars (of about the same mass as the sun) also expand as they use up their fuel. However, the end of their lives is a much tamer affair as they shed off their outer layers into a ‘planetary nebula’ – a cloud of dust that surrounds the core.

The dust that is left in the aftermath of stellar death contains a wide variety of elements, including those very heavy elements produced during the end stages of the star’s life. This interstellar debris then begins to collect under its own gravity: swirling, colliding and clumping together to create large pockets of gas which will eventually collapse under gravity to produce a new star. The heavier elements will similarly collect to produce rocky material and eventually form planets like the Earth. The elements that were created inside the star and expelled at the end of its life then reside throughout the planets formed. The majority of the time, these elements will have combined to form complex compounds, found as minerals in the Earth’s crust.

As life evolved on this planet, it used the raw materials in these compounds to build sophisticated biological systems. Fast forward approximately 4.5 billion years and you have the huge cornucopia of plant and animal life that we observe on Earth today, including ourselves. So whenever you think of the origins of life on this planet, and think of the origin of the parts that make up your own body, remember that you should thank your lucky stars that you are here. Literally.

Images: Tycho Supernova Remnant (NASA).

Sun, Waves and Carbon - Quick Points on Energy in 2018

A quick look at some of the trends and issue to watch out for in 2018 in energy and environment:

Solar Power

Solar power has been expanding rapidly these past couple of years due to advances in technology and uptake meaning that it is now cheaper than traditional fossil fuels . In fact, the drop in price of solar (and wind) energy infrastructure has been such that a study in late 2017 pointed out that it is actually cheaper to install new solar and wind energy that it is to run (already built) coal and nuclear power plants.

Projections for 2018 suggest that this positive trend will continue, with new  global solar installations expected to exceed 100 GW for the first time ever in 2018, with China dominating demand.

I also have to mention that it looks like the first commercial distribution contract for perovskite solar cells (which my PhD is on) has been signed between Saule technologies and Skanska group. This is an exciting step forward for a technology with huge potential which has continually had major questions asked about its commercialisation potential.

Wind Power

Although wind power often gets lumped into discussions about solar (I committed this same sin in the previous paragraph) it is important to note that the wind energy sector is different and has its own challenges and opportunities.

Among the opportunities are exciting developments like a report from the Global Wind Energy Council in Oct 2017, which suggested that wind could account for 20% of global energy capacity by 2030. There have also been some ambitious projects proposed like the super-sized North Sea wind farm Dutch Power are looking to build, with a possible generating capacity of 30GW and complete with its own artificial island.

I personally feel that the growth of offshore floating wind farms will be a very interesting trend, as explained in further detail in this report by Willis Towers Watson, a huge amount of potential wind energy is located above deep sea locations. For example, that report states that

"80% of the offshore wind resource in Europe is located in waters deeper than 60 meters and has a potential capacity of 4,000GW."

As a Scot, I'm also proud that the first offshore floating windfarm (a 30MW project run by Statoil) was opened off the North East coast of Scotland in Oct 2017. It will be exciting to see more projects like this come online both in Scotland, Europe and the rest of the world in 2018.

Carbon Trading

Finally, as I am currently reading "Earth: The Sequel" by Fred Krupp and Miriam Horn , which is an interesting though slightly outdated look at different enterprises in renewable technology and argues heavily for a carbon cap and trade scheme, I thought I'd finish with a point on carbon trading in 2018.

As this brief article on the David Suzuki Foundation website highlights, there are two clear ways to incorporate environmental damage due to release of carbon dioxide (or indeed other greenhouse gas emissions) into our current economic model that do not require governments attempting to choose specific technologies to back through subsidies: a carbon tax or a so called "cap and trade" scheme.

In a carbon tax model, every unit of CO2 emitted is taxed at some fixed rate. For example, in Sweden the rate is currently $150/tonne of CO2 emitted. This directly discourages the burning of fossil fuels and other activities which emit greenhouse gases and therefore stimulates the growth of the renewable sector. Of the two models, this is the easiest for governments to implement.

In a cap and trade system, the government sets an 'emissions ceiling' which the entire economy must fall below. Emissions quotas are then divided out among potential polluters, for example through auction, and polluters cannot exceed these quotas. If they do then they must buy pollution quotas from other parties who have spare quota to sell in order to cover the difference. As time progresses the government successively lowers the cap, thus reducing the overall emissions produced by the economy. This encourages polluters to reduce their carbon emissions so that they can potentially sell there remaining carbon quota on the market, the market of course also acting to set the price of these quotas. The cap and trade scheme allows businesses the freedom to choose how they reduce their emissions whilst also providing a direct economic incentive to do so.

Of these two I like the idea of cap and trade systems best, as the cap itself provides a certainty about the total amount of greenhouse gas emissions that will be emitted. To my mind this is the clearest way to lower carbon emissions as in line with the reductions agreed to in the Paris Climate Agreement.

Due to my interest in this, it was exciting to hear that China are moving to introduce a carbon cap and trade scheme which it is believed could reduce their peak emissions timescale from 2030 to even earlier. Since China having its peak emissions by 2030 or earlier will be key to the world meeting the Paris Climate Agreement targets of less than 2 degrees warming above pre-industrial levels, I think this is great news.

How did Newton know it was an inverse square law?

I passed a sign in Glasgow today** that told me I was on "Newton Street". I've passed it hundreds of times on my way to the Mitchell library, which I've been frequenting a lot as I race to finish my PhD thesis, and never noticed it before. This got me thinking about good ol' Isaac and his phenomenal contribution to our understanding of gravity. As a physicist, Newton's laws and theory of gravitation are among the main first lessons you learn at University (and even at school). Specifically, we learn that the force between two objects with masses M and m is proportional to the product of these masses and inversely proportional to the square of the distance between them, or in mathematics

Now, the more I think about this formula, the more something puzzles me. I can understand the supposition that the force is proportional to the mass of each object, it makes sense that a more massive object would provide more gravitational interaction than a smaller one. You could rationalise this from observing the solar system through telescopes since Galileo's day - larger planets have more moons and the Sun has everything in the solar system orbiting around it. And if you know it's proportional to some power of the mass, why not just assume the linear relationship (i.e no powers of 2 or 3 etc, I'm supposing this is how Newton's thinking went but the reasoning behind the linear dependence on mass may have been more subtle than this). But how did he know that the gravitational force followed an inverse square law? I think answering this question will be an interesting exercise in showing people how the scientific method works when applied to theoretical physics (I would argue that Newton's law of gravitation is the first example of pure theoretical physics that actually worked!).

Well, it turns out it seems that it's not too difficult to see where it comes from. The realisation that gravity came about from an inverse square law was through Newton doing the following:

1) supposing that gravity was universal, i.e the same law was responsible for an apple falling to Earth and for the moon orbiting the Earth and

2) knowing that he could rely on the most up-to-date observational data, which suggested that objects fell towards the Earth with an acceleration of 9.8 ms-2 and that the moon was accelerating towards the Earth at a rate of 0.00272 ms-2.  He also had to know that the moon was approximately 60 times further away form the centre of the Earth than the surface of the Earth was to the centre of the Earth.

Taking these two observations together Newton could just take the ratio of the two accelerations and observe that they are proportional to the relative distance squared

By the way it useful to note that taking a ratio like this is often a very clever idea, since it means that all the other stuff in Newton's law (which he didn't know yet!) cancels out, so he only needs to focus on the stuff he does know about (the accelerations and distances).

So this is a basic bit of theoretical physics (using your 'noggin' to work something out about how the universe works), but it is important to realise that Newton, and indeed all theoretical physicists, can't do this on their own. Remember, Newton had to rely on experimental data to feed into and check his reasoning. Theoretical physics without reference to experiment is not physics, it is just mathematics. This is important to remember, especially when you read articles in newspapers or popular science magazines about "genius theoretical physicists makes new discovery" - think Stephen Hawking, the people at CERN, Albert Einstein - they didn't, and couldn't, have done it without the most important thing in physics, experiments.

To continue this idea that theory isn't everything in physics, in a future post I will discuss how physics now has three "pillars", whereas before it had two,  theoretical, experimental and computational. Until then, Tschüss!

** Note: I wrote this aaages ago and forgot to publish it ... I'm no longer going to the Mitchell library every day.