Category Archives: random

How to prove that your car really is making that obnoxious noise

Our car has a feature called auto-hold. When turned on, you can bring the car to a stop, then take your foot off the brake and the car will keep the brake held for you until you press the accelerator. I really like this feature, but I’ve noticed that when I use it, I frequently hear a very high-pitch squeal from the driver’s side cabin. At first, I wasn’t sure if it was just my ears ringing, but I can reproduce it every time. Because the sound is so high-pitched, and because it’s relatively quiet, I wondered if there was a way that I could prove the sound was really there.

## The game plan

1. Record the sound with and without auto-hold (plus a baseline from a quiet room)
2. Perform spectrum (Fast Fourier Transform) analysis on the audio to examine the amplitude at different frequencies
3. Compare the spectrum plots from all three scenarios and look for anomalies

## Recording

Recording was easy enough. The iPhone has a Voice Memos application that can capture recordings of arbitrary length. I wasn’t sure if the built-in microphone had the range required to capture the noise, but I’d find out soon enough. I took 3 recordings of both scenarios:

* With auto-hold: Turn on auto-hold, bring the car to a stop, then record 10 seconds of audio
* Without auto-hold: Turn off auto-hold, bring the car to a stop, then record 10 seconds of audio

## Spectrum Analysis

With recordings in hand, it was time to have a look at a spectrum analysis. Spectrum analysis is something that blows your mind the first time you see it. The process uses some very fancy maths to break a signal (recording) apart in to a histogram of the various frequencies that make up the sound in the recording. The x-axis is frequency (pitch), and the y-axis is amplitude (volume). It’s important to note that amplitude is measured in decibels (dB). Decibels are not linear. They’re actually logarithmic. Keep that in mind when we get to the graphs.

