Outline大綱アウトライン
1.1 What Is DSP?1.1 什麼是 DSP?1.1 DSP とは何か
1.2 Operations on Sequences1.2 序列的運算1.2 系列に対する演算
1.3 Classes of Sequences1.3 序列的分類1.3 系列の分類
1.4 Summary1.4 本章總結1.4 まとめ
Exercises習題演習問題
DSP Study Guide · Chapter 1DSP 學習指南 · 第 1 章DSP 学習ガイド · 第 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.1 ディジタル信号処理とは何か

1.1.1 Signals and signal processing1.1.1 訊號與訊號處理1.1.1 信号と信号処理

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.

訊號(signal)是一個承載資訊的函數——一個以一個或多個自變數(通常是時間)為引數的函數,帶著某個現象的行為或性質的資訊。語音波形、心電圖、股價、地震紀錄與影像,全都是訊號。訊號處理(signal processing)則是我們施加在訊號上的一整套運算,用來擷取、增強、儲存或傳輸它所帶的有用資訊——例如去除雜訊、分離混合訊號、量測頻率,或是壓縮資料。

信号とは情報を担う関数のことである。すなわち、ある現象の挙動や性質についての情報を運ぶ、1 個以上の独立変数(通常は時間)の関数である。音声波形、心電図波形、株価、地震記録、画像はいずれも信号である。信号処理とは、信号が担う有用な情報を抽出・強調・蓄積・伝送するために信号へ施す一連の操作を指す。たとえば雑音の除去、混ざり合った信号の分離、周波数の測定、データの圧縮などである。

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.

這門課的一切都建立在一個觀點的轉變上:我們不再把訊號看成連續波形 $x(t)$,而是把它看成一串有序的數字 $x[n]$。一旦訊號變成一串數字,所謂「處理」就只是對數字做算術——而電腦做算術既精確、又可重複,還能用程式控制。

この授業のすべては、ある一つの視点の転換の上に成り立っている。信号を連続波形 $x(t)$ として扱うのではなく、順序づけられた数の並び $x[n]$ として扱うという転換である。信号がいったん数の列になってしまえば、それを「処理する」とは数に対して算術を行うことにほかならない。そして算術こそ、計算機が完璧に、再現性をもって、かつプログラム可能な形で実行できるものである。

1.1.2 Continuous-time, discrete-time, and digital signals1.1.2 連續時間、離散時間與數位訊號1.1.2 連続時間信号・離散時間信号・ディジタル信号

Three levels of "discreteness" must be distinguished:

必須區分三種層次的「離散」:

「離散性」には区別すべき三つの段階がある:

TypeTime axisAmplitude axisNotation
Continuous-time = analogcontinuous, all $t$continuous$x(t)$, parentheses
Discrete-timediscrete instants, integer $n$continuous$x[n]$, brackets
Digitaldiscretediscrete (quantized)$x[n]$ with finite word length
類型時間軸振幅軸記號
連續時間(=類比)連續,所有 $t$連續$x(t)$,小括號
離散時間離散時刻,整數 $n$連續$x[n]$,方括號
數位離散離散(已量化)字長有限的 $x[n]$
種類時間軸振幅軸記法
連続時間 = アナログ連続、すべての $t$連続$x(t)$、丸括弧
離散時間離散的な時刻、整数 $n$連続$x[n]$、角括弧
ディジタル離散離散(量子化済み)有限語長の $x[n]$

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.

$x[n]$ 只對整數 $n$ 有定義。寫 $x[1.5]$ 是沒有意義的——序列在樣本之間並不是「等於零」,而是根本沒有定義。方括號 $[\,\cdot\,]$ 一律代表離散時間,小括號 $(\,\cdot\,)$ 則代表連續時間。

$x[n]$ は整数の $n$ に対してのみ定義される。$x[1.5]$ と書いても意味がない——系列は標本と標本の間が「ゼロ」なのではなく、単にそこでは定義されていないのである。角括弧 $[\,\cdot\,]$ は常に離散時間を、丸括弧 $(\,\cdot\,)$ は連続時間を表す。

1.1.3 DSP vs. analog signal processing1.1.3 DSP 與類比訊號處理的比較1.1.3 DSP とアナログ信号処理

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)$.

類比處理器用實體電路(R、L、C、運算放大器)把 $x(t)$ 直接映射成 $y(t)$。若改用數位方式處理類比訊號,中間就要夾進一段轉換:A/D 轉換器(類比轉數位)把 $x(t)$ 取樣並量化成 $x[n]$,數位處理器以數值方式算出 $y[n]$,最後由 D/A 轉換器重建出類比輸出 $y(t)$。

