What do you call a frequency that varies by a function?

94 Views Asked by At

I have a concept that I need to learn more about, but I don't know what it's called so I'm not sure what search terms to use to look for it.

I apologize in advance that while I'm comfortable with abstract concepts, layman's terminology is very much appreciated as I am self-taught. Likewise, I hope my explanation isn't too confusing. Thanks for understanding!!

Here's the concept:
I need to solve phasor [wave function] that is in the shape of a clothoid curve instead of in the shape of a circle. By "solve", I mean that if I sample it at a fixed position at a discrete moment in time, I can determine the height of the wave. [I say height, not amplitude, because I want the instantaneous value.]

I need to know what such a thing is named.

I don't expect a solution, I'm looking for a jumping off point.


Detailed Explanation

Background of the problem:
I'm writing a computer program that runs in real-time. Normally, when I have a wave function such as a sound or harmonic motion, I simulate a "phasor" [rotating circle] by updating the angular value every frame by delta time multiplied by my angular rate. e.g. a simple Euler integrator. (If it's touchy like a tight spring, I might use a higher order integrator, but the concept is still the same.) Then, to produce my sound, I compute the wave height by taking the sine of the angle at that instant in time and I write it to the sound buffer. This works like a champ.

If it's a driven oscillator, I "nudge" the phasor's velocity by the wave height of the driver at that moment in time, as if a torque/impulse were being applied. If frequencies are resonant, the circle will start to spin on its own and I get a harmonic tone. This, too, works well.

The problem:
Now, I'm suddenly faced with a wave function that isn't uniform and I'm not sure how to simulate it iteratively. The sticky part is I need to apply a driver to it, but the driver isn't uniform either.

I don't have a function for the driver. Instead I'm given the instantaneous angular velocity which can change arbitrarily from frame to frame based on user input. Thus, the only thing I have to work with is the target wave function. Technically, I don't have an equation for that either, but I have a mental image of the "feel" I want.

If in my imagination a sine wave feels like a circle, the waveform I wish to drive most definitely feels like a roller coaster loop. I'm quite certain it is a clothoid curve.

Now, I know the parametric form of a clothoid curve are the Fresnel integrals. Trying to converge a series every frame is little sluggish for real-time, but I have a working polynomial approximation that's "close enough", so I'm good there. I can calculate the Cartesian graph of the loop without too much trouble.

But now I want to apply a driver to the wave, aieeee.

With a sine function, it doesn't matter where on the circle I apply the torque because it's uniform. Likewise, it makes no difference which point along the curve I sample as long as I sample the same point every frame.

But now, neither of these things are true any more. The velocity [frequency] changes depending on my distance along the curve!

My gut instinct tells me if I were to imagine the driven wave as a woman's bracelet with a bead on it, the period of the bead would change as the frequency of the driver changes in time, but not in a linear fashion because of the nature of the underlying wave. I don't know that this is true, but my spidey-sense is tingling and it tells me something funny happens to the oscillation.

Hence, I'm extremely hesitant to just start sampling points or anything else that naive. I need more information to devise an approach.

Anyone have any idea what this might be called or what I should web search?

Thanks again!!!

1

There are 1 best solutions below

0
On

Bingo! I still don't have an formal name per se, but I do know how to solve the function. For anyone who might run across this:

The answer is far easier than it seems. Like all good math, the solution is completely obvious when you see it.

You need to solve the phasor as a sphere, not a circle. If you wrap the clothoid function (Euler spiral) onto a sphere, you can now iterate by rotating the sphere each frame, not entirely dissimilar to the way I was computing the sinusoidal.

The reason is straight-forward: An integral inherently defines change. You can't visualize change over space/time of a two dimensional form in two dimensions... it takes three. I should have realized this once I knew the parametric form of the clothoid curve was an integral.

There's a great paper here that goes into the math:
"Orange Peels and Fresnel Integrals", Barthholdi and Henriques

But the crux of it is summed up in these two pictures:

orange of radius one with spiral of width 1/N

flattened out orange peel