There is a lot of talk nowadays about the Singularity, the scary rate of development of intelligent machines, and the future of artificial intelligence. I'd like to discuss these concepts from a physics perspective. Some of the interesting questions to me are: how close to the fundamental limit of computation are modern computers? How close is the human brain? If we extrapolate a "Moore's Law" type curve based on energy efficiency arguments, when does it intersect human capabilities?
It is well known that the fundamental thermodynamic limit for how much energy a single bit requires in an information processing system is kBT ln 2. This is known as the Landauer limit. Actually, I lied. Some theorists argue that the Landauer limit can be exceeded, for example by using quantum spin instead of energy as a store of information, or reversible computing. Nonetheless, let's assume that the Landauer limit holds true, and see what this means for the future of computation. As we'll see, theoretical arguments about exceeding it are analogous to discussing what we're going to do with all the excess clean energy. Spoiler alert: we are nowhere near an excess of clean energy and we are nowhere near the Landauer limit.
So first of all: how close are modern computers to the Landauer limit? In other words, how many watts does one bit erasure require, and how close is this to the Landauer limit? Well, the FLOPS (Floating Point Operations per Second) per watt (Joules per second) = 6x10^9 FLOPS/W. Taking the reciprocal, that's 1.7x10^-10 Joules per FLOP. Let's assume that since a floating point number has 32 bits, that we get 5.2x10^-12 Joules per bit in a modern computer. By comparison, the Landauer limit at room temperature (293 K) is: 2.8*10^-21 Joules per bit. In other words, modern computers are using 5.2x10^-12/2.8*10^-21= 1.8 billion times more energy than the Landauer limit. There's a lot of room at the bottom!!! Even the most energy efficient modern computer is horribly inefficient at doing math. An energy analogy would be like if driving 100 kilometers in a car required the entire world's energy supply.
Redoing the above calculation in terms of FLOPS/Watt for the Landauer limit, we get 2.8*10^-21 J/bit*(32FLOP/bit)*/(1W/1J/s)=9*10^20W/FLOPS, or 10^19FLOPS/W
OK so computers are pretty inefficient. What about the human brain? Well, first of all: how many operations does an average brain do? Well, from what I have been able to find, somewhere between 10^12 and 10^28 FLOPS. Yes, you read that right! https://aiimpacts.org/brain-performance-in-flops/ The estimates for how many computations the human brain can do vary more 16 orders of magnitude. That's insane. 16 orders of magnitude uncertainty is the greatest uncertainty I have ever seen. I'm not even going to try to make an analogy for that one because it's too much uncertainty to even comprehend. I think this brings up an interesting point for scientists around the world: come up with a better way to measure human brain performance!
Despite the craziness above, we can put some upper bounds on performance: the Landauer limit! And we know that the brain uses around 20W. So the upper bound for the number of computational cycles of human brain performance (assuming no reversible computing or other fanciness), is 20W/2.8*10^-21 Joules per bit=7.1*10^21 bits/s. Assuming 32 bits/FLOP, that's 2.2x10^20 FLOPS. Breaking news: scientists discover that the human brain has exceeded the Landauer limit! Just kidding. A more likely explanation is that whoever estimated 10^28 FLOPS made some bad assumptions that got them 8 orders of magnitude above the Landauer limit! Or maybe the human brain inherently does reversible computing or something. My guess is that no, it doesn't. So the human brain is somewhere between 8 orders of magnitude less efficient than the Landauer limit, or 8 orders of magnitude more efficient than the Landauer limit. lolz.
OK back to computers. Koomey's Law suggests that the amount of energy per computing cycle halves every 2.6 years. If that's true, and given that modern computers are at 1.8 billion times the Landauer limit, we'll hit the Landauer limit in t=2.6 * ln(1.8x10^9)/ln(2) = 79 years.
The energy singularity (when computers can do more work per joule than the human brain) will happen around 2045 if the human brain is 8 orders of magnitude less efficient than the Landauer limit, or 2100 if it's at the Landauer limit, assuming that computers continue to double in energy efficiency every 2.6 years. I predict that they won't. I think that the traditional silicon computer will not continue to double every 2.6 years and we'll need a dramatically improved computer architecture. This type of dramatic redesign will slow down scaling to doubling every 8 years or so, which will push the singularity way back in time.
I represented this on a graph:
The biggest sources of uncertainty are: how many equivalent computational cycles does the human brain perform? and how quickly will FLOPS/W scale as the limits of traditional silicon are reached?
A common criticism of this type of thinking is: "but the human brain doesn't work like a computer! it uses neurons and is good at parallel computing and doesn't use 1's and 0's." Response: actually, the brain is like a computer! A biochemical system, like "is ion channel open?" can be thought of like a bit of information. Similarly, a relevant protein expression level or horomone level can be quantized. All the brain chemistry put together can be thought of as a computing machine, and it can be quantified in terms of FLOPS! Just because computers today do very different things than the brain does today, does not mean they obey different physics, just that their hardware architecture is different!
This is a first draft to please let me know what you think, any feedback, any typos, etc, and I'll update it!
EDIT: thanks to Dr. Alan Mackworth for pointing out a typo above regarding Koomey's Law... energy per computing cycle halves not doubles every 2.6 years.
Tuesday, December 24, 2019
Wednesday, August 7, 2019
Tugfest physics
I received a message from a local news TV anchor:
"Hello, I'm with KWQC TV6 in Davenport, Iowa and am working on a story about a popular annual tug of war across the Mississippi River here in our area. The tug of war involves a rope that is strung across the Mississippi River between one team in LeClaire, Iowa and the other in Port Byron, Illinois.
I am wondering if you would be willing to provide some of your expertise regarding the impact that the elevation difference between the two locations has on the outcome of the event. In other words, if one team is at a lower elevation than the other, does that team have an advantage or disadvantage as a result? If we take the elevation of 587 feet for LeClaire and 604 feet for Port Byron, can you calculate or in some way scientifically express the impact this could possibly have on the outcome of the tug of war? Thank you."
1) In physics, we often draw a "free body diagram" of all the relevant forces on a system. I'm assuming that the rope does not touch the water. In this case, the forces acting on the rope look like this:
As far as I can tell, there is the force of the pullers in Le Claire (F_LC), the force of the pullers in Port Byron (F_PB) and the force of gravity acting on the rope (F_g). In the game (sport?) of tug of war, the team that moves the rope wins. So the idea is to exert a larger force than the other side. on level ground, gravity effects the rope in such a way that both sides have the same effect. However, in this scenario, the rope will be hanging in such a way that one side will experience a different force than the other.
2) It is a well-known problem in physics that a suspended rope makes a catenary curve: http://www2.mae.ufl. edu/~uhk/HANGING-ROPE.pdf
3) There is a well-known saying in engineering that "you can't push on a rope" and so we can assume it is under tension at all points, and that it doesn't apply much bending force because it's long and skinny and floppy.
4) We can approximate the system as being in static equilibrium. Although technically a tug-of-war cannot be performed without movement (one side has to pull further than the other), we assume that ignoring inertia is OK since the static forces are more important than the dynamics for a tug-of-war.
From the ghost drawing, it's clear that the pullers at Port Byron have to overcome some extra forces due to the weight of the rope between the ghost and the Port Byron location. Because gravity pulls vertically, the only difference will be in the vertical component. This is the tiny green arrow in the drawing below:
In other words, the horizontal forces will be identical, but the Port Byron pullers will have to pull slightly harder, because they have an upward component of force also.
Now you are probably wondering: how much more force will the pullers at Port Byron have to apply? Let's guess that the rope angle is ~10 degrees at Port Byron and let's assume they use Manilla tug of war rope. Here (https://www.ironcompany.com/ manila-tug-of-war-rope) I found a tug of war rope that claims to be "1 lb per foot", or as the modern world would say "1.5 kilogram per meter". Now at 10 degrees (made up guess for angle), we can calculate the amount of extra rope between the ghost and the Port Byron pullers using trigonometry (ignoring the bending of the rope for this section for now):
sin(10 degrees) = 5m/L_r, where 5m was the difference in elevation between the two locations and L_r is the lenght of excess rope. Solving for L_r we get: L_r=5m/sin(10 degrees) = 28.8m. To get weight of the rope, we multiply: 1.5kg/m * 28.8m = 43.2kg.
So by my estimations, the Port Byron pullers will have to overcome an additional 43.2kg of vertical force, or technically 423N of excess vertical force. That seems like a lot. However, if we consider that the angle differences are pretty small between the two sides, and all that matters is the absolute magnitude of the force. Let's assume that they are each applying 5000N of horizontal force (I just made up a number because I have no idea how many people are expected at the event). Now the Port Byron pullers will have an extra ~430N of vertical force). Their net force vector will be slightly downwards (due to excess gravity on the rope), which when we ignore the 10 degrees and assume the rope is horizontal before applying the gravity correction, we get a magnitude of ~sqrt(5000^2+430^2)= 5018N, or an extra 18N in the direction of pulling. That's less than one percent difference. I think we can safely ignore the difference in physiology between pulling at 10 degrees from horizontal vs pulling at 11 degrees from horizontal. The human body should be able to do each equally well.
OK, I just did some research about the event and found something interesting: there is a pulley used!!!
A pulley is a mechanical device that can change the direction that a rope is pulling in. It is still true that Port Byron will have to overcome more weight of rope and thus all things being equal, Le Claire has an advantage. However, the pulley position is incredibly important. An average tug of war participant is limited by their friction on their feet and their ability to grip the rope. If they can grip the rope sufficiently, and pulleys are allowed, and since a pulley redirects forces, it would be advantageous to put the pulley low to the ground so that they are pulling more upwards than downwards. I'm assuming that pullers can theoretically pull some larger than one multiple of their body weight. Ideally, a trench would be dug for the rope and pulley to sit in, so that pullers are pulling at a downward angle, maximizing friction on their feet and overcoming that limitation. If the pulley could be placed at the bottom of a staircase-slope (e.g. cut some steps into dirt), that could be ideal for maximizing friction with the ground for a given pulley system. That, or make a ladder like structure in the ground. I have illustrated this point with two hypotheticals, one where the pulley is placed high up (e.g. on a tree) - the stupid pulley, and one where the pulley is placed near the ground (the smart pulley):
I'm assuming that the weights of the two teams are equal. In that case, to maximize friction, put the pulley close to the ground. If you can choose your team, choose the heaviest people you can. Also, don't put sand in your pulling pit, that will make it impossible to apply large forces. Use a high-friction material. Ideally something like a metal ladder.
I have one question that could invalidate my analysis: does the rope fully leave the water? If there is any part of the rope touching the water, then water currents will have a big effect on the forces. I assumed that the rope leaves the water surface after it is taught. If the rope stays in the water, then river currents will determine the winner. OK I looked it up: the rope stays in the water: https://www.wsj.com/ articles/iowa-cant-beat- illinois-at-cross-river-tug- of-war-no-matter-what-they- pull-1473187822
So forces of drag from the river currents need to be taken into account. First of all, let's see if either of the locations looks upstream with respect to the other. Well, from a google map search I think it looks like Le Claire is down-river from Port Byron.
So in my assessment, Le Claire has the theoretical advantage in every respect: they have a lower elevation pulling platform, and most importantly, they are downriver.
OK I just found out something ridiculous. The winner is determined by who pulls more slack out of the water?!?! https://qctimes.com/ community/bettendorf/port- byron-pulls-out-another-win- at-tug-fest/article_2311b1cd- 990a-5d8b-8228-73a60b16ff44. html
So this is not really a tug of war at all. It's a competition to see who can leave their rope with more slack in it before they start pulling. Probably the team with the higher platform will win if all you are measuring is who can pull more slack out of the rope, when river currents is working to pull it back down. So I think that the winning streak of Port Byron could be due to their elevated platform, which allows them to pull more slack out of the rope in a river. It has nothing to do with pulling harder than the other team. Is Port Byron really 5 meters higher? From the images I saw online it doesn't look like that much... On that subject, I'm not sure where the host got the elevation numbers. Maybe from some random point in the towns? Also, what is the elevation of the pulling platforms with respect to river level?
In conclusion: Le Claire has a theoretical advantage in a true tug of war. However, because Tugfest is a "who can pull more slack out of the water" contest and not a true tug of war, Port Byron has an advantage because an elevated platform will have more slack between loose and taught rope conditions. This analysis is based on the numbers provided to me that Port Byron has a 5m taller platform. I'm not sure that's accurate!!!
If you have additional ideas to improve the estimates please leave them below!
If you have additional ideas to improve the estimates please leave them below!
Monday, December 25, 2017
Bitcoin vs Bitcoin Cash

Bitcoin transaction fees are too damn high!
The rising transaction fees for Bitcoin have caused a major split, leaving the Bitcoin community divided into two camps: Bitcoin (BTC) and Bitcoin Cash (BCH). The two cryptocurrencies have unique ideas for how to reduce transaction fees: increase the blocksize, or build a new network on top of the blockchain.
The Bitcoin Cash camp is making the blocksize bigger (from 1MB up to 8MB). This results in much lower transaction fees as compared to Bitcoin. However, the problem with the Bitcoin Cash approach is that it's only a matter of time until the blocksize needs to be increased again. So it's a bandaid solution. In the eventual limit of gigantic blocksizes (give it a few years), this means that the blocks will be so large that average person will no longer be able to validate the blockchain. The current blocksize is 1MB/6 minutes ~= 87GB/year ~=150GB total as of now. If you make it larger, then an average harddrive will no longer be able to download and validate the blockchain. If you extrapolate this pattern to include the types of transaction volumes that VISA handles, then eventually only one giant corporation (Google?) will have a harddrive big enough to validate the blockchain. So this scenario ends in: "trust Google, your money is safe" or perhaps people will switch to an alternative currency that they trust more. But then again, human beings have been known to engage in some moral hazard in exchange for short-term monetary gains. Nobody lives forever, so pushing out the problem to the future may be OK. Maybe a band-aid is good enough.

The Bitcoin camp has taken a more creative approach than simply increasing the blocksize, and is building an entirely new transaction layer on top of the blockchain, that they call "The Lightning Network." The Lightning Network will allow people with Bitcoin to open a channel, and then do lots of little microtransactions outside of the blockchain, without having to pay a fee for every little transaction. It is only when they open and close a channel that the main Bitcoin blockchain learns about the final transaction, and so the fees are significantly reduced. This new system will allow for orders of magnitude more transactions, and therefore The Lightning Network is certainly not a band-aid solution. I would argue that The Lightning Network has the potential to be the killer app that the blockchain has been waiting for. The Lightning Network is in its infancy, and growth can be tracked here: https://explorer.acinq.co
In the future, you will be able open an account with a deposit of Bitcoin (with a small fee), and then make payments with zero fees to anyone else that is a member of The Lightning Network (instantly). This will enable the microtransactions that have been the promise of Bitcoin for the last 7 years. And no, you won't need to provide your driver's license, address, passport, date of birth, and mother's maiden name to open a Lightning account! There is even an app that lets you try the test version of the lightning network: https://play.google.com/store/apps/details?id=fr.acinq.eclair.wallet
Nobody knows which camp will win (Bitcoin or Bitcoin Cash), but odds are currently ~80% in favor of Bitcoin and the Lightning network, and ~20% in favor of Bitcoin Cash and increased blocksize (https://www.coinexchange.io/market/BCH/BTC).
As of the writing of this article, 1 BTC = $15,340 USD
Sunday, December 3, 2017
A bold strategy for The Government of Venezuela: buy Bitcoin
The promise of eliminating runaway inflation by irresponsible governments was one of the major reasons I became interested in Bitcoin. I always imagined that a country like Venezuela or Zimbabwe would be the first to switch away from their fiat currency and adopt Bitcoin. Today, Venezuela announced that they are trying to launch their own cryptocurrency, the Petro. I imagine President Maduro saying: "I have an idea: let's combine all the security risks of cryptocurrencies (theft, lost wallets, etc) with the monetary policy of the Government of Venezuela." To him I say: good luck with that!
I have an alternative. The Govt of Venezuela should buy large amounts of Bitcoin. If they put 15% of their resources into buying bitcoins and another 15% into mining bitcoins, they would become the first country to have BTC as their official currency. They have the power to make Bitcoin price skyrocket. They should do this in secret. If they delay the official announcement, then with the backing of a large government, Bitcoin price will skyrocket, and the government that buys at a low price will have made a direct profit on that investment after the official announcement. Venezuela could be a global version of the "the rich get richer." Furthermore, the investment in mining equipment that I am suggesting will be an investment into the future, as future Bitcoin mining will profit more from the transaction fee than they will from the raw currency creation. This would position Venezuela as a global processor of transactions, resulting in a net trade surplus due to skimming profits from international transactions. Ironically, the instability of the Bolivar makes it possible for Venezuela to profit immensely. They could turn their weakness into a strength. A country with a stable currency wouldn't have the political will to attempt such a bold (but in my opinion profitable) strategy.
Instead, what will probably happen is a bunch of Venezuelan politicians will flirt with some ideas and then possibly launch the next Dogecoin that has the same inflation problems as their existing currency and the Government of Venezuela will miss a golden opportunity.
I have an alternative. The Govt of Venezuela should buy large amounts of Bitcoin. If they put 15% of their resources into buying bitcoins and another 15% into mining bitcoins, they would become the first country to have BTC as their official currency. They have the power to make Bitcoin price skyrocket. They should do this in secret. If they delay the official announcement, then with the backing of a large government, Bitcoin price will skyrocket, and the government that buys at a low price will have made a direct profit on that investment after the official announcement. Venezuela could be a global version of the "the rich get richer." Furthermore, the investment in mining equipment that I am suggesting will be an investment into the future, as future Bitcoin mining will profit more from the transaction fee than they will from the raw currency creation. This would position Venezuela as a global processor of transactions, resulting in a net trade surplus due to skimming profits from international transactions. Ironically, the instability of the Bolivar makes it possible for Venezuela to profit immensely. They could turn their weakness into a strength. A country with a stable currency wouldn't have the political will to attempt such a bold (but in my opinion profitable) strategy.
Instead, what will probably happen is a bunch of Venezuelan politicians will flirt with some ideas and then possibly launch the next Dogecoin that has the same inflation problems as their existing currency and the Government of Venezuela will miss a golden opportunity.
Saturday, April 4, 2015
Satellite tracking with telescope
So after years of trying to get a video of the International Space Station, we finally did it! Here's the result:
This video is centered by using a weighted-average of the following video:
So how do you get a video like that? Well here's what the setup looked like a few minutes before ISS passed overhead! A telescope, some computers, in a parking lot 10 meters from our front door.
Here's a schematic diagram of the setup:
How does it work? Well, you need a telescope and a camera. A classic orange Celestron C8 (30+ years old) and a Celestron NexImage webcam get the job done. It helps to have a Telrad to center the telescope on moving targets. This is all you really need! Oh, maybe a broomstick to manually slew the telescope to ISS.
If you want automated tracking, then things get a bit more tricky. From this point on, everything is custom. For the guidescope, a Logitech webcam that has the lenses removed is attached via some Thorlabs optics to a 150mm lens. So the light coming from infinite distance (ISS is pretty far away) is focused onto the detector at a distance of 150mm. The webcam is held onto the optics with packing tape.
The guidescope sends low resolution images over a relatively large field of view, and because it's a small 25.4mm diameter lens, the amount of light collected is pretty low so it can only track bright objects such as planets, bright stars, or ISS. The guidescope is connected to a Gateway laptop that is running Labview software. The Labview software finds the coordinates of the brightest object in the image using a simple algorithm: weighted mean of all pixels above a user-defined threshold. The user also inputs desired coordinates. So there's a deltaX and a deltaY of coordinates which are used to control the Right Ascension (RA) and Declination (D) velocities. The user-defined X and Y are set to line up such that the satellite is in frame on the imaging webcam. Here's a video of the setup tracking Jupiter (before alignment of 3 axes):
At the end of the video you can see the Telrad pretty close to aligned with Jupiter!
Here it is after alignment of all 3 axes, and you can see Jupiter in the main imaging webcam.
To control the telescope, Labview sends commands via ASCOM Telescope MoveAxis rate commands. So we are updating the desired RA and D rates. These commands are sent via a USB to serial port to the Celestron Advanced GT mount hand controller. Here's a screen shot of the custom tracking software GUI:
This is where it's refreshing that blogs are not peer reviewed. The following works, but I don't know why! I don't know exactly how to solve the control system for this telescope. If someone has ideas for this, please let me know. Attached is my best guess for what I'm doing, but I haven't solved it using Laplace transforms or anything like that due to the mysterious motor controller black box. Perhaps someone has a good model for how the motor controller and physical response of telescope? The factor of 1/cos(D) is because as the declination approaches the polar axis (D=90 degrees), the RA becomes less and less sensitive. In fact, at D=90 degrees, moving RA only rotates the image, it does not actually move laterally!
It would be nice if Celestron or ASCOM allowed us to control the current (in Amps) directly to the motor. Any insight here would be appreciated! But the bottom line is that despite the uncertainty in why exactly it works, it does in fact work!
10% of the time: PARTY!
Any comments or questions definitely welcome!
Tim Long and Rick Burke of ASCOM for posting useful information online
Thierry Legault's website, Ralf van de Bergh, Sylvain Weiller and Atroguyz for inspiration
Thanks to my girlfriend Fernanda for spotting ISS, but mostly for keeping me company through all the failed attempts at capturing ISS :)
This video is centered by using a weighted-average of the following video:
So how do you get a video like that? Well here's what the setup looked like a few minutes before ISS passed overhead! A telescope, some computers, in a parking lot 10 meters from our front door.
Here's a schematic diagram of the setup:
How does it work? Well, you need a telescope and a camera. A classic orange Celestron C8 (30+ years old) and a Celestron NexImage webcam get the job done. It helps to have a Telrad to center the telescope on moving targets. This is all you really need! Oh, maybe a broomstick to manually slew the telescope to ISS.
If you want automated tracking, then things get a bit more tricky. From this point on, everything is custom. For the guidescope, a Logitech webcam that has the lenses removed is attached via some Thorlabs optics to a 150mm lens. So the light coming from infinite distance (ISS is pretty far away) is focused onto the detector at a distance of 150mm. The webcam is held onto the optics with packing tape.
| A custom guidescope: a Logitech webcam with lenses and case removed attached via Thorlabs optics to a 150mm lens |
The guidescope sends low resolution images over a relatively large field of view, and because it's a small 25.4mm diameter lens, the amount of light collected is pretty low so it can only track bright objects such as planets, bright stars, or ISS. The guidescope is connected to a Gateway laptop that is running Labview software. The Labview software finds the coordinates of the brightest object in the image using a simple algorithm: weighted mean of all pixels above a user-defined threshold. The user also inputs desired coordinates. So there's a deltaX and a deltaY of coordinates which are used to control the Right Ascension (RA) and Declination (D) velocities. The user-defined X and Y are set to line up such that the satellite is in frame on the imaging webcam. Here's a video of the setup tracking Jupiter (before alignment of 3 axes):
To control the telescope, Labview sends commands via ASCOM Telescope MoveAxis rate commands. So we are updating the desired RA and D rates. These commands are sent via a USB to serial port to the Celestron Advanced GT mount hand controller. Here's a screen shot of the custom tracking software GUI:
| Labview GUI screenshot |
This is where it's refreshing that blogs are not peer reviewed. The following works, but I don't know why! I don't know exactly how to solve the control system for this telescope. If someone has ideas for this, please let me know. Attached is my best guess for what I'm doing, but I haven't solved it using Laplace transforms or anything like that due to the mysterious motor controller black box. Perhaps someone has a good model for how the motor controller and physical response of telescope? The factor of 1/cos(D) is because as the declination approaches the polar axis (D=90 degrees), the RA becomes less and less sensitive. In fact, at D=90 degrees, moving RA only rotates the image, it does not actually move laterally!
Warmup schedule
2 weeks before ISS pass:
- check trajectory and free up agenda to make time
2 days before ISS pass:
- check weather forecast
2 hours before:
- start up laptop, check software (Labview has a tendency to crash randomly!)
- bring telescope outside, set up telescope mount such that highest point of transit is perpendicular to polar axis of equatorial mount. So the perpendicular-to-equatorial plane should intersect the highest point of the transit. We want the highest point of the trajectory at declination = 0 degrees to get highest sensitivity on our motors.
- Align 3 axes: Telrad, guidescope, main telescope
- Focus main tube on bright object (moon, jupiter, bright star).
- check that telescope can slew over entire predicted trajectory (or as much as possible)
2 min before
- switch to manual mode, use XBox controller to move around, get familiar with up/down, control, etc
- start scanning the sky for ISS
During ISS pass
- use Xbox controller and Telrad to point telescope at moving target
- once ISS is in the center of the Telrad and velocity is approximately correct, press "A" button to enable automatic tracking
- if program "locks on" then great!
- if program loses lock, then press "B" to enable manual mode and try again
- Use Sharpcap running on second laptop to save video file from Celestron Neximage webcam, adjust exposure using Philips webcam control driver
1 minute after
90% of the time: Curse and cry due to fog on lens, algorithm error, incorrect alignment of axes, clouds, car driving by, etc etc.10% of the time: PARTY!
1 hour after
Postprocessing of AVI file in Matlab (cropped to weighted centroid). No color adjustements, etc, performed.Any comments or questions definitely welcome!
Acknowledgements:
Oom Hank Verwest and late Aunt Barbara Verwest for kindly giving me the Celestron C8 telescope tube.
Thierry Legault's website, Ralf van de Bergh, Sylvain Weiller and Atroguyz for inspiration
Thanks to my girlfriend Fernanda for spotting ISS, but mostly for keeping me company through all the failed attempts at capturing ISS :)
Sunday, June 15, 2014
How does World Cup Spray work?
| Hassan Ammar/Associated Press |
In this World Cup, I was surprised when I saw a referee draw a white line on the ground for a free kick. "What a great idea!" I thought. But how does it work? Numerous google searches turned up meaningless articles such as this that basically describe the working principle of the spray as "you spray it on the ground and it leaves a line." NO SHIT SHERLOCK...
So how does it really work? Well, the can is under pressure, probably somewhere around 5 atmospheres of pressure, depending on the strength of the can. The main ingredient is water (80%). A mixture of gases are used to propel the surfactant out of the can, including butane, isobutane, and propane. Once the high pressure mixture of ingredients leave the can and enters the atmosphere, they expand and create a foam on the grass.
The most important ingredient is "polyoxyethylenated sorbitan monolaurate" (aka Tween20 at a concentration of around 1%). This molecule is known as a surfactant (more about this later!) The chemical structure is shown here (from Wikipedia):

