Introduction CHAPTER ★ 1.8.6 Linearity A system is said to be linear in terms of the system input (excitation) x(t) and the system output (response) y(t) if it satisfies the following two properties of superposition and homogeneity: 1. Superposition: x (t ) x1 (t ) y (t ) y1 (t ) x (t ) x1 (t ) x2 (t ) x ( t ) x2 ( t ) y (t ) y2 (t ) y (t ) y1 (t ) y2 (t ) 2. Homogeneity: y (t ) x(t ) ay (t ) ax(t ) a = constant factor Linearity of continuous-time system 1. Operator H represent the continuous-tome system. 2. Input: x1(t), x2(t), …, xN(t) input signal; a1, a2, …, aN N Corresponding weighted factor x(t ) ai xi (t ) (1.86) i 1 3. Output: N y (t ) H {x(t )} H { ai xi (t )} i 1 (1.87) Introduction CHAPTER N y (t ) ai yi (t ) (1.88) i 1 Superposition and homogeneity where yi (t ) H {xi (t )}, i 1, 2, ..., N . (1.89) 4. Commutation and Linearity: N y (t ) H { ai xi (t )} i 1 N ai H {xi (t )} (1.90) Fig. 1.56 i 1 N ai yi (t ) i 1 Linearity of discrete-time system Same results, see Example 1.19. Example 1.19 Linear Discrete-Time system Consider a discrete-time system described by the input-output relation y[n] nx[n] Show that this system is linear. Introduction CHAPTER Figure 1.56 (p. 64) The linearity property of a system. (a) The combined operation of amplitude scaling and summation precedes the operator H for multiple inputs. (b) The operator H precedes amplitude scaling for each input; the resulting outputs are summed to produce the overall output y(t). If these two configurations produce the same output y(t), the operator H is linear. <p.f.> 1. Input: N x[n] ai xi [n] i 1 2. Resulting output signal: Introduction CHAPTER N N N y[n] n ai xi [n] ai nxi [n] ai yi [n] i 1 i 1 where yi [n] nxi [n] i 1 Linear system! Example 1.20 Nonlinear Continuous-Time System Consider a continuous-time system described by the input-output relation y(t ) x(t ) x(t 1) Show that this system is nonlinear. <p.f.> N 1. Input: x(t ) ai xi (t ) i 1 2. Output: N N N N i 1 j 1 i 1 j 1 y(t ) ai xi (t ) a j x j (t 1) ai a j xi (t ) x j (t 1) Here we cannot write y (t ) i 1 ai yi (t ) N Nonlinear system! CHAPTER Introduction Example 1.21 Impulse Response of RC Circuit For the RC circuit shown in Fig. 1.57, determine the impulse response y(t). <Sol.> 1. Recall: Unit step response y(t ) (1 e t / RC )u(t ), x(t ) u(t ) (1.91) 2. Rectangular pulse input: Fig. 1.58. x(t) = x(t) 1 u (t ) 2 1 x2 (t ) u (t ) 2 x1 (t ) 1/ Figure 1.57 (p. 66) RC circuit for Example 1.20, in which we are given the capacitor voltage y(t) in response to the step input x(t) = y(t) and the requirement is to find y(t) in response to the unit-impulse input x(t) = (t). Figure 1.58 (p. 66) Rectangular pulse of unit area, which, in the limit, approaches a unit impulse as Δ0. 3. Response to the step functions x1(t) and x2(t): /2 /2 Introduction CHAPTER t /( RC ) 1 y1 1 e 2 u t , 2 x(t ) x1 (t ) t /( RC ) 1 2 y2 1 e u t , 2 x ( t ) x2 ( t ) Next, recognizing that x (t ) x1 (t ) x2 (t ) 1 1 (1 e ( t / 2) /( RC ) )u(t / 2) (1 e ( t / 2) /( RC ) )u( t / 2) 1 1 (u(t / 2) u(t / 2)) ( e ( t / 2) /( RC ) u( t / 2) e ( t / 2) /( RC ) )u( t / 2)) y (t ) i) (t) = the limiting form of the pulse x(t): (t ) lim x (t ) 0 (1.92) Introduction CHAPTER ii) The derivative of a continuous function of time, say, z(t): d 1 z (t ) lim{ ( z (t ) z (t ))} 0 dt 2 2 y (t ) lim y (t ) 0 d t /( RC ) (t ) (e u (t )) dt d t /( RC ) t /( RC ) d (t ) e u (t ) u (t ) (e ) dt dt 1 t /( RC ) t /( RC ) (t ) e (t ) e u (t ), x(t ) (t ) RC (1.92) Cancel each other! y (t ) 1 t /( RC ) e u(t ), x(t ) (t ) RC (1.93) Introduction CHAPTER 1.9 Noise Noise Unwanted signals 1. External sources of noise: atmospheric noise, galactic noise, and humanmade noise. 2. Internal sources of noise: spontaneous fluctuations of the current or voltage signal in electrical circuit. (electrical noise) Fig. 1.60. ★ 1.9.1 Thermal Noise Thermal noise arises from the random motion of electrons in a conductor. Two characteristics of thermal noise: 1. Time-averaged value: 2T = total observation interval of noise 1 v lim T 2T T T v(t )dt (1.94) As T , v 0 2. Time-average-squared value: 1 v lim T 2T 2 As T , T T v 2 (t )dt k = Boltzmann’s constant = 1.38 10 23 J/K Tabs = absolute temperature (1.95) v 2 4kTabs Rf Refer to Fig. 1.60. volts2 (1.96) CHAPTER Introduction Figure 1.60 (p. 68) Sample waveform of electrical noise generated by a thermionic diode with a heated cathode. Note that the timeaveraged value of the noise voltage displayed is approximately zero. CHAPTER Introduction Thevenin’s equvalent circuit: Fig. 1.61(a), Norton’s equivalent circuit: Fig. 1.61(b). Noise voltage generator: v(t ) v 2 Noise current generator: 1 T v(t ) 2 i lim ( ) dt T 2T T R (1.97) 4kTabsGf amps2 2 where G = 1/R = conductance [S]. Maximum power transfer Figure 1.61 (p. 70) theorem: the maximum possible power is transferred (a) Thévenin equivalent circuit of a noisy resistor. (b) Norton equivalent circuit of the same resistor. from a source of internal resistance R to a load of resistance Rl when R = Rl. Under matched condition, the available power is kTabs f watts Introduction CHAPTER Two operating factor that affect available noise power: 1. The temperature at which the resistor is maintained. 2. The width of the frequency band over which the noise voltage across the resistor is measured. ★ 1.9.2 Other Sources of Electrical Noise 1. Shot noise: the discrete nature of current flow electronic devices 2. Ex. Photodetector: 1) Electrons are emitted at random times, k, where < k < 2) Total current flowing through photodetector: x(t ) h(t k k ) (1.98) where h(t k ) is the current pulse generated at time k. 3. 1/f noise: The electrical noise whose time-averaged power at a given frequency is inversely proportional to the frequency. Introduction CHAPTER 1.10 Theme Example ★ 1.10.1 Differentiation and Integration: RC Circuits 1. Differentiator Sharpening of a pulse x(t) d y (t ) x(t ) dt y(t) differentiator (1.99) 1) Simple RC circuit: Fig. 1.62. 2) Input-output relation: d 1 d v2 (t ) v2 (t ) v1 (t ) (1.100) dt RC dt If RC (time constant) is small enough such that (1.100) is dominated by the second term v2(t)/RC, then 1 d v2 (t ) v1 (t ) RC dt v2 (t ) RC Figure 1.62 (p. 71) Simple RC circuit with small time constant, used as an approximator to a differentiator. d v1 (t ) for RC small dt (1.101) Introduction CHAPTER Input: x(t) = RCv1(t); output: y(t) = v2(t) 2. Integrator smoothing of an input signal x(t) t y(t ) x( )d (1.102) y(t) integrator 1) Simple RC circuit: Fig. 1.63. 2) Input-output relation: d RC v2 (t ) v2 (t ) v1 (t ) dt t t RCv2 (t ) v2 ( )d v1 ( )d (1.103) If RC (time constant) is large enough such that (1.103) is dominated by the first term RCv2(t), then t RCv2 (t ) v1 ( )d Figure 1.63 (p. 72) Simple RC circuit with large time constant used as an approximator to an integrator. 1 t v2 ( t ) v1 ( )d RC for large RC Input: x(t) = [1/(RC)v1(t)]; output: y(t) = v2(t) Introduction CHAPTER ★ 1.10.2 MEMS Accelerometer 1. Model: second-order mass-damper-spring system Fig. 1.64. M = proof mass, K = effective spring constant, D = damping factor, x(t) =external acceleration, y(t) =displacement of proof mass, Md 2y(t)/dt 2 = inertial force of proof mass, Ddy(t)/dt = damping force, Ky(t) = spring force. 2. Force Eq.: Figure 1.64 (p. 73) Mechanical lumped model of an accelerometer. d 2 y (t ) dy (t ) Mx(t ) M D Ky (t ) 2 dt dt d 2 y (t ) D dy (t ) K y (t ) x(t ) 2 dt M dt M 1) Natural frequency: n K M [rad/sec] (1.105) 2) Quality factor: (1.106) Q KM D (1.107) CHAPTER (1.105) Introduction d 2 y(t ) n dy(t ) 2 n y (t ) x(t ) dt 2 Q dt (1.108) ★ 1.10.3 Radar Range Measurement 1. A periodic sequence of radio frequency (RF) pulse: Fig. 1.65. T0 = duration [sec], 1/T = repeated frequency, fc = RF frequency [MHz~GHz] Figure 1.65 (p. 74) Periodic train of rectangular FR pulses used for measuring molar ranges. The sinusoidal signal acts as a carrier. CHAPTER Introduction 2. Round-trip time = the time taken by a radar pulse to reach the target and for the echo from the target to come back to the radar. 2d (1.109) c d = radar target range, c = light speed. 3. Two issues of concern in range measurement: 1) Range resolution: The duration T0 of the pulse places a lower limit on the shortest round-trip delay time that the radar can measure. Smallest target range: dmin = cT0/2 [m] 2) Range ambiguity: The interpulse period T places an upper limit on the largest range that the radar can measure. Largest target range: dmax = cT/2 [m] ★ 1.10.4 Moving-Average Systems 1. N-point moving-average system: Fig. 1.66. 1 y[n] N N 1 x[n k ] (1.110) x(t) = input signal k 0 The value N determines the degree to which the system smooths the input data. CHAPTER Introduction Figure 1.66a (p. 75) (a) Fluctuations in the closing stock price of Intel over a three-year period. CHAPTER Introduction Figure 1.66b (p. 76) (b) Output of a four-point moving-average system. N = 4 case CHAPTER Introduction Figure 1.66c (p. 76) (c) Output of an eight-point moving-average system. N = 8 case Introduction CHAPTER 2. For a general moving-average system, unequal weighting is applied to past values of the input: N 1 y[n] ak x[n k ] (1.111) k 0 ★ 1.10.5 Multipath Communication Channels 1. Channel noise degrades the performance of a communication system. 2. Another source of degradation of channel: dispersive nature, i.e., the channel has memory. 3. For wireless system, the dispersive characteristics result from multipath propagation. Fig. 1.67. For a digital communication, multipath propagation manifests itself in the form of intersymbol interference (ISI). 4. Baseband model for multipath propagation: Tapped-delay line Fig. 1.68. p y (t ) i x(t iTdiff ) i 0 (1.112) Tdiff = smallest time difference between different path CHAPTER Introduction Figure 1.67 (p. 77) Example of multiple propagation paths in a wireless communication environment. CHAPTER Introduction Figure 1.68 (p. 78) Tapped-delay-line model of a linear communication channel, assumed to be timeinvariant. CHAPTER Introduction 5. PTdiff = the longest time delay of any significant path relative to the arrival of the signal. The coefficients wi are used to approximate the gain of each path. For P =1, then y(t ) 0 x(t ) 1x(t Tdiff ) 0x(t) = direct path, 1x(t Tdiff) = single reflected path 6. Discrete-time case: Linearly weighted moving-average system p y[n] k x[n k ] (1.113) k 0 For P =1, then y[n] x[n] ax[n 1] (1.114) ★ 1.10.6 Recursive Discrete-Time Computations The term recursive signifies the dependence of the output signal on its own past values. 1. First-order recursive discrete-time filter: Fig. 1.69. y[n] x[n] y[n 1] where is a constant. (1.115) x[n] = input, y[n] = output Introduction CHAPTER Figure 1.69 (p. 79) Block diagram of first-order recursive discrete-time filter. The operator S shifts the output signal y[n] by one sampling interval, producing y[n – 1]. The feedback coefficient determines the stability of the filter. Fig. 1.69: linear discrete-time feedback system. 2. Solution of Eq.(1.115): y[n] k x[n k ] r (1.116) k 0 y[n] x[n] k x[n k ] (1.117) k 1 Setting k 1 = l, Eq.(1.117) becomes y[n] x[n] [n 1 l ] x[n] l [n 1 l ] l 0 1 l l 0 (1.118) Introduction CHAPTER y[n] x[n] y[n 1] 3. Three special cases (depending on ): 1) = 1: (1.116) Accumulator y[n] x[n k ] (1.119) k 0 2) 1: Leaky accumulator Stable in BIBO sense 3) 1: Amplified accumulator 1.11 Exploring Concepts with MATLAB MATLAB Signal Processing Toolbox Unsatble in BIBO sense 1. Time vector: Sampling interval Ts of 1 ms on the interval from 0 to 1 s t = 0:.001:1; 2. Vector n: n = 0:1000; ★ 1.11.1 Periodic Signals 1. Square wave: A =amplitude, w0 = fundamental frequency, rho = duty cycle A*square(w0*t, rho); CHAPTER Introduction Ex. Obtain the square wave shown in Fig. 1.14 (a) by using MATLAB. <Sol.> >> A = 1; >> w0 =10*pi; >> rho = 0.5; >> t = 0:.001:1; >> sq = A*square(w0*t, rho); >> plot (t, sq) >> axis([0 1 -1.1 1.1]) 2. Triangular wave: A =amplitude, w0 = fundamental frequency, w = width A*sawtooth(w0*t, w); Ex. Obtain the triangular wave shown in Fig. 1.15 by using MATLAB. <Sol.> >> A = 1; >> w0 =10*pi; >> w = 0.5; >> t = 0:0.001:1; >> tri = A*sawtooth(w0*t, w); >> plot (t, tri) CHAPTER Introduction 3. Discrete-time signal: stem(n, x); x = vector, n = discrete time vector Ex. Obtain the discrete-time square wave shown in Fig. 1.16 by using MATLAB. <Sol.> >> A = 1; >> omega =pi/4; >> n = -10:10; >> x = A*square(omega*n); >> stem(n, x) 4. Decaying exponential: B*exp(-a*t); Growing exponential: B*exp(a*t); Ex. Obtain the decaying exponential signal shown in Fig. 1.28 (a) by using MATLAB. <Sol.> >> B = 5; >> a = 6; >> t = 0:.001:1; >> x = B*exp(-a*t); % decaying exponential >> plot (t, x) CHAPTER Introduction Ex. Obtain the growing exponential signal shown in Fig. 1.28 (b) by using MATLAB. <Sol.> >> B = 1; >> a = 5; >> t = 0:0.001:1; >> x = B*exp(a*t); % growing exponential >> plot (t, x) Ex. Obtain the decaying exponential sequence shown in Fig. 1.30 (a) by using MATLAB. <Sol.> >> B = 1; >> r = 0.85; >> n = -10:10; >> x = B*r.^n; % decaying exponential sequence >> stem (n, x) ★ 1.11.3 Sinusoidal Signals 1. Cosine signal: A*cos(w0*t + phi); 2. Sine signal: A*sin(w0*t + phi); A = amplitude, w0 = frequency, phi = phase angle CHAPTER Introduction Ex. Obtain the sinusoidal signal shown in Fig. 1.31 (a) by using MATLAB. <Sol.> >> A = 4; >> w0 =20*pi; >> phi = pi/6; >> t = 0:.001:1; >> cosine = A*cos(w0*t + phi); >> plot (t, cosine) Ex. Obtain the discrete-time sinusoidal signal shown in Fig. 1.33 by using MATLAB. <Sol.> >> A = 1; >> omega =2*pi/12; % angular frequency .* element-by-element >> n = -10:10; multiplication >> y = A*cos(omega*n); >> stem (n, y) ★ 1.11.4 Exponential Damped Sinusoidal Signals 1. Exponentially damped sinusoidal signal: x(t ) A sin(0t )e at MATLAB Format: A*sin(w0*t + phi).*exp(-a*t); CHAPTER Introduction Ex. Obtain the waveform shown in Fig. 1.35 by using MATLAB. <Sol.> >> A = 60; >> w0 =20*pi; >> phi = 0; >> a = 6; >> t = 0:.001:1; >> expsin = A*sin(w0*t + phi).*exp(-a*t); >> plot (t, expsin) Ex. Obtain the exponentially damped sinusoidal sequence shown in Fig. 1.70 by using MATLAB. <Sol.> >> A = 1; >> omega =2*pi/12; % angular frequency >> n = -10:10; >> y = A*cos(omega*n); >> r = 0.85; >> x = A*r.^n; % decaying exponential sequence >> z = x.*y; % elementwise multiplication >> stem (n, z) CHAPTER Introduction Figure 1.70 (p. 84) Exponentially damped sinusoidal sequence. CHAPTER Introduction ★ 1.11.5 Step, Impulse, and Ramp Functions ◆ MATLAB command: 1. M-by-N matrix of ones: ones (M, N) 2. M-by-N matrix of zeros: zeros (M, N) Ex. Generate a rectangular pulse centered at origin on the interval [-1, 1]. <Sol.> Unit amplitude step function: u = [zeros(1, 50), ones(1, 50)]; Discrete-time impulse: delta = [zeros(1, 49), 1, zeros(1, 49)]; >> t = -1:1/500:1; >> u1 = [zeros(1, 250), ones(1, 751)]; >> u2 = [zeros(1, 751), ones(1, 250)]; >> u = u1 – u2; Ramp sequence: ramp = 0:.1:10 ★ 1.11.6 User-Defined Functions 1. Two types M-files exist: scripts and functions. Scripts, or script files automate long sequences of commands; functions, or function files, provide extensibility to MATLAB by allowing us to add new functions. 2. Procedure for establishing a function M-file: CHAPTER Introduction 1) It begins with a statement defining the function name, its input arguments, and its output arguments. 2) It also includes additional statements that compute the values to be returned. 3) The inputs may be scalars, vectors, or matrices. Ex. Obtain the rectangular pulse depicted in Fig. 1.39 (a) with the use of an M-file. 1. The function size returns a two<Sol.> element vector containing the row >> function g = rect(x) and column dimensions of a matrix. >> g = zeros(size(x)); 2. The function find returns the >> set1 = find(abs(x)<= 0.5); indices of a vector or matrix that >> g(set1) = ones(size(set1)); satisfy a prescribed relation 3. The new function rect.m can be used liked any other MATLAB function. Ex. find(abs(x)<= T) returns the indices Ex. To generate a rectangular pulse: of the vector x, where the absolute >> t = -1:1/500:1; value of x is less than or equal to T. >> plot(t, rect(t));