Skip to content

Split View: 공업수학 완전 정복 3편: 복소해석학과 Z-변환 - 제어/신호처리의 핵심

|

공업수학 완전 정복 3편: 복소해석학과 Z-변환 - 제어/신호처리의 핵심

공업수학 완전 정복 3편: 복소해석학과 Z-변환

전자/제어 공학에서 복소수는 단순한 수학적 추상이 아닙니다. 교류 회로 분석의 페이저(phasor), 라플라스 변환의 s=σ+jωs = \sigma + j\omega, Z-변환의 단위원, 보드 선도의 복소 주파수 응답 — 이 모든 것이 복소해석학에 뿌리를 두고 있습니다. 이번 글에서는 복소수 체계부터 유수 정리, Z-변환과 디지털 필터 설계까지 완전히 정복합니다.


1. 복소수 체계 완전 정복

1.1 복소수의 표현

직교형(Rectangular Form): z=x+iy=x+jyz = x + iy = x + jy

(전기공학에서는 ii 대신 jj를 사용합니다. ii는 전류를 나타내기 때문)

  • 실부: Re(z)=x\text{Re}(z) = x
  • 허부: Im(z)=y\text{Im}(z) = y

극형(Polar Form): z=reiθ=r(cosθ+isinθ)=rθz = r e^{i\theta} = r(\cos\theta + i\sin\theta) = r\angle\theta

  • 절댓값(크기): r=z=x2+y2r = |z| = \sqrt{x^2 + y^2}
  • 편각(위상): θ=arg(z)=arctan(y/x)\theta = \arg(z) = \arctan(y/x) (사분면 고려)

오일러 공식(Euler's Formula): eiθ=cosθ+isinθe^{i\theta} = \cos\theta + i\sin\theta

이로부터: cosθ=eiθ+eiθ2,sinθ=eiθeiθ2i\cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2}, \quad \sin\theta = \frac{e^{i\theta} - e^{-i\theta}}{2i}

수학 역사상 가장 아름다운 공식으로 꼽히는 오일러 항등식: eiπ+1=0e^{i\pi} + 1 = 0

다섯 가지 가장 중요한 수(ee, ii, π\pi, 11, 00)가 하나의 식에 연결됩니다.

드 무아브르 공식(De Moivre's Formula): (reiθ)n=rneinθ=rn(cosnθ+isinnθ)(r e^{i\theta})^n = r^n e^{in\theta} = r^n(\cos n\theta + i\sin n\theta)

n제곱근: z1/n=r1/nei(θ+2kπ)/nz^{1/n} = r^{1/n} e^{i(\theta + 2k\pi)/n}, k=0,1,,n1k = 0, 1, \ldots, n-1

단위원 위의 nn등분점을 나타냅니다. (1의 n제곱근: WNk=ej2πk/NW_N^k = e^{j2\pi k/N} - FFT에서 등장!)

1.2 복소수 연산

덧셈/뺄셈 (직교형이 편리): (x1+iy1)±(x2+iy2)=(x1±x2)+i(y1±y2)(x_1 + iy_1) \pm (x_2 + iy_2) = (x_1 \pm x_2) + i(y_1 \pm y_2)

곱셈 (극형이 편리): (r1eiθ1)(r2eiθ2)=r1r2ei(θ1+θ2)(r_1 e^{i\theta_1})(r_2 e^{i\theta_2}) = r_1 r_2 e^{i(\theta_1 + \theta_2)}

크기는 곱, 위상은 합 — 전기공학에서 임피던스 곱셈의 기반입니다.

나눗셈: r1eiθ1r2eiθ2=r1r2ei(θ1θ2)\frac{r_1 e^{i\theta_1}}{r_2 e^{i\theta_2}} = \frac{r_1}{r_2} e^{i(\theta_1 - \theta_2)}

켤레복소수(Complex Conjugate): zˉ=xiy=reiθ\bar{z} = x - iy = r e^{-i\theta}

유용한 성질:

  • zzˉ=x2+y2=z2z\bar{z} = x^2 + y^2 = |z|^2
  • Re(z)=(z+zˉ)/2\text{Re}(z) = (z + \bar{z})/2
  • Im(z)=(zzˉ)/(2i)\text{Im}(z) = (z - \bar{z})/(2i)
  • zˉ=z|\bar{z}| = |z|, arg(zˉ)=arg(z)\arg(\bar{z}) = -\arg(z)

1.3 공학 응용: 페이저 해석

교류 회로 분석에서 복소수의 위력이 발휘됩니다.

v(t)=Vmcos(ωt+ϕ)v(t) = V_m\cos(\omega t + \phi)를 페이저로 표현: V=Vmejϕ=Vmϕ\mathbf{V} = V_m e^{j\phi} = V_m\angle\phi

임피던스(Impedance):

ZR=R(순저항, 위상차 없음)Z_R = R \quad (\text{순저항, 위상차 없음}) ZL=jωL(인덕터, +90도 위상 진행)Z_L = j\omega L \quad (\text{인덕터, +90도 위상 진행}) ZC=1jωC=jωC(캐패시터, -90도 위상 지연)Z_C = \frac{1}{j\omega C} = \frac{-j}{\omega C} \quad (\text{캐패시터, -90도 위상 지연})

직렬 RLC 임피던스: Z=R+jωL+1jωC=R+j(ωL1ωC)Z = R + j\omega L + \frac{1}{j\omega C} = R + j\left(\omega L - \frac{1}{\omega C}\right)

크기: Z=R2+(ωL1/(ωC))2|Z| = \sqrt{R^2 + (\omega L - 1/(\omega C))^2}

위상: ϕ=arctan ⁣(ωL1/(ωC)R)\phi = \arctan\!\left(\frac{\omega L - 1/(\omega C)}{R}\right)

공진 조건: ω0L=1/(ω0C)\omega_0 L = 1/(\omega_0 C)ω0=1/LC\omega_0 = 1/\sqrt{LC}, Z=RZ = R (순저항)

전달 함수(Transfer Function): H(jω)=Y(jω)X(jω)H(j\omega) = \frac{Y(j\omega)}{X(j\omega)}

이것이 라플라스 도메인에서 H(s)s=jωH(s)|_{s=j\omega}이며, 보드 선도의 기반입니다.


2. 복소함수와 해석 함수

2.1 복소함수

f(z)=f(x+iy)=u(x,y)+iv(x,y)f(z) = f(x + iy) = u(x, y) + iv(x, y)

여기서 u,vu, v는 실수 값 함수입니다.

예시: f(z)=z2=(x+iy)2=x2y2+i(2xy)f(z) = z^2 = (x+iy)^2 = x^2 - y^2 + i(2xy)

u(x,y)=x2y2,v(x,y)=2xyu(x,y) = x^2 - y^2, \quad v(x,y) = 2xy

f(z)=ez=ex+iy=ex(cosy+isiny)f(z) = e^z = e^{x+iy} = e^x(\cos y + i\sin y)

u(x,y)=excosy,v(x,y)=exsinyu(x,y) = e^x\cos y, \quad v(x,y) = e^x\sin y

2.2 복소 미분과 코시-리만 방정식

f(z)f(z)의 복소 미분: f(z0)=limΔz0f(z0+Δz)f(z0)Δzf'(z_0) = \lim_{\Delta z\to 0}\frac{f(z_0 + \Delta z) - f(z_0)}{\Delta z}

실수와 달리 Δz\Delta z가 복소 평면에서 어느 방향으로도 0에 접근할 수 있어야 극한값이 같아야 합니다.

x축 방향 (Δz=Δx\Delta z = \Delta x): f(z)=ux+ivxf'(z) = \frac{\partial u}{\partial x} + i\frac{\partial v}{\partial x}

y축 방향 (Δz=iΔy\Delta z = i\Delta y): f(z)=1iuy+vy=iuy+vyf'(z) = \frac{1}{i}\frac{\partial u}{\partial y} + \frac{\partial v}{\partial y} = -i\frac{\partial u}{\partial y} + \frac{\partial v}{\partial y}

두 표현이 같으려면:

ux=vy,uy=vx\boxed{\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \quad \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}}

이것이 **코시-리만 방정식(Cauchy-Riemann Equations)**입니다.

u,vu, v의 편미분이 연속이고 코시-리만 방정식을 만족하면 f(z)f(z)는 **해석 함수(Analytic Function)**입니다.

2.3 조화 함수

해석 함수의 실부와 허부는 각각 라플라스 방정식을 만족합니다:

2u=2ux2+2uy2=0\nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0

2v=2vx2+2vy2=0\nabla^2 v = \frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2} = 0

증명: 코시-리만에서 uxx=vyxu_{xx} = v_{yx}, uyy=vxyu_{yy} = -v_{xy}이므로 uxx+uyy=vyxvxy=0u_{xx} + u_{yy} = v_{yx} - v_{xy} = 0 (혼합 편미분의 순서 교환).

