Archive May 2010

The first mathematical model for cow behaviour (I kid you not) aimee whitcroft May 25


Apologies for the slightly dodge agrarian pun in the subject line.

Coupled cows not displaying synchrony (perhaps due to their youth?)

Coupled cows not displaying synchrony (perhaps due to their youth?)

Reading the headline for this, however, has had me hanging onto my chair in hysterics for the last 5 minutes (a long time, believe me).  And, given the extent to which kiwis care about cows (and their climbing numbers here), it was, I thought, something to be shared immediately.

So, on to details!

The paper in question aims to explain, and predict, how it is that cows lie down/stand up* in synchrony.  Something, apparently, that they do, space and resources allowing**. Now, synchronous behaviour amongst beasties (including bacteria) is hardly unusual, but no one had attempted it with beasties of the bovine persuasion before, and so this behaviour wasn’t well understood.

And how have they achieved it?  Simple.  They treated cows like oscillators***.  Oscillators, as the name implies, oscillate between two states. On an ongoing basis (think sine wave).  If applying this logic to our dairylicious friends, it means treating cows as either standing up, or lying down, and doing this in cycles.  And they are then coupled, which doesn’t necessarily involve watching them do, um, documentary type things, but instead means that they are more likely to stand up or lie down depending on the behaviour of the cows around them. Or, to put it another way, the authors took their single cow equations, turned them into coupled cow equations, and then used those to construct networks of interacting cows (herd equations).

And they put in place some assumptions.  For example, they posited that a cow watching others around it standing and eating, might feel peckish too (in the same way that, no matter how unhungry you are, you will still nick someone’s chips).  Conversely, it might feel compelled to have a lie down when its herd-buddies do.  Certainly, it assumes that space is unlimited – i.e the cows are living a kiwi lifestyle, not an intensive-farming lifestyle.  The authors were at pains to point out, however, that these constraints are not necessary, and that it would be interesting to consider other options, as well as comparing the model’s predictions to real behaviour (apparently such observations are under way).

Using the constraints mentioned, however, they found that high degrees of herd synchrony don’t necessarily accompany strong coupling.  Certainly one can see the benefits inherent in an entire herd not, for example lying down (the better to see predators, my dear).

Happily, the model could also be used to understand synchrony in other ruminants.  Hooray :)

And, as a final note****, the authors end with:

Milking these ideas as much as possible should prove to be very insightful from both theoretical and practical perspectives.


Anyone have any good cow herd stories to share? Or want to go play in fields with herds of them testing the maths?


As usual, there’s a fun arxiv article on the subject, and the paper can be read here.  The article does contain the fascinating tidbit that happy cows are more likely to act synchronously.  Hmmmm.  It’s certainly a very clear way of measuring their quality of life, albeit an amusing one.

* I blame this hyperlink on a friend to whom I am introducing Radiohead (yes, gasp).  It means I have ol’ Thom stuck on the brain at the moment.

** Not being agrarian, this was news to me.  Imagine my embarrassment to find I was not in possession of a well-known fact.  They stand to feed, and lie to ruminate (which latter phrase sounds suspiciously philosophical).  Both stages are necessary.

*** A piecewise affine dynamical system.  If you know what that is, I am most impressed.  I have no idea.

**** For another fine example of people being humorous, see my post on teapots and fluidic dynamics.

UPDATE: I just noticed another fine piece of sciency humour (in the arxiv article):

On the other hand, cows are so highly bred that it would hardly be a surprise if they had lost the ability to protect themselves from natural predators. That’s a topic ripe for rumination by a suitably interested PhD student.

* head smack *

A very different form of mining… aimee whitcroft May 18


I came across this last week, and thought it was certainly an interesting way of addressing New Zealand’s mining issues.


The conversation around whether, and if so to what extent, New Zealand should mine its national parks for mineral resources is a heated (haha) one.  And, I might add, not one into which I’m going to assert myself.

Now, someone* has gone and suggested another way that New Zealand could benefit from mining but, wait for it, without having to open ground at all.  How, you say?  By water mining.

