Unit II: Analysis of Continuous Time Signals PDF
Document Details
Uploaded by SleekAffection
Anurag University, Hyderabad
2024
Dr Raghu Indrakanti
Tags
Summary
This document is a lecture or presentation outline for a unit on "Analysis of Continuous Time Signals." It covers topics such as signal definitions, classifications, operations, and elementary types. The presentation was delivered by Dr. Raghu Indrakanti on June 26th, 2024, at Anurag University, Hyderabad.
Full Transcript
Unit II: Analysis of Continuous Time Signals Dr Raghu Indrakanti Assistant Professor Department of Electronics and Communication Anurag University, Hyderabad June 26th 2024 Dr Raghu Indrakanti...
Unit II: Analysis of Continuous Time Signals Dr Raghu Indrakanti Assistant Professor Department of Electronics and Communication Anurag University, Hyderabad June 26th 2024 Dr Raghu Indrakanti 1/227 Content 1 Definition of signals-Continuous and Discrete 2 Classification of signals-Continuous and Discrete 1 Periodic and Aperiodic 2 Deterministic and Random 3 Even and Odd 4 Energy and Power 3 Elementary Signals: 1 Step 2 Ramp 3 Impulse 4 Sinusoidal 5 Signum 6 Real and Complex Exponentials Dr Raghu Indrakanti 2/227 Content 1 Operations on Signals: 1 Addition 2 Multiplication 3 Scaling 4 Shifting 5 Folding 2 Definition of System:-Continuous and Discrete 3 Slassification of systems: Continuous and Discrete 1 Linear and Non Linear 2 Causal and Non Causal 3 Stable and Unstable 4 Time variant and Time Invariant 4 LTI systems 5 Convolution and Correlation Dr Raghu Indrakanti 3/227 Definition of signals-Continuous and Discrete Signals 1 It is representation of physical quantity (Sound, temperature, intensity, Pressure, etc..,) which varies with respect to time or space or independent or dependent variable. or 1 It is single valued function which carries information by me ans of Amplitude, Frequency and Phase. Example: voice signal, video signal, signals on telephone wires etc. Dr Raghu Indrakanti 4/227 Classification of Signals Types of Signals with respect to no. of variables or dimensions One Dimensional or 1-D Signal: If the signal is function of only one variable or If Signal value varies with respect to only one variable then it is called One Dimensional or 1-D Signal Examples: Audio Signal, Biomedical Signals, temperature Signal etc.., in which signal is function time Dr Raghu Indrakanti 5/227 Classification of Signals Types of Signals with respect to no. of variables or dimensions Two Dimensional or 2-D Signal: If the signal is function of two variable or If Signal value varies with respect to two variable then it is called Two Dimensional or 2-D Signal Examples: Image Signal in which intensity is function of two spatial co-ordinates X and Y i.e I(X, Y ) Dr Raghu Indrakanti 6/227 Classification of Signals Types of Signals with respect to no. of variables or dimensions Three Dimensional or 3-D Signal: If the signal is function of three variable or If Signal value varies with respect to three variable then it is called Three Dimensional or 3-D Signal Examples: Video Signal in which intensity is function of two spatial co-ordinates X and Y and also time t i.e v(x, y, t) Dr Raghu Indrakanti 7/227 Classification of Signals Types of Signal with respect to nature of the signal Continuous Time Signal (CTS) or Analog Signal: If the signal values continuously varies with respect to time then it is called Continuous Time Signal (CTS) or Analog Signal. It contains infinite set of values and it is represented as shown below. Continuous-time signals are defined for every instant of time. Represented as x(t), where t is a continuous variable. Examples: Analog signals, such as electrical signals, sound waves, and temperature variations over time. x(t) = sin(2πf t) (1) Dr Raghu Indrakanti 8/227 Classification of Signals Types of Signal with respect to nature of the signal Discrete Time Signal (DTS): If signal contain discrete set of values with respect to time then it is called Discrete Time Signal (DTS). It contains finite set of values. Sampling process converts Continuous time signal in to Discrete time signal. Sampling is the process of converting a continuous-time signal x(t) into a discrete-time signal x[n]. Sampling involves taking snapshots of the continuous-time signal at regular intervals. The interval between samples is called the sampling period Ts. The sampling frequency fs is the reciprocal of the sampling period: fs = T1s. x[n] = x(nTs ) (2) Dr Raghu Indrakanti 9/227 Classification of Signals Continuous Time Periodic Signal Discrete Time Periodic Signal A signal x(t) is said to be periodic A discrete-time signal x[n] is said if there exists a positive constant to be periodic if there exists a T such that: positive integer N such that: x(t + T ) = x(t) x[n + N ] = x[n] for all t. for all n. 2 x(t) 2 x[n] 1 1 t n 1 2T 3 4 5 6 2 4 N6 8 10 −1 −1 Dr Raghu Indrakanti 10/227 Classification of Signals Continuous Time Aperiodic Signal Discrete Time Aperiodic Signal A signal x(t) is aperiodic if it is A discrete-time signal x[n] is not periodic, meaning there does aperiodic if it is not periodic, not exist any constant T such that: meaning there does not exist any positive integer N such that: x(t + T ) 6= x(t) x[n + N ] 6= x[n] 1 x(t) 1 x[n] 0.5 0.5 t n 1 2 3 4 5 6 2 4 6 8 10 Dr Raghu Indrakanti 11/227 Problem on Periodicity of Signals I: (a) x(t) = ejπ cos(2πt + π) ejπ = cos(π) + j sin(π) = −1 x(t) = − cos(2πt + π) = cos(2πt) (using cos(θ + π) = − cos(θ)) Period : T = 1 (b) x(t) = sin2 (t) 1 − cos(2t) sin2 (t) = 2 cos(2t) has period π Period : T = π Dr Raghu Indrakanti 12/227 Problem on Periodicity of Signals II: P∞ (c) x(t) = k=−∞ u(t − 2k) − u(t − 1 − 2k) Train of rectangular pulses with duration 1 and period 2 Period : T = 2 (d) x(t) = 3e2−j3πt x(t) = 3e2 e−j3πt = 3e2 (cos(3πt) − j sin(3πt)) Not periodic Dr Raghu Indrakanti 13/227 Simulation of Periodic Signal 1 % periodic signals 2 3 t = 0 :. 1 : 6 ∗ p i ; %Sum o f p e r i o d i c CT s i g n a l s 4 x=c o s ( t )+s i n ( 3 ∗ t ) ; p l o t ( t , x ) 5 6 figure 7 [ s , t ]= g e n s i g ( ’ p u l s e ’ , 2 , 1 0 ) ; p l o t ( t , s ) 8 9 figure 10 s 2=s q u a r e ( 2 ∗ p i ∗ t ) ; p l o t ( t , s 2 ) ; 11 12 figure 13 t = 0 : 0. 1 : 2 0 ; s=sawtooth ( t ) ; p l o t ( t , s ) ; 14 15 figure 16 t = 0 :. 1 : 1 0 ; x=t. ∗ exp(− t ) ; 17 xp=repmat ( x , 1 , 8 ) ; 18 tp=l i n s p a c e ( 0 , 8 0 , l e n g t h ( xp ) ) ; p l o t ( tp , xp ) Dr Raghu Indrakanti 14/227 Classification of Signals: Deterministic Signals A deterministic signal is completely specified by a mathematical expression, rule, or algorithm. The future values of the signal can be exactly predicted. Examples: Sine wave: x(t) = A sin(ωt + φ) Cosine wave: x(t) = A cos(ωt + φ) Parameters: Amplitude (A) Angular frequency (ω) Phase (φ) The signal is periodic and predictable. x(t) x(t) = A sin(ωt + φ) t Dr Raghu Indrakanti 15/227 Classification of Signals: Random Signals A random signal cannot be described by a deterministic mathematical expression. Future values of the signal are uncertain and can be described by probabilistic means. Examples: White noise Random telegraph signal White noise is a random signal with equal intensity at different frequencies. It can be used to model random processes in various systems. 2 1 x(t) 0 −1 −2 0 2 4 6 8 10 t Dr Raghu Indrakanti 16/227 Classification of Signals Continuous-Time Even Signal Discrete Time Even Signal A continuous-time signal x(t) is A discrete-time signal x[n] is said said to be even if: to be even if: x(t) = x(−t) x[n] = x[−n] for all t. for all n. 2 x(t) 1 2 x[n] t 1 −2 −1 1 2 n −1 −5 −4 −3 −2 −1 1 2 3 4 5 −1 Dr Raghu Indrakanti 17/227 Classification of Signals Continuous-Time Odd Signal Discrete Time Odd Signal A continuous-time signal x(t) is A discrete-time signal x[n] is said said to be odd if: to be odd if: x(t) = −x(−t) x[n] = −x[−n] for all t. for all n. 3 x(t) 3 x[n] 2 2 1 t 1 n −2 −1 −1 1 2 −5−4−3−2−1 −1 1 2 3 4 5 −2 −2 −3 −3 Dr Raghu Indrakanti 18/227 Classification of Signals Continuous-Time Signals: Symmetry x(t) = x(−t) (even symmetry) x(t) = −x(−t) (odd symmetry) Any signal x(t) can be decomposed as a sum of an even (xe (t)) and an odd (xo (t)) component: x(t) = xe (t) + xo (t) where 1 xe (t) = (x(t) + x(−t)) (even component) 2 1 xo (t) = (x(t) − x(−t)) (odd component) 2 Dr Raghu Indrakanti 19/227 Classification of Signals Discrete-Time Signals: Symmetry x[n] = x[−n] (even symmetry) x[n] = −x[−n] (odd symmetry) Any signal x[n] can be decomposed as a sum of an even (xe [n]) and an odd (xo [n]) component: x[n] = xe [n] + xo [n] where 1 xe [n] = (x[n] + x[−n]) (even component) 2 1 xo [n] = (x[n] − x[−n]) (odd component) 2 Dr Raghu Indrakanti 20/227 Problem on Even and Odd Signals Problem 1 Consider the signal x1 (t) = t2. Determine if the signal is even, odd, or neither. If the signal is neither, decompose it into its even and odd parts. Dr Raghu Indrakanti 21/227 Solution to Problem 1 Step 1: Check if the signal is even or odd x1 (−t) = (−t)2 = t2 = x1 (t) Since x1 (t) = x1 (−t), the signal x1 (t) is an even signal. Dr Raghu Indrakanti 22/227 Problem on Even and Odd Signals Problem 2 Consider the signal x2 (t) = t3. Determine if the signal is even, odd, or neither. If the signal is neither, decompose it into its even and odd parts. Dr Raghu Indrakanti 23/227 Solution to Problem 2 Step 1: Check if the signal is even or odd x2 (−t) = (−t)3 = −t3 = −x2 (t) Since x2 (t) = −x2 (−t), the signal x2 (t) is an odd signal. Dr Raghu Indrakanti 24/227 Problem on Even and Odd Signals Problem 3 Consider the signal x3 (t) = et. Determine if the signal is even, odd, or neither. If the signal is neither, decompose it into its even and odd parts. Dr Raghu Indrakanti 25/227 Solution to Problem 3 Step 1: Check if the signal is even or odd x3 (−t) = e−t 6= et and x3 (−t) 6= −et Since x3 (t) 6= x3 (−t) and x3 (t) 6= −x3 (−t), the signal x3 (t) is neither even nor odd. Step 2: Decompose into even and odd parts x3 (t) + x3 (−t) et + e−t x3e (t) = = = cosh(t) 2 2 x3 (t) − x3 (−t) et − e−t x3o (t) = = = sinh(t) 2 2 Thus, x3 (t) = cosh(t) + sinh(t) Euler’s Formula eix = cos(x) + i sin(x) Dr Raghu Indrakanti 26/227 Euler’s Formula Euler’s Formula Cosine and Sine in Terms of eix = cos(x) + i sin(x) Exponentials Im eix + e−ix cos(x) = |eix | = 1 2 i sin(x) eix eix − e−ix sin(x) = 2i x Re cos(x) Hyperbolic Cosine and Sine in Terms of Exponentials ex + e−x cosh(x) = 2 Figure: Graphical representation of ex − e−x eix = cos(x) + i sin(x) sinh(x) = 2 Dr Raghu Indrakanti 27/227 Summary x1 (t) = t2 is an even signal. x2 (t) = t3 is an odd signal. x3 (t) = et is neither even nor odd, but can be decomposed as: x3e (t) = cosh(t), x3o (t) = sinh(t) Dr Raghu Indrakanti 28/227 Simulation of Even and Odd Signal 1 t = − 5 : 0. 0 0 1 : 5 ;C= 0. 8 ; 2 x1=C. ˆ ( t ) ; 3 x2=C.ˆ( − t ) ; 4 i f ( x2==x1 ) 5 d i s p ( ’ The g i v e n s i g n a l i s even s i g n a l ’ ) ; 6 else 7 i f ( x2==(−x1 ) ) 8 d i s p ( ’ The g i v e n s i g n a l i s odd s i g n a l ’ ) ; 9 else 10 d i s p ( ’ The g i v e n s i g n a l i s n e i t h e r even nor odd ’ ) ; 11 end 12 end 13 xe=(x1+x2 ) / 2 ; xo=(x1−x2 ) / 2 ; 14 15 subplot (2 ,2 ,1) ; plot ( t , x1 ) ; 16 subplot (2 ,2 ,2) ; plot ( t , x2 ) ; 17 subplot (2 ,2 ,3) ; plot ( t , xe ) ; 18 subplot (2 ,2 ,4) ; plot ( t , xo ) ; 19 f i g u r e ; p l o t ( t , xe+xo ) ; Dr Raghu Indrakanti 29/227 Classification of Signals Continuous-Time Energy Signal Continuous-Time Power Signal An energy signal x(t) satisfies: A power signal x(t) satisfies: Z ∞ Z T |x(t)|2 dt < ∞ 1 Ex = Px = lim |x(t)|2 dt < ∞ −∞ T →∞ 2T −T x(t) =x(t) A sin(ωt) x(t) x(t) t t Dr Raghu Indrakanti 30/227 Classification of Signals Discrete-Time Energy and Power Signals Energy signals have finite energy ∞ X E≡ |x[n]|2 < ∞ n=−∞ Power signals have infinite energy (e.g., periodic signals), but they have finite average power N 1 X P ≡ lim |x[n]|2 < ∞ N →∞ 2N + 1 n=−N Dr Raghu Indrakanti 31/227 Energy and power signals Problem 1: Consider a signal x(t). Determine if the signal is an energy signal, a power signal, or neither. Calculate the energy Ex and power Px of the signal if applicable. Example signal: ( A 0≤t≤T x(t) = 0 otherwise Dr Raghu Indrakanti 32/227 Solution Step 1: Calculate the Energy Z ∞ Ex = |x(t)|2 dt −∞ For the given signal: Z T Z T Ex = A2 dt = A2 1 dt = A2 T 0 0 Since Ex is finite and non-zero, x(t) is an energy signal. Dr Raghu Indrakanti 33/227 Power Calculation (if applicable) Step 2: Calculate the Power Z T 1 Px = lim |x(t)|2 dt T →∞ 2T −T For the given signal: T A2 T A2 Z 1 Px = lim A2 dt = lim = lim =0 T →∞ 2T 0 T →∞ 2T T →∞ 2 Since Px = 0, the signal is not a power signal. The signal x(t) is an energy signal with energy Ex = A2 T and is not a power signal. Dr Raghu Indrakanti 34/227 Energy and power signals Problem 2: Consider the signal x1 (t) = e−at for t ≥ 0 and 0 otherwise, where a > 0. Determine if the signal is an energy signal, a power signal, or neither. Calculate the energy Ex1 if it is an energy signal. Dr Raghu Indrakanti 35/227 Solution to Problem 2 Step 1: Calculate the Energy Z ∞ Z ∞ Ex1 = 2 |x1 (t)| dt = e−2at dt −∞ 0 ∞ e−2at 1 Ex1 = = −2a 0 2a Since Ex1 is finite and non-zero, x1 (t) is an energy signal. Dr Raghu Indrakanti 36/227 Energy and power signals Problem 3: Consider the signal x2 (t) = A sin(ωt). Determine if the signal is an energy signal, a power signal, or neither. Calculate the power Px2 if it is a power signal. Dr Raghu Indrakanti 37/227 Solution to Problem 3 Step 1: Calculate the Power Z T Z T 1 1 Px 2 = lim 2 |x2 (t)| dt = lim A2 sin2 (ωt) dt T →∞ 2T −T T →∞ 2T −T A2 T A2 Px2 = lim · = T →∞ 2T 2 2 Since Px2 is finite and non-zero, x2 (t) is a power signal. 1 %e n e r g y and power 2 t 1 =0; 3 t 2 =2; 4 syms t 5 x=2∗ c o s ( p i ∗ t ) ; 6 Ex=i n t ( abs ( x ) ˆ 2 , t , t1 , t 2 ) 7 Px=(1/( t2−t 1 ) ) ∗ i n t ( abs ( x ) ˆ 2 , t , t1 , t 2 ) Dr Raghu Indrakanti 38/227 Energy and power signals Problem 4: ( 1 |t| ≤ 1 Consider the signal x3 (t) =. 0 otherwise Determine if the signal is an energy signal, a power signal, or neither. Calculate the energy Ex3 if it is an energy signal. Dr Raghu Indrakanti 39/227 Solution to Problem 4 Step 1: Calculate the Energy Z ∞ Z 1 Z 1 Ex3 = |x3 (t)|2 dt = 12 dt = 1 dt = 2 −∞ −1 −1 Since Ex3 is finite and non-zero, x3 (t) is an energy signal. Dr Raghu Indrakanti 40/227 Problems on Power and Energy Signals I: (b) x(t) = e−|t| Z ∞ Ex = e−2|t| dt −∞ Z 0 Z ∞ = 2t e dt + e−2t dt −∞ 0 0 ∞ e2t −e−2t = + 2 −∞ 2 0 =1 Energy signal with Ex = 1 (c) x(t) = tu(t) Z ∞ Ex = t2 dt 0 Diverges to infinity Not an energy signal or a power signal Dr Raghu Indrakanti 41/227 Problems Power and Energy Signals II: (d) x(t) = 5e−3t u(t) Z ∞ Ex = 25e−6t dt 0 Z ∞ = 25 e−6t dt 0 −6t ∞ −e = 25 6 0 25 = 6 25 Energy signal with Ex = 6 (a) x(t) = sin(2t)u(t) Z ∞ Ex = sin2 (2t) dt 0 Z ∞ 1 − cos(4t) = dt 0 2 Diverges to infinity Dr Raghu Indrakanti 42/227 Summary x1 (t) = e−at is an energy signal with Ex1 = 1 2a. 2 x2 (t) = A sin(ωt) is a power signal with Px2 = A2. x3 (t) (rectangular pulse) is an energy signal with Ex3 = 2. Energy signals have finite energy and zero average power. Power signals have finite average power and infinite energy. Dr Raghu Indrakanti 43/227 Simulation of Energy and power signals 1 %power −ty pe 1 %e n e r g y and power 2 syms t T 2 t 1 =0; 3 x=h e a v i s i d e ( t ) ; 3 t 2 =2; 4 d=i n t ( abs ( x ) ˆ 2 , t ,−T, T) ; 4 syms t 5 Ex=l i m i t ( d , T, i n f ) 5 x=2∗ c o s ( p i ∗ t ) ; 6 Px=l i m i t ( ( 1 / ( 2 ∗T) ) ∗d , T, i n f 6 Ex=i n t ( abs ( x ) ˆ 2 , t , t1 , t 2 ) ) 7 Px=(1/( t2−t 1 ) ) ∗ i n t ( abs ( x ) ˆ 2 , t , t1 , t 2 ) 1 % d i s c r e t e time s i g n a l 2 N=5; 1 %e n e r g y −type 3 n=−N:N; 2 syms t T 4 x=c o s ( n ) ; 3 x=h e a v i s i d e ( t )−h e a v i s i d e ( t 5 E=sum ( ( abs ( x ) ). ˆ 2 ) −1) ; 6 P=1/(2∗N+1)∗E 4 d=i n t ( abs ( x ) ˆ 2 , t ,−T, T) ; 5 Px=l i m i t ( ( 1 / ( 2 ∗T) ) ∗d , T, i n f ) 6 Ex=l i m i t ( d , T, i n f ) Dr Raghu Indrakanti 44/227 Periodicity and Fundamental Period Signal: x[n] = e−jnπ/2 Determine if x[n] is periodic and find the fundamental period. Calculation: x[n + N ] = e−j(n+N )π/2 = e−jnπ/2 · e−jN π/2 x[n + N ] = x[n] ⇔ e−jN π/2 = 1 Condition for Periodicity: −N π/2 = 2πk (k is an integer) N = −4k Smallest Positive Period: N =4 The signal is periodic with a fundamental period of 4. Dr Raghu Indrakanti 45/227 Even and Odd Nature of the Signal Definitions: Even signal: x[−n] = x[n] Odd signal: x[−n] = −x[n] Calculation: x[−n] = ejnπ/2 Comparison: x[n] = e−jnπ/2 x[n] 6= ejnπ/2 = x[−n] x[n] 6= −e−jnπ/2 6= −x[n] The signal is neither even nor odd. Dr Raghu Indrakanti 46/227 Energy and Power Signal Energy Signal: ∞ X E= |x[n]|2 n=−∞ 2 |x[n]| = 1 (x[n] is a complex exponential with magnitude 1) ∞ X E= 1=∞ n=−∞ Power Signal: N 1 X P = lim |x[n]|2 N →∞ 2N + 1 n=−N 1 P = lim · (2N + 1) · 1 = 1 N →∞ 2N + 1 Not an energy signal (energy diverges). It is a power signal with power P = 1. Dr Raghu Indrakanti 47/227 Classification of Signals Causal Signal Non-Causal Signal A causal signal x(t) is defined as: A non-causal signal x(t) is defined as: x(t) = 0 for t < 0 x(t) 6= 0 for t < 0 Explanation: Causal signals Explanation: Non-causal signals depend only on past and present can depend on future values of values of time t. time t. x(t) x(t) (non-causal) x(t) x(t) (causal) t t Dr Raghu Indrakanti 48/227 Classification of Signals Causal Signal Non-Causal Signal A causal signal x[n] is defined as: A non-causal signal x[n] is defined as: x[n] = 0 for n < 0 x[n] 6= 0 for n < 0 Explanation: Causal signals Explanation: Non-causal signals depend only on past and present can depend on future values of n. values of n. Dr Raghu Indrakanti 49/227 Elementary Signals: 1 Unit Impulse 2 Unit Step 3 Ramp 4 Sinusoidal 5 Signum 6 Real and Complex Exponentials Dr Raghu Indrakanti 50/227 Elementary Signals Continuous-Time Unit Impulse Signal Discrete-Time Unit Impulse Signal ( ∞, if t = 0 ( δ(t) = 1, if n = 0 0, otherwise δ[n] = 0, otherwise The impulse function is the limiting form of any signal that maintains unit area as width → 0 and height → ∞ Dr Raghu Indrakanti 51/227 Unit Impulse Signal Properties Discrete-Time Unit Impulse Continuous-Time Unit Signal Impulse Signal ( ( 1, if n = 0 ∞, if t = 0 δ[n] = δ(t) = 0, otherwise 0, otherwise Area under δ[n] is 1: Area under δ(t) is 1: ∞ Z ∞ X δ[n] = 1 δ(t) dt = 1 n=−∞ −∞ Sampling property: Sampling property: Z ∞ ∞ X f (t)δ(t) dt = f (0) f [n]δ[n] = f −∞ n=−∞ Z ∞ ∞ f (t)δ(t − t0 ) dt = f (t0 ) X −∞ f [n]δ[n − k] = f [k] n=−∞ Dr Raghu Indrakanti 52/227 Simulation of Unit Impulse Signal Method 1 Method 3 1 t1 = −5:.1: −0.1; 1 t = −5:.1:10 2 t 2 =0; 2 d=[ z e r o s ( 1 , 5 0 ) i n f z e r o s 3 t3 = 0. 1 :. 1 : 1 0 ; (1 ,100) ] ; 4 d1=z e r o s ( s i z e ( t 1 ) ) ; 3 plot ( t , d , ’b ’ , ’ linewidth ’ ,2) 5 d2 =1; 6 d3=z e r o s ( s i z e ( t 3 ) ) ; Method 4 7 t =[ t 1 t 2 t 3 ] ; 1 syms t 8 d=[ d1 d2 d3 ] ; 2 u=h e a v i s i d e ( t ) ; 9 plot ( t , d , ’b ’ , ’ linewidth ’ ,2) 3 d i f f (u , t ) Method 2 1 t = −5:.1:10 2 d=[ z e r o s ( 1 , 5 0 ) i n f z e r o s (1 ,100) ] ; 3 plot ( t , d , ’b ’ , ’ linewidth ’ ,2) Dr Raghu Indrakanti 53/227 Elementary Signals Continuous-Time Unit Step Signal The unit step function u(t) is defined as: ( 1 t≥0 u(t) = 0 t= 0 ; 6 7 % Plot the unit step s i g n a l 8 figure ; 9 p l o t ( t , u , ’ b ’ , ’ LineWidth ’ , 1. 5 ) ; 10 g r i d on ; 11 x l a b e l ( ’ Time ( t ) ’ ) ; 12 ylabel ( ’u( t ) ’ ) ; 13 t i t l e ( ’ Unit Step S i g n a l u ( t ) ’ ) ; 14 y l i m ( [ − 0. 1 , 1. 1 ] ) ; % S e t y−a x i s l i m i t s f o r b e t t e r visualization Dr Raghu Indrakanti 56/227 Simulation of Unit Step Signal Method 2 Method 4 1 % unit step sequence 1 t = −5:.1:10; 2 t = −5:0.0001:10; 2 u=[ z e r o s ( 1 , 5 0 ) o n e s ( 1 , 1 0 1 ) ] ; 3 u=h e a v i s i d e ( t ) 3 plot ( t , u , ’g ’ , ’ linewidth ’ ,2) ; 4 plot ( t , u , ’b ’ , ’ linewidth ’ ,2) 4 ylim ([ −0.3 1. 3 ] ) 5 ylim ([ −0.3 1. 3 ] ) Method 3 1 t 1 = −5:.1:0 2 t2 =0:.1:10 3 u1=z e r o s ( s i z e ( t 1 ) ) 4 u2=o n e s ( s i z e ( t 2 ) ) ; 5 t =[ t 1 t 2 ] ; 6 u=[ u1 u2 ] ; 7 plot ( t , u , ’ r ’ , ’ linewidth ’ ,2) ; 8 ylim ([ −0.3 1. 3 ] ) Dr Raghu Indrakanti 57/227 Relationship Between Unit Impulse and Step Signals Unit Impulse Signal Unit Step Signal ( ( ∞, if t = 0 0, if t < 0 δ(t) = u(t) = 0, otherwise 1, if t ≥ 0 Integral with step function: Derivative with impulse function: Z t δ(τ ) dτ = u(t) d −∞ u(t) = δ(t) dt Relationship between the unit impulse signal δ(t) and the unit step signal u(t). Dr Raghu Indrakanti 58/227 Proof Property 1: Integral of Unit Impulse ⇒ Matches the definition of u(t): Z t ( δ(τ ) dτ = u(t) 0, if t < 0 u(t) = −∞ 1, if t ≥ 0 Proof: Rt ∴ −∞ δ(τ ) dτ = u(t) ⇒ Consider the definitions: ( ∞, if t = 0 δ(t) = 0, otherwise ( 0, if t < 0 u(t) = 1, if t ≥ 0 ⇒ Evaluate the integral: Z t ( 0, if t < 0 δ(τ ) dτ = −∞ 1, if t ≥ 0 Dr Raghu Indrakanti 59/227 Proof Property 2: Derivative of Unit Step d u(t) = δ(t) dt Proof: ⇒ Differentiate u(t): ⇒ Matches the definition of δ(t): ( ( d 0, if t 6= 0 ∞, if t = 0 u(t) = δ(t) = dt ∞, if t = 0 0, otherwise ⇒ Evaluate at t = 0: d ∴ dt u(t) = δ(t) d u() − u(−) u(t) = lim dt t=0 →0+ − (−) d 1−0 1 u(t) = lim+ = lim+ =∞ dt t=0 →0 2 →0 2 Dr Raghu Indrakanti 60/227 Elementary Signals d δ(t) = u(t) dt An approximation to the unit step u∆ (t) in which the function rises from 0 to 1 in a short time interval of length ∆. The step function u(t) can be considered as an idealization of u∆ (t) for ∆ so short that its duration doesn’t matter for any practical purpose. More formally, u(t) is the limit of u∆ (t) as ∆ → 0. du∆ (t) δ∆ (t) = dt Dr Raghu Indrakanti 61/227 Elementary Signals Continuous Signum Signal Discrete Signum Signal The continuous signum function The discrete signum function sgn(x) is defined as: sgn[n] is defined as: −1 if x < 0 −1 if n < 0 sgn(x) = 0 if x = 0 sgn[n] = 0 if n = 0 1 if x > 0 1 if n > 0 sgn(x) sgn[n] 1 1 x n −5 −4 −3 −2 −1 1 2 3 4 5 −10−8 −6 −4 −2 2 4 6 8 10 −1 −1 Figure: Continuous Signum Function Figure: Discrete Signum Function Dr Raghu Indrakanti 62/227 Signum Signal Continuous Signum Signal Discrete Signum Signal The continuous signum The discrete signum function function is odd. is odd. It is discontinuous at x = 0. It is discontinuous at n = 0. Applications Control Systems: Used in defining the sign of error signals. Signal Processing: Utilized in thresholding operations. Mathematical Analysis: Helpful in studying the properties of odd functions. Dr Raghu Indrakanti 63/227 Simulation of Signum Signal 1 signum = @( x ) ( x > 0 ) − ( x < 0 ) ; % D e f i n e t h e signum function 2 3 x = l i n s p a c e ( −10 , 1 0 , 1 0 0 0 ) ; % G e n e r a t e x v a l u e s 4 5 % Compute t h e signum v a l u e s f o r t h e x v a l u e s 6 y = signum ( x ) ; 7 8 % P l o t t h e signum f u n c t i o n 9 figure ; 10 p l o t ( x , y , ’ LineWidth ’ , 4 ) ; h o l d on ; 11 p l o t ( 0 , 0 , ’ r o ’ , ’ MarkerFaceColor ’ , ’ g ’ ) ; % Mark t h e d i s c o n t i n u i t y at x = 0 12 hold o f f ; 13 14 % Add l a b e l s and t i t l e 15 x l a b e l ( ’ x ’ ) ; y l a b e l ( ’ sgn ( x ) ’ ) ; 16 t i t l e ( ’ Continuous Signum F u n c t i o n ’ ) ; g r i d on ; 17 x l i m ([ −10 1 0 ] ) ; y l i m ( [ − 1. 5 1. 5 ] ) ; y t i c k s ([ −1 0 1 ] ) ; 18 19 % Add l e g e n d 20 l e g e n d ( ’ sgn ( x ) ’ , ’ D i s c o n t i n u i t y a t x = 0 ’ , ’ L o c a t i o n ’ , ’ Best ’); Dr Raghu Indrakanti 64/227 Elementary Signals: Continuous-Time Sinusoidal x(t) = A sin(ω0 t + φ) or x(t) = A cos(ωt + φ) Properties of Sinusoidal Signals Amplitude (A): Peak value of the signal Angular frequency (ω): ω0 = 2πf , where f is the frequency in Hz Phase (φ): Shift of the signal in time 2π Period (T ): T = ω0 x(t) = sin(2πt + 0) 1 x(t) 0 −1 0 0.5 1 1.5 2 t Dr Raghu Indrakanti 65/227 Periodicity of a Sinusoidal Sinusoidal signal is periodic. A periodic continuous-time signal x(t) has the property that there is a positive value T for which x(t) = x(t + T ) (3) for all values of t. Under an appropriate time-shift the signal repeats itself. In this case we say that x(t) is periodic with period T. Fundamental period T0 = smallest positive value of T for which 3 holds. A signal that is not periodic is referred to as aperiodic. E.g.: Consider A cos(ω0 t + φ) A cos(ω0 t + φ) = A cos(ω0 (t + T ) + φ) here ω0 T = 2πm an integer multip = A cos(ω0 t + φ) 2πm 2π T = ω0 ⇒ fundamental period T0 = ω0. Phase of a Sinusoidal A time-shift in a CT sinusoid is equivalent to a phase shift. E.g.: Show that a time-shift of a sinusoid is equal to a phase shift. A cos[ω0 (t+t0 )] = A cos(ω0 t+ω0 t0 ) = A cos(ω0 t+∆φ), ∆φ is a change in ph A cos[ω0 (t+t0 )+φ] = A cos(ω0 t+ω0 t0 +φ) = A cos(ω0 (t+t1 )), t1 = t0 +φ/ω0. Problem 1 Problem Determine the amplitude, angular frequency, and phase of the signal x(t) = 5 cos(3t + π/4). Dr Raghu Indrakanti 68/227 Sinusoidal Signals: Problem 1 Solution Amplitude (A): 5 Angular frequency (ω): 3 Phase (φ): π/4 x(t) = 5 cos(3t + π/4) 5 x(t) 0 −5 0 0.5 1 1.5 2 t Dr Raghu Indrakanti 69/227 Simulation of Sinusoidal Signals: Problem 1 1 % D e f i n e t h e time r a n g e 2 t = l i n s p a c e ( 0 , 2 , 1 0 0 0 ) ; % Time v e c t o r from 0 t o 2 s e c o n d s with 1000 p o i n t s 3 4 % Define the s i n u s o i d a l s i g n a l 5 x = 5 ∗ cos (3 ∗ t + pi /4) ; 6 7 % Plot the s i g n a l 8 figure ; 9 p l o t ( t , x , ’ r ’ , ’ LineWidth ’ , 1. 5 ) ; 10 g r i d on ; 11 x l a b e l ( ’ Time ( t ) ’ ) ; 12 ylabel ( ’x( t ) ’ ) ; 13 t i t l e ( ’ Si g na l x ( t ) = 5 \ cos (3 t + \ pi /4) ’ ) ; Dr Raghu Indrakanti 70/227 Sinusoidal Signals: Problem 2 Problem Calculate the period of the signal x(t) = 4 sin(2πt). Dr Raghu Indrakanti 71/227 Sinusoidal Signals: Problem 2 Solution Given: ω = 2π 2π 2π Period (T ): T = ω = 2π = 1 second x(t) = 4 sin(2πt) 4 2 x(t) 0 −2 −4 0 0.5 1 1.5 2 t Dr Raghu Indrakanti 72/227 Simulation of Sinusoidal Signals: Problem 2 1 t = l i n s p a c e ( 0 , 2 , 1 0 0 0 ) ; % Time v e c t o r from 0 t o 2 s e c o n d s with 1000 p o i n t s 2 3 % Define the s i n u s o i d a l s i g n a l 4 x = 4 ∗ s i n (2 ∗ pi ∗ t ) ; 5 6 % Plot the s i g n a l 7 figure ; 8 p l o t ( t , x , ’m ’ , ’ LineWidth ’ , 1. 5 ) ; 9 g r i d on ; 10 x l a b e l ( ’ Time ( t ) ’ ) ; 11 ylabel ( ’x( t ) ’ ) ; 12 t i t l e ( ’ Si g na l x ( t ) = 4 s i n (2\ pi t ) ’ ) ; Dr Raghu Indrakanti 73/227 Sinusoidal Signals: Problem 3 Problem If x(t) = 3 sin(4t + π/3), find the frequency in Hz. Dr Raghu Indrakanti 74/227 Sinusoidal Signals: Problem 3 Solution Angular frequency (ω): 4 ω 4 Frequency (f ): f = 2π = 2π ≈ 0.636 Hz x(t) = 3 sin(4t + π/3) 2 x(t) 0 −2 0 0.5 1 1.5 2 t Dr Raghu Indrakanti 75/227 Simulation of Sinusoidal Signals: Problem 3 1 % D e f i n e t h e time r a n g e 2 t = l i n s p a c e ( 0 , 2 , 1 0 0 0 ) ; % Time v e c t o r from 0 t o 2 s e c o n d s with 1000 p o i n t s 3 4 % Define the s i n u s o i d a l s i g n a l 5 x = 3 ∗ s i n (4 ∗ t + pi /3) ; 6 7 % Plot the s i g n a l 8 figure ; 9 p l o t ( t , x , ’ b ’ , ’ LineWidth ’ , 1. 5 ) ; 10 g r i d on ; 11 x l a b e l ( ’ Time ( t ) ’ ) ; 12 ylabel ( ’x( t ) ’ ) ; 13 t i t l e ( ’ Si g na l x ( t ) = 3 \ s i n (4 t + \ pi /3) ’ ) ; Dr Raghu Indrakanti 76/227 Elementary Signals: Continuous-Time Sinusoidal Phase of a Sinusoidal: φ = 0 This signal is even. If we x(t) = A cos(ω0 t) mirror an even signal about the time origin, it would 2π T0 = ω0 look exactly the same. A Periodic: x(t) = x(t + T ). Even: x(t) = x(−t). t T0 −A Elementary Signals: Continuous-Time Sinusoidal Phase of a Sinusoidal: φ = −π/2 This signal is odd. If we x(t) = A cos(ω0 t − π/2) flip an odd signal about the time origin, we also 2π T0 = ω0 multiply it by a (−) sign to A get the original signal. Periodic: x(t) = x(t + T ). Odd: x(t) = −x(−t). t T0 −A Elementary Signals: Discrete-Time Sinusoidal x[n] = A cos(ω0 n + φ) with φ = 0 The independent variable is an integer. The sequence takes values only at integer values of the argument. This signal is even. Even: x[n] = x[−n]. Periodic: x[n] = x[n + N ]. Here, N = 16 ω0 = 2π π N = 8. 1 n=0:16; 2 x=c o s ( p i /8∗ n+0) ; 3 stem ( n , x , ’m ’ , ’ l i n e w i d t h ’ , 2 ) Elementary Signals: Discrete-Time Sinusoidal x[n] = A cos(ω0 n + φ) with φ = −π/2 The independent variable is an integer. The sequence takes values only at inter values of he argument. This signal is odd. Odd: x[n] = −x[−n]. Periodic: x[n] = x[n + N ]. Here, N = 16 ω0 = 2π π N = 8. φ = −π/2, x[n] = A cos(ω0 n + φ) = A cos(ω0 (n + n0 )). n0 must be an integer. 1 close all n0 = ωφ0 = π/2 π/8 = 4. 2 n=0:0.1:16; 3 x=c o s ( p i /8∗n−p i / 2 ) ; 4 plot (n , x , ’ r ’ , ’ linewidth ’ ,2) Exponential signals Exponential signals are fundamental in the study of signal processing and control systems. They can be classified into real and complex exponentials. Dr Raghu Indrakanti 81/227 Continuous-Time Real Exponential Signals A real exponential signal is of the form: x(t) = Ceαt where C and α are real numbers. Properties If α > 0, the signal grows exponentially. If α < 0, the signal decays exponentially. If α = 0, the signal is a constant. 3 x(t) 2 1 t −2 −1 −1 1 2 Figure: Real Exponential Signals: et (blue) and e−t (red) Dr Raghu Indrakanti 82/227 Continuous-Time Real Exponential Signals Case 1: x(t) = e−2t for α < 0 Case 1: x(t) = e2t for α > 0 3 x(t) 3 x(t) 2 2 1 t 1 t −2 −1 −1 1 2 −2 −1 −1 1 2 1 t = −2:0.1:2; 1 t = −2:0.1:2; 2 C = 1; 2 C = 1; 3 a = 0. 9 ; % 0 0, ( e−aτ , 0 < τ < t, x(τ )h(t − τ ) = 0, otherwise. Z t t 1 y(t) = e−aτ dτ = − e−aτ 0 a 0 1 −at = (1 − e ) a Thus for all t, 1 y(t) = (1 − e−at )u(t) a y(t) = a1 (1 − e−at )u(t) 1 a t 0 Dr Raghu Indrakanti 210/227 Convolution Problem 2 0, 0 < t < 1 x(t) = h(t) = 1, 1 ≤ t ≤ 2 0, 2 < t ≤ 10 Solution Steps Z ∞ (x ∗ h)(t) = x(τ )h(t − τ ) dτ −∞ Given that x(t) = h(t): Z ∞ (x ∗ x)(t) = x(τ )x(t − τ ) dτ −∞ Dr Raghu Indrakanti 211/227 Problem 3: Find y(t), the convolution of the following two signals: x(t) = e2t u(−t), and h(t) = u(t − 3). Dr Raghu Indrakanti 212/227 When t − 3 ≤ 0, the product of x(τ ) and h(t − τ ) is nonzero for −∞ < τ < t − 3, and the convolving integral becomes Z t−3 1 y(t) = e2τ dτ = e2(t−3). −∞ 2 For t − 3 ≥ 0, the product of x(τ )h(t − τ ) is nonzero for −∞ < τ < 0, and the convolving integral becomes Z 0 1 y(t) = e2τ dτ =. −∞ 2 Dr Raghu Indrakanti 213/227 Problem 4: A linear time-invariant system is described by the impulse response ( 1 − t, 0 ≤ t ≤ 1 h(t) = 0, elsewhere Calculate the response of the system to the input signal ( 1, 0 ≤ t ≤ 2 x(t) = 0, elsewhere The response y(t) is given by the convolution of x(t) and h(t): Z ∞ y(t) = (x ∗ h)(t) = x(τ )h(t − τ ) dτ −∞ Dr Raghu Indrakanti 214/227 Calculation for 0 ≤ t < 1 Z t y(t) = x(τ )h(t − τ ) dτ 0 Since x(τ ) = 1 and h(t − τ ) = 1 − t + τ for 0 ≤ τ ≤ t, Z t y(t) = (1 − t + τ ) dτ 0 Z t Z t Z t y(t) = 1 dτ − t 1 dτ + τ dτ 0 0 0 t2 t2 y(t) = t − t2 + =t− 2 2 Dr Raghu Indrakanti 215/227 Calculation for 1 ≤ t < 2 Z 1 Z t y(t) = x(τ )h(t − τ ) dτ + x(τ )h(t − τ ) dτ 0 1 Since x(τ ) = 1 and h(t − τ ) = 1 − t + τ for 0 ≤ τ ≤ 1, Z 1 y(t) = (1 − t + τ ) dτ 0 1 1 1 τ2 y(t) = τ |0 − t τ |0 + 2 0 1 3 y(t) = 1 − t + = −t 2 2 Dr Raghu Indrakanti 216/227 Calculation for 2 ≤ t ≤ 3 Z 1 y(t) = x(τ )h(t − τ ) dτ t−2 Since x(τ ) = 1 and h(t − τ ) = 1 − t + τ for t − 2 ≤ τ ≤ 1, Z 1 y(t) = (1 − t + τ ) dτ t−2 1 1 1 τ2 y(t) = τ |t−2 − t τ |t−2 + 2 t−2 1 (t − 2)2 y(t) = 1 − (t − 2) − t(1 − (t − 2)) + − 2 2 (t − 2)2 y(t) = 3 − t − 2 Dr Raghu Indrakanti 217/227 Final Response The complete response y(t) is: 2 t − t2 , 0≤t