uu를 알면 코시-리만으로 vv를 구할 수 있습니다 (조화 켤레 함수).

공학적 의미: 포텐셜 흐름에서 속도 포텐셜과 유선 함수의 관계, 정전기학에서 전위와 전기력선의 관계.

2.4 중요한 해석 함수들

지수 함수 ez=ex(cosy+isiny)e^z = e^x(\cos y + i\sin y):

  • 전체 복소 평면에서 해석적
  • (ez)=ez(e^z)' = e^z
  • ez=ex|e^z| = e^x, arg(ez)=y\arg(e^z) = y

삼각 함수: cosz=eiz+eiz2,sinz=eizeiz2i\cos z = \frac{e^{iz} + e^{-iz}}{2}, \quad \sin z = \frac{e^{iz} - e^{-iz}}{2i}

  • cosz\cos z, sinz\sin z는 전체 복소 평면에서 해석적
  • 실수 삼각함수와 달리 크기가 무한대가 될 수 있음: cos(iy)=coshy|\cos(iy)| = \cosh y \to \infty

쌍곡 함수: coshz=ez+ez2,sinhz=ezez2\cosh z = \frac{e^z + e^{-z}}{2}, \quad \sinh z = \frac{e^z - e^{-z}}{2}

cos(iz)=coshz,sin(iz)=isinhz\cos(iz) = \cosh z, \quad \sin(iz) = i\sinh z

로그 함수 (다가 함수): lnz=lnr+i(θ+2kπ),kZ\ln z = \ln r + i(\theta + 2k\pi), \quad k \in \mathbb{Z}

주값(principal value): Lnz=lnr+iθ\text{Ln}\,z = \ln r + i\theta, π<θπ-\pi < \theta \leq \pi

z=0z = 0과 음의 실수축에서 특이성 발생 (가지 절단, branch cut).


3. 복소 적분

3.1 경로 적분 (Line Integral)

CC: 복소 평면의 곡선 (매개변수 z(t)=x(t)+iy(t)z(t) = x(t) + iy(t), atba \leq t \leq b)

Cf(z)dz=abf(z(t))z(t)dt\int_C f(z)\,dz = \int_a^b f(z(t))z'(t)\,dt

예시: Cz2dz\int_C z^2\,dz (CC: 원점에서 1+i1+i까지 직선)

매개변수화: z(t)=t+itz(t) = t + it, z(t)=1+iz'(t) = 1+i, 0t10 \leq t \leq 1

01(t+it)2(1+i)dt=01t2(2i)(1+i)dt=(2i)(1+i)13=2i+2i23=2+2i3\int_0^1 (t+it)^2(1+i)\,dt = \int_0^1 t^2(2i)(1+i)\,dt = (2i)(1+i)\cdot\frac{1}{3} = \frac{2i+2i^2}{3} = \frac{-2+2i}{3}