Yes, dear readers, you read that correctly.  Water mining.  Now, I know the term evoked for me images of men with shovels**, down shafts, trying vainly to lift water.  Or something.  But it’s not that at all.  Instead, it basically means harvesting the inevitable product of cloud seeding – water.  And, certainly, atmospheric moisture which could be turned into rain/snow is something of which we’re not short.  Not at all.  I live in Wellington, and sometimes would be quite happy if it were less…precipitous…here.

So how does cloud seeding work?  Well, it’s something humanity’s been playing with for a while now.  I won’t get into some of the mad conspiracy theories about Soviets/Americans and secret programmes, but the science itself has been around for a few decades.  There are different ways of doing it, but one of the ways we kiwis would consider is through the addition of small amounts of silver iodide crystals into the high bits of clouds, where water droplets are hanging about at less than zero degrees C.  Apparently, said addition triggers a reaction which makes the droplets freeze – they then begin to fall, turn back into water on the way down, et voila!  Rain.  Or, possibly, snow if they hit a mountaintop on the way down.  Either way, it’s accessible precipitation.

You can also use dry ice, which works slightly differently: it cools the surrounding air so quickly that water vapour reverse-sublimes straight into ice.  Hoo-har.  It should be mentioned that existing water droplets are still needed, though, to ensure the ice crystals can grow large enough for them to descend from the heavens.

And cloud seeding can be done either by aircraft, or from the ground.

Of course, this sort of technology can also be used to suppress fog and rain.  This is important for airports.***  )r the opening ceremony of 2008′s Olympic Games in Beijing.

Anyhoo, back to thoughts of using it here.  It might well work, for example, in the Southern Alps to increase Canterbury’s water supply (good for irrigation and energy production).  And we needn’t, according to  Assoc. Prof. Bardsely, worry that it would decrease Canterbury’s winter rainfall.

Issues to consider?  Well, primarily the safety aspect of it, to be honest.  Silver iodide is a pretty toxic substance, but it’s only harmful if encountered in an intense or continued fashion.  Chronic exposure doesn’t count, apparently. And studies looking into its accumulation in the environment haven’t been able to pick up anything above normal background levels.  Our neighbours over the Tasman are experts on this, it would seem, as they’ve been using cloud seeding for some time, and so have been studying its effects.  The verdict of peer-reviewed science as to its danger?  It’s fine.****

So, an interesting idea!  And it does sort of make sense – given that we have a natural resource in abundance, and one which is unlikely to run out soon (in fact, climate change scenarios suggest parts of NZ might get wetter and wetter) and requires no breaking of ground, perhaps it’s something to be seriously considered.


And no, I’m not pleased that Wellington’s going to get colder and soggier.  Luckily this is a brilliant city despite that.


*Associate Professor Earl Bardsley, of the Department of Earth and Ocean Sciences, University of Waikato

** Or spades.  Shovels might work marginally better, though

*** Although clearly it was not in use the morning I got fogged in at Hamilton airport. For a while.  Very sleep deprived.  Hurrah for Foyle’s War and my netbook…

**** Well, according to the Weather Modification Association

Art and science – a good pairing? aimee whitcroft May 14


Would the metaphorical offspring of art and science be better than their parents, mediocre, or oxygen thieves?

seed cathedral

The very beautiful Seed Cathedral*

This is the basis the discussion currently being held on the New Scientists website (yay, you guys are awesome).  They’ve written not only an editorial on the subject, but assembled the viewpoints (with more still to come, I believe) of a unmber of extremely interesting people who might have a viewpoint on the subject.

My first thought when I came across said series was ‘well, art and science haven’t always been separate from each other’.  Mr Da Vinci of course sprang to mind, but many other scientists/artists have been able to legitimately use that forward slash.

Yes, things are a little different now, but overall I’m glad to see the two getting into bed with each other.  There’s much that each can learn from the other, and I firmly believe that if properly done, the resulting works could be far more than the sum of their parts.  It might also help address the issue of science becoming increasingly complicated (and complex) just at a time when public understanding of at least its basics is vital to the decisions we make as societies.

Of course, some of it will also be relatively vacuous, but maybe that’s ok, too.

Anyway, what are your thoughts?

*Curious?  Here’s a BBC news vid about it…Also, what wouldn’t you give to be at the Shanghai expo right now?

