Sleep Hacking on the Rocks

Tuesday, October 18, 2011

Since my first night with Zeo, I've learned a few things. My first week of data was confusingly all over the place, until I realized that I probably had the headband too loose. I ended up discarding that data and starting over again, so I've only got two weeks worth of information so far. Still, it's enough to infer a few things.

First up, I'm learning a bit about the device itself. I think as an overall trend, it provides reliable information; however, it does seem to make the occasional mistake. A couple of times I've put on the headband and it's shown me in deep sleep within five minutes, which is unlikely unless I secretly have undiagnosed narcolepsy. Similarly, I'll sometimes wake up in the morning and it will show me in deep sleep for a period of time that I thought I was awake. These weird readings were intermittent, and it took me a while to figure out what was causing them.

Alcohol is supposed to reduce your amount of REM and deep sleep. However, Zeo's cause and effect graph shows me something apparently atypical:

That's right... apparently alcohol drastically increases my amount of deep sleep. My first thought was perhaps I just sleep longer after drinking, but another graph dispels that notion:

So, despite getting roughly the same amount of sleep with and without alcohol, I'm apparently spending a much higher percentage of time in deep sleep. Zeo's support centre says that deep sleep is "important for growth, restoring muscle and building immunity". Does this mean that I'd have stronger muscles and a better immune system if I got tanked every night? Somehow, this doesn't seem quite right. I'm more inclined to think that Zeo misinterprets my "drunk" brainwaves as "deep sleep", especially given the times I've been awake (and tipsy) and it's told me that I'm in deep sleep.

Does this mean that Zeo is completely inaccurate and useless for tracking trends associated with alcohol consumption? Not quite. The other portion of restorative sleep, the one stage that everyone's heard about, is REM. REM is when the crazy dreams happen, and it's also apparently responsible for organizing memory to better apply what you learn. Essentially, REM sleep is for mental improvement, and deep sleep is for physical. Now, let's look at what happens to my REM sleep when I drink:

Quite the opposite! I suppose it is possible that Zeo is misrecording REM sleep as deep when alcohol is involved, but I'd prefer to see it as a true negative impact. Certainly, my brain doesn't feel quite as limber and organized the next day after I've had a few, so perhaps there's something to these results. Then again, I can't say my muscles and immune system feel particularly improved either.

One thing I think I can accurately take from these results is that having 1-2 drinks has no statistically significant impact on my sleep quality. This is rather interesting, and something I will continue to pay attention to. It's possible that the results may level out over time, as there are far more nights of 1-2 drinks than there are 5+ (which, I believe, is a good thing!).

As an aside, I'm a dreaming machine. Without alcohol (or with only 1-2 drinks), I'm averaging 150 minutes, or about 38 minutes above average for 17-29 year old women. This makes sense to me, as I can't think of a night in the recent past that I haven't had memorable dreams. On the flip side, my deep sleep is a little bit below average for my age group, but not by much. In fact, for all my complaints about not sleeping well, I'm actually pretty average, since my schedule allows me to stay up as late as I need and then sleep in a fair bit. If I had to regularly get up early, I'm guessing my scores would drop significantly. One day, I will put that to the test, but not until I absolutely have to.

Sadly, I won't be able to collect the next 3 weeks of data... I'll be in Europe! Conferences are the best thing about grad student life. Or is it the flexible schedule?

MAF 2: Slowly Getting Faster!

Wednesday, October 12, 2011

4 weeks in to my low heartrate training, I did another Maximum Aerobic Fitness (MAF) test to figure out if all this slow jogging is actually doing anything. Despite my inconsistent schedule and up to a week between runs, my MAF pace definitely seems to be increasing.

The first time I did an MAF test was also the first time I tried to run at a heart rate of 149 bpm. While I reported 14:36 minutes per mile, I technically should have taken the average of my two mile test, which would be 14:39 per mile (every second counts, right?). That's extremely slow - a whole 9:10 minutes per kilometre, or an hour and a half 10K! I was a little unsure how I'd go about doing any kind of useful training at that pace, as it took forever to get any sort of reasonable distance. As a reminder, here's my previous MAF pace and heart rate plot:

First MAF Test

Fast forward 4 weeks to Thanksgiving weekend, and things are looking up. My average pace over a 3 mile run has come down to 13 minutes per mile, or 8:08 minutes per kilometre. A full minute faster, after only 60 kilometres of running and a couple of bike rides, is really quite encouraging. I finally feel like I'm actually running a little bit, as I'm definitely passing all the walkers on the path, but it's still an easy, comfortable pace that I feel I could sustain for quite some time.