3.2 코시 적분 정리 (Cauchy's Integral Theorem)

Cf(z)dz=0\oint_C f(z)\,dz = 0

조건: f(z)f(z)가 단순 폐곡선 CC 위와 그 내부에서 해석적.

직관: 해석 함수는 경로에 무관하게 적분됩니다.

그린 정리와의 관계:

Cf(z)dz=C(u+iv)(dx+idy)=C(udxvdy)+iC(vdx+udy)\oint_C f(z)\,dz = \oint_C (u+iv)(dx+idy) = \oint_C (u\,dx - v\,dy) + i\oint_C (v\,dx + u\,dy)

그린 정리와 코시-리만 방정식을 적용하면 두 항 모두 0이 됩니다.

경로 독립성: 폐곡선 적분이 0 ↔ 적분이 경로에 무관

원시 함수(antiderivative): F(z)=f(z)F'(z) = f(z)이면 abf(z)dz=F(b)F(a)\int_a^b f(z)\,dz = F(b) - F(a)

3.3 코시 적분 공식 (Cauchy's Integral Formula)

f(a)=12πiCf(z)zadz\boxed{f(a) = \frac{1}{2\pi i}\oint_C \frac{f(z)}{z-a}\,dz}

조건: f(z)f(z)CC 위와 내부에서 해석적, aaCC 내부.

해석: f(z)/(za)f(z)/(z-a)z=az = a에서 극점을 가집니다. 코시 공식은 극점 주변의 적분이 함수값과 직접 연결됨을 보여줍니다.

고차 미분 공식: f(n)(a)=n!2πiCf(z)(za)n+1dzf^{(n)}(a) = \frac{n!}{2\pi i}\oint_C \frac{f(z)}{(z-a)^{n+1}}\,dz

이는 해석 함수가 무한히 미분 가능함을 보여줍니다!


4. 로랑 급수와 유수 정리

4.1 테일러 급수와 로랑 급수

테일러 급수: f(z)f(z)z=z0z = z_0 근방에서 해석적이면: f(z)=n=0an(zz0)n,an=f(n)(z0)n!f(z) = \sum_{n=0}^{\infty}a_n(z-z_0)^n, \quad a_n = \frac{f^{(n)}(z_0)}{n!}

로랑 급수(Laurent Series): f(z)f(z)가 고리 영역 r1<zz0<r2r_1 < |z - z_0| < r_2에서 해석적이면:

f(z)=n=an(zz0)n=n=0an(zz0)n+n=1bn(zz0)nf(z) = \sum_{n=-\infty}^{\infty}a_n(z-z_0)^n = \sum_{n=0}^{\infty}a_n(z-z_0)^n + \sum_{n=1}^{\infty}\frac{b_n}{(z-z_0)^n}

음의 거듭제곱 부분을 **주요부(principal part)**라고 합니다.

4.2 특이점 분류

f(z)f(z)z=z0z = z_0에서 해석적이지 않은 경우:

제거가능 특이점(Removable Singularity): 로랑 급수에 음의 거듭제곱 항이 없음.

sinzz=1z26+z4120(z=0은 제거가능)\frac{\sin z}{z} = 1 - \frac{z^2}{6} + \frac{z^4}{120} - \cdots \quad \text{(}z=0\text{은 제거가능)}

z=0z = 0에 함수값 1을 부여하면 해석적이 됩니다.

m극(Pole of Order m): 유한개의 음의 거듭제곱 항.

f(z)=1(zz0)m(해석 함수)(m극)f(z) = \frac{1}{(z-z_0)^m}(\text{해석 함수}) \quad \text{(m극)}

본질적 특이점(Essential Singularity): 무한히 많은 음의 거듭제곱 항.

e1/z=1+1z+12!z2+(z=0은 본질적 특이점)e^{1/z} = 1 + \frac{1}{z} + \frac{1}{2!z^2} + \cdots \quad \text{(}z=0\text{은 본질적 특이점)}

피카르 정리: 본질적 특이점 근방에서 함수값이 거의 모든 복소수를 취합니다.

4.3 유수(Residue)와 유수 정리

유수의 정의: f(z)f(z)의 로랑 급수에서 (zz0)1(z-z_0)^{-1} 항의 계수.

Res[f,z0]=b1=12πizz0=ϵf(z)dz\text{Res}[f, z_0] = b_1 = \frac{1}{2\pi i}\oint_{|z-z_0|=\epsilon} f(z)\,dz

유수 계산법:

단순극 (m=1m=1): Res[f,z0]=limzz0(zz0)f(z)\text{Res}[f, z_0] = \lim_{z\to z_0}(z - z_0)f(z)

유리함수 f=p/qf = p/q (단순극): Res[f,z0]=p(z0)q(z0)\text{Res}[f, z_0] = \frac{p(z_0)}{q'(z_0)}

m중극: Res[f,z0]=1(m1)!limzz0dm1dzm1[(zz0)mf(z)]\text{Res}[f, z_0] = \frac{1}{(m-1)!}\lim_{z\to z_0}\frac{d^{m-1}}{dz^{m-1}}\left[(z-z_0)^m f(z)\right]

유수 정리(Residue Theorem):

Cf(z)dz=2πikRes[f,zk]\oint_C f(z)\,dz = 2\pi i \sum_k \text{Res}[f, z_k]

zkz_kCC 내부의 모든 특이점.

4.4 유수 정리로 실수 적분 계산

복소 해석학의 가장 강력한 응용 중 하나: 어려운 실수 적분을 쉽게 계산합니다.

예제 1: I=dx1+x2\displaystyle I = \int_{-\infty}^{\infty}\frac{dx}{1+x^2}

f(z)=1/(1+z2)=1/[(z+i)(zi)]f(z) = 1/(1+z^2) = 1/[(z+i)(z-i)]

상반 평면에서 반원 경로를 사용합니다. z=iz = i가 상반 평면의 단순극:

Res[f,i]=limzizi(z+i)(zi)=12i\text{Res}[f, i] = \lim_{z\to i}\frac{z-i}{(z+i)(z-i)} = \frac{1}{2i}

반원 호의 기여는 RR \to \infty에서 0이 됩니다 (조르당 보조정리).

I=2πi12i=πI = 2\pi i \cdot \frac{1}{2i} = \pi

따라서 dx1+x2=π\displaystyle\int_{-\infty}^{\infty}\frac{dx}{1+x^2} = \pi (검증: arctan(x)=π\arctan(x)\Big|_{-\infty}^{\infty} = \pi)

예제 2: I=0cosxx2+a2dx(a>0)\displaystyle I = \int_0^{\infty}\frac{\cos x}{x^2+a^2}dx \quad (a > 0)

f(z)=eizz2+a2=eiz(z+ia)(zia)f(z) = \frac{e^{iz}}{z^2+a^2} = \frac{e^{iz}}{(z+ia)(z-ia)}

상반 평면의 극점: z=iaz = ia

Res[f,ia]=ei(ia)2ia=ea2ia\text{Res}[f, ia] = \frac{e^{i(ia)}}{2ia} = \frac{e^{-a}}{2ia}

eixx2+a2dx=2πiea2ia=πeaa\int_{-\infty}^{\infty}\frac{e^{ix}}{x^2+a^2}dx = 2\pi i \cdot \frac{e^{-a}}{2ia} = \frac{\pi e^{-a}}{a}

실부만 취하면: I=0cosxx2+a2dx=πea2aI = \int_0^{\infty}\frac{\cos x}{x^2+a^2}dx = \frac{\pi e^{-a}}{2a}

예제 3: 02πdθ2+cosθ\displaystyle\int_0^{2\pi}\frac{d\theta}{2+\cos\theta}

z=eiθz = e^{i\theta}, dz=izdθdz = iz\,d\theta, cosθ=(z+z1)/2\cos\theta = (z + z^{-1})/2:

02πdθ2+cosθ=z=1dz/iz2+(z+z1)/2=2dzi(z2+4z+1)\int_0^{2\pi}\frac{d\theta}{2+\cos\theta} = \oint_{|z|=1}\frac{dz/iz}{2+(z+z^{-1})/2} = \oint\frac{2\,dz}{i(z^2+4z+1)}

극점: z=2±3z = -2 \pm \sqrt{3}. 단위원 내부: z1=2+3z_1 = -2 + \sqrt{3}

=2πi2i2(z1z2)=2π3= 2\pi i \cdot \frac{2}{i \cdot 2(z_1 - z_2)} = \frac{2\pi}{\sqrt{3}}

4.5 역 라플라스 변환에의 응용

브로미치 적분(Bromwich Integral):

f(t)=12πiσiσ+iF(s)estdsf(t) = \frac{1}{2\pi i}\int_{\sigma-i\infty}^{\sigma+i\infty}F(s)e^{st}\,ds

이는 ss 평면에서 수직선을 따른 경로 적분으로, 왼쪽의 모든 극점을 포함하는 반원으로 경로를 닫으면 유수 정리 적용이 가능합니다:

f(t)=kRes[F(s)est,sk]f(t) = \sum_k \text{Res}\left[F(s)e^{st}, s_k\right]

예시: F(s)=1/(s2+ω2)F(s) = 1/(s^2+\omega^2)의 역 라플라스 변환

극점: s=±iωs = \pm i\omega

Res[ests2+ω2,iω]=eiωt2iω\text{Res}\left[\frac{e^{st}}{s^2+\omega^2}, i\omega\right] = \frac{e^{i\omega t}}{2i\omega}

Res[ests2+ω2,iω]=eiωt2iω\text{Res}\left[\frac{e^{st}}{s^2+\omega^2}, -i\omega\right] = \frac{e^{-i\omega t}}{-2i\omega}

f(t)=eiωteiωt2iω=sinωtωf(t) = \frac{e^{i\omega t} - e^{-i\omega t}}{2i\omega} = \frac{\sin\omega t}{\omega}

확인: L{sinωt/ω}=1/(s2+ω2)\mathcal{L}\{\sin\omega t/\omega\} = 1/(s^2+\omega^2)


5. Z-변환

5.1 정의와 수렴 영역

이산 시간 신호 x[n]x[n]의 Z-변환:

X(z)=Z{x[n]}=n=x[n]znX(z) = \mathcal{Z}\{x[n]\} = \sum_{n=-\infty}^{\infty}x[n]z^{-n}

z=rejΩz = re^{j\Omega}는 복소 변수. 수렴 조건: x[n]zn<\sum|x[n]||z|^{-n} < \infty

수렴 영역(ROC, Region of Convergence):

  • 단측 인과 신호: z>rmax|z| > r_{\max} (극점의 밖)
  • 단측 반인과 신호: z<rmin|z| < r_{\min} (극점의 안)
  • 양측 신호: 고리 영역 r1<z<r2r_1 < |z| < r_2

5.2 주요 Z-변환 쌍

단위 임펄스: x[n]=δ[n]X(z)=1,모든 zx[n] = \delta[n] \Rightarrow X(z) = 1, \quad \text{모든 } z

단위 계단: x[n]=u[n]X(z)=zz1=11z1,z>1x[n] = u[n] \Rightarrow X(z) = \frac{z}{z-1} = \frac{1}{1-z^{-1}}, \quad |z| > 1

지수 신호: x[n]=anu[n]X(z)=zza=11az1,z>ax[n] = a^n u[n] \Rightarrow X(z) = \frac{z}{z-a} = \frac{1}{1-az^{-1}}, \quad |z| > |a|

정현파: x[n]=cosΩ0nu[n]X(z)=z(zcosΩ0)z22zcosΩ0+1,z>1x[n] = \cos\Omega_0 n \cdot u[n] \Rightarrow X(z) = \frac{z(z-\cos\Omega_0)}{z^2 - 2z\cos\Omega_0 + 1}, \quad |z| > 1

x[n]=sinΩ0nu[n]X(z)=zsinΩ0z22zcosΩ0+1,z>1x[n] = \sin\Omega_0 n \cdot u[n] \Rightarrow X(z) = \frac{z\sin\Omega_0}{z^2 - 2z\cos\Omega_0 + 1}, \quad |z| > 1

단위 램프: x[n]=nu[n]X(z)=z(z1)2,z>1x[n] = nu[n] \Rightarrow X(z) = \frac{z}{(z-1)^2}, \quad |z| > 1

5.3 Z-변환의 성질

선형성: Z{ax[n]+by[n]}=aX(z)+bY(z)\mathcal{Z}\{ax[n] + by[n]\} = aX(z) + bY(z)

시간 이동: Z{x[nk]}=zkX(z)\mathcal{Z}\{x[n-k]\} = z^{-k}X(z)

z1z^{-1}이 단위 지연 연산자입니다. 차분 방정식을 대수 방정식으로!

z 스케일링 (주파수 이동): Z{anx[n]}=X(z/a)\mathcal{Z}\{a^n x[n]\} = X(z/a)

시간 반전: Z{x[n]}=X(z1)\mathcal{Z}\{x[-n]\} = X(z^{-1})

합성곱(Z-변환의 핵심): Z{x[n]h[n]}=X(z)H(z)\mathcal{Z}\{x[n]*h[n]\} = X(z)H(z)

LTI 시스템 분석의 핵심: 합성곱이 곱셈으로!

초기값 정리: x[0]=limzX(z)x[0] = \lim_{z\to\infty} X(z)

최종값 정리: limnx[n]=limz1(z1)X(z)\lim_{n\to\infty} x[n] = \lim_{z\to 1}(z-1)X(z)

5.4 역 Z-변환

부분 분수법:

X(z)=B(z)A(z)=kAkzzpkX(z) = \frac{B(z)}{A(z)} = \sum_k \frac{A_k z}{z - p_k}

pkp_k는 극점, Ak=[(zpk)X(z)/z]z=pkA_k = [(z-p_k)X(z)/z]_{z=p_k}

예제: X(z)=z2(z1)(z0.5)X(z) = \frac{z^2}{(z-1)(z-0.5)}

X(z)z=z(z1)(z0.5)=Az1+Bz0.5\frac{X(z)}{z} = \frac{z}{(z-1)(z-0.5)} = \frac{A}{z-1} + \frac{B}{z-0.5}

A=zz0.5z=1=2,B=zz1z=0.5=1A = \left.\frac{z}{z-0.5}\right|_{z=1} = 2, \quad B = \left.\frac{z}{z-1}\right|_{z=0.5} = -1

X(z)=2zz1zz0.5X(z) = \frac{2z}{z-1} - \frac{z}{z-0.5}

x[n]=2u[n](0.5)nu[n]=[2(0.5)n]u[n]x[n] = 2u[n] - (0.5)^n u[n] = [2 - (0.5)^n]u[n]

멱급수 전개법 (장제법):

X(z)=x[0]+x[1]z1+x[2]z2+X(z) = x[0] + x[1]z^{-1} + x[2]z^{-2} + \cdots

X(z)X(z)z1z^{-1}의 멱급수로 전개하면 직접 x[n]x[n]을 읽을 수 있습니다.

5.5 Z-변환으로 차분 방정식 풀기

예제: y[n]0.5y[n1]=x[n]y[n] - 0.5y[n-1] = x[n], 초기 정지 상태, x[n]=u[n]x[n] = u[n]

Z-변환 적용 (초기조건 0): Y(z)0.5z1Y(z)=X(z)=zz1Y(z) - 0.5z^{-1}Y(z) = X(z) = \frac{z}{z-1}

Y(z)(10.5z1)=zz1Y(z)(1 - 0.5z^{-1}) = \frac{z}{z-1}

Y(z)=z/(z1)10.5z1=z2(z1)(z0.5)Y(z) = \frac{z/(z-1)}{1 - 0.5z^{-1}} = \frac{z^2}{(z-1)(z-0.5)}

부분 분수로 역변환 (위 예제와 동일): y[n]=2u[n](0.5)nu[n]=[2(0.5)n]u[n]y[n] = 2u[n] - (0.5)^n u[n] = [2 - (0.5)^n]u[n]

nn \to \infty에서 y[]=2y[\infty] = 2 (최종값 정리로 확인: (z1)z2/[(z1)(z0.5)]z=1=1/0.5=2(z-1)\cdot z^2/[(z-1)(z-0.5)]|_{z=1} = 1/0.5 = 2)

5.6 디지털 필터 설계

전달 함수 H(z):

LTI 시스템의 출력-입력 비: H(z)=Y(z)X(z)=b0+b1z1++bMzM1+a1z1++aNzNH(z) = \frac{Y(z)}{X(z)} = \frac{b_0 + b_1 z^{-1} + \cdots + b_M z^{-M}}{1 + a_1 z^{-1} + \cdots + a_N z^{-N}}

영점(zero): H(z)=0H(z) = 0zz

극점(pole): H(z)=H(z) = \inftyzz

안정성 조건: 모든 극점이 단위원 내부에 있어야 합니다.

안정모든 극점 pk:pk<1\text{안정} \Leftrightarrow \text{모든 극점 } p_k: |p_k| < 1

FIR 필터 (유한 임펄스 응답): H(z)=b0+b1z1++bMzMH(z) = b_0 + b_1 z^{-1} + \cdots + b_M z^{-M}

극점이 원점에만 있어 항상 안정. 선형 위상 특성 가능.

IIR 필터 (무한 임펄스 응답): H(z)=B(z)A(z)H(z) = \frac{B(z)}{A(z)}

극점이 단위원 내부에 있으면 안정. 적은 계수로 날카로운 특성 구현 가능.

5.7 Python으로 디지털 필터 설계 및 분석

from scipy import signal
import numpy as np
import matplotlib.pyplot as plt

# 1. IIR 필터: 버터워스 저역통과
N_order = 4   # 필터 차수
Wn = 0.2      # 정규화 차단 주파수 (0~1, 1 = Nyquist)

b, a = signal.butter(N_order, Wn, btype='low')
print("버터워스 LPF 계수:")
print(f"  b = {b}")
print(f"  a = {a}")

# 2. 주파수 응답
w, h = signal.freqz(b, a, worN=2048)

# 3. 극-영점 도표
zeros, poles, gain = signal.tf2zpk(b, a)
print(f"\n영점: {zeros}")
print(f"극점: {poles}")
print(f"이득: {gain:.4f}")
print(f"극점 크기: {np.abs(poles)}")

fig, axes = plt.subplots(2, 2, figsize=(14, 10))

# 주파수 응답 (크기)
axes[0, 0].plot(w/np.pi, 20*np.log10(abs(h) + 1e-15), 'b-', linewidth=2)
axes[0, 0].axhline(y=-3, color='r', linestyle='--', label='-3dB')
axes[0, 0].set_xlabel('정규화 주파수 (x pi rad/샘플)')
axes[0, 0].set_ylabel('크기 (dB)')
axes[0, 0].set_title('버터워스 LPF 주파수 응답 (크기)')
axes[0, 0].set_xlim([0, 1])
axes[0, 0].set_ylim([-80, 5])
axes[0, 0].legend()
axes[0, 0].grid(True, alpha=0.3)

# 위상 응답
angles = np.unwrap(np.angle(h))
axes[0, 1].plot(w/np.pi, angles*180/np.pi, 'g-', linewidth=2)
axes[0, 1].set_xlabel('정규화 주파수 (x pi rad/샘플)')
axes[0, 1].set_ylabel('위상 (도)')
axes[0, 1].set_title('버터워스 LPF 위상 응답')
axes[0, 1].set_xlim([0, 1])
axes[0, 1].grid(True, alpha=0.3)

# 극-영점 도표
unit_circle = np.exp(1j * np.linspace(0, 2*np.pi, 200))
axes[1, 0].plot(unit_circle.real, unit_circle.imag, 'k--', alpha=0.5)
axes[1, 0].scatter(zeros.real, zeros.imag, s=100, marker='o',
                   color='blue', zorder=5, label='영점')
axes[1, 0].scatter(poles.real, poles.imag, s=100, marker='x',
                   color='red', linewidths=2, zorder=5, label='극점')
axes[1, 0].axhline(0, color='gray', alpha=0.3)
axes[1, 0].axvline(0, color='gray', alpha=0.3)
axes[1, 0].set_xlabel('실수부')
axes[1, 0].set_ylabel('허수부')
axes[1, 0].set_title('극-영점 도표 (z 평면)')
axes[1, 0].legend()
axes[1, 0].grid(True, alpha=0.3)
axes[1, 0].set_aspect('equal')

# 임펄스 응답
imp = np.zeros(50)
imp[0] = 1.0
h_imp = signal.lfilter(b, a, imp)
axes[1, 1].stem(h_imp, markerfmt='bo', linefmt='b-', basefmt='k-')
axes[1, 1].set_xlabel('샘플 n')
axes[1, 1].set_ylabel('h[n]')
axes[1, 1].set_title('임펄스 응답 (IIR 무한)')
axes[1, 1].grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('digital_filter_analysis.png', dpi=150)
plt.show()

5.8 FIR vs IIR 필터 비교

from scipy import signal
import numpy as np
import matplotlib.pyplot as plt

# FIR 필터 (윈도우 방법)
N_fir = 50
Wn = 0.2
h_fir = signal.firwin(N_fir + 1, Wn, window='hamming')

# IIR 필터 (버터워스)
b_iir, a_iir = signal.butter(6, Wn, btype='low')

# 주파수 응답 비교
w_fir, H_fir = signal.freqz(h_fir, [1], worN=2048)
w_iir, H_iir = signal.freqz(b_iir, a_iir, worN=2048)

fig, axes = plt.subplots(1, 2, figsize=(14, 5))

axes[0].plot(w_fir/np.pi, 20*np.log10(abs(H_fir)+1e-15),
             'b-', linewidth=2, label=f'FIR (N={N_fir})')
axes[0].plot(w_iir/np.pi, 20*np.log10(abs(H_iir)+1e-15),
             'r-', linewidth=2, label='IIR 버터워스 6차')
axes[0].set_xlabel('정규화 주파수')
axes[0].set_ylabel('크기 (dB)')
axes[0].set_title('FIR vs IIR 주파수 응답')
axes[0].set_xlim([0, 1])
axes[0].set_ylim([-80, 5])
axes[0].legend()
axes[0].grid(True, alpha=0.3)

# 위상 응답 비교 (FIR의 선형 위상 특성)
ph_fir = np.unwrap(np.angle(H_fir))
ph_iir = np.unwrap(np.angle(H_iir))
axes[1].plot(w_fir/np.pi, ph_fir*180/np.pi,
             'b-', linewidth=2, label='FIR (선형 위상)')
axes[1].plot(w_iir/np.pi, ph_iir*180/np.pi,
             'r-', linewidth=2, label='IIR (비선형 위상)')
axes[1].set_xlabel('정규화 주파수')
axes[1].set_ylabel('위상 (도)')
axes[1].set_title('FIR vs IIR 위상 응답')
axes[1].set_xlim([0, 0.5])
axes[1].legend()
axes[1].grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('fir_vs_iir.png', dpi=150)
plt.show()

print("계수 개수 비교:")
print(f"  FIR: {len(h_fir)} 계수")
print(f"  IIR: b={len(b_iir)}, a={len(a_iir)} 계수 합계 {len(b_iir)+len(a_iir)}")

6. 라플라스 변환과 Z-변환의 대응

6.1 s 평면과 z 평면의 관계

z=esTs,s=1Tslnzz = e^{sT_s}, \quad s = \frac{1}{T_s}\ln z

s=σ+jωs = \sigma + j\omega에서:

z=eσTsejωTs=eσTs(ωTs)z = e^{\sigma T_s}e^{j\omega T_s} = e^{\sigma T_s}\angle(\omega T_s)

| s 평면 특성 | z 평면 특성 | | -------------------------------------- | ------------- | --- | ---- | | jωj\omega 축 (σ=0\sigma = 0) | 단위원 z=1 | z | = 1 | | 좌반평면 (σ<0\sigma < 0) | 단위원 내부 z<1 | z | < 1 | | 우반평면 (σ>0\sigma > 0) | 단위원 외부 z>1 | z | > 1 | | DC (s=0s = 0) | z=1z = 1 | | 나이퀴스트 주파수 (ω=π/Ts\omega = \pi/T_s) | z=1z = -1 |

안정성 대응:

  • 연속: 모든 극점이 좌반평면 → 이산: 모든 극점이 단위원 내부

6.2 쌍일차 변환 (Bilinear Transform)

아날로그 필터를 디지털 필터로 변환하는 방법:

s=2Tsz1z+1s = \frac{2}{T_s}\cdot\frac{z-1}{z+1}

주파수 워핑(frequency warping) 발생: ωanalog=2Tstan ⁣(Ωdigital2)\omega_{analog} = \frac{2}{T_s}\tan\!\left(\frac{\Omega_{digital}}{2}\right)

사전 워핑으로 보정 후 설계합니다.

from scipy import signal
import numpy as np

# 아날로그 버터워스 프로토타입
N = 4  # 필터 차수
Wn_analog = 2 * np.pi * 1000  # 1000 Hz 아날로그 차단 주파수

z_a, p_a, k_a = signal.buttap(N)
b_analog, a_analog = signal.zpk2tf(z_a, p_a, k_a)
b_analog, a_analog = signal.lp2lp(b_analog, a_analog, Wn_analog)

# 쌍일차 변환으로 디지털 필터 변환
fs = 8000  # 샘플링 주파수
b_digital, a_digital = signal.bilinear(b_analog, a_analog, fs)

print("아날로그 필터 극점:", np.roots(a_analog))
print("디지털 필터 극점:", np.roots(a_digital))
print("디지털 극점 크기:", np.abs(np.roots(a_digital)))

7. 제어 시스템에서의 응용

7.1 전달 함수와 안정성 분석

연속 시스템 전달 함수: G(s)=K(s+z1)(s+z2)(s+p1)(s+p2)G(s) = \frac{K(s+z_1)(s+z_2)\cdots}{(s+p_1)(s+p_2)\cdots}

루스-허르비츠 판별법(Routh-Hurwitz Criterion):

특성 다항식 ansn+an1sn1++a0a_n s^n + a_{n-1}s^{n-1} + \cdots + a_0의 루스 배열을 이용해 우반 평면의 극점 수를 판별합니다.

나이퀴스트 판별법:

G(jω)G(j\omega)의 나이퀴스트 선도에서 (1,0)(-1, 0) 점의 감싸기 횟수로 안정성 판별.

7.2 이산 제어 시스템

디지털 제어기의 전달 함수 C(z)C(z):

PID 디지털 구현 (후방 오일러 근사):

C(z)=Kp+KiTszz1+Kdz1TszC(z) = K_p + K_i\frac{T_s z}{z-1} + K_d\frac{z-1}{T_s z}


정리 및 다음 단계

이번 글에서 다룬 내용:

  1. 복소수 체계: 직교형, 극형, 오일러 공식, 드 무아브르, 페이저 해석, 임피던스
  2. 복소함수와 해석 함수: 복소 미분, 코시-리만 방정식, 조화 함수
  3. 복소 적분: 경로 적분, 코시 정리, 코시 공식
  4. 로랑 급수와 유수 정리: 특이점 분류, 유수 계산, 실수 적분 응용, 역 라플라스
  5. Z-변환: 정의, 수렴 영역, 주요 변환쌍, 차분 방정식 풀기
  6. 디지털 필터 설계: FIR/IIR, 극-영점 도표, 안정성, 쌍일차 변환
  7. s 평면 vs z 평면: 안정성 조건 대응

다음 편에서는 **수치해석(Numerical Methods)**을 다룹니다. 방정식 풀기, 수치 미분/적분, ODE 수치 풀이, 선형 시스템, 보간까지 Python으로 완전 구현합니다.


참고 자료

  • Churchill, R. & Brown, J. "Complex Variables and Applications", 9th Edition
  • Oppenheim, A. & Schafer, R. "Discrete-Time Signal Processing", 3rd Edition
  • Proakis, J. & Manolakis, D. "Digital Signal Processing", 4th Edition
  • Ogata, K. "Modern Control Engineering", 5th Edition
  • SciPy 신호처리 공식 문서

Engineering Mathematics: Complex Analysis Complete Guide - Cauchy Theorem to Residues

Engineering Mathematics: Complex Analysis and Z-Transform Complete Guide

In electrical and control engineering, complex numbers are far more than a mathematical abstraction. Phasors in AC circuit analysis, s=σ+jωs = \sigma + j\omega in the Laplace transform, the unit circle in the Z-transform, complex frequency response in Bode plots — all of these are rooted in complex analysis. This guide takes you from the complex number system through the residue theorem, Z-transform, and digital filter design.


1. The Complex Number System

1.1 Representations of Complex Numbers

Rectangular Form: z=x+iy=x+jyz = x + iy = x + jy

(Electrical engineers use jj instead of ii, since ii denotes current.)

  • Real part: Re(z)=x\text{Re}(z) = x
  • Imaginary part: Im(z)=y\text{Im}(z) = y

Polar Form: z=reiθ=r(cosθ+isinθ)=rθz = r e^{i\theta} = r(\cos\theta + i\sin\theta) = r\angle\theta

  • Magnitude: r=z=x2+y2r = |z| = \sqrt{x^2 + y^2}
  • Argument (phase): θ=arg(z)=arctan(y/x)\theta = \arg(z) = \arctan(y/x) (accounting for quadrant)

Euler's Formula: eiθ=cosθ+isinθe^{i\theta} = \cos\theta + i\sin\theta

From this: cosθ=eiθ+eiθ2,sinθ=eiθeiθ2i\cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2}, \quad \sin\theta = \frac{e^{i\theta} - e^{-i\theta}}{2i}

Often called the most beautiful formula in mathematics, Euler's Identity: eiπ+1=0e^{i\pi} + 1 = 0

Five of the most important numbers (ee, ii, π\pi, 11, 00) united in a single equation.

De Moivre's Formula: (reiθ)n=rneinθ=rn(cosnθ+isinnθ)(r e^{i\theta})^n = r^n e^{in\theta} = r^n(\cos n\theta + i\sin n\theta)

n-th roots: z1/n=r1/nei(θ+2kπ)/nz^{1/n} = r^{1/n} e^{i(\theta + 2k\pi)/n}, k=0,1,,n1k = 0, 1, \ldots, n-1

These represent nn equally-spaced points on the unit circle. (The n-th roots of unity: WNk=ej2πk/NW_N^k = e^{j2\pi k/N} — you will see these in the FFT!)

1.2 Complex Arithmetic

Addition/Subtraction (rectangular form is convenient): (x1+iy1)±(x2+iy2)=(x1±x2)+i(y1±y2)(x_1 + iy_1) \pm (x_2 + iy_2) = (x_1 \pm x_2) + i(y_1 \pm y_2)

Multiplication (polar form is convenient): (r1eiθ1)(r2eiθ2)=r1r2ei(θ1+θ2)(r_1 e^{i\theta_1})(r_2 e^{i\theta_2}) = r_1 r_2 e^{i(\theta_1 + \theta_2)}

Magnitudes multiply, phases add — the foundation of impedance multiplication in electrical engineering.

Division: r1eiθ1r2eiθ2=r1r2ei(θ1θ2)\frac{r_1 e^{i\theta_1}}{r_2 e^{i\theta_2}} = \frac{r_1}{r_2} e^{i(\theta_1 - \theta_2)}

Complex Conjugate: zˉ=xiy=reiθ\bar{z} = x - iy = r e^{-i\theta}

Useful properties:

  • zzˉ=x2+y2=z2z\bar{z} = x^2 + y^2 = |z|^2
  • Re(z)=(z+zˉ)/2\text{Re}(z) = (z + \bar{z})/2
  • Im(z)=(zzˉ)/(2i)\text{Im}(z) = (z - \bar{z})/(2i)

1.3 Engineering Application: Phasor Analysis

The power of complex numbers is on full display in AC circuit analysis.

Expressing v(t)=Vmcos(ωt+ϕ)v(t) = V_m\cos(\omega t + \phi) as a phasor: V=Vmejϕ=Vmϕ\mathbf{V} = V_m e^{j\phi} = V_m\angle\phi

Impedance:

ZR=R(pure resistance, no phase shift)Z_R = R \quad \text{(pure resistance, no phase shift)} ZL=jωL(inductor, +90 degrees phase lead)Z_L = j\omega L \quad \text{(inductor, +90 degrees phase lead)} ZC=1jωC=jωC(capacitor, -90 degrees phase lag)Z_C = \frac{1}{j\omega C} = \frac{-j}{\omega C} \quad \text{(capacitor, -90 degrees phase lag)}

Series RLC impedance: Z=R+jωL+1jωC=R+j(ωL1ωC)Z = R + j\omega L + \frac{1}{j\omega C} = R + j\left(\omega L - \frac{1}{\omega C}\right)

Resonance condition: ω0L=1/(ω0C)\omega_0 L = 1/(\omega_0 C) implies ω0=1/LC\omega_0 = 1/\sqrt{LC}, Z=RZ = R (pure resistance).


2. Complex Functions and Analytic Functions

2.1 Complex Functions

f(z)=f(x+iy)=u(x,y)+iv(x,y)f(z) = f(x + iy) = u(x, y) + iv(x, y)

where uu and vv are real-valued functions.

Examples: f(z)=z2=(x+iy)2=x2y2+i(2xy)f(z) = z^2 = (x+iy)^2 = x^2 - y^2 + i(2xy)

u(x,y)=x2y2,v(x,y)=2xyu(x,y) = x^2 - y^2, \quad v(x,y) = 2xy

f(z)=ez=ex+iy=ex(cosy+isiny)f(z) = e^z = e^{x+iy} = e^x(\cos y + i\sin y)

u(x,y)=excosy,v(x,y)=exsinyu(x,y) = e^x\cos y, \quad v(x,y) = e^x\sin y

2.2 Complex Differentiation and the Cauchy-Riemann Equations

The complex derivative of f(z)f(z): f(z0)=limΔz0f(z0+Δz)f(z0)Δzf'(z_0) = \lim_{\Delta z\to 0}\frac{f(z_0 + \Delta z) - f(z_0)}{\Delta z}

Unlike real analysis, Δz\Delta z can approach 0 from any direction in the complex plane, and the limit must be the same regardless of direction.

Along the real axis (Δz=Δx\Delta z = \Delta x): f(z)=ux+ivxf'(z) = \frac{\partial u}{\partial x} + i\frac{\partial v}{\partial x}

Along the imaginary axis (Δz=iΔy\Delta z = i\Delta y): f(z)=iuy+vyf'(z) = -i\frac{\partial u}{\partial y} + \frac{\partial v}{\partial y}

For these two expressions to be equal:

ux=vy,uy=vx\boxed{\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \quad \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}}

These are the Cauchy-Riemann Equations.

If the partial derivatives of uu and vv are continuous and satisfy the Cauchy-Riemann equations, f(z)f(z) is an analytic function.

2.3 Harmonic Functions

The real and imaginary parts of an analytic function each satisfy Laplace's equation:

2u=2ux2+2uy2=0,2v=2vx2+2vy2=0\nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0, \quad \nabla^2 v = \frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2} = 0

