2010-02-26

Battery Voltage Regulation Prediction Software



It's rare that I can talk about green energy and software issues in one post.  Here's some software that someone needs to write.

Over at "This week in batteries", Venkat Srinivasan explains the tradeoffs in modern battery charging.  Essentially, the problem is that the higher voltage you charge a battery to, the bigger capacity it has in terms of discharging.  However, higher voltages at the same time reduce the lifespan of the battery so that the next charge will have a little less capacity.  Virtually all battery chargers choose a fixed voltage to charge up to and then stop charging, and this chosen voltage is a number that gives a good balance between capacity and lifespan, but doesn't really maximize either.  From the article:

Operating to 4.1V makes things better and extends the life, 4.0 V is even better and so on. So why don’t battery manufacturers cut the voltage off at, say, 4 V to get better battery life? Because every time you cut this voltage down you decrease the capacity of the battery and its run time. The 4.2V cutoff is a compromise between good run time and decent (read “not pathetic”) life.
Venkat goes on to suggest that this means you should charge your devices up to the maximum limit and then unplug them, so that they slowly drop a little below the max, to extend lifetime.  He also mentions that Lenovo laptops even let you set the charge (as a percentage, not a voltage) if you want to play with these settings yourself.

This is a problem not just for laptops, but also for cell phones, plug-in cars, or any device that uses a battery.  I'm certainly not a battery expert, but it seems to me that there is a better solution out there.

Most devices using an expensive battery have some amount of processing power and some amount of long-term memory (flash drive, hard drive, etc).  Laptop, Cell Phone, and Vehicles certainly fall in to this category.  If the device was able to predict roughly how long it would be used before the next recharge, then it would be able to charge to the lowest voltage required to stay alive until the next recharge.

Humans are creatures of habit, we often keep roughly the same schedule from day to day or week to week.  If the device kept a history of these habits, it should be able to predict usage.  For example, storing data like:

  • Plug in timestamp
  • Unplug timestamp
  • Running out of juice timestamp
  • Day of week, time of day
  • which user is logged in, or how much they weigh on the driver seat sensor
  • ip address the device is allocated to (or nearby wireless APs)
  • GPS location
  • applications that were run
Using a little bit of simple machine learning, the software could predict how much capacity is needed for the next unplug and chage accordingly.  Thus if the laptop is always plugged in at a desk except on the weekend, a low voltage charge could be maintained and then ramped up all the way saturday morning.  Or if the car is used for short trips to/from work, but on Friday night is driven to the next city for happy hour with friends, you can keep the voltage high for happy hour and low for the commute.  If the device sees a completely new scenario (suddenly turned on in Japan at 3am on a different network), then it might switch temporarily to a high voltage/capacity until enough data comes in to know what to expect in this new scenario.

This approach would maximize both battery life and capacity while keeping the user blissfully unaware.

2010-02-15

My take on Buzz

Imagine that to read this blog, you had to first sign into your Blogger account. And that to read a Wikipedia article, you first had to sign into your Wikipedia account. And, when you want to read your email from your AOL friends, you have to first sign into your AOL account, but to read your email from GMail friends required first signing into your GMail account. And imagine this was the case everywhere. You could even take this further and imagine that to read CNN, you first had to load the CNN browser.

To various degrees this is the current state of microblogging services (or whatever you call them). I can't read my friend's Facebook updates in google reader. I can't read the Boston Big Picture in Twitter. Even if my friends wire up their accounts so that their tweets end up in Facebook, my Facebook replies don't appear in their Twitter stream. It's a big bucket of suckage.

As a user, I don't care about how the electricity gets to my house, but I really really care that all my appliances can use that electricity, not just the ones that PG&E made. So I care that someone else cares about the how and standardizes this. As a publisher, I want to be able to pick my publishing platforms - maybe more than just one (Flickr+Twitter+Blogger) - based on how well their features meet my style. I don't want to have to choose my platform based on where my readers might be. As a reader, I want to pick my reader application(s), like Google Reader, Bloglines, or Facebook, but only have to pick one or maybe two and to pick them based on features and usefulness to me, not based on where the people I'm interested in reading publish their content.

Switch gears. Google Buzz launched last week. We've been trialling it internally at Google for some time now, but I had pretty much tuned it out. It was just one more social network with mostly inconsequential status updates of which I was overwhelmed with already. Now though, I realize that I had duped myself. Buzz is not necessarily just another walled garden (although, there is still that risk).

Time out. I am an employee of Google. I don't work on Buzz, heck I have less to do with it at the time of writing this than most Google employees having largely ignored it for so long. The opinions in this post, as well as elsewhere in this blog, are my own and not those of my employer. Seriously. Nuff Said.

Buzz could be a move to a more open standard for microblogging. This ReadWriteWeb article on how Buzz's API supports Open Data Standards says it better than I. I spent some time in the last few days reading up on PubSubHubBub, Salmon, WebFinger, etc. I'm no expert, but it's exciting. Whether Buzz succeeds or not matters little to me, but if this kind of open social networking standard takes off, I think we're all going to be a little bit saner in managing our digital lives.

2010-02-05

Swoopo and stable equilibriums

If you've never heard of swoopo.com, it's an "auction" site that allows you to bid on items in 1c increments. Usually the items sell for much much less than they are worth.  For example, this 1oz gold bar (worth around $1,400) sold for $216.98.  The trick is that you can only bid exactly 1c more than the last bid and simply making a bid costs you $0.60.  So, 21,698 bids were made on that gold bar by various people which cost them over $13,018 in total.  The winner spent almost $700 in bids themselves.  Most people who play this game are losing lots of money.

A similar (simpler) game is described as an auction for a $20 bill.  The rule is that you pay your most recent bid, regardless of whether or not you win.  You can argue that it always makes sense for you to bid.  Initially, you are bidding $1 for a $20 bill, how awesome is that?  However your opponent in the auction can now bid $2 for a $20 bill, which he will definitely do - why wouldn't he?  At some point you have bid $19 for this bill, but your opponent recently just bid $18.  If he doesn't bid $20, he loses $18 - if he does bid $20 and wins, he comes out even.  So bidding $20 seems like the right choice.  Unfortunately now you lose $19 bid lost if you don't bid and you lose only $1 if you do bid (bid = $21, but you win $20).  So it makes sense for you to actually bid $21 for a $20 bill.  This continues forever with the risk that both participants bid hundreds of dollars for this $20 bill.

I was having a lunch conversation with some folks the other day who argued that the best choice at any turn is to always bid, but that this is a paradox because you will lose your shirt playing this game.  I think the paradox is easily resolved.  The thing that causes the paradox is the assumption that the best decision is to always bid, which seems on the surface to be the right strategy but in fact is not.  If you assume this is the right strategy, this game has no stable nash equilibrium, but I claim that the game does in fact have such an equilibrium strategy.

Imagine your opponent in this game (simplification - the game is a 2 player version of the $20 auction) is one instance of a set of players in the universe of possible players.  As such a player, there is a distribution of points in the auction where that player will stop bidding.  The number of players that will make it to $1 is high, say 99%, the number of players that make it past $20 is probably somewhat low, and the number of players that make it to $1 million is probably nearly zero.  As a result, you can evaluate at each point in the game what is the expected number of additional bids that you will have to make to gain the $20 bill.  If this is greater than 10 bids (an increase of $20 in your bidding), then you should not bid.  If it is less, then you should bid.  Depending on the distribution, you may choose not to even play the game or you may likely choose to play up to a few dollars or so because some reasonable fraction of other players give up early.  If you played enough such games, you would expect to come out non-negative however on some individual games you would expect to lose money.  My guess is that the real distribution for a $20 auction in the world of opponents would be such that not bidding at all makes sense, but if you make it a $1 million auction, then I would guess that due to finite budgets of your average opponent, it would make sense to bid up to some reasonable number and give up.

Interestingly, there are some distributions that would suggest you should never stop bidding.  For example if the probability that your opponent continues to bid decreases by 50% every time, then at any point in the game, you would expect to have to bid only 2 more times, meaning you should always keep bidding.  However, this is fine as long as your estimate of the distribution is correct because the odds of your opponent bidding 10 more times are tiny (1 in 1024).  So you are essentially betting on a fair coin toss repeatedly with a 1:10 payoff.

I have no idea what the distributions are for swoopo auctions.  If someone has the dataset, it would be interesting to analyze it and figure out the optimal strategy and see if it ever makes sense to bid (maybe it does in some cases).

2009-12-15

rel=canonical part two

Google today officially announced support for cross-domain rel=canonicals.  This is a very important step.  I talked about rel=canonical when we announced it 10 months ago.  This tweak will be very useful in a variety of cases.  A few interesting ones:

  1. Any place where you want to move your site to a new domain but can't control server headers.  This can be really useful to help avoid lock in on free hosts for example.
  2. Companies that register several domain names as landing pages for offline advertising, a practice often used for tracking performance of the campaign, can now keep users on the original domain but keep spiders going to the right place so Google doesn't end up with 10 copies of the site.
  3. Syndicating content - if your syndication partner agrees - you can now make sure that your "link juice" flows back to the original article in Google.
I think we'll see lots of creative uses of this tweak in the future as we've seen with the original rel=canonical.  Let's just hope those creative talents are used for the power of good.

2009-12-08

Favorite Google Doodle: A fun chrome extension

Google announced extensions for Chrome Web Browser today, a much awaited feature for many. Go try out a few. If you are looking for recommendations, one quirky fun little extension that I would recommend is the Favorite Google Doodle Extension. It lets you select your favorite Google Doodle logo from Google's doodling history and set it as the logo for your Google search page whenever Google isn't running a special logo for that day:




Unfortunately, today isn't the best day since Google is actually running a special logo today celebrating the cartoonist E.C. Sagar, the man behind Popeye the Sailor.  However, if you install and choose a logo today, you'll see it on the search results page, and likely tomorrow (depending on whether or not there is a special logo running then too).  I've set might to be this fancy scientific logo for now.  I found some other of my favorites too:




I will admit that I'm undeniably biased as a friend of mine actually wrote this extension.  If you like it, don't forget to rate it too.

2009-10-06

Simple Simhashing

A friend and coworker of mine, Ryan Moulton, just wrote a very nifty knol called "Simple Simhashing". If you like software algorithms, it is most certainly worth a read. Simple simhashing is an algorithm that allows you to take any "thing" and come up with a simhash that should be the same for two "things" in probability relative to how similar those to "things" are. The really nifty part is that the algorithm is completely local and the properties are provable in an easy to understand way. This algorithm is actually used at Google in a few places, although I'll leave it to you to guess how.

2009-08-26

Blacksmithing in the San Francisco Bay Area

For the last 5 weeks, ending yesterday, Cristin and I have been making a once-a-week journey to Oakland to take a introductory blacksmithing class at the Crucible. The Crucible (thecrucible.org) is a non-profit in Oakland which serves as a avenue for the industrial arts in the community. They tend to focus on alot of arts related to fire, hence the name.

The class teaches you several basic blacksmithing techniques as you create 4 projects over 5 weeks. You create a hook, which is looks like an enormous fishing hook, but designed to hang on a wall. You create a knife, or a shiv out of rebar. You create a spoon - the two week project. Finally you create a 2-pronged fork. And most people create two of each - one piece heating up in the forge while the other piece is being worked on. Here is a photo of some of the steps in the various projects:

There are a few other photos up on picasaweb of Cristin and I here: Blacksmithing Photos, but the most important photo is the one that resolves the "pics or it didn't happen" issue:
Cristin and I had a blast, so a small plug for these classes. Turns out that in a few weeks, they are running a special weekend "sampler": . They have morning and afternoon single session classes on both Saturday, Sep 19 and Sunday, Sep 20. It isn't cheap, but it isn't horrible either, $85/class. If you take two on the same day, you get $15 off the set. Cristin and I going to head up there on Saturday, Sep 19 for the whole day and if anyone else is interested in going, let me know.

The classes offered as samplers include:


  • Blacksmithing: undamental skills needed to forge steel and understand blacksmithing tools. Each students will walk away with a small finished project.
  • Glass Fusing: glass/heat interaction, glass cutting, fusing (combining colors), slumping (shaping glass into or over molds to create flat and dimensional forms), as well as a brief description of firing and annealing procedures.
  • Glass Flameworking: fundamentals of flameworking, and will cover a small variety of techniques like color pulling and applying, frit application, and marble making.
  • MIG Welding: Metal inert gas (MIG) welding, also known as wire-feed welding, falls between arc welding and TIG in the welding spectrum. Quieter and cleaner (and some say easier) than arc welding, MIG welding is typically used in production fabrication such as furniture making, light construction, and auto restoration. In this workshop you’ll learn the basics of MIG welding and plasma cutting.
  • Ceramics: no description online, but I think this is sculpting.
  • Jewelry: sawing, filing, sanding, soldering, texturing, annealing, stamping, polishing, safety, and design. Each student will walk away with one finished piece.
  • Sand Casting: Working with resin-bonded sand, you’ll learn the foundry basics as you build your own molds. As part of a casting team, you’ll have the exhilarating experience of pouring molten aluminum.
  • Resin Casting: Learn the secrets of plastic casting using flexible molds, just like the ones that professionals use for product development. You'll learn to make molds of found objects and use them to create plastic reproductions. Each student will walk away with one piece.

2009-08-12

Duplicate Content & Multiple Site Issues

Earlier this morning I gave a talk at SES San Jose on Duplicate Content and Multiple Site Issues. For those who couldn't make it to the conference or just want a copy of the slides I'm embedding them here:



