From: Tim Wescott on
On 06/14/2010 06:13 AM, Rune Allnor wrote:
> On 14 Jun, 13:41, Pawel<prulikow...(a)gmail.com> wrote:
>> On Jun 13, 5:08 pm, Pawel<prulikow...(a)gmail.com> wrote:
>>
>>
>>
>>
>>
>>> On Jun 13, 4:08 pm, Tim Wescott<t...(a)seemywebsite.now> wrote:
>>
>>>> On 06/13/2010 04:44 AM, Pawel wrote:
>>
>>>>> Dear All,
>>
>>>>> I have a following question: how does one implement anticausal filter
>>>>> with backward filtering (or any other means)?
>>>>> I understand that x(n) with a transform X(z) when flipped gives
>>>>> flip(x(n)) the transform X(z^-1). According to this I can peform
>>>>> following flip(x(n)) and filter with the filter H(z) and then flip
>>>>> back the result Y(z)= X(z^-1)H(z) ->flip Y(z)=X(z)H(z^-1), where
>>>>> H(z^-1) is the transfrom of anticausal filter. Now if I have unstable,
>>>>> causal filter H(z) then H(z^-1) anticausal filter should be stable. I
>>>>> can't see how simply flipping x(n) would lead to the stable filter -
>>>>> the software do not know if the filter is stable or not it just
>>>>> calculate the response from the difference equation. Would the whole
>>>>> answer lay in the initial conditions of the filter? Would You please
>>>>> point me to some literature dealing with this problem.
>>
>>>> "I can't see how simply flipping x(n) would lead to the stable filter"
>>
>>>> By definition, if x(n) is the response to an entirely unstable system,
>>>> then all of its components are growing exponentials. A growing
>>>> exponential in positive time is a decaying exponential in negative time
>>>> -- hence, stability.
>>
>>>> If x(n) is the response to a system that is a mix of stable and unstable
>>>> elements (i.e. some of it's components grow and some shrink), then
>>>> running it in reverse will still result in an unstable system.
>>
>>>> --
>>>> Tim Wescott
>>>> Control system and signal processing consultingwww.wescottdesign.com
>>
>>> Hi Tim,
>>
>>> Thanks a lot. I am trying to implement this in Matlab, so I do
>>> fliplr(x), next filter it with the all-pole filter H(z)=1/[(z-2)(z-3)]
>>> - certainly unstable filter, next I flip the result back and I get
>>> this ugly skyrocketing response at the beginning (something like
>>> 10^46)- would it be caused by the problem of initial conditions. The x
>>> is randomly generated data that value varies between 1 and -1 of
>>> lenght of 100.
>>
>>> Thanks in advance
>>
>>> Pawel
>>
>>> Pawel
>>
>> Any help on backward filtering?
>
> Probably not. It seems you have all the pieces of the jigsaw,
> but is unable to put them together to a picture. No one can
> help you with that; it has to happen inside your mind.

Well, Vladimir or I will be happy to help you, under contract at our
usual rates. I'll even make sure that I've documented things well
enough that you understand it when I'm done -- he may, too.

There's advise and there's _work_, after all!

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Pawel on
On Jun 14, 4:43 pm, Tim Wescott <t...(a)seemywebsite.now> wrote:
> On 06/14/2010 06:13 AM, Rune Allnor wrote:
>
>
>
> > On 14 Jun, 13:41, Pawel<prulikow...(a)gmail.com>  wrote:
> >> On Jun 13, 5:08 pm, Pawel<prulikow...(a)gmail.com>  wrote:
>
> >>> On Jun 13, 4:08 pm, Tim Wescott<t...(a)seemywebsite.now>  wrote:
>
> >>>> On 06/13/2010 04:44 AM, Pawel wrote:
>
> >>>>> Dear All,
>
> >>>>> I have a following question: how does one implement anticausal filter
> >>>>> with backward filtering (or any other means)?
> >>>>> I understand that x(n) with a transform X(z) when flipped gives
> >>>>> flip(x(n)) the transform X(z^-1). According to this I can peform
> >>>>> following flip(x(n)) and filter with the filter H(z) and then flip
> >>>>> back the result Y(z)= X(z^-1)H(z) ->flip Y(z)=X(z)H(z^-1), where
> >>>>> H(z^-1) is the transfrom of anticausal filter. Now if I have unstable,
> >>>>> causal filter H(z) then H(z^-1) anticausal filter should be stable. I
> >>>>> can't see how simply flipping x(n) would lead to the stable filter -
> >>>>> the software do not know if the filter is stable or not it just
> >>>>> calculate the response from the difference equation. Would the whole
> >>>>> answer lay in the initial conditions of the filter? Would You please
> >>>>> point me to some literature dealing with this problem.
>
> >>>> "I can't see how simply flipping x(n) would lead to the stable filter"
>
> >>>> By definition, if x(n) is the response to an entirely unstable system,
> >>>> then all of its components are growing exponentials.  A growing
> >>>> exponential in positive time is a decaying exponential in negative time
> >>>> -- hence, stability.
>
> >>>> If x(n) is the response to a system that is a mix of stable and unstable
> >>>> elements (i.e. some of it's components grow and some shrink), then
> >>>> running it in reverse will still result in an unstable system.
>
> >>>> --
> >>>> Tim Wescott
> >>>> Control system and signal processing consultingwww.wescottdesign.com
>
> >>> Hi Tim,
>
> >>> Thanks a lot. I am trying to implement this in Matlab, so I do
> >>> fliplr(x), next filter it with the all-pole filter H(z)=1/[(z-2)(z-3)]
> >>> - certainly unstable filter, next I flip the result back and I get
> >>> this ugly skyrocketing response at the beginning (something like
> >>> 10^46)- would it be caused by the problem of initial conditions. The x
> >>> is randomly generated data that value varies between 1 and -1 of
> >>> lenght of 100.
>
> >>> Thanks in advance
>
> >>> Pawel
>
> >>> Pawel
>
> >> Any help on backward filtering?
>
> > Probably not. It seems you have all the pieces of the jigsaw,
> > but is unable to put them together to a picture. No one can
> > help you with that; it has to happen inside your mind.
>
> Well, Vladimir or I will be happy to help you, under contract at our
> usual rates.  I'll even make sure that I've documented things well
> enough that you understand it when I'm done -- he may, too.
>
> There's advise and there's _work_, after all!
>
> --
> Tim Wescott
> Control system and signal processing consultingwww.wescottdesign.com

Anyway, Thanks for Your ADVISE.

P
From: Tim Wescott on
On 06/14/2010 08:51 AM, Pawel wrote:
> On Jun 14, 4:43 pm, Tim Wescott<t...(a)seemywebsite.now> wrote:
>> On 06/14/2010 06:13 AM, Rune Allnor wrote:
>>
>>
>>
>>> On 14 Jun, 13:41, Pawel<prulikow...(a)gmail.com> wrote:
>>>> On Jun 13, 5:08 pm, Pawel<prulikow...(a)gmail.com> wrote:
>>
>>>>> On Jun 13, 4:08 pm, Tim Wescott<t...(a)seemywebsite.now> wrote:
>>
>>>>>> On 06/13/2010 04:44 AM, Pawel wrote:
>>
>>>>>>> Dear All,
>>
>>>>>>> I have a following question: how does one implement anticausal filter
>>>>>>> with backward filtering (or any other means)?
>>>>>>> I understand that x(n) with a transform X(z) when flipped gives
>>>>>>> flip(x(n)) the transform X(z^-1). According to this I can peform
>>>>>>> following flip(x(n)) and filter with the filter H(z) and then flip
>>>>>>> back the result Y(z)= X(z^-1)H(z) ->flip Y(z)=X(z)H(z^-1), where
>>>>>>> H(z^-1) is the transfrom of anticausal filter. Now if I have unstable,
>>>>>>> causal filter H(z) then H(z^-1) anticausal filter should be stable. I
>>>>>>> can't see how simply flipping x(n) would lead to the stable filter -
>>>>>>> the software do not know if the filter is stable or not it just
>>>>>>> calculate the response from the difference equation. Would the whole
>>>>>>> answer lay in the initial conditions of the filter? Would You please
>>>>>>> point me to some literature dealing with this problem.
>>
>>>>>> "I can't see how simply flipping x(n) would lead to the stable filter"
>>
>>>>>> By definition, if x(n) is the response to an entirely unstable system,
>>>>>> then all of its components are growing exponentials. A growing
>>>>>> exponential in positive time is a decaying exponential in negative time
>>>>>> -- hence, stability.
>>
>>>>>> If x(n) is the response to a system that is a mix of stable and unstable
>>>>>> elements (i.e. some of it's components grow and some shrink), then
>>>>>> running it in reverse will still result in an unstable system.
>>
>>>>>> --
>>>>>> Tim Wescott
>>>>>> Control system and signal processing consultingwww.wescottdesign.com
>>
>>>>> Hi Tim,
>>
>>>>> Thanks a lot. I am trying to implement this in Matlab, so I do
>>>>> fliplr(x), next filter it with the all-pole filter H(z)=1/[(z-2)(z-3)]
>>>>> - certainly unstable filter, next I flip the result back and I get
>>>>> this ugly skyrocketing response at the beginning (something like
>>>>> 10^46)- would it be caused by the problem of initial conditions. The x
>>>>> is randomly generated data that value varies between 1 and -1 of
>>>>> lenght of 100.
>>
>>>>> Thanks in advance
>>
>>>>> Pawel
>>
>>>>> Pawel
>>
>>>> Any help on backward filtering?
>>
>>> Probably not. It seems you have all the pieces of the jigsaw,
>>> but is unable to put them together to a picture. No one can
>>> help you with that; it has to happen inside your mind.
>>
>> Well, Vladimir or I will be happy to help you, under contract at our
>> usual rates. I'll even make sure that I've documented things well
>> enough that you understand it when I'm done -- he may, too.
>>
>> There's advise and there's _work_, after all!
>>
>> --
>> Tim Wescott
>> Control system and signal processing consultingwww.wescottdesign.com
>
> Anyway, Thanks for Your ADVISE.

You're welcome.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Tim Wescott on
On 06/13/2010 09:08 AM, Pawel wrote:
> On Jun 13, 4:08 pm, Tim Wescott<t...(a)seemywebsite.now> wrote:
>> On 06/13/2010 04:44 AM, Pawel wrote:
>>
>>> Dear All,
>>
>>> I have a following question: how does one implement anticausal filter
>>> with backward filtering (or any other means)?
>>> I understand that x(n) with a transform X(z) when flipped gives
>>> flip(x(n)) the transform X(z^-1). According to this I can peform
>>> following flip(x(n)) and filter with the filter H(z) and then flip
>>> back the result Y(z)= X(z^-1)H(z) ->flip Y(z)=X(z)H(z^-1), where
>>> H(z^-1) is the transfrom of anticausal filter. Now if I have unstable,
>>> causal filter H(z) then H(z^-1) anticausal filter should be stable. I
>>> can't see how simply flipping x(n) would lead to the stable filter -
>>> the software do not know if the filter is stable or not it just
>>> calculate the response from the difference equation. Would the whole
>>> answer lay in the initial conditions of the filter? Would You please
>>> point me to some literature dealing with this problem.
>>
>> "I can't see how simply flipping x(n) would lead to the stable filter"
>>
>> By definition, if x(n) is the response to an entirely unstable system,
>> then all of its components are growing exponentials. A growing
>> exponential in positive time is a decaying exponential in negative time
>> -- hence, stability.
>>
>> If x(n) is the response to a system that is a mix of stable and unstable
>> elements (i.e. some of it's components grow and some shrink), then
>> running it in reverse will still result in an unstable system.
>>
>> --
>> Tim Wescott
>> Control system and signal processing consultingwww.wescottdesign.com
>
> Hi Tim,
>
> Thanks a lot. I am trying to implement this in Matlab, so I do
> fliplr(x), next filter it with the all-pole filter H(z)=1/[(z-2)(z-3)]
> - certainly unstable filter, next I flip the result back and I get
> this ugly skyrocketing response at the beginning (something like
> 10^46)- would it be caused by the problem of initial conditions. The x
> is randomly generated data that value varies between 1 and -1 of
> lenght of 100.

That H(z) certainly should be stable when swapped to H(z^-1) -- you'd
have a pole at 1/2 and another one at 1/3, which is quite stable and
settles pretty darn fast.

It's not unheard of for Matlab to have obscure implementation issues
that make it hard to use their canned software right, or to just have
the occasional outright bug -- it keeps you on your toes. So you may
want to try verifying each step, to make sure that you're getting all
the pieces right.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: glen herrmannsfeldt on
Pawel <prulikowski(a)gmail.com> wrote:

> I have a following question: how does one implement anticausal filter
> with backward filtering (or any other means)?

Google (or any other search system) for "phase conjugate."

Among others, you will find the phase conjugate mirror which
generates the time reversed form of an optical signal.
You can then process it any way you want, and then re-conjugate
it again.

Phase conjugation can, for example, remove the dispersion problems
from long fiber optic cables. If you put a phase conjugation
device in the middle then any dispersion from the first half is
reversed in the second half.

-- glen