EE 445 S RealTime Digital Signal Processing Lab
EE 445 S Real-Time Digital Signal Processing Lab Spring 2021 Signals and Systems Prof. Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin Lecture 3 http: //www. ece. utexas. edu/~bevans/courses/realtime
Outline • Signals Continuous-time vs. discrete-time Analog vs. digital Unit impulse 1 -1 • Continuous-Time System Properties • Sampling • Discrete-Time System Properties 3 -2
Review Many Faces of Signals • Function, e. g. cos(t) in continuous time or cos(p n) in discrete time, useful in analysis • Sequence of numbers, e. g. {1, 2, 3, 2, 1} or a sampled triangle function, useful in simulation • Set of properties, e. g. even and causal, useful in reasoning about behavior • A piecewise representation, e. g. useful in analysis • A generalized function, e. g. d(t), useful in analysis 3 -3
Review Signals As Functions • Continuous-time x(t) Time, t, is any real value x(t) may be 0 for range of t • Discrete-time x[n] n {. . . -3, -2, -1, 0, 1, 2, 3. . . } Integer time index, e. g. n • Analog amplitude Real or complex value • Digital amplitude From discrete set of values 1 -1 Continuous-Time Signal Sampler Discrete-Time Signal Analog Amplitude Signal Quantizer Digital Amplitude Signal 3 -4
Review Unit Impulse • Mathematical idealism for an instantaneous event • Dirac delta as generalized function (a. k. a. functional) • Selected properties -e e t Unit area: Sifting: (1) provided g(t) is defined at t = 0 Scaling: • (0) could be infinity or undefined t 0 3 -5
Review Unit Impulse • d(t) under integration • Other examples Assuming (t) is defined at t=0 • What about? • What about at origin? By substitution of variables, u(0) can take any value Common values: 0, ½, 1 L. B. Jackson, “A correction to impulse invariance, ” IEEE Sig. Proc. Letters, Oct. 2000. 3 -6
Review Systems • Systems operate on signals to produce new signals or new signal representations x(t) T{ • } y(t) x[n] T{ • } y[n] • Continuous-time system examples y(t) = ½ x(t) + ½ x(t-1) y(t) = x 2(t) Squaring function can be used in sinusoidal demodulation • Discrete-time system examples y[n] = ½ x[n] + ½ x[n-1] y[n] = x 2[n] Average of current input and delayed input is a simple filter 3 -7
Review Continuous-Time System Properties • Let x(t), x 1(t), and x 2(t) be inputs to a continuoustime linear system and let y(t), y 1(t), and y 2(t) be their corresponding outputs • A linear system satisfies Quick test to identify some nonlinear systems? Additivity: x 1(t) + x 2(t) y 1(t) + y 2(t) Homogeneity: a x(t) a y(t) for any real/complex constant a • For time-invariant system, shift of input signal by any real-valued t causes same shift in output signal, i. e. x(t - t) y(t - t), for all t 3 -8
Why are LTI properties useful? • An LTI system is uniquely characterized by its impulse response Abstract away implementation details by providing an impulse response e. g. to hide intellectual property Model an unknown system assumed to be LTI • Fourier transform of the impulse response h(t) is the frequency response of the system Hfreq(f) Time domain x(t) Laplace domain X(s) Frequency domain Xfreq(f) h(t) y(t) = h(t) * x(t) Y(s) = H(s) X(s) Yfreq(f) = Hfreq(f) Xfreq(f) 3 -9
Is a System Linear or Not? • Example: Squaring block x(t) ( )2 y(t) Does the squaring block pass all-zero input test? Does the squaring block have homogeneity? x(t) y(t) = x 2(t) ( )2 yscaled(t) = (a x(t))2 a x(t) yscaled(t) Does yscaled(t) = a y(t) for all constant values of a? (a x(t))2 = a x 2(t) a 2 x 2(t) = a x 2(t) only for a = 0 and a = 1 No 3 - 10
Is a System Time-Invariant or Not • Example: Squaring block x(t) ( )2 y(t) Does shift in time for input always give same shift on output? x(t) y(t) = x 2(t) ( )2 yshifted(t) = (x(t-t 0))2 x(t-t 0) yshifted(t) Does yshifted(t) = y(t-t 0) for all real values of t 0? (x(t-t 0))2 = x 2(t-t 0) Yes • All pointwise systems are time-invariant Output at time t only depends on input at time t 3 - 11
Initial Conditions for LTI Systems • Observe system starting at time t 0 (often use t 0 = 0) • Example: Integrator x(t) y(t) • Observe integrator for t t 0 x(t) y(t) C 0 is the initial condition w/r to observation Has linearity if initial condition is zero (C 0 = 0) Has time-invariance if initial condition is zero (C 0 = 0) • System being “at rest” is necessary for linear and time-invariant (LTI) properties to hold 3 - 12
Continuous-Time System Properties • Ideal delay by T seconds x(t) Role of initial conditions? y(t) See Handout U on Time-Invariance Linear? Time-invariant? • Scale by a constant (a. k. a. gain block) Two different ways to express it in a block diagram x(t) y(t) Linear? Time-invariant? 3 - 13
Continuous-Time System Properties • Tapped delay line M-1 delay blocks Coefficients a 0, a 1, …a. M-1 … … Linear? Time-invariant? Role of initial conditions? Impulse response h(t) lasts (M-1)T seconds: S y(t) = a 0 x(t) + a 1 x(t – T) + … + a. M-1 x(t – (M-1)T) h(t) (a 1) … (M-1)T t T (a 0) (a. M-1)
Continuous-Time System Properties • Amplitude Modulation (AM) y(t) = A x(t) cos(2 p fc t) fc carrier frequency A is a constant Linear? Time-invariant? x(t) y(t) A cos(2 p fc t) • Linearity: Does system pass all-zero input test? x(t) a x(t) yscaled(t) y(t) = A x(t) cos(2 p fc t) yscaled(t) = A (a x(t)) cos(2 p fc t) Does yscaled(t) = a y(t) for all constant values of a? • AM radio if x(t) = 1 + ka m(t) where m(t) is audio to be broadcast and |ka m(t)| < 1 (see lecture 19) 3 - 15
Review Discrete-Time Signals • Conversion of signals Sampling: Continuous-Time to Discrete-Time Reconstruction: Discrete-Time to Continuous-Time f 0 = 440; fs = 24*f 0; Ts = 1/fs; tmax = 1/f 0; t = 0 : Ts : tmax; x = cos(2*pi*f 0*t); plot(t, x); figure; stem(t, x); sampling reconstruction t cosine at 440 Hz sampling rate: 10560 Hz sampling period: 94. 7 ms 3 - 16
Review Generating Discrete-Time Signals • Many signals originate in continuous time Example: Talking on cell phone • Sample continuous-time signal at equally-spaced points in time to obtain a sequence of numbers Sampled analog waveform s(t) Ts t s[n] = s(n Ts) for n {…, -1, 0, 1, …} How to choose sampling period Ts ? Ts d[n] • Using a formula Discrete-time impulse d[n] on right How does d[n] look in continuous time? 1 n -3 -2 -1 1 2 3 - 17 3
Aliasing Example • Sample 30 k. Hz sinusoid using 48 k. Hz sampling rate 3 - 18
Review Discrete-Time System Properties • Let x[n], x 1[n] and x 2[n] be inputs to a linear system • Let y[n], y 1[n] and y 2[n] be corresponding outputs • A linear system satisfies Additivity: x 1[n] + x 2[n] y 1[n] + y 2[n] Homogeneity: a x[n] a y[n] for any real/complex constant a • For a time-invariant system, a shift of input signal by any integer-valued m causes same shift in output signal, i. e. x[n - m] y[n - m], for all m • Role of initial conditions? 3 - 19
Why are LTI properties useful? • An LTI system is uniquely characterized by its impulse response Abstract away implementation details by providing an impulse response e. g. to hide intellectual property Model an unknown system assumed to be LTI • Fourier transform of the impulse response h[n] is the frequency response of the system Hfreq(w) Time domain x[n] Z domain X(z) Frequency domain Xfreq(w) h[n] y[n] = h[n] * x[n] Y(z) = H(z) X(z) Yfreq(w) = Hfreq(w) Xfreq(w) 3 - 20
Discrete-Time System Properties • Tapped delay line in discrete time … … See also slide 5 -4 M-1 delay blocks where z-1 is delay of 1 sample: Coefficients a 0 a 1…a. M-1 are impulse response: S • Linear? Time-invariant? Role of initial conditions? 3 - 21
Averaging Filter • Continuous time • Discrete time Averages input signal over previous T seconds Linear? Time-invariant? Impulse response: h(t) Averages current and previous M-1 samples Linear? Time-invariant? Hint: Tapped delay line with am = 1/M for m in [0, M-1] h[n] 0 T t See Designing Averaging Filters Handout … -1 0 1 2 n M-1 M 3 - 22
First-Order Difference Filter • Continuous time f(t) y(t) Linear? Time-invariant? • Discrete time f[n] y[n] Linear? Time-invariant? Hint: Tapped delay line with a 0 = 1 and a 1 = -1 See also slide 5 -19 3 - 23
- Slides: 23