From Cauchy-Riemann: uxx=vyxu_{xx} = v_{yx} and uyy=vxyu_{yy} = -v_{xy}, so uxx+uyy=0u_{xx} + u_{yy} = 0.

Given uu, the Cauchy-Riemann equations allow you to find the harmonic conjugate vv.

Engineering significance: velocity potential and stream function in potential flow; electric potential and field lines in electrostatics.

import numpy as np
import matplotlib.pyplot as plt

# Visualize Cauchy-Riemann orthogonality for f(z) = z^2
x = np.linspace(-2, 2, 400)
y = np.linspace(-2, 2, 400)
X, Y = np.meshgrid(x, y)

U = X**2 - Y**2   # Re(z^2)
V = 2 * X * Y     # Im(z^2)

fig, axes = plt.subplots(1, 2, figsize=(12, 5))
for ax, data, title in zip(axes, [U, V],
        ['Re(z^2) = x^2 - y^2', 'Im(z^2) = 2xy']):
    c = ax.contour(X, Y, data, levels=20, cmap='RdBu')
    ax.set_title(title)
    ax.set_xlabel('x')
    ax.set_ylabel('y')
    ax.set_aspect('equal')
    plt.colorbar(c, ax=ax)

plt.suptitle('Level curves of f(z)=z^2: orthogonal grids (Cauchy-Riemann)', fontsize=12)
plt.tight_layout()
plt.savefig('cauchy_riemann_z2.png', dpi=150)
plt.show()