Taking a look at the Garmin data gives me a few hints as to how this improvement is possible. As much as I'd like to think it's just development of my aerobic system, it seems like I'm just getting better at sticking to the right pace. During MAF 1, my average heart rate was only 146, suggesting that I erred on the side of caution when it came to staying below 149. MAF 2 has my average heart rate at 148 for each of my three 1-mile splits, so it seems that I'm getting better at being consistent and learning just how much I can push the threshold. You can also see from the graph below that I'm getting a bit better at maintaining a consistent pace, rather than speeding up and slowing down in response to a fluctuating heart rate.

Second MAF Test

With this apparent adaptation masquerading as improvement in aerobic fitness, I'm guessing that future MAF tests won't show quite such a dramatic improvement, and I've put up a little graph on the sidebar of this blog that will probably turn into a decaying exponential before long. However, I'm planning to stick with it, as it's fun and easy, and I can do it without coughing too hard. In fact, I'd like to declare a lofty goal:

By next summer, my MAF pace will be 6 minutes per kilometre (9:36 per mile).

"Will" is perhaps too strong of a word, but there it is, published on the interwebs for all to see. 6 minutes is about my maximum 10K pace, so if I could reach that at a nice easy 149 bpm heart rate, I'd be laughing. Now, all I need to do is make the time for enough running to bring about that kind of improvement.

The Douglas Fir Trail: Urban Dirt

Tuesday, October 4, 2011

Not far upstream from downtown Calgary, you'll find a tiny piece of modified nature called the Douglas Fir Trail. This 1.5 km chunk of dirt runs parallel to the pathway on the south side of the river, and provides a nice change of pace and scenery. It's no Grouse Grind, but at 2 km from my house, it has a certain appeal.

I haven't been posting much about low HR training, despite it being the ostensible reason I started this blog. Primarily, there really isn't much to say. I've done some runs, I've kept under my target heart rate, I still cough far too frequently. I believe I'm getting better at maintaining my slow pace, and I'm looking forward to doing my second MAF test to see if there's been any true improvement. However, I do have a secondary reason for not posting about running: I got yet another cold during the second week of this venture.

<rant>As my friend kindly pointed out the other week, for someone with a fairly healthy and active lifestyle, I tend to get sick a lot. I'm still haven't quite lost the cough from a summer of bronchitis, and I come down with a cold on top of it? It's not fair! I seem to get sick at least 4-5 times a year. I exercise, I try to get plenty of sleep, I eat lots of vegetables and whole grains, I don't dri-- well, maybe it's the drinking. </rant>

Rant aside, back to the Douglas Fir trail. Yes, it's only 1.5 km, but it's full of stairs, as I've tried to depict with my blurry cell phone photo. Trying to keep my heart rate below 149 makes this 1.5 km section take an embarrassing 20 minutes! You can see on the graph below where my pace starts spiking off the chart; I think my Garmin was reporting a few divide by zero errors as I slowly put one foot in front of the other to crawl up the stairs. The total elevation gain is rather pitiful, somewhere in the neighbourhood of 60 m, but it all happens at once so it ends up being a good workout - about the equivalent of walking up a 20 story building. I started trying to count stairs, but I'm not OCD enough and I lost count after around 170.

Each time I do this trail, I break the 149 heart rate rule a little bit more, and I think in the future I might give up on it entirely. Judging by the sweaty faces I see on the trail, I'm not the only one who gets out of breath, and it's much more fun to try to race up than it is to slowly plod. Besides, there's a nice spot at the top to take a break and admire the view:

All things considered, the Douglas Fir Trail is worth checking out if you're looking for some stairs, some softer footing, and a few minutes away from the city. According to the City of Calgary, there's even some 500-year old 2-metre diameter trees along this trail, though I've yet to see anything of the sort. Technically, the trail is 2.5 km long, but a portion of it is closed right now; perhaps that's where the big trees live.

Sleep Hacking, Night 1

Monday, September 26, 2011

There's a new gadget in my life, and it's like a Garmin for sleep. It's called a "Zeo sleep manager", and it's a fairly pricey, extremely dorky, and fantastic piece of technology.