アナログプロセッサは、物理的な回路(R、L、C、オペアンプ)によって $x(t)$ を直接 $y(t)$ へ写す。アナログ信号をディジタル処理する場合は、変換のサンドイッチが挟まる:A/D 変換器が $x(t)$ を標本化・量子化して $x[n]$ とし、ディジタルプロセッサが $y[n]$ を数値的に計算し、D/A 変換器がアナログ出力 $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).
圖 1-1 — 上:純類比的訊號處理;下:經 A/D → 數位處理器 → D/A 的數位處理鏈。
図 1-1 — アナログ信号処理(上)と、アナログ信号のディジタル処理(下)の比較。
直觀解釋(點擊展開)
類比處理就像用「實體電路」直接對波形動手:電阻、電容、運算放大器的物理特性決定了輸出。 數位處理則是先把波形「翻譯」成一串數字(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.

課堂上提到的歷史脈絡:處理連續變數問題的數值方法可以追溯到 17 世紀;大型數位電腦在 1950 年代開始出現(起初是用來在真正動手做之前模擬類比系統);到了 1960 年代,研究者才把數位訊號處理視為一門獨立的領域。

講義で触れられた歴史の流れ:連続変数問題に対する数値解法は 17 世紀にさかのぼる。大型ディジタル計算機は 1950 年代に利用可能となった(当初はアナログシステムを製作する前に模擬する目的だった)。そして 1960 年代には、ディジタル信号処理がそれ自体で独立した一分野であると研究者に認識されるようになった。

1.1.4 Digital vs. analog: advantages and disadvantages1.1.4 數位與類比:優點與缺點1.1.4 ディジタル対アナログ:長所と短所

Advantages of digitalDisadvantages
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
數位的優點缺點
對元件公差不敏感;受溫度、老化與其他外部參數的影響很小系統較複雜:需要前後端裝置(A/D 與 D/A 轉換器、抗混疊濾波器)
容易複製 —— 不需要逐台調校轉換器與處理器本身的功耗
適合完全積體化:再複雜的 DSP 系統也能做進單一顆 VLSI 晶片可處理的頻率範圍有限(由能達到的取樣率決定)
可程式、可重構;可完全重現;容易儲存量化與有限字長效應會帶來誤差
ディジタルの長所短所
部品公差の影響を受けにくく、温度・経年変化などの外部パラメータにほとんど依存しないシステムの複雑さが増す:前処理・後処理の装置(A/D・D/A 変換器、アンチエイリアシングフィルタ)が必要になる
複製が容易——個体ごとの調整やチューニングが要らない変換器とプロセッサの消費電力
完全な集積化に適する:非常に複雑な DSP システムでも 1 個の VLSI チップに収まる処理できる周波数範囲に限界がある(実現可能な標本化レートで決まる)
プログラム可能かつ再構成可能、厳密な再現性、保存が容易量子化と有限語長の影響が誤差を生む
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.

數位的優勢在於可重現性、可程式化與積體化;類比則在極高頻與超低功耗仍占上風,而且每一條數位處理鏈都還是要付出 A/D–D/A 這筆代價。

ディジタルが勝るのは再現性・プログラム可能性・集積化である。アナログは非常に高い周波数と超低消費電力で優位を保つ。そしてディジタルの処理系は、どれも必ず A/D–D/A の代償を払っている。

1.2 Operations on Sequences1.2 序列的運算1.2 系列に対する演算

1.2.1 Sequences and notation1.2.1 序列與記號1.2.1 系列と記法

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:

離散時間訊號就是一串數字所構成的序列 $x = \{x[n]\}$,$-\infty < n < \infty$,其中索引 $n$ 是整數。實務上大多數序列都來自對類比訊號的均勻取樣:

離散時間信号とは、整数のインデックス $n$ をもつ数の系列 $x = \{x[n]\}$、$-\infty < n < \infty$ である。実際に現れる系列の多くは、アナログ信号の一様標本化から得られる:

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$.

有限長度($N$ 點)序列定義在 $N_1 \le n \le N_2$ 上,長度為 $N = N_2 - N_1 + 1$;樣本值可以是實數或複數。短序列常直接把值列出來,並用箭號或底線標出 $n=0$ 的位置,例如 $x[n]=\{1, \underline{2}, 1, 1\}$ 表示 $x[-1]=1,\ x[0]=2,\ x[1]=1,\ x[2]=1$。

有限長(N 点)の系列は $N_1 \le n \le N_2$ 上で定義され、長さは $N = N_2 - N_1 + 1$ である。標本値は実数でも複素数でもよい。短い系列は、$n=0$ の位置を矢印や下線で示しながら値を並べて書くことが多い。たとえば $x[n]=\{1, \underline{2}, 1, 1\}$ は $x[-1]=1,\ x[0]=2,\ x[1]=1,\ x[2]=1$ を意味する。

1.2.2 Left-sided and right-sided sequences1.2.2 左邊序列與右邊序列1.2.2 左側系列と右側系列

1.2.3 Elementary operations1.2.3 基本運算1.2.3 基本演算

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
運算定義說明
相加$y[n] = x[n] + w[n]$逐樣本相加
相乘/調變$y[n] = x[n]\cdot w[n]$加視窗與調變的基礎
純量倍乘$y[n] = A\,x[n]$增益 $A$
時間平移$y[n] = x[n-N]$$N>0$:延遲;$N<0$:超前
時間翻轉$y[n] = x[-n]$以 $n=0$ 為軸鏡射
分支一個訊號同時送進多個方塊方塊圖中常用
演算定義備考
加算$y[n] = x[n] + w[n]$標本ごとの和
積・変調$y[n] = x[n]\cdot w[n]$窓かけと変調の基礎
スカラー倍$y[n] = A\,x[n]$利得 $A$
時間シフト$y[n] = x[n-N]$$N>0$:遅延、$N<0$:進み
時間反転・折返し$y[n] = x[-n]$$n=0$ を軸とした鏡映
分岐1 つの信号が複数のブロックへ入るブロック図で用いる
Folding about a point other than $n=0$(不以 $n=0$ 為對稱軸)
以 $n=0$ 以外的點為軸翻轉
$n=0$ 以外の点を軸とする折返し(不以 $n=0$ 為對稱軸)

Mirroring across an arbitrary point $n=a$ maps each index $n \mapsto 2a-n$:

以任意一點 $n=a$ 為軸鏡射,會把每個索引映射成 $n \mapsto 2a-n$:

任意の点 $n=a$ を軸に鏡映すると、各インデックスは $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).

也就是先時間翻轉,再延遲 $2a$(先摺,再右移)。取 $a=0$ 就回到 $y[n]=x[-n]$。順序很重要:若先平移 $D$ 再翻轉,得到的是 $x[-n-D]$,對稱中心並不相同。這個點也不必是整數——以 $a=\tfrac12$ 為軸翻轉會得到 $y[n]=x[1-n]$,把 $x[0]\leftrightarrow x[1]$、$x[-1]\leftrightarrow x[2]$、… 互換(這正是偶奇分解與相關運算索引的基礎)。

すなわち時間反転してから $2a$ だけ遅延する(折り返してから右へシフト)。$a=0$ とすれば $y[n]=x[-n]$ に戻る。順序が重要である:先に $D$ だけシフトしてから折り返すと $x[-n-D]$ となり、中心が変わってしまう。軸は整数である必要はない。$a=\tfrac12$ を軸にすると $y[n]=x[1-n]$ となり、$x[0]\leftrightarrow x[1]$、$x[-1]\leftrightarrow x[2]$、… が入れ替わる(偶奇分解や相関のインデックス付けの基礎となる)。

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]$. 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.
圖 1-2 — 以 $n=a=2$ 為軸翻轉 $x[n]$,得到 $y[n]=x[2a-n]=x[4-n]$。每個樣本都以紅色軸線為鏡面對映:$x[0]\!\to\!y[4]$、$x[3]\!\to\!y[1]$;落在軸上的樣本($n=2$)則不變。
図 1-2 — $x[n]$ を $n=a=2$ を軸に折り返すと $y[n]=x[2a-n]=x[4-n]$ となる。各標本は赤い軸を挟んで鏡映される:$x[0]\!\to\!y[4]$、$x[3]\!\to\!y[1]$。軸上の標本($n=2$)は変わらない。
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 operations1.2.4 時間平移與複合運算1.2.4 時間シフトと演算の組み合わせ

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.

