Published on

When a System is Linear and When is Not ?

Authors

Introduction

  • Linear systems might be a pure mathematical term but in DSP it's one of the main topics half of our plugins rely on.

Both of these so called "systems" are basically a group of mathematical rules and when fullfilled we categorize a "system" as linear or nonlinear.

Signals and systems

A signal is a happening when one parameters varies with another parameter. For example when a voltage(one paramter) changes over time(second parameter).

A system is a process that produces and output signal in response to an input signal. The (analog) continuous systems input and output continuous signals as flowing voltage over time. The (digital) discrete systems input and output discrete signals as computer programs and manipulate values stored in arrays.

Signals notation

When describing a signal we use certain mathematic notation, in order to easily distinguish both.

  • The continuous signals use parenthesis

x(t), y(t)
  • The discrete signals use brackets

x[n], y[n]

PHOTO

Linearity requirements

A system is called linear if it has two mathematical properties:

  • homogeneity
  • additivity

If you can prove that a system has these two properties the system is declared linear. But if a system lack one of these, it's proven as nonlinear.

There's also a third property:

  • shift invariance

Shift invariance is not a stric requirement that can define a system's linearity but it's a mandatory property for most DSP techniques

What is homogeneity

Homogeneity is a property saying that when there's a change in the input signals amplitude, change in the output signal's amplitude is corresponding simultaneously.

x[n] = y[n]

kx[n] = ky[n]

PHOTO

What is additivity?

The other property of a linear system is additivity. If we have one system with input of x1[n] and output y1[n], then suppose another input of the system x2[n] it's output y2[n]. The system is considered additive if the input signals are added and passing through without interacting:


x1[n] + x2[n] = y1[n] + y2[n]

PHOTO of additivity

Visualize having two separate signals with their separate inputs and outputs. When we sum them together they stay the same inputs and outputs they were, just added independently to x to x and y to y. At last what we will hear is the signals added, played separately in the input and in the output. We won't have any morphing between the added signals. Despite, if we get any merge between the two separate signals as if we have some modulation as FM, AM - where a carrier frequency signal is merged with the playback input signal we break the additivity rule and the system is considered nonlinear.

PHOTO - fm am carrier

What is shift invariance?

Shift invariance means that a shift in the input signal will result in the same shift in the output signal. If we shift the input signal with any constant (s) as x[n+s], we get y[n+s]. So the output will be shifted exactly the same as the input. This is the requirement for a system to be shift invariant.

x[n+s] = y[n+s]

By adding a constant to our sample [n] we can shift waveform by phase. When shifting with a constant we can shift the signal to the right (s = 2) or to the left (s = -2).

Let's take delays as effects that fullfil the rule. The delay is happening when the input signal is shifted with some time offset.

y[n] = x[n - t]

If a linear system satisfies the condition of a shift invariance, the system is considered as LTI system - linear time-invariant system.

Linearity in broader sense

As a concept linearity has wider understanding than it's usage in math and DSP. If a trader sell 1 transistor for 1 coin, for 10 transistors he will get 10 coins . This is an example of homogeneity. If the seller sells 10 transistors for 1 coin and 10 resistors for 2 coin, he will get 10 + 20 = 30 coins. This is an example of additivity. Then the sale of goods is a linear process.

Summary

What it takes for a system to be linear?

Just two requirements : homogeneity and additivity. The homogeneity literally means to have the same signal scale on input as on the output - kx[n] = ky[n] Additivity is when more signals are processed through a system's input, they stay the same and bring their properties on the output - x1[n] + x2[n] = y1[n] + y2[n] Time invariance is a matter of a time shift in the following manner : x[n+s] = y[n+s] If all three are checked we consider the system - a LTI system.