# interpolate 1D signal depending on 3D parameter space

I have a 1D array of data d(x,p) in which a number of "bumps" or "dips" appear and/or move in the spacial dimension x, depending on 3 parameters p = (p1, p2, p3). I know d(x,p) on a regularly sampled grid in the 3-D parameter space, but now want to interpolate between those samples for arbitrary values of the parameter vector p.

I know how to do a 3D interpolation of 1D data, however this does not really do what I want: suppose a bump moves to a different position upon changing one parameter, but does not change it's amplitude, interpolating the signal would just cause a lower amplitude and wider width of this bump.

I tried fitting the bumps and then interpolating their parameters, however this also does not work since both the number of bumps, their position and amplitude changes.

So I thought that there might be ways of interpolating in Fourier space, however I have very little knowledge about this kind of signal processing. Are there standard methods of achieving this or could someone point me to relevant works or at least keywords to look into?

Here's some made-up data that should illustrate the problem:

• Can you please talk a little bit more about the problem? What are $d$ and $p$? Are you trying to find a mapping between $p_1,p_2,p_3$ and $x,p$? Are $p$ and $p_n$ related? – A_A Aug 2 '18 at 9:04
• $d$ is a curve of real data points on the spatial grid $x$. $p$ is the vector of the three parameters, $p_1, p_2, p_3$ that affect the shape of $d$. A simple version would be a constant background value and $p_1, p_2, p_3$ determining the position, amplitude, and width of a bump on top of the background. However that problem could simply be solved by fitting the peak and interpolating the fitting parameters. The real problem is more complicated since the three parameters influence a variable number of bumps in a non-linear way. – John Smith Aug 2 '18 at 15:35
• What sort of "control" do you require on $d$? Do you need to know where these bumps are or simply how dense they are? The Fourier representation will not help if you need location. (is $x \in \mathbb{R}^2$ always?) Is it possible to mention the application domain? – A_A Aug 2 '18 at 15:48
• $x \in \mathbb{R}^1$. Application is interaction of gas dynamics with gravity in a astrophysical disk, $d$ is the density profile. Calculating the curve $d(x)$ for a set of the three parameters $p_1, p_2, p_3$ takes very long, so I can just run a small sample in parameter space, but I would like to be able to interpolate between them. Since simple interpolation does not work so well, I thought that there are some trick in Fourier space since the pattern changes smoothly (bumps move apart, get weaker, ...) – John Smith Aug 2 '18 at 16:01
• I am sorry but I am a little bit confused, where does "...spatial..." come in then? $x$ is one dimensional, $d$ is a curve over $x$, there is an unknown / cumbersome mapping $f:\mathbb{R} \leftarrow \mathbb{R}^4$ that generates $d$ as $d = f(x,p_1,p_2,p_3)$. You want to "connect" some qualities of $d$ with $p_{1 .. 3}$ (correct)?. I don't see how the DFT is going to help you, because the DFT is like another view over $d$. What are $p_{1..3}$ in terms of parameters? What are they physically? What do they represent? – A_A Aug 2 '18 at 16:18

What you are trying to do is "guess" the behaviour of $d$ given $p_1,p_2,p_3$ without going through a, potentially costly, full evaluation of the expression that generates it.

Is this interpolation? No.

Inteprolation will be handy, to a certain extent, but the problem sounds more like one of classification. If you treat it as classification then the Discrete Fourier Transform will also be useful.

So, given the values of the set of $p_i$'s, is $d$ spiky, bumpy, smooth, other? "Spiky" now becomes a region of $p_i$. It doesn't have to be continuous, it doesn't have to be smooth. All you need to know is that as $p_i$ tends to certain places in this $\mathbb{R}^3$ space, $d$ is more likely to be "Spiky".

How do you decide if something is Spiky, Smooth or Bumpy? You look at its spectrum using the Discrete Fourier Transform. You use the spectrum as a feature that tells you what $d$ looks like. Specifically, sharp waveforms in the time domain give you wide spectra and vice versa. So, a spiky $d$, has a wide spectrum. A smooth slowly varying $d$ might show a few bumps at the low end of the spectrum but then die down quickly at the top end and of course flat $d$s will only have a DC component.

You will still not be able to do a full blown evaluation of $d$ across all combinations of $p_i$. First of all, some combinations of $p_i$ might be nonsensical, which is a good thing because it reduces the size of your search space. This is where interpolation comes in, by assuming that nearby values of $p_i$ lead to qualitatively similar $d$s. This is a judgement call but of course if the expression that leads to $d$ has $p_i$ involved in subtractions in some denominator, then small changes in $p_i$s can produce wild swings in the values of $d$. So, in the end, you might want to produce a "landscape" of $d$ for a quantised grid of $p_i$s.

Here is such a landscape but from another field:

The figure is reproduced from this paper

The authors take Jansen's model which models the behaviour of a population of neurons and want to see what happens when more than one populations are coupled together.

The model has a number of parameters but there is no function that tells you what parameters to plug to the model so that its output oscillates at a particular frequency. The model is capable of a wild repertoire of outputs from smooth, to fast oscillating to spiking to even just intermittent, a few spikes and then a saturated value.

So, the landscape that you see here was necessary to examine the behaviour of the coupled neuronal population when either of them was supposed to be oscillating in different ways.

(And yes, evaluation of Jansen's model for realistic waveforms (e.g. 20-30 seconds) is costly, the model is defined as a set of coupled differential equations which you have to integrate (carefully) across all the different populations you are trying to simulate. This can be very slow, especially when you try to do it at a very high level language with lots of layers between you and the hardware).

Your application is very similar to this but you are not as lucky as only being interested in oscillatory activity which has a well defined spectrum.

So, the challenge here will be how do you quantify the behaviour of $d$ using the right features to characterise the "bumpiness" (or smoothness) of $d$.

Just out of curiosity, what does the expression that lead to $d$ looks like?

Hope this helps.

• Yes, I also now realized that this is more of an inference or machine learning issue that a signal processing one. 20-30 seconds is still good as those results take ~days to run for a single parameter set. It's basically naiver-stokes with gravity. The gif I included is just made-up data. I don't have such a well sampled parameter space, just a hand full of grid points per dimension in parameter space. – John Smith Aug 3 '18 at 16:04
• @JohnSmith yep, sounds like a good brainteaser. 20-30 seconds is the duration of $y$. It takes maybe 1-2 min to generate something like that (or, at least that's how much it used to take). But, when you want surrogate data of hundreds of thousands of realisations to do statis testing, you can see that this "innocent" 60-90 seconds has a good bite. Can you afford to reduce the resolution of the Navier-Stokes domain?Any macro models that could roughly give you a shape and then go in depth to the interesting cases?Can you go parallel? Is it possible to evaluate progressively and abandon deadends? – A_A Aug 3 '18 at 16:33
• Not really, the resolution is needed and that's already a parallelized code. Some of the behaviors, like the width and depth of the main dip are well studied, but the smaller perturbations also matter. I'll talk to machine learning people then, thanks for your help - I'll accept the answer anyway. – John Smith Aug 3 '18 at 19:10
• @JohnSmith Good luck, sounds interesting anyway. – A_A Aug 4 '18 at 6:59