Communication Technology

 

 

 

Signal Representation

 

As in any other field, we also use mathematical notations to represent a signal whether you like it or not -:). You should be familiar with this kind of mathematical representation since most of technical documents (especially text books) use the same expression.

The delta function and how it shifts

Two operations are all this section needs, and both of them are arithmetic rather than analysis. One shifts the delta function along the time axis, and the other multiplies it by a number. Everything the rest of the page builds is a sum of those two applied over and over.

The most important component of signal representation is to understand the meaning of 'delta' fuction. Delta function in discrete signal can be illustrated as below. As you see, delta function is a special function which has '1' only at t = 0 and '0' at all other points. (In case of continuous signal, Delta function is defined as a function where the width of the function is infinitely small and the area under the function is 1).

 

Discrete delta function, zero everywhere except a single value of one at t equals zero

Figure 1. The whole definition, drawn. One sample is 1 and every other sample is 0, which is all the delta function ever does. Every expression on this page is built from copies of this one picture.

  • The axis runs from -8 to 8 and only t = 0 is non-zero : the dashed lines at 1 and 2 are there for the figures that follow, where other heights appear.
  • The braced definition on the right is the discrete one : the value is exactly 1 at t = 0. The continuous version in the paragraph above is a different object, defined by its area rather than by its height.

 

Now let's look at a modified form of delta function. Don't worry this is the math you learned in junior high school math class.

First example is as follows. I don't think you need any further explanation on this.

Delta function shifted three places to the left, written as delta of t plus three

Figure 2. The first of the two operations. Moving the spike left by 3 turns delta(t) into delta(t+3), and the sign is the part most often got wrong, because the shift is left while the sign is plus.

  • Left shift gives a plus sign : the note beside the figure spells it out. A spike at t = -3 is delta(t+3), because t+3 is zero when t is -3.

 

Here goes another example. I don't think you need any further explanation on this either.

Delta function shifted four places to the right and scaled by two, written as two delta of t minus four

Figure 3. Both operations at once. The spike has moved right by 4, which makes the sign minus, and it has been scaled to a height of 2. Everything else about the function is unchanged.

  • Right shift gives a minus sign : delta(t-4) puts the spike at t = 4, by the same reasoning as Figure 2 in the other direction.
  • The multiplier sets the height and nothing else : 2 delta(t-4) is twice as tall and sits in exactly the same place.

 

Now let's add the two modified delta function together and you would get the result as follows.

Two shifted delta functions added, giving a sequence with a spike of one at minus three and a spike of two at four

Figure 4. Addition is the third and last ingredient. Two spikes that sit at different times do not interfere, so the sum simply shows both. That independence is what lets an arbitrary sequence be assembled term by term.

  • The two inputs never overlap : one is non-zero only at -3 and the other only at 4, so adding them cannot change either height.
  • The result is read straight off the picture : delta(t+3) + 2 delta(t-4), which is the expression written beside the bottom panel.

 

Why do we use this kind of special function and need to understand this kind of shifting/multiplication operation ?

It is because we can represent any discrete value by shift and multiplication of the function as shown below. (Note : In order for this kind of shift and multiplication to have practical meaning in real application, the system should be LTI (Linear Time Invariant). See Linearity and Time Invariance page.)

If you sum up all of these shift-multiplied versions of delta function, you can even express a sequence of signal in simple mathematical form.

Writing a whole sequence as one expression

A list of numbered pairs describes a sequence perfectly well, and it is useless for algebra. A list cannot be transformed, convolved or differentiated. This section turns the list into a single expression, which is the step that makes every later section possible.

If you want to express the following sequence without using the delta function, you may have to write s(t,x) = {(-8,0),(-7,2),(-6,0),(-5,0),(-4,1),(-3,0),(-2,0),(-1,0),(0,0),(1,0),(2,1),(3,0),(4,0),(5,2),(6,0),(7,0),(8,0)}. Here, t indicate time in descrete form. x indicate the amplitude (or value) of the signal at 't'. For example, s(t,x) = (-7,2) indicate the value (the amplitude of the signal) at time -7 is 2. s(t,x) = (2,1) indicate the value (the amplitude of the signal) at time 2 is 1.

