IT代写 Discrete-time LTI systems in the time domain

Discrete-time LTI systems in the time domain
In this topic we investigate the response of a discrete-time linear time-invariant system to an input signal. We start with the case of discrete-time systems, because it is mathematically simpler than the continuous-time case. The basic approach we take is to:
• observe that any DT signal can be expressed as a weighted sum of shifted unit impulse signals (the sifting formula of Section 3.1);
• give a name to the response of an LTI system to the unit impulse signal (the impulse response, defined in Section 3.2);

Copyright By PowCoder代写 加微信 powcoder

• use the properties of linearity and time-invariance to find a formula that describes the system output in terms of the system input and the impulse response (the convolution formula, developed in Section 3.3).
This basic strategy allows us to understand the response of a discrete-time LTI system to a general input, by first understanding its response to the unit impulse. In addition, it highlights the fact that the impulse response completely specifies an LTI system.
3.1 Discrete-time sifting formula
The discrete-time unit impulse δ is shown on the left in the figure below. Recall that the only time at which it is non-zero is n = 0. A copy of the discrete-time unit impulse delayed by 2 samples, Delay2(δ), is shown on the right in the figure below. The only time at which Delay2(δ) is non-zero is n = 2.
δ Delay2(δ) 11
In general, Delayk(δ) is a copy of the unit impulse delayed by k samples. The only time at which Delayk(δ) is non-zero is n = k.
In a sense, shifted unit impulses are fundamental because we can build up more complicated discrete-time signals by taking weighted sums of shifted unit impulses.

Example 3.1
The signal x
can be expressed as
x[n] = 2δ[n + 2] − 0.5δ[n + 1] + δ[n − 1] for all n or
x = 2Delay−2(δ) − 0.5Delay−1(δ) + Delay1(δ). This decomposition is shown, pictorially, below.
2Delay−2(δ) + −0.5Delay−1(δ) + n−1n n
Note that x[−2] = 2, x[−1] = −0.5, x[1] = 1 and all other values of x are zero. Because of
this we can write
x[n] = x[−2]δ[n + 2] + x[−1]δ[n + 1] + x[1]δ[n − 1] for all n or
x = x[−2]Delay−2δ + x[−1]Delay−1δ + x[1]Delay1δ.
This emphasises that x is a weighted sum of time-shifted unit impulses. Furthermore, only the times at which x takes non-zero values need to be included in the sum.
The basic idea of the previous example works in general. We can write any DT signal as a weighted sum of shifted unit impulses.
An alternative way to write the sifting formula is that any DT signal x can be written as x = 􏰉∞ x[k](Delaykδ).
This makes is clear that x is a weighted sum of time-shifted unit impulse functions, where the weights are exactly the numbers x[k].
Discrete-time sifting formula
If x is a discrete-time signal then
x[n] = 􏰉∞ x[k]δ[n − k] for all times n. k=−∞

Summary of Section 3.1
Any discrete-time signal can be expressed as a weighted sum of time-shifted unit impulse (Kronecker delta) functions.
3.2 Impulse response of a discrete-time LTI system
The impulse response of a system is a signal. This signal is usually denoted h.
Impulse response
The impulse response of a DT LTI system is the output of the system when the input is the unit impulse.
Example 3.2
Consider the three-point averaging system in which the output y and intput x are related by the difference equation
y[n]= 13(x[n]+x[n−1]+x[n−2]). To find the impulse response, we just substitute x = δ to obtain
h[n]= 13(δ[n]+δ[n−1]+δ[n−2]). This impulse response is shown below:
−2 −1 0 1 2 3 Note that h[n] = 0 except for n = 0,1,2.
Example 3.3
Consider the feedback system described by the difference equation y[n] = 0.5y[n − 1] + x[n]
with the initial condition y[n] = 0 for all n ≤ −1. By putting x = δ, we can compute the impulse response h. First, since h[−1] = 0 (by the initial conditions) we see that
h[0] = 0.5h[−1] + δ[0] = 1.

