0

I'm trying to classify a stimulus-response relationship and would like to fit a filter that best explains the response. I don't really work in DSP so there may be some vocabulary I'm missing, but searching for filter fitting methods is only redirecting me back towards filter design. The best solution I can come up with is to use least-squares regression and build a filter that best defines the stimulus-response relationship. Is this a valid way to go about doing this or some keywords I should be changing during literature search?

For context: My stimulus is a wave with fixed amplitude and ramping frequency, and my response is a fluorescent signal from a protein. Trying to establish if a cell expressing the protein is reacting to the stimulus with a low- or high-pass filter and the eventual goal is to cluster cells together, so I'd like to describe the filter more quantitatively than just low or high pass.

Daniel
  • 1
  • 1
    Welcome to SE.SP! Without seeing the mathematical / algorithmic detail of what you're doing and, perhaps, a drawing of what you're working with and what you're trying to achieve, it'll be hard to answer this question as posed. – Peter K. Dec 13 '22 at 01:11
  • You may be thinking of system identification -- but if you would edit your question wit the information that Peter asked we could tell you for sure. – TimWescott Dec 13 '22 at 01:15
  • 1
    This will only work if your system is reasonably linear and time invariant (which I kind of doubt). I think the first step would be here to run some simple linearity and time invariance tests and take it from there. – Hilmar Dec 13 '22 at 09:43

1 Answers1

1

The stimulus-response relationship is the "Frequency Response" of the time-invariant system, and describes the linear translation in the frequency domain from input to output. Using a stimulus and response to determine the frequency response is referred to as "channel estimation", and a common least-squares technique for doing this is summarized in this other post.

To do this given a stimulus and response requires the stimulus to be "spectrally rich", meaning it contains sufficient energy at all frequencies of interest within the desired frequency bandwidth. This is clear since for a linear time-invariant system a single frequency at the input will result in the same frequency at the output, modified in amplitude and phase. Superposition applies, meaning if we apply a stimulus with energy at multiple frequencies; then for those frequencies (and only those frequencies) we can determine the resulting magnitude and phase response.

A ramping frequency (otherwise called a "chirp") is one ideal stimulus for doing such channel estimation. Another commonly used stimulus is a pseudo-random sequence. For a chirp specifically please also see this alternate approach deriving the frequency response from the FFT of the chirp response.

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135