2.4 Important Analytic Functions

Trigonometric functions: cosz=eiz+eiz2,sinz=eizeiz2i\cos z = \frac{e^{iz} + e^{-iz}}{2}, \quad \sin z = \frac{e^{iz} - e^{-iz}}{2i}

Unlike their real counterparts, they can become unbounded: cos(iy)=coshy|\cos(iy)| = \cosh y \to \infty.

Logarithm (multi-valued): lnz=lnr+i(θ+2kπ),kZ\ln z = \ln r + i(\theta + 2k\pi), \quad k \in \mathbb{Z}

Principal value: Lnz=lnr+iθ\text{Ln}\,z = \ln r + i\theta, π<θπ-\pi < \theta \leq \pi. Singularities occur at z=0z = 0 and along the negative real axis (branch cut).


3. Complex Integration

3.1 Contour Integrals

CC: a curve parameterized by z(t)=x(t)+iy(t)z(t) = x(t) + iy(t), atba \leq t \leq b

Cf(z)dz=abf(z(t))z(t)dt\int_C f(z)\,dz = \int_a^b f(z(t))z'(t)\,dt

Example: Cz2dz\int_C z^2\,dz along the straight line from 00 to 1+i1+i

Parameterization: z(t)=t(1+i)z(t) = t(1+i), z(t)=1+iz'(t) = 1+i, 0t10 \leq t \leq 1

