Digital Signal Octave Codes (0A)

Similar documents
Digital Signal Octave Codes (0A)

Digital Signal Octave Codes (0A)

Digital Signal Octave Codes (0A)

Digital Signal Octave Codes (0A)

Digital Signal Octave Codes (0A)

FFT Octave Codes (1B) Young Won Lim 7/6/17

Fourier Analysis Overview (0A)

DFT Octave Codes (0B) Young Won Lim 4/15/17

Fourier Analysis Overview (0A)

General CORDIC Description (1A)

DFT Frequency (9A) Each Row of the DFT Matrix. Young Won Lim 7/31/10

Fourier Analysis Overview (0B)

CT Rectangular Function Pairs (5B)

Capacitor Young Won Lim 06/22/2017

Capacitor in an AC circuit

Utility Functions Octave Codes (0A) Young Won Lim 1/24/18

Down-Sampling (4B) Young Won Lim 10/25/12

Up-Sampling (5B) Young Won Lim 11/15/12

Bandpass Sampling (2B) Young Won Lim 3/27/12

Down-Sampling (4B) Young Won Lim 11/15/12

Discrete Time Rect Function(4B)

Signal Functions (0B)

Discrete Time Rect Function(4B)

Phasor Young Won Lim 05/19/2015

Undersampling (2B) Young Won Lim 4/4/12

Capacitor in an AC circuit

Group & Phase Velocities (2A)

Capacitor in an AC circuit

Capacitor and Inductor

Capacitor and Inductor

Capacitor in an AC circuit

Group Delay and Phase Delay (1A) Young Won Lim 7/19/12

Capacitors in an AC circuit

Capacitor in an AC circuit

Capacitor in an AC circuit

Capacitor in an AC circuit

CLTI Differential Equations (3A) Young Won Lim 6/4/15

Propagating Wave (1B)

Higher Order ODE's (3A) Young Won Lim 7/7/14

Spectra (2A) Young Won Lim 11/8/12

Higher Order ODE's (3A) Young Won Lim 12/27/15

The Growth of Functions (2A) Young Won Lim 4/6/18

Audio Signal Generation. Young Won Lim 2/2/18

Higher Order ODE's (3A) Young Won Lim 7/8/14

Background LTI Systems (4A) Young Won Lim 4/20/15

Expected Value (10D) Young Won Lim 6/12/17

Relations (3A) Young Won Lim 3/27/18

CLTI System Response (4A) Young Won Lim 4/11/15

Dispersion (3A) 1-D Dispersion. Young W. Lim 10/15/13

Root Locus (2A) Young Won Lim 10/15/14

Audio Signal Generation. Young Won Lim 2/2/18

Group Velocity and Phase Velocity (1A) Young Won Lim 5/26/12

Matrix Transformation (2A) Young Won Lim 11/10/12

Background Trigonmetry (2A) Young Won Lim 5/5/15

General Vector Space (2A) Young Won Lim 11/4/12

Matrix Transformation (2A) Young Won Lim 11/9/12

Background ODEs (2A) Young Won Lim 3/7/15

Complex Trigonometric and Hyperbolic Functions (7A)

Audio Signal Generation. Young Won Lim 1/29/18

Higher Order ODE's, (3A)

CT Correlation (2A) Young Won Lim 9/9/14

Detect Sensor (6B) Eddy Current Sensor. Young Won Lim 11/19/09

ODE Background: Differential (1A) Young Won Lim 12/29/15

Hilbert Inner Product Space (2B) Young Won Lim 2/7/12

Definitions of the Laplace Transform (1A) Young Won Lim 1/31/15

Line Integrals (4A) Line Integral Path Independence. Young Won Lim 10/22/12

Magnetic Sensor (3B) Magnetism Hall Effect AMR Effect GMR Effect. Young Won Lim 9/23/09

Complex Series (3A) Young Won Lim 8/17/13

Signals and Spectra (1A) Young Won Lim 11/26/12