There are also some preservatives to prevent Bacteria from growing in the spray can if it's left on a shelf for a long time.
My interpretation of how the spray works is based mainly on the patent by the inventor that I found here: http://www.google.com/patents/US20120148741
Looking at this molecule, the left side is hydrophillic (likes water) and the right side is hydrophobic (likes sticking to hydrocarbon molecules such as butane, isobutane, and propane!) This is the key concept of how a surfactant works: it will stick to the interface between the water and the butane, to form surfaces. This allows the butane to form small drops in water (an emulsion) instead of just phase-separating with all the butane in one half of the can and the water in the other half of the can.
The other key concept is the phase change that Butane undergoes. The hydrocarbons that are under pressure (I would guess 5 atmospheres of pressure) in the can, expand to many times their volume when the enter the atmosphere. This is because Butane is a liquid at room temperature, for pressures greater than 2.5 atmospheres (density of 599 kg/m^3), but it is a gas at pressures below 2.5 atmospheres (density of 2.48 kg/m^3). So the Butane expands to ~250 times its volume when it leaves the can. It turns from a liquid into a gas and expands into massive bubbles. The water in the can doesn't change volume because it's a liquid at both atmospheric and can pressures.
So the expanded butane drops make a foam on the grass, which scatters light and makes it white in appearance. In my drawing, I only showed a few bubbles, but in reality there will be billions of them.
Eventually, the bubbles of propane will combine, pop, and evaporate, leaving only a residue of the surfactant (Tween20) and water on the grass. What makes the bubbles scatter light is the billions of interfaces of differing refractive indexes. Once these interfaces combine to form a thin layer of Tween20, they no longer scatter light, and become invisible.
Now you know: that's how World Cup Spray works!
Some of the other ingredients in the can are: a chelating agent "tetrasodium EDTA acid" at around 2% composition. A chelating agent is basically just a chemical that binds to metal ions. Who cares about metal ions? Well, metal ions (such as those that make up the can) have a tendency to break polymer chains such as the one that is used in the foam. So basically, the chelating agent helps preserve the important Tween20 chains from breaking down during storage in the can.
There are also some preservatives to prevent Bacteria from growing in the spray can if it's left on a shelf for a long time.
I made a schematic diagram of how I understand the can's operating principles. If you have questions, or think that my interpretation is wrong, please let me know and I'll update it! In particular, I'm not sure about the exact state of the foam while it's on the grass surface. Are they bubbles of propane? Or maybe not spherical bubbles?
My interpretation of how the spray works is based mainly on the patent by the inventor that I found here: http://www.google.com/patents/US20120148741
Sunday, February 2, 2014
The thermodynamic limit of bitcoin mining
There has been a trend in improving energy efficiency of Bitcoin mining machines. But how good can they get? What are the fundamental limits to the hashrate? What is the ultimate GH/J?
We can use thermodynamics to explore this possibility. If we treat the computation of a SHA256 hash as a simple operation, with a single bit of entropy required to calculate, then the energy expended to perform the hash is equal to the Landuaer limit: k*T*ln2. The blackbody temperature of outer space (caused by the cosmic microwave background left over from the big bang) is: 2.7K. So if we built a computer that was operating at 2.8 K and was radiating waste heat into outer space at 2.7K, we could theoretically perform each hash at 1.38E-23 J/K * 2.7K = 3.7E-23 J/operation, or inversely, 2.7*10^13 GH/J, or around 13 orders of magnitude better than the current Bitcoin miners! So plenty of room for improvement.
So now if we harnessed the entire power of the sun to perform bitcoin operations, with around 3.8*10^26W of power, in theory we could perform: 3.8*10^26W/ 3.7E-23 J/operation =10^49 operations per second. The current Bitcoin mining network performs around 2*10^16 Hash/s, and so there are around 33 orders of magnitude left before the entire power of the sun is consumed calculating Bitcoin hashes.
OK, now what if someone built a hyper-efficient computer? What would happen to the difficulty of mining? Well, currently, the "target" to create a new block while mining on the Bitcoin network is: 0000000000000001F52C00000000000000000000000000000000000000000000
And so, the Bitcoin system is pretty much OK with any foreseeable improvements in computational speed.
We can use thermodynamics to explore this possibility. If we treat the computation of a SHA256 hash as a simple operation, with a single bit of entropy required to calculate, then the energy expended to perform the hash is equal to the Landuaer limit: k*T*ln2. The blackbody temperature of outer space (caused by the cosmic microwave background left over from the big bang) is: 2.7K. So if we built a computer that was operating at 2.8 K and was radiating waste heat into outer space at 2.7K, we could theoretically perform each hash at 1.38E-23 J/K * 2.7K = 3.7E-23 J/operation, or inversely, 2.7*10^13 GH/J, or around 13 orders of magnitude better than the current Bitcoin miners! So plenty of room for improvement.
If we assume a Moore's law type improvement in efficiency of doubling every 18 months, then the time it will take before someone develops a thermodynamically limited ASICminer will be 65 years or so. I expect that DNA-based and other soft-matter computers will be much more energy efficient than current CPUs. I think it's not crazy to believe that a soft-matter computer (ie DNA annealing computer) may improve the energy efficiency of Bitcoin mining by a few orders of magnitude.
So now if we harnessed the entire power of the sun to perform bitcoin operations, with around 3.8*10^26W of power, in theory we could perform: 3.8*10^26W/ 3.7E-23 J/operation =10^49 operations per second. The current Bitcoin mining network performs around 2*10^16 Hash/s, and so there are around 33 orders of magnitude left before the entire power of the sun is consumed calculating Bitcoin hashes.
OK, now what if someone built a hyper-efficient computer? What would happen to the difficulty of mining? Well, currently, the "target" to create a new block while mining on the Bitcoin network is: 0000000000000001F52C00000000000000000000000000000000000000000000
This number means that if a miner stumbles upon a hash that is less than this value, he/she wins the block reward. So around in in every 15 and 1/16 hexadecimals will be rewarded, which is (15 1/16)^17 = 7*10^18 hashes. So we expect each block to be solved in around: 7*10^18 hashes/2*10^16 Hash/s = 350 seconds, or 6 minutes or so. Now if we want to keep the block generation rate of the Bitcoin network the same, but with massively increased hashrate, the target just need to be readjusted. So what would the target have to be if we are using all of the power of the sun in a thermodynamically limited computer that radiates energy into space? Well, the target would have to be 10^33 times more difficult, or 33ln10/(ln16)=27 hexadecimals further to the right. So the target would have to be approximately: 000000000000000000000000000000000000000001F52C00000000000000000
And so, the Bitcoin system is pretty much OK with any foreseeable improvements in computational speed.
If you know how a quantum computer might affect these calculations (I don't), then please comment below!
Subscribe to:
Posts (Atom)











