0
$\begingroup$

I have generated a Thrian fractional delay filter using (thiran function) in MATLAB

h=thiran(0.3,1) 

where 0.3 is the time delay and 1 is the sample time. The output is a discrete time transfer function, the generated filter is all-pass, infinite impulse response (IIR) filter.

The problem is that I could not apply it to a signal x(t). So I would like to know how to filter a signal with the generated thiran filter in MATLAB, what should I use to filter a signal with thiran filter? I can generate thiran filter using (thiran) function and the result will be a discrete time tf, but how to use it to filter a signal. I have tried to use filter, conv and tf functions but they all did not work:

filter and conv functions did not work because they require polynomial coefficients or numerator and denominator coefficients b and a, whereas thiran function generates a discrete transfer function.

[num,den] = tf(d) 

function did not work because it can only convert a filter transfer function which is configured by designfilt function, so in this case d cannot be a thiran filter, d can only be configured by designfilt function

$\endgroup$
3
  • $\begingroup$ which command have you used to generate the filter? to which class does the output belong ? Without these informations it is difficult to help you. Please read How to Ask $\endgroup$ Commented Mar 9, 2018 at 11:23
  • $\begingroup$ @Irreducible I have edited my question, it is much clearer now, thanks $\endgroup$ Commented Mar 9, 2018 at 11:46
  • $\begingroup$ you should type whos h and you would see that it is a tf class. You can also see this in your workspace. Googling: (how to apply a tf on time series?) gives you the idea to apply lsim(h,x) ... $\endgroup$ Commented Mar 9, 2018 at 12:10

1 Answer 1

2
$\begingroup$

try this:

h=thiran(0.3,1);
num=  cell2mat(h.Numerator);
denum=cell2mat(h.Denominator);
output=filter(num,denum,x)

Hope that helps

$\endgroup$
1
  • $\begingroup$ Thanks very much, that solved my problem, really helpful $\endgroup$ Commented Mar 9, 2018 at 13:42

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.