Now let's think if we can s(t,x) using delta function. For example, how can we represent s(t,x) = (-7,2) using delta function ?

First, let's think of how we can represent t = -7. As described above, delta function has non-zero value only at n (time) = 0. Then how can we make the delta function has none-zero value at t = -7.  With junior high school math, you can get the none zero value by shifting the delta function by 7 to the left. How can you represent this shift in math ? Again from junior high school math, you understand this can be expressed as delta(t+7).

Second, let's think of how we can represent value 2 using delta function. Again from the definition, the value of delta function at the point of none-zero value is always 1. So the value 2 can be represented as '2 x delta()'.

If you combine the result of the first and second step, you would understand s(t,x) = (-7,2) can be expressed as '2 x delta(t+7)'.

This is very important. If this is not clear to you, read this example over and over until you clearly understand this.

If you apply the same logic to each elements of s(t,x) = {(-8,0),(-7,2),(-6,0),(-5,0),(-4,1),(-3,0),(-2,0),(-1,0),(0,0),(1,0),(2,1),(3,0),(4,0),(5,2),(6,0),(7,0),(8,0)}, you can have a graph as shown below and this graph can be represented as a single mathematical expression as follows. (You would notice that I didn't indicate any points with the value 0 since it does not make any difference in final mathematical expression. But you can add the value zero part if you like. For example, you can represent (-8,0) as '0 x delta(t+8)').

 

A four point sequence drawn as labelled delta terms and collected into one equation

Figure 5. The list turned into algebra. Four non-zero points become four delta terms, and the equation underneath is the whole sequence as a single function of t.

  • Only the four non-zero points appear : the zeros of the list contribute 0 times a delta, so dropping them changes nothing. The paragraph above says the same thing.
  • Each label reads off directly : the spike of height 2 at t = -7 is 2 delta(t+7), and the spike of height 2 at t = 5 is 2 delta(t-5).
  • The signs follow Figures 2 and 3 : negative times take a plus inside the bracket and positive times take a minus, which is the one thing to check when writing these out.

One number in the walk-through above needs correcting, and the figure settles it. The text asks how to place a spike at t = -7 and then says the delta function is shifted by 4 to the left, before writing the answer as delta(t+7). A shift of 4 would give delta(t+4), so the shift is 7 and the answer is right. The figure labels that same point 2 delta(t+7), which agrees.

Another reason why we use delta function for signal representation is the fact that the characteristics of the delta function is well investigated. Therefore, we can easily identify the characteristics of the signal based on the characteristics of the delta function. (Again, this holds true that the system is Linear Time Invarient).

Delta as a sampler

The same two operations do a second job that looks unrelated at first. Multiplying a signal by a shifted delta picks one value out of it and discards the rest, which is what sampling means. Reading the next two figures in that direction rather than as constructions is what makes the notation useful.

The delta function is also frequently used to represent 'sampling'. Let's say that we have a continuous signal x(t) and we want to express the value of x(t) sampled at t = 4. This can be respresented as shown below. I hope this make sense to you without any further explanation.

 

A continuous signal multiplied by a delta at t equals four, leaving one sample

Figure 6. Multiplication used in reverse. Instead of building a signal from deltas, a delta is used to take one value out of a signal that already exists.

  • The top panel holds two different things : the smooth curve is x(t) and the single arrow is delta(t-4). They are multiplied, not added.
  • The bottom panel keeps the curve only as a dashed reminder : the result is one arrow, and its height is the value the curve had at t = 4.
  • Every other point is multiplied by zero : that is what discards the rest of the signal, and it is the whole mechanism of sampling.

 

This way of representing the sampling with delta function is also applies to the discrete signal as shown below. Let's say we have a discrete signal x[t] and you want to select out the value at index 4. You can just express it as below.

 

A discrete signal multiplied by a delta at index four, leaving one sample

Figure 7. The same operation on a sequence. The argument does not change when the signal is already discrete, which is worth seeing because the two cases are usually taught apart.

  • The blue stems are x[t] and the red one is the delta : the delta has height 1 and sits at index 4, exactly as in the continuous case.
  • The surviving stem carries the value of x at index 4 : the figure labels it the 4 th value. That means the value at index 4, not the fourth in a count starting at one.

 

This kind of mathematical expression may look unnecessarily complicated, but as I mentioned above, if you can express your signal into this kind of mathematical form you can easily characterize your signal based on a simple well known signal (delta function). One common application is to figure out the output of system when a specific input sequence is given.

The same thing written in symbols

Everything so far used actual numbers, which is the right way to meet the idea and the wrong way to state it generally. The next three figures repeat the same construction with symbols in place of the numbers, and the only thing that changes is how intimidating it looks.

Let's go one step further. In many reading material, you would have seen a sequence of signals represented as a sequence of mathematical symbols as shown below.

 

A sequence written as a list of symbols a zero through a L minus one

Figure 8. The starting point for the symbolic version. A list again, with letters instead of numbers and an unstated length L.

 

This data sequence can be represented as below.

 

The same symbolic sequence drawn as stems at times tau zero through tau L minus one

Figure 9. The same list drawn. One detail here is stronger than anything above it : the times are labelled tau rather than 0, 1, 2, so the spacing between samples is no longer assumed to be regular.

  • The heights are a0 through aL-1 : each is just a number, and the figure draws them rising only to keep them apart.
  • The times are tau0 through tauL-1 : arbitrary instants rather than integer indices. That generality is what lets the same form describe a multipath channel, where the delays are whatever the geometry gives.
  • The dotted stretch stands for everything omitted : the sequence runs to L terms, and only the first six and the last are drawn.

 

Using the delta function concept, we can represent this sequence as a single mathematical equation as below. This is the same logic as described above, but it would make it look complicated just because it is expressed in symbols rather than numbers. It is just psychological effect -:). But you have to be familiar to this kind of symbolic expression, otherwise you would have difficulties when you read papers or textbooks about communication theory.

 