Introduction to ODE's (0A) Young Won Lim 3/9/15

Separable Equations (1A) Young Won Lim 3/24/15

Bayes Theorem (10B) Young Won Lim 6/3/17

Line Integrals (4A) Line Integral Path Independence. Young Won Lim 11/2/12

Surface Integrals (6A)

Sequential Circuit Timing. Young Won Lim 11/6/15

Linear Equations with Constant Coefficients (2A) Young Won Lim 4/13/15

Hamiltonian Cycle (3A) Young Won Lim 5/5/18

Signal Processing. Young Won Lim 2/20/18

Signal Processing. Young Won Lim 2/22/18

Differentiation Rules (2A) Young Won Lim 1/30/16

Complex Functions (1A) Young Won Lim 2/22/14

Bayes Theorem (4A) Young Won Lim 3/5/18

General Vector Space (3A) Young Won Lim 11/19/12

FSM Examples. Young Won Lim 11/6/15

Implication (6A) Young Won Lim 3/17/18

Second Order ODE's (2A) Young Won Lim 5/5/15

Background Complex Analysis (1A) Young Won Lim 9/2/14

Hyperbolic Functions (1A)

Introduction to ODE's (0P) Young Won Lim 12/27/14

Surface Integrals (6A)

Resolution (7A) Young Won Lim 4/21/18

Propositional Logic Resolution (6A) Young W. Lim 12/12/16

Probability (10A) Young Won Lim 6/12/17

Propositional Logic Logical Implication (4A) Young W. Lim 4/11/17

Differentiation Rules (2A) Young Won Lim 2/22/16

Propositional Logic Resolution (6A) Young W. Lim 12/31/16

Implication (6A) Young Won Lim 3/12/18

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

Sampling and Discrete Time. Discrete-Time Signal Description. Sinusoids. Sampling and Discrete Time. Sinusoids An Aperiodic Sinusoid.

2.2. Limits Involving Infinity. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Prentice Hall

Transcription:

Digital Signal Periodic Conditions

Copyright (c) 2009-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Please send corrections (or suggestions) to youngwlim@hotmail.com. This document was produced by using OpenOffice and Octave.

Based on M.J. Roberts, Fundamentals of Signals and Systems S.K. Mitra, Digital Signal Processing : a computer-based approach 2 nd ed S.D. Stearns, Digital Signal Processing with Examples in MATLAB 3

Digital Frequency ω 0 t = 2 π f 0 t t = nt s sampling period ω 0 nt s = 2 π f 0 n T s = 2 π T 0 n T s f 0 = 1 T 0 signal period = 2 π n T s T 0 = 2 π n F 0 F 0 = f 0 T s = f 0 f s = T s T 0 4

Digital Frequency ω 0 t = 2 π f 0 t Analog Signal t = nt s t = nt s n ω 0 T s = 2 π n f 0 T s ω 0 T s = Ω 0 f 0 T s = F 0 Ω 0 n = 2π n F 0 Digital Signal 5

Digital Frequency ω 0 t = 2 π f 0 t Analog Signal T s T s Normalization Ω 0 n = 2 π n F 0 Digital Signal 6

Digital Frequency F 0 = f 0 T s normalized by f s = f 0 f s = T s T 0 Ω 0 = 2 π F 0 7

Periodic Relation e j(2π(n+n 0) F 0 ) = e j(2 π n F 0) Digital Signal Period N 0 : the smallest integer Periodic Condition : integer m 2 π N 0 F 0 = 2 π m N 0 = m F 0 = m T 0 T s 8

Periodic Condition of a Sampled Signal 2 π F 0 n = 2 π m g(nt s ) = A cos(2 π f 0 T s n+θ) F 0 n = m Integers n, m F 0 = f 0 T s = f 0 / f s F 0 = m n F 0 = m n = f 0 f s Fundamental Frequency Sampling Frequency g[n] = A cos(2 π F 0 n + θ) Rational Number F 0 = m n M.J. Roberts, Fundamentals of Signals and Systems 9