01t2(1+i)2(1+i)dt=(2i)(1+i)13=2+2i3\int_0^1 t^2(1+i)^2(1+i)\,dt = (2i)(1+i)\cdot\frac{1}{3} = \frac{-2+2i}{3}

3.2 Cauchy's Integral Theorem

Cf(z)dz=0\oint_C f(z)\,dz = 0

Condition: f(z)f(z) analytic on and inside the simple closed curve CC.

Intuition: the integral of an analytic function is path-independent. Using Green's theorem together with the Cauchy-Riemann equations forces both real parts of the integral to vanish.

Antiderivative: if F(z)=f(z)F'(z) = f(z), then abf(z)dz=F(b)F(a)\int_a^b f(z)\,dz = F(b) - F(a).

3.3 Cauchy's Integral Formula

f(a)=12πiCf(z)zadz\boxed{f(a) = \frac{1}{2\pi i}\oint_C \frac{f(z)}{z-a}\,dz}

Conditions: f(z)f(z) analytic on and inside CC; aa lies inside CC.

Higher-order derivative formula: f(n)(a)=n!2πiCf(z)(za)n+1dzf^{(n)}(a) = \frac{n!}{2\pi i}\oint_C \frac{f(z)}{(z-a)^{n+1}}\,dz

This proves that analytic functions are infinitely differentiable.

import numpy as np

def cauchy_integral_formula(f, a, R=1.0, N=2000):
    """Numerically verify f(a) = (1/2pi*i) integral f(z)/(z-a) dz."""
    theta = np.linspace(0, 2*np.pi, N, endpoint=False)
    z = a + R * np.exp(1j * theta)
    dz = np.diff(np.append(z, z[0]))
    integrand = f(z[:-1]) / (z[:-1] - a)
    return np.sum(integrand * dz) / (2 * np.pi * 1j)

a = 1 + 1j
numerical = cauchy_integral_formula(np.exp, a)
print(f"Cauchy formula result : {numerical:.6f}")
print(f"Exact  exp(1+j)       : {np.exp(a):.6f}")
print(f"Error                 : {abs(numerical - np.exp(a)):.2e}")

4. Laurent Series and the Residue Theorem

4.1 Taylor Series vs Laurent Series

Taylor series (analytic at z0z_0): f(z)=n=0an(zz0)n,an=f(n)(z0)n!f(z) = \sum_{n=0}^{\infty}a_n(z-z_0)^n, \quad a_n = \frac{f^{(n)}(z_0)}{n!}

Laurent series (annular region r1<zz0<r2r_1 < |z - z_0| < r_2):

f(z)=n=an(zz0)nf(z) = \sum_{n=-\infty}^{\infty}a_n(z-z_0)^n