The symbolic sequence written as a sum of scaled shifted delta functions and then in sigma notation

Figure 10. The general form, in two lines. The first line is Figure 5 with letters in place of numbers, and the second line is the same thing folded into a summation.

  • The two lines say the same thing : the sigma is shorthand for the sum written out above it, and nothing is added or assumed between them.
  • The index runs from 0 to L-1 : L terms in total, one for every sample the sequence holds.
  • This is the tapped delay line : ai as a tap gain and taui as a tap delay is exactly how a multipath channel is written. That is why the fading page points back at this one.

Why we use this kind of representation ?

The main reason is that we can break down a complex system into a lot of well-known small units. Delta function is one of the well known small functions and its mathematical properties are well defined. So if we can represent a complex system into a combination of a lot of delta functions, we can characterize the mathematical properties of the complex system from the combination of the mathematical characteristics of delta function.

Three properties have to hold for that argument to work, and the page has already demonstrated all three without naming them. Naming them makes it clear when the method applies and when it does not.

The first is completeness. Any sequence at all can be written as a sum of scaled shifted deltas, one term per sample. Figure 5 did that for four points and Figure 10 for L of them. The construction covers every signal and approximates nothing.

The second is that the pieces are easy. A single delta is the simplest input a system can be given, and the system's answer to it has a name of its own, the impulse response. Knowing that one answer is enough, because every other piece is the same delta shifted and scaled.

The third is that the pieces can be recombined. Adding the separate answers only gives the right result when the system is linear. Using one impulse response for every piece only works when it is time invariant. That is the LTI condition the notes above state twice.

The three together are worth stating as one sentence. An LTI system is completely described by its impulse response. Any input can be built from deltas, and the answer can be built the same way from copies of the answer to one delta.

  • Completeness makes the method general : every sequence is a sum of deltas exactly, so nothing is approximated by choosing this decomposition.
  • The impulse response is the whole answer : one measurement characterises an LTI system, because every other input is deltas rearranged.
  • Linearity licenses the recombination : without it the sum of the answers is not the answer to the sum, and the whole construction fails.
  • Time invariance licenses reusing one impulse response : a system that behaves differently at different times needs a different response for every track in Figure 11.

Examples

Example 1

This example answers the question the page has been building towards. Given an input sequence and a system, what comes out ? The method is the decomposition from the sections above, applied once per sample and then added up, and the figure below shows every step of it at once.