Cows up, sheep down aimee whitcroft May 13


Statistics New Zealand’s just released its figures for New Zealand’s agricultural production to June 2009.

cow - black

The overall message? Dairy cows are up 5% to almost 6 million, with a particularly big increase in the South Island.  On the other hand, sheep are down 5% to a little over 32 million: half their peak 1982 level of 70.3 million, and now at levels last seen in 1948.

Happily for wine lovers, we’re also increasing the amount of land we’re using to grow wine grapes – a 13% rise since 2007, to 33,400 hectares.

Other interesting numbers? Beef cattle numbers are relatively stable, while deer numbers are dropping.  We’re also not replanting (in terms of forestry) as much as we were last year.  However, we did produce more wheat and barley and maize than in 2008 (yay), and kiwifruit plantings and exports are up as well.

For a lot more detail, have a look at the full release below.  The numbers themselves can be found on the website, for anyone who might like to play with them.

Smart agents for smart grids: an application of game theory aimee whitcroft May 12


No, it’s not a reference to spies who can park well.  Or something.

power lines 1

It’s about electrical smart grids.  And how we might get the best out of them.  But I think some explanation is in order first – hell, I know I had to do some research before being able to explain it…

Firstly, what is a smart grid?  Well, it’s not like a smart meter.  Smart meters, the subject of much discussion in the first world, basically enable the consumer to get more detailed information about their power (or gas or water) consumption than has previously been possible.  Ideally, smart meters can also communicate this data to meter data agencies and service providers, and even directly control the electrical devices in a home, all with the aim of trying to reduce consumption and slow the increase in power (and other resource?) prices.  And lower emissions, obviously.  Looking at the Wiki entry, as one does, there’s an interesting example of how this works occurring in Italy, which I’m going to be lazy and quote directly:

The world’s largest smart meter deployment was undertaken by Enel SpA, the dominant utility in Italy with over 27 million customers. Between 2000 and 2005 Enel deployed smart meters to its entire customer base.

These meters are fully electronic and smart, with integrated bi-directional communications, advanced power measurement and management capabilities, an integrated, software-controllable disconnect switch, and an all solid-state design. They communicate over low voltage power line using standards-based power line technology from Echelon Corporation to Echelon data concentrators at which point they communicate via IP to Enel’s enterprise servers.

The system provides a wide range of advanced features, including the ability to remotely turn power on or off to a customer, read usage information from a meter, detect a service outage, detect the unauthorized use of electricity, change the maximum amount of electricity that a customer can demand at any time; and remotely change the meter’s billing plan from credit to prepay as well as from flat-rate to multi-tariff.

Smart meters/smart metering are also being rolled out in Japan, Australia, the UK, US, Canada, Netherlands, other Nordic countries, and even here!  Yay!

Right, so that’s smart meters.  They, in turn, are part of (but can’t entirely compose) smart grids.  Which also have other fun names, including, apparently, FutureGrids! (I feel compelled to say that in a superhero voice).

Admittedly, most people probably wouldn't be using a Tesla*

Admittedly, most people probably wouldn't be using a Tesla*

Another important part of smart grids are storage devices.  Means of storing electricity so that it can be used when most appropriate.  On a house-by-house basis.  Such storage devices could take a number of forms.  Electric or hybrid vehicles have been proposed as one means of storing electricity, in what’s sometimes called, originally, ‘vehicle to grid’.  Ideally, the devices would be able to store electricity for long periods of time, and go through oodles of charge/recharge cycles without a significant degradation in performance.

The point of all this?  Well, it would help mitigate peak hour usage, obviating the need for as many “peaking plant” generators, which are expensive and carbon-intensive.  So this would cut costs and emissions. Also, and as anyone who uses renewable electricity knows, it would help smooth the process a bit, allowing excess renewable energy to be stored for times when the wind dies/streams (or whatever) are low, etc and not enough renewable energy is being generated.  This would be great not only for individual homeowners who make their own power (and currently use car-type batteries and the like), but more important, would mean that renewable energy could be more easily spliced into the grid.