The negative-power terms form the principal part. The difference: Laurent series can represent functions with singularities; the structure of the principal part classifies the singularity.

4.2 Classification of Singularities

Removable: no negative-power terms. Example: sinz/z\sin z / z at z=0z = 0.

Pole of order m: finitely many negative-power terms; f(z)=g(z)/(zz0)mf(z) = g(z)/(z-z_0)^m with gg analytic and g(z0)0g(z_0) \neq 0.

Essential singularity: infinitely many negative-power terms. Example: e1/ze^{1/z} at z=0z = 0.

Picard's theorem: near an essential singularity, ff takes almost every complex value.

4.3 The Residue Theorem

Residue: the coefficient of (zz0)1(z-z_0)^{-1} in the Laurent expansion.

Res[f,z0]=b1=12πizz0=ϵf(z)dz\text{Res}[f, z_0] = b_1 = \frac{1}{2\pi i}\oint_{|z-z_0|=\epsilon} f(z)\,dz

Computing residues:

Simple pole: Res[f,z0]=limzz0(zz0)f(z)\text{Res}[f, z_0] = \lim_{z\to z_0}(z - z_0)f(z)

Rational f=p/qf = p/q at a simple pole: Res[f,z0]=p(z0)/q(z0)\text{Res}[f, z_0] = p(z_0)/q'(z_0)

Pole of order mm: Res[f,z0]=1(m1)!limzz0dm1dzm1[(zz0)mf(z)]\text{Res}[f, z_0] = \frac{1}{(m-1)!}\lim_{z\to z_0}\frac{d^{m-1}}{dz^{m-1}}\left[(z-z_0)^m f(z)\right]

Residue Theorem: Cf(z)dz=2πikRes[f,zk]\oint_C f(z)\,dz = 2\pi i \sum_k \text{Res}[f, z_k]

where zkz_k are all singularities inside CC.

4.4 Evaluating Real Integrals

Example 1: dx1+x2\displaystyle\int_{-\infty}^{\infty}\frac{dx}{1+x^2}

Pole in the upper half-plane: z=iz = i. Residue: 1/(2i)1/(2i). By the residue theorem and Jordan's lemma: I=2πi12i=πI = 2\pi i \cdot \frac{1}{2i} = \pi

Example 2: 0cosxx2+a2dx(a>0)\displaystyle\int_0^{\infty}\frac{\cos x}{x^2+a^2}dx \quad (a > 0)

Consider f(z)=eiz/(z2+a2)f(z) = e^{iz}/(z^2+a^2). Pole at z=iaz = ia, residue ea/(2ia)e^{-a}/(2ia). Taking the real part: I=πea/(2a)I = \pi e^{-a}/(2a).

Example 3: 02πdθ2+cosθ\displaystyle\int_0^{2\pi}\frac{d\theta}{2+\cos\theta}

Substitute z=eiθz = e^{i\theta}, cosθ=(z+z1)/2\cos\theta = (z + z^{-1})/2: =2dzi(z2+4z+1)=2π3= \oint\frac{2\,dz}{i(z^2+4z+1)} = \frac{2\pi}{\sqrt{3}}

4.5 Inverse Laplace Transform via Residues

Bromwich Integral: f(t)=12πiσiσ+iF(s)estds=kRes[F(s)est,sk]f(t) = \frac{1}{2\pi i}\int_{\sigma-i\infty}^{\sigma+i\infty}F(s)e^{st}\,ds = \sum_k \text{Res}\left[F(s)e^{st}, s_k\right]

Example: F(s)=1/(s2+ω2)F(s) = 1/(s^2+\omega^2), poles s=±iωs = \pm i\omega

f(t)=eiωt2iω+eiωt2iω=sinωtωf(t) = \frac{e^{i\omega t}}{2i\omega} + \frac{e^{-i\omega t}}{-2i\omega} = \frac{\sin\omega t}{\omega}


5. Conformal Mappings

5.1 Definition and Angle Preservation

An analytic function w=f(z)w = f(z) with f(z)0f'(z) \neq 0 defines a conformal mapping: it preserves angles and orientation between curves at every point.

5.2 Mobius Transformation

w=az+bcz+d,adbc0w = \frac{az + b}{cz + d}, \quad ad - bc \neq 0

Properties:

  • Maps circles and lines to circles and lines
  • Any three distinct points can be mapped to any other three
  • Composition of Mobius maps is again a Mobius map

Key examples:

  • w=1/zw = 1/z: inversion
  • w=(za)/(1aˉz)w = (z - a)/(1 - \bar{a}z): maps the unit disk to itself
  • w=(1+z)/(1z)w = (1 + z)/(1 - z): maps the unit disk to the right half-plane

5.3 Engineering Applications

Potential flow: conformal mappings transform complicated domain geometries (e.g., airfoils) into simple ones (half-plane, disk), enabling analytic solutions.

Electrostatics: find field distributions between irregular electrodes by mapping to standard geometries.

Digital filter design: the bilinear transform s=2(z1)/[Ts(z+1)]s = 2(z-1)/[T_s(z+1)] is a conformal map converting the jωj\omega axis exactly onto the unit circle.

import numpy as np
import matplotlib.pyplot as plt

def mobius(z, a=1, b=-1, c=1, d=1):
    return (a * z + b) / (c * z + d)

theta = np.linspace(0, 2*np.pi, 300)
r_vals = [0.3, 0.6, 0.9, 1.0]

fig, axes = plt.subplots(1, 2, figsize=(12, 6))

for r in r_vals:
    z_c = r * np.exp(1j * theta)
    w_c = mobius(z_c)
    axes[0].plot(z_c.real, z_c.imag, linewidth=1.5)
    axes[1].plot(w_c.real, w_c.imag, linewidth=1.5)

for phi in np.linspace(0, 2*np.pi, 12, endpoint=False):
    r_line = np.linspace(0.01, 0.99, 100)
    z_l = r_line * np.exp(1j * phi)
    w_l = mobius(z_l)
    axes[0].plot(z_l.real, z_l.imag, 'gray', alpha=0.4, linewidth=0.8)
    axes[1].plot(w_l.real, w_l.imag, 'gray', alpha=0.4, linewidth=0.8)

for ax, title in zip(axes, ['z-plane (unit disk)', 'w-plane: w = (z-1)/(z+1)']):
    ax.set_xlim([-2, 2])
    ax.set_ylim([-2, 2])
    ax.axhline(0, color='k', linewidth=0.5)
    ax.axvline(0, color='k', linewidth=0.5)
    ax.set_aspect('equal')
    ax.set_title(title)
    ax.grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('mobius_transform.png', dpi=150)
plt.show()

6. Z-Transform

6.1 Definition and Region of Convergence

X(z)=Z{x[n]}=n=x[n]znX(z) = \mathcal{Z}\{x[n]\} = \sum_{n=-\infty}^{\infty}x[n]z^{-n}

Region of Convergence (ROC):

  • Causal signal: z>rmax|z| > r_{\max}
  • Anti-causal signal: z<rmin|z| < r_{\min}
  • Two-sided signal: annular region r1<z<r2r_1 < |z| < r_2

6.2 Key Z-Transform Pairs

| Signal x[n]x[n] | X(z)X(z) | ROC | | --------------------------- | ------------------------------------------ | ------- | --- | --- | --- | --- | | δ[n]\delta[n] | 11 | all zz | | u[n]u[n] | z/(z1)z/(z-1) | z>1 | z | >1 | | anu[n]a^n u[n] | z/(za)z/(z-a) | z>a | z | > | a | | | cosΩ0nu[n]\cos\Omega_0 n \cdot u[n] | z(zcosΩ0)/(z22zcosΩ0+1)z(z-\cos\Omega_0)/(z^2-2z\cos\Omega_0+1) | z>1 | z | >1 | | nu[n]nu[n] | z/(z1)2z/(z-1)^2 | z>1 | z | >1 |

6.3 Properties of the Z-Transform

  • Time shift: Z{x[nk]}=zkX(z)\mathcal{Z}\{x[n-k]\} = z^{-k}X(z) (z1z^{-1} = unit delay operator)
  • Convolution: Z{x[n]h[n]}=X(z)H(z)\mathcal{Z}\{x[n]*h[n]\} = X(z)H(z)
  • Final value: limnx[n]=limz1(z1)X(z)\lim_{n\to\infty} x[n] = \lim_{z\to 1}(z-1)X(z)

6.4 Digital Filter Design

Transfer function: H(z)=b0+b1z1++bMzM1+a1z1++aNzNH(z) = \frac{b_0 + b_1 z^{-1} + \cdots + b_M z^{-M}}{1 + a_1 z^{-1} + \cdots + a_N z^{-N}}

Stability: all poles must satisfy pk<1|p_k| < 1.

