Outline
1.1 What Is DSP?
1.2 Operations on Sequences
1.3 Classes of Sequences
1.4 Summary
Exercises
DSP Study Guide · Chapter 1

Discrete-Time Signals

What digital signal processing is, how discrete-time sequences are described and manipulated, and how sequences are classified by symmetry, periodicity, and energy.

1.1 What Is Digital Signal Processing?

1.1.1 Signals and signal processing

A signal(訊號) is an information-bearing function — a function of one or more independent variables (usually time) that carries information about the behavior or nature of some phenomenon. Speech waveforms, ECG traces, stock prices, seismic records, and images are all signals. Signal processing(訊號處理) is the set of operations we apply to a signal to extract, enhance, store, or transmit the useful information it carries — for example removing noise, separating mixed signals, measuring a frequency, or compressing data.

Concept
Everything in this course rests on one shift in viewpoint: instead of treating a signal as a continuous waveform $x(t)$, we treat it as an ordered list of numbers $x[n]$. Once a signal is a sequence of numbers, "processing" it just means doing arithmetic on numbers — which a computer does perfectly, repeatably, and programmably.

1.1.2 Continuous-time, discrete-time, and digital signals

Three levels of "discreteness" must be distinguished:

TypeTime axisAmplitude axisNotation
Continuous-time(連續時間)= analogcontinuous, all $t$continuous$x(t)$, parentheses
Discrete-time(離散時間)discrete instants, integer $n$continuous$x[n]$, brackets
Digital(數位)discretediscrete (quantized)$x[n]$ with finite word length

A discrete-time signal takes values only at discrete time indices; a digital signal is discrete in both time and amplitude (each sample is quantized to a finite number of bits). In analysis we usually work with ideal discrete-time signals and treat quantization separately.

Notation trap
$x[n]$ is defined only for integer $n$. Writing $x[1.5]$ is meaningless — the sequence is not "zero between samples"; it is simply undefined there. Square brackets $[\,\cdot\,]$ always signal discrete time; parentheses $(\,\cdot\,)$ signal continuous time.

1.1.3 DSP vs. analog signal processing

An analog processor maps $x(t)$ directly to $y(t)$ with physical circuits (R, L, C, op-amps). Digital processing of an analog signal inserts a conversion sandwich: an A/D converter (類比轉數位轉換器) samples and quantizes $x(t)$ into $x[n]$, a digital processor computes $y[n]$ numerically, and a D/A converter reconstructs the analog output $y(t)$.

Analog signal processing x(t) Analog signal processor y(t) Digital processing of an analog signal x(t) A/D x[n] Digital signal processor y[n] D/A y(t)
Fig. 1-1 — Analog signal processing (top) vs. digital processing of an analog signal (bottom)(上:純類比處理;下:經 A/D → 數位處理器 → D/A 的數位處理鏈).
直觀解釋(點擊展開)
類比處理就像用「實體電路」直接對波形動手:電阻、電容、運算放大器的物理特性決定了輸出。 數位處理則是先把波形「翻譯」成一串數字(A/D 取樣+量化),用程式對數字做運算,再把結果「翻譯」回波形(D/A)。 好處是運算用軟體寫,要改濾波器只要改程式,不用重焊電路;代價是前後各多了一層轉換器,而且取樣速度限制了能處理的頻率範圍。 歷史上 17 世紀就有處理連續問題的數值方法,1950 年代大型電腦出現後開始用數位方式模擬類比系統,1960 年代 DSP 正式成為獨立領域。

Historical thread from the lecture: numerical methods for continuous-variable problems date to the 17th century; large digital computers became available in the 1950s (initially to simulate analog systems before building them); by the 1960s researchers recognized digital signal processing as a separate field in its own right.

1.1.4 Digital vs. analog: advantages and disadvantages

Advantages of digital(優點)Disadvantages(缺點)
Insensitive to component tolerances; fairly independent of temperature, aging, and other external parametersHigher system complexity: needs pre/post-processing devices (A/D and D/A converters, anti-aliasing filters)
Easily reproduced — no per-unit adjustment or tuningPower consumption of converters and processors
Amenable to full integration: a highly complex DSP system fits on a single VLSI chipLimited range of frequencies available for processing (set by the achievable sampling rate)
Programmable and reconfigurable; exact repeatability; easy storageQuantization and finite word-length effects introduce errors
Key point
Digital wins on reproducibility, programmability, and integration; analog keeps the edge at very high frequencies and ultra-low power, and every digital chain still pays the A/D–D/A toll.

1.2 Operations on Sequences

1.2.1 Sequences and notation

A discrete-time signal is a sequence(序列) of numbers $x = \{x[n]\}$, $-\infty < n < \infty$, with integer index $n$. Most sequences in practice come from uniform sampling(均勻取樣) of an analog signal:

Sampling relation $$x[n] = x_a(nT), \qquad n \in \mathbb{Z}, \qquad T = \text{sampling period(取樣週期)}, \quad f_s = \frac{1}{T} = \text{sampling rate}$$

A finite-length (N-point) sequence is defined on $N_1 \le n \le N_2$ with length $N = N_2 - N_1 + 1$; sample values may be real or complex. We often write a short sequence by listing its values with an arrow or underline marking $n=0$, e.g. $x[n]=\{1, \underline{2}, 1, 1\}$ means $x[-1]=1,\ x[0]=2,\ x[1]=1,\ x[2]=1$.

1.2.2 Left-sided and right-sided sequences

1.2.3 Elementary operations

All basic operations act sample by sample:

OperationDefinitionNote
Addition(相加)$y[n] = x[n] + w[n]$sample-by-sample sum
Product / modulation(調變)$y[n] = x[n]\cdot w[n]$basis of windowing and modulation
Scalar multiplication(純量倍乘)$y[n] = A\,x[n]$gain $A$
Time shift(時間平移)$y[n] = x[n-N]$$N>0$: delay(延遲), $N<0$: advance(超前)
Time reversal / folding(翻轉)$y[n] = x[-n]$mirror about $n=0$
Branchingone signal feeds several blocksused in block diagrams
Folding about a point other than $n=0$(不以 $n=0$ 為對稱軸)
Mirroring across an arbitrary point $n=a$ maps each index $n \mapsto 2a-n$: $$y[n] = x[2a-n] = x[-(n-2a)]$$ i.e. time-reverse then delay by $2a$ (fold, then shift right). Setting $a=0$ recovers $y[n]=x[-n]$. Order matters: shifting first by $D$ then folding gives $x[-n-D]$, a different center. The point need not be an integer — folding about $a=\tfrac12$ gives $y[n]=x[1-n]$, swapping $x[0]\leftrightarrow x[1]$, $x[-1]\leftrightarrow x[2]$, … (the basis of even/odd decomposition and correlation indexing).
mirror axis n = a = 2 x[n] x[0] x[3] 0 1 2 3 4 5 n y[n] = x[4−n] y[1]=x[3] y[4]=x[0] 0 1 2 3 4 5 n n ↦ 2a−n (a=2): every sample reflects across the dashed line; the sample at n=2 stays put.
Fig. 1-2 — Folding $x[n]$ about $n=a=2$ gives $y[n]=x[2a-n]=x[4-n]$(以 $n=2$ 為對稱軸翻轉). Each sample mirrors across the red axis: $x[0]\!\to\!y[4]$, $x[3]\!\to\!y[1]$; the sample on the axis ($n=2$) is unchanged.
Time shift $$y[n] = x[n - N] \;\;\Longrightarrow\;\; \text{the whole sequence moves } N \text{ samples to the right when } N > 0$$

1.2.4 Time shifting and combined operations

Operations are often combined, e.g. $y[n] = x[2n-3]$ or $y[n] = x[3-n]$. The safe way to evaluate a combination is substitution: for each output index $n$, compute the argument and read off the input sample.

Worked example — evaluating $y[n] = x[3-n]$ (flip + shift)
Step 1. Write the argument: $y[n] = x[3-n] = x[-(n-3)]$.
Step 2. Interpretation: first time-reverse $x$ to get $x[-n]$, then delay the result by 3: $x[-(n-3)]$. Equivalently shift first ($w[n]=x[n+3]$), then flip ($w[-n]=x[3-n]$).
Step 3. Check one point: $y[0] = x[3]$, $y[3] = x[0]$ — the sample originally at $n=3$ now sits at $n=0$, as a flip about $n = 1.5$ requires.
x[n] x[0] x[3] n x[−n] (flip) n y[n]=x[3−n] (delay 3) y[0]=x[3] y[3]=x[0] n -3-2-101234 -3-2-101234 -3-2-101234 fold +3 overall: x[n] and y[n] mirror about n = 1.5 (the red axis)
Fig. 1-2b — Two-step view of $y[n]=x[3-n]$: fold $x[n]\!\to\!x[-n]$ (top→middle), then delay by 3 (middle→bottom). The end result $y[n]$ is the mirror image of $x[n]$ about $n=1.5$(先翻轉再右移 3,等效於以 $n=1.5$ 為軸翻轉).
Order matters(運算順序陷阱)
For $y[n]=x[2n-3]$: define $w[n]=x[n-3]$ (shift by 3), then $y[n]=w[2n]=x[2n-3]$ — correct. If you instead down-sample first, $u[n]=x[2n]$, then shift, $u[n-3]=x[2n-6] \ne x[2n-3]$. When in doubt, always substitute index values rather than reasoning about "move then squeeze."

1.2.5 Up- and down-sampling

Sampling-rate alteration changes the time scale of a sequence.