The open source audio editing application, Audacity, has the ability to perform [FFT spectrum analysis](http://manual.audacityteam.org/o/man/plot_spectrum.html) using a variety of algorithms. I transferred the audio from my iPhone to my Mac using iTunes, tediously dragged the files out of iTunes and renamed them (grrrrr), then imported them in to Audacity. I had to discard one of my auto-hold recordings because I forgot to turn the stereo off (it was quiet, but still there). Duh! Fortunately, I made three recordings.

With the audio imported in to Audacity, I selected the audio for a single track, then clicked Analyze, Plot Spectrum. I used Hamming window for my FFT analysis, which is a good general-purpose windowing algorithm. The result for an auto-hold recording looked like this:

Audacity Spectrum Plot

While the spectrum plots in Audacity looked amazing, it’s not possible to compare more than one at a time. Fortunately, there’s an export button that gives us a tab-separted text file with all the computed values. Looks like a great job for GNUPlot.

## Comparison of Data

To compare the spectrum data, I exported the data to files: auto_hold.tsv, brake_hold.tsv, and ambient_room.tsv. I then used the following GNUPlot config to plot the graph:

# Let’s output to a jpeg file
set terminal jpeg size 810,600
# set terminal x11 size 810,600
# This sets the aspect ratio of the graph relative ot the size
set size 1, 1
# The file we’ll write to
set output “x3-autohold-spectrum-analysis.jpg”
# The graph title
set title “BMW X3 Audio Spectrum Analysis” font “Arial Bold,13”
# Where to place the legend/key
set key left top
# Draw gridlines both the x and the y axis
set grid y
set grid x
# Label the x-axis
set xlabel ‘Frequency Hz’
# Use a small font so we can fit more labels on the x axis
set xtics rotate by 40 offset -1,-1.15 font “Arial,9” autofreq 1000,1000
# Only plot from 50 Hz to 15,400 Hz
set xrange [50:15400]
# Label the y-axis
set ylabel “Amplitude (dB)”
# Tell gnuplot to use tabs as the delimiter instead of spaces (default)
set datafile separator ‘\t’
# Plot the data
plot “./auto_hold.tsv” every ::2 using 1:2 title ‘Auto-Hold’ with lines, \
“./brake_hold.tsv” every ::2 using 1:2 title ‘Brake-Hold’ with lines, \
“./ambient_room.tsv” every ::2 using 1:2 title ‘Quiet Room’ with lines

The result:

X3 Autohold Spectrum Analysis

The quiet room plot gives us a good baseline for the noise profile of the recording equipment. Obviously, I don’t have a proper quiet room, but this should allow us to make relative judgements. The dB values on the y-axis are relative attenuation. That’s a fancy way of saying, “the sounds at this frequency were Y dB less than the maximum possible sound level”. We have to look at audio from an attenuation standpoint, because there is no absolute loudness when it comes to audio recording. You have a ceiling, from which you can relate to everything else.

The culprit sticks out like a sore thumb. When using auto-hold, there is a massive spike between 14 kHz and 15 kHz. Knowing that 20,000 Hz is about the upper boundary of human hearing, this looks like it should represent the sound I’m hearing. The actual peak values from the data files are:

Auto-hold: 14814.843750, -65.007362
Brake-hold: 14814.843750, -76.494194

That’s over 10 dB difference at the peak when auto-hold is on, versus when it’s off. Keep in mind that decibels are logarithmic, so the sound is over 10 times louder when using auto-hold! What’s interesting is that there is still some production of sound in that frequency during normal operation. They’re just not loud enough for me to hear. The car really is making an obnoxious sound when using auto-hold!

The only remaining question is whether the service department will take this as evidence of my claim, or whether they’ll just go all glassy-eyed on me and walk away. Either way, this was a lot of fun.

I’m like, totally CIA here

Sometimes you have one of those moments where you realize just how incredible the world is that we live in today. For example, The Bourne Supremacy was on television the other day, and I caught the scene where Jason Bourne was breaking in to the home of a former agent of the same clandestine program to question and then murder him… or not… or something. It’s a Bourne movie, what else would he be doing?

Anyway, the guy’s condo was awesome. I really like [modern minimalist architecture][method], and this guy’s condo fit the bill. I had to know more. I managed to remember that his name was Jarda and Bourne was in Munich, so I fired up the Googles and went at it:

Google search for “[bourne supremacy film locations](https://www.google.com/search?q=bourne+zurich+locations)”.

Click the very first result (ZOMG that was easy).

Hrm, not recognizing anything on [page 1](http://www.movie-locations.com/movies/b/bourne_sup_2.html)…

[Page 2](http://www.movie-locations.com/movies/b/bourne_sup_2.html)… [BINGO](http://www.movie-locations.com/movies/b/bourne_sup_munichhouse.jpg)!

And some clues…

> By now it should come as no surprise that the ‘Munich’ house of Jarda, the other remaining Treadstone operative, is also Berlin, on Kaiserstrasse, in the Wannsee district.

Google “[Kaiserstrasse Wannsee](https://www.google.com/search?client=safari&rls=en&q=Kaiserstrasse+Wannsee)” because, why the hell not?

Ok, so that’s a map, and there’s satellite imagery. Cool, but how can I get a better view? I think Bing has aerial photography from little planes or something. Let’s try that.

And [there are the condos](http://binged.it/ZbCjXJ).

Like, whoa.

[method]:http://methodhomes.net

What’s up with this Wave Disk engine?

I say this a lot, but “I’m no expert.” By this I mean that an engineer who specializes in this field would rip my little essay apart for technical inaccuracies and abuse of terminology. Fortunately for me, many people know less than I do and will not be similarly offended by my ham fisted treatment of the subject matter I’m about to attack.

Having said that, I’ve always been a gear head of sorts, and being a hacker, I’ve always been interested in non-traditional engine designs, so the wave disk engine simultaneously interested me and set off my bullshit meter. Most of the press coverage sucks wind. There isn’t a whole lot of appetite for loosely-detailed explanations of complex engineering phenomenon, but that won’t stop me from rambling on here. So, if you’re up for it, get comfortable in your chair and let’s talk about this new fangled wave disk engine.

The wave disk motor has hit “Hacker News”:http://news.ycombinator.com/item?id=2704614 a few times, so I’ve had some time to look in to it. I’m going to take a few kilobytes of text here explain my understanding of this new technology, which lies somewhere between a complete layman and an actual engineer. Hopefully it will help everyone understand a little more about this motor and why it is, indeed, significant.

*Introducing, the engine in your car*

The engine in your car is the most common type of gasoline powered engine on the planet. The long form description of the engine in your car would be something like: piston-in-sleeve, reciprocating, otto-cycle, internal combustion engine.

Let’s break that down:

_Piston-in-sleve_ – Inside the engine are cylinders, inside which a piston moves up and down. This up and down motion compresses the air/fuel mixture, which is ignited by a spark. The rapid expansion of gasses in this sealed compartment are the basis of energy production in this type of engine.

_Reciprocating_ – The piston that moves up and down is attached to a crank. This is the mechanism that converts the up/down motion of the pistons to rotating motion. It is not unlike a bicycle crank, where the pistons would be your legs moving up and down.

_Otto-cycle_ – Otto-cycle is frequently referred to as 4-cycle. It defines the steps required to draw the air/fuel mixture in to the cylinder, compress it, ignite it, then expel it… repeat.

_Internal combustion engine_ – Basically this means that the fire occurs inside the engine, as opposed to outside. Steam engines are a good example of external combustion engines. Also look up a Stirling engine for more fun times.

Google any of these terms and you’ll get more info than you can read in an afternoon. If you want a good overview, “HowStuffWorks has a nice one”:http://auto.howstuffworks.com/engine1.htm.

For the rest of the time here, I’m going to simply refer to this type of engine as an ICE (internal combustion engine). There are other types of ICE other than otto-cycle, but I’d like to keep it simple.

Despite all the complex engineering elements outlined above, the ICE operates on some basic underlying principles that you learned in primary school science class: if you heat something up, it’s volume increases. The burning fuel/air mixture is a simple means of heating the mass of gas inside the combustion chamber. Because the volume expands as it is heated, it forces the piston down.

The efficiency of this type of engine is limited by certain factors:

* The friction involved with all the moving parts required to regulate the otto-cycle
* The thermodynamic characteristics of the engine’s design

From here, the conversation gets pretty complex. This is where “I’m no expert” becomes very apparent. If you’re interested in further reading, google the Carnot cycle.

Here’s my layman’s understanding of the limits:

_Friction_ – The engines in our cars experience a lot of friction. Ever use a syringe? The principle mechanical operation of your car engine isn’t all that different. The piston experiences friction as it moves up and down inside the cylinder, and in addition, it must force air in and out of the cylinder through small-ish holes regulated by valves. Additional friction is present in all the rotating parts; and there are many. Lots of time, money, and effort has been spent decreasing friction and the resistance of air moving in and out of the engine. Virtually every performance mod you can do to your car’s engine has to do with these two limiting factors. The inherent mechanical complexity of your car’s engine prevents it from reaching high levels of efficiency.

_Thermodynamic characteristics_ – With this type of engine, we’re relying on the fact that we’re going to draw in a (hopefully) cold mass of air mixed with fuel, then light it on fire and harness the energy produced by its expansion. The problem is, we’re doing this deep inside a giant hunk of metal that is constantly soaking up a portion of this heat. This stolen heat energy must be dissipated – lest our engine begin to overheat – so we use a huge fan to blow across a radiator full of water that is constantly pumped through the engine. Both the fan and the water pump require energy to operate. Additionally, the piston moves only a short distance, so we’re not harnessing the entire heat cycle; only a small portion of it. The gasses that come out of the exhaust are still very hot. If you haven’t gotten the picture by now, the ICE leaks energy all over the place.

Despite the major limitations outlined above, this type of engine works well for us because it produces mechanical energy in a range that is easy to use. A typical ICE found in your car “idles” at around 800 RPM and can spin up to 5,000 RPM (much higher in many cases). This rate of rotation is easily geared to match the required traveling speed of an automobile. This is not coincidence. Using gears to change the rotational speed of mechanical energy means additional mass and friction in the driveline. The engine’s energy must be used to accelerate all that mass up to traveling speeds and overcome the increased friction. Overall, the ICE is a good fit for the automobile.

That’s just about all I have to say about the venerable ICE. It’s a fine piece of engineering that has served us well over the years, but I suspect its time is coming to a close.

*Ride the wave dude*

As the wave disk engine is yet to be released, details aren’t exactly plentiful. Although, it does share a lot of commonalities with another type of engine that has been around since the mid-twentieth century: the turbine. It’s probably easiest at this point to explain how the turbine differs from the ICE found in your car, rather than tackle the wave disk head on.

Coincidentally, a turbine is also an internal combustion engine (ICE), but I’m going to refer to it more specifically as a turbine, and continue to refer to your car engine as an ICE. That ought to bring the pedants out in force! Likewise, HowStuffWorks has a good article on “how a turbine works”:http://science.howstuffworks.com/transport/flight/modern/turbine.htm.

A turbine engine is, in ways, far simpler than a traditional ICE; and in other ways, more sophisticated. In operating principle, a turbine is a series of fans oriented axially inside a housing. Air is drawn in from one end, compressed through a series of fan “stages”, then mixed with fuel, ignited, and shot out the other end, passing through another series of fans.

All these fans are attached to a shaft. The pitch of the fans on the way in progresses to compress the air before it is mixed with fuel and ignited. The fans on the aft end of the turbine are like a windmill that harnesses the breeze. This breeze happens to be thousands of degrees Fahrenheit. The burning fuel air exits the rear of the turbine, rather than the front, because expanding gasses are lazy and generally like to leave through the nearest/least crowded exit. Since all the air is moving toward the back, the pressure at the front of the engine is higher, thus the gasses are happy to exit out the rear.

So you could think of a turbine like a desk fan blowing on a pinwheel, only instead of an electric motor powering the fan, there’s a giant ball of fire in-between, and the pinwheel is hooked up to a shaft that drives the desk fan. I’m probably losing you here.

Let’s talk efficiency and limiting factors. Turbines are generally more efficient than the ICE in your car because of a few mechanical advantages:

_Fewer moving parts_ – Well, maybe not fewer (there are a lot of fans), but simpler. Turbines are typically constructed of one or two shafts with a series of fans, and a burner.

_Conservation of motion energy_ – All the parts inside a turbine rotate consistently. They don’t change directions as the turbine operates. The pistons in your cars engine have to change from up to down in a very abrupt change of direction. This is not efficient.

_Less friction_ – The fans inside a turbine rotate on a shaft. They compress the air as it moves along by having very, very close tolerances with the tube shape of the turbine, but they don’t actually touch. Also, there are no valves and camshafts to operate.

Sounds good, huh? Turbines for everyone!

So why don’t we all drive turbine powered cars? For a few reasons. First, some practical limitations.

_Time consuming to start_ – The raging inferno that powers a turbine only happens when the fans are spinning really, really, _really_ fast. I’m talking hundreds of thousands of RPM here. This takes some time to get going. Not to mention, you don’t just go from cold to spinning 200,000 RPM without some wear and tear. A turbine takes far longer than the ICE in your car to warm up.

_Loud_ – Even small turbines emit a mighty roar. The combustion inside a turbine occurs very close to the outside air, and the exhaust leaving the turbine is traveling at a very high rate of speed. All of this results in a lot of noise. Mufflers for turbines are more complicated because of the forces involved. The rapidly exiting exhaust of a turbine is used to push jets through the air. That should give you some sense of the pressures involved, and remember, sound is just pressure waves.

_Rapid rotation_ – Remember how the ICE operates at a favorable rotational rate (RPM)? Turbines spin much faster. To add insult to injury, smaller turbines typically spin much faster than larger turbines. A micro-turbine may spin as fast as 500,000 RPM. That is 100 times faster than the engine in your car. The gearing required to slow this down to operational speed is heavy and involves a lot of friction.

_Slow rate of change_ – The high rate of rotation means lots of kinetic energy. Throttling a turbine up results in a gradual increase in rotational speed. During acceleration, a tremendous amount of fuel is consumed to little effect. This makes accelerating a turbine relatively inefficient. Turbines like to be run at a consistent speed, and when they are, they’re wonderfully efficient.

_It’s hot in here_ – The pressures and temperatures inside a turbine are extreme. There’s a lot of combustion going on, so the materials used in turbine construction must withstand these high temperatures. This means exotic metals like titanium are required.

_Expensive_ – Turbines are simple in principle, but exacting and demanding in practice. The aforementioned exotic metals as well as the tight tolerances make turbines expensive.

So where does this leave the wave disk? The wave disk is similar to the turbine in operating principle. Air moves in and out of the wave disk in a continuous motion. The mechanical components of the wave disk rotate in a consistent fashion (no changes in direction). The compression of the air/fuel mixture is performed by pressure waves (they call them “shock waves”).

There are significant differences, however. In a turbine, the movement of gasses in and out of the combustion chamber is limited only by air pressure. In the wave disk, the combustion chamber is actually closed for a portion of the rotation. This is a good thing. Trapping expanding gasses gives a greater ability to harness the expansion energy. Additionally, there appear to be no “stages” inside the wave disk. The mechanical construction is much simpler. This should make it less expensive to produce.

One of the greatest questions is rotational speed. The source links on the Wikipedia page for the wave disk indicate that “the rotational speed of a wave rotor is low compared with turbomachines”. They state this in the context of material stresses though, not operational practicality. How much lower is a big question.

That’s about all I’ve been able to gather about the radial flow wave disk at this point. I don’t know of any production units, so information is pretty scarce. It does appear to have some advantages over a traditional turbine, however. The significance of the simplicity of the mechanics involve cannot be understated. One of the primary reasons the ICE continues to dominate automotive applications is because the manufacturing process is well understood and not terribly demanding. Turbines, by contrast, require exacting precision, and the cost of failure is extremely high.

If the radial flow wave disk delivers on its promises, its most likely application will be driving a generator. I suspect that even with its simpler construction, the energy required to accelerate the engine will still be a hinderance. This means continuous, peak operation is where it’s at. Spool the wave disk up to run a genset and capture unused energy with batteries or other energy storage devices.

This is, ultimately, where the wave disk engine may fall flat. With a claimed 3.5x efficiency, it’s got a lot of room to run, but the process of charging batteries is inefficient, and most modern hybrids don’t rely on their batteries and electric motors for all of their propulsion and accessory (hello, air-conditioning) needs. What is the efficiency of the wave disk at 10% to 20% operating capacity? That’s a relevant question if you need the energy to drive things like air-conditioning and power accessories.

In the real world, the wave disk will be part of a greater system. Current hybrid cars still link the ICE directly to the wheels. With newer generations of hybrids, we may see this change. If we do, the climate for the wave disk engine will improve. Until it does, I don’t see it reaching practical, widespread application in the automobile.

I’m king of NYC!

Over the course of the last year or so, I’ve received a couple of strange emails and phone calls that I didn’t understand until a few months back when I finally replied to one of the messages and got some clarity. Apparently, a fellow named Brad Lander is running for City Council in Brooklyn. His website address is http://bradlander.com, which is of course very similar to mine.

So today, I received a cryptic message on my answering machine from guy named John E. (last name omitted to protect the innocent) claiming to be an old friend. Problem was, I had no idea who the hell John E. was. Thankfully, I made the connection between this call, John E’s Syracuse area code, and the emails and calls from the past.

Fortunately, “Mr. Lander”:http://www.bradlander.com/ seems like a really stand up guy (this cannot be a coincidence /cough cough/). I sure hope he wins so I can travel to NYC and throw my name around when trying to get a reservation at a good restaurant.

Stupid human tricks

This morning I watched my cat jump three times her standing height and I thought, “Gee, it must be cool to be able to jump three times your own height.”

Then I went about my business fixing breakfast, as my cat watched on from the bar between our kitchen and dining room. At that moment, I had another thought. I’ll bet my cat is thinking, “Gee, it must be cool to be able to get your own food from that big white box.”

Human: 1
Cat: 1

Let’s call it a draw.