這些運算常常組合在一起,例如 $y[n] = x[2n-3]$ 或 $y[n] = x[3-n]$。處理組合運算最保險的方法是代入:對每一個輸出索引 $n$,算出引數的值,再去讀對應的輸入樣本。

演算はしばしば組み合わされる。たとえば $y[n] = x[2n-3]$ や $y[n] = x[3-n]$ である。組み合わせを安全に評価する方法は代入である:出力インデックス $n$ ごとに引数を計算し、対応する入力標本を読み取ればよい。

Worked example — evaluating $y[n] = x[3-n]$ (flip + shift)
範例 — 求 $y[n] = x[3-n]$(翻轉+平移)
例題 — $y[n] = x[3-n]$ の評価(反転+シフト)
Step 1. Write the argument: $y[n] = x[3-n] = x[-(n-3)]$.
第 1 步. 先把引數寫成:$y[n] = x[3-n] = x[-(n-3)]$。
手順 1. 引数を書き直す:$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]$).
第 2 步. 解讀:先把 $x$ 時間翻轉得到 $x[-n]$,再把結果延遲 3 得到 $x[-(n-3)]$。等價的做法是先平移($w[n]=x[n+3]$)再翻轉($w[-n]=x[3-n]$)。
手順 2. 解釈:まず $x$ を時間反転して $x[-n]$ を得て、その結果を 3 だけ遅延する:$x[-(n-3)]$。あるいは先にシフトして($w[n]=x[n+3]$)から反転しても同じ($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.
第 3 步. 檢查一個點:$y[0] = x[3]$、$y[3] = x[0]$ —— 原本在 $n=3$ 的樣本現在落在 $n=0$,正是以 $n = 1.5$ 為軸翻轉所要求的結果。
手順 3. 1 点で検算する:$y[0] = x[3]$、$y[3] = x[0]$——もともと $n=3$ にあった標本が $n=0$ に移っており、$n = 1.5$ を軸とした反転が要求するとおりである。
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$.
圖 1-2b — 分兩步看 $y[n]=x[3-n]$:先翻轉 $x[n]\!\to\!x[-n]$(上→中),再延遲 3(中→下)。最後的 $y[n]$ 就是 $x[n]$ 以 $n=1.5$ 為軸的鏡像。
図 1-2b — $y[n]=x[3-n]$ の二段階の見方:$x[n]\!\to\!x[-n]$ と折り返し(上→中)、次に 3 だけ遅延する(中→下)。最終結果 $y[n]$ は $n=1.5$ を軸とした $x[n]$ の鏡像である。
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."

對 $y[n]=x[2n-3]$:先定義 $w[n]=x[n-3]$(平移 3),再取 $y[n]=w[2n]=x[2n-3]$ —— 這才是對的。若反過來先降取樣 $u[n]=x[2n]$ 再平移,得到的是 $u[n-3]=x[2n-6] \ne x[2n-3]$。只要有疑慮,就直接把索引值代進去算,不要用「先移再壓」這種口訣去推。

$y[n]=x[2n-3]$ の場合:$w[n]=x[n-3]$ と定義し(3 だけシフト)、次に $y[n]=w[2n]=x[2n-3]$——これが正しい。もし先にダウンサンプリングして $u[n]=x[2n]$ とし、そのあとシフトすると $u[n-3]=x[2n-6] \ne x[2n-3]$ となってしまう。迷ったら「動かしてから縮める」といった言葉で考えるのではなく、必ずインデックスの値を代入して確かめること。

1.2.5 Up- and down-sampling1.2.5 升取樣與降取樣1.2.5 アップサンプリングとダウンサンプリング

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

改變取樣率,等於改變序列的時間尺度。

標本化レートの変更は、系列の時間スケールを変える。

Down-sampling (decimation, factor M)(降取樣)降取樣(decimation,因子 $M$)ダウンサンプリング(間引き、係数 M)(降取樣) $$y[n] = x[nM] \qquad \text{keep every } M\text{th sample, discard the rest}$$
Up-sampling (factor L)(升取樣)升取樣(因子 $L$)アップサンプリング(係数 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).

降取樣是丟掉樣本——資訊可能永久流失(這正是 §1.3.5 要談的混疊問題)。升取樣只是插入零,所以不會損失資訊;這些零之後會由內插濾波器補上(見多速率 DSP 那一章)。

ダウンサンプリングは標本を捨てるため、情報が永久に失われることがある(これが 1.3.5 節のエイリアシングの問題そのものである)。アップサンプリングはゼロを挿入するだけなので情報は失われない。挿入されたゼロは、のちに内挿フィルタによって埋められる(マルチレート 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).
圖 1-3 — 上:三角形序列 $x[n]$;中:降取樣後的 $x[2n]$(每 2 點取 1 點);下:升取樣並插入零的結果($L=2$,樣本之間補 0)。
図 1-3 — 三角形の系列 $x[n]$(上)、そのダウンサンプリング $x[2n]$(中)、そしてゼロ挿入によるアップサンプリング $L=2$(下)。

1.2.6 Complex numbers and the complex conjugate1.2.6 複數與共軛複數1.2.6 複素数と複素共役

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.

複數(complex numbers)是一種數學上的方便工具,能讓弦波與頻率響應的表示式變得簡潔。它替所有數值加上了第二個「虛」維度($j = \sqrt{-1}$,$j^2 = -1$)。

複素数は数学上の便法であり、正弦波や周波数応答を簡潔な式で表せるようにしてくれる。すべての値に「虚」の第 2 の次元($j = \sqrt{-1}$、$j^2 = -1$)が加わる。

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)}$.

實用原則:加減用直角座標式(分量各自相加減),乘除用極座標式(大小相乘、相位相加):$z_1 z_2 = |z_1||z_2|\,e^{j(\theta_1+\theta_2)}$。

実用上の原則:加減算は直交形式で(成分ごとに)、乗除算は極形式で(大きさは掛け、位相は足す):$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.

