Lecture 3 the Laplace Transform
Total Page:16
File Type:pdf, Size:1020Kb
S. Boyd EE102 Lecture 3 The Laplace transform de¯nition & examples ² properties & formulas ² { linearity { the inverse Laplace transform { time scaling { exponential scaling { time delay { derivative { integral { multiplication by t { convolution 3{1 Idea the Laplace transform converts integral and di®erential equations into algebraic equations this is like phasors, but applies to general signals, not just sinusoids ² handles non-steady-state conditions ² allows us to analyze LCCODEs ² complicated circuits with sources, Ls, Rs, and Cs ² complicated systems with integrators, di®erentiators, gains ² The Laplace transform 3{2 Complex numbers complex number in Cartesian form: z = x + jy x = z, the real part of z ² < y = z, the imaginary part of z ² = j = p 1 (engineering notation); i = p 1 is polite term in mixed ² company¡ ¡ complex number in polar form: z = rejÁ r is the modulus or magnitude of z ² Á is the angle or phase of z ² exp(jÁ) = cos Á + j sin Á ² complex exponential of z = x + jy: ez = ex+jy = exejy = ex(cos y + j sin y) The Laplace transform 3{3 The Laplace transform we'll be interested in signals de¯ned for t 0 ¸ the Laplace transform of a signal (function) f is the function F = (f) de¯ned by L 1 F (s) = f(t)e¡st dt Z0 for those s C for which the integral makes sense 2 F is a complex-valued function of complex numbers ² s is called the (complex) frequency variable, with units sec¡1; t is called ² the time variable (in sec); st is unitless for now, we assume f contains no impulses at t = 0 ² common notation convention: lower case letter denotes signal; capital letter denotes its Laplace transform, e.g., U denotes (u), Vin denotes (v ), etc. L L in The Laplace transform 3{4 Example let's ¯nd Laplace transform of f(t) = et: 1 1 1 1 1 F (s) = et e¡st dt = e(1¡s)t dt = e(1¡s)t = Z Z 1 s ¯ s 1 0 0 ¯0 ¡ ¯ ¡ ¯ provided we can say e(1¡s)t 0 as t , which is true for s > 1: ! ! 1 < e(1¡s)t = e¡j(=s)t e(1¡<s)t = e(1¡<s)t ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ =1 ¯ ¯ ¯ the integral de¯ning F mak| es{zsense} for all s C with s > 1 (the ² `region of convergence' of F ) 2 < but the resulting formula for F makes sense for all s C except s = 1 ² 2 we'll ignore these (sometimes important) details and just say that 1 (et) = L s 1 ¡ The Laplace transform 3{5 More examples constant: (or unit step) f(t) = 1 (for t 0) ¸ 1 1 1 1 F (s) = e¡st dt = e¡st = Z ¡s ¯ s 0 ¯0 ¯ ¯ provided we can say e¡st 0 as t , which is true for s > 0 since ! ! 1 < e¡st = e¡j(=s)t e¡(<s)t = e¡(<s)t ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ =1 ¯ ¯ ¯ | {z } the integral de¯ning F makes sense for all s with s > 0 ² < but the resulting formula for F makes sense for all s except s = 0 ² The Laplace transform 3{6 sinusoid: ¯rst express f(t) = cos !t as f(t) = (1=2)ej!t + (1=2)e¡j!t now we can ¯nd F as 1 F (s) = e¡st (1=2)ej!t + (1=2)e¡j!t dt Z0 1¡ 1¢ = (1=2) e(¡s+j!)t dt + (1=2) e(¡s¡j!)t dt Z0 Z0 1 1 = (1=2) + (1=2) s j! s + j! s ¡ = s2 + !2 (valid for s > 0; ¯nal formula OK for s = j!) < 6 § The Laplace transform 3{7 powers of t: f(t) = tn (n 1) ¸ we'll integrate by parts, i.e., use b b b u(t)v0(t) dt = u(t)v(t) v(t)u0(t) dt Z ¯ ¡ Z a ¯a a ¯ with u(t) = tn, v0(t) = e¡st, a = 0, b = ¯ 1 1 1 e¡st n 1 F (s) = tne¡st dt = tn ¡ + tn¡1e¡st dt Z µ s ¶¯ s Z 0 ¯0 0 n ¯ = (tn¡1) ¯ s L provided tne¡st 0 if t , which is true for s > 0 ! ! 1 < applying the formula recusively, we obtain n! F (s) = sn+1 valid for s > 0; ¯nal formula OK for all s = 0 < 6 The Laplace transform 3{8 Impulses at t = 0 if f contains impulses at t = 0 we choose to include them in the integral de¯ning F : 1 F (s) = f(t)e¡st dt Z0¡ (you can also choose to not include them, but this changes some formulas we'll see & use) example: impulse function, f = ± 1 ¡st ¡st F (s) = ±(t)e dt = e t=0 = 1 Z ¡ 0 ¯ ¯ similarly for f = ±(k) we have 1 k (k) ¡st k d ¡st k ¡st k F (s) = ± (t)e dt = ( 1) k e = s e t=0 = s Z ¡ ¡ dt ¯ 0 ¯t=0 ¯ ¯ ¯ ¯ The Laplace transform 3{9 Linearity the Laplace transform is linear: if f and g are any signals, and a is any scalar, we have (af) = aF; (f + g) = F + G L L i.e., homogeneity & superposition hold example: 3±(t) 2et = 3 (±(t)) 2 (et) L ¡ L ¡ L ¡ ¢ 2 = 3 ¡ s 1 ¡ 3s 5 = ¡ s 1 ¡ The Laplace transform 3{10 One-to-one property the Laplace transform is one-to-one: if (f) = (g) then f = g L L (well, almost; see below) F determines f ² inverse Laplace transform ¡1 is well de¯ned ² L (not easy to show) example (previous page): 3s 5 ¡1 ¡ = 3±(t) 2et L µ s 1 ¶ ¡ ¡ in other words, the only function f such that 3s 5 F (s) = ¡ s 1 ¡ is f(t) = 3±(t) 2et ¡ The Laplace transform 3{11 what `almost' means: if f and g di®er only at a ¯nite number of points (where there aren't impulses) then F = G examples: f de¯ned as ² 1 t = 2 f(t) = ½ 0 t = 2 6 has F = 0 f de¯ned as ² 1=2 t = 0 f(t) = ½ 1 t > 0 has F = 1=s (same as unit step) The Laplace transform 3{12 Inverse Laplace transform in principle we can recover f from F via 1 σ+j1 f(t) = F (s)est ds 2¼j Zσ¡j1 where σ is large enough that F (s) is de¯ned for s σ < ¸ surprisingly, this formula isn't really useful! The Laplace transform 3{13 Time scaling de¯ne signal g by g(t) = f(at), where a > 0; then G(s) = (1=a)F (s=a) makes sense: times are scaled by a, frequencies by 1=a let's check: 1 1 G(s) = f(at)e¡st dt = (1=a) f(¿)e¡(s=a)¿ d¿ = (1=a)F (s=a) Z0 Z0 where ¿ = at example: (et) = 1=(s 1) so L ¡ 1 1 (eat) = (1=a) = L (s=a) 1 s a ¡ ¡ The Laplace transform 3{14 Exponential scaling let f be a signal and a a scalar, and de¯ne g(t) = eatf(t); then G(s) = F (s a) ¡ let's check: 1 1 G(s) = e¡steatf(t) dt = e¡(s¡a)tf(t) dt = F (s a) Z0 Z0 ¡ example: (cos t) = s=(s2 + 1), and hence L s + 1 s + 1 (e¡t cos t) = = L (s + 1)2 + 1 s2 + 2s + 2 The Laplace transform 3{15 Time delay let f be a signal and T > 0; de¯ne the signal g as 0 0 t < T g(t) = · ½ f(t T ) t T ¡ ¸ (g is f, delayed by T seconds & `zero-padded' up to T ) f(t) g(t) PSfrag replacements t t t = T The Laplace transform 3{16 then we have G(s) = e¡sT F (s) derivation: 1 1 G(s) = e¡stg(t) dt = e¡stf(t T ) dt Z0 ZT ¡ 1 = e¡s(¿+T )f(¿) d¿ Z0 = e¡sT F (s) The Laplace transform 3{17 example: let's ¯nd the Laplace transform of a rectangular pulse signal 1 if a t b f(t) = · · ½ 0 otherwise where 0 < a < b we can write f as f = f f where 1 ¡ 2 1 t a 1 t b f1(t) = ¸ f2(t) = ¸ ½ 0 t < a ½ 0 t < b i.e., f is a unit step delayed a seconds, minus a unit step delayed b seconds hence F (s) = (f ) (f ) L 1 ¡ L 2 e¡as e¡bs = ¡ s (can check by direct integration) The Laplace transform 3{18 Derivative if signal f is continuous at t = 0, then (f 0) = sF (s) f(0) L ¡ time-domain di®erentiation becomes multiplication by frequency ² variable s (as with phasors) plus a term that includes initial condition (i.e., f(0)) ² ¡ higher-order derivatives: applying derivative formula twice yields (f 00) = s (f 0) f 0(0) L L ¡ = s(sF (s) f(0)) f 0(0) ¡ ¡ = s2F (s) sf(0) f 0(0) ¡ ¡ similar formulas hold for (f (k)) L The Laplace transform 3{19 examples f(t) = et, so f 0(t) = et and ² 1 (f) = (f 0) = L L s 1 ¡ 1 using the formula, (f 0) = s( ) 1, which is the same L s 1 ¡ ¡ sin !t = 1 d cos !t, so ² ¡! dt 1 s ! (sin !t) = s 1 = L ¡! µ s2 + !2 ¡ ¶ s2 + !2 f is unit ramp, so f 0 is unit step ² 1 (f 0) = s 0 = 1=s L µs2¶ ¡ The Laplace transform 3{20 derivation of derivative formula: start from the de¯ning integral 1 G(s) = f 0(t)e¡stdt Z0 integration by parts yields 1 1 G(s) = e¡stf(t) f(t)( se¡st) dt 0 ¡ Z ¡ ¯ 0 = lim f(t)¯e¡st f(0) + sF (s) t!1 ¡ for s large enough the limit is zero, and we recover the formula < G(s) = sF (s) f(0) ¡ The Laplace transform 3{21 derivative formula for discontinuous functions if signal f is discontinuous at t = 0, then (f 0) = sF (s) f(0 ) L ¡ ¡ example: f is unit step, so f 0(t) = ±(t) 1 (f 0) = s 0 = 1 L µs¶ ¡ The Laplace transform 3{22 Example: RC circuit 1 PSfrag replacements u 1F y capacitor is uncharged at t = 0, i.e., y(0) = 0 ² u(t) is a unit step ² from last lecture, y0(t) + y(t) = u(t) take Laplace transform, term by term: sY (s) + Y (s) = 1=s (using y(0) = 0 and U(s) = 1=s) The Laplace transform 3{23 solve for Y (s) (just algebra!) to get 1=s 1 Y (s) = = s + 1 s(s + 1) to ¯nd y, we ¯rst express Y as 1 1 Y (s) = s ¡ s + 1 (check!) therefore we have y(t) = ¡1(1=s) ¡1(1=(s + 1)) = 1 e¡t L ¡ L ¡ Laplace transform turned a di®erential equation into an algebraic equation (more on this later) The Laplace transform 3{24 Integral let g be the running integral of a signal f, i.e., t g(t) = f(¿) d¿ Z0 then 1 G(s) = F (s) s i.e., time-domain integral becomes division by frequency variable s example: f = ±, so F (s) = 1; g is the unit step function G(s) = 1=s example: f is unit step function, so F (s) = 1=s; g is the unit ramp function (g(t) = t for t 0), ¸ G(s) = 1=s2 The Laplace transform 3{25 derivation of integral formula: 1 t 1 t G(s) = f(¿) d¿ e¡st dt = f(¿)e¡st d¿ dt Zt=0 µZ¿=0 ¶ Zt=0 Z¿=0 here we integrate horizontally ¯rst over the triangle 0 ¿ t t · · PSfrag replacements ¿ let's switch the order, i.e., integrate vertically ¯rst: 1 1 1 1 G(s) = f(¿)e¡st dt d¿ = f(¿) e¡st dt d¿ Z¿=0 Zt=¿ Z¿=0 µZt=¿ ¶ 1 = f(¿)(1=s)e¡s¿ d¿ Z¿=0 = F (s)=s The Laplace transform 3{26 Multiplication by t let f be a signal and de¯ne g(t) = tf(t) then we have G(s) = F 0(s) ¡ to verify formula, just di®erentiate both sides of 1 F (s) = e¡stf(t) dt Z0 with respect to s to get 1 F 0(s) = ( t)e¡stf(t) dt Z0 ¡ The Laplace transform 3{27 examples f(t) = e¡t, g(t) = te¡t ² d 1 1 (te¡t) = = L ¡ds s + 1 (s + 1)2 f(t) = te¡t, g(t) = t2e¡t ² d 1 2 (t2e¡t) = = L ¡ds (s + 1)2 (s + 1)3 in general, ² (k 1)! (tke¡t) = ¡ L (s + 1)k+1 The Laplace transform 3{28 Convolution