訊號與系統 – 使用拉普拉斯變換求解微分方程
拉普拉斯變換
拉普拉斯變換是一種數學工具,用於將時域中的微分方程轉換為頻域或s域中的代數方程。
數學上,如果$\mathit{x}\mathrm{\left(\mathit{t}\right)}$是時域函式,則其拉普拉斯變換定義為:
$$\mathrm{\mathit{L}\mathrm{\left[\mathit{x}\mathrm{\left(\mathit{t}\right)}\right]}\:\mathrm{=}\:\mathit{X}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\:\int_{-\infty }^{\infty }\mathit{x}\mathrm{\left(\mathit{t}\right)}\mathit{e^{-\mathit{st}}\:\mathit{dt}}}$$
使用拉普拉斯變換求解微分方程
線性時不變 (LTI) 系統由常係數微分方程描述,這些方程將系統的輸入和輸出聯絡起來。LTI 系統的響應是透過求解這些微分方程得到的。
拉普拉斯變換技術可用於求解描述 LTI 系統的微分方程。使用拉普拉斯變換,時域中的微分方程被轉換為s域中的代數方程。透過操作代數方程,在s域中獲得解。然後透過對響應進行拉普拉斯反變換,將其轉換回時域。
解釋
考慮一個輸入為$\mathit{x}\mathrm{\left(\mathit{t}\right)}$,輸出為$\mathit{y}\mathrm{\left(\mathit{t}\right)}$的 LTI 系統,並由以下微分方程描述:
$$\mathrm{\mathit{a_{n}}\frac{\mathrm{\mathit{d}} ^{\mathit{n}}}{\mathrm{\mathit{d}}\mathit{t}^{\mathit{n}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathit{a_{n-\mathrm{1}}}\frac{\mathrm{\mathit{d}} ^{\mathit{n-\mathrm{1}}}}{\mathrm{\mathit{d}}t^{\mathit{n-\mathrm{1}}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:...\:\mathrm{+}\mathit{a_{\mathrm{0}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{=}\:\mathit{b_{m}}\frac{\mathrm{\mathit{d}} ^{\mathit{m}}}{\mathrm{\mathit{d}}\mathit{t}^{\mathit{m}}}\mathit{x}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathit{b_{m-\mathrm{1}}}\frac{\mathrm{\mathit{d}} ^{\mathit{m-\mathrm{1}}}}{\mathrm{\mathit{d}}t^{\mathit{m-\mathrm{1}}}}\mathit{x}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:...\:\mathrm{+}\mathit{b_{\mathrm{0}}}\:\mathit{x}\mathrm{\left(\mathit{t}\right)}\:\:\:\:\:\:...(1)}$$
當系統的初始條件為零時,即
$$\mathrm{\mathit{y}\mathrm{\left(\mathrm{\mathrm{0}^{-}}\right)}\:\mathrm{=}\:\frac{\mathrm{\mathit{d}\mathit{y}\mathrm{\left(\mathrm{0}^{-}\right)}} }{\mathrm{\mathit{d}} \mathit{t}}\:\mathrm{=}\frac{\mathrm{\mathit{d}^{\mathrm{2}}\mathit{y}\mathrm{\left(\mathrm{0}^{-}\right)}} }{\mathrm{\mathit{d}} \mathit{t}^{\mathrm{2}}}\:...\:\mathrm{=}\:\frac{\mathit{d^{\mathrm{\left ( \mathit{n-\mathrm{1}}\right)}}\mathit{y}\mathrm{\left(\mathrm{0}^{-}\right)}}}{\mathit{dt^{\mathrm{\left(\mathit{n-\mathrm{1}}\right )}}}}\:\mathrm{=}\:\mathrm{0}}$$
以及
$$\mathrm{\mathit{x}\mathrm{\left(\mathrm{\mathrm{0}^{-}}\right)}\:\mathrm{=}\:\frac{\mathrm{\mathit{d}\mathit{x}\mathrm{\left(\mathrm{0}^{-}\right)}} }{\mathrm{\mathit{d}} \mathit{t}}\:\mathrm{=}\frac{\mathrm{\mathit{d}^{\mathrm{2}}\mathit{x}\mathrm{\left(\mathrm{0}^{-}\right)}} }{\mathrm{\mathit{d}} \mathit{t}^{\mathrm{2}}}\:...\:\mathrm{=}\:\frac{\mathit{d^{\mathrm{\left ( \mathit{m-\mathrm{1}}\right)}}\mathit{x}\mathrm{\left(\mathrm{0}^{-}\right)}}}{\mathit{dt^{\mathrm{\left(\mathit{m-\mathrm{1}}\right )}}}}\:\mathrm{=}\:\mathrm{0}}$$
現在對式 (1) 中給出的微分方程的兩邊應用拉普拉斯變換,並忽略初始條件,我們得到:
$$\mathrm{\mathit{L}\mathrm{\left[\mathit{a_{n}}\frac{\mathrm{\mathit{d}} ^{\mathit{n}}}{\mathrm{\mathit{d}}\mathit{t}^{\mathit{n}}}\mathit{y}\mathrm{\left(\mathit{t}\right)} \right]}\:\mathrm{+}\:\mathit{L}\mathrm{\left[\mathit{a_{n-\mathrm{1}}}\frac{\mathrm{\mathit{d}} ^{\mathit{n-\mathrm{1}}}}{\mathrm{\mathit{d}}t^{\mathit{n-\mathrm{1}}}}\mathit{y}\mathrm{\left(\mathit{t}\right)} \right]}\:\mathrm{+}\:...\mathit{L}\mathrm{\left[ \mathit{a_{\mathrm{0}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\right]}\:\mathrm{=}\:\mathit{L}\mathrm{\left[ \mathit{b_{m}}\frac{\mathrm{\mathit{d}} ^{\mathit{m}}}{\mathrm{\mathit{d}}\mathit{t}^{\mathit{m}}}\mathit{x}\mathrm{\left(\mathit{t}\right)}\right]}\:\mathrm{+}\:\mathit{L}\mathrm{\left[\mathit{b_{m-\mathrm{1}}}\frac{\mathrm{\mathit{d}} ^{\mathit{m-\mathrm{1}}}}{\mathrm{\mathit{d}}t^{\mathit{m-\mathrm{1}}}}\mathit{x}\mathrm{\left(\mathit{t}\right)} \right]}\:\mathrm{+}\:...\mathit{L}\mathrm{\left[\mathit{b_{\mathrm{0}}}\:\mathit{x}\mathrm{\left(\mathit{t}\right)}\right]}}$$
$$\mathrm{\Rightarrow \mathit{a_{n}}\mathit{s^{n}}\mathit{Y}\mathrm{\left(\mathit{s}\right)}\:\mathrm{+}\:\mathit{a_{n-\mathrm{1}}}\mathit{s^{n-\mathrm{1}}}\mathit{Y}\mathrm{\left(\mathit{s}\right)}\:\mathit{+}\:...\mathrm{+}\mathit{a_{\mathrm{0}}\mathit{Y}\mathrm{\left(\mathit{s}\right)}}\:\mathrm{=}\:\mathit{b_{m}}\mathit{s^{m}}\mathit{X}\mathrm{\left(\mathit{s}\right)}\:\mathrm{+}\:\mathit{b_{m-\mathrm{1}}}\mathit{s^{m-\mathrm{1}}}\mathit{X}\mathrm{\left(\mathit{s}\right)}\:\mathrm{+}\:...\:\mathrm{+}\:\mathit{b_{\mathrm{0}}\mathit{X}\mathrm{\left(\mathit{s}\right)}}}$$
$$\mathrm{\Rightarrow \mathrm{\left(\mathit{a_{n}}\mathit{s^{n}}\:\mathrm{+}\:\mathit{a_{n-\mathrm{1}}}\mathit{s^{n-\mathrm{1}}}\:\mathrm{+}\:...\:\mathrm{+}\:\mathit{a}_{\mathrm{0}} \right)}\mathit{Y}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\:\mathrm{\left(\mathit{b_{m}}\mathit{s^{m}}\:\mathrm{+}\:\mathit{b_{m-\mathrm{1}}}\mathit{s^{m-\mathrm{1}}}\:\mathrm{+}\:...\:\mathrm{+}\:\mathit{b}_{\mathrm{0}} \right)}\mathit{X}\mathrm{\left(\mathit{s}\right)}}$$
$$\mathrm{\Rightarrow \frac{\mathit{\mathit{Y}\mathrm{\left(\mathit{s}\right)}}}{\mathit{X}\mathrm{\left(\mathit{s}\right)}}\:\mathrm{=}\:\frac{\mathrm{\left( \mathit{b_{m}}\mathit{s^{m}}\:\mathrm{+}\:\mathit{b_{m-\mathrm{1}}}\mathit{s^{m-\mathrm{1}}}\:\mathrm{+}\:...\:\mathrm{+}\:\mathit{b}_{\mathrm{0}}\right )}}{\mathrm{\left ( \mathit{a_{n}}\mathit{s^{n}}\:\mathrm{+}\:\mathit{a_{n-\mathrm{1}}}\mathit{s^{n-\mathrm{1}}}\:\mathrm{+}\:...\:\mathrm{+}\:\mathit{a}_{\mathrm{0}} \right )}}\:\:\:\:\:\:...(2)}$$
方程 (2) 稱為 LTI 系統的**傳遞函式**。因此,LTI 系統的傳遞函式定義為輸出 [Y(s)] 的拉普拉斯變換與輸入 [X(s)] 的拉普拉斯變換之比,且初始條件為零。
LTI 系統的傳遞函式也可以定義為系統脈衝響應的拉普拉斯變換,即
$$\mathrm{\mathit{H}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\:\frac{\mathit{\mathit{Y}\mathrm{\left(\mathit{s}\right)}}}{\mathit{X}\mathrm{\left(\mathit{s}\right)}}\:\:\:\:\:\:...(3)}$$
函式 H(s) 僅取決於描述系統的微分方程的係數,它不取決於輸入訊號或系統儲存的初始能量。
由於系統在s域中的響應由下式給出:
$$\mathrm{\mathrm{Response\:,}\mathit{Y}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\:\mathit{H}\mathrm{\left(\mathit{s}\right)}\mathit{X}\mathrm{\left(\mathit{s}\right)}\:\:\:\:\:\:...(4)}$$
對式 (4) 進行拉普拉斯反變換,我們得到:
$$\mathrm{\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{=}\:\mathit{L}^{-\mathrm{1}}\mathrm{\left[\mathit{H}\mathrm{\left(\mathit{s}\right)}\mathit{X}\mathrm{\left(\mathit{s}\right)}\right]}\:\:\:\:\:\:...(5)}$$
方程 (5) 稱為系統的**零狀態響應**。
現在,如果脈衝函式是系統的輸入,即 $\mathit{x}\mathrm{\left(\mathit{t}\right)}\:\mathrm{=}\:\mathit{\delta \mathrm{\left(\mathit{t}\right)}}$,則 $\mathit{X}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\mathrm{1}$。因此,式 (5) 可以寫成
$$\mathrm{\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{=}\:\mathit{L}^{-\mathrm{1}}\mathrm{\left[\mathit{H}\mathrm{\left(\mathit{s}\right)}\right]}\:\mathrm{=}\:\mathit{h}\mathrm{\left(\mathit{t}\right)}\:\:\:\:\:\:...(6)}$$
方程 (6) 稱為系統的**脈衝響應**。
數值示例
求由以下微分方程描述的系統的傳遞函式:
$$\mathrm{\frac{\mathrm{\mathit{d}} ^{\mathrm{2}}}{\mathrm{\mathit{dt}}^{\mathrm{2}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{5}\frac{\mathrm{\mathit{d}} }{\mathrm{\mathit{dt}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{10}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{=}\:\mathrm{3}\frac{\mathrm{\mathit{d}} }{\mathrm{\mathit{dt}}}\mathit{x}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{8}\mathit{x}\mathrm{\left(\mathit{t}\right)}}$$
解答
給定的微分方程為:
$$\mathrm{\frac{\mathrm{\mathit{d}} ^{\mathrm{2}}}{\mathrm{\mathit{dt}}^{\mathrm{2}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{5}\frac{\mathrm{\mathit{d}} }{\mathrm{\mathit{dt}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{10}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{=}\:\mathrm{3}\frac{\mathrm{\mathit{d}} }{\mathrm{\mathit{dt}}}\mathit{x}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{8}\mathit{x}\mathrm{\left(\mathit{t}\right)}}$$
忽略初始條件,並在方程兩側進行拉普拉斯反變換,我們得到:
$$\mathrm{\mathit{L}\mathrm{\left[\frac{\mathrm{\mathit{d}} ^{\mathrm{2}}}{\mathrm{\mathit{dt}}^{\mathrm{2}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{5}\frac{\mathrm{\mathit{d}} }{\mathrm{\mathit{dt}}}\mathit{y}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{10}\mathit{y}\mathrm{\left(\mathit{t}\right)} \right]}\:\mathrm{=}\:\mathit{L}\mathrm{\left[\mathrm{3}\frac{\mathrm{\mathit{d}} }{\mathrm{\mathit{dt}}}\mathit{x}\mathrm{\left(\mathit{t}\right)}\:\mathrm{+}\:\mathrm{8}\mathit{x}\mathrm{\left(\mathit{t}\right)} \right ]}}$$
$$\mathrm{\Rightarrow \mathit{s}^{\mathrm{2}}\mathit{Y}\mathrm{\left(\mathit{s}\right)}\:\mathrm{+}\:\mathrm{5}\mathit{s}\mathit{Y}\mathrm{\left(\mathit{s}\right)}\:\mathrm{+}\:\mathrm{10}\mathit{Y}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\:\mathrm{3}\mathit{s}\mathit{X}\mathrm{\left(\mathit{s}\right)}\:\mathrm{+}\:\mathrm{8}\mathit{X}\mathrm{\left(\mathit{s}\right)}}$$
$$\mathrm{\Rightarrow \mathrm{\left( \mathit{s^{\mathrm{2}}\:\mathrm{+}\:\mathrm{5}\mathit{s}\:\mathrm{+}\:\mathrm{10}}\right)}\mathit{Y}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\:\mathrm{\left( \mathrm{3}\mathit{s}\:\mathrm{+}\:\mathrm{8}\right)}\mathit{X}\mathrm{\left(\mathit{s}\right)}}$$
因此,系統的傳遞函式為:
$$\mathrm{\mathit{H}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\:\frac{\mathit{\mathit{Y}\mathrm{\left(\mathit{s}\right)}}}{\mathit{X}\mathrm{\left(\mathit{s}\right)}}\:\mathrm{=}\:\mathrm{\left( \frac{\mathrm{3}\mathit{s}\:\mathrm{+}\:\mathrm{8}}{\mathit{s^{\mathrm{2}}\:\mathrm{+}\:\mathrm{5}\mathit{s}\:\mathrm{+}\:\mathrm{10}}} \right )}}$$