There are problems, of course.  The load on the system which could be caused if too many of storage devices come online at the same time to recharge could be immense.  It would raise costs and carbon emissions (back to the whole ‘peak’ thing), and could potentially even overload the system, causing blackouts and grid damage.  Other issues are the cost-effectiveness of the storage devices themselves, and whether they might drive electricity prices low enough to mean that storing power would be more expensive than simply draining it off the grid.  In other words, storage might actually be unprofitable if not managed properly.

So, how to address this?  Well, with smart agents, of course!  They’re already used in stock markets** and in managing crisis communications.  And they could very useful here.  In essence, they’re pieces of software with the ability to make certain decisions on their own.  Hence the term ‘agents’.  The code/software would be installed into smart meters, allowing them to manage the storage, usage and even purchase of a home’s energy.  They could look at weather forecasts to adjust a home’s heating/cooling.  They could make decisions about which the best price plan is to use for the home’s needs.  Etc.

Now, work has already been done looking at how this cleverness could be used to achieve optimum consumption in individual homes.  What no one, up until now, has done is to look at how multiple homes operating smart agents and storage devices (and hence forming a smart grid) would interact together and affect each other and the entire grid.    Sounds like a game theory situation?  It is.

Researchers in the UK have looked at a scenario in which homes outfitted with storage devices and smart agents capable of deciding when to purchase electricity would interact with, and affect, the UK power grid.   In their words:

Using this framework, under certain assumptions, we are able to predict the behaviour of the system given that each agent behaves rationally (i.e. always adopts a storage pro file that minimises its costs) and only reacts to a price signal. Building on this, we then go on to devise intelligent agent-based storage strategies that can learn the best storage profi le given the market prices that keep changing as a result of consumers using storage.

Specifically, they posited that Nash equilibria could be used to do so.  Nash equilibria are achieved when all the players in a system know each other’s position, and it benefits no one to change their position without getting others to as well.

Nash, by xkcd

'Nash', by xkcd

Now, I’m not going to get into the details of the maths and the scenarios they posited.  Why?  Because I’m not a mathematician, and I’d rather not try to explain something, than explain it incorrectly.  Particularly mathsy stuff.  But the conclusion was simple: a Nash equilibrium can be achieved and, in the UK, at least, ownership (and appropriate agent use, of course)  of a 4 kWh storage device by some of the population would be great.

Why only some?  Well, there’s a point at which individual motives – to save on power bills – aligned best with ‘social welfare’ motives – to cut costs and reduce carbon emissions. Ownership by more than this percentage of people reduced savings to the point where it became cheaper not to store than to store.

The final figures?  Ownership at 38% would yield savings of 13% (on average), and final overall savings of £1.5 billion annually…

For me?  I’d be curious to see if anyone in NZ would run the model here and share their results.


Agent-Based Micro-Storage Management for the Smart Grid, Vytelingum, P., Voice, T. D., Ramchurn, S. D., Rogers, A. and Jennings, N. R. (2010) Agent-Based Micro-Storage Management for the Smart Grid. In: The Ninth International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2010), May 10-14, 2010, Toronto, Canada. (In Press). Nominated for Best Paper Award at AAMAS 2010.

Paper available here.


* Tesla electric cars.  Very pretty. Very fast.  Very expensive.  Lustworthy, basically.

** I realise that may not necessarily be their strongest point

In honour of Friday drinkies aimee whitcroft May 07

No Comments

It’s about that time, of that day of the week.  I refer, ladies and gentlemen, to the hallowed tradition of imbibing alcoholic beverages at day end on a Friday (well, in the Western world, at any rate).


All over New Zealand, people are happily clutching (or soon to be clutching) flagons of beer, pitchers of wine, and schooners of cocktails.  And it is the last to which I shall devote this post, having previously spoken of beer (with wine no doubt soon to come).

I have no research in particular to share, but rather a picture, some wisdom, and a reference for where to go for something quite special.

First, the picture.  Or, to be more precise, schematic.  And who couldn’t find themselves falling instantly in love with this splendidly elegant alcoholic jaunt?  Not me, dear readers, not me.

Apologies for its being a little…skew.  Not my fault.  I will also embed the image itself as soon as slideshare decides to play with… [UPDATE: as you can see, it played long.  Hooray]