Then, for n = 1 we have
h[1] = 0.5h[0] + δ[1] = 0.5h[0] = 0.5 since δ[1] = 0 and h[0] = 1. Similarly
h[2] = 0.5h[1] + δ[2] = 0.5h[1] = 0.52.
Continuing in this way we see that h[n] = 0.5n for all n ≥ 0. The initial conditions tell us
that h[n] = 0 for all n < 0. We can write this concisely as h[n] = 0.5nu[n] where u is the unit step function. In this case h[n] > 0 for all n ≥ 0. The impulse response h is shown below:
··· n −2 −1 0 1 2 3 4
The impulse response of the system in the first example above only takes non-zero values at finitely many times. In contrast, the impulse response of the system in the second example takes non-zero values for all n ≥ 0. There is standard terminology to distinguish between these two situations.
It is reasonable to ask why we introduce special terminology for the response of the system to a unit impulse. The reason is that for LTI systems, the impulse response encodes everything about the system. We will see why in the next section.
Finite and infinite impulse response
A finite impulse response (FIR) LTI system is one for which the impulse response is zero except at finitely many times. If an LTI system is not FIR it is called an infinite impulse response (IIR) system.
Summary of Section 3.2
If the input of a DT LTI system is the unit impulse function, the output is called the impulse response and is usually denoted h. A system has finite impulse response (FIR) if its impulse response is non-zero for only finitely many times. Otherwise a system has infinite impulse response (IIR).

3.3 Discrete-time convolution and LTI system response
In this section we will see that the impulse response of a DT LTI system tells us everything about the system, i.e., it characterizes the system. We do this by showing that the output of a DT LTI system depends only on the input signal and the system’s impulse response. Moreover, we will find an explicit formula relating the output with the input and the impulse response. This is called the convolution formula.
Let S be a DT LTI system with impulse response h. Our aim is to understand the output of the system when the input is a general signal. Before we do that, let’s do a number of special cases. Notice how these special cases slowly use more and more properties of S.
• Suppose the input is δ, the unit impulse. Then the output of S is S(δ) = h. This is just the definition of the impulse response.
Example 3.4
Let S be the three-point DT averaging system with impulse response h[n] = (δ[n] + δ[n − 1] + δ[n − 2])/3. The output of the system when the input is δ is, by definition h shown below
−2 −1 0 1 2 3
• Suppose the input is a copy of the unit impulse shifted in time by k time units, i.e., Delayk(δ). Then, using the fact that S is time-invariant, the output of S is
S(Delayk(δ)) = Delayk(S(δ)) = Delayk(h). This is just the impulse response shifted in time by k time units.
Example 3.5
If the input to the three-point DT averaging system is δ1(δ) then the output is Delay1(h), shown below:
Delay1 (h) 1/3
−2 −1 0 1 2 3 4

• Suppose that the input is x[k]Delayk(δ), a scaled and time-shifted copy of the unit impulse. (Remember, also, that x[k] is just a number.) Then, using the fact that S is homogeneous (or has the scaling property)
S(x[k]Delayk(δ)) = x[k]S(Delayk(δ)) = x[k]Delayk(h) where the second equality follows from the previous bullet.
• Suppose that the input is
􏰉∞ x[k]Delayk(δ), k=−∞
i.e., a weighted sum of time-shifted unit impulses. (Again notice that x[k] is just a number for each value of k.) Then, using the fact that S is additive (or obeys the superposition property)
􏰌∞􏰍∞∞ S 􏰉 x[k]Delayk(δ) = 􏰉 S (x[k]Delayk(δ)) = 􏰉
k=−∞ k=−∞ k=−∞ where the second equality follows from the previous bullet.
x[k]Delayk(h)
Example 3.6
Suppose x = 2Delay−2δ − 0.5Delay−1δ + Delay1δ is the signal shown below:
The output of the DT three-point averaging system is the sum of three terms, 2Delay−2h, −0.5Delay−1h and Delay1h. These are shown below:
2Delay−2 (h) 2
−0.5Delay−1 (h) ++
Delay1 (h) 1
The overall system output is y = 2Delay−2h − 0.5Delay−1h + Delay1h. A plot of this can be obtained by adding up the three plots in the previous figure:

−3 −2 −1 0 1 2 3 4
We can also find an explicit expression for the output. Since h[n] = (δ[n] + δ[n − 1] +
δ[n − 2])/3 we have that
y[n] = 2h[n + 2] − 0.5h[n + 1] + h[n − 1] = (2/3)(δ[n + 2] + δ[n + 1] + δ[n])
−(1/6)(δ[n+1]+δ[n]+δ[n−1]) +(1/3)(δ[n−1]+δ[n−2]+δ[n−3])
= (2/3)δ[n + 2] + (1/2)δ[n + 1] + (1/2)δ[n]+
(1/6)δ[n − 1] + (1/3)δ[n − 2] + (1/3)δ[n − 3].
The sifting formula (see Section 3.1) tells us that any input signal x can be written as x = 􏰗∞k=−∞ x[k]Delayk(δ). Putting together all of these observations, we now see how to write a formula for the output of a DT LTI system.
The sum on the right-hand side of (3.1) is important enough to have a special name and a special symbol.
We can now say, very concisely, how the input and output of a DT LTI system are re- lated.
If S is a DT LTI system with impulse response h, then y = S(x) if and only if
y[n] = 􏰉∞ x[k]Delayk(h)[n] = 􏰉∞ x[k]h[n − k]. (3.1) k=−∞ k=−∞
Discrete-time convolution
The convolution of DT signals x and h is a new DT signal h ∗ x defined by
(h ∗ x)[n] = 􏰉∞ x[k]h[n − k]. (3.2) k=−∞
The output of a DT LTI system is the convolution of the input and the impulse response of the system.
Example 3.7
We return to the example from the previous section, finding the output of the three-point DT averaging system when the input is x[n] = 2δ[n + 2] − 0.5δ[n + 1] + δ[n − 1]. Note that x[−2] = 2 and x[−1] = −0.5 and x[1] = 1 and all other values of x are zero. This time we

use the convolution formula directly: y[n] = 􏰉∞ x[k]h[n − k]
= x[−2]h[n + 2] + x[−1]h[n + 1] + x[1]h[n − 1] = (2/3)(δ[n + 2] + δ[n + 1] + δ[n])
−(1/6)(δ[n+1]+δ[n]+δ[n−1]) +(1/3)(δ[n−1]+δ[n−2]+δ[n−3])
= (2/3)δ[n + 2] + (1/2)δ[n + 1] + (1/2)δ[n]+
(1/6)δ[n − 1] + (1/3)δ[n − 2] + (1/3)δ[n − 3].
The most important thing about the previous example is the way the infinite sum simplified. Because x[k] was only non-zero for three values of k, the infinite sum in the convolution formula only has three non-zero terms!
Example 3.8
We now consider a case with an infinite impulse response. For example consider a DT LTI system with impulse response h[n] = (0.5)nu[n] (where u is the unit step function). Consider, again, the input x[n] = 2 δ[n + 2] − 0.5 δ[n + 1] + δ[n − 1]. Then, from the convolution formula, we have
y[n] = 􏰉∞ x[k]h[n − k] k=−∞
= x[−2]h[n + 2] + x[−1]h[n + 1] + x[1]h[n − 1]
= 2(0.5)n+2u[n + 2] − 0.5(0.5)n+1u[n + 1] + (0.5)n−1u[n − 1].
This is a perfectly good description of y. Nevertheless, we will simplify it a little. To do so, it is helpful to note that
u[n+2]=δ[n+2]+δ[n+1]+δ[n]+u[n−1] foralln u[n+1]=δ[n+1]+δ[n]+u[n−1] foralln.
Then we have
y[n] = 2(0.5)n+2δ[n + 2] + 2(0.5)n+2δ[n + 1] + 2(0.5)n+2δ[n]+ − 0.5(0.5)n+1δ[n + 1] − 0.5(0.5)n+1δ[n]+
􏰃2(0.5)n+2 − 0.5(0.5)n+1 + (0.5)n−1􏰄 u[n − 1].
We now use the fact that for a signal f, we can simplify products of f and shifted unit
impulses as follows:
f[n]δ[n+2] = f[−2]δ[n+2] and f[n]δ[n+1] = f[−1]δ[n+1] and f[n]δ[n] = f[0]δ[n].
Using this technique, together with the observation that (0.5)n+2 = (0.5)3(0.5)n−1 and (0.5)n+1 = (0.5)2(0.5)n−1, we can rewrite y as
y[n] = 2(0.5)0δ[n + 2] + (2(0.5)1 − 0.5(0.5)0)δ[n + 1] + (2(0.5)2 − 0.5(0.5)1)δ[n]+ (0.25 − 0.125 + 1) (0.5)n−1u[n − 1].