Keep an eye on the Google Webmaster Youtube Channel. I going to try to see if I can record the presentation and have it up there as well for anyone who missed it.

Update (09/17/2009):

The re-recorded video is now up:
http://googlewebmastercentral.blogspot.com/2009/09/duplicate-content-and-multiple-site.html


As well as a interview with Mike McDonald of WebProNews:
http://videos.webpronews.com/2009/09/17/canonical-tag-vs-301-redirect/

2009-08-07

Join me at SES 2009 San Jose next Wednesday

Next Wednesday morning, August 12, I'll be speaking at SES San Jose on Duplicate Content & Multiple Site Issues.  Learn what happens when you have the same content appear on multiple pages or even sites.  Find out if you are at risk of getting "penalized" or "banned" for having similar pages (hint: not likely).  Learn a bit more about the new rel canonical tag, tried and true 301 redirects, and other great ways of helping search engines figure out what your site is all about.

Or just find me wandering around after the session, say hi, and hit me with any of your other burning search engine questions.  I'm not as famous as Matt Cutts, so I might have a bit more time for a detailed discussion about all things search engine.

See you in San Jose.

2009-07-11

Mileage Tax

Last year around this time, I wrote a blog post suggesting we crank up the gas tax to $10/gallon while using the entire proceeds to give tax rebates to low income families. The reaction was generally plenty negative, although at least one person told me in person that he thought it might have some merit. No worries.

It turns out that there is a new idea for taxing vehicles on the horizon, one that is only recently possible due to the proliferation of inexpensive GPS technology. A tax based directly on mileage driven. I've found that very few people in the US have heard about this possibility, and most reject it at first glance without deeper consideration.




There was an interesting article last weekend in Reuters about Traffic jams in Manhattan.  In it, the author posited that the average car driven into Manhattan on a weekday causes 3.26 hours of delays to everybody else.  Those delays are felt by individual drivers in terms of a few seconds, but across all of the drivers combined, the delays are very high.  The article goes a bit further to claim that the average car has 1.97 people in it and the average per-car value of that lost time is $48.89/hour, so the societal cost of that average car being driven into Manhattan is as high as $160.

In major cities, many road networks have similar properties to a lesser scale than Manhattan.  Today I drove through San Francisco with no intent to stop in the
city, but traffic slowed me down to a much lower speed than I was happy with.  The traffic alone added at least 30 minutes to my journey.  Ick.

A mileage tax at it's simplest adds a device to your car which tracks how many miles you've driven via GPS and charges you a tax based on this.  There are obvious reasons why this initial idea would have people roll their eyes.  The first is usually that a gas-tax has much the same affect and is cheaper to administer.  The second is that it seems to penalize folks who drive more fuel efficient vehicles (or at least not penalize gas-guzzlers).

The important part is that a mileage tax can be far more complex than this.  Instead of a flat tax per mile driven, the tax can vary based on where you are driving, what time, and the type of vehicle you drive (ie: a discount applied to lower-emissions vehicles). 

Also, a small premium can be charged for driving in San Francisco during rush hour.  By charging say $1 to drive through San Francisco at lunch time, those willing to pay will have a shorter, faster trip because others are incented to use alternatives and get off the road.  There would be no need for your unit to communicate where it was and when (violating your privacy), it would simply need to have rules for different areas and calculate the tax internally.

A variable rate mileage tax could also nicely solve the problem of toll roads.  Toll roads in the US today are often built with the argument that state X shouldn't have to pay for the road that people in state Y are going to make use of for free.  Simply collecting the tolls has a cost though.  WSDOT did a study in 2007 (See Toll Roads Mean Billions in Extra Costs for Motorists) that indicated for every $100 in revenue raised by toll roads, there was an additional $22 overhead in collecting the tolls themselves.  This also doesn't include the drivers' lost time.

A mileage tax isn't a theoretical idea that can't be easily implemented in practice either, it is already in use in some places.  Last year Holland passed a law that will phase in a mileage tax over several years with variable rate pricing (See: Road Pricing).  In 2006, Oregon recruited 299 drivers for a year-long trial of a mileage tax (See: Oregon's Successful Mileage Tax Experiment).

Obama has however said he is not interested.  However, this may become a looming issue over time.  As fuel efficiency increases and drivers react to higher gas prices, transportation budgets have been feeling serious shortfalls.  It is politically difficult to pass or raise new taxes, which makes regularly updating the gas tax to match the transportation budgets sporadic at best.  The time hasn't come, but perhaps it someday will.