Right, moving on!  From the fantastic science blog Cosmic Variance, what can only be described as a treatise on what does, and does not, constitute a real martini.  It changed my martini habits for the better, and will most certainly yours as well.  If nothing else, it’s fun terrifying bartenders by being, you know, discerning (and traditional) about this drink.

Finally, a reference.  For those who like cocktails, there are two lovely spots in Wellington.  The Library and Chow, on Courtney Place and Tory street respectively (and sharing an interleading door).  Very different spots with very different feels, but both are highly recommended.  The earl grey martini a friend introduced to me (made at Chow) is a wonder to behold, and even better to actually drink.

And with that – happy Friday to all, and to all a fun night!

Germs, germs, everywhere (but what is one to think?) aimee whitcroft May 06

1 Comment

Having very recently been laid flat with an entree of pharyngitis and a side order of tonsillitis, I thought I’d attack again the subject of germs, viruses and bacteria.

blank mask

Note: Anyone with a microbiological background may well want to skip this post:  it’s aimed at the non-experts among us.  You know, the people at whom all those terrible anti-all-lifeforms-in-your-home ads are aimed :)

So yes, a primer!

bacillus with flagellumBacteria

First up: bacteria.  Bacteria are tiny little single-celled beasties which live, literally, everywhere.  If you’re interested, read up on extremophiles sometime.  Having studied them for a number of years in university, I can vouch for just how interesting they are, and how fun they can be to play with*.  They aren’t anything much like the cells of which we’re comprised, though.  A small list:

Bacterial cells    /    Human bean cells

  • No membrane-bound nucleus    /    Membrane-bound nucleus
  • No mitochondria (or chloroplasts)    /    Mitochondria (or, if we were plants, chloroplasts)
  • One chromosome    /    23 pairs of ‘em.  Oh yeah!
  • Flagella! (sometimes; used for moving about etc). Very clever little molecular motors eagerly studied by scientists   /    Feet.  Legs.  Arms. Hands.  Y’know, limbs.
  • Make more by duplicating themselves asexually (generally)    /    Make more by doing things which might well make your grandma blush

There’s a whole lot more, too, but by now I think you’re starting to get the fact that not all cells are created the same.  As it were.

Now, some bacteria make us sick.  It’s important to note (and I’ll come back to this shortly) that many don’t.  In fact, many bacteria are quite awesomely beneficial.  To the point where I am tempted to break out me pompoms.

In terms of the bacteria that make us sick – well, we have the bacteria which cause pneumonia, tuberculosis, meningitis, strep throat, typhus, sepsis, and a bunch of other fun ones. Most make us sick by secreting chemicals we find toxic.  One type causes extreme diaorrhea by exploding our gut cells and eating the cell contents (nom nom). Pivotally, it’s bacterial infections which are treatable by antibiotics, assuming the disease hasn’t become drug resistant, as in the case of some forms of TB in my country of origin (SA).

Amusingly, of course, antiobitics themselves are made from a particular type of bacteria called the actinomycetes.  The blue mould on your bread?  That’s one type, yes.  Having grown many of them, I can vouch for them coming in blues, greens, yellows, pinks, and a fluffy black type that hung out at the edge of the petri dish away from all the others.  Hehe.

And for the good ones? I thought I’d throw in the fact that the first line of defense in your immune system are the bacterial colonies which cover your skin.  They’re the good guys, keeping the bad guys off you.**  And here’s where I shall have a small rant.  This is why you shouldn’t cover yourself, your children, and everything in your home in antibacterial stuff!  I mean, good grief, people!  Firstly, you’re killing some of the good guys as well as the bad guys.  Secondly, a few of the bad guys around is good for the immune system, particularly of children.  Children who live in bacteria-free environments become very sickly adults.  Seriously.  Instead, have them go out and eat potting soil or something (I did, in Africa, and have the immune system of an ox for the most part). Finally – you’re probably helping to build superbugs. Well done.

* ahem *

avian flu virusViruses

Now, feeling slightly calmer, I’ll move on to viruses.  These are completely different from bacteria.  Totally.  For one thing, there’s still some fairly amusing debate going on concerning whether they can be classified as ‘alive’ or not.  They’re not cells.  Instead, they’re little…entities…made up simply of genetic material in a coating of some sort and available in shapes to suit every taste.  They’re generally found floating around in the air, water, bodily fluids or on surfaces, and like to get inside cells to cause havoc.  There are many different types of them, and they all do different things inside cells.

