IMGS-6 Solution Set #7. Sketch the following functions and evaluate their continuous Fourier transforms 0 if > (a) f [] if if < Solution: Another way to write this is in the form f [] h i So this is really f [] RECT 0 if > >< if if < <<+ if + 0 if + > RECT[/]...0 0.8 0.6 0. 0. - -3 - - 3-0. -0. TheFouriertransformiseasytoderivebydirectintegration: F n h io RECT h i RECT ep [ i π ξ] d
The function evaluates to zero outside the window ± and to unity inside it: F n h io RECT Z + ep [ i π ξ] d ep [ i π ξ] i π ξ + ep [ i π ξ ] ep [ i π ξ ( )] i π ξ i π ξ ep [ i π ξ ] ep [ i π ξ ( )] i πξ ep [+i π ξ ] ep [ i π ξ ] i πξ sin [πξ] πξ sin [πξ] sin [π ξ] πξ π ξ SINC [ξ] " # F{f []} F [ξ] SINC ξ F[i] 3 - -3 - - 3 - F RECT ª SINC [ξ] (red solid) compared to F{RECT []} SINC [ξ] (black dashed line), showing that the spectrum of the wider rectangle is taller and skinnier. i
0 if > if (b) f [] if 0 << if 0 0 if <0 Solution: Again, draw the function first: RECT[(-)/]...0 0.8 0.6 0. 0. - - 3 5 6-0. -0. Now evaluate the Fourier transform: F{f []} Z [] ep [ i π ξ] d 0 ep [ i π ξ] i π ξ 0 ep [ i π ξ ] ep [ i π ξ 0] i π ξ i π ξ ep [ i π ξ ] i π ξ 3
Note that there is a common factor here: ep [ i π ξ ] i π ξ ep [ i π ξ ] ep [ i π ξ ] + ep [ i π ξ ] ep [+i π ξ ] +i π ξ ep [+i π ξ ] ep [ i π ξ ] ep[ i π ξ ] i πξ sin [πξ] ep[ i π ξ ] πξ sin [π ξ] ep[ i π ξ] π ξ ep[ i π ξ] SINC [ξ] " # ep[ i π ξ] SINC ξ Note that the eponential may be recast by applying the Euler relation: ep [ iθ] cos[θ] i sin [θ] ep [ i π ξ] cos[πξ] i sin [πξ] so the spectrum is: Ã " #! Ã " #! F [ξ] SINC ξ ξ cos [πξ] i SINC sin [πξ] So we can graph the real part and imaginary part separately: sin π ( ξ ) Re {F [ξ]} cos [πξ] π ( ξ ) Re{F[i]} -.0 -.5 -.0-0.5 0.5.0.5.0 - - Re {F [ξ]} in solid red and SINC [ξ] in dashed black
Im{F[i]} -.0 -.5 -.0-0.5 0.5.0.5.0 - - Im {F [ξ]} in solid red and SINC [ξ] in dashed black 5
(c) f 3 [] ep[ ] STEP [] Solution: We did this one in class: f3[]..0 0.8 0.6 0. 0. -5 - -3 - - 3 5-0. The spectrum of this function is: -0. -0.6-0.8 -.0 -. F 3 [ξ] F{ep [ ] STEP []} 0 ep [ ] STEP [] ep [ i π ξ] d ep [ ] ep [ i π ξ] d ep [ ( + i πξ) ] d 0 ep [ ( + i πξ) ] + ( + i πξ) 0 ep [ ( + i πξ) ] ( + i πξ) +i πξ µ i πξ +i πξ i πξ i πξ +(πξ) ep [ ( + i πξ) 0] ( + i πξ) Re {F 3 [ξ]} Im {F 3 [ξ]} +(πξ) πξ +(πξ) 6
Real -5 - -3 - - 3 5 i - - Re {F 3 [ξ]} +(πξ) Imaginary -5 - -3 - - 3 5 i - - Im {F 3 [ξ]} πξ +(πξ) 7
(d) f [] ep STEP Solution: This is scaled version of (c); it is twice as wide. f[]..0 0.8 0.6 0. 0. -5 - -3 - - 3 5-0. Thespectrumofthisfunctioniseasytoevaluateinthesameway. First,note that h i STEP STEP [] because the transition point does not move n h F 3 [ξ] F ep i h io n h STEP F ep i o STEP [] Z + h ep i STEP [] ep [ i π ξ] d h ep i ep [ i π ξ] d 0 µ ep 0 + i πξ d µ +i πξ ep d 0 ep +i πξ + +i πξ 0 ep +i πξ ep +i πξ 0 +i πξ +i πξ +i πξ i 8πξ +(πξ) +i πξ µ i πξ i πξ 8-0. -0.6-0.8 -.0 -. +i πξ
Re {F 3 [ξ]} Im {F 3 [ξ]} +(πξ) 8πξ +(πξ) Real -5 - -3 - - 3 5 i - - Re {F 3 [ξ]} +(πξ) Imaginary -5 - -3 - - 3 5 i - - Im {F 3 [ξ]} πξ +(πξ) 9
. The operation of convolution of two functions f [] and h [] is defined: f [] h [] f [α] h [ α] dα Evaluate the convolution of f [] cos π + π with the following functions for h [] and sketch (or plot) the results: (a) h [] RECT [] g [] f [] h [] h cos π + π i RECT [] Z α+ ³ h cos π α α + π i RECT [ α] dα Z α+ ³ h cos π α + π i dα α sin π α + π α+ π α sin π (+ ) + π π h π cos π + π i sin π ( ) + π π so the input function is: h f [] cos π + π i f[], g[]..0 0.8 0.6 0. 0. -5 - -3 - - 3 5-0. -0. -0.6-0.8 -.0 -. f [] as black dashed line and g [] has red solid line 0
and the output function is: g [] h π cos π + π i π f [] so the amplitude of the output function is reduced from unity to π 0.637
(b) h [] RECT g [] f [] h [] h cos π + π i h i RECT Z α+ ³ h cos π α α + π i Z α+ ³ h cos π α α + π i dα α+ sin π α + π π α µ ( +) sin π + π π ³ h sin π π + π + π i ³ h sin π π + π i +sin 0[] RECT ( ) sin π h sin α dα π π + π i h π + π + π i So the local average of the sinusoid over the full cycle evaluates to 0: f[], g[]..0 0.8 0.6 0. 0. -5 - -3 - - 3 5-0. -0. -0.6-0.8 -.0 -. f [] as black dashed line and g [] has red solid line
3. Evaluate the convolutions of the following functions by direct integration and sketch (or plot) the results: (a) g [] RECT [] RECT [] g [] Solution by direct integration: RECT [α] RECT [ α] dα RECT [α] RECT [ α] dα Z α+ α Z + Z + RECT [ α] dα RECT [ ( α)] dα RECT [α ] dα because RECT [] is even If the nonzero amplitude of the rectangle in the integral does not overlap the limits of the integral, then the area of the rectangle is zero: g [ < ] g [ >+] Z + Z + 0 dα 0 0 dα 0 So we only need evaluate the ouput for two cases. In the first, the translation parameter of the rectangle is between and 0, then only its upper edge lies within the limits of integration, and the upper limit of the integral becomes + : g [ <<0] Z + dα µ + µ + 3
The convolution of two rectangles for <<0: the red-line rectangle is RECT [α] and the green-line rectangle is RECT [ α] where <<0. The area of the product of the two rectangles is cross-hatched in green, which is the numerical value of the convolution for that The convolution of two rectangles for 0: the red-line rectangle is RECT [α] and the green-line rectangle is RECT [0 α]. The unit area of the product of the two rectangles is cross-hatched in green.
The convolution of two rectangles for 0 <<+: the red-line rectangle is RECT [α] and the green-line rectangle is RECT [ α]. The area of the product of the two rectangles is cross-hatched in green. In the other case, the translation parameter of the rectangle is between 0 and +, then only its left edge lies within the limits of integration, and the lower limit of the integral becomes : g [0 <<] Z + dα so the complete epression for the output is: 0 if >+ if 0 <<+ g [] + if <<0 0 if < which we call the triangle function. µ µ TRI[] g[].5.0 0.5-5 - -3 - - 3 5-0.5 -.0 -.5 5
(b) g [] RECT RECT This is the same problem as (a) ecept that the rectangles are twice as wide: h α i α g [] RECT RECT dα Solution by direct integration: h α i α RECT RECT dα Z α+ α Z + Z + α RECT dα µ α RECT dα α RECT dα (again because RECT [] is even). If the nonzero amplitude of the rectangle in the integral does not overlap the limits of the integral, then the area of the rectangle is zero: g [ < ] g [ >+] Z + Z + 0 dα 0 0 dα 0 So we only need evaluate the ouput for two cases. In the first, the translation parameter of the rectangle is between and 0, then only its upper edge lies within the limits of integration, and the upper limit of the integral becomes + : g [ <<0] Z + dα ( +) ( ) + In the other case, the translation parameter of the rectangle is between 0 and +, then only its left edge lies within the limits of integration, and the lower limit of the integral becomes : g [0 <<+] Z + dα () ( ) so the complete epression for the output is: 0 if >+ if 0 <<+ g [] + if <<0 0 if < h i TRI 6
g[].5.0.5.0 0.5-5 - -3 - - 3 5-0.5 (c) g 3 [] RECT [] RECT [] RECT [] From the facts that convolution is associative and commutative, we can see that g 3 [] RECT [] RECT [] RECT [] TRI[] RECT [] RECT [] TRI[] TRI[] RECT [] TRI[α] RECT [ α] dα n h α io ( α ) RECT RECT [ α] dα becausewecanwritethetriangleastheproductof ( ) and the window function RECT. SKETCHES WILL HELP YOU DETERMINE THE LIMITS IN THE FOLLOWING SECTIONS. The convolution evaluates to: h α i TRI[] RECT [] ( α ) RECT RECT [ α] dα Z + Z 0 ( α ) RECT [ α] dα ( + α) RECT [ α] dα + Z + 0 ( α) RECT [ α] dα Where the rectangle intercepts the rising part of the triangle, the integral eval- 7
uates to: If 3 Z + < < Ã µ + + µµ + + ( + α) dα µα + α! Ã! + ( ) µ + + µ + + α+ α + 3 + 9 8 which is a quadratic function of, as you would epect since we are integrating a linear function of. The symmetric interval (where the rectangle intercepts the falling part of the triangle) yields a similar result: If < < 3 Z ( α) dα µα α α α 3 + 9 8 In between these two, we have to include contributions from both sides of the triangle: If < < + Z 0 µ + 3 8 ( + α) dα + + Z + µ + + 3 8 0 ( α) dα 3 So the convolution is the sum of these three piecewise sections: 0 if > 3 + 3 + 9 if 3 << 8 3 TRI[] RECT [] if <<+ 3 + 9 if << 3 8 0 if < 3 8
TRI[] * RECT[]..0 0.8 0.6 0. 0. -3 - - 3-0. TRI[] RECT [] in red solid, TRI[] in blue dashed, and RECT [] in black dot-dash. 9
. Evaluate and sketch (or plot) the following convolutions: (a) (ep [ ] STEP []) RECT [] (ep [ ] STEP []) RECT [] Z α+ α Z α+ α0 (ep [ α] STEP [α]) (RECT [ α]) dα ep [ α] (RECT [ α]) dα 0 if < R α+ ep [ α] dα if <<+ α0 ep [ α] dα if >+ R α+ α ( ep [ α]) + 0 ep + ( ep [ α]) + 0 if < if <<+ if >+ ep ep + 0 if < ep [ ] ep if <<+ ep [ ] ep +ep + if >+ y 0.9 0.8 0.7 0.6 0.5 0. 0.3 0. 0. -5 - -3 - - 0 3 5 0
(b) (ep [ ] STEP []) (ep [ ] STEP []) We did this one in class, so you d better get it right! (ep [ ] STEP []) (ep [ ] STEP []) Z α+ α Z α+ α0 Z α+ α0 ep[ ] ep[ ] (ep [ α] STEP [α]) (ep [ ( α)] STEP [ α]) dα ep [ α] (ep [ ( α)] STEP [ α]) dα ep [ α] ep [ ] ep [+α] STEP [ α] dα Z α+ α0 Z α+ α0 (ep [ α] ep [+α]) STEP [ α] dα STEP [ α] dα If 0, the intervals do not overlap and the area of the product is zero. If >0, then the function evaluates to: ep [ ] Z α α0 dα ep[ ] ( 0) ep [ ] if >0 So the full prescription is: (ep [ ] STEP []) (ep [ ] STEP []) ½ ep [ ] if >0 0 if 0 ep [ ] STEP [] ep[-] STEP[].0 0.8 0.6 0. 0. -5 - -3 - - 3 5 6 7 8 9 0-0. -0. ep [ ] STEP [] (black dashed line) and ep [ ] STEP [] ep [ ] STEP [] (red solid line)