A Cosine Waveform n= [0:29]; n= [0:29]; x= cos(2*pi*(n/10)); x= cos((2/10)*pi*n); n T s = n 1 10 F 0 = f 0 T s = f 0 f s = T s T 0 n T s = n 1 2 π f 0 nt s 2 π f 0 nt s = 2 π 1 n 1 10 = 2 π 1 10 n 1 T s = 0.1 f 0 = 1 (T 0 = 1) T s = 1 f 0 = 0.1 (T 0 =10) F 0 = f 0 T s = 0.1 F 0 = f 0 T s = 0.1 U of Rhode Island, ELE 436, FFT Tutorial 10

Many waveforms share the same sampled data x 1.00000 0.80902 0.30902-0.30902-0.80902-1.00000-0.80902-0.30902 0.30902 0.80902 1.00000 0.80902 0.30902-0.30902-0.80902-1.00000-0.80902-0.30902 0.30902 0.80902 1.00000 0.80902 0.30902-0.30902-0.80902-1.00000-0.80902-0.30902 0.30902 0.80902 ` 3 U of Rhode Island, ELE 436, FFT Tutorial 30 11

Cosine Wave 1 n= [0:29]; x= cos(2*pi*n/10); ω 0 = 2π f 0 = 2π T 0 t = [0:29]/10; y = cos(2*pi*t); stem(t, y) hold on t2 = [0:290]/100; y2 = cos(2*pi*t2); plot(t2, y2) ω 0 = 2π f 0 = 2π T 0 t = [0:29]; y = cos(0.2*pi*t); stem(t, y) hold on t2 = [0:290]/10; y2 = cos(0.2*pi*t2); plot(t2, y2) U of Rhode Island, ELE 436, FFT Tutorial 12

Normalized Frequency subplot(2, 1, 1); t = [0:29]/10; y = cos(2*pi*t); stem(t, y) hold on t2 = [0:290]/100; y2 = cos(2*pi*t2); plot(t2, y2) axis([0, 10, -1, 1]); subplot(2, 1, 2) t = [0:29]; y = cos(0.2*pi*t); stem(t, y) hold on t2 = [0:290]/10; y2 = cos(0.2*pi*t2); plot(t2, y2) axis([0, 10, -1, 1]); f 0 = 1 T 0 = 1 f s = 10 T s = 0.1 f 0 = 0.1 T 0 = 10 f s = 1 T s = 1 U of Rhode Island, ELE 436, FFT Tutorial 13

Cosine Wave 1 t = [0:29]/10; y = cos(2*pi*t); stem(t, y) hold on t2 = [0:290]/100; y2 = cos(2*pi*t2); plot(t2, y2) f 0 = 1 T s = 0.1 F 0 = f 0 T s = 0.1 T 0 = 1 f 0 = 1 T 0 = 1 f s = 10 T s = 0.1 U of Rhode Island, ELE 436, FFT Tutorial 14

Cosine Wave 2 t = [0:29]; y = cos(0.2*pi*t); stem(t, y) hold on t2 = [0:290]/10; y2 = cos(0.2*pi*t2); plot(t2, y2) T 0 = 10 f 0 = 0.1 T 0 = 10 f s = 1 T s = 1 f 0 = 0.1 T s = 1 F 0 = f 0 T s = 0.1 U of Rhode Island, ELE 436, FFT Tutorial 15

Sampled Sinusoids g[n] = A e β n g[n] = A z n z = e β N 0 1 F 0 g[n] = A cos(2 π n/ N 0 + θ) m/ N 0 2 πm/ N 0 g[n] = A cos(2 π F 0 n + θ) = F 0 = 2 π F 0 g[n] = A cos(ω 0 n + θ) = Ω 0 /2 π = Ω 0 M.J. Roberts, Fundamentals of Signals and Systems 16

Sampling Period and Frequency g(t ) = A cos(2 π f 0 t+θ) g(nt s ) = A cos(2 π f 0 T s n+θ) g[n] = g(n T s ) F 0 = f 0 T s = f 0 / f s g[n] = A cos(2 π F 0 n + θ) g[n] = A cos(2 π F 0 n + θ) T s = 1 f s 1 T s = f s sampling period sampling frequency sampling rate M.J. Roberts, Fundamentals of Signals and Systems 17

Periodic Condition of a Sampled Signal 2 π F 0 n = 2 π m g(nt s ) = A cos(2 π f 0 T s n+θ) F 0 n = m Integers n, m F 0 = f 0 T s = f 0 / f s F 0 = m n F 0 = m n = f 0 f s Fundamental Frequency Sampling Frequency g[n] = A cos(2 π F 0 n + θ) Rational Number F 0 = m n M.J. Roberts, Fundamentals of Signals and Systems 18

Periodic Condition Examples g(t ) = A cos(2 π f 0 t+θ) g[t ] = 4 cos ( 72 π t 19 ) = 4 cos ( 2 π 36 19 t ) g[n] = A cos(2 π F 0 n + θ) g[n] = 4 cos ( 72 π n 19 ) = 4 cos ( 2 π 36 19 n ) T s = 1 g(t ) = 4 cos ( 2 π 36 19 (t + T 0 ) ) T 0 = 19 36 g[n] = 4 cos ( 2 π 36 19 (n + N 0 ) ) N 0 = 19 Fundamental Period of Fundamental Period of g(t ) g[n] N 0 1 F 0 N 0 q = 1 F 0 q N 0 = F 0 M.J. Roberts, Fundamentals of Signals and Systems 19

Periodic Condition Examples g(t ) = 4 cos ( 2 π 36 19 (t + T 0 ) ) T 0 = 19 36 g[n] = 4 cos ( 2 π 36 19 (n + N 0 ) ) N 0 = 19 Fundamental Period of Fundamental Period of g(t ) g[n] F 0 = 36 19 = q the number of cycles in N 0 samples N the smallest integer : fundamental period 0 N 0 1 F 0 N 0 q = 1 F 0 q N 0 = F 0 M.J. Roberts, Fundamentals of Signals and Systems 20

Periodic Condition Examples F 0 = 36 19 = q the number of cycles in N 0 samples N the smallest integer : fundamental period 0 When F 0 is not the reciprocal of an integer (q=1), a discrete-time sinusoid may not be immediately recognizable from its graph as a sinusoid. M.J. Roberts, Fundamentals of Signals and Systems 21

Periodic Condition Examples g[n] = 4 cos ( 2 π 36 19 (n + N 0 ) ) 36 19 (n + N 0 ) integer 1 19 N 0 = k integer N 0 integer N 0 = 19 Fundamental period of g[n] g(t ) = 4 cos ( 2 π 36 19 (t + T 0 ) ) 36 19 (t + T 0 ) integer 36 19 T 0 = k integer T 0 integer T 0 = 19 36 Fundamental period of g(t ) M.J. Roberts, Fundamentals of Signals and Systems 22

Periodic Condition Examples g[n] = 4 cos ( 2 π 1 19 n ) g[n] = 4 cos ( 2 π 2 19 n ) g[n] = 4 cos ( 2 π 3 19 n ) g[n] = 4 cos ( 2 π 36 19 n ) clf n = [0:36]; t = [0:3600]/100; y1 = 4*cos(2*pi*(1/19)*n); y2 = 4*cos(2*pi*(2/19)*n); y3 = 4*cos(2*pi*(3/19)*n); y4 = 4*cos(2*pi*(36/19)*n); yt1 = 4*cos(2*pi*(1/19)*t); yt2 = 4*cos(2*pi*(2/19)*t); yt3 = 4*cos(2*pi*(3/19)*t); yt4 = 4*cos(2*pi*(36/19)*t); subplot(4,1,1); stem(n, y1); hold on; plot(t, yt1); subplot(4,1,2); stem(n, y2); hold on; plot(t, yt2); subplot(4,1,3); stem(n, y3); hold on; plot(t, yt3); subplot(4,1,4); stem(n, y4); hold on; plot(t, yt4); M.J. Roberts, Fundamentals of Signals and Systems 23

Periodic Condition Examples g[n] = 4 cos ( 2 π 1 19 n ) g[n] = 4 cos ( 2 π 2 19 n ) g[n] = 4 cos ( 2 π 3 19 n ) g[n] = 4 cos ( 2 π 36 19 n ) N 0 = 19 T s = 1 1 cycle 2 cycles 3 cycles 36 cycles 24

Periodic Condition Examples g(t ) = A cos(2 π f 0 t+θ) g[n] = A cos(2 π F 0 n + θ) g 1 (t ) = 4 cos (2 π 1 t ) g 2 (t ) = 4 cos (2 π 2 t ) g 3 (t) = 4 cos (2 π 3 t ) t n T 1 t n T 2 t n T 3 g 1 [n] = 4 cos (2 π n T s1 ) g 2 [n] = 4 cos (2 π n T s 2 ) g 3 [n] = 4 cos (2 π nt s3 ) t n T 1 t n T 2 t n T 3 T 1 = 1 10 T 2 = 1 20 T 3 = 1 30 n = 0, 1, 2, 3, n = 0, 1, 2, 3, n = 0, 1, 2, 3, 1 t = 0, 0.1, 0.2, 0.3, 2 t = 0, 0.1, 0.2, 0.3, 3 t = 0, 0.1, 0.2, 0.3, { g 1 [n] } { g 2 [n] } { g 2 [n] } M.J. Roberts, Fundamentals of Signals and Systems 25

Periodic Condition Examples g(t ) = A cos(2 π f 0 t+θ) 2 π F 0 n = 2 π m g[n] = A cos(2 π F 0 n + θ) g[n] = 4 cos ( 72 π n 19 ) = 4 cos ( 2 π ( 36 19 ) n ) 36 19 n = m 36 19 = m n 36 19 = m n = f 0 f s smallest n = 19 = 4 cos( 2 π ( 36 19 (n + N 0) ) ) smallest N 0 = 19 1/ N 0 = F F 0 0 = q N 0 = Ω 0 /2 π M.J. Roberts, Fundamentals of Signals and Systems 26

Periodic Condition Examples 4 cos (ω t 1 ) 4 cos (ω n 1 ) n 1 1 T s = 1 t 1 = 2t 2 n 1 = 2n 2 4 cos (2ω t 2 ) 4 cos (ω 2n 2 ) n 2 2 T s = 2 M.J. Roberts, Fundamentals of Signals and Systems 27

Periodic Condition Examples T s = 1 10 T s = 1 20 T s = 1 30 ω = 2π 1 ω = 2π 2 ω = 2π 3 clf n = [0:10]; t = [0:1000]/1000; y1 = 4*cos(2*pi*1*n/10); y2 = 4*cos(2*pi*2*n/20); y3 = 4*cos(2*pi*3*n/30); yt1 = 4*cos(2*pi*t); yt2 = 4*cos(2*pi*2*t); yt3 = 4*cos(2*pi*3*t); subplot(3,1,1); stem(n, y1); hold on; plot(t, yt1); subplot(3,1,2); stem(n/20, y2); hold on; plot(t, yt2); subplot(3,1,3); stem(n/30, y3); hold on; plot(t, yt3); M.J. Roberts, Fundamentals of Signals and Systems 28

References [1] http://en.wikipedia.org/ [2] J.H. McClellan, et al., Signal Processing First, Pearson Prentice Hall, 2003 [3] M.J. Roberts, Fundamentals of Signals and Systems [4] S.J. Orfanidis, Introduction to Signal Processing [5] K. Shin, et al., Fundamentals of Signal Processing for Sound and Vibration Engineerings [6] A graphical interpretation of the DFT and FFT, by Steve Mann 29