Skip to content

add chapter05後半#74

Open
imamura-eigetsu wants to merge 1 commit into
onolab-tmu:mainfrom
imamura-eigetsu:eimamura/chapter05
Open

add chapter05後半#74
imamura-eigetsu wants to merge 1 commit into
onolab-tmu:mainfrom
imamura-eigetsu:eimamura/chapter05

Conversation

@imamura-eigetsu

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread eimamura/chapter05/q07.py
plt.plot(a[L - S :])
plt.xlim([0, 0.01 * fs])
plt.legend(["obs,(x1)", "enh"])
plt.show()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント:

ちなみにですが、以下のコードを記述するとSNRの比較ができます!参考までに
ポイントは信号をSTFT->iSTFTして信号長を揃えているところです(ビームフォーミング処理以外は同じ)

  • s1: [STFT] -> [iSTFT]
  • x1: [STFT] -> [iSTFT]
  • a: [STFT] -> [ビームフォーミング] -> [iSTFT]
S1 = stft(s1, L, S, wnd)
_x1 = istft(S, X1)
_s1 = istft(S, S1)
print("input SNR:", 10 * np.log10(np.sum(_s1 ** 2) / np.sum((_x1 - _s1) ** 2)))  # input SNR: 10.00
print("output SNR:", 10 * np.log10(np.sum(_s1 ** 2) / np.sum((a - _s1) ** 2)))  # output SNR: 14.68

Comment thread eimamura/chapter05/q08.py
psi[_f, theta] = np.conjugate(w[_f]) @ a

plt.pcolormesh(deg, f, 20 * np.log10(abs(psi)))
plt.colorbar()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント:

出力されるビームパターンを見ると、暗い色が緑 (-40くらい?)で最小値の-120のような青の部分はほとんどない印象を受けました!現状、色は黄色 ([0, -20]のあたり)に集中しているので、もう少しカラーバーの範囲 (plt.clim)を狭めると細かい調査ができて良いかと感じました!

Comment thread eimamura/chapter05/q10.py
S = 512
d = 0.05
fs = 16000
p = np.array([[-d, 0, 0], [0, 0, 0], [d, 0, 0]])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント:

ここはq01.pyでやっているように
pm = np.array([(m - (M - 1) // 2) * d, 0, 0])のように書くとスマートだと思います!

Comment thread eimamura/chapter05/q10.py

x = np.zeros((3, len(y)))
for i in range(len(x)):
x[i] = np.roll(y, i * 10) + white_noise

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント:

ここの信号の作成については注意が必要です!
プルリクエスト #67 より該当部分

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.

2 participants