在 MATLAB 中,abs(z)、angle(z)、real(z)、imag(z)、conj(z) 與 exp(1j*theta) 就能完成上面所有運算。記得要寫 1j(或 1i)—— 單獨的 j 可能早就被迴圈變數蓋掉了。

MATLAB では abs(z)、angle(z)、real(z)、imag(z)、conj(z)、exp(1j*theta) が上記すべてを実装している。1j(または 1i)と書くことを忘れないように——裸の j はループ変数で上書きされている可能性がある。

1.3 Classes of Sequences1.3 序列的分類1.3 系列の分類

1.3.1 Classification by symmetry1.3.1 依對稱性分類1.3.1 対称性による分類

For a real sequence:

對實數序列而言:

実系列について:

For a complex sequence the natural generalizations are:

對複數序列,自然的推廣是:

複素系列については、自然な一般化は次のようになる:

Every sequence can be decomposed uniquely into these two parts:

任何序列都可以唯一地拆成這兩部分:

どんな系列も、この 2 つの部分へ一意に分解できる:

★ 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 — The conjugate decomposition seen in 3-D: each sample of a complex sequence $x[n]$ is one stem in $(n,\,\mathrm{Re},\,\mathrm{Im})$ space. Left: the original $x[n]$ (nonzero only on $n=0\text{–}3$). Middle: the conjugate-symmetric part $x_{cs}[n]$ — real part even about $n=0$, imaginary part odd, $x_{cs}[0]$ lying on the real axis. Right: the conjugate-antisymmetric part $x_{ca}[n]$ — real part odd, imaginary part even, $x_{ca}[0]$ lying on the imaginary axis. Adding the two pointwise returns $x[n]$ (each stem splits into a real-part vector along Re plus an imaginary-part vector along Im, joined head to tail, the dashed line being the resulting complex sample).圖 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 軸)首尾相接,虛線為合成的複數樣本)。図 1-3b — 共役分解を 3 次元で見る:複素系列 $x[n]$ の各標本は $(n,\,\mathrm{Re},\,\mathrm{Im})$ 空間の 1 本の 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[n] = x_{ev}[n] + x_{od}[n]$,其中 $x_{ev}[n] = \tfrac12 (x[n] + x[-n])$、$x_{od}[n] = \tfrac12 (x[n] - x[-n])$。

実系列の場合、これは偶奇分解 $x[n] = x_{ev}[n] + x_{od}[n]$ に帰着する。ここで $x_{ev}[n] = \tfrac12 (x[n] + x[-n])$、$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]$.
圖 1-4 — 因果序列 $x[n]=\{\underline{1},2,3,4\}$ 的偶奇分解:$x_{ev}$ 鏡像對稱、$x_{od}$ 反對稱且 $x_{od}[0]=0$,兩者相加即還原 $x[n]$(任何序列都可唯一拆成偶部+奇部)。
図 1-4 — 因果系列 $x[n]=\{\underline{1},2,3,4\}$ の偶奇分解:$x_{ev}$ は鏡映対称、$x_{od}$ は $x_{od}[0]=0$ をもつ反対称であり、両者を足すと $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.

這個分解唯一存在,而且永遠成立。驗算方式是相加:$x_{cs}[n]+x_{ca}[n]=x[n]$,再檢查 $x_{cs}[n]=x_{cs}^{*}[-n]$ 與 $x_{ca}[n]=-x_{ca}^{*}[-n]$。同樣的拆法會在 DTFT 那一章再度出現,成為實數訊號頻譜的對稱性質。

この分解は一意であり、常に存在する。足し算で検算すること:$x_{cs}[n]+x_{ca}[n]=x[n]$。さらに $x_{cs}[n]=x_{cs}^{*}[-n]$、$x_{ca}[n]=-x_{ca}^{*}[-n]$ も確かめる。この同じ分割は、DTFT の章で実信号のスペクトルの対称性として再び現れる。

1.3.2 Basic sequences1.3.2 基本序列1.3.2 基本的な系列

Two building blocks generate everything else.

有兩個基本元件可以生成其他一切。

2 つの構成要素から他のすべてが生成される。

Unit sample (impulse)(單位脈衝)單位脈衝(unit sample / impulse)単位標本(インパルス)(單位脈衝) $$\delta[n] = \begin{cases} 1, & n = 0 \\ 0, & n \ne 0 \end{cases}$$
Unit step(單位步階)單位步階(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.

整門課最重要的一個恆等式:任何序列都是平移脈衝的加權和—— 這正是第 2 章摺積能成立的根據。

この授業全体で最も重要な恒等式:任意の系列は、シフトされたインパルスの重み付き和である——これが第 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)$.
圖 1-5 — 四種基本序列:單位脈衝 $\delta[n]$、單位步階 $u[n]$、衰減的實指數 $(0.8)^n u[n]$,以及弦波 $\cos(0.2\pi n)$(離散訊號一律用 stem 圖表示)。
図 1-5 — 4 つの基本系列:単位標本 $\delta[n]$、単位ステップ $u[n]$、減衰する実指数 $(0.8)^n u[n]$、正弦波 $\cos(0.2\pi n)$。

1.3.3 Exponential and sinusoidal sequences1.3.3 指數與弦波序列1.3.3 指数系列と正弦波系列

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:

若取複數 $A = |A|e^{j\phi}$ 與 $\alpha = |\alpha|e^{j\omega_0}$,複指數序列就把兩者結合起來:

複素数 $A = |A|e^{j\phi}$ と $\alpha = |\alpha|e^{j\omega_0}$ をとれば、複素指数系列が両者を一つにまとめる:

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.

當 $|\alpha| = 1$ 時,它就是純複指數 $e^{j\omega_0 n}$ —— 所有 LTI 系統的特徵函數,也是後面全部傅立葉分析的基礎。

$|\alpha| = 1$ のとき、これは純粋な複素指数 $e^{j\omega_0 n}$ となる——あらゆる LTI システムの固有関数であり、これから学ぶフーリエ解析すべての基礎である。

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$

因為 $n$ 是整數,對任何整數 $r$ 都有 $e^{j(\omega_0 + 2\pi r) n} = e^{j\omega_0 n}\,e^{j2\pi rn} = e^{j\omega_0 n}$:離散時間的頻率 $\omega_0$ 與 $\omega_0 + 2\pi r$ 根本無法區分。所以我們永遠只需要 $\omega_0 \in [-\pi, \pi)$(或 $[0, 2\pi)$)。「低頻」指的是 $\omega_0$ 接近 $0$(或 $2\pi$);而最高的振盪速率出現在 $\omega_0 = \pi$,此時序列在 $+1,-1,+1,\dots$ 之間交替。

