Вы находитесь на странице: 1из 11

Linearity, Causality and Time-Invariance of

a System
T he not ion of a system is cent ral in digit al communicat ions and part icularly syst em's t heory. Abst ract ly, a
syst em is defined as somet hing t hat takes an input signal and produces an output signal by some
t ransformat ion rule T r .

y(t) = T r{x(t)}

Many relat ions in t he real world can act ually be understood as a syst em. Some examples include:

You press a key on your keyboard, and t he corresponding let t er appears on your screen. What
happens if you press t wo let t ers at t he same t ime? Is t his syst em "linear"?
You speak into your microphone, and it convert s your voice into elect rical current . Hopefully t his
syst em does not int roduce a lot of distort ion.
You inflat e t he t ire of your bike. It responds wit h t he pressure in t he t ire. T he pressure can be seen
as t he summat ion of all t he air t hat has flown into and out of t he t ire.

Let 's t ake a more abst ract example: A syst em can amplify t he input signal, by doubling it s amplit ude:

y(t) = 2x(t)

Let us illust rat e t his very simple syst em wit h some code. As an example, we t ake t he input signal
x(t) = sin(t). T hen, we can st raight -forwardly implement t he syst em as t aking a funct ion (a signal) and

ret urning anot her t ime funct ion (anot her signal):

 Run code int eract ively Hide

x = lambda t: np.sin(t) # the signal x(t)

def Tr(x):
return lambda t: 2*x(t) # the IO relation y(t)=2*x(t)

Now, let 's plot t he input signal and t he out put signal over some t ime:
t = np.linspace(-5,5,1000)
plt.plot(t, x(t), label='Input $x(t)$')
y = Tr(x) # send x through the system
plt.plot(t, y(t), label='Output $y(t)=2x(t)$')

Especially, t hree propert ies are crit ical charact erist ics of any syst em. Linear syst ems are most easy to
analyze analyt ically, time-invariant syst ems allow to t reat t he syst ems input -out put -relat ion independent
of t he absolut e t ime and causal syst ems ensure t hat t he syst em can be realized in real-t ime, since t he
syst em does not use informat ion from t he fut ure.

Let us now go t hrough each of t hese charact erist ics in more det ail.

Linear Systems
T he rule of linearit y is common among many mat hemat ical and engineering aspect s. Plainly, linearit y
describes t hat you can describe t he effect s of a syst em by separat ing t he input signal into simple part s
and using superposit ion at t he out put to restore t he overall syst em out put . Mat hemat ically, we say t hat a
syst em wit h t ransformat ion T r is linear if t he following holds:

T r{a ⋅ x1 (t) + b ⋅ x2 (t)} = a ⋅ T r{ x1 (t)} + b ⋅ T r{ x2 (t)}.

Let us look at some syst ems to see if t hey are linear syst ems. First , let 's define t wo input signals
x1 (t) = sin(t) (1)

x2 (t) = t, periodic with period 0 ≤ t ≤ 2 (2)

and writ e a funct ion to check t he linearit y:

t = np.linspace(-10, 10, 1000)


x1 = lambda t: np.sin(t)
x2 = lambda t: (t % (2*np.pi))/np.pi

def checkLinearity(Tr, titleStr):


x1plusx2 = lambda t: x1(t)+x2(t)
plt.subplot(121)
plt.plot(t, x1(t), label=r'$x_1(t)$')
plt.plot(t, x2(t), label=r'$x_2(t)$')
plt.plot(t, x1plusx2(t), label=r'$x_1(t)+x_2(t)$')