Down-sampling (decimation, factor M)(降取樣) $$y[n] = x[nM] \qquad \text{keep every } M\text{th sample, discard the rest}$$
Up-sampling (factor L)(升取樣) $$y[n] = \begin{cases} x[n/L], & n = 0, \pm L, \pm 2L, \dots \\[2pt] 0, & \text{otherwise} \end{cases} \qquad \bbox[#fdeaea,3px]{\text{insert } L-1 \text{ zeros between samples}}$$

Down-sampling throws away samples — information can be permanently lost (this is exactly the aliasing issue of Section 1.3.5). Up-sampling only inserts zeros, so no information is lost; the zeros are later filled by an interpolation filter (Chapter on multirate DSP).

2026-06-12T22:19:36.657819 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 1 2 3 4 5 6 7 8 n 0 2 4 Original x[n] 0 1 2 3 4 n 0 2 4 Down-sampled y[n] = x[2n] (M = 2) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 n 0 2 4 Up-sampled y[n] = x[n/2] for even n, 0 otherwise (L = 2)
Fig. 1-3 — A triangular sequence $x[n]$ (top), its down-sampled version $x[2n]$ (middle), and its up-sampled version with zero insertion, $L=2$ (bottom)(降取樣每 2 點取 1 點;升取樣在樣本間補 0).

1.2.6 Complex numbers and the complex conjugate

Complex numbers(複數)are a mathematical convenience that leads to simple expressions for sinusoids and frequency responses. A second "imaginary" dimension ($j = \sqrt{-1}$, $j^2 = -1$) is added to all values.

Rectangular and polar forms $$z = a + jb = |z|\,e^{j\theta}, \qquad |z| = \sqrt{a^2 + b^2}, \qquad \theta = \arg z = \tan^{-1}\!\frac{b}{a}$$
Euler's formula(歐拉公式) $$e^{j\theta} = \cos\theta + j\sin\theta, \qquad \cos\theta = \frac{e^{j\theta}+e^{-j\theta}}{2}, \qquad \sin\theta = \frac{e^{j\theta}-e^{-j\theta}}{2j}$$

Practical rules: add/subtract in rectangular form (componentwise), multiply/divide in polar form (magnitudes multiply, phases add): $z_1 z_2 = |z_1||z_2|\,e^{j(\theta_1+\theta_2)}$.

Complex conjugate(共軛複數)
$$z^{*} = a - jb = |z|\,e^{-j\theta}, \qquad z\,z^{*} = |z|^2, \qquad \mathrm{Re}\,z = \tfrac{z+z^{*}}{2}, \quad \mathrm{Im}\,z = \tfrac{z-z^{*}}{2j}$$
Tip
In MATLAB: abs(z), angle(z), real(z), imag(z), conj(z), and exp(1j*theta) implement everything above. Remember 1j (or 1i) — a bare j may have been overwritten by a loop variable.

1.3 Classes of Sequences

1.3.1 Classification by symmetry

For a real sequence:

For a complex sequence the natural generalizations are:

Every sequence can be decomposed uniquely into these two parts:

★ Important — Conjugate-symmetric decomposition(重要) $$x[n] = x_{cs}[n] + x_{ca}[n], \qquad x_{cs}[n] = \tfrac{1}{2}\left(x[n] + x^{*}[-n]\right), \qquad x_{ca}[n] = \tfrac{1}{2}\left(x[n] - x^{*}[-n]\right)$$
這個共軛對稱分解在做什麼?(點擊展開)
這是偶/奇分解的複數版本:把單純翻轉 $x[-n]$ 換成「翻轉再取共軛」$x^{*}[-n]$。

拆解:任何複序列都能寫成共軛對稱部 $x_{cs}$ + 共軛反對稱部 $x_{ca}$: $$x_{cs}[n]=\tfrac12\big(x[n]+x^{*}[-n]\big),\qquad x_{ca}[n]=\tfrac12\big(x[n]-x^{*}[-n]\big).$$ 驗證相加:$x_{cs}[n]+x_{ca}[n]=\tfrac12(x[n]+x^{*}[-n])+\tfrac12(x[n]-x^{*}[-n])=x[n]$ ✓

驗證對稱性:把 $n$ 換成 $-n$ 再取共軛 $$x_{cs}^{*}[-n]=\tfrac12\big(x^{*}[-n]+x[n]\big)=x_{cs}[n]\ \text{(共軛對稱)},$$ $$x_{ca}^{*}[-n]=\tfrac12\big(x^{*}[-n]-x[n]\big)=-x_{ca}[n]\ \text{(共軛反對稱)}.$$ 拆到實部/虛部:令 $x[n]=a[n]+jb[n]$,則
  • $x_{cs}$:實部 $a[n]$ 為、虛部 $b[n]$ 為;$x_{cs}[0]$ 必為實數。
  • $x_{ca}$:實部 $a[n]$ 為、虛部 $b[n]$ 為;$x_{ca}[0]$ 必為純虛數。
退化為實信號:若 $x[n]$ 為實數,$x^{*}[-n]=x[-n]$,這組式子就回到上面的偶/奇分解 $x_{cs}\to x_{ev}$、$x_{ca}\to x_{od}$。

為什麼重要:實信號的 DTFT 必為共軛對稱($X(e^{j\omega})=X^{*}(e^{-j\omega})$)⇒ 振幅譜為偶、相位譜為奇,這正是這個分解在頻域的直接後果。
2026-06-16T09:45:02.945962 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/
Fig. 1-3b — 以 3-D 看共軛分解:一個複數序列 $x[n]$ 的每個樣本是 $(n,\,\mathrm{Re},\,\mathrm{Im})$ 空間中的一根 stem。左:原始 $x[n]$(只存在 $n=0\text{–}3$)。中:共軛對稱部 $x_{cs}[n]$——實部沿 $n=0$ 為偶、虛部為奇,$x_{cs}[0]$ 落在實軸。右:共軛反對稱部 $x_{ca}[n]$——實部為奇、虛部為偶,$x_{ca}[0]$ 落在虛軸。兩者逐點相加即還原 $x[n]$(每根 stem 拆成實部向量(沿 Re 軸)+虛部向量(沿 Im 軸)首尾相接,虛線為合成的複數樣本).

For real sequences this reduces to the even–odd decomposition(偶奇分解) $x[n] = x_{ev}[n] + x_{od}[n]$ with $x_{ev}[n] = \tfrac12 (x[n] + x[-n])$ and $x_{od}[n] = \tfrac12 (x[n] - x[-n])$.

為什麼任意函數都能「唯一」拆成偶+奇?(點擊展開)
存在性:直接令 $x_{ev}[n]=\tfrac12(x[n]+x[-n])$、$x_{od}[n]=\tfrac12(x[n]-x[-n])$, 兩式相加即得 $x[n]$,且 $x_{ev}[-n]=x_{ev}[n]$(偶)、$x_{od}[-n]=-x_{od}[n]$(奇),所以拆解一定存在。

唯一性:假設還有另一組 $x[n]=e_1[n]+o_1[n]=e_2[n]+o_2[n]$,則 $$e_1[n]-e_2[n] = o_2[n]-o_1[n].$$ 左邊是偶函數、右邊是奇函數;一個同時是偶又是奇的函數,必滿足 $f[n]=f[-n]=-f[n]\Rightarrow f[n]\equiv 0$。 因此 $e_1=e_2$、$o_1=o_2$,分解唯一。

前提:定義域要對稱($n$ 與 $-n$ 都有定義)。複數信號則把「翻轉」$x[-n]$ 換成「翻轉取共軛」$x^{*}[-n]$, 得到共軛對稱/反對稱分解,實信號時兩者一致。
2026-06-12T22:19:36.968440 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ −4 −2 0 2 4 n −2 −1 0 1 2 3 4 x[n] −4 −2 0 2 4 n −2 −1 0 1 2 3 4 x_ev[n] = (x[n]+x[−n])/2 −4 −2 0 2 4 n −2 −1 0 1 2 3 4 x_od[n] = (x[n]−x[−n])/2
Fig. 1-4 — Even–odd decomposition of the causal sequence $x[n]=\{\underline{1},2,3,4\}$: $x_{ev}$ is mirror-symmetric, $x_{od}$ is antisymmetric with $x_{od}[0]=0$, and they sum back to $x[n]$(任何序列都可唯一拆成偶部+奇部).
Must remember
The decomposition is unique and always exists. Verify by adding: $x_{cs}[n]+x_{ca}[n]=x[n]$, and check $x_{cs}[n]=x_{cs}^{*}[-n]$, $x_{ca}[n]=-x_{ca}^{*}[-n]$. This same split reappears in Chapter DTFT as the symmetry properties of real signals' spectra.

1.3.2 Basic sequences

Two building blocks generate everything else.

Unit sample (impulse)(單位脈衝) $$\delta[n] = \begin{cases} 1, & n = 0 \\ 0, & n \ne 0 \end{cases}$$
Unit step(單位步階) $$u[n] = \begin{cases} 1, & n \ge 0 \\ 0, & n < 0 \end{cases}$$

They are related by a running sum and a first difference:

★ Important — Step–impulse relations(重要) $$u[n] = \sum_{m=-\infty}^{n} \delta[m] = \sum_{k=0}^{\infty} \delta[n-k], \qquad \delta[n] = u[n] - u[n-1]$$
$u[n]=\sum_{m=-\infty}^{n}\delta[m]=\sum_{k=0}^{\infty}\delta[n-k]$ 怎麼來的?(點擊展開)
第一個等號(累加和形式):步階就是脈衝的「跑動累加」。把 $\delta[m]$ 從 $m=-\infty$ 一路加到 $m=n$: 因為 $\delta[m]$ 只有在 $m=0$ 那一格等於 1、其餘為 0,所以這個和只看「$m=0$ 有沒有被包含進來」。
  • 若 $n\ge 0$:上限 $n$ 已經越過 $m=0$,那一格被加進來 ⇒ 總和 $=1$。
  • 若 $n<0$:上限還沒到 $m=0$,$m=0$ 不在範圍內,範圍內全是 0 ⇒ 總和 $=0$。
這正好就是 $u[n]$ 的定義($n\ge0$ 為 1,否則 0)。

第二個等號(換變數):令 $k=n-m$(即 $m=n-k$)。當 $m$ 從 $-\infty$ 跑到 $n$ 時,$k=n-m$ 從 $+\infty$ 跑到 $0$,所以 $$\sum_{m=-\infty}^{n}\delta[m]=\sum_{k=0}^{\infty}\delta[n-k].$$ 意義:$u[n]$ 也可以看成「把脈衝向右每次平移 $k=0,1,2,\dots$ 後全部疊起來」—— $\delta[n]+\delta[n-1]+\delta[n-2]+\cdots$,每一項各負責一格台階,疊出無限長的平台。

反向關係(一階差分):$\delta[n]=u[n]-u[n-1]$,把累加再「相減」就抽回單一脈衝; 累加 ↔ 差分 是離散版的積分 ↔ 微分。

The most important identity of the whole course: any sequence is a weighted sum of shifted impulses — this is what will make convolution work in Chapter 2.

Sifting / representation by impulses $$x[n] = \sum_{k=-\infty}^{\infty} x[k]\,\delta[n-k]$$
2026-06-12T22:19:36.465710 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ −5.0 −2.5 0.0 2.5 5.0 7.5 10.0 n 0.00 0.25 0.50 0.75 1.00 1.25 Unit sample δ[n] −5.0 −2.5 0.0 2.5 5.0 7.5 10.0 n 0.00 0.25 0.50 0.75 1.00 1.25 Unit step u[n] −5.0 −2.5 0.0 2.5 5.0 7.5 10.0 n 0.00 0.25 0.50 0.75 1.00 1.25 Exponential (0.8)ⁿ u[n] −5.0 −2.5 0.0 2.5 5.0 7.5 10.0 n −1.0 −0.5 0.0 0.5 1.0 Sinusoid cos(0.2πn)
Fig. 1-5 — The four basic sequences: unit sample $\delta[n]$, unit step $u[n]$, decaying real exponential $(0.8)^n u[n]$, and sinusoid $\cos(0.2\pi n)$(四種基本序列;離散訊號一律用 stem 圖表示).

1.3.3 Exponential and sinusoidal sequences

Real exponential $$x[n] = A\,\alpha^{n} \qquad (A, \alpha \text{ real}): \quad |\alpha|<1 \text{ decays}, \quad |\alpha|>1 \text{ grows}, \quad \alpha<0 \text{ alternates sign}$$
Sinusoidal sequence(弦波序列) $$x[n] = A\cos(\omega_0 n + \phi) \qquad \omega_0 = \text{angular frequency (rad/sample)}, \quad \phi = \text{phase}$$

With complex $A = |A|e^{j\phi}$ and $\alpha = |\alpha|e^{j\omega_0}$, the complex exponential sequence(複指數序列) combines both:

Complex exponential $$x[n] = A\,\alpha^{n} = |A||\alpha|^{n} e^{j(\omega_0 n + \phi)} = |A||\alpha|^{n}\big[\cos(\omega_0 n + \phi) + j\sin(\omega_0 n + \phi)\big]$$

For $|\alpha| = 1$ this is the pure complex exponential $e^{j\omega_0 n}$ — the eigenfunction of every LTI system and the basis of all Fourier analysis to come.

Frequencies live on a circle
Because $n$ is an integer, $e^{j(\omega_0 + 2\pi r) n} = e^{j\omega_0 n}\,e^{j2\pi rn} = e^{j\omega_0 n}$ for any integer $r$: discrete-time frequencies $\omega_0$ and $\omega_0 + 2\pi r$ are indistinguishable. We therefore only ever need $\omega_0 \in [-\pi, \pi)$ (or $[0, 2\pi)$). "Low frequency" means $\omega_0$ near $0$ (or $2\pi$); the highest possible rate of oscillation is at $\omega_0 = \pi$, where the sequence alternates $+1,-1,+1,\dots$

1.3.4 Periodic sequences

A sequence is periodic(週期性) with period $N$ (a positive integer) if $x[n] = x[n+N]$ for all $n$; the smallest such $N$ is the fundamental period(基本週期). Unlike continuous time, a discrete sinusoid is not automatically periodic:

Periodicity condition for discrete sinusoids $$\cos(\omega_0 (n+N) + \phi) = \cos(\omega_0 n + \phi) \iff \omega_0 N = 2\pi k \iff \frac{\omega_0}{2\pi} = \frac{k}{N} \in \mathbb{Q}$$

i.e. $x[n] = \cos(\omega_0 n + \phi)$ is periodic iff $\omega_0 / 2\pi$ is a rational number. Writing $\omega_0/2\pi = k/N$ in lowest terms, the fundamental period is $N$. For example $\cos(0.25\pi n)$ has $\omega_0/2\pi = 1/8$, so $N = 8$; but $\cos(n)$ ($\omega_0 = 1$, $\omega_0/2\pi = 1/2\pi$ irrational) is never periodic.

Worked example — fundamental period of $x[n] = e^{j0.7\pi n}$
Step 1. $\dfrac{\omega_0}{2\pi} = \dfrac{0.7\pi}{2\pi} = \dfrac{7}{20}$ — rational, so periodic.
Step 2. In lowest terms $k/N = 7/20$, so the fundamental period is $N = 20$ (the sequence wraps $k = 7$ full cycles every $20$ samples).

Periodic complex exponentials. For period $N$, the harmonically related complex exponentials are $e^{j2\pi k n / N}$, $k \in \mathbb{Z}$ — but only $N$ of them are distinct, since $k$ and $k+N$ give the identical sequence. This finiteness is what makes the DFS/DFT possible.

★ Important — Symmetry of periodic sequences(重要). For a period-$N$ sequence, symmetry is defined modulo $N$: $x[n]$ is periodic conjugate-symmetric if $x[n] = x^{*}[\langle -n\rangle_N]$, where $\langle m \rangle_N$ denotes $m$ modulo $N$. The decomposition of Section 1.3.1 carries over with $-n$ replaced by $\langle -n\rangle_N$.

為什麼週期序列的對稱要用「模 $N$」?(點擊展開)
問題出在翻轉。非週期序列的共軛對稱用 $x[n]=x^{*}[-n]$,是把整條線「以 $n=0$ 為軸」鏡射。 但週期序列只有 $N$ 個獨立樣本、住在一個圓環上($n$ 與 $n+N$ 是同一點), 直接寫 $-n$ 會跑出 $\{0,\dots,N-1\}$ 之外。解法是把它繞回圓環: $$\langle -n\rangle_N = (N-n)\bmod N.$$ 所以圓周翻轉是:$x[0]$ 不動,其餘樣本順序倒過來: $$\{x[0],\,x[1],\,x[2],\,\dots,\,x[N-1]\}\;\longrightarrow\;\{x[0],\,x[N-1],\,x[N-2],\,\dots,\,x[1]\}.$$ 週期共軛對稱 $x[n]=x^{*}[\langle -n\rangle_N]$ 的具體含意(逐點配對):
  • $n=0$:$x[0]=x^{*}[0]$ ⇒ $x[0]$ 必為實數。
  • $N$ 偶時 $n=N/2$:$x[N/2]=x^{*}[N/2]$ ⇒ 也必為實數。
  • 其餘成對:$x[k]$ 與 $x[N-k]$ 互為共軛($k=1,\dots$)。
分解照搬 §1.3.1,只把 $-n$ 換成 $\langle -n\rangle_N$: $$x_{cs}[n]=\tfrac12\big(x[n]+x^{*}[\langle -n\rangle_N]\big),\qquad x_{ca}[n]=\tfrac12\big(x[n]-x^{*}[\langle -n\rangle_N]\big).$$ 驗證、唯一性的論證與線性情形完全一樣,差別只在「翻轉」改成「圓周翻轉」。 為什麼重要:實數週期序列的 DFS/DFT 係數 $X[k]$ 會滿足 $X[k]=X^{*}[\langle -k\rangle_N]$ (頻域的模 $N$ 共軛對稱)——這正是第 8 章 DFT 圓周對稱性質的來源。

1.3.5 Sampling sinusoids and aliasing

Sample the analog sinusoid $x_a(t) = \cos(\Omega_0 t)$ at rate $f_s = 1/T$:

Continuous-to-discrete frequency mapping $$x[n] = x_a(nT) = \cos(\Omega_0 T\, n) = \cos(\omega_0 n), \qquad \boxed{\;\omega_0 = \Omega_0 T = \frac{2\pi f_0}{f_s}\;}$$

Now combine this with the $2\pi$-ambiguity of discrete frequency: analog frequencies $f_0$ and $f_0 + k f_s$ (any integer $k$), and also $-f_0 + k f_s$, all map to the same sample sequence. Distinct analog sinusoids become indistinguishable after sampling — this is aliasing(混疊).

Alias frequencies $$\cos\!\big(2\pi (f_0 + k f_s)\, nT\big) = \cos\!\big(2\pi f_0\, nT\big) \qquad \text{for all integers } k$$
2026-06-12T22:19:36.805124 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 5 10 15 20 25 n −1.0 −0.5 0.0 0.5 1.0 1.5 cos(0.25πn) (stems) and cos(2.25πn) (crosses) — identical, period N = 8 cos(2.25πn) 0.0 0.2 0.4 0.6 0.8 1.0 t (s) −1.0 −0.5 0.0 0.5 1.0 1.5 Aliasing: 1 Hz and 9 Hz sinusoids share the same samples at fs = 8 Hz 1 Hz 9 Hz samples at fs = 8 Hz
Fig. 1-6 — Top: $\cos(0.25\pi n)$ and $\cos(2.25\pi n)$ produce identical samples (frequencies $2\pi$ apart are the same); fundamental period $N=8$. Bottom: a 1 Hz and a 9 Hz analog sinusoid sampled at $f_s = 8$ Hz hit exactly the same sample values — after sampling, the 9 Hz tone masquerades as 1 Hz(混疊:取樣後 9 Hz 與 1 Hz 無法區分).
Exam trap
To avoid aliasing of a sinusoid at $f_0$ you need $f_s > 2 f_0$ (strictly greater — sampling at exactly $2f_0$ can land every sample on a zero crossing). Equivalently the discrete frequency must satisfy $|\omega_0| < \pi$. The full sampling theorem is treated in a later chapter; here you only need the mapping $\omega_0 = 2\pi f_0/f_s$ and the $2\pi$-periodicity of $\omega$.
直觀解釋(點擊展開)
離散頻率 ω 只在 −π 到 π 之間有意義,因為 n 是整數,多轉整數圈(加 2π 的倍數)看起來完全一樣。 取樣就是把連續頻率 Ω「捲」到這個圓上:ω = ΩT。轉太快的弦波(f₀ > fs/2)會被捲到圓的另一邊, 偽裝成低頻訊號——就像電影裡車輪轉太快時,攝影機拍起來反而像慢轉或倒轉(車輪效應就是混疊)。 所以取樣前要用抗混疊濾波器把超過 fs/2 的成分先濾掉。

1.3.6 Energy, power, and boundedness

Energy(能量) $$E_x = \sum_{n=-\infty}^{\infty} |x[n]|^2$$
Average power(平均功率) $$P_x = \lim_{K\to\infty} \frac{1}{2K+1} \sum_{n=-K}^{K} |x[n]|^2$$

Three more classes used constantly in stability arguments:

ClassConditionWhy it matters
Bounded(有界)$|x[n]| \le B_x < \infty \;\; \forall n$the "B" in BIBO stability
Absolutely summable(絕對可和)$\sum_{n=-\infty}^{\infty} |x[n]| < \infty$guarantees DTFT exists; BIBO criterion for $h[n]$
Square summable(平方可和)$\sum_{n=-\infty}^{\infty} |x[n]|^2 < \infty$finite energy
★ Important — Inclusion, one way only(重要)
Absolutely summable $\Rightarrow$ square summable (finite energy), but not conversely: $x[n] = \frac{1}{n} u[n-1]$ has $\sum \frac{1}{n^2} = \frac{\pi^2}{6} < \infty$ (finite energy) yet $\sum \frac{1}{n}$ diverges (not absolutely summable).

1.4 Chapter Summary

Signal taxonomy

Analog $x(t)$: continuous in time and amplitude. Discrete-time $x[n]$: integer $n$ only. Digital: discrete in both. DSP chain: A/D → digital processor → D/A.

Basic sequences

$\delta[n]$, $u[n] = \sum_{m\le n}\delta[m]$, $\delta[n]=u[n]-u[n-1]$, exponential $A\alpha^n$, sinusoid $A\cos(\omega_0 n + \phi)$, and the sifting identity $x[n]=\sum_k x[k]\delta[n-k]$.

Operations

Shift $x[n-N]$, flip $x[-n]$, scale $Ax[n]$, modulate $x[n]w[n]$, down-sample $x[nM]$, up-sample (insert $L-1$ zeros). Evaluate combinations by substituting indices.

Periodicity rule

$\cos(\omega_0 n)$ periodic $\iff \omega_0/2\pi = k/N$ rational; fundamental period $N$ from lowest terms. $\omega_0$ and $\omega_0 + 2\pi r$ are the same frequency.

Symmetry

$x_{cs}[n] = \tfrac12(x[n]+x^{*}[-n])$, $x_{ca}[n] = \tfrac12(x[n]-x^{*}[-n])$; unique split, real case = even + odd.

Energy / power / aliasing

$E=\sum|x|^2$, $P=\lim \frac{1}{2K+1}\sum|x|^2$; energy signals have $P=0$, periodic signals are power signals. Sampling maps $\omega_0 = 2\pi f_0/f_s$; $f_0$ and $f_0 + kf_s$ alias.

Exercises

All three problems of ICE503 DSP Homework #1, with full worked solutions.

Exercise 1 — System output, down-sampling, and up-sampling

Problem: A discrete-time system produces the output sequence

$$y[n] = 3x[n] + 5x[n-1] + 4x[n-2] + 8x[n-4] + x[n-5].$$

(a) Plot the block diagram for this system.
(b) The input $x[n]$ shown below is $x[-1]=1$, $x[0]=2$, $x[1]=1$, $x[2]=1$ (zero elsewhere). Sketch and label $y[n]$.
(c) Following (b), sketch and label the down-sampled sequence $y[3n]$.
(d) Following (b), sketch and label the up-sampled sequence $y\!\left[\tfrac{1}{2}n\right]$.

Click to reveal solution

(a) Block diagram. The system is a tapped delay line(分接延遲線): five unit delays $z^{-1}$ in cascade, taps at $x[n], x[n-1], x[n-2], x[n-4], x[n-5]$ with gains $3, 5, 4, 8, 1$, all summed. Note there is no tap after the third delay (the $x[n-3]$ coefficient is 0), but the delay itself must still be present to reach $x[n-4]$ and $x[n-5]$.

x[n] z⁻¹ z⁻¹ z⁻¹ z⁻¹ z⁻¹ x[n−1] x[n−2] x[n−4] x[n−5] x[n−3] (coef 0) 3 5 4 8 1 + + + + y[n]
Fig. 1-7 — Block diagram for $y[n] = 3x[n]+5x[n-1]+4x[n-2]+8x[n-4]+x[n-5]$(注意 $x[n-3]$ 的係數為 0,故該節點不接增益,但延遲器仍需保留).

(b) Output $y[n]$. Since the system is a weighted sum of delayed inputs, slide the coefficient set $\{3,5,4,0,8,1\}$ (at delays $0\ldots5$) over the input. With $x[-1]=1, x[0]=2, x[1]=1, x[2]=1$:

$y[-1] = 3x[-1] = 3$
$y[0] = 3x[0] + 5x[-1] = 6 + 5 = 11$
$y[1] = 3x[1] + 5x[0] + 4x[-1] = 3 + 10 + 4 = 17$
$y[2] = 3x[2] + 5x[1] + 4x[0] = 3 + 5 + 8 = 16$
$y[3] = 5x[2] + 4x[1] + 8x[-1] = 5 + 4 + 8 = 17$
$y[4] = 4x[2] + 8x[0] + x[-1] = 4 + 16 + 1 = 21$
$y[5] = 8x[1] + x[0] = 8 + 2 = 10$
$y[6] = 8x[2] + x[1] = 8 + 1 = 9$
$y[7] = x[2] = 1$
Result $$y[n] = \{3, \underline{11}, 17, 16, 17, 21, 10, 9, 1\}, \qquad -1 \le n \le 7 \;(\text{underline} = n{=}0)$$

(c) Down-sampling $y[3n]$. Keep every third sample of $y$: $y[3\cdot 0] = y[0] = 11$, $\; y[3\cdot 1] = y[3] = 17$, $\; y[3\cdot 2] = y[6] = 9$; for $n \le -1$, $y[3n] = y[-3], y[-6], \ldots = 0$ and for $n \ge 3$, $y[9] = 0$. So

Result $$y[3n] = \{\underline{11}, 17, 9\}, \qquad n = 0, 1, 2$$

(d) Up-sampling $y[n/2]$. Defined only when $n/2$ is an integer; odd $n$ gives 0:

Result $$y\!\left[\tfrac{n}{2}\right] = \{3, 0, \underline{11}, 0, 17, 0, 16, 0, 17, 0, 21, 0, 10, 0, 9, 0, 1\}, \qquad -2 \le n \le 14$$

i.e. the samples of $y$ spread to even indices $n = 2m$ with zeros in between ($y_u[-2]=3$, $y_u[0]=11$, $y_u[2]=17$, $y_u[4]=16$, $y_u[6]=17$, $y_u[8]=21$, $y_u[10]=10$, $y_u[12]=9$, $y_u[14]=1$).

2026-06-12T22:19:37.190312 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ −3 −2 −1 0 1 2 3 4 5 6 7 8 n 0 1 2 Input x[n] −3 −2 −1 0 1 2 3 4 5 6 7 8 n 0 10 20 3 11 17 16 17 21 10 9 1 Output y[n] −2 −1 0 1 2 3 4 n 0 10 20 11 17 9 Down-sampled y[3n] −4 −3 −2 −1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 n 0 10 20 Up-sampled y[n/2] (zeros at odd n)
Fig. 1-8 — Exercise 1 results: input $x[n]$, output $y[n]$, down-sampled $y[3n]$, and up-sampled $y[n/2]$(降取樣保留 $n=0,3,6$ 三點;升取樣把樣本攤到偶數索引、奇數索引補 0).
Exercise 2 — Periodicity of discrete-time signals

Problem: Determine whether each of the following signals is periodic. If periodic, state its fundamental period.

(a) $x[n] = 2\cos\left(\dfrac{\pi}{2} n\right)$    (b) $x[n] = n \sin\left(\dfrac{\pi}{4} n\right)$    (c) $x[n] = e^{\,j \frac{3}{5}\pi n}$

Click to reveal solution

(a) $\omega_0 = \dfrac{\pi}{2}$, so $\dfrac{\omega_0}{2\pi} = \dfrac{1}{4} = \dfrac{k}{N}$ — rational, already in lowest terms with $k=1$, $N=4$.

(a) Result $$\text{Periodic, fundamental period } N = 4 \quad (x[n] = \{2, 0, -2, 0, 2, 0, \dots\})$$

(b) The sinusoidal factor $\sin(\pi n/4)$ alone would have period 8, but the amplitude factor $n$ grows without bound. Suppose $x[n]$ were periodic with some period $N>0$. Look at the indices $n = 2, 2+8, 2+16, \dots$ where $\sin(\pi n /4) = \sin(\pi/2 + 2\pi m) = 1$: there $x[2] = 2$, $x[10] = 10$, $x[18] = 18, \dots$ — the values keep growing, so no value can ever repeat with any period. (Equivalently: a periodic sequence must be bounded, but $|x[8m+2]| = 8m+2 \to \infty$.)

(b) Result $$\text{Not periodic (unbounded envelope } n \text{ destroys periodicity)}$$

(c) $\omega_0 = \dfrac{3\pi}{5}$, so $\dfrac{\omega_0}{2\pi} = \dfrac{3}{10} = \dfrac{k}{N}$ — rational, lowest terms $k = 3$, $N = 10$. The sequence completes $3$ full revolutions of the unit circle every $10$ samples.

(c) Result $$\text{Periodic, fundamental period } N = 10$$
Checklist
For any $\cos$, $\sin$, or $e^{j\omega_0 n}$: form $\omega_0/2\pi$. Irrational → not periodic. Rational $k/N$ in lowest terms → fundamental period $N$. Any growing/decaying envelope ($n$, $\alpha^n$ with $|\alpha| \neq 1$) → not periodic regardless of the sinusoid.
Exercise 3 — MATLAB: complex exponential and conjugate symmetry

Problem: MATLAB simulation:

(a) Generate the complex-valued signal $$x[n] = e^{\,j\frac{1}{10}\pi n}, \qquad n = -10, \dots, -1, 0, 1, \dots, 10.$$ (b) Use the stem function to plot the real part and the imaginary part of $x[n]$.
(c) Determine whether $x[n]$ is a conjugate-symmetric or a conjugate-antisymmetric sequence, and explain the reason.

Click to reveal solution

(a)–(b) MATLAB code.

% Homework 1, Problem 3
n = -10:10;
x = exp(1j*pi*n/10);          % x[n] = e^{j*pi*n/10}

figure;
subplot(2,1,1);
stem(n, real(x), 'filled');
xlabel('n'); ylabel('Re\{x[n]\}'); grid on;
title('Real part of x[n] = e^{j\pi n/10}');

subplot(2,1,2);
stem(n, imag(x), 'filled');
xlabel('n'); ylabel('Im\{x[n]\}'); grid on;
title('Imaginary part of x[n]');

% (c) numerical check of conjugate symmetry: compare x[n] with x*[-n]
xflip = conj(fliplr(x));      % x*[-n] on the same index grid
max(abs(x - xflip))           % returns 0  ->  conjugate symmetric
2026-06-12T22:19:37.358830 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ −10 −8 −6 −4 −2 0 2 4 6 8 10 n −1.0 −0.5 0.0 0.5 1.0 Re{x[n]} = cos(πn/10) — even −10 −8 −6 −4 −2 0 2 4 6 8 10 n −1.0 −0.5 0.0 0.5 1.0 Im{x[n]} = sin(πn/10) — odd
Fig. 1-9 — Regenerated result of the MATLAB simulation: $\mathrm{Re}\{x[n]\} = \cos(\pi n/10)$ is an even sequence and $\mathrm{Im}\{x[n]\} = \sin(\pi n/10)$ is an odd sequence(實部為偶、虛部為奇 ⇒ 共軛對稱).

(c) Conjugate symmetric. Test the definition $x[n] \stackrel{?}{=} x^{*}[-n]$:

Verification $$x^{*}[-n] = \left(e^{\,j\frac{\pi}{10}(-n)}\right)^{*} = \left(e^{-j\frac{\pi}{10}n}\right)^{*} = e^{\,j\frac{\pi}{10}n} = x[n]$$

Since $x[n] = x^{*}[-n]$ for every $n$, the sequence is conjugate symmetric(共軛對稱), not conjugate antisymmetric. Equivalently, by Euler's formula $x[n] = \cos(\pi n/10) + j\sin(\pi n /10)$: the real part $\cos(\pi n/10)$ is an even function of $n$ and the imaginary part $\sin(\pi n/10)$ is an odd function of $n$ — exactly the requirement for conjugate symmetry (visible in Fig. 1-9). A further consistency check: $x[0] = e^{0} = 1$ is purely real, as conjugate symmetry demands ($x[0] = x^{*}[0]$), whereas a conjugate-antisymmetric sequence would require $x[0]$ to be purely imaginary.