Simplifying further gives
y[n] = 2 δ[n + 2] + 0.5 δ[n + 1] + 0.25 δ[n] + 1.125(0.5)n−1u[n − 1].
3.4 Properties of convolution
In this section, our aim is to understand the convolution operation better, by exploring its properties. In some cases we will use things we know about systems to tell us things about the convolution operation. In other cases, we will use things we know about convolution to tell us things about systems.
3.4.1 Convolution with unit impulse
The convolution of a signal with the unit impulse produces the signal again, i.e,
h∗δ = h for all h (3.3)
If h is the impulse response of an LTI system, then h ∗ δ is the output of that system when the input is δ. This is just h by definition.
3.4.2 Impulse response of series composition
Suppose that h1 and h2 are the impulse responses of two LTI systems S1 and S2 respectively. If S1 and S2 are connected in series as shown below, then the impulse response of the overall system is
To see why, notice that if the input to the overall system is the unit impulse, then the input to S1 is the unit impulse. So the output of S1 is h1. Then the input to S2 is h1 and so the output of S2 is h2 ∗h1. So the output of the overall system is h2 ∗h1 when the input is δ.
3.4.3 Impulse response of parallel composition
Suppose that h1 and h2 are the impulse responses of two LTI systems S1 and S2 respectively. If S1 and S2 are connected in parallel as shown below, then the impulse response of the overall system is
To see why, notice that if the input to the overall system is δ, then the output of S1 is h1 and
the output of S2 is h2. The output of the overall system is then h1 + h2.
δ h1 h2 ∗ h1

3.4.4 Convolution is commutative
We will now see that convolution is commutative, i.e., h1 ∗ h2 = h2 ∗ h1 for any two DT signals h1 and h2. To see why this is true, we just rewrite the sum by introducing the dummy variable k′ =n−k. Doingsoweseethat
(h1 ∗ h2)[n] = 􏰉∞ h1[k]h2[n − k] = 􏰉∞ h1[n − k′]h2[k′] = (h2 ∗ h1)[n]. k=−∞ k′ =−∞
3.4.5 Single-input-single-output LTI systems commute
We have seen that for general systems S1 and S2, the serial composition of the two systems depends on the order of composition. In other words, in general S1(S2(x)) ̸= S2(S1(x)) where x is an input signal.
If S1 and S2 are single-input-single-output LTI systems, the fact that convolution is com- mutative tells us that S1(S2(x)) = S2(S1(x)) for all inputs x. To see why, suppose that h1 is the impulse response of S1, and h2 is the impulse response of S2. Then the impulse response of S2 followed by S1 is h1 ∗ h2 (see ‘impulse response of serial composition’ above), and the impulse response of S1 followed by S2 is h1 ∗h2. Since h1 ∗h2 = h2 ∗h1 (see ‘convolution is commutative’ above), the two different systems have the same impulse response, and so must be identical.
3.5 Impulse response and LTI system properties
The impulse response characterizes a DT LTI system. That means that any interesting property that the system has should be reflected in the impulse response. We now discuss how certain system properties are reflected in the impulse response.
3.5.1 Memorylessness
Recall that a system is memoryless if its output at time n only depends on its input at time n. By the convolution formula, an LTI system with impulse response h has output
y[n] = 􏰉∞ h[k]x[n − k]. k=−∞
For y[n] to depend only on x[n] we must have that h[k] = 0 unless k = 0. In other words h = αδ is a scaled copy of the unit impulse.