$n$ が整数であるため、任意の整数 $r$ について $e^{j(\omega_0 + 2\pi r) n} = e^{j\omega_0 n}\,e^{j2\pi rn} = e^{j\omega_0 n}$ となる。すなわち離散時間の周波数 $\omega_0$ と $\omega_0 + 2\pi r$ は区別できない。したがって考えるべき範囲は $\omega_0 \in [-\pi, \pi)$(あるいは $[0, 2\pi)$)だけでよい。「低い周波数」とは $\omega_0$ が $0$(または $2\pi$)に近いことを意味する。振動が最も速いのは $\omega_0 = \pi$ のときで、系列は $+1,-1,+1,\dots$ と交互に変わる。

1.3.4 Periodic sequences1.3.4 週期性序列1.3.4 周期系列

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:

若對所有 $n$ 都有 $x[n] = x[n+N]$($N$ 為正整數),則序列是週期性的,而最小的那個 $N$ 稱為基本週期。和連續時間不同,離散弦波不見得是週期的:

すべての $n$ について $x[n] = x[n+N]$ が成り立つとき、その系列は周期 $N$(正の整数)で周期的であるという。このような $N$ のうち最小のものが基本周期である。連続時間の場合と違い、離散時間の正弦波は自動的に周期的になるとは限らない:

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.

也就是說,$x[n] = \cos(\omega_0 n + \phi)$ 是週期的充要條件是 $\omega_0 / 2\pi$ 為有理數。把 $\omega_0/2\pi = k/N$ 化成最簡分數後,基本週期就是 $N$。例如 $\cos(0.25\pi n)$ 的 $\omega_0/2\pi = 1/8$,所以 $N = 8$;但 $\cos(n)$($\omega_0 = 1$,$\omega_0/2\pi = 1/2\pi$ 為無理數)永遠不是週期的。

すなわち $x[n] = \cos(\omega_0 n + \phi)$ が周期的であるのは$\omega_0 / 2\pi$ が有理数のとき、かつそのときに限る。$\omega_0/2\pi = k/N$ を既約分数で書けば、基本周期は $N$ である。たとえば $\cos(0.25\pi n)$ は $\omega_0/2\pi = 1/8$ なので $N = 8$。一方 $\cos(n)$($\omega_0 = 1$、$\omega_0/2\pi = 1/2\pi$ は無理数)は決して周期的にならない。

Worked example — fundamental period of $x[n] = e^{j0.7\pi n}$
範例 — 求 $x[n] = e^{j0.7\pi n}$ 的基本週期
例題 — $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.
第 1 步. $\dfrac{\omega_0}{2\pi} = \dfrac{0.7\pi}{2\pi} = \dfrac{7}{20}$ —— 是有理數,所以為週期序列。
手順 1. $\dfrac{\omega_0}{2\pi} = \dfrac{0.7\pi}{2\pi} = \dfrac{7}{20}$——有理数なので周期的である。
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).
第 2 步. 化成最簡分數 $k/N = 7/20$,所以基本週期是 $N = 20$(每 $20$ 個樣本,序列剛好繞完 $k = 7$ 圈)。
手順 2. 既約分数で $k/N = 7/20$ だから、基本周期は $N = 20$(この系列は $20$ 標本ごとに $k = 7$ 回転する)。

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.

週期性複指數。對週期 $N$ 而言,諧波相關的複指數是 $e^{j2\pi k n / N}$,$k \in \mathbb{Z}$ —— 但其中只有 $N$ 個是相異的,因為 $k$ 與 $k+N$ 會給出完全相同的序列。正是這個「有限性」讓 DFS/DFT 得以成立。

周期的な複素指数。周期 $N$ に対し、調和的に関係づけられた複素指数は $e^{j2\pi k n / N}$、$k \in \mathbb{Z}$ である——ただし相異なるものは $N$ 個しかない。$k$ と $k+N$ が同一の系列を与えるからである。この有限性こそが DFS/DFT を可能にしている。

★ 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$ 的序列,對稱性是以 $N$ 取模來定義的:若 $x[n] = x^{*}[\langle -n\rangle_N]$,則 $x[n]$ 為週期共軛對稱,其中 $\langle m \rangle_N$ 表示 $m$ 對 $N$ 取模。§1.3.1 的分解可以直接沿用,只要把 $-n$ 換成 $\langle -n\rangle_N$ 即可。

★ 重要 — 周期系列の対称性。周期 $N$ の系列では、対称性は $N$ を法として定義される:$x[n] = x^{*}[\langle -n\rangle_N]$ が成り立つとき $x[n]$ は周期共役対称であるという。ここで $\langle m \rangle_N$ は $m$ の $N$ を法とした剰余を表す。1.3.1 節の分解は、$-n$ を $\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 aliasing1.3.5 弦波取樣與混疊1.3.5 正弦波の標本化とエイリアシング

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

以取樣率 $f_s = 1/T$ 對類比弦波 $x_a(t) = \cos(\Omega_0 t)$ 取樣:

アナログ正弦波 $x_a(t) = \cos(\Omega_0 t)$ をレート $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.

再結合離散頻率的 $2\pi$ 模糊性:類比頻率 $f_0$ 與 $f_0 + k f_s$($k$ 為任意整數),以及 $-f_0 + k f_s$,全都對應到同一組樣本序列。原本相異的類比弦波,取樣後變得無法區分 —— 這就是混疊(aliasing)。

これを離散周波数の $2\pi$ の不定性と組み合わせる:アナログ周波数 $f_0$ と $f_0 + k f_s$($k$ は任意の整数)、さらに $-f_0 + k f_s$ も、すべて同一の標本列に写る。相異なるアナログ正弦波が標本化後には区別できなくなる——これがエイリアシングである。

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.
圖 1-6 — 上:$\cos(0.25\pi n)$ 與 $\cos(2.25\pi n)$ 產生完全相同的樣本(相差 $2\pi$ 的頻率是同一個頻率),基本週期 $N=8$。下:1 Hz 與 9 Hz 的類比弦波在 $f_s = 8$ Hz 下取樣,會得到一模一樣的樣本值 —— 取樣之後,9 Hz 偽裝成了 1 Hz。
図 1-6 — 上:$\cos(0.25\pi n)$ と $\cos(2.25\pi n)$ はまったく同じ標本を与える($2\pi$ だけ離れた周波数は同一である)。基本周期は $N=8$。下:1 Hz と 9 Hz のアナログ正弦波を $f_s = 8$ 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$.

