News:


  • April 25, 2024, 09:44:02 AM

Login with username, password and session length

Author Topic: Fourier Analysis of in-flight RPM  (Read 7206 times)

Alan Hahn

  • Guest
  • Trade Count: (0)
Fourier Analysis of in-flight RPM
« on: September 22, 2009, 07:50:15 PM »
Since this is the engineering board, I thought I might show you some work I have been doing.

SOme years ago I had an application that analyzed the sound from a recorded flight and then plotted the rpm you get from the plane in flight.

I managed to lose that application in a software upgrade, but just recently I rewrote the application.

My motivation is to compare how a IC engine compares with an electric motor in a CL plane.

Most of us flying electric use a speed control that has a governor on the motor--so the rpm stays constant during the entire flight. I have been curious to see how the common IC setups handle the power needs during the flight. This first post is my first installment. Just to whet your appetites (this is the engineering forum after all), I will continue to update this post with more info as soon as I can get things measured.

Today I will show you some flight info from Fred Krueger's Magnum 36 powered Tucker Special. Fred has modified the engine (basically blocking the boost port and adding some head gaskets and playing with the venturi size. More or less the engine is running is a rich 2 stroke/lean 4 stroke mode.

This data was taken by placing my Mac laptop near the pilot and recording the sound. This was done (thanks to a suggestion by Brett Buck) to minimize the Doppler effect---which I have directly verified completely dominates the apparent rpm variations when the laptop is located on the circumference of the CL circle. There is still a small Doppler effect from any residual wind, but its magnitude is small as  long as its velocity is ~10 mph vs the 50+mph of the airplane speed. This needs to be compared to the speed of sound, or about 770mph. So a 10mph wind will give an apparent rpm variation of (770+10)770 or about 1.3% (or 130 rpm at 10 krpm).

Briefly (I know, I know), I record the sound. After the fact, I run the sound file back into a fourier analysis--I analyze the sound in 0.1 s slices looking at the frequency components. Fourier analysis tells us that the engine sound can be decomposed into its fundamental harmonics. So for a 2 stroke at 10k rpm, the 1st harmonic is 10k, the second is 20k, the 3rd is 30k......you get the idea.

Now this would be true if the engine was running at a perfect 2 cycle combustion, firing exactly the same every rotation. But if it is partially 4 stroking, or firing non-evenly, you will also generate other harmonics. If it was a perfect 4 stroke, firing every other cycle, and perfectly off in between, then you would see the first harmonic at 5000 rpm, the second at 10k, the third at 15k, ....

The actual engine is somewhere between these two extremes---at least Fred's is running this way.

So one thing I do is to claim the first harmonic is 5000 rpm, the second 10k,... In this extreme, if the engine is running in a pure 4 stroke, I would see the roughly equal numbers of "odd" harmonics (5000, 15000, 25000 or 1, 3, 5....) as "even harmonics (10k, 20k, 30k....). As you will see the actual run is a complicated mix, but I define a measure which is =1 if a pure 2 stroke --only even harmonics) and =0.5 if pure 4 stroke (even and odd).

So after all that here is a graphic of part of Fred's flight. I show the calculated rpm, the "harmonic measure", and the loudness. Since the laptop speaker was fixed, the sound intensity did vary during the flight, and was particularly high during the overheads--when the engine was directly over the microphone.

I'll post the plot of the engine start up to the inside loops in the next post.

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #1 on: September 22, 2009, 08:04:20 PM »
Here is the plot of the first 90 seconds of the engine run.

The engine is started at ~30 s on the horizontal axis. Takeoff is at ~57 s. You can see the rpm jumps from 10250 rpm to ~10750 during the level laps. The rpm is the white trace, the green trace is the 2 stroke/4 stroke content. 1.0 is pure 2 stroke , 0.5 is pure 4 stroke. This of course is approximate. Fred's engine is cycling back and forth from 2-4 before takeoff. But you can see the green trace is jumping back and forth  a lot. So take it with a grain of salt. The red trace is the sound level. The laptop has a mike in the top of the screen, and this is facing in one direction, so the oscillation in the red trace between after takeoff at 60 s- is (I think) just the plane flying in front of the mike.

The dropouts you occasionally see (~51 s, ~58 s..) are due in part to some technical difficulties in my algorithms when the engine noise is contaminated by other sounds, or sometimes if the rpm is varying rapidly compared to the 0.1s sampling period.