FIR: poles only at origin — always stable, can achieve linear phase.

IIR: feedback poles can be anywhere — sharper characteristics with fewer coefficients, but requires stability check.

from scipy import signal
import numpy as np
import matplotlib.pyplot as plt

b, a = signal.butter(4, 0.2, btype='low')
w, h = signal.freqz(b, a, worN=2048)
zeros, poles, gain = signal.tf2zpk(b, a)

fig, axes = plt.subplots(1, 2, figsize=(12, 5))

axes[0].plot(w/np.pi, 20*np.log10(abs(h) + 1e-15), 'b-', linewidth=2)
axes[0].axhline(-3, color='r', linestyle='--', label='-3 dB')
axes[0].set_xlabel('Normalized Frequency')
axes[0].set_ylabel('Magnitude (dB)')
axes[0].set_title('Butterworth LPF (order 4)')
axes[0].set_xlim([0, 1])
axes[0].legend()
axes[0].grid(True, alpha=0.3)

unit_circle = np.exp(1j * np.linspace(0, 2*np.pi, 200))
axes[1].plot(unit_circle.real, unit_circle.imag, 'k--', alpha=0.5)
axes[1].scatter(zeros.real, zeros.imag, s=100, marker='o', color='blue', label='Zeros')
axes[1].scatter(poles.real, poles.imag, s=100, marker='x', color='red', linewidths=2, label='Poles')
axes[1].set_title('Pole-Zero Plot (z-plane)')
axes[1].set_aspect('equal')
axes[1].legend()
axes[1].grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('butterworth_lpf.png', dpi=150)
plt.show()
print(f"Pole magnitudes: {np.abs(poles)}")

6.5 s-Plane to z-Plane Correspondence

z=esTsz = e^{sT_s}

| s-plane | z-plane | | ------------------------------- | ------------- | --- | ---- | | jωj\omega axis (σ=0\sigma = 0) | Unit circle z=1 | z | = 1 | | Left half-plane (σ<0\sigma < 0) | Interior z<1 | z | < 1 | | Right half-plane (σ>0\sigma > 0) | Exterior z>1 | z | > 1 |

Stability: continuous poles in left half-plane correspond to discrete poles inside the unit circle.

Bilinear transform (analog to digital without aliasing): s=2Tsz1z+1s = \frac{2}{T_s}\cdot\frac{z-1}{z+1}


7. Applications to AI and Signal Processing

7.1 Complex-Valued Neural Networks

Complex-valued neural networks process signals in the amplitude-phase domain. The Wirtinger derivative generalizes complex differentiation to non-analytic functions used in machine learning, enabling gradient-based optimization in the complex domain.

7.2 Loss Landscape Geometry

Complex analysis tools characterize critical points of neural network loss functions. Saddle points, local minima, and their basins of attraction can be studied through the lens of analytic function theory and conformal geometry.

import numpy as np
import matplotlib.pyplot as plt

# Domain coloring of sin(z)/z — removable singularity at z=0
x = np.linspace(-5, 5, 600)
y = np.linspace(-3, 3, 600)
X, Y = np.meshgrid(x, y)
Z = X + 1j * Y

with np.errstate(invalid='ignore', divide='ignore'):
    F = np.where(np.abs(Z) < 1e-10, 1.0 + 0j, np.sin(Z) / Z)

fig, axes = plt.subplots(1, 2, figsize=(14, 5))
im1 = axes[0].pcolormesh(X, Y, np.abs(F), cmap='viridis', vmax=2.5)
axes[0].set_title('|sin(z)/z| — modulus')
axes[0].set_xlabel('Re(z)')
axes[0].set_ylabel('Im(z)')
axes[0].set_aspect('equal')
plt.colorbar(im1, ax=axes[0])

im2 = axes[1].pcolormesh(X, Y, np.angle(F), cmap='hsv')
axes[1].set_title('arg(sin(z)/z) — phase')
axes[1].set_xlabel('Re(z)')
axes[1].set_ylabel('Im(z)')
axes[1].set_aspect('equal')
plt.colorbar(im2, ax=axes[1])

plt.suptitle('Domain coloring of sin(z)/z (removable singularity at 0)', fontsize=12)
plt.tight_layout()
plt.savefig('domain_coloring_sinc.png', dpi=150)
plt.show()

Summary and Next Steps

Topics covered in this guide:

  1. Complex number system: rectangular form, polar form, Euler's formula, De Moivre, phasor analysis, impedance
  2. Complex functions and analytic functions: Cauchy-Riemann equations, harmonic functions
  3. Complex integration: contour integrals, Cauchy's theorem, Cauchy's integral formula
  4. Laurent series and the residue theorem: singularity classification, residue computation, real integrals, inverse Laplace
  5. Conformal mappings: Mobius transformation, angle preservation, engineering applications
  6. Z-transform: ROC, key transform pairs, solving difference equations
  7. Digital filter design: FIR/IIR, pole-zero plots, stability, bilinear transform
  8. AI applications: complex-valued networks, optimization landscape geometry

The next installment covers Numerical Methods: solving equations, numerical differentiation and integration, ODE solvers, and interpolation — all implemented in Python.


References

  • Churchill, R. & Brown, J. "Complex Variables and Applications", 9th Edition
  • Oppenheim, A. & Schafer, R. "Discrete-Time Signal Processing", 3rd Edition
  • Proakis, J. & Manolakis, D. "Digital Signal Processing", 4th Edition
  • Ogata, K. "Modern Control Engineering", 5th Edition
  • SciPy signal processing documentation

Quiz

Q1. What do the Cauchy-Riemann equations state, and what do they imply about analytic functions?

Answer: The Cauchy-Riemann equations are u/x=v/y\partial u/\partial x = \partial v/\partial y and u/y=v/x\partial u/\partial y = -\partial v/\partial x.

Explanation: For the complex derivative to exist, the limit [f(z+Δz)f(z)]/Δz[f(z + \Delta z) - f(z)] / \Delta z must be the same regardless of the direction in which Δz\Delta z approaches 0. Taking horizontal and vertical limits and equating them yields these two PDE conditions. When satisfied (with continuous partials), f(z)f(z) is analytic — infinitely differentiable and locally representable as a convergent power series. A key consequence is that both uu and vv satisfy Laplace's equation (they are harmonic functions), linking complex analysis to potential theory in physics and engineering.

Q2. Why does Cauchy's theorem say the integral of an analytic function around a closed contour is zero?

Answer: Because analytic functions have path-independent integrals, so any closed-loop integral vanishes.

Explanation: Writing Cf(z)dz\oint_C f(z)\,dz in terms of uu and vv, one obtains two real line integrals. Green's theorem converts each to a double integral over the enclosed region, and the Cauchy-Riemann equations force both integrands to zero. Geometrically, since the integral depends only on endpoints, starting and ending at the same point gives zero. This is the complex-analysis counterpart of conservative vector fields: the work integral around any closed loop is zero.

Q3. What is the difference between a Taylor series and a Laurent series?

Answer: A Taylor series contains only non-negative powers of (zz0)(z - z_0); a Laurent series also includes negative powers.

Explanation: A Taylor series is valid when ff is analytic at z0z_0. A Laurent series is valid in an annular region and is necessary when ff has a singularity at z0z_0. The negative-power terms (the principal part) classify the singularity: no negative terms means removable, finitely many means a pole, and infinitely many means an essential singularity. The coefficient a1a_{-1} of (zz0)1(z-z_0)^{-1} is the residue, the central quantity in the residue theorem.

Q4. How does the residue theorem simplify real integral calculations?

Answer: It converts a real integral into a contour integral in the complex plane, reducing the calculation to finding residues at poles — a straightforward algebraic step.

Explanation: Many definite real integrals are difficult by real-variable methods. By extending the integrand to the complex plane, choosing a contour (e.g., a large semicircle in the upper half-plane), and showing the extra arc contributes nothing (Jordan's lemma), the residue theorem gives the answer as 2πi2\pi i times the sum of enclosed residues. For R(x)dx\int_{-\infty}^{\infty} R(x)\,dx this approach reduces what might be an intractable antiderivative problem to computing limits at poles.

Q5. Conformal mappings preserve angles — what are their practical applications?

Answer: Conformal mappings are used in fluid dynamics, electrostatics, and digital filter design to transform complex geometries into tractable ones while preserving governing equations.

Explanation: Because conformal maps preserve angles and the Laplacian structure, boundary-value problems in complicated domains (fluid around an airfoil, field between irregular electrodes) can be mapped to simple domains (half-plane, disk) where solutions are known. In digital signal processing, the bilinear transform is a conformal map converting the jωj\omega axis exactly onto the unit circle, enabling analog-to-digital filter conversion while preserving stability. The Mobius transformation class is especially versatile because it maps circles and lines to circles and lines.