要避免頻率為 $f_0$ 的弦波發生混疊,需要 $f_s > 2 f_0$(必須嚴格大於—— 剛好以 $2f_0$ 取樣時,每個樣本都可能落在零交越點上)。等價地說,離散頻率必須滿足 $|\omega_0| < \pi$。完整的取樣定理留到後面的章節;在這裡你只需要記住對應關係 $\omega_0 = 2\pi f_0/f_s$,以及 $\omega$ 的 $2\pi$ 週期性。

周波数 $f_0$ の正弦波のエイリアシングを避けるには $f_s > 2 f_0$ が必要である(厳密な不等号であることに注意——ちょうど $2f_0$ で標本化すると、すべての標本がゼロ交差に当たってしまうことがある)。これは離散周波数が $|\omega_0| < \pi$ を満たすことと同値である。標本化定理の全体像は後の章で扱う。ここで必要なのは対応関係 $\omega_0 = 2\pi f_0/f_s$ と、$\omega$ の $2\pi$ 周期性だけである。

直觀解釋(點擊展開)
離散頻率 ω 只在 −π 到 π 之間有意義,因為 n 是整數,多轉整數圈(加 2π 的倍數)看起來完全一樣。 取樣就是把連續頻率 Ω「捲」到這個圓上:ω = ΩT。轉太快的弦波(f₀ > fs/2)會被捲到圓的另一邊, 偽裝成低頻訊號——就像電影裡車輪轉太快時,攝影機拍起來反而像慢轉或倒轉(車輪效應就是混疊)。 所以取樣前要用抗混疊濾波器把超過 fs/2 的成分先濾掉。

1.3.6 Energy, power, and boundedness1.3.6 能量、功率與有界性1.3.6 エネルギー・電力・有界性

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:

還有三類在討論穩定性時會不斷用到:

安定性の議論で絶えず用いられる、さらに 3 つのクラス:

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
類別條件為什麼重要
有界$|x[n]| \le B_x < \infty \;\; \forall n$BIBO 穩定性裡的那個「B」
絕對可和$\sum_{n=-\infty}^{\infty} |x[n]| < \infty$保證 DTFT 存在;也是 $h[n]$ 的 BIBO 判準
平方可和$\sum_{n=-\infty}^{\infty} |x[n]|^2 < \infty$能量有限
クラス条件なぜ重要か
有界$|x[n]| \le B_x < \infty \;\; \forall n$BIBO 安定性の「B」
絶対可和$\sum_{n=-\infty}^{\infty} |x[n]| < \infty$DTFT の存在を保証する。$h[n]$ に対する BIBO 判定条件
二乗可和$\sum_{n=-\infty}^{\infty} |x[n]|^2 < \infty$エネルギーが有限
★ 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).

絕對可和 $\Rightarrow$ 平方可和(能量有限),但反過來不成立:$x[n] = \frac{1}{n} u[n-1]$ 的 $\sum \frac{1}{n^2} = \frac{\pi^2}{6} < \infty$(能量有限),但 $\sum \frac{1}{n}$ 發散(不是絕對可和)。

絶対可和 $\Rightarrow$ 二乗可和(有限エネルギー)であるが、逆は成り立たない:$x[n] = \frac{1}{n} u[n-1]$ は $\sum \frac{1}{n^2} = \frac{\pi^2}{6} < \infty$(有限エネルギー)だが、$\sum \frac{1}{n}$ は発散する(絶対可和ではない)。

1.4 Chapter Summary1.4 本章總結1.4 本章のまとめ

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.

類比 $x(t)$:時間與振幅都連續。離散時間 $x[n]$:只在整數 $n$ 有定義。數位:兩者皆離散。DSP 鏈:A/D → 數位處理器 → D/A。

アナログ $x(t)$:時間も振幅も連続。離散時間 $x[n]$:整数 $n$ のみ。ディジタル:両方とも離散。DSP の処理系:A/D → ディジタルプロセッサ → 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]$.

$\delta[n]$、$u[n] = \sum_{m\le n}\delta[m]$、$\delta[n]=u[n]-u[n-1]$、指數序列 $A\alpha^n$、弦波 $A\cos(\omega_0 n + \phi)$,以及篩選恆等式 $x[n]=\sum_k x[k]\delta[n-k]$。

$\delta[n]$、$u[n] = \sum_{m\le n}\delta[m]$、$\delta[n]=u[n]-u[n-1]$、指数 $A\alpha^n$、正弦波 $A\cos(\omega_0 n + \phi)$、そしてふるい分けの恒等式 $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.

平移 $x[n-N]$、翻轉 $x[-n]$、倍乘 $Ax[n]$、調變 $x[n]w[n]$、降取樣 $x[nM]$、升取樣(插入 $L-1$ 個零)。複合運算一律用代入索引的方式計算。

シフト $x[n-N]$、反転 $x[-n]$、スカラー倍 $Ax[n]$、変調 $x[n]w[n]$、ダウンサンプリング $x[nM]$、アップサンプリング($L-1$ 個のゼロを挿入)。組み合わせはインデックスを代入して評価すること。

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.

$\cos(\omega_0 n)$ 為週期 $\iff \omega_0/2\pi = k/N$ 為有理數;化成最簡分數後的 $N$ 就是基本週期。$\omega_0$ 與 $\omega_0 + 2\pi r$ 是同一個頻率。

$\cos(\omega_0 n)$ が周期的 $\iff \omega_0/2\pi = k/N$ が有理数。既約分数から基本周期 $N$ が決まる。$\omega_0$ と $\omega_0 + 2\pi r$ は同じ周波数である。

Symmetry對稱性対称性

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

$x_{cs}[n] = \tfrac12(x[n]+x^{*}[-n])$、$x_{ca}[n] = \tfrac12(x[n]-x^{*}[-n])$;分解唯一,實數的情況就是偶部+奇部。

$x_{cs}[n] = \tfrac12(x[n]+x^{*}[-n])$、$x_{ca}[n] = \tfrac12(x[n]-x^{*}[-n])$。分割は一意であり、実数の場合は偶+奇となる。

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.

