Why does the phase shift between the input and the output of a transfer function vary with the frequency of the input sinusoid?
2 Answers
Assuming you're asking about Linear and Time-Invariant systems (LTI), the phase is shifted only for such systems that have "reactive" elements in the system.
LTI systems are made up of signal-processing elements that fall into 3 fundamental classes:
- adders (devices that add two signals).
- scalers (devices that scale a signal by a constant).
- "reactive" elements (devices that are able to discriminate w.r.t. frequency).
Element classes 1. and 2. are essentially the same for analog or digital filters. The are sometimes called "memoryless" devices or elements.
For an analog filter (or "analog LTI system"), those reactive elements would be capacitors or inductors. They integrate or differentiate one signal to become another. That turns a sine signal into a cosine signal or shifts the phase by $\pm$ 90°.
$$\cos(\Omega t) = \sin(\Omega t + \tfrac{\pi}{2})$$
For digital filters, the reactive elements are delay elements. A unit delay (a delay of exactly one sample period $T$) will delay any signal, including a sinusoid, by 1 sample or $T$ units of time. That shifts the phase by an amount that is dependent on frequency
$$\sin(\Omega (t-T) ) = \sin(\Omega t - \Omega T)$$
or
$$\sin(\omega (n-1) ) = \sin(\omega n - \omega )$$
Any LTI system that acts as a "filter", a device to filter out some frequency components and leave others, must have reactive elements (or "non-memoryless" elements or components having memory) in order to discriminate one frequency from another. And such a filter will shift phase which will normally be different for different frequencies. But a memoryless LTI system (which is just a scaler) will not discriminate between frequencies nor will shift phase, except for possibly by 180°, which is just a polarity reversal or scaling by a negative constant.
For any LTI (Linear Time Invariant) system (considering the steady state response i.e. ignoring the transient response which generally becomes negligible in a very short period), if the input is a sinusoidal signal, the output is always a sinusoidal signal of the same frequency. But the amplitude of the output sinusoidal can be different from the input amplitude. And the ratio of the output amplitude to input amplitude is a constant for that particular frequency - whatever the input amplitude and phase are. Similarly, the difference between the input and output sinusoidal phases is also constant for the particular frequency - irrespective of the amplitude. The transfer function can be used to give this input-output amplitudes ratio and input-output phase difference as a function of frequency. Hope this helps. The frequency dependency is derivable from the input/output differential equation in analog case or difference equation in discrete case.