# combine transfer functions

Started by August 15, 2003
```I have a transfer function as follows:

h(t) = p(t) - p(t - T)

where t is time, T is some real value, and p is the impulse function, p =
{1,0,0,0,...}. My question is, because T is a real value and not just an
integer, how can i implement a matlab function to evaluate h for some
arbitrary length?

I can implement h making T an integer and I can get the impluse reponse of a
fractional delay filter, like a lagrange filter. Can I just add the two
together? How do I "combine" the two impluse responses, one an integer
impluse response the other a fractional delay impluse response?

thanks,
jeremiah

```
```i mentioned i had the transfer function h(t) - that is incorrect! it is the
impluse response function i have!

sorry

"Parlous" <parlous@hotmail.com> wrote in message
news:vjqe7kbjicm07@corp.supernews.com...
>
> I have a transfer function as follows:
>
> h(t) = p(t) - p(t - T)
>
> where t is time, T is some real value, and p is the impulse function, p =
> {1,0,0,0,...}. My question is, because T is a real value and not just an
> integer, how can i implement a matlab function to evaluate h for some
> arbitrary length?
>
> I can implement h making T an integer and I can get the impluse reponse of
a
> fractional delay filter, like a lagrange filter. Can I just add the two
> together? How do I "combine" the two impluse responses, one an integer
> impluse response the other a fractional delay impluse response?
>
> thanks,
> jeremiah
>
>

```
```"Parlous" <parlous@hotmail.com> wrote in message
news:vjqeafbg14mm32@corp.supernews.com...
> i mentioned i had the transfer function h(t) - that is incorrect! it is
the
> impluse response function i have!
>
> sorry
>
>
> "Parlous" <parlous@hotmail.com> wrote in message
> news:vjqe7kbjicm07@corp.supernews.com...
> >
> > I have a transfer function as follows:
> >
> > h(t) = p(t) - p(t - T)
> >
> > where t is time, T is some real value, and p is the impulse function, p
=
> > {1,0,0,0,...}. My question is, because T is a real value and not just an
> > integer, how can i implement a matlab function to evaluate h for some
> > arbitrary length?
> >
> > I can implement h making T an integer and I can get the impluse reponse
of
> a
> > fractional delay filter, like a lagrange filter. Can I just add the two
> > together? How do I "combine" the two impluse responses, one an integer
> > impluse response the other a fractional delay impluse response?
> >

Are you saying that p(t) is the impulse response of a system or an "impulse
function" / unit sample?

Is the perceived problem that t is sampled and, therefore, defines what an
"integer time" is?  Maybe just sample at a higher rate to get "fractional"
values of t?

The equation says that you just add the two together (as in "subtract").
So, yes, you can just add the two together.  A block diagram for such a
system would look like this:

+-----+
|     |
in >-----+--------------->|p(t) |>---+
|                |     |    |
|                +-----+    |  +-----+
|                           |  |     |
|                           +->| sum |-----> out
|     +-----+    +-----+    |  |     |
|     |delay|    |     |    |  +-----+
+---->|  T  |--->|p(t) |>---+
|     |    |     |
+-----+    +-----+

So, if you are dealing with discrete arrays / sampled data / then the delay
T must be an integer multiple of the sample interval you've chosen.  By
increasing the sample rate in arbitrary integer increments like x3, x4, x27,
etc. then you decrease the increments between values of t / the sample
interval / and can set T to whatever degree of accuracy you'd like (using
ever-larger arrays of course).  This implies that p(t) gets zero-filled
between the original samples.

Here's an exercise for the student:
Note that the block diagram applies in the frequency domain as well (by
superposition).  So, you might calculate the spectra, from the FFT of p(t)
where the delay T in p(t-T) becomes an added linear phase shift term in the
FFT of p(t).  Then add the resulting spectra and then IFFT the result.  This
way the value of T comes into the values of frequency samples rather than
the spacing of frequency samples.  I think that's correct.  The resulting
temporal samples will be a sampled version of the output for whatever value
T might have.  [of course the phase shift has to be done correctly or h(t)
won't have purely real samples.
Really?  How can that be when an "analog" version would have p(t) shifted
and overlapped so that if p(t) is discrete then there will be pairs of
samples separated by T?

Fred

```
```"Parlous" <parlous@hotmail.com> wrote in message news:<vjqeafbg14mm32@corp.supernews.com>...
> i mentioned i had the transfer function h(t) - that is incorrect! it is the
> impluse response function i have!
>
> sorry
>
>
> "Parlous" <parlous@hotmail.com> wrote in message
> news:vjqe7kbjicm07@corp.supernews.com...
> >
> > I have a transfer function as follows:
> >
> > h(t) = p(t) - p(t - T)
> >
> > where t is time, T is some real value, and p is the impulse function, p =
> > {1,0,0,0,...}. My question is, because T is a real value and not just an
> > integer, how can i implement a matlab function to evaluate h for some
> > arbitrary length?
> >
> > I can implement h making T an integer and I can get the impluse reponse of
>  a
> > fractional delay filter, like a lagrange filter. Can I just add the two
> > together? How do I "combine" the two impluse responses, one an integer
> > impluse response the other a fractional delay impluse response?
> >
> > thanks,
> > jeremiah
> >
> >

Let me understand this correctly. You want to implement
h'(t) = p(t) - p(t - T')
where T' is the non-integer.

Let T'' = T' - T where T is the integer part. You have the lagrangian
interpolation filter to get you a delay of T''. That is, you have
h(t) = p(t) - p(t - T) (the integer part)
and
h''(t) = a p(t) + b p (t - 1) (the fractional part)

This is just an example as I don't know exactly what a lagrangian
filter looks like. But any interpolation filter interpolates a
fractional sample from the adjacent integer samples. Basically, I have
considered an interpolation filter that creates s(T') from s(T) and
s(T+1) as
s(T') = a S(T) + b s(T+1).

h'(t) = p(t) - a p(t - T) - b p(t - T - 1)

So, the answer is: You can't just add the fractional delay impulse
response
h''(t) = a p(t) + b p(t - 1) to the integer delay impulse response
h(t) = p(t) - p(t - T).
```
```well, how about this - i get the impulse response for both the integer delay
and the non-integer delay separately. Then, I take the original signal s and
convolve it with one of the impluse responses, then take that result and
convolve it with the other impluse response. This should be the same as
making one LTI system that incorporates the fractional and integer delay i
need, correct?

"Parlous" <parlous@hotmail.com> wrote in message
news:vjqeafbg14mm32@corp.supernews.com...
> i mentioned i had the transfer function h(t) - that is incorrect! it is
the
> impluse response function i have!
>
> sorry
>
>
> "Parlous" <parlous@hotmail.com> wrote in message
> news:vjqe7kbjicm07@corp.supernews.com...
> >
> > I have a transfer function as follows:
> >
> > h(t) = p(t) - p(t - T)
> >
> > where t is time, T is some real value, and p is the impulse function, p
=
> > {1,0,0,0,...}. My question is, because T is a real value and not just an
> > integer, how can i implement a matlab function to evaluate h for some
> > arbitrary length?
> >
> > I can implement h making T an integer and I can get the impluse reponse
of
> a
> > fractional delay filter, like a lagrange filter. Can I just add the two
> > together? How do I "combine" the two impluse responses, one an integer
> > impluse response the other a fractional delay impluse response?
> >
> > thanks,
> > jeremiah
> >
> >
>
>

```
```it seems to be working in matlab. i'll see as time goes on

"Parlous" <parlous@hotmail.com> wrote in message
news:vjt3n8qsgqa521@corp.supernews.com...
>
delay
> and the non-integer delay separately. Then, I take the original signal s
and
> convolve it with one of the impluse responses, then take that result and
> convolve it with the other impluse response. This should be the same as
> making one LTI system that incorporates the fractional and integer delay i
> need, correct?
>
>
> "Parlous" <parlous@hotmail.com> wrote in message
> news:vjqeafbg14mm32@corp.supernews.com...
> > i mentioned i had the transfer function h(t) - that is incorrect! it is
> the
> > impluse response function i have!
> >
> > sorry
> >
> >
> > "Parlous" <parlous@hotmail.com> wrote in message
> > news:vjqe7kbjicm07@corp.supernews.com...
> > >
> > > I have a transfer function as follows:
> > >
> > > h(t) = p(t) - p(t - T)
> > >
> > > where t is time, T is some real value, and p is the impulse function,
p
> =
> > > {1,0,0,0,...}. My question is, because T is a real value and not just
an
> > > integer, how can i implement a matlab function to evaluate h for some
> > > arbitrary length?
> > >
> > > I can implement h making T an integer and I can get the impluse
reponse
> of
> > a
> > > fractional delay filter, like a lagrange filter. Can I just add the
two
> > > together? How do I "combine" the two impluse responses, one an integer
> > > impluse response the other a fractional delay impluse response?
> > >
> > > thanks,
> > > jeremiah
> > >
> > >
> >
> >
>
>

```
```On Fri, 15 Aug 2003 15:50:41 -0400, "Parlous" <parlous@hotmail.com>
wrote:

>
>I have a transfer function as follows:
>
>h(t) = p(t) - p(t - T)
>
>where t is time, T is some real value, and p is the impulse function, p =
>{1,0,0,0,...}. My question is, because T is a real value and not just an
>integer, how can i implement a matlab function to evaluate h for some
>arbitrary length?
>
>I can implement h making T an integer and I can get the impluse reponse of a
>fractional delay filter, like a lagrange filter. Can I just add the two
>together? How do I "combine" the two impluse responses, one an integer
>impluse response the other a fractional delay impluse response?
>
>thanks,
>jeremiah

Hi jeremiah,

your "h(t) = p(t) - p(t - T)" is *not* a
transfer function.  "Transfer function" in typical DSP
lingo, is either a z-domain expression or a
frequency-domain expression.

h(t) = p(t) - p(t - T)

a "difference equation" meaning that it relates
time-domain variables.

Anyway, the impulse response of two cascaded
filters (connected in series) is the convolution
of the two individual filters' impulse rsponses.

Good Luck,
[-Rick-]

```
```"Rick Lyons" <ricklyon@REMOVE.onemain.com> wrote in message
> On Fri, 15 Aug 2003 15:50:41 -0400, "Parlous" <parlous@hotmail.com>
> wrote:
>
> >
> >I have a transfer function as follows:
> >
> >h(t) = p(t) - p(t - T)
> >
> >where t is time, T is some real value, and p is the impulse function, p =
> >{1,0,0,0,...}. My question is, because T is a real value and not just an
> >integer, how can i implement a matlab function to evaluate h for some
> >arbitrary length?
> >
> >I can implement h making T an integer and I can get the impluse reponse
of a
> >fractional delay filter, like a lagrange filter. Can I just add the two
> >together? How do I "combine" the two impluse responses, one an integer
> >impluse response the other a fractional delay impluse response?
> >
> >thanks,
> >jeremiah
>
>
> Hi jeremiah,
>
>     your "h(t) = p(t) - p(t - T)" is *not* a
> transfer function.  "Transfer function" in typical DSP
> lingo, is either a z-domain expression or a
> frequency-domain expression.
>
> I'd call your
>         h(t) = p(t) - p(t - T)
>
> a "difference equation" meaning that it relates
> time-domain variables.
>
> Anyway, the impulse response of two cascaded
> filters (connected in series) is the convolution
> of the two individual filters' impulse rsponses.

Rick,

You are correct about the grammar of course.
It should be "impulse response" rather than transfer function.

Given the impulse response as stated, the p(t) filters aren't in cascade but
in parallel with a differential delay of T.  At least I don't see how to get
a cascaded structure immediately out of this expression.

Fred

```
```Fred Marshall wrote:
>
...
>
> You are correct about the grammar of course.
> It should be "impulse response" rather than transfer function.
>
Fred,

That's not a error of grammar. "My toe hurts" and "My finger hurts" are
both grammatically correct. How many people do you know who call nuts
screws (they go on by turning, don't they?), or screws nails they're
both cylindrical fasteners, no?)? The right word can be very useful.

&#1215;&#2013265939;
Jerry                          &#2013266068;&#2013266096;&#2013266067;
--
"I view the progress of science as ... the slow erosion of the
tendency to dichotomize."                    Barbara Smuts, U. Mich.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```"Jerry Avins" <jya@ieee.org> wrote in message
news:3F3FF81D.7F1F10B9@ieee.org...
> Fred Marshall wrote:
> >
>   ...
> >
> > You are correct about the grammar of course.
> > It should be "impulse response" rather than transfer function.
> >
> Fred,
>
> That's not a error of grammar. "My toe hurts" and "My finger hurts" are
> both grammatically correct. How many people do you know who call nuts
> screws (they go on by turning, don't they?), or screws nails they're
> both cylindrical fasteners, no?)? The right word can be very useful.
>
>                                &#1215;&#2013265939;

Jerry,

Oh!  Yep.  Not grammar.

Fred

```