MATH661 HW03 - SVD applications

Posted: 09/13/23

Due: 09/20/23, 11:59PM

Tracks 1 & 2: 1. Track 2: 2.

This homework marks your first foray into realistic scientific computation by applying concepts from linear algebra, specifically the singular value decomposition to the analysis of hurricane Lee, still active at this time.

1Image data

Processing of image data through the tools of linear algebra is often encountered, and in this assignment you shall work with satellite images of hurricane Lee of 2023 Season. Open the following folds and execute the code to set up your environment.

The following commands within a BASH shell brings up an animation of hurricane Lee (ImageMagick package must be installed and in the system path.

The model will use various Julia packages to process image data, carry out linear algebra operations. The following commands build the appropriate Julia environment. The Julia packages are downloaded, compiled and stored in your local Julia library. Note: compiling the Images package takes a long time and it's best to do this within a terminal window. Compiling the packages need only be done once.

Once compiled, packages are imported into the current environment

With appropriate packages in place and available, the satellite imagery can be imported into the Julia environment and used to insert images such as the one in Fig.

pre=homedir()*"/courses/MATH661/data/weather/";
gif=load(pre*"HurricaneLee.gif");
(mx,my,nf)=size(gif)

[ 720 850 100 ] (1)

The following commands display the nth frame in the animation, and save it within a homework directory. Use this template to save interesting images

n=20; frame = Gray.(gif[:,:,n]);
A = Float32.(frame); clf(); imshow(A,cmap="gray");
hwdir=homedir()*"/courses/MATH661/homework/H03"; 
savefig(hwdir*"/H03Fig01.png");

Figure 1. Night-time satellite imagery of hurricane Lee. Superimposed on the familiar overall anti-cyclone pattern are small-scale features (lightning, cloud patterns in the arms). The SVD can be used to distinguish between small and large scale features.

2

  1. Approximate b(t)=t(π-t)(2π-t) on the interval [0,2π) by the following series and study the convergence behavior of the solution. The pseudo-matrix A(t) arising in the approximation is shown in each case

    1. Cosine series

      b(t)k=1nykcos(kt),
      A(t)=[ 1 cos(t) cos(2t) cos(nt) ],A:n+1.
    2. Trigonometric series

      b(t)k=1n[xkcos(kt)+yksin(kt)],
      A(t)=[ 1 cos(t) sin(t) cos(2t) sin(2t) cos(nt) sin(nt) ],A(t):2n+1.

    3. Sine series

      b(t)k=1nyksin(kt),
      A(t)=[ sin(t) sin(2t) sin(nt) ],A:n.
    4. Triangle wave series

      b(t)k=1nzkWk(t),
      A(t)=[ W1(t) W2(t) Wn(t) ],A:n,

      with

      Wk(t)=1-4|12-14+kt2π|,

      where x is the fractional part of x, e.g., 1.15=0.15.

  2. Study the analytical theory underlying the above approximations by considering the following.

    1. State the convergence theorem for Fourier series and the Fourier coefficient formulas (see, e.g., [1]). Analytically compute the Fourier coefficients for b(t)=t(π-t)(2π-t). Use of a symbolic computation package (e.g., Maxima, Mathematica) eliminates tedious hand computation.

    2. Compare the analytically computed Fourier coefficients with the numerical results obtained in Problem 1, a)-c). Assess the analytically predicted Fourier series convergence by comparison to the numerical results.

    3. Carry out series approximations as in Problem 1, a)-d) of

      c(t)=π34[H(t)-2H(.t-π).]

      where H(x) is the Heaviside step function

      H(x)={ 0 x<0 1 x>0 ..
    4. Again, compare analytically evaluated Fourier coefficients with numerical results. How do the approximations of c(t) behave differently from those of b(t)?

Bibliography

[1]

Erwin Kreyszig. Advanced engineering mathematics. Hoboken, NJ : John Wiley, c2006., 9th ed. edition, 2006.