The variation in rpm during the level laps after takeoff is basically due to the unloading of the prop when the plane is moving into the upwind direction and loading in the downwind direction. I see the same with my electric motor. The Doppler effect is too small to explain that large a difference (we were seeing winds at an average of 10mph during that part of the day).

The spikes at 84 and 93 s are due to the wingover.  The inside loops start at ~103s.




Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #2 on: September 22, 2009, 08:11:44 PM »
I should note that I have recently added an optical rpm sensor to a Skyray. This, along with my data recorder will give a second measurement of the rpm. However the sound gives extra info about the combustion process.

We have discovered it is possible to record the entire flight as a video, and strip out the sound to do the analysis. This coupled with the video picture allows us to see where exactly the plane is in the maneuver, a big help in understanding what is going on.

My intent is to first see what a Fox 35--set up in a "classic" 4-2-4 mode will show during a pattern. Then I plan to put on a LA25 and run in high rpm mode. Finally I want to put on a small 4 stroke to see how it performs. In all cases we will measure both the sound for analysis and take rpm data on my rpm sensor and data recorder (maybe also use my airspeed sensor with the data recorder).

Now if I can just keep that @(#$@^@ Fox running during the entire flight, I can post the results!

I have really been spoiled by electric power.


Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #3 on: September 22, 2009, 09:15:52 PM »
Here is an expanded region around the wingover to the loops. I tried to tune up the search region for the Fourier peaks, and managed to eliminate the dropouts. This is the same data as before, but a smaller time region, and a more careful selection of the range that the algorithm searches to find the rpm. It is a bit tricky.

This illustrates to some extent, the difficulties of dealing with a real engine run, sound, and the wide frequency region that the engine is running at--especially one that is doing a 4-2-4 dance. Real data is a bitch! n~

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #4 on: September 23, 2009, 07:49:07 AM »
Here are a few more details on how this works (these examples are some of the better looking samples).

First I show the raw sound waveform that I get from the microphone. As I mentioned, this is a 0.1s slice of sound. As a note, this particular sample at 8750 rpm would give ~14.5 prop rotations in the 0.1 s. This particular slice comes from 84.45s point, one that you can see in the blowup plot from the previous post.

Second is the Power Spectrum from this particular slice. The white trace is the Spectrum, and the red vertical dotted lines are the peaks my algorithm finds. It is a simple algorithm, it simply looks for the highest peak, and any peak which is at least 5% of this highest value. Note that you see peaks at ~9000 rpm, 14000 rpm, 18000 rpm, 22000 rpm.... The 14000 rpm indicates some evidence of a 4 stroke power pulse. If the engine was 2 stroking, this peak, and the ones at 22000, 30000,.. would be missing. Also note the peaks are all of different intensities, and occasionally missing entirely. Some of the missing ones are probably taken down by the muffler (after all it is doing something) and some "just because"!

In the third graphic I show how I figure out the engine rpm. Since I have to admit the possibility that the engine is 4 stroking, I take the peak rpms (17 were found in this particular example) from the Power spectrum and then divide them by a range of rpm values, starting from 4000 rpm up to about 6000 rpm (actually spaced 10 rpm apart). What you see plotted is the sum of all the squares of the remainder from the division. If I would divide by the actual engine rpm, this sum would be small. So by looking for the lowest value in the plot (~4380 rpm), I claim that is the 4 stroke rpm value, and the "actual" rpm is just twice that. Now I go back and check from the peaks, how many odd harmonics I see and how many even. If the engine was purely 4 stroking, I would see about as many even as odd. If it were 2 stroking, I would see mainly only the even harmonics --in this case 4380 * (2,4,6,8...) rpm.

And as I mentioned earlier, the data are not always as nice as this one--which I would claim is one that the engine is in a 4 stroke.

Offline John Witt

  • Trade Count: (0)
  • Captain
  • *****
  • Posts: 508
Re: Fourier Analysis of in-flight RPM
« Reply #5 on: September 23, 2009, 08:22:33 AM »
Very nice work and an interesting approach to messy data.

We electric enthusiasts are really getting spoiled--I couldn't miss the large RPM drop in the wingovers which the IC engine has during the climb and then the RPM increase in the dive --exactly opposite of what you want to happen.

I have just started trying  the outside squares, and man, I really don't want that plane to go any faster on the downline.

John
John Witt
AMA 19892
Edmonds, WA
"Houston, Tranquillity Base here. The Eagle has landed."

Offline Larry Cunningham

  • Red Hot Lover
  • Trade Count: (0)
  • Captain
  • *****
  • Posts: 855
  • Klaatu barada nikto my ass
    • Stephanie Miller
Re: Fourier Analysis of in-flight RPM
« Reply #6 on: September 23, 2009, 10:52:24 AM »
Wow, how cool. And interesting!

Thanks for posting this. Do you want an electric motor to run like an IC engine, or vice versa? H^^

L.

"24 hours in a day, 24 beers in a case. Coincidence? I think not." -H. L. Mencken
AMA 247439 - '09, '10, '11, '12 and '13 Supporter of this site..

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #7 on: September 23, 2009, 12:20:02 PM »
Wow, how cool. And interesting!

Thanks for posting this. Do you want an electric motor to run like an IC engine, or vice versa? H^^

L.

"24 hours in a day, 24 beers in a case. Coincidence? I think not." -H. L. Mencken

Well I thought it would be interesting, from this forum's point of view at least, to understand what really is going on.  y1

Of course it may be more fun  #^ to argue about our perceptions of what is going on.

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #8 on: October 14, 2009, 08:28:03 PM »
If someone has a good piped setup, I would be interested in getting some recorded data from a flight. Main necessity is that the sound recorder should be located near the center circle. Also would be useful if the wind is nominal--e.g. stunt heaven type winds!

We don't have too many pipe flyers around here.

I've managed to analyze an old You-tube video successfully--but unfortunately in that case the sound (a video recording) was taken on the circle edge (understandable of course!). So that would be one way to transfer the info to me--make a you-tube video of the flight from near the center circle.


Thanks if anyone can do it.

Online Dennis Adamisin

  • 2019 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 4342
Re: Fourier Analysis of in-flight RPM
« Reply #9 on: October 15, 2009, 07:51:14 AM »
Alan:
Another angle:  Bob Reeves made a comment over in the electric forum, about his perception that his 4-stroke set-ups are good at holding constant RPM.  I tried pointing him over her; it would seem that a 4-stroke might be easier to handle (?) using your method because it has a regular firing pattern - no 4-2-4 break to worry about.
Denny Adamisin
Fort Wayne, IN

As I've grown older, I've learned that pleasing everyone is impossible, but pissing everyone off is a piece of cake!

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #10 on: October 15, 2009, 08:03:52 AM »
Actually I am able to handle the 4-2-4 setups quite well now (in the analysis of course) so it isn't a problem.

What I actually (re) discovered with this glow power flying is how spoiled I have become with the ease of an electric setup. My results now are limited by non-optimal glow engine setups--you do need to put forth some effort to get the glow engines tuned (fuel, tank, prop,....) to perform reliably.

I had been planning to stick on either my Saito 30 or 40 on the Skyray, but I am guessing that it would take me several flying sessions to tune it up correctly--and the weather has decidedly taken a turn for the worse. And then it would not be setup as well as the ones like Bob has.

Offline Bob Reeves

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 3415
    • Somethin'Xtra Inc.
Re: Fourier Analysis of in-flight RPM
« Reply #11 on: October 15, 2009, 10:24:18 AM »
This is cool.. If my laptop batteries hold up we are home free.. Don't believe I've ever ran it off the battery so might be toast. Never played with recording audio, will have to see if it has a built in mike, probably not it's fairly old.. Thanks Allan I'll do a little research..

Offline Bob Reeves

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 3415
    • Somethin'Xtra Inc.
Re: Fourier Analysis of in-flight RPM
« Reply #12 on: October 16, 2009, 08:17:49 AM »
Alan,

I would very much like to get into your head on the software. Sounds like you wrote it? I have been writing video capture and hardware control stuff for more years than I like to admit but my expertise is in capturing still photos of fast moving objects, manipulating graphics and controlling equipment. Analyzing sound files is something I've never messed with and sounds like fun.

Mind sharing a few details? Did you use a 3rd party library (code) for the Fourier Algorithms or develop them yourself? What language?

Thanks
Bob

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #13 on: October 16, 2009, 09:04:02 AM »
Hi Bob,
Actually I am using LabVIEW software. It has an extensive math library. However I think Fourier transform libraries are available (free) for many platforms (software and hardware). Because of the libraries, the math is the easiest part. I simply slice out 0.1 s bites from the sound file, shove it into the Fourier Power Spectrum subroutine.

The harder part was actually deriving the rpm from the many peaks -- avoiding finding false values, and dealing with noise sources on the sound recording---like the pilot talking  HB~>, or full scale planes landing at a nearby airport, and occasional wind gusts. But right now once I get the sound file (see following paragraphs), the rpm analysis takes about 6-8 minutes to run through a pattern. Usually I run it through twice--the first time to look for any issues--like the rpm range, and to identify any noise intrusions.

The LabVIEW has a simple routine for reading and writing WAV files. So when I take the audio data on my laptop, I use a LabVIEW app to take the data and write it to a file.

For other inputs (like camera video or you tube), I use a variety of techniques to get at the sound. Since I use a Mac, if the info is in a camera video file, I use iMovie to strip off the audio, and iTunes to take that audio and convert it to a WAV file format. For the Youtube flash files, I used RealPlayer Download app to get the video to my computer, than another 3rd party piece of software (Soundconverter) to strip out the sound, and then iTunes again to make the WAV file.  It sounds more tedious than it is.

The tedious part is going through the video (using iMovie) and marking off the maneuver times sometimes frame by frame, and then transferring that info (by hand) to my display application (also written in LabVIEW)--that's what is making the nice markers and things.

Offline Bob Reeves

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 3415
    • Somethin'Xtra Inc.
Re: Fourier Analysis of in-flight RPM
« Reply #14 on: October 21, 2009, 12:31:08 PM »
Finally stopped working on airplanes long enough to look up LabVIEW... Wow! a little out of my reach unless I can find it on a rogue site  :o

I now have a camera to record the flight but still have to find a microphone that will work with my laptop.. The camera will record video with sound at 320 X 240.. Wondering if I laid it on it's back in the center of the circle for a flight.. The video would show the laps and if it was placed down wind you might be able to tell when what was flown during the pattern, should be able to see my arm waving around? Think that would work? If it would I could do it with the camera and not have to mess with the laptop.

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #15 on: October 21, 2009, 01:01:40 PM »
I tried it once with the camera in the circle---I was holding the camera and another guy (Fred Krueger) was doing the flying. It actually wasn't easy since i was sitting on the ground (to stay out of the lines). So I missed the start of the wingover (since it was upwind) and also had a hard time following the maneuvers ---since you are a little too close. Might be better to simply lie down and try to point the camera in the general location. I didn't do that because the Canada Geese have been doing their thing on the CL circle!

However the sound file was just fine, even if the video left something to be desired! So I say try it.

Offline Bob Reeves

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 3415
    • Somethin'Xtra Inc.
Re: Fourier Analysis of in-flight RPM
« Reply #16 on: October 21, 2009, 04:54:40 PM »
We'll give it a shot as soon as posible. Problem is we are getting into that time of year when it's warm enough to fly it's because the wind is blowing out of the south at 15 - 20 MPH.

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #17 on: October 21, 2009, 05:18:05 PM »
Unfotunately for me, when it is blowing down there, it seems to come up here too!

I hope to get a few more flights on my instrumented electric Nobler. If that works, I could move the instrumentation (rpm sensor, airspeed indicator, and altimeter) over to my Brodak 40 Nobler. Coupling that with the video---to give a positive position information would give me a lot of interesting info.

Some day I need to spend the time actually learning to fly better!

Offline Bob Reeves

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 3415
    • Somethin'Xtra Inc.
Re: Fourier Analysis of in-flight RPM
« Reply #18 on: October 28, 2009, 10:06:43 AM »
<snip>
Some day I need to spend the time actually learning to fly better!

Ya, me too.. Trying to get things together for this weekend, weather looks like it might coporate for a change. Will let you know how it goes.

Offline Erik Janssen

  • Trade Count: (0)
  • Lieutenant
  • ***
  • Posts: 58
Re: Fourier Analysis of in-flight RPM
« Reply #19 on: October 29, 2009, 02:37:35 AM »
I started measuring the model speed with my canon powershot and powerpoint. I put the camera twice the line length away from the pilot and took a movie, with windows movie maker (XP) you can take a snap shot of the movie you are playing. I pasted this into powerpoint and put a line from the pilot to the model. Then I copied all the lines to one sheet to make the comparison.

I used my 1994 WCh model powered by an Aldrich ST.46 with a Zinger 11x6 3 blade prop which finished 21st in Shanghai.

This procedure is RSI heavy so I do not advice it for regular use.

I did some experiments with different props, smaller with more pitch and bigger dia with less pitch. It seems that diameter gives better results than pitch.
« Last Edit: October 29, 2009, 07:24:33 AM by Erik Janssen »

Offline Erik Janssen

  • Trade Count: (0)
  • Lieutenant
  • ***
  • Posts: 58
Re: Fourier Analysis of in-flight RPM
« Reply #20 on: October 29, 2009, 02:42:35 AM »
Something went wrong with the pics, here are the bigger ones.

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #21 on: October 29, 2009, 07:55:26 AM »
Erik,
That's great!

I agree about the intensive labor looking at frames. That's what I have been doing, but only at certain maneuver points. Even then it takes a lot of time looking through the frames, and noting times.

In my case, I didn't setup the camera location to measure speed, but I agree that it is probably the best way to actually do it.

Offline Erik Janssen

  • Trade Count: (0)
  • Lieutenant
  • ***
  • Posts: 58
Re: Fourier Analysis of in-flight RPM
« Reply #22 on: October 29, 2009, 09:25:41 AM »
I measured rpm on my electric motor and was very deceived, as long as you do not overprop the motor it will run within 50 rpm in governor, so nothing exiting.

For data logging I came across the Logomatic data logger, it is an analog device for 8 channels fully adjustable, very light and the best part is that it uses a micro SD card to write the data. It will create a new folder every time it is powered up. Up to 255 folders. This means that you do not need a laptop on the flying field for collecting data. I put an analog gravity sensor to it and can record line tension now. No programming involved, only a txt file to set some J and N to make it work right.

The device can be found at sparkfun.com at approx 60 USD

Offline Martin Quartim

  • 22 supporter
  • Trade Count: (0)
  • Captain
  • *
  • Posts: 802
    • StuntHobby
Re: Fourier Analysis of in-flight RPM
« Reply #23 on: January 15, 2010, 02:19:07 AM »

Very intresting topic.

I am not sure if this would be helpfull but you could get one of this cheap tiny MP3 player and fit inside the cowl to record the sound of the engine the hole flight. I believe you could later sync the sound file with a video too.

Martin



Old Enya's never die, they just run stronger!

https://www.youtube.com/user/martinSOLO

Alan Hahn

  • Guest
  • Trade Count: (0)
Re: Fourier Analysis of in-flight RPM
« Reply #24 on: January 15, 2010, 08:04:26 AM »
Martin,
yes that would work too.

What I am doing was motivated by trying to have recording that anyone could do. Like I mentioned before, I do have the capability of directly recording rpm using an Eagletree data logger and an optical sensor--along with airspeed and altitude. I haven't actually put my pitot tube in my Brodak 40-powered Nober (it is presently in my electric powered Nobler).

I did run the electric Nobler, with data recorder through a pattern with a video camera to record position information. What surprised me was that I found the data recorder timer was off about 1.6% (10 seconds out of 600s of the flight), so it was pretty tricky to scale the datalogger data with the video data--especially if you are trying to get timing at the 0.1 s level.

I didn't have that synchronization problem with my sound recorder and video camera , which implies to me that the timers in my computer (where I recorder the sound) and the timer in my video camera are a lot closer.

Just one of the painful details!

Offline Erik Janssen

  • Trade Count: (0)
  • Lieutenant
  • ***
  • Posts: 58
Re: Fourier Analysis of in-flight RPM
« Reply #25 on: January 18, 2010, 01:53:46 PM »
The logomatic wasn't built in switserland too, the logging at 20Hz is 1,6% off the real time clock. Thiy originally designed this software to work at different baudrates and the number they put in the timer is approximately the number for 20Hz.

When you change the original line in the software T0MR0 = 58982400 / freq;  with this: T0MR0 = 60000000 / freq; it runs at a perfect 20Hz but you cannot use the UART any more. Keep dividing that funny umber by 2 and you will see the baudrate appear. I guess Eagletree uses the same logic.

If you look at the amps you can determine where the model is, the low value in the lap is at the headwind position, the high value the tailwind position. You can count the laptimes from the amps in inverted flight, if you take the average of 5 laps it is quite accurate.



Advertise Here
Tags:
 


Advertise Here