Aligning 2 Signals as a function of third signal

I have two signals which are from the same data, at same data logging frequency, source and need to be aligned. Say Temperature 1 and Temperature 2.
Temperature 1 and Temperature2 are logging gas temperature at different locations. As the gas flow will change, the lag between the two measurement devices will change.
I am trying to get help with a transfer function such that
Temperature2(ii) = Temperature1(ii + b*gas flow) so this will dynamically shift the indicies of variable Temperature1 according to the gas flow.
When flow is above a certain threshold, coefficienct b will be a low value while when flow is low, b will be a larger number showing the transport delay
Note: I am using temperature for as an example for the signals.

 Accepted Answer

I am not certain what you want to do.
See if the alignsignals function will do what you want. Another option may be findsignal.
.

6 Comments

already tried and it didn't work.
I will edit to question to add more clarity. Thanks for the feedback
This:
Temperature2 = Temperature1(a + b*gas flow)
would appear to be a simple linear regression, although a multiple linear regression or nonlinear regression might be more appropriate.
For a simple linear regression, the polyfit and polyval functions could do what you want.
It would help to have a representative sample of the signals, and a description or illustration of the desired result.
.
let me try mlr and nlr and will update you.
thank you.
so, i finally decided to use the advection equationand it solved the problem for the transport delay.
you answer was inline with my question so i am accepting the answer.
thank you for the help.
Thank you!
As always, my pleasure!
.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!