EG1110 SIGNALS AND SYSTEMS u(t) y(t) G Input/Output analysis of systems • An important question: Consider a system If we know u(t) G y(t) – the input signal; and – a description of the system Input: u(t) How do we calculate the output? Output: y(t) • Often analysis of system behaviour done in time domain i.e. observe output response y(t) when input u(t) is applied. 1 2 Answers... Convolution - discrete time • Static systems • Convolution better demonstrated in discrete-time. Simple: • Discrete-time δ-function (impulse) central to discrete-time convolution: System memoryless, so output at time t only depends on input at time t. • Dynamics systems δ(k − k0) = More complicated: System has memory. so output at time t function of input at time t plus, typically, one or more past inputs. 0 k 6= k0 1 k = k0 • Useful fact: Fact 1: Any given discrete time signal can be represented as a sum of impulses. • Convolution A technique needed to find current output for a dynamic systems (principle simple, but calculation can be difficult except in simple cases). x(k) = ∞ X x(n)δ(k − n) n=−∞ Remember δ(k − n) is only non-zero when n = k 3 4 (1) • Assume system is linear and time invariant. Example: Let x(k) be given by Thus x(n) is given by 2 k = −1 3 k=0 x(k) = 3 k=1 4 k=2 0 otherwise • Now define 2 n = −1 3 n=0 x(n) = 3 n=1 4 n=2 0 otherwise y(k) = Gk [u(k)] Then using our summing fact we get y(k) = Gk Thus we can calculate x(k) according to equation (1): = x(−2) = etc. etc. ∞ X x(−1) = x(n)δ(−2 − n) n=−∞ ∞ X = x(n)δ(−1 − n) n=−∞ = x(−2)δ(−2 + 2) = x(−1)δ(−1 + 1) = x(−2) = x(−1) = 0 = 2 ∞ X n=−∞ ∞ X n=−∞ ∞ X n=−∞ u(n)δ(k − n) Gk [u(n)δ(k − n)] by super − position u(n)Gk [δ(k − n)] by homogeneity and u(n) constant Now define the time-shifted impulse response h(k − n) as h(k − n) = Gk [δ(k − n)] 5 6 Thus we have Example - discrete-time convolution • Let impulse response of system be given by y(k) = ∞ X u(n)h(k − n) n=−∞ h(k) = 3δ(k) + 2δ(k − 1) i.e. The output of the system can be expressed in terms of its time-shifted impulse response summed over all time. • Let input be • This summation is called convolution • Specifically: y(k) = u(k) ? h(k) = ∞ X n=−∞ u(n)h(k − n) 1 k=1 u(k) = 3 k=2 0 otherwise • Objective: calculate response of system using convolution sum. • We know that is called the convolution sum. y(k) = u(k) ? h(k) 7 8 (2) = = ∞ X n=−∞ ∞ X n=−∞ u(n)h(k − n) u(n)[3δ(k − n) + 2δ(k − n − 1)] y(2) = u(0)[3δ(2 − 0) + 2δ(2 − 0 − 1)] (3) (by using given impulse response) • Input begins to be nonzero at k = 1. As system is causal, this is first time at which output can be (n = 0) +u(1)[3δ(2 − 1) + 2δ(2 − 1 − 1)] (n = 1) +u(2)[3δ(2 − 2) + 2δ(2 − 2 − 1)] (n = 2) = u(0)[0 + 0] + u(1)[0 + 2] + u(2)[3 + 0] nonzero..... = 0 + 2 + 9 = 11 ...Hence y(1) = u(0)[3δ(1 − 0) + 2δ(1 − 0 − 1)] +u(1)[3δ(1 − 1) + 2δ(1 − 1 − 1)] y(3) = u(0)[3δ(3 − 0) + 2δ(3 − 0 − 1)] (n = 0) (n = 1) = u(0)[0 + 2] + u(1)[3 + 0] = 0+3=3 (n = 0) +u(1)[3δ(3 − 1) + 2δ(3 − 1 − 1)] (n = 1) +u(2)[3δ(3 − 2) + 2δ(3 − 2 − 1)] (n = 2) +u(3)[3δ(3 − 3) + 2δ(3 − 3 − 1)] (n = 3) = u(0)[0 + 0] + u(1)[0 + 0] + u(2)[0 + 2] + u(3)[3 + 0] = 0+0+6+0=6 9 10 As impulse response only has one memory stage, output is zero after k = 3. Hence we have computed output of system as y(k) = 3 k=1 11 k=2 6 k=3 0 otherwise 2 y2(k) = 6 (4) 0 y(k) = y1(k) + y2(k) i.e. the total response is the sum of the impulse responses - as expected! Let h1(k) = 3δ(k) and h2(k) = 2δ(k − 1) Then we would get outputs 3 k=1 y1(k) = 9 k=2 0 11 k=3 otherwise Obviously • Note that system response to single impulses would be given as follows: k=2 otherwise 12