Here goes one example. Let's assume that you have following signal.

 

    x[n] = [0 1 0 1 0 0 0.5 0 1 0];

and let's assume that the impulse response of the system is as follows. (By definition, impulse response is the system output for a delta input function. So this means that you already know the expected output from the system when you put a delta function as an input).

 

    h(n) = [0 0.2 0.4 0.6 0.8 1 0.8 0.6 0.4 0.2 0];

 

Now, you want to predict the output from a system when you put the signal x[n] as an input. In mathematical terms, this questions is 'How to calculate the convolution of x[n] and h[n] ?'

 

What you can do is as follows :

i) break down the whole input sequence x[n] into each separate component using the delta function as explained above.

ii) Take the convolution of each component and the impulse response. (If you know the impulse response, you can calculate the convolution of x[t] * delta[t-n] very easily).

iii) Sum up all the results for each component you get at step ii). This sum represents the system output for your sequence as a whole.

Note : For this process to be true, the system should be LTI (Linear Time Invarient)

 

If I represent this procedure in an illustration, it would look as shown below. The original question is to find the solution shown at track (12). But it is hard to perform (and hard to understand) this at a single step. So we has broken down the problem into multiple basic forms (track (1) ~ track (10)) using the convolution of a delta function and the system and then linearly combine all of them as shown in track (11). Now you see that track (11) and track (12) shows the same result.

 

Twelve tracks showing each delta component of the input convolved with the impulse response, their sum, and the direct convolution

Figure 11. The hard problem taken apart and put back together. Ten easy convolutions are performed, added, and shown to equal the one convolution nobody wanted to do directly.

  • Read the columns before the rows : signal, then the convolution symbol, then the impulse response, then the output. Every track has the same four columns.
  • Only four of the ten tracks produce anything : tracks (2), (4), (7) and (9), which are the positions where x is non-zero. The other six convolve a row of zeros and give zeros back.
  • Track (7) gives a smaller bump than the others : the input there is 0.5 rather than 1, and the output scales with it exactly.
  • Every output is the same shape in a different place : convolving with a single delta can only shift and scale the impulse response, which is why these ten are easy.
  • Track (11) is the sum and track (12) is the direct answer : the green plus collects the ten, and the two bottom tracks match. That match is the whole claim of the figure.

The match is exact rather than close, and the reason is short. Convolution is linear, so the convolution of a sum equals the sum of the convolutions. Splitting the input into ten deltas and recombining the ten outputs therefore cannot lose anything.

That is also what the LTI condition in the note above is for. Linearity is what lets the sum be split, and time invariance is what makes every track use the same impulse response instead of a different one at each position. Remove either and the figure no longer holds.

