Visualizing Sound Propagation
Richard Batelaan
Author
08/04/2020
Added
347
Plays
Description
Designing a visual model of sound propagation in a virtual room for educational use.
Searchable Transcript
Toggle between list and paragraph view.
- [00:00:00.350]I am Richard Batelaan and I am an
- [00:00:02.570]undergraduate physics and music major at
- [00:00:04.702]the University of Nebraska-Lincoln.
- [00:00:06.814]Today, I will be discussing my UCARE 2020
- [00:00:09.344]project, Visualizing Sound Propagation.
- [00:00:13.406]The goal of my project was to design a
- [00:00:15.738]visual model of sound propagation in a
- [00:00:17.908]virtual room for educational use.
- [00:00:20.384]To accomplish this, I used Unity, which is
- [00:00:23.074]a game engine that can be used for
- [00:00:24.699]virtual reality. For my first approach, I
- [00:00:28.079]tried to create an expanding sphere that
- [00:00:30.068]could reflect off of virtual walls.
- [00:00:32.853]Unfortunately, after the second reflection
- [00:00:35.003]of the sound wave, the model becomes very
- [00:00:38.115]unclear. For my second approach, I used a
- [00:00:40.708]numerical solution to the 3D Wave Equation
- [00:00:43.108]to show the points in space of highest
- [00:00:45.139]sound pressure. This model clearly shows
- [00:00:47.643]interference of sound waves after the
- [00:00:49.468]first reflection. Here is a
- [00:00:51.431]video of this model.
- [00:01:05.303]The Expanding Ball Model shows the wave
- [00:01:07.487]fronts of sound coming from a source.
- [00:01:09.661]The room is part of a Revit model of the
- [00:01:11.821]Peter Kiewitt Institute in Omaha. In the
- [00:01:14.891]video, you can see the wave fronts change
- [00:01:17.053]color after each collision and disappear
- [00:01:19.186]after a while.
- [00:01:58.225]I used four C# scripts to create my first
- [00:02:01.415]model of sound propagation.
- [00:02:03.277]The SpawnerSample script spawns spheres in
- [00:02:05.736]every direction around a source, and each
- [00:02:08.111]sphere is given a velocity away from that
- [00:02:10.651]source. The effect is an expanding
- [00:02:13.167]sphere, just like a wave front of sound.
- [00:02:17.515]The BallBouncer script is attached to all
- [00:02:19.923]of these spheres and makes them bounce off
- [00:02:22.016]of the walls of the room. The script works by
- [00:02:24.737]setting the angle of incidence
- [00:02:26.262]equal to the angle of reflection at a collision.
- [00:02:30.946]The Destroyer script is also attached to
- [00:02:33.417]all of the spheres, and it destroys them
- [00:02:35.809]based on number of collisions and the
- [00:02:38.089]absorption coefficient of the material.
- [00:02:40.639]The absorption coefficient is the
- [00:02:42.466]percentage of sound absorbed and
- [00:02:44.479]transmitted by the material.
- [00:02:48.619]The ChangeColorOnCollision script changes
- [00:02:51.523]the color of the spheres after each
- [00:02:53.577]collision. After the first reflection,
- [00:02:56.087]the color changes to black, then yellow,
- [00:02:58.333]blue, red, and finally green.
- [00:03:03.178]The Numerical Wave Equation Model shows
- [00:03:05.808]the peaks of sound pressure when a source
- [00:03:07.669]creates sound. The higher the sound
- [00:03:09.866]pressure, the lower the transparency.
- [00:03:12.576]Here are three views of the model, from
- [00:03:14.656]the left, side, center, and right side of the room.
- [00:03:30.215]Here is the 3D Wave Equation that I used
- [00:03:32.585]for my model. The homogeneous part of the
- [00:03:35.190]partial differential equation is:
- [00:03:37.071]the second partial derivative of pressure
- [00:03:39.296]with respect to time minus the speed of
- [00:03:41.739]sound squared times the quantity,
- [00:03:43.903]the second partial derivative with respect
- [00:03:46.154]to x plus the second partial derivative
- [00:03:48.111]with respect to y plus the second partial
- [00:03:50.334]derivative with respect to z. The right
- [00:03:53.254]side of the equation is the source
- [00:03:54.874]function that I used for my model.
- [00:03:57.214]Sine of omega t caused the
- [00:03:58.614]source to oscillate over time.
- [00:04:00.598]e to the negative alpha t caused the
- [00:04:02.678]source to decay over time. And the last
- [00:04:05.168]part of the source function causes it to
- [00:04:07.824]have a spatial bell curve shape. There
- [00:04:10.570]are many constants in the equation that I
- [00:04:12.600]define later, like omega, which determines
- [00:04:15.258]the frequency; alpha, which determines the
- [00:04:17.865]source's rate of decay; and sigma, which
- [00:04:20.515]is the standard deviation of the bell
- [00:04:22.485]curve shape. Lastly, I set all of the
- [00:04:25.345]initial and boundary conditions equal to
- [00:04:27.421]zero because this is the simplest scenario.
- [00:04:32.373]In order to solve my 3D Wave Equation, I
- [00:04:34.713]used the Finite Difference Method to
- [00:04:36.482]numerically approximate the solution. We
- [00:04:39.001]use a simple rise over run approach to
- [00:04:41.212]approximate all the partial derivatives
- [00:04:43.158]of p. Using the same rise over run
- [00:04:45.903]method, we can then approximate all the
- [00:04:48.223]second partial derivatives of p, which
- [00:04:50.593]simplifies to the following.
- [00:04:53.427]When plugging these approximations into
- [00:04:56.009]our 3D Wave Equation and solving for
- [00:04:58.137]p(xi,yj,zk,th) we get a recursive formula.
- [00:05:04.295]Starting with initial and boundary
- [00:05:06.739]conditions, we can calculate any point,
- [00:05:09.032]P(x,y,z, and t), using this formula.
- [00:05:15.590]I used MATLAB to apply the Finite
- [00:05:18.087]Difference Method to my 3D Wave Equation.
- [00:05:20.634]The first part of this script defines all
- [00:05:23.359]the variables. The first series of
- [00:05:25.668]for loops assigns values to a
- [00:05:27.488]four-dimensional array, x by y by z by t.
- [00:05:31.668]The second series of for loops creates an
- [00:05:34.387]animated 3D plot of a cross-section of
- [00:05:37.087]the waves. The right video shown here is
- [00:05:39.694]a cross-section at the top edge of the
- [00:05:41.657]room. Notice that the waves start
- [00:05:46.097]propagating late because the waves have
- [00:05:48.327]not reached that position yet.
- [00:05:54.827]The left video shown here is a
- [00:05:57.060]cross-section at the center of the room.
- [00:05:59.434]Notice that the waves start
- [00:06:02.554]propagating immediately.
- [00:06:10.511]The next section of code saved a video of
- [00:06:14.201]these two animated 3D plots. The last
- [00:06:17.114]series of for loops writes the data to
- [00:06:19.394]64,000 different text files corresponding
- [00:06:22.366]to a 3D position each having a list of one
- [00:06:25.336]hundred time stamps for p.
- [00:06:30.819]I used two C# scripts to show my model in
- [00:06:34.205]Unity. The SpawnPixels script spawns
- [00:06:37.428]cubes at every position in a 10x10x10 box,
- [00:06:40.948]40 cubes in the x direction, 40 cubes in
- [00:06:43.748]the y direction, and 40 cubes
- [00:06:45.410]in the z direction, for a total of
- [00:06:47.539]64,000 cubes, or pixels.
- [00:06:51.695]The Wave script is attached to each pixel.
- [00:06:54.502]It reads the text file corresponding to
- [00:06:56.742]the position of that particular pixel to
- [00:06:59.382]determine its transparency.
- [00:07:03.115]In the future, we want this model to be
- [00:07:05.375]adjustable to different timbres and
- [00:07:07.604]frequencies. We will also work towards
- [00:07:09.986]using different shapes of rooms instead
- [00:07:12.136]of just a cubic box. Lastly, we can work
- [00:07:15.411]towards giving this sound propagation
- [00:07:17.173]model different boundary conditions,
- [00:07:19.115]basically merging the pros of both models.
- [00:07:24.718]And here are my references. Thank you!
The screen size you are trying to search captions on is too small!
You can always jump over to MediaHub and check it out there.
Log in to post comments
Embed
Copy the following code into your page
HTML
<div style="padding-top: 56.25%; overflow: hidden; position:relative; -webkit-box-flex: 1; flex-grow: 1;"> <iframe style="bottom: 0; left: 0; position: absolute; right: 0; top: 0; border: 0; height: 100%; width: 100%;" src="https://mediahub.unl.edu/media/13983?format=iframe&autoplay=0" title="Video Player: Visualizing Sound Propagation" allowfullscreen ></iframe> </div>
Comments
0 Comments