Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extrapolatoin #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Extrapolatoin #6

wants to merge 5 commits into from

Conversation

narahahn
Copy link
Member

Example for modal analysis and sound field extrapolation

  • capture the sound field of a monochromatic plane wave by an open circular array

  • compute the circular harmonics expansion coefficients up to order N. As shown below, The CHT coefficients pm is obtained by multiplying the regularized radial weights dn with the IDFT of the captured signal p. No matrix computation is needed. The reason for using IDFT (not DFT) is due to our choice of the circular harmonics as np.exp(-1j*n*phi).

    bn = micarray.modal.radial.circ_radial_weights(N, k*R, setup='open')
    dn, _ = micarray.modal.radial.regularize(1/bn, threshold, 'softclip')
    pm = dn * np.fft.ifft(p)

  • extrapolate the sound field on 2-dimensional grid points

    # Sound field extrapolation
    basis = special.jn(order[:, np.newaxis, np.newaxis], k * r[np.newaxis, :, :]) \
    * np.exp(-1j*order[:, np.newaxis, np.newaxis] * phi[np.newaxis, :, :])
    s = np.tensordot(pm, basis, axes=[0, 0])

  • results
    extrapolation_open_circ_monoextrapolation_error_open_circ_mono

CAUTION
One line in regularize was commented out so that it works for mono-frequency cases. This issue is being handled in #4.

# dn[0, 1:] = dn[1, 1:]
dn = dn * hn
if not np.isfinite(dn).all():
raise UserWarning("Filter not finite")
return dn, hn

Verified

This commit was signed with the committer’s verified signature.
giuseppecrj Giuseppe Rodriguez
* Radial weight function (`circ_radial_weights', `circular_pw`, `circular_ls') now returns a vector of length 2*N+1 with N being the maximum modal order
* The ordering is consistant with the previous implementation: 0,1,...,N,-N,...-1
* In `circ_diagonal_modal_mat`, mirroring of the radial weights is no longer necessary. So `mirror_vec` will be depricated
* The modal bandwidth of the incident sound field `Nsf` may differ from that of the modal beamforming `N`
* For open circular arrays, the incident sound can have either a finite or an infinite modal bandwidth
@narahahn
Copy link
Member Author

Additional note:
Using IDFT for circular harmonics expansion works only if the microphone array is uniformly distributed on a circle and one of them is placed exactly at phi=0. If there is an angular offset, then a phase shift should be applied to the coefficients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant