elduche
elduche

Reputation: 1

design a Matlab filter from measured transfer function

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...

Upvotes: 0

Views: 688

Answers (1)

Rafał P
Rafał P

Reputation: 252

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.

Upvotes: 2

Related Questions