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 個以上の独立変数(通常は時間)の関数である。音声波形、心電図波形、株価、地震記録、画像はいずれも信号である。信号処理とは、信号が担う有用な情報を抽出・強調・蓄積・伝送するために信号へ施す一連の操作を指す。たとえば雑音の除去、混ざり合った信号の分離、周波数の測定、データの圧縮などである。
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]$ として扱うという転換である。信号がいったん数の列になってしまえば、それを「処理する」とは数に対して算術を行うことにほかならない。そして算術こそ、計算機が完璧に、再現性をもって、かつプログラム可能な形で実行できるものである。
Three levels of "discreteness" must be distinguished:
必須區分三種層次的「離散」:
「離散性」には区別すべき三つの段階がある:
| Type | Time axis | Amplitude axis | Notation |
|---|---|---|---|
| Continuous-time = analog | continuous, all $t$ | continuous | $x(t)$, parentheses |
| Discrete-time | discrete instants, integer $n$ | continuous | $x[n]$, brackets |
| Digital | discrete | discrete (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.
離散時間訊號只在離散的時間索引上有值;數位訊號則在時間與振幅上都是離散的(每個樣本都被量化成有限的位元數)。做分析時,我們通常先處理理想的離散時間訊號,把量化另外討論。
離散時間信号は離散的な時間インデックスでのみ値をとる。ディジタル信号は時間と振幅の両方が離散である(各標本が有限ビット数に量子化されている)。解析では通常、理想的な離散時間信号を扱い、量子化は別個に取り扱う。
$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\,)$ は連続時間を表す。
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)$ を再構成する。
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 年代には、ディジタル信号処理がそれ自体で独立した一分野であると研究者に認識されるようになった。
| Advantages of digital | Disadvantages |
|---|---|
| Insensitive to component tolerances; fairly independent of temperature, aging, and other external parameters | Higher system complexity: needs pre/post-processing devices (A/D and D/A converters, anti-aliasing filters) |
| Easily reproduced — no per-unit adjustment or tuning | Power consumption of converters and processors |
| Amenable to full integration: a highly complex DSP system fits on a single VLSI chip | Limited range of frequencies available for processing (set by the achievable sampling rate) |
| Programmable and reconfigurable; exact repeatability; easy storage | Quantization and finite word-length effects introduce errors |
| 數位的優點 | 缺點 |
|---|---|
| 對元件公差不敏感;受溫度、老化與其他外部參數的影響很小 | 系統較複雜:需要前後端裝置(A/D 與 D/A 轉換器、抗混疊濾波器) |
| 容易複製 —— 不需要逐台調校 | 轉換器與處理器本身的功耗 |
| 適合完全積體化:再複雜的 DSP 系統也能做進單一顆 VLSI 晶片 | 可處理的頻率範圍有限(由能達到的取樣率決定) |
| 可程式、可重構;可完全重現;容易儲存 | 量化與有限字長效應會帶來誤差 |
| ディジタルの長所 | 短所 |
|---|---|
| 部品公差の影響を受けにくく、温度・経年変化などの外部パラメータにほとんど依存しない | システムの複雑さが増す:前処理・後処理の装置(A/D・D/A 変換器、アンチエイリアシングフィルタ)が必要になる |
| 複製が容易——個体ごとの調整やチューニングが要らない | 変換器とプロセッサの消費電力 |
| 完全な集積化に適する:非常に複雑な DSP システムでも 1 個の VLSI チップに収まる | 処理できる周波数範囲に限界がある(実現可能な標本化レートで決まる) |
| プログラム可能かつ再構成可能、厳密な再現性、保存が容易 | 量子化と有限語長の影響が誤差を生む |
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 の代償を払っている。
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$ である。実際に現れる系列の多くは、アナログ信号の一様標本化から得られる:
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$ を意味する。
All basic operations act sample by sample:
所有基本運算都是逐個樣本進行的:
基本的な演算はすべて標本ごとに作用する:
| Operation | Definition | Note |
|---|---|---|
| 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$ |
| Branching | one signal feeds several blocks | used 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 つの信号が複数のブロックへ入る | ブロック図で用いる |
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]$、… が入れ替わる(偶奇分解や相関のインデックス付けの基礎となる)。
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$ ごとに引数を計算し、対応する入力標本を読み取ればよい。
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]$ となってしまう。迷ったら「動かしてから縮める」といった言葉で考えるのではなく、必ずインデックスの値を代入して確かめること。
Sampling-rate alteration changes the time scale of a sequence.
改變取樣率,等於改變序列的時間尺度。
標本化レートの変更は、系列の時間スケールを変える。
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 の章)。
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$)が加わる。
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)}$。
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 はループ変数で上書きされている可能性がある。
For a real sequence:
對實數序列而言:
実系列について:
For a complex sequence the natural generalizations are:
對複數序列,自然的推廣是:
複素系列については、自然な一般化は次のようになる:
Every sequence can be decomposed uniquely into these two parts:
任何序列都可以唯一地拆成這兩部分:
どんな系列も、この 2 つの部分へ一意に分解できる:
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])$ である。
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 の章で実信号のスペクトルの対称性として再び現れる。
Two building blocks generate everything else.
有兩個基本元件可以生成其他一切。
2 つの構成要素から他のすべてが生成される。
They are related by a running sum and a first difference:
兩者之間的關係是「累加和」與「一階差分」:
両者は累和と階差によって結ばれている:
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 章で畳み込みを成り立たせるものである。
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}$ をとれば、複素指数系列が両者を一つにまとめる:
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 システムの固有関数であり、これから学ぶフーリエ解析すべての基礎である。
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$ と交互に変わる。
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$ のうち最小のものが基本周期である。連続時間の場合と違い、離散時間の正弦波は自動的に周期的になるとは限らない:
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$ は無理数)は決して周期的にならない。
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$ に置き換えればそのまま成り立つ。
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$ で標本化する:
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$ も、すべて同一の標本列に写る。相異なるアナログ正弦波が標本化後には区別できなくなる——これがエイリアシングである。
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$ 周期性だけである。
Three more classes used constantly in stability arguments:
還有三類在討論穩定性時會不斷用到:
安定性の議論で絶えず用いられる、さらに 3 つのクラス:
| Class | Condition | Why 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$ | エネルギーが有限 |
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}$ は発散する(絶対可和ではない)。
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。
$\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]$。
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$ 個のゼロを挿入)。組み合わせはインデックスを代入して評価すること。
$\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$ は同じ周波数である。
$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])$。分割は一意であり、実数の場合は偶+奇となる。
$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$ はエイリアスとなる。
All three problems of ICE503 DSP Homework #1, with full worked solutions.
ICE503 DSP 作業 #1 的三道題目,附完整解答。
ICE503 DSP 宿題 #1 の全 3 問を、完全な解答つきで掲載する。
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]$ を図示し、値を記入せよ。
(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]$ に到達するために、遅延素子そのものは必要である。
(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$ とすると:
(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$ である。したがって
(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 となる:
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$)。
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}$
(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$ である。
(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$ である。)
(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$ 周する。
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$)があれば、正弦波の部分にかかわらず周期的ではない。
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]$ が共役対称系列か共役反対称系列かを判定し、その理由を説明せよ。
(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
(c) Conjugate symmetric. Test the definition $x[n] \stackrel{?}{=} x^{*}[-n]$:
(c) 共軛對稱。用定義 $x[n] \stackrel{?}{=} x^{*}[-n]$ 檢驗:
(c) 共役対称である。定義 $x[n] \stackrel{?}{=} 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]$ は純虚数でなければならない。