I've always been bad at sleeping. I seem to require complete silence and darkness, perfect temperatures, no smells, and comfortable bedding; basically, I need sensory isolation, which is tough to achieve. As a result, I have a bad habit of lying awake at night tossing and turning, then sleeping late in the morning. As a grad student, I can usually get away with this, but TAing an 8 am lab last semester really convinced me that I need to start adapting to how the rest of the world sleeps. I'd also like to be able to survive ski trips and such without feeling dead after a night of staring at the hotel room ceiling.

I can't remember when I first read about the Zeo, but I was immediately intrigued. I admit to having a certain obsession with quantification, which is why I like the concept of things like MAF tests for tracking improvement in running. The Zeo promised the ability to track not only the quantity of sleep, but the quality thereof, with only one downside: a $400 price tag. However, I continued to read about it and check prices from time to time, and a couple of weeks ago after yet another sleep-deprived night, I pulled the trigger and bought one off of Ebay. The day it arrived, I was excited to go to sleep (which, as my roommate pointed out, is rather counterproductive) and start measuring brainwaves.

The Zeo comes with an innocent-looking alarm clock and a headband that looks like a softer version of a heart rate monitor. Once that band is strapped to your forehead, it starts recording EEG signals through three silver-cloth electrodes. It's been validated against polysomnography and found to be approximately 75% as effective at determining the sleep stage, and 90% as effective at distinguishing between sleep and wake. That's pretty good for a relatively inexpensive consumer device that's wireless, comfortable, and comes in shiny packaging. In any case, let's see some data:

My first night sleeping with Zeo

Pretty nifty eh? This graph shows that I lay awake for 47 minutes prior to sleeping, which is about average for me. However, it also says that my 7 hours of sleep were pretty great, with a lot of deep sleep and a decent amount of REM. It's also interesting to see that I didn't get much "useful" sleep after my 6 am wake-up (I think it was the cat), so perhaps I should just start cutting my nights shorter.

There are a few interesting discrepancies between my perception of the night and the graph. Most significantly, I didn't remember falling asleep and waking up twice between 12:30 and 1:15; I thought I was awake the whole time. I'm guessing the sleep stages during that time (REM, light, then deep) aren't quite accurate, but I'm inclined to believe that I was asleep despite my perception. Similarly, I thought that 6 am wake-up lasted a lot longer. I've been reading a bit about sleep psychology lately, and apparently a big problem with insomniacs is that they think they're awake, when really they're asleep. Could it be that all this time I've actually been sleeping fairly well, but tricking myself into believing that I'm awake? I don't think one night of data is going to tell me the answer, but it's an intriguing idea. Perhaps Zeo will help me by simply giving me more confidence that I got sufficient sleep.

Another way of measuring sleep that's gained popularity in recent years is using the accelerometers built into smartphones. Before getting the Zeo I used Sleep as an Droid, the Android app with infuriating grammar. This uses the principles of actigraphy to correlate motion with sleep stages. However, Sleep as an Droid doesn't try to quantify the amount of time spent in each stage; it simply provides you with a smoothed graph to show your motion throughout the night. This graph, while giving me a bit of an idea of how the night went, doesn't provide data for long-term trends, as it simply assumes you're asleep the whole night. As a result, a terrible night where I lay in bed for six hours and slept (so I thought) for 3 would be reported as a fabulous 9 hours, which was even more depressing than not having any data at all.

In order to compare the Sleep as an Droid data to the Zeo data more effectively, I made a python script to read the raw data, average every five minutes, and plot the result against time. This gives something slightly easier to compare than the previous image:

Sleep as an Droid reformatted plot

Really, I should display these two plots side-by-side, but I haven't quite figured out Zeo's raw data capabilities yet. In any case, I noticed a few things:

  • The accelerometer data between 2:15 and 3:15 (my long period of deep sleep) doesn't look special.
  • My 6 am wake-up appears to be present, but is barely above the noise threshold.
  • My second period of deep sleep (just before 5 am) shows even more motion than most of the night.
  • I can't interpret the Sleep as an Droid graphs.

From these observations, it's clear that there's a discrepancy, and that Zeo provides more useful information. However, it is undeniable that I either move during deep sleep, or Zeo incorrectly detects deep sleep when I'm really in a period of lighter sleep. As delta waves seem like the easiest to pick up on from a signal processing perspective, I'm inclined to believe Zeo when it says I'm in deep sleep.