Impulse response of memoryless DT LTI systems
An LTI system is memoryless if and only if its impulse response is a scaled copy of the unit impulse. In other words, the only memoryless LTI systems are gain systems.
3.5.2 Causality
Recall that a system is causal if its output at time n only depends on its inputs at current and previous times. By the convolution formula, an LTI system with impulse response h has output
y[n] = 􏰉∞ h[k]x[n − k]. k=−∞
For y[n] to depend only on x[n],x[n − 1],x[n − 2],… we must have that h[k] = 0 unless k ≥ 0.
3.5.3 BIBO stability
Recall that a system is BIBO stable if whenever the system input is a bounded signal, the system output is also a bounded signal. We can decide whether or not an LTI system is BIBO stable by looking at its impulse response.
Impulse response of causal DT LTI systems
An LTI system is causal if and only if its impulse response satisfies h[n] = 0 for all n < 0. BIBO stability and impulse response of DT LTI systems A DT LTI system is BIBO stable if and only if its impulse response h is absolutely summable, i.e., there exists a positive real number M such that 􏰉∞ | h [ k ] | ≤ M . k=−∞ To see why this is true, we use the convolution formula. There are two parts to the argument. • First, assume that the impulse response is absolutely summable, and assume that the input x to the system is bounded, i.e., there exists Mx such that |x[n]| ≤ Mx for all n. Then for each n 􏰖􏰖∞ 􏰖􏰖∞ ∞ 􏰉􏰉􏰉 |y[n]| = |(h∗x)[n]| = 􏰖􏰖 h[k]x[n − k]􏰖􏰖 ≤ |h[k]||x[n−k]| ≤ |h[k]|Mx ≤ MxM. 􏰖k=−∞ 􏰖 k=−∞ k=−∞ This means that y is bounded. We have shown that for an arbitrary bounded input signal, the output signal is also bounded, showing that the system is BIBO stable. • We now need to show that if the system is BIBO stable then the impulse response is absolutely summable. Let h be the impulse response of a BIBO stable system. Let 􏰀1 if h[−n] ≥ 0 x[n] = −1 if h[−n] < 0. Clearly x is bounded, because |x[n]| ≤ 1 for all n. Since the system is BIBO stable, there exists some M such that |y[n]| ≤ M for all n. In particular |y[0]| ≤ M. But then 􏰖􏰖∞ 􏰖􏰖􏰖􏰖∞􏰖􏰖∞ 􏰉􏰉􏰉 |y[0]| = 􏰖􏰖 h[k]x[−k]􏰖􏰖 = 􏰖􏰖 |h[k]|􏰖􏰖 = |h[k]| ≤ M 􏰖k=−∞ 􏰖 􏰖k=−∞ 􏰖 k=−∞ where the second equality holds from our definition of x, and the third equality holds because the sum is non-negative, and the last because |y[0]| ≤ M. We have shown that the impulse response is absolutely summable, as required. Summary of Section 3.5 The output of a DT LTI system is the convolution of the input with the impulse response of the system. This gives a general formula for computing the output of a DT LTI system to given the input and the impulse response. The properties of the convolution operation are closely related to the properties of LTI systems. FIR filtering in the time-domain If an LTI system has a finite impulse response, then it is straightforward to construct a block diagram of the system using only unit delays, gains, and adders. Such a block diagram can be translated into an implementation in a high-level programming language (such as MATLAB) or even an implementation in an FPGA. If h is the impulse response of a causal FIR LTI system then • h[n] = 0 for n < 0 (because the system is causal) • h[n] = 0 for n > m for some time m (because there are only finitely many times for which h is non-zero).
This means we can express the system output for an input x as 􏰉∞ 􏰉∞ 􏰉m
y[n] = x[k]h[n − k] = k=−∞
h[k]x[n − k] = h[k]x[n − k] (3.4) k=0
where the first equality is the convolution formula, the second holds because h ∗ x = x ∗ h, and the third is because h is only non-zero for 0 ≤ n ≤ m.
The input-output formula now involves a finite sum. The input-output relationship in (3.4) shows that the output and input are related by a linear constant coefficient difference equation of order m. The system can be realised by the following block diagram:

3.6.1 FIR filtering in MATLAB
Suppose h is the impulse response of a causal FIR LTI system. Recall that because the filter is causal, h[n] = 0 for n < 0. Because the filter is FIR (finite impulse response), there are only finitely many times n for which h[n] ̸= 0. In particular, there is a largest time, nmax, at which the impulse response is non-zero. Because of this, we can store the values of the impulse response in a vector h in MATLAB of length nmax + 1. Because MATLAB indexes from 1, we should store the value of h[n] in the entry h(n+1) of our MATLAB vector (for 0 ≤ n ≤ nmax). If x is an input signal with x[n] = 0 for n < 0 and x[n] = 0 for n > mmax, then we can store the values of x in a vector x of length mmax + 1. Similarly because MATLAB indexes from 1, we should store the value of x[n] in the entry x(n+1) of our MATLAB vector (for 0 ≤ n ≤ mmax). MATLAB has a function conv that computes the convolution of two vectors. Suppose we want to compute
y[n] = 􏰉 x[k]h

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com