It’s important to point out that infecting cells is what viruses do.  It’s how they survive to make more of themselves. Unlike bacteria, they are unable to survive out in the real world (although some can persist for quite a while).  Luckily, not all of them make their hosts sick or kill them.  In fact, that’s what the silly viruses do, as they’re killing the thing which allows them to keep replicating and survive.  Clever viruses learn to live in the cells of their hosts and replicate indefinitely, without ever causing significant damage.  Like clever parasites.

Among those that make us sick, perhaps the most topical disease they cause at the moment is flu.  And HIV. And, of course, the ‘we still don’t have a treatment for it!’ common cold.   And gastro.  And cervical cancer. And, well, thousands of others.And they make us sick, like viruses, in a number of ways.  They might, as in the case of malaria, get inside a cell, replicate wildly, and then cause the cell to explode to release viruses which can then move on to affect other cells.  Mmmmm.  Or, like HIV, they can fundamentally interfere with our immune cells’ function, rendering us vulnerable to other diseases.  Or, they can irritate our bodies enough to cause a fever and the release of all sorts of fun chemicals which are what actually make us feel so awful (as in the case of colds).  You heard me – the horror caused by the common cold is mostly caused by our own bodies.  Yay.

Now, we don’t have treatments for most viral diseases.  Viruses are tricky to kill, ladies and gentlemen.   Some mutate very fast.  Some hide, almost imperceptibly, in our cells.  Far better, if one is worried about a virus, to warn the immune system about it so that the immune system can then repel any attempts at invasion.  This is what vaccination and immunisation do.  Importantly, and this is something to watch your GP about sometimes, antibiotics don’t work on viruses! The best thing when you get a viral disease is lots of sleep, fluid and, if you like, you can treat some of the symptoms.  Unless it’s a really serious viral disease, in which case there are sometimes anti(retro)virals available.


Finally, ladies and gentlemen, I would like here to proffer the information that, in fact, there’s no such thing as a ‘germ’.  Not in a specific sense. Rather, germs are an extremely informal term for pathogens.  And what are pathogens, one might ask? Well, it’s the group name for bacteria and viruses (and other things like prions***, and some fungi, protists etc) which make their hosts (eg. us) sick.  That’s been italicised because, gasp, many of these lifeforms don’t, despite what the advertising industry might have you believing.  Or, they may affect their host, but in a way which we like – I’m thinking about botrytized wines here.  Of which New Zealand has some lovely ones…

Fever! (Fever when you touch me…)

Just a final thing I thought I’d throw in.  So what causes a fever?  And why is it generally a good idea to let it run its course?  Well, your body is a little bit smart about things sometimes.  Most of the pathogens which are able to infect us and make us ill are temperature sensitive, and attuned to our normal core body temperature of 36.5—37.5 °C.  When our body senses that armies of bad guys are marching into our systems and breeding, they allow our core temperature to rise in the hopes of killing the beasties.  A biological game of chicken.  The very opposite of a cold war.  Etc.  Of course, we tend to die as well if we get too hot, and our bodies don’t have an automatic cut-off switch for stopping the fever when this happens.  Which is why it’s a good idea to let a fever run on (and hopefully break), but a very good idea to get to a hospital fast if you get to 41.5 °C.


* I really heart playing with petri dishes…

** They’re also the reason why we all smell different to each other – each person has an absolutely unique skin chemistry and immune system, which in turn affects the precise mix of bacterial colonies living on their skin.  These little beasties are a large part of why we smell the way we do.  Further…ever found someone to smell irresistible (without perfume/body wash scents etc)?  Well, it means that you and they have very differently structured immune systems.  This is good for any babies which could come from the union you’re now very tempted to engage in.  So be warned :)

*** Prions are madly interesting.  They cause Bovine Spongiform Encephalitis (BSE).  How?  They’re little warped proteins that go around persuading other proteins to warp.  Like tiny little revolutionaries bent on the destruction of the system…

Network-wide options by YD - Freelance Wordpress Developer