Code Monkey home page Code Monkey logo

Comments (3)

zhuhao528 avatar zhuhao528 commented on August 17, 2024

int dios_ssp_mvdr_init_diffuse_rnn(objMVDR ptr_mvdr)
{
int i, j, k;
float f = 0, temp = 0;
for (k = 1; k < ptr_mvdr->m_sp_size; k++)
{
f = ptr_mvdr->m_deta_fs
k;
for (i = 0; i < ptr_mvdr->m_channels; i++)
{
ptr_mvdr->m_sd_rnn_re[kptr_mvdr->m_rxx_size+iptr_mvdr->m_channels+i] = 1.0f*(1+ptr_mvdr->m_sd_factor)+ptr_mvdr->m_sd_eps;
for (j = i+1; j < ptr_mvdr->m_channels; j++)
{
temp = 2 * PI * f * ptr_mvdr->dist[i * ptr_mvdr->m_channels + j] / VELOCITY;
ptr_mvdr->m_sd_rnn_re[kptr_mvdr->m_rxx_size+iptr_mvdr->m_channels+j] = (float)(sin(temp)/temp);
ptr_mvdr->m_sd_rnn_re[kptr_mvdr->m_rxx_size+jptr_mvdr->m_channels+i] = ptr_mvdr->m_sd_rnn_re[kptr_mvdr->m_rxx_size+iptr_mvdr->m_channels+j];
}
}
for (i = 0; i < ptr_mvdr->m_channels; i++)
{
for (j = 0; j < ptr_mvdr->m_channels; j++)
{
ptr_mvdr->m_rxx_in[iptr_mvdr->m_channels2+2j] = ptr_mvdr->m_sd_rnn_re[kptr_mvdr->m_rxx_size+iptr_mvdr->m_channels+j];
ptr_mvdr->m_rxx_in[i
ptr_mvdr->m_channels2+2j+1] = 0;
}
}
dios_ssp_matrix_inv_process(ptr_mvdr->mvdrinv, ptr_mvdr->m_rxx_in, ptr_mvdr->m_irxx_out);
for (i = 0; i < ptr_mvdr->m_channels; ++i)
{
for (j = 0; j < ptr_mvdr->m_channels; ++j)
{
ptr_mvdr->m_sd_irnn_re[kptr_mvdr->m_rxx_size+iptr_mvdr->m_channels+j] = ptr_mvdr->m_irxx_out[iptr_mvdr->m_channels2+2j];
ptr_mvdr->m_sd_irnn_im[k
ptr_mvdr->m_rxx_size+iptr_mvdr->m_channels+j] = ptr_mvdr->m_irxx_out[iptr_mvdr->m_channels2+2j+1];
}
}
}

return 0;

}

我debug了 一下,原因是因为temp出现了0,导致ptr_mvdr->m_rxx_in中出现 nan 数据,最后导致求逆矩阵出现了问题。

from athena-signal.

zhuhao528 avatar zhuhao528 commented on August 17, 2024

ptr_mvdr->dist[i * ptr_mvdr->m_channels + j] 这个值出现了0值

from athena-signal.

zhuhao528 avatar zhuhao528 commented on August 17, 2024

float mic_coord[2][3]={ {-0.05, 0.0, 0.0}, {-0.05, 0.0, 0.0} }; // 麦克风阵列的位置
知道原因了,麦克风坐标设置错了

from athena-signal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.