# Correcting signal

1. Aug 12, 2011

### rarara

Hello folks,

I am an out-of-my-depths biologist looking for some guidance. I have a reference signal and 2 other signals. Signal 1 independently measures the same event as signal ref but signal 1 generally underestimates signal ref. Signal 2 is measured the same way as signal 1 but but it measures a response to signal 1. What I would like to do is 'correct' signal 2 by taking advantage of the fact that signal 1 and signal ref are correlated (signal ref is far more accurate/reliable than signal 1). So far I've managed to align the three signals as best I can by cross correlating each pair and adjusting them by the appropriate delay. The delay adjusted signal ref and signal 1 have a normalized correlation coefficient r = 0.8 at lag = 0. For the other two pairs r > 0.5 at lag = 0. I was hoping that by aligning them I could find the factor by which signal ref and 1 vary at each time step and adjust signal 2 by that factor - but this isn't churning up good results.

Does anyone have any suggestions?

appreciated

2. Aug 12, 2011

### MisterX

Do you want to fix the lag between the reference signal and the other two signals? You could find the cross correlation between the reference signal and signal 1, and then delay the reference signal by the time of the maximum cross correlation. A positive time for the maximum of $(ref \star signal1)$ could indicate signal1 was delayed relative to the reference signal.

It doesn't seem right to me to attempt to "correct" the the signals at all using $(ref \star signal2)$ or $(signal1 \star signal2)$, without knowing more about the system producing the response.

Also, is the reference signal periodic? If so, does the data length correspond to a whole number of periods? Have you been performing circular cross correlations?

Last edited: Aug 12, 2011
3. Aug 13, 2011

### rarara

I have already done pairwise cross-correlation and 'shifted' all 3 signals to maximize 0 lag correlation.

Here is the problem in more detail. I have an accelerometer (reference signal) on a plate that is fixed to an electrodynamic shaker. The electrodynamic shaker vibrates the plate at increasing frequency and amplitude (sine wave). Attached to the plate is a cantilever with one end fixed to the plate. The cantilever is approximately 0.1 mm thick and 6 mm long. I have a high speed video camera recording the vibrations of the cantilever. I use video tracking software to find the acceleration of cantilever free end and the base that is fixed to the plate. It is, for a number of reasons, quite difficult to establish the pixel to real world scale with accuracy and so the acceleration of the fixed end is underestimated relative to the accelerometer. Since the accelerometer acceleration and the base acceleration are highly correlated, I would like to use this fact to modify the free end acceleration, in place of having an actual accelerometer on the free end.

Since the 3 signals will never be perfectly aligned I cannot simply correct the free end by the difference between the accelerometer and the base. I imagine this must be possible but I am unfamiliar with what technique to try.

Greatly appreciated

4. Aug 17, 2011

### Squatchmichae

Just to be clear (sorry to answer with a question), are you attempting to change the (1) amplitude of the signal (2) the frequency content of the signal or (3) add a signal to the accelerometer plate such that is not so over-estimated? It sounds as though you want to do (3). I am unclear as to what your problem statement is exactly...I would guess you want to design a 'matched filter' for the accelerometer.

It sounds like you are trying to accomplish (1), at each time step--so you are in essence looking for the ratio of their fourier-transform magnitudes, and the difference between their fourier-transform phases.

Sorry we are thick headed--it sounds like an important problem. I think you can provide an attachment if that helps us.