diff --git a/_animations/1_animation.md b/_animations/1_animation.md deleted file mode 100644 index 938e4a2..0000000 --- a/_animations/1_animation.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -layout: page -title: Radiation from Spheres -description: sound radiation -img: assets/img/projects/rfz_optimization.gif -importance: 1 -category: sound radiation ---- - -Every project has a beautiful feature showcase page. -It's easy to include images in a flexible 3-column grid format. -Make your photos 1/3, 2/3, or full width. - -To give your project a background in the portfolio page, just add the img tag to the front matter like so: - - --- - layout: page - title: project - description: a project with a background image - img: /assets/img/12.jpg - --- - -
-
- {% include figure.html path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} -
-
- {% include figure.html path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} -
-
- {% include figure.html path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} -
-
-
- Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. -
-
-
- {% include figure.html path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} -
-
-
- This image can also have a caption. It's like magic. -
- -You can also put regular text between your rows of images. -Say you wanted to write a little bit about your project before you posted the rest of the images. -You describe how you toiled, sweated, *bled* for your project, and then... you reveal its glory in the next row of images. - - -
-
- {% include figure.html path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} -
-
- {% include figure.html path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} -
-
-
- You can also have artistically styled 2/3 + 1/3 images, like these. -
- - -The code is simple. -Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). -To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. -Here's the code for the last row of images above: - -{% raw %} -```html -
-
- {% include figure.html path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} -
-
- {% include figure.html path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} -
-
-``` -{% endraw %} diff --git a/_animations/convolution_animations.asv b/_animations/convolution_animations.asv new file mode 100644 index 0000000..928979b --- /dev/null +++ b/_animations/convolution_animations.asv @@ -0,0 +1,456 @@ +close all; clear; clc; + +close all; clear; clc; + + +%% convolution 1 +close all; +figure('units', 'inches', 'position', [1, 1, 5, 9]); + +n = -20:20; + +h = (0.7).^n; +h(n < 0) = 0; +ht = h(n >= 0); + +x1 = zeros(size(n)); +x1(n == 0) = 1; +y1 = conv(x1, ht); +y1 = y1(1:length(x1)); + +x2 = zeros(size(n)); +x2(n == 5) = 1.5; +y2 = conv(x2, ht); +y2 = y2(1:length(x2)); + +x3 = x2 + x1; +y3 = conv(x3, ht); +y3 = y3(1:length(x3)); + +subplot(3, 2, 1) +stem(n, x1, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$x[n]$'); + +subplot(3, 2, 2) +stem(n, y1, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$y[n]$'); + +subplot(3, 2, 3) +stem(n, x2, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$x[n]$'); + +subplot(3, 2, 4) +stem(n, y2, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$y[n]$'); + + +subplot(3, 2, 5) +stem(n, x3, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$x[n]$'); + +subplot(3, 2, 6) +stem(n, y3, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$y[n]$'); + + +exportgraphics(gcf, '2_convolution_intro.jpg', 'resolution', 300); + + + +%% convolution gif +close all; +figure('units', 'inches', 'position', [1, 1, 9, 4], 'color', 'w'); + +n = -5:40; + +h = (0.7).^n; +h(n < 0) = 0; +ht = h(n >= 0); + +x = (0.9).^n .* cos(n/3); +x(n < 0) = 0; + +xl = [-5, 40]; + +subplot(2, 3, 1) +stem(n, x, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlim(xl); +xlabel('$n$'); +title('$x[n]$'); + +subplot(2, 3, 2) +stem(n, h, 'k', 'filled', 'MarkerSize', 3); +grid on +ylim([-1, 2]); +xlim(xl); +xlabel('$n$'); +title('$h[n]$'); + +subplot(2, 3, 3) +stem(n, filter(ht, 1, x), 'k', 'filled', 'MarkerSize', 3); +grid on +ylim([-1, 2]); +xlim(xl); +xlabel('$n$'); +title('$y[n]$'); + + + + + +yc = zeros(size(x)); +for nn = n + + subplot(2, 3, 4) + stem(n, x, 'k', 'filled','MarkerSize', 3); + hold on + scatter(nn, x(nn == n), 'r', 'LineWidth', 2); + hold off + grid on + ylim([-1, 2]); + xlim(xl); + xlabel('$n$'); + title(sprintf('$x[%d]$', nn)); + + + hc = x(nn == n) * (0.7).^(n - nn); + hc(n < nn) = 0; + subplot(2, 3, 5) + stem(n, hc, 'r', 'filled','MarkerSize', 3); + hold off + grid on + xlim(xl); + ylim([-1, 2]); + xlabel('$n$'); + if nn < 0 + title(sprintf('$x[%d]h[n + %d]$', nn, abs(nn))); + else + title(sprintf('$x[%d]h[n - %d]$', nn, nn)); + end + + yc = yc + hc; + + subplot(2, 3, 6); + stem(n, yc, 'k', 'filled','MarkerSize', 3); + hold off + grid on + xlim(xl); + ylim([-1, 2]); + xlabel('$n$'); + if nn < 0 + title(sprintf('$\\sum_{m=-\\infty}^{-%d} x[%d]h[n + %d]$', abs(nn), nn, abs(nn))); + else + title(sprintf('$\\sum_{m=-\\infty}^{%d} x[%d]h[n-%d]$', nn, nn, nn)); + end + + + if nn == n(1) + gif('../assets/img/animations/convolution.gif', 'overwrite', true); + else + gif; + end + +end + + + +%% Graphical Convolution + + +close all; +figure('units', 'inches', 'position', [1, 1, 9, 8], 'color', 'w'); + +t = linspace(-3, 3, 3001); + +x = @(t) heaviside(t + 1) - heaviside(t - 1); + +h1 = @(t) (heaviside(t) - heaviside(t - 1)); +h2 = @(t) (heaviside(t) - heaviside(t - 1)) .* (1 - t); +h3 = @(t) exp(-4 * t.^2); + +y = zeros(length(t),3); + +a = -2; +b = 2; + +integrand = @(tau, t, x, h) x(tau) .* h(t - tau); + + +for i = 1:length(t) + y(i,1) = integral(@(tau) integrand(tau, t(i), x, h1), a, b,... + 'Waypoints', [0, 1, 2, 3]); + + y(i,2) = integral(@(tau) integrand(tau, t(i), x, h2), a, b,... + 'Waypoints', [0, 1, 2, 3]); + + y(i,3) = integral(@(tau) integrand(tau, t(i), x, h3), a, b,... + 'Waypoints', [0, 1, 2, 3]); +end + +for j = 1:3 + y(:,j) = movmedian(y(:,j), 5); +end + +h = {h1, h2, h3}; +for i = 1:3 +subplot(4, 3, i) +plot(t, x(t), 'k', 'LineWidth', 1); +grid on +ylim([-1, 2]); +xlim([-3, 3]); +ylabel('$x(t)$'); + +subplot(4, 3, 3 + i) +plot(t, h{i}(t), 'k', 'LineWidth', 1); +grid on +xlim([-3, 3]); +ylim([-1, 2]); +ylabel('$h(t)$'); + +end + +dt = 25 * (t(2) - t(1)); +dt = 0.05; +tau = -2; + + +for i = 1:100 + + tau = tau + dt; + + + hf = h(tau - t); + + subplot(4, 1, 3) + plot(t, x(t), 'k', 'LineWidth', 1); + hold on + plot(t, hf, 'r', 'LineWidth', 1); + grid on + hold off + xlim([-3, 3]); + ylim([-1, 2]); + ylabel('$x(t), h(\tau - t)$'); + + subplot(4, 1, 4); + plot(t(t <= tau), y(t <= tau), 'k', 'LineWidth', 1); + grid on + xlim([-3, 3]); + ylim([-1, 2]); + xlabel('$t$'); + ylabel('$y(t)$'); + + if i == 1 + gif('../assets/img/animations/boxcars.gif', 'overwrite', true); + else + gif(); + end + + +end + + +%% Graphical Convolution + +close all; +figure('units', 'inches', 'position', [1, 1, 3, 8], 'color', 'w'); + +t = linspace(-3, 3, 3001); + +x = @(t) heaviside(t + 1) - heaviside(t - 1); + +h = @(t) (heaviside(t) - heaviside(t - 1)) .* (1 - t); + + +y = zeros(size(t)); + +a = -2; +b = 2; + +integrand = @(tau, t, x, h) x(tau) .* h(t - tau); + + +for i = 1:length(t) + + y(i) = integral(@(tau) integrand(tau, t(i), x, h), a, b,... + 'Waypoints', [0, 1, 2, 3]); + +end + +y = movmedian(y, 5); + + + + + +subplot(4, 1, 1) +plot(t, x(t), 'k', 'LineWidth', 1); +grid on +ylim([-1, 2]); +xlim([-3, 3]); +ylabel('$x(t)$'); + +subplot(4, 1, 2) +plot(t, h(t), 'k', 'LineWidth', 1); +grid on +xlim([-3, 3]); +ylim([-1, 2]); +ylabel('$h(t)$'); + +dt = 25 * (t(2) - t(1)); +dt = 0.05; +tau = -2; + + +for i = 1:100 + + tau = tau + dt; + + + hf = h(tau - t); + + subplot(4, 1, 3) + plot(t, x(t), 'k', 'LineWidth', 1); + hold on + plot(t, hf, 'r', 'LineWidth', 1); + grid on + hold off + xlim([-3, 3]); + ylim([-1, 2]); + ylabel('$x(t), h(\tau - t)$'); + + subplot(4, 1, 4); + plot(t(t <= tau), y(t <= tau), 'k', 'LineWidth', 1); + grid on + xlim([-3, 3]); + ylim([-1, 2]); + xlabel('$t$'); + ylabel('$y(t)$'); + + if i == 1 + gif('../assets/img/animations/trianglecar.gif', 'overwrite', true); + else + gif(); + end + + +end + + +%% Graphical Convolution + +close all; +figure('units', 'inches', 'position', [1, 1, 3, 8], 'color', 'w'); + +t = linspace(-3, 3, 3001); + +x = @(t) heaviside(t + 1) - heaviside(t - 1); + +h = @(t) exp(-4 * t.^2); + + + +y = zeros(size(t)); + +a = -2; +b = 2; + +integrand = @(tau, t, x, h) x(tau) .* h(t - tau); + + +for i = 1:length(t) + + y(i) = integral(@(tau) integrand(tau, t(i), x, h), a, b,... + 'Waypoints', [0, 1, 2, 3]); + +end + +y = movmedian(y, 5); + + + + + +subplot(4, 1, 1) +plot(t, x(t), 'k', 'LineWidth', 1); +grid on +ylim([-1, 2]); +xlim([-3, 3]); +ylabel('$x(t)$'); + +subplot(4, 1, 2) +plot(t, h(t), 'k', 'LineWidth', 1); +grid on +xlim([-3, 3]); +ylim([-1, 2]); +ylabel('$h(t)$'); + +dt = 25 * (t(2) - t(1)); +dt = 0.05; +tau = -2; + + +for i = 1:100 + + tau = tau + dt; + + + hf = h(tau - t); + + subplot(4, 1, 3) + plot(t, x(t), 'k', 'LineWidth', 1); + hold on + plot(t, hf, 'r', 'LineWidth', 1); + grid on + hold off + xlim([-3, 3]); + ylim([-1, 2]); + ylabel('$x(t), h(\tau - t)$'); + + subplot(4, 1, 4); + plot(t(t <= tau), y(t <= tau), 'k', 'LineWidth', 1); + grid on + xlim([-3, 3]); + ylim([-1, 2]); + xlabel('$t$'); + ylabel('$y(t)$'); + + if i == 1 + gif('../assets/img/animations/gausscar.gif', 'overwrite', true); + else + gif(); + end + + +end + + +%% + + + + + + + + + diff --git a/_animations/convolution_animations.m b/_animations/convolution_animations.m new file mode 100644 index 0000000..da9828a --- /dev/null +++ b/_animations/convolution_animations.m @@ -0,0 +1,490 @@ +close all; clear; clc; + +close all; clear; clc; + + +%% convolution 1 +close all; +figure('units', 'inches', 'position', [1, 1, 5, 9]); + + +color = [88, 166, 255] / 255; + +n = -20:20; + +h = (0.7).^n; +h(n < 0) = 0; +ht = h(n >= 0); + +x1 = zeros(size(n)); +x1(n == 0) = 1; +y1 = conv(x1, ht); +y1 = y1(1:length(x1)); + +x2 = zeros(size(n)); +x2(n == 5) = 1.5; +y2 = conv(x2, ht); +y2 = y2(1:length(x2)); + +x3 = x2 + x1; +y3 = conv(x3, ht); +y3 = y3(1:length(x3)); + +subplot(3, 2, 1) +stem(n, x1, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$x[n]$'); + +subplot(3, 2, 2) +stem(n, y1, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$y[n]$'); + +subplot(3, 2, 3) +stem(n, x2, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$x[n]$'); + +subplot(3, 2, 4) +stem(n, y2, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$y[n]$'); + + +subplot(3, 2, 5) +stem(n, x3, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$x[n]$'); + +subplot(3, 2, 6) +stem(n, y3, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlabel('$n$'); +ylabel('$y[n]$'); + + +exportgraphics(gcf, '2_convolution_intro.jpg', 'resolution', 300); + + + +%% convolution gif +close all; +figure('units', 'inches', 'position', [1, 1, 9, 4], 'color', 'w'); + + +color = [88, 166, 255] / 255; +n = -5:40; + +h = (0.7).^n; +h(n < 0) = 0; +ht = h(n >= 0); + +x = (0.9).^n .* cos(n/3); +x(n < 0) = 0; + +xl = [-5, 40]; + +subplot(2, 3, 1) +stem(n, x, 'k', 'filled','MarkerSize', 3); +grid on +ylim([-1, 2]); +xlim(xl); +xlabel('$n$'); +title('$x[n]$'); + +subplot(2, 3, 2) +stem(n, h, 'k', 'filled', 'MarkerSize', 3); +grid on +ylim([-1, 2]); +xlim(xl); +xlabel('$n$'); +title('$h[n]$'); + +subplot(2, 3, 3) +stem(n, filter(ht, 1, x), 'k', 'filled', 'MarkerSize', 3); +grid on +ylim([-1, 2]); +xlim(xl); +xlabel('$n$'); +title('$y[n]$'); + + + + + +yc = zeros(size(x)); +for nn = n + + subplot(2, 3, 4) + stem(n, x, 'k', 'filled','MarkerSize', 3); + hold on + scatter(nn, x(nn == n), 30, color, 'LineWidth', 2); + hold off + grid on + ylim([-1, 2]); + xlim(xl); + xlabel('$n$'); + title(sprintf('$x[%d]$', nn)); + + + hc = x(nn == n) * (0.7).^(n - nn); + hc(n < nn) = 0; + subplot(2, 3, 5) + stem(n, hc, 'filled','MarkerSize', 3,'color', color); + hold off + grid on + xlim(xl); + ylim([-1, 2]); + xlabel('$n$'); + if nn < 0 + title(sprintf('$x[%d]h[n + %d]$', nn, abs(nn))); + else + title(sprintf('$x[%d]h[n - %d]$', nn, nn)); + end + + yc = yc + hc; + + subplot(2, 3, 6); + stem(n, yc, 'k', 'filled','MarkerSize', 3); + hold off + grid on + xlim(xl); + ylim([-1, 2]); + xlabel('$n$'); + if nn < 0 + title(sprintf('$\\sum_{m=-\\infty}^{-%d} x[%d]h[n + %d]$', abs(nn), nn, abs(nn))); + else + title(sprintf('$\\sum_{m=-\\infty}^{%d} x[%d]h[n-%d]$', nn, nn, nn)); + end + + + if nn == n(1) + gif('../assets/img/animations/convolution.gif', 'overwrite', true); + else + gif; + end + +end + +%% convolution icon +figure('units', 'pixels', 'position', [20, 20, 400, 400]); +for nn = n + + ycp = yc; + ycp(n > nn) = 0; + stem(n, ycp, 'k', 'filled','MarkerSize', 3); + hold off + grid on + xlim(xl); + ylim([-1, 2]); + xlabel('$n$'); + axis off + + if nn == n(1) + gif('../assets/img/animations/convolution_icon.gif', 'overwrite', true); + else + gif; + end + +end + + + +%% Graphical Convolution + + +close all; +figure('units', 'inches', 'position', [1, 1, 6, 16/3], 'color', 'w'); + +t = linspace(-3, 3, 3001); + +x = @(t) heaviside(t + 1) - heaviside(t - 1); + +h1 = @(t) (heaviside(t) - heaviside(t - 1)); +h2 = @(t) (heaviside(t) - heaviside(t - 1)) .* (1 - t); +h3 = @(t) exp(-4 * t.^2); + +y = zeros(length(t),3); + +a = -2; +b = 2; + +integrand = @(tau, t, x, h) x(tau) .* h(t - tau); + + +for i = 1:length(t) + y(i,1) = integral(@(tau) integrand(tau, t(i), x, h1), a, b,... + 'Waypoints', [0, 1, 2, 3]); + + y(i,2) = integral(@(tau) integrand(tau, t(i), x, h2), a, b,... + 'Waypoints', [0, 1, 2, 3]); + + y(i,3) = integral(@(tau) integrand(tau, t(i), x, h3), a, b,... + 'Waypoints', [0, 1, 2, 3]); +end + +for j = 1:3 + y(:,j) = movmedian(y(:,j), 5); +end + +h = {h1, h2, h3}; + +for i = 1:3 +subplot(4, 3, i) +plot(t, x(t), 'k', 'LineWidth', 1); +grid on +ylim([-1, 2]); +xlim([-3, 3]); +ylabel('$x(t)$'); + +subplot(4, 3, 3 + i) +plot(t, h{i}(t), 'k', 'LineWidth', 1); +grid on +xlim([-3, 3]); +ylim([-1, 2]); +ylabel('$h(t)$'); + +end + +dt = 25 * (t(2) - t(1)); +dt = 0.1; +tau = -2; + + +for i = 1:50 + + tau = tau + dt; + + + + + for j = 1:3 + + hf = h{j}(tau - t); + subplot(4, 3, 6 + j) + plot(t, x(t), 'k', 'LineWidth', 1); + hold on + plot(t, hf, 'color', color, 'LineWidth', 1); + grid on + hold off + xlim([-3, 3]); + ylim([-1, 2]); + ylabel('$x(t), h(\tau - t)$'); + + subplot(4, 3, 9 + j); + plot(t(t <= tau), y(t <= tau,j), 'k', 'LineWidth', 1); + grid on + xlim([-3, 3]); + ylim([-1, 2]); + xlabel('$t$'); + ylabel('$y(t)$'); + + end + + if i == 1 + gif('../assets/img/animations/boxcars.gif', 'overwrite', true,... + 'DelayTime', 4/15); + else + gif(); + end + + +end + + +%% Graphical Convolution + +close all; +figure('units', 'inches', 'position', [1, 1, 3, 8], 'color', 'w'); + +t = linspace(-3, 3, 3001); + +x = @(t) heaviside(t + 1) - heaviside(t - 1); + +h = @(t) (heaviside(t) - heaviside(t - 1)) .* (1 - t); + + +y = zeros(size(t)); + +a = -2; +b = 2; + +integrand = @(tau, t, x, h) x(tau) .* h(t - tau); + + +for i = 1:length(t) + + y(i) = integral(@(tau) integrand(tau, t(i), x, h), a, b,... + 'Waypoints', [0, 1, 2, 3]); + +end + +y = movmedian(y, 5); + + + + + +subplot(4, 1, 1) +plot(t, x(t), 'k', 'LineWidth', 1); +grid on +ylim([-1, 2]); +xlim([-3, 3]); +ylabel('$x(t)$'); + +subplot(4, 1, 2) +plot(t, h(t), 'k', 'LineWidth', 1); +grid on +xlim([-3, 3]); +ylim([-1, 2]); +ylabel('$h(t)$'); + +dt = 25 * (t(2) - t(1)); +dt = 0.05; +tau = -2; + + +for i = 1:100 + + tau = tau + dt; + + + hf = h(tau - t); + + subplot(4, 1, 3) + plot(t, x(t), 'k', 'LineWidth', 1); + hold on + plot(t, hf, 'r', 'LineWidth', 1); + grid on + hold off + xlim([-3, 3]); + ylim([-1, 2]); + ylabel('$x(t), h(\tau - t)$'); + + subplot(4, 1, 4); + plot(t(t <= tau), y(t <= tau), 'k', 'LineWidth', 1); + grid on + xlim([-3, 3]); + ylim([-1, 2]); + xlabel('$t$'); + ylabel('$y(t)$'); + + if i == 1 + gif('../assets/img/animations/trianglecar.gif', 'overwrite', true); + else + gif(); + end + + +end + + +%% Graphical Convolution + +close all; +figure('units', 'inches', 'position', [1, 1, 3, 8], 'color', 'w'); + +t = linspace(-3, 3, 3001); + +x = @(t) heaviside(t + 1) - heaviside(t - 1); + +h = @(t) exp(-4 * t.^2); + + + +y = zeros(size(t)); + +a = -2; +b = 2; + +integrand = @(tau, t, x, h) x(tau) .* h(t - tau); + + +for i = 1:length(t) + + y(i) = integral(@(tau) integrand(tau, t(i), x, h), a, b,... + 'Waypoints', [0, 1, 2, 3]); + +end + +y = movmedian(y, 5); + + + + + +subplot(4, 1, 1) +plot(t, x(t), 'k', 'LineWidth', 1); +grid on +ylim([-1, 2]); +xlim([-3, 3]); +ylabel('$x(t)$'); + +subplot(4, 1, 2) +plot(t, h(t), 'k', 'LineWidth', 1); +grid on +xlim([-3, 3]); +ylim([-1, 2]); +ylabel('$h(t)$'); + +dt = 25 * (t(2) - t(1)); +dt = 0.05; +tau = -2; + + +for i = 1:100 + + tau = tau + dt; + + + hf = h(tau - t); + + subplot(4, 1, 3) + plot(t, x(t), 'k', 'LineWidth', 1); + hold on + plot(t, hf, 'r', 'LineWidth', 1); + grid on + hold off + xlim([-3, 3]); + ylim([-1, 2]); + ylabel('$x(t), h(\tau - t)$'); + + subplot(4, 1, 4); + plot(t(t <= tau), y(t <= tau), 'k', 'LineWidth', 1); + grid on + xlim([-3, 3]); + ylim([-1, 2]); + xlabel('$t$'); + ylabel('$y(t)$'); + + if i == 1 + gif('../assets/img/animations/gausscar.gif', 'overwrite', true); + else + gif(); + end + + +end + + +%% + + + + + + + + + diff --git a/_animations/convolution_animations.md b/_animations/convolution_animations.md new file mode 100644 index 0000000..aca46c2 --- /dev/null +++ b/_animations/convolution_animations.md @@ -0,0 +1,36 @@ +--- +layout: page +title: convolution operation +description: +img: assets/img/animations/convolution_icon.gif +importance: 6 +category: signal processing animations +--- + +The output $$y(t)$$ of a linear, time-invariant system is given by the convolution of its impulse response $$h(t)$$ with the input $$x(t)$$ +\begin{equation} +y(t) = \int_{-\infty}^\infty x(\tau) h(t - \tau)d\tau. +\end{equation} +For discrete-time systems, the convolution sum is +\begin{equation} +y[n] = \sum_{m=-\infty}^\infty x[m]h[n-m] +\end{equation} +The sum can be interpreted as the superposition of delayed and scaled impulse responses: +
+
+ {% include figure.html path="assets/img/animations/convolution.gif" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Convolution of an input signal with a system impulse response. +
+ +Another common interpretation of convolution is the graphical approach, where the output is the area under the curve of the product of the input and the time-reversed impulse response: +
+
+ {% include figure.html path="assets/img/animations/boxcars.gif" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Convolution of an input signal with a system impulse response. +
diff --git a/_animations/convolution_integral.m b/_animations/convolution_integral.m new file mode 100644 index 0000000..3887f70 --- /dev/null +++ b/_animations/convolution_integral.m @@ -0,0 +1,10 @@ +function y = convolution_integral(x, h, t, a, b) + + +integrand = @(tau, t, x, h) x(tau) .* h(t - tau); + + +y = integral(@(tau) integrand(tau, t, x, h), a, b); + + +end \ No newline at end of file diff --git a/_animations/ct_convolution.m b/_animations/ct_convolution.m new file mode 100644 index 0000000..1e1100a --- /dev/null +++ b/_animations/ct_convolution.m @@ -0,0 +1,52 @@ +close all; clear; clc; + + + +h = @(t) heaviside(t) .* exp(-t); +x = @(t) heaviside(t) .* exp(-2 * t); + +t = linspace(-1, 10); + +y = zeros(size(t)); + +a = -10; +b = 10; + +integrand = @(tau, t, x, h) x(tau) .* h(t - tau); + + +for i = 1:length(t) + + y(i) = integral(@(tau) integrand(tau, t(i), x, h), a, b); + +end + +%% + +plot(t, y); +hold on +plot(t, heaviside(t) .* (exp(-t) - exp(-2 * t)), 'k--'); +hold off + + +%% + +h = @(t) heaviside(t) .* exp(-2 * t); +x = @(t) heaviside(t) .* exp(-1 * t) .* abs(cos(2 * t)); + +t = linspace(-1, 10, 500); + +y = zeros(size(t)); + +a = -10; +b = 20; + +for i = 1:length(t) + + y(i) = convolution_integral(x, h, t(i), a, b); + +end + + +plot(t, y); +hold off diff --git a/_projects/directivity_animations.md b/_animations/directivity_animations.md similarity index 100% rename from _projects/directivity_animations.md rename to _animations/directivity_animations.md diff --git a/_projects/geometric_acoustics_animations.md b/_animations/geometric_acoustics_animations.md similarity index 100% rename from _projects/geometric_acoustics_animations.md rename to _animations/geometric_acoustics_animations.md diff --git a/_projects/image_method_animations.md b/_animations/image_method_animations.md similarity index 100% rename from _projects/image_method_animations.md rename to _animations/image_method_animations.md diff --git a/_animations/optimization_animations.m b/_animations/optimization_animations.m new file mode 100644 index 0000000..cf82f97 --- /dev/null +++ b/_animations/optimization_animations.m @@ -0,0 +1,30 @@ +close all; clear; clc; + +% don't know where the original code is hiding at, this is for an icon + +figure('units', 'pixels', 'position', [20, 20, 200, 200]); + +color = [88, 166, 255] / 255; + +t = linspace(-2, 2); + +tau = linspace(-1.5, 0, 10); + +for i = 1:length(tau) + + plot(t, t.^2, 'k', 'linewidth', 2); + hold on + scatter(tau(i), tau(i).^2, 50, color, 'filled'); + %quiver(tau(i), tau(i).^2, -tau(i)^2, tau(i), 'k'); + hold off + axis off + + + if i == 1 + gif('../assets/img/animations/optimization_icon.gif', ... + 'overwrite', true, 'delaytime', 0.2); + else + gif; + end + +end \ No newline at end of file diff --git a/_projects/optimization_animations.md b/_animations/optimization_animations.md similarity index 96% rename from _projects/optimization_animations.md rename to _animations/optimization_animations.md index 8994b3f..623037d 100644 --- a/_projects/optimization_animations.md +++ b/_animations/optimization_animations.md @@ -2,7 +2,7 @@ layout: page title: optimization methods description: -img: assets/img/animations/GradientDescent.gif +img: assets/img/animations/optimization_icon.gif importance: 6 category: signal processing animations --- diff --git a/_projects/plate_animations.md b/_animations/plate_animations.md similarity index 100% rename from _projects/plate_animations.md rename to _animations/plate_animations.md diff --git a/_projects/polyhedra_animations.md b/_animations/polyhedra_animations.md similarity index 100% rename from _projects/polyhedra_animations.md rename to _animations/polyhedra_animations.md diff --git a/_projects/rod_animations.md b/_animations/rod_animations.md similarity index 100% rename from _projects/rod_animations.md rename to _animations/rod_animations.md diff --git a/_projects/sphere_animations.md b/_animations/sphere_animations.md similarity index 100% rename from _projects/sphere_animations.md rename to _animations/sphere_animations.md diff --git a/_bibliography/papers.bib b/_bibliography/papers.bib index 06eae3a..95f3d79 100644 --- a/_bibliography/papers.bib +++ b/_bibliography/papers.bib @@ -4,7 +4,7 @@ @string{aps = {American Physical Society,}} -@inproceedings{spherical_piston, +@inproceedings{geo_calibration, author = {Samuel D. Bellows and Brian F. G. Katz}, title = "{Calibrating geometric room acoustic models using a gradient descent algorithm}", booktitle = {Proceedings of the Audio Engineering Society Convention 156}, diff --git a/_config.yml b/_config.yml index 2fbdc05..8a98996 100644 --- a/_config.yml +++ b/_config.yml @@ -165,6 +165,9 @@ collections: teaching: output: true permalink: /teaching/:path/ + animations: + output: true + permalink: /animations/:path/ news_scrollable: true # adds a vertical scroll bar if there are more than 3 news items news_limit: 5 # leave blank to include all the news in the `_news` folder diff --git a/_data/cv.yml b/_data/cv.yml index 5298de6..ac65737 100644 --- a/_data/cv.yml +++ b/_data/cv.yml @@ -30,6 +30,11 @@ - title: Work Experience type: time_table + contents: + - title: Assistant Professor (Lecturer) + institution: University of Utah Asia Campus + year: 2024 + contents: - title: Postdoctoral Researcher institution: Sorbonne University, Paris, France diff --git a/_pages/about.md b/_pages/about.md index e4af6cb..013bcd0 100644 --- a/_pages/about.md +++ b/_pages/about.md @@ -18,13 +18,13 @@ selected_papers: true # includes a list of papers marked as "selected={true}" social: true # includes social icons at the bottom of the page --- -I am currently a post-doctoral researcher at the Lutheries-Acoustique-Musique group at the Institut Jean le Rond d'Alembert at the Sorbonne University in Paris, France. +I am currently an assistant professor at the University of Utah Asia Campus in Songdo, South Korea. -I completed my PhD working in the Acoustics Research Group at Brigham Young University's +Before my current position, I was a post-doctoral researcher at the Lutheries-Acoustique-Musique group at the Institut Jean le Rond d'Alembert at the Sorbonne University in Paris, France. I completed my PhD working in the Acoustics Research Group at Brigham Young University's department of Physics and Astronomy, under Dr. Timothy Leishman. My primary area of research entails studying sound radiation from musical instruments through directivity measurements. Our research group is collecting data to generate a directivity database for use in improving concert hall acoustics, microphone placement, and sound synthesis of musical instruments. Outside of musical acoustics, I enjoy studying about and applying techniques in array signal processing, applied mathematics, and numerical methods. - -2023 - Present: post-doctoral researcher, Sorbonne Université
+2024 - Present: Assistant Professor (Lecturer), University of Utah Asia Campus
+2023 - 2024: Post-doctoral Researcher, Sorbonne Université
2019 - 2023: PhD in Physics, Brigham Young University dissertation: Acoustic Directivity: Advances in Acoustic Center Localization, Measurement Optimization, Directional Modeling, and Sound Power Spectral Estimation
2013 - 2019: B.S. in Physics, Brigham Young University diff --git a/_pages/animations.md b/_pages/animations.md index e295f9d..e59aadb 100644 --- a/_pages/animations.md +++ b/_pages/animations.md @@ -15,7 +15,7 @@ horizontal: false {%- for category in page.display_categories %}

{{ category }}

- {%- assign categorized_projects = site.projects | where: "category", category -%} + {%- assign categorized_projects = site.animations | where: "category", category -%} {%- assign sorted_projects = categorized_projects | sort: "importance" %} {% if page.horizontal -%} @@ -37,7 +37,7 @@ horizontal: false {%- else -%} - {%- assign sorted_projects = site.projects | sort: "importance" -%} + {%- assign sorted_projects = site.animations | sort: "importance" -%} {% if page.horizontal -%}
diff --git a/assets/img/animations/boxcar.gif b/assets/img/animations/boxcar.gif new file mode 100644 index 0000000..11240b1 Binary files /dev/null and b/assets/img/animations/boxcar.gif differ diff --git a/assets/img/animations/boxcars.gif b/assets/img/animations/boxcars.gif new file mode 100644 index 0000000..e50a428 Binary files /dev/null and b/assets/img/animations/boxcars.gif differ diff --git a/assets/img/animations/convolution.gif b/assets/img/animations/convolution.gif new file mode 100644 index 0000000..2042a2b Binary files /dev/null and b/assets/img/animations/convolution.gif differ diff --git a/assets/img/animations/convolution_icon.gif b/assets/img/animations/convolution_icon.gif new file mode 100644 index 0000000..6caa1b8 Binary files /dev/null and b/assets/img/animations/convolution_icon.gif differ diff --git a/assets/img/animations/gausscar.gif b/assets/img/animations/gausscar.gif new file mode 100644 index 0000000..947e1aa Binary files /dev/null and b/assets/img/animations/gausscar.gif differ diff --git a/assets/img/animations/optimization_icon.gif b/assets/img/animations/optimization_icon.gif new file mode 100644 index 0000000..5c62c98 Binary files /dev/null and b/assets/img/animations/optimization_icon.gif differ diff --git a/assets/img/animations/trianglecar.gif b/assets/img/animations/trianglecar.gif new file mode 100644 index 0000000..57fcd5c Binary files /dev/null and b/assets/img/animations/trianglecar.gif differ diff --git a/assets/img/teaching/introece.jpg b/assets/img/teaching/introece.jpg index e708723..afd293c 100644 Binary files a/assets/img/teaching/introece.jpg and b/assets/img/teaching/introece.jpg differ diff --git a/assets/img/teaching/signalssystems.jpg b/assets/img/teaching/signalssystems.jpg index e2075c0..ced6840 100644 Binary files a/assets/img/teaching/signalssystems.jpg and b/assets/img/teaching/signalssystems.jpg differ diff --git a/icon_code/teaching_icons.m b/icon_code/teaching_icons.m index 9893cd5..e7b8430 100644 --- a/icon_code/teaching_icons.m +++ b/icon_code/teaching_icons.m @@ -1,6 +1,6 @@ close all; clear; clc; - +color = [88, 166, 255] / 255; t = linspace(-1, 3, 1e4); @@ -9,7 +9,7 @@ h = real(heaviside(t) .* exp(s * t)); figure('units', 'pixels', 'position', [20, 20, 400, 400]); -plot(t, h, 'r', 'LineWidth', 1.2); +plot(t, h, 'color', color, 'LineWidth', 2); grid on axis off hold on @@ -17,3 +17,25 @@ ylim([-1, 2]); exportgraphics(gcf, '../assets/img/teaching/signalssystems.jpg'); + + +%% + + +t = linspace(-1, 0); +close all; +figure('units', 'pixels', 'position', [20, 20, 400, 400]); +grid on +axis off +hold on +t = -0.8:0.1:0.8; +n = round(t * 10); +y = -0.15 * (heaviside(t - 0.35) - heaviside(t + 0.35)) .* (-1).^(-n); +t(t == -0.4) = -0.35; +t(t == 0.4) = 0.35; +plot(t, y, 'color', color, 'LineWidth', 2); +hold on +plot([-1, 1, 1, -1, -1], [-1, -1, 1, 1, -1], 'k', 'LineWidth', 2) +ylim([-1, 1]); + +exportgraphics(gcf, '../assets/img/teaching/introece.jpg');