It's rather unfortunate that I bought Zeo just a week before a cheaper and more convenient mobile system was released, but I don't regret it. I'm looking forward to using Zeo long-term to track my habits, increase my ability to perceive my sleeping, and hopefully improve my ability to sleep like a normal person.

Zeo Personal Sleep Coach: $15 off + Free Shipping

MacBook upgrades: now with SpeedyQuick

Thursday, September 22, 2011

I've always just accepted it as a fact that computers start to feel slow after a couple of years. My mid-2009 13" MacBook Pro has been showing its age lately, and I thought it might be time for some more RAM. Then, I saw this article about the miraculous speed increases brought on by SSDs. With some reasonable prices on low-end SSDs these days, I decided to go all out and do both the RAM upgrade and the SSD.

The drive I ended up picking up from Canada Computers is an OCZ Vertex Plus. There's plenty of reports of these things failing like crazy in the first few months, but I don't have anything mission critical stored on just the laptop, and at $120 for 120 GB, it seemed worth the risk. Plus, it comes with a cute sticker:

As suggested by the Ars Technica article, I stuck the SSD into an external case temporarily, and used Carbon Copy Cloner to clone my drive. I only have about 24 GB of data on my new Lion install, so despite the USB transfer speeds, this process took less time than an episode of Stargate Atlantis. I then rebooted from the external drive to make sure all was well, though this prudent behaviour went downhill later on in the process.

To open up the case and install the goods, I followed the guide at I didn't have a precision screwdriver set (you need a Philips #00 and a Torx T6), so I picked one up at RadioShack The Source on my way home. This was a mistake, as the bit would shoot into the holder when the least amount of pressure was applied. I persevered, but this set is going back to the store.

The dysfunctional screwdriver

The ifixit guide included an entire step for removing the aluminium cover, as apparently there are supposed to be mounting tabs to look out for. My computer didn't seem to have this, but what it did have was a considerable amount more dust than the ifixit photos:

All those white specks are dust

The actual removal of the hard drive was easy. One thing that's kind of clever about this version of the MacBook is the mounting system - the screws on the hard drive are used to secure it in place, instead of having a whole separate sled. I'm guessing this keeps the weight down and perhaps encourages more air flow. In any case, it seems silly to remove screws from one drive and put them on another, but they're important for keeping it in place.

Perhaps operating on a laptop in a cat-hair-filled home isn't a great idea

Next up was installation of the RAM. Going from 2 GB to 8 is pretty awesome, and remarkably cheap and easy. I wonder why I didn't do it earlier.

MacBook RAM pops out at a funny angle

Satisfied that all was well, my earlier prudence of double-checking the clone job disappeared, and I painstakingly screwed in the ten screws with the world's worst Philips #00 screwdriver. I flipped the machine back into its normal position, plugged in the power, and heard a beep. Then another beep. Beeeeeeeeep.

Rule #1 of taking things apart: don't put them back together until you're sure they work. Since the machine didn't even try booting up, I figured it had to be the RAM and not the SSD (Rule #2: don't make two changes simultaneously). I yet again unscrewed the bottom plate of the case, re-seated the RAM, and hit the power button (without screwing the plate back on). This time, a happy Mac symbol appeared, and I was at my desktop in under 20 seconds.

In my impatience to actually do this, I didn't run any benchmarks prior to swapping drives and memory. However, the new machine is noticeably faster, and that's really what's important. Even Mendeley, which runs with typical Java slowness, launches within a bounce of the dock icon. Aside from number crunching, this new and improved MacBook feels just as fast as a new computer, minus the new computer price tag.

Now, all I need to do is cross my fingers and hope that I don't fall victim to the OCZ SSD failure that appears to have hit so many people.

SpeedyQuick is the name of the new drive, because all drives need names. The MacBook's name is Holly, after the dumb computer on Red Dwarf, because Macs are dumb.

Biking is faster than running

Saturday, September 17, 2011

Obvious statement, perhaps. But I do find it interesting that I can maintain fairly close to my usual speed on a bike (on a flat course) while still keeping my heart rate below 149 bpm. At times, I was even struggling to keep my heart rate up that high, hitting a max speed of 38 km/hr. Here's the graph of my ride on the canal path to Chestermere:

All those dips in speed are times where we had to slow down to cross the road, so it's possible these frequent breaks had an effect on my heart rate. However, it's still nice to know that I can do something within the prescribed "aerobic zone" and still feel like I'm moving at a respectable speed.

