Essentially, all models are wrong, but some are useful - George E.P. Box
A method is proposed for simulating the sound pressure signals on a spherical microphone array in a reverberant enclosure. The method employs spherical harmonic decomposition (SHD) and takes into account scattering from a solid sphere. An analysis shows that the error in the decomposition can be made arbitrarily small given a sufficient number of spherical harmonics.
procFs = 8000; % Sampling frequency (Hz) c = 343; % Sound velocity (m/s) nsample = 512; % Length of desired RIR N_harm = 40; % Maximum order of harmonics to use in SHD K = 1; % Oversampling factor L = [4 6 8]; % Room dimensions (x,y,z) in m sphLocation = [2 3.2 4]; % Receiver location (x,y,z) in m s = [2.37 4.05 4.4]; % Source location(s) (x,y,z) in m beta = [1 0.7 0.7 0.5 0.2 1]; % Room reflection coefficients [\beta_x_1 \beta_x_2 ... % ... \beta_y_1 \beta_y_2 \beta_z_1 \beta_z_2] order = -1; % Reflection order (-1 is maximum reflection order) sphRadius = 0.042; % Radius of the sphere (m) sphType = 'rigid'; % Type of sphere (open/rigid) mic = [pi/4 pi; pi/2 pi]; % Microphone positions (azimuth, elevation) [h, H, beta_hat] = smir_generator(c, procFs, sphLocation, s, L, beta, sphType, sphRadius, mic, N_harm, nsample, K, order);

Copyright (C) 2011, D. P. Jarrett.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.