Many textbook would explain the meaning of system response as illustrated above, but it would not look easy and clear yet at the first look. To help you understand this concept, I put the matlab code that I used to create plots shown above. Change "x", "chan" variables as you like and see how the outcome changes. As you try this more and more, your brain would automatically draw out some general rule in your own version. (Note : You can change the value for 'x' and 'chan' anyway you like, but don't change the size of the array because I hardcoded the size of the array in for loop and number of subplots).

 

    x = [0 1 0 1 0 0 0.5 0 1 0];

     

    chan = [0 0.2 0.4 0.6 0.8 1 0.8 0.6 0.4 0.2 0];

    chan = chan/max(chan);

     

    y = conv(x,chan);

    ysum = zeros(1,20);

     

    for i = 1:10

        tempx=zeros(1,10);

        tempx(i) = x(i);

        tempy = conv(tempx,chan);

        ysum = ysum + tempy;

        subplot(12,3,(i-1)*3+1);stem(tempx,'MarkerFaceColor',[1 0 0]);

                                         set(gca,'xtick',[]);set(gca,'ytick',[]);axis([1 length(tempx) -1.5 1.5]);

        subplot(12,3,(i-1)*3+2);stem(chan,'MarkerFaceColor',[0 1 0]);

                                         set(gca,'xtick',[]);set(gca,'ytick',[]);axis([1 length(chan) -1.5 1.5]);

        subplot(12,3,(i-1)*3+3);stem(tempy,'MarkerFaceColor',[0 0 1]);

                                         set(gca,'xtick',[]);set(gca,'ytick',[]);axis([1 length(tempy) -1.5 1.5]);

    end;

     

    subplot(12,3,31);stem(x,'MarkerFaceColor',[1 0 0]);

                            set(gca,'xtick',[]);set(gca,'ytick',[]);axis([1 length(x) -1.5 1.5]);

    subplot(12,3,32);stem(chan,'MarkerFaceColor',[0 1 0]);

                            set(gca,'xtick',[]);set(gca,'ytick',[]);axis([1 length(chan) -1.5 1.5]);

    subplot(12,3,33);stem(ysum,'MarkerFaceColor',[0 0 1]);

                            set(gca,'xtick',[]);set(gca,'ytick',[]);axis([1 length(ysum) -max(ysum) max(ysum)]);

     

    subplot(12,3,34);stem(x,'MarkerFaceColor',[1 0 0]);

                           set(gca,'xtick',[]);set(gca,'ytick',[]);axis([1 length(x) -1.5 1.5]);

    subplot(12,3,35);stem(chan,'MarkerFaceColor',[0 1 0]);

                           set(gca,'xtick',[]);set(gca,'ytick',[]);axis([1 length(chan) -1.5 1.5]);

    subplot(12,3,36);stem(y,'MarkerFaceColor',[0 0 1]);set(gca,'xtick',[]);

                           set(gca,'ytick',[]);axis([1 length(y) -max(y) max(y)]);

 

Example 2

The second example uses the same input sequence as the first, which is not a coincidence. It takes the same decomposition into delta terms and sends it somewhere else, and the closing section explains what the two routes have to do with each other.

Here goes another example. Let's assume that you are asked to take the Z transform of the following signal.

    x[n] = [0 1 0 1 0 0 0.5 0 1 0];

Don't worry too much about what the Z transform is. Just take the Z transform of delta and shifted delta function is defined as follows.

 

The Z transform of the delta function is one, and of a delta shifted by n zero is z to the minus n zero

Figure 12. The only two rules the example needs. A delta transforms to 1, and a shift by n0 transforms to z raised to minus n0. Everything after this is bookkeeping.

  • The shift becomes an exponent : a delay of n0 samples in time turns into a factor of z to the minus n0, which is the property that makes the transform useful.

 

Now the first step is to label each of the elements and you should get very familiar with this kind of labeling.

 

The ten element sequence with each position labelled x of zero through x of nine

Figure 13. Labelling, before any transform is taken. The green arrows pick out the four non-zero entries and the grey ones the six zeros.

  • The indexing starts at zero : x[0] is the first entry, so the non-zero entries are x[1], x[3], x[6] and x[8]. The MATLAB listing in Example 1 indexes the same array from 1 instead, which matters when the two are compared.

 

Now let's express each elements of the sequence (signal) using delta function. It will become as follows. If this not clear to you, go back to the first part of this page and read over and over until this expression get clear to you.

 

Each element of the sequence written as a scaled shifted delta function

Figure 14. Figure 5 again, with this sequence. Each entry becomes a number multiplying a delta shifted to that entry's index, zeros included.

 

And then the whole sequence can be expressed in a combination of all the delta functions as shown below. Again, if this not clear to you, go back to the first part of this page and read over and over until this expression get clear to you.

 

The whole sequence written as one sum of ten delta terms

Figure 15. The ten terms on one line. The line is deliberately left unsimplified, because the next step works term by term.

 

Now let's apply the Z transform rule for delta function to each elements of the sequence. It would become as follows.

 

Each delta term mapped through the Z transform to a coefficient times z to a negative power

Figure 16. The two rules from Figure 12 applied ten times. Each delta term becomes its coefficient times z to minus its index, and the terms never interact.

  • The index becomes the exponent : 1 delta(n-3) becomes 1 z to the minus 3, and 0.5 delta(n-6) becomes 0.5 z to the minus 6.
  • The zero terms transform to zero : they are carried through the figure for completeness and they contribute nothing to the answer.

 

Once you get the Z transform of each elements, you only have to linearly combine each elements to get the z transform of the whole sequence as shown below.

 

The Z transform of the whole sequence as a sum of ten terms

Figure 17. The ten transformed terms added. Linearity is what permits it, exactly as in Figure 11, and the result is a polynomial in z to the minus one.

 

As you know, this linear combination can be expressed in simpler form as shown below.

 

The Z transform written compactly as a summation of x of k times z to the minus k

Figure 18. The same result in closed form, which is how every textbook states the definition. Reaching it by substitution rather than by assertion is what the previous six figures are for.

Why the two examples are one example

The two examples above look like separate exercises and they are not. Both start from the same ten sample sequence, both take the same first step, and the second one supplies a shortcut for the first. Saying how they connect costs one paragraph and saves a great deal of arithmetic.

The shared first step is the decomposition. Example 1 splits x[n] into ten delta terms and convolves each one separately. Example 2 splits the same x[n] into the same ten delta terms and transforms each one separately. Figures 11 and 14 are the same operation drawn twice.

What differs is what happens to the pieces afterwards. Convolving a delta with h[n] gives a shifted copy of h[n], which is why Figure 11 needs ten tracks and a summing step. Transforming a delta gives a single power of z, which is why Figure 16 needs only a column of exponents.

x[n] the input sequence X(z) z^-1 + z^-3 + 0.5 z^-6 + z^-8 y[n] the output sequence Y(z) X(z) times H(z) Z transform Z transform convolve with h[n] ten tracks, Figure 11 multiply by H(z) one product the same answer by two routes convolution along the left edge and multiplication along the right edge give the same y[n]

Figure 19. The two examples on one diagram. Example 1 goes down the left edge and Example 2 goes along the top. The point of the transform is that the right edge is a multiplication where the left edge is a convolution.

  • The top edge is Example 2 and the left edge is Example 1 : each is a complete route from the input to something useful, and the page presents them as unrelated.
  • The right edge is why the transform is worth learning : the convolution on the left becomes an ordinary product of two polynomials on the right.
  • Both routes end at the same y[n] : the diagram closes, which is the only reason a detour through the z domain is ever allowed.
  • The shift rule is what makes it work : a delay of one sample becomes a factor of z to the minus one. A sum of shifted copies therefore becomes a polynomial, and a convolution becomes a multiplication.

The claim is checkable on the numbers already on the page. The impulse response from Example 1 transforms to H(z) = 0.2z-1 + 0.4z-2 + 0.6z-3 + 0.8z-4 + z-5 + 0.8z-6 + 0.6z-7 + 0.4z-8 + 0.2z-9, by the same rule Figure 16 used. Multiplying that by the X(z) of Figure 17 gives a polynomial whose coefficients are the output sequence of Figure 11, term for term.

One coefficient is enough to see it. The z-4 term of the product collects every pair of exponents that adds to 4, which here is x[1] with h[3] and x[3] with h[1]. That gives 1 times 0.6 plus 1 times 0.2, which is 0.8, and 0.8 is the fifth sample of the convolution in Figure 11.

The lengths agree too, and they agree for a reason worth noticing. The highest power in X(z) is 8 and the highest in H(z) is 9, so the product reaches z-17 and no further. The convolution in the MATLAB listing returns 20 samples, of which the last two are zero, because conv sizes its output from the array lengths rather than from where the data actually stops.

  • Adding exponents is adding delays : the product of two z terms shifts by the sum of their shifts, which is exactly what convolution does to two sequences.
  • Polynomial multiplication and convolution are the same operation : the coefficients of the product are the convolution of the coefficient lists, so Figure 11 and this section compute the same twenty numbers.
  • The degrees add and the lengths follow : 8 plus 9 gives a highest power of 17, which is why the last two of the twenty samples are zero.
  • The decomposition is the reusable part : splitting a signal into scaled shifted deltas is what made both examples tractable, and it is the one habit this page is really teaching.
  • The upper limit and the index share a letter : both are written as k, and they cannot both be right. Read the limit as the length of the sequence minus one, which is 9 here.
  • Dropping the zero terms leaves four : the transform is z to the minus 1, plus z to the minus 3, plus 0.5 z to the minus 6, plus z to the minus 8.