The other thing that's weird about both my biking and my running graphs is the occasional spikes in heart rate, most obvious in the warm-up and cool-down parts. These are caused by coughing fits - I knew that working hard and getting my heart rate up caused me to cough, but I didn't realize the opposite was true as well. I'm seriously looking forward to this cough disappearing altogether.

MAF Number One: 14:36

Thursday, September 15, 2011

I started running a year and a half ago, when my friends made a drunken pact to do a triathlon. I figured if they could do that on a whim, I could at least learn to run 5k. I'd tried to run in the past, but usually gave up pretty quickly, so this time I used the Couch to 5k training plan to force myself to actually go out and do it. This worked better, and since then I've done my own triathlon and a very cold and slippery half marathon.

While I can now say with some confidence that I am capable of running 5, or even 10 kilometers, I can't say that it's comfortable. I tend to go very red in the face and sweat profusely as my heart rate skyrockets - I typically sustain around 170-180 bpm. During my half marathon, which took 2 hours and 24 minutes, I averaged 176 bpm. Like I said, not comfortable.

This summer I picked up bronchitis around about mid-July, and by the end of August I was feeling seriously sorry for myself. In a depressive fit of self-pity, I starting reading about various theories on aerobic training, and one thing that kept coming up was the Maffetone method. I spontaneously bought the Big Book of Endurance Training and Racing, as it was available for Kobo and I could satisfy my impulse immediately. I somewhat regret buying the book, as it's written in a rambling, repetitive, pseudo-scientific style, peppered with anecdotes from famous athletes proclaiming the miraculous achievements resulting from the training method. None the less, there were a few nuggets of sense, such as correlations between heart rate and respiratory quotients, that made me decide to ignore the "hippy logic" of the book and give it a shot for a few months.

Here's a plot showing both heart rate and speed from the first run I recorded on my fancy new Garmin (just before bronchitis took over):

Kind of hard to read, but basically it says that I'm slow (average pace 6:54 per km), and working too hard. There was a hill and a couple of stop lights, which account for the wild variations.

Next up is my first run using the Maffetone "180-age" formula. I'm 26, so I should be running at 154 bpm, but I've taken off another 5 for my crappy lungs. I've also adhered to the recommended "slow warm-up and cool down", hence the ramping up and down of my heart rate in this next graph:

As you can see, I'm not very good at maintaining a consistent heart rate (or speed). That'll come with practice, I'm sure. What you can't see in this graph is the total time: 1 hour. An hour to go 6 k! That's pretty much walking speed, though I was doing a running motion for the 1.5 - 5 km segment. Another thing you can't see is how good I felt during and after this run - happy to have done some kind of activity again, fairly energized and with a surprising burn in my legs, but not the usual stomach-churning gotta-pass-out feeling that I usually get after a run.

All things considered, I'm going to stick with this program for a few months and see how it goes. The theory behind this method is that I should start being able to run faster while maintaining the same low heart rate as a result of improving my aerobic system. The metric to track is the Maximum Aerobic Fitness pace, or MAF. This is the time it takes to run one mile, after warming up, at the 180-age heart rate. I'm not sure if it's supposed to be the first mile or the average, but I'll go with my first mile MAF pace as it's less embarrassing... 14 minutes, 36 seconds.

I've got my own piece of the interweb!

A quick Google search tells me that I'm far from the first Charlotte to use this name, but alas, it's the best I could come up with. It's rather unfortunate that charlottesweb, charlotteweb, charlottesinterweb, and even were all taken, but charlottefern will have to do.

According to my profile, I signed up for and messed around with Blogger in 2006. I'm pretty sure I didn't actually share anything with the world at that time, and I have no idea what my intentions were - I think I was just excited to try any new Google service. I did maintain a blog briefly in 2008 as part of Google Summer of Code, but that was abandoned when I started grad school.

This time around, my plan is to share my experiences with low heart rate training, aka the "Maffetone Method". However, I didn't want to limit myself to that, as while I'm excited about this now, I'll probably get bored in the future and want to write stuff about biking. Or education. Or perhaps engineering, knitting, cooking, technology, sci-fi, adventures, climbing, photography, skiing, programming... basically, the average personal blog that perhaps no one will read, but is fun to write.

That's all for now. Of course, the best blog posts have photos, so here's one of my favourites:

Atlin Mountain, Summer 2009