$E=\sum|x|^2$、$P=\lim \frac{1}{2K+1}\sum|x|^2$;能量訊號的 $P=0$,週期訊號則是功率訊號。取樣的對應為 $\omega_0 = 2\pi f_0/f_s$;$f_0$ 與 $f_0 + kf_s$ 互為別名。

$E=\sum|x|^2$、$P=\lim \frac{1}{2K+1}\sum|x|^2$。エネルギー信号は $P=0$、周期信号は電力信号である。標本化は $\omega_0 = 2\pi f_0/f_s$ の対応を与え、$f_0$ と $f_0 + kf_s$ はエイリアスとなる。

Exercises習題演習問題

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

ICE503 DSP 作業 #1 的三道題目,附完整解答。

ICE503 DSP 宿題 #1 の全 3 問を、完全な解答つきで掲載する。

Exercise 1 — System output, down-sampling, and up-sampling習題 1 — 系統輸出、降取樣與升取樣演習 1 — システムの出力、ダウンサンプリング、アップサンプリング

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]$.

(a) 畫出這個系統的方塊圖。
(b) 輸入 $x[n]$ 為 $x[-1]=1$、$x[0]=2$、$x[1]=1$、$x[2]=1$(其餘為零)。畫出並標示 $y[n]$。
(c) 承 (b),畫出並標示降取樣後的序列 $y[3n]$。
(d) 承 (b),畫出並標示升取樣後的序列 $y\!\left[\tfrac{1}{2}n\right]$。

(a) このシステムのブロック図を描け。
(b) 以下に示す入力 $x[n]$ は $x[-1]=1$、$x[0]=2$、$x[1]=1$、$x[2]=1$(それ以外は 0)である。$y[n]$ を図示し、値を記入せよ。
(c) (b) に続いて、ダウンサンプリングした系列 $y[3n]$ を図示し、値を記入せよ。
(d) (b) に続いて、アップサンプリングした系列 $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]$.

(a) 方塊圖。這個系統是一條分接延遲線(tapped delay line):五個單位延遲 $z^{-1}$ 串接,在 $x[n]$、$x[n-1]$、$x[n-2]$、$x[n-4]$、$x[n-5]$ 處分接,增益分別為 $3, 5, 4, 8, 1$,最後全部相加。注意第三個延遲之後沒有分接($x[n-3]$ 的係數為 0),但這個延遲器本身仍必須保留,才能接到 $x[n-4]$ 與 $x[n-5]$。

(a) ブロック図。このシステムはタップ付き遅延線である:単位遅延 $z^{-1}$ を 5 個縦続に並べ、$x[n], x[n-1], x[n-2], x[n-4], x[n-5]$ のタップにそれぞれ利得 $3, 5, 4, 8, 1$ を掛けて、すべてを加算する。3 番目の遅延の直後にはタップがないことに注意せよ($x[n-3]$ の係数は 0)。ただし $x[n-4]$ と $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]$.
圖 1-7 — $y[n] = 3x[n]+5x[n-1]+4x[n-2]+8x[n-4]+x[n-5]$ 的方塊圖(注意 $x[n-3]$ 的係數為 0,故該節點不接增益,但延遲器仍需保留)。
図 1-7 — $y[n] = 3x[n]+5x[n-1]+4x[n-2]+8x[n-4]+x[n-5]$ のブロック図。

(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$:

(b) 輸出 $y[n]$。這個系統是延遲輸入的加權和,所以把係數組 $\{3,5,4,0,8,1\}$(對應延遲 $0\ldots5$)沿著輸入滑動即可。代入 $x[-1]=1, x[0]=2, x[1]=1, x[2]=1$:

(b) 出力 $y[n]$。このシステムは遅延入力の重み付き和なので、係数の組 $\{3,5,4,0,8,1\}$(遅延 $0\ldots5$ に対応)を入力の上で滑らせればよい。$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

(c) 降取樣 $y[3n]$。每三個樣本保留一個:$y[3\cdot 0] = y[0] = 11$、$\; y[3\cdot 1] = y[3] = 17$、$\; y[3\cdot 2] = y[6] = 9$;當 $n \le -1$ 時 $y[3n] = y[-3], y[-6], \ldots = 0$,當 $n \ge 3$ 時 $y[9] = 0$。所以

(c) ダウンサンプリング $y[3n]$。$y$ の 3 標本ごとに 1 個を残す:$y[3\cdot 0] = y[0] = 11$、$\; y[3\cdot 1] = y[3] = 17$、$\; y[3\cdot 2] = y[6] = 9$。$n \le -1$ では $y[3n] = y[-3], y[-6], \ldots = 0$、$n \ge 3$ では $y[9] = 0$ である。したがって

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:

(d) 升取樣 $y[n/2]$。只有當 $n/2$ 為整數時才有定義;$n$ 為奇數時補 0:

(d) アップサンプリング $y[n/2]$。$n/2$ が整数のときだけ定義され、$n$ が奇数のときは 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$).

也就是把 $y$ 的樣本攤到偶數索引 $n = 2m$ 上,中間補零($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$)。

すなわち $y$ の標本が偶数インデックス $n = 2m$ に広がり、その間にゼロが入る($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]$.
圖 1-8 — 習題 1 的結果:輸入 $x[n]$、輸出 $y[n]$、降取樣的 $y[3n]$,以及升取樣的 $y[n/2]$(降取樣保留 $n=0,3,6$ 三點;升取樣把樣本攤到偶數索引、奇數索引補 0)。
図 1-8 — 演習 1 の結果:入力 $x[n]$、出力 $y[n]$、ダウンサンプリング $y[3n]$、アップサンプリング $y[n/2]$。
Exercise 2 — Periodicity of discrete-time signals習題 2 — 離散時間訊號的週期性演習 2 — 離散時間信号の周期性

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) $\omega_0 = \dfrac{\pi}{2}$,所以 $\dfrac{\omega_0}{2\pi} = \dfrac{1}{4} = \dfrac{k}{N}$ —— 是有理數,且已是最簡分數,$k=1$、$N=4$。

(a) $\omega_0 = \dfrac{\pi}{2}$ なので $\dfrac{\omega_0}{2\pi} = \dfrac{1}{4} = \dfrac{k}{N}$——有理数であり、すでに既約で $k=1$、$N=4$ である。

