0

I'm currently processing some data I acquired. The problem is: there's an element between the value I want to measure and my sensor (to be clear: there's a pipe between my microphone and the sound I measure). This pipe filters my signal X, through a transfer function H.

I want to deconvolve the measured signal to cancel the influence of this pipe (my microphone gets Y=H*X and I want X). I measured H, and fitted it:

 0.003682 s^4 + 90.87 s^3 - 4.835e05 s^2 + 1.051e08 s + 4.499e12
 ———————————————————————————————————————————————————————————————
  s^4 + 628.3 s^3 + 1.759e07 s^2 + 2.668e09 s + 4.053e12

I used the standard matlab function filter(b,a,Y) to reverse the filtering induced by H, with b being the denominator of H and a its numerator... this should inverse H. But instead of my deconvoluted signal, I get a vector of NaN.

Does someone know why? I've got absolutely no idea, I'm not very at ease with digital filtering...

A. Donda
  • 8,381
  • 2
  • 20
  • 49
  • Hi and welcome to SO! Can you please include your Matlab code, and if possible also an example of Y, so we can test this ourselves? My guess: you have an NaN in your data Y. – A. Donda Apr 13 '15 at 16:58
  • I checked it: no NaNs in my data, don't worry. – elduche Apr 14 '15 at 08:54

1 Answers1

2

Your transfer function's denominator has the same rank as numerator. That means, in time t(k), to calculate output y(k), you need the control in the same time, u(k). Sometimes it leads to problems, so (if you can) try identify H in other way - to get transfer function, where the rank of numerator is lower than rank of denominator. You can use for it toolbox in MATLAB, just write "ident" in the command window.

Otherwise, you can multiply your measured signal by inverse H. That means, if you get transfer function of H (and this is num[H]/den[H]), you should multiply your signal by den[H]/num[H]. This approach could bring a little delay, but I think this delay wouldn't so important.

Rafał P
  • 252
  • 1
  • 8
  • @elduche I hope you are checking for stability of the computed transfer function. The one you found has zeros in the right-half plane, which will become unstable poles when you invert. I would hearken to Rafal's advice. – willpower2727 Apr 14 '15 at 13:01