Prev: DSS Interface
Next: Hackers delight
From: Demus on 26 Jul 2010 11:19 Hello, This might be a silly question, but I can't figure out what implications the phase of a transfer function has for causality. If I pass a signal to a filter and pass the output to the inverse filter... my intuition of causality tells me then that the output of the inverse filter can not be the same as what enters the first filter. And by 'can not be the same' I mean to include it's place in time. It should have the same shape but not occur at the same time, which would then suggest that the result is a pure time delay. However, when I simulate this situation in simulink I get the opposite result, the two signals have the same time coordinates as well, so I guess my intuition is off. (By the same token, in my opinion the phase of a causal system can't really be said to be negative, at least not when the inputs and outputs are non-stationary signals...) Can someone please explain this situation to me, perhaps including how phase relates to causality? Thanks in advance!
From: Rune Allnor on 26 Jul 2010 11:33 On 26 Jul, 17:19, "Demus" <sodemus(a)n_o_s_p_a_m.hotmail.com> wrote: > Hello, > > This might be a silly question, but I can't figure out what implications > the phase of a transfer function has for causality. > > If I pass a signal to a filter and pass the output to the inverse filter... > my intuition of causality tells me then that the output of the inverse > filter can not be the same as what enters the first filter. > And by 'can not be the same' I mean to include it's place in time. It > should have the same shape but not occur at the same time, which would then > suggest that the result is a pure time delay. > > However, when I simulate this situation in simulink I get the opposite > result, the two signals have the same time coordinates as well, so I guess > my intuition is off. I think this has to do with the way you simulate the system. If the output of the filter is fed straight into the input of the inverse, with no delay elements in between, I wouldn't be surprised if the overall delay is negligable. Provided the inverse is well-behaved(stable & causal), numerical issues are neglegable, etc. Rune
From: Tim Wescott on 26 Jul 2010 11:49 On 07/26/2010 08:19 AM, Demus wrote: > Hello, > > This might be a silly question, but I can't figure out what implications > the phase of a transfer function has for causality. > > If I pass a signal to a filter and pass the output to the inverse filter... > my intuition of causality tells me then that the output of the inverse > filter can not be the same as what enters the first filter. > And by 'can not be the same' I mean to include it's place in time. It > should have the same shape but not occur at the same time, which would then > suggest that the result is a pure time delay. > > However, when I simulate this situation in simulink I get the opposite > result, the two signals have the same time coordinates as well, so I guess > my intuition is off. Your intuition is good, you are just not modeling the world well enough. The four things that you are not modeling in Simulink are the fact that no real system is minimum phase, no real system has a finite order, no real system is noise free, and no real system can be known completely. No real system has finite order. There are always low-pass processes lurking in the upper frequency ranges of any system you may choose to model, and the harder you look for these low-pass processes the more you'll find. A simple R-C low-pass filter has one pole because of the capacitor, right? But it has another one because of the inductance of the resistor leads. If you look further, it has more because of the capacitance of the resistor to "the world". Look further yet and you'll find that the propagation of electromagnetic energy through (or around) the resistor and cap is limited by the speed of light. Go even deeper and you find that as the wavelength decreases, at some point the system just reflects the energy, or becomes transparent, or whatever. Mechanical systems, electromechanical systems, chemical systems, etc. -- they all have modeling limitations of some sort, which are ultimately limited by the speed of light. No real system is minimum phase, if for no other reason that because of the pure delay mentioned above. No system can be known completely, and this limits the accuracy of the model you can make. Without an exact model, your inverse filtering doesn't work -- particularly at frequencies where your gain needs to be high. So as your frequency gets high (and sometimes low), your model's accuracy breaks down, and your inverse filter doesn't work correctly. Real systems have noise. You stick a stimulus into a system, you measure the output -- but that output is corrupted by noise, and the spectrum of the noise is going to be a lot whiter than the spectral response of the system. Now you run that output through a 'perfect' inverse filter. The filter -- necessarily -- has _really high_ gain at the higher frequencies, but the noise process -- inevitably -- has substantial energy at those same high frequencies. So the output of your inverse filter is noisy. I'm not even getting into the fact that no real system is really fully linear, but you can imagine the difficulties. So try your Simulink example again, only use a much more complicated system for your 'real' system than for your 'inverted' system, and inject some white noise into the signal after the 'real' system. I think then that your intuition will be satisfied. Trying to come up with the 'best' guess at an input signal to a real system can keep an engineer like me honestly and profitably employed for years, if the system is complicated enough. Trying to come up with a workable definition for 'best' is often no small part of the effort. > (By the same token, in my opinion the phase of a causal system can't really > be said to be negative, at least not when the inputs and outputs are > non-stationary signals...) Negative phase slope indicates delay, which is perfectly reasonable to expect in a causal system. I think you're thinking of a positive phase slope, indicating lead. You can have lead in a real system, but only at the expense of a rising amplitude vs. frequency (think differentiation). The amplitude 'distortion' is the price you pay for the 'prediction' effect of differentiation. > Can someone please explain this situation to me, perhaps including how > phase relates to causality? The slope of the phase vs. frequency characteristic of a linear system transfer function indicates the effective delay of signals at that particular frequency. It can be positive, but as I mentioned, if the system is causal then the positive phase vs. frequency slope comes with a cost in the amplitude vs. frequency relationship. There's some relationship, but I can't remember the details, even if I ever learned them. I know that if a system is minimum phase then its phase response is the Hilbert transform of its magnitude, but I couldn't even tell you if that's magnitude, magnitude squared, log magnitude, etc. But if you really want to know, you should be able to at least find a book reference with an internet search. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
From: Demus on 26 Jul 2010 11:50 >I think this has to do with the way you simulate the system. >If the output of the filter is fed straight into the input >of the inverse, with no delay elements in between, I wouldn't >be surprised if the overall delay is negligable. Provided the >inverse is well-behaved(stable & causal), numerical issues are >neglegable, etc. > >Rune Do you mean that Simulink simplifies the system when it simulates (the system is stable and min-phase) and in reality makes essentially no computations at all and just passes the signals through? Otherwise you would see a pure time-delay, right? Or why do you say that the time-delay should be negligable?
From: Tim Wescott on 26 Jul 2010 12:07
On 07/26/2010 08:50 AM, Demus wrote: >> I think this has to do with the way you simulate the system. >> If the output of the filter is fed straight into the input >> of the inverse, with no delay elements in between, I wouldn't >> be surprised if the overall delay is negligable. Provided the >> inverse is well-behaved(stable& causal), numerical issues are >> neglegable, etc. >> >> Rune > > Do you mean that Simulink simplifies the system when it simulates (the > system is stable and min-phase) and in reality makes essentially no > computations at all and just passes the signals through? > Otherwise you would see a pure time-delay, right? Or why do you say that > the time-delay should be negligable? No, _you_ simplify the system when you go from the real world to a mathematical description. Simulink then faithfully reproduces the behavior of your simplified (and physically unrealizable) system. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html |