0
$\begingroup$

I am trying to calculate the transfer function between one sensor with velocity timeseries data $y(t)$ and a witness sensor $x(t)$ which monitors position. Both sensors output data in volts, with a multiplicative calibration $C_{x,~y}$ to put $y(t)$ into m/s and $x(t)$ into m.

I would like the units of the amplitude part of my transfer function $H(f)$ to be m/m, rather than s. I denote this new transfer function by $\hat{H}(f)$. Am I doing anything wrong by calculating the transfer function by computing

$$ \hat{H}(f)=H(f)\times2\pi f $$ where I compute $H(f)$ via $\langle\mathrm{PSD}_{xy}\rangle/\langle\mathrm{PSD}_{y}\rangle$

with $\mathrm{PSD}_{x,y}$ the PSD of $C_xx(t)$ or $C_yy(t)$ and $\mathrm{PSD}_{xy}$ is the cross-PSD of $C_xx$ and $C_yy$? The extra factor of frequency enters from converting $y$'s PSD from units of velocity/Hz to position/Hz.

$\endgroup$
4
  • $\begingroup$ There's a number of problems with this question that makes it difficult to answer. You should probably edit your question with more information about what you're actually trying to achieve. Your $H(f)$ is not a transfer function in the signal processing sense, because it is not an input-output relationship, and because it loses all phase information. The shortest description I can think of it is a cross-channel spectral amplitude response. It's certainly not something that will fully inform you of how the system will behave. So tell us what you're really trying to do here. $\endgroup$ Commented Nov 17 at 18:00
  • $\begingroup$ @TimWescott I'm new to this, so forgive (but direct me to resources to fix) errors. I'm trying to write down a function that takes in the time-domain response of sensor $y$ and produces a prescription for the output of sensor $x$ as a function of frequency. As far as I understand, the right object for this is the TF. I think I am concerned about the phase response, and if that information is lost via the conversion from velocity to position, that's good to know. But isn't the cross-PSD the same(ish) as a TF, it's just missing a factor of 1/PSD? So all the same problems are there. $\endgroup$ Commented Nov 17 at 18:28
  • $\begingroup$ @TimWescott I reread your comment and agree that I was being a little bit uncareful in my description of the problem. I have added some clarifying text after reviewing what is happening under the hood in the frequency-domain code I am using. $\endgroup$ Commented Nov 17 at 19:08
  • $\begingroup$ There's still about 100 different answers I could give, each one with a low chance of really answering your underlying question. Are you trying to verify $y$ given $x$? Are you doing this in the time domain or the frequency domain? Assuming that you are verifying, what's your criteria for "good"? Is this a factory inspection sort of thing, or a built-in-test thing, or what? If you know that one sensor reads velocity and the other reads position, why not just take the derivative of the position sensor? $\endgroup$ Commented Nov 18 at 18:06

1 Answer 1

0
$\begingroup$

It looks like you are wanting to find the relationship between displacement measurements/estimates between two locations. Let's define your target displacement variables as an input $x(t)$ and an output $y(t)$ (both in meters). Your input, $x(t)$, is a direct measurement of displacement (having been converted to meters), but your output is instead a measure of velocity, $v(t)$, (having been converted to meters per second). We can either recover the output displacement in the time domain, or the frequency domain.

Given that velocity is the time derivative of displacement, $$\frac{d}{dt}y(t)=v(t)\tag{1}$$ to recover displacement in the time domain we perform an integration. $$y(t) = \int{v(t)dt}\tag{2}$$

Let $\mathcal{F}$ be the Fourier transform such that $G(f)=\mathcal{F}[g(t)]$. By the integration property of the Fourier transform,

$$\mathcal{F}\left[\int{g(t)dt}\right]=\frac{1}{j2\pi f}G(f)+\pi G(0)\delta(f)\tag{3}$$ where the second term arises to define the value at $f=0$, given the undefined nature of the first term. Taking the Fourier transform of $(2)$ then gives: $$Y(f)=\frac{1}{j2\pi f}V(f)+\pi V(0)\delta(f)\tag{4}$$ If you remove any rigid body motion, the average value of $v(t)$, prior to any "integration" step by direct subtraction of the mean or by low pass filtering, then $V(0)=0$. Depending on your application and desired result, this might make sense to do. Assuming you do remove the average value, your frequency domain estimate of the displacement becomes $$Y(f)=\frac{1}{j2\pi f}V(f)$$ Now that you have the proper terms, it is worth reviewing the units of the Fourier transform. Assuming you operate in the discrete domain (i.e., typical Discrete Fourier Transform or DFT), your units will not change between the time and frequency domains.

To then find the relationship between the input and output, you simply divide the Fourier transform of the output by the input. This contains the phase information that Tim was referring to. Recalling your units, you should note that this result would be in units meter per meter. $$H(f)=\frac{Y(f)}{X(f)}$$ The associated gain between the input and output is described by the Frequency Response Function (FRF): $$FRF(f)=\frac{|Y(f)|}{|X(f)|}$$ As an important caveat, $H(f)$ and $FRF(f)$ are only valid for describing Linear time-invariant (LTI) systems in which there is a linear relationship between the input and output at a given frequency. You can (and should) verify that this linear relationship holds by calculating a Coherence Function. This function will have a value near $1$ for frequencies with strong linear relationships and values near $0$ for frequencies with non-linear relationships. Any values of $H(f)$ and $FRF(f)$ that do not have a high coherence value are essentially nonsensical. The coherence function may be calculated from: $$C_{xy}(f)=\frac{|S_{xy}(f)|^2}{S_{xx}(f)S_{yy}(f)}$$ where $S_{xy}=H(f)S_{xx}(f)$ is the cross-spectral density, and $S_{xx}(f)$ and $S_{yy}(f)$ are the respective auto-spectral densities of $x(t)$ and $y(t)$, respectively. The auto-spectral densities can be estimated from $$S_{xx}(f)=|X(f)|^2$$ $$S_{yy}(f)=|Y(f)|^2$$ roughly, or more robustly in the presence of noise using an averaging approach like Welch's method.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.