plt.subplot(122)
plt.plot(t, Tr(x1)(t), label=r'$Tr\{x_1(t)\}$')
plt.plot(t, Tr(x2)(t), label=r'$Tr\{y_2(t)\}$')
plt.plot(t, Tr(x1)(t)+Tr(x2)(t), 'k--', lw=3, label=r'$Tr\{x_1(t)\}+Tr\{x_2(t)\}$'
plt.plot(t, Tr(x1plusx2)(t), label=r'$Tr\{x_1(t)+x_2(t)\}$')

Let 's check t he first syst em:

y(t) = 2x(t).

def Tr(x):
return lambda t: 2*x(t)
checkLinearity(Tr, '$y(t)=2x(t)$')

Clearly, t his system is linear, since t he red and black curve overlap. (Actually, we cannot say yet that it's linear,
because we have just found one example where it is linear. To really prove linearity, one would need to do this
mathematically based on the input-output-relation. Despite not being too complicated, it is out of scope here).
Now, let 's check anot her syst em,
2
y(t) = x(t) .

def Tr(x):
return lambda t: x(t)**2
checkLinearity(Tr, '$y(t)=x(t)^2$')

Obviously, t his system is not linear, since red and black do not overlap. (Here we can really say it is not linear,
because we have found one example where the linearity condition does not hold).

Let 's t ry a t hird syst em,

y(t) = x(t − 2).

def Tr(x):
return lambda t: x(t-2)
checkLinearity(Tr, '$y(t)=x(t-2)$')
Again, t his syst em appears linear.

As t he final syst em, what about t his syst em?

y(t) = x(t) − 1

def Tr(x):
return lambda t: x(t)-1
checkLinearity(Tr, '$y(t)=x(t)-1$')

Obviously, t his syst em is non-linear.

For linear syst ems powerful mat hemat ical tools have been developed. In part icular, t he superposit ion
t echnique in conjunct ion wit h signal decomposit ions such as Fourier Series
(ht t p://dspillust rat ions.com/pages/post s/misc/fourier-series-and-harmonic-approximat ion.ht ml) or
Fourier Transform (ht t p://dspillust rat ions.com/pages/post s/misc/approximat ing-t he-fourier-t ransform-
wit h-dft .ht ml) are valuable met hods to analyze t he input -out put relat ion of a syst em.

How can we see, if a syst em is linear, just from looking at it s t ransformat ion expression? As a rule of
t humb, a syst em is linear, if t he operat ions on t he input signal are all linear and no signal-independent
t erms are cont ained. What are linear operat ions?

Scaling of t he input signal: y(t) = ax(t)


T ime-shift ing t he input signal y(t) = x(t − a)
Scaling t he argument of t he signal y(t) = x(at)
Combinat ions of t he t hree above, e.g. y(t) = 2x(3(t − 4))
Summat ions of t erms t hat are linear, e.g. y(t) = 2x(t) + x(t − 1)

What are part icularly non-linear operat ions?

Mult iplicat ion of t he signal wit h it self, i.e. y(t) = x(t) ⋅ x(t)
Applying any non-linear funct ion to t he signal, e.g. y(t) = sin(x(t))
Adding const ant t erms, which are independent of t he signal, i.e. y(t) = x(t) + a
Causal Systems
T he propert y of causalit y is a requirement for a syst em to be realizable in realit y. Causalit y means t hat t he
out put of t he syst em does not depend on fut ure input s, but only on past input . In part icular, t his means
t hat if t he input signal is zero for all $t or a predict able and input -independent signal for very fancy
syst ems

) for all $t

t = np.linspace(-5, 5, 1000)
x = lambda t: (t>=0).astype(float)

def Tr1(x):
return lambda t: x(t-1)

def Tr2(x):
return lambda t: x(t+1)

def checkCausality(Tr):
plt.plot(t, x(t), label='Input $x(t)$')
plt.plot(t, Tr(x)(t), label=r'Output $y(t)=Tr\{x(t)\}$')

plt.subplot(121)
checkCausality(Tr1)

plt.subplot(122)
checkCausality(Tr2)

Clearly, t he first syst em, y(t) = x(t − 1) is a causal syst em, because it s out put is a t ime-delayed version
of t he original signal.

On t he ot her hand, t he second syst em y(t) = x(t + 1) , is non-causal. T his syst em ret urns a t ime-
advanced version of t he input signal. T his means, t hat for example at t he out put t ime t = 0 , t he syst em
requires access to t he value of t he input signal at t ime t = 1 . Clearly, t his is impossible in a realizable
syst em, as nobody can look into t he fut ure.
Time-Invariant Systems
A syst em is t ime-invariant if it s out put signal does not depend on t he absolut e t ime. In ot her words, if for
some input signal x(t) t he out put signal is y1 (t) = T r{x(t)}, t hen a t ime-shift of t he input signal
creat es a t ime-shift on t he out put signal, i.e. y2 (t) = T r{x(t − t0 )} = y1 (t − t0 ) .

A t ime-invariant syst em can be recognized from t he fact t hat t he t ransformat ion expression does not
depend on t he absolut e t ime t , but t is only used as an argument to t he input funct ions. Let us look at
some examples. First , let 's define an exponent ial impulse as t he input signal.

t = np.linspace(-2,4, 1000)
x = lambda t: np.exp(-t)*(t>=0).astype(float)

def showTimeInvariance(Tr):
plt.subplot(121)
plt.plot(t, x(t), label='$x(t)$')
plt.plot(t, x(t-0.5), label=r'$x(t-\frac{1}{2})$')
plt.plot(t, x(t-1), label=r'$x(t-1)$')

plt.subplot(122)
y1 = Tr(x)
y2 = Tr(lambda t: x(t-0.5))
y3 = Tr(lambda t: x(t-1))
plt.plot(t, y1(t), label=r'$Tr\{x(t)\}$')
plt.plot(t, y2(t), label=r'$Tr\{x(t-\frac{1}{2})\}$')
plt.plot(t, y3(t), label=r'$Tr\{x(t-1)\}$')

Now, let 's see t he out put of t he syst em

y(t) = T r{x(t)} = t ⋅ x(t)

for t he input of a t ime-shift ed exponent ial impulse:


def Tr(x):
return lambda t: t*x(t)
showTimeInvariance(Tr)

Clearly, t he syst em is not t ime-invariant : When t he input s of t he syst em are t ime-shift ed exponent ial
impulses, t he out put s of t he syst em are not just t ime-shift ed versions of each ot her. Hence, t he system
is not time-invariant, but it is time-variant.

As a second example, let 's have a look at t he syst em


2
y(t) = T r{x(t)} = x(t) .
def Tr(x):
return lambda t: x(t)**2
showTimeInvariance(Tr)

T his system is time-invariant, since t he out put signals of t he syst em are just t ime-shift ed versions of
each ot hers, when t he input are t ime-shift ed versions of each ot her.

Finally, let 's look at a t hird example of a syst em, which is given by

y(t) = T r{x(t)} = x(2t).


def Tr(x):
return lambda t: x(2*t)
showTimeInvariance(Tr)

Is t his syst em t ime-invariant ? At first glance, it appears to be: T he input s are t ime-shift ed to each ot her,
t he out put s are t ime-shift ed to each ot her. But : T he definit ion of t ime-invariance st at es:

T r{x(t)} = y(t) ⇒ T r{x(t − t0 )} = y(t − t0 )

I.e. a t ime-shift by t0 of t he input signal creat es the same t ime-shift by t0 at t he out put .

Let 's look once again at t he syst em above: T he t ime-shift bet ween t he red and blue input is equals t0 = 1 .
However, t he t ime-shift bet ween t he blue and red out put signals is just 0.5. Hence, even t hough t he
out put s are t ime-shift ed versions of each ot her, t heir amount of t ime-shift is not equal to t he input shift .
T herefore, t his system is not time-invariant.

Relation between the properties


We have analyzed t hree propert ies of a syst em:

Linearit y
Causalit y
T ime-invariance

How do t hese propert ies relat e to each ot her? Essent ially, t hese propert ies are independent of each ot her
and t hey can appear in any combinat ion. Some examples:

2
y(t) = T r{x(t)} = x(t) non-linear, causal, time-invariant (3)

y(t) = T r{x(t)} = t ⋅ x(t) linear, causal, time-variant (4)

y(t) = T r{x(t)} = x(t + 1) linear, non-causal, time-invariant (5)

y(t) = T r{x(t)} = sin(x(t)) ⋅ sin(t) non-linear, causal, time-variant (6)


We could go on for ever and find examples for each combinat ion of propert ies. However, one part icular
combinat ion is especially import ant in signal processing: T he class of Linear Time-Invariant (LTI) systems. All
t hese syst ems can be described by t heir response to a Dirac input , which is called t he impulse response.
T he class of LT I syst ems is so import ant t hat it deserves a dedicat ed art icle, which I'll writ e soon.
Subscribe to t he newslet t er to be first to know about new cont ent !

Summary
We have described t hree propert ies of a syst em, which can be recognized by t he following rules of t humb:

Linearity: A system is linear, if it only consists of linear operations, such as:


scaling, time-shift, summations of scaled and time-shifted input signals.
Any other operation is likely non-linear.
Causality: A system is causal, if for any time t0 , the output of the system is
completely defined by the values of the input signal for times $t
Time-Invariance: If the input to a time-invariant system is shifted in time, its
output remains the same signal, but is shifted equally in time.

Do you have questions or comments? Let's dicuss below!

Share this article (http://twitter.com/home?status=Linearity%2C%20Causality%20and%20Time-


Invariance%20of%20a%20System%20https%3A//dspillustrations.com/pages/posts/misc/linearity-
causality-and-time-invariance-of-a-system.html) (http://www.facebook.com/sharer/sharer.php?
u=https%3A//dspillustrations.com/pages/posts/misc/linearity-causality-and-time-invariance-of-a-
system.html) (https://plus.google.com/share?
url=https%3A//dspillustrations.com/pages/posts/misc/linearity-causality-and-time-invariance-of-a-
system.html) (mailto:?subject=Linearity%2C%20Causality%20and%20Time-
Invariance%20of%20a%20System&body=https%3A//dspillustrations.com/pages/posts/misc/linearity-
causality-and-time-invariance-of-a-system.html)

Download Jupyt er Not ebook!

Subscribe to our newslet t er

Related Affiliate Products

Вам также может понравиться