(a) Result(a) 結果(a) の結果 $$\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) 單看弦波因子 $\sin(\pi n/4)$,週期會是 8;但振幅因子 $n$ 會無限制地成長。假設 $x[n]$ 以某個 $N>0$ 為週期,看 $n = 2, 2+8, 2+16, \dots$ 這些索引,此處 $\sin(\pi n /4) = \sin(\pi/2 + 2\pi m) = 1$,於是 $x[2] = 2$、$x[10] = 10$、$x[18] = 18, \dots$ —— 數值持續變大,所以任何週期都不可能讓值重複出現。(等價的說法:週期序列必定有界,但 $|x[8m+2]| = 8m+2 \to \infty$。)

(b) 正弦波の因子 $\sin(\pi n/4)$ だけなら周期は 8 になるが、振幅の因子 $n$ が限りなく大きくなる。仮に $x[n]$ がある周期 $N>0$ で周期的だとしよう。$\sin(\pi n /4) = \sin(\pi/2 + 2\pi m) = 1$ となるインデックス $n = 2, 2+8, 2+16, \dots$ を見ると、$x[2] = 2$、$x[10] = 10$、$x[18] = 18, \dots$ と値が増え続けるので、どの周期をとっても値が繰り返すことはない。(同じことだが、周期系列は有界でなければならないのに $|x[8m+2]| = 8m+2 \to \infty$ である。)

(b) Result(b) 結果(b) の結果 $$\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) $\omega_0 = \dfrac{3\pi}{5}$,所以 $\dfrac{\omega_0}{2\pi} = \dfrac{3}{10} = \dfrac{k}{N}$ —— 是有理數,最簡分數為 $k = 3$、$N = 10$。這個序列每 $10$ 個樣本就在單位圓上繞完 $3$ 整圈。

(c) $\omega_0 = \dfrac{3\pi}{5}$ なので $\dfrac{\omega_0}{2\pi} = \dfrac{3}{10} = \dfrac{k}{N}$——有理数であり、既約形で $k = 3$、$N = 10$ である。この系列は $10$ 標本ごとに単位円を $3$ 周する。

(c) Result(c) 結果(c) の結果 $$\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.

面對任何 $\cos$、$\sin$ 或 $e^{j\omega_0 n}$:先算出 $\omega_0/2\pi$。無理數 → 非週期。有理數且化成最簡分數 $k/N$ → 基本週期為 $N$。只要有成長或衰減的包絡($n$、或 $|\alpha| \neq 1$ 的 $\alpha^n$)→ 不論弦波部分如何,都不是週期訊號。

$\cos$、$\sin$、$e^{j\omega_0 n}$ のいずれについても、まず $\omega_0/2\pi$ をつくる。無理数なら周期的でない。既約分数 $k/N$ が得られれば基本周期は $N$。増大または減衰する包絡($n$ や $|\alpha| \neq 1$ の $\alpha^n$)があれば、正弦波の部分にかかわらず周期的ではない。

Exercise 3 — MATLAB: complex exponential and conjugate symmetry習題 3 — MATLAB:複指數訊號與共軛對稱演習 3 — MATLAB:複素指数と共役対称性

Problem: MATLAB simulation:

題目:MATLAB 模擬:

問題:MATLAB によるシミュレーション:

(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.

(a) 產生複數訊號 $$x[n] = e^{\,j\frac{1}{10}\pi n}, \qquad n = -10, \dots, -1, 0, 1, \dots, 10.$$ (b) 用 stem 函數畫出 $x[n]$ 的實部與虛部。
(c) 判斷 $x[n]$ 是共軛對稱還是共軛反對稱序列,並說明理由。

(a) 次の複素数値信号を生成せよ $$x[n] = e^{\,j\frac{1}{10}\pi n}, \qquad n = -10, \dots, -1, 0, 1, \dots, 10.$$ (b) stem 関数を用いて $x[n]$ の実部と虚部を図示せよ。
(c) $x[n]$ が共役対称系列か共役反対称系列かを判定し、その理由を説明せよ。

Click to reveal solution點擊展開解答クリックして解答を表示

(a)–(b) MATLAB code.

(a)–(b) MATLAB 程式碼。

(a)–(b) MATLAB コード。

% 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.
圖 1-9 — 重現 MATLAB 模擬的結果:$\mathrm{Re}\{x[n]\} = \cos(\pi n/10)$ 是偶序列,$\mathrm{Im}\{x[n]\} = \sin(\pi n/10)$ 是奇序列 ⇒ 共軛對稱。
図 1-9 — MATLAB シミュレーションを再現した結果:$\mathrm{Re}\{x[n]\} = \cos(\pi n/10)$ は偶系列、$\mathrm{Im}\{x[n]\} = \sin(\pi n/10)$ は奇系列である。

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

(c) 共軛對稱。用定義 $x[n] \stackrel{?}{=} x^{*}[-n]$ 檢驗:

(c) 共役対称である。定義 $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.

因為對每個 $n$ 都有 $x[n] = x^{*}[-n]$,所以這個序列是共軛對稱,而不是共軛反對稱。用歐拉公式看也一樣:$x[n] = \cos(\pi n/10) + j\sin(\pi n /10)$,實部 $\cos(\pi n/10)$ 是 $n$ 的偶函數,虛部 $\sin(\pi n/10)$ 是 $n$ 的奇函數—— 這正是共軛對稱的條件(在圖 1-9 中看得很清楚)。再做一個一致性檢查:$x[0] = e^{0} = 1$ 是純實數,符合共軛對稱的要求($x[0] = x^{*}[0]$);若是共軛反對稱序列,則 $x[0]$ 必須是純虛數。

すべての $n$ について $x[n] = x^{*}[-n]$ が成り立つので、この系列は共役対称であり、共役反対称ではない。同じことをオイラーの公式で見ると $x[n] = \cos(\pi n/10) + j\sin(\pi n /10)$ であり、実部 $\cos(\pi n/10)$ は $n$ の偶関数、虚部 $\sin(\pi n/10)$ は $n$ の奇関数——まさに共役対称の要件そのものである(図 1-9 で確認できる)。さらに整合性の検算として、$x[0] = e^{0} = 1$ は純実数であり、共役対称が要求するとおりである($x[0] = x^{*}[0]$)。一方、共役反対称な系列であれば $x[0]$ は純虚数でなければならない。