Skip to content

Commit

Permalink
Update adaptive_notch
Browse files Browse the repository at this point in the history
  • Loading branch information
ryukau committed Oct 17, 2024
1 parent 7dbbd7b commit 9a3c6ac
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
27 changes: 19 additions & 8 deletions adaptive_notch/adaptive_notch.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="dcterms.date" content="2024-10-03" />
<meta name="dcterms.date" content="2024-10-18" />
<title>adaptive_notch</title>

<style>
Expand Down Expand Up @@ -410,7 +410,7 @@
<hr>
<a href="../index.html">インデックスに戻る</a>
<p>
Update: 2024-10-03
Update: 2024-10-18
</p>
<details>
<summary translate="yes">Table of Contents</summary>
Expand Down Expand Up @@ -602,11 +602,7 @@ <h3 id="分析-1"><a href="#分析-1" class="header-anchor"
aria-hidden="true">分析</a></h3>
<p>サイン波が AM
適応ノッチフィルタに入力されたときの挙動について分析します。</p>
<p>式をたてます。 <span class="math inline">\(x\)</span><span
class="math inline">\(y\)</span><span
class="math inline">\(\sin\)</span>
でもいいのですが、符号をそろえて楽をするために <span
class="math inline">\(\cos\)</span> を使っています。</p>
<p>式をたてます。</p>
<p><span class="math display">\[
\begin{aligned}
x(t) &amp;= \cos(\omega t). &amp;&amp; \text{Input.} \\
Expand All @@ -620,6 +616,14 @@ <h3 id="分析-1"><a href="#分析-1" class="header-anchor"
\omega_a &amp;\in [0, \pi).
\end{aligned}
\]</span></p>
<p><span class="math inline">\(x\)</span><span
class="math inline">\(y\)</span><span
class="math inline">\(\sin\)</span>
でもいいのですが、符号をそろえて楽をするために <span
class="math inline">\(\cos\)</span> を使っています。 AM
の式は三角関数の <a
href="https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Product-to-sum_identities">product-to-sum
identity</a> を使っています。</p>
<p><span class="math inline">\(\phi\)</span> は周波数 <span
class="math inline">\(\omega\)</span>
でのノッチフィルタの出力の位相特性、 <span
Expand All @@ -646,7 +650,7 @@ <h3 id="分析-1"><a href="#分析-1" class="header-anchor"
<li>カットオフ周波数の前後で <span class="math inline">\(y\)</span>
の位相が <span class="math inline">\(\pi\)</span> 変わる。</li>
<li><span class="math inline">\(s\)</span> は式に含まれる <span
class="math inline">\(- \cos(-\phi)\)</span> より、
class="math inline">\(\cos(-\phi)\)</span> より、
<ul>
<li>位相のずれが 0 なら常に正の値になる。 <span
class="math inline">\(s \geq 0\)</span></li>
Expand Down Expand Up @@ -840,6 +844,13 @@ <h2 id="参考文献"><a href="#参考文献" class="header-anchor"
<h2 id="変更点"><a href="#変更点" class="header-anchor"
aria-hidden="true">変更点</a></h2>
<ul>
<li>2024/10/18
<ul>
<li><span class="math inline">\(s\)</span> は式に含まれる <span
class="math inline">\(- \cos(-\phi)\)</span> より」を「<span
class="math inline">\(s\)</span> は式に含まれる <span
class="math inline">\(\cos(-\phi)\)</span> より」に修正。</li>
</ul></li>
<li>2024/10/03
<ul>
<li>「1 次オールパスによる改良」を「1
Expand Down
8 changes: 6 additions & 2 deletions adaptive_notch/adaptive_notch.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def adaptiveNotchAM(x, rho=0.99, mu=1, initialGuess=0.5):
### 分析
サイン波が AM 適応ノッチフィルタに入力されたときの挙動について分析します。

式をたてます。 $x$ と $y$ は $\sin$ でもいいのですが、符号をそろえて楽をするために $\cos$ を使っています。
式をたてます。

$$
\begin{aligned}
Expand All @@ -135,6 +135,8 @@ a(t) &= -2 \cos(\omega_a(t)) = a(t - \delta_t) - 2 \mu s(t),\\
\end{aligned}
$$

$x$ と $y$ は $\sin$ でもいいのですが、符号をそろえて楽をするために $\cos$ を使っています。 AM の式は三角関数の [product-to-sum identity](https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Product-to-sum_identities) を使っています。

$\phi$ は周波数 $\omega$ でのノッチフィルタの出力の位相特性、 $A$ は周波数 $\omega$ でのノッチフィルタのゲインです。

$$
Expand All @@ -153,7 +155,7 @@ $$
- 適応が完了したとき、ノッチによってサイン波が消えるので `y0 = 0` となり、 `y0 * x0` も 0 。
- 適応が完了していないとき:
- カットオフ周波数の前後で $y$ の位相が $\pi$ 変わる。
- $s$ は式に含まれる $- \cos(-\phi)$ より、
- $s$ は式に含まれる $\cos(-\phi)$ より、
- 位相のずれが 0 なら常に正の値になる。 $s \geq 0$ 。
- 位相のずれが $\pi$ なら常に負の値になる。 $s \leq 0$ 。
- 位相のずれが $0 > \phi > -\pi/2$ あるいは $-3\pi/2 > \phi > -2\pi$ の範囲なら、正の値の直流が乗る。 $\langle s \rangle > 0$ 。
Expand Down Expand Up @@ -268,6 +270,8 @@ a = np.clip(a - mu * w1, -2, 2)
- [Complex Resonator](https://ccrma.stanford.edu/~jos/filters/Complex_Resonator.html)

## 変更点
- 2024/10/18
- 「$s$ は式に含まれる $- \cos(-\phi)$ より」を「$s$ は式に含まれる $\cos(-\phi)$ より」に修正。
- 2024/10/03
- 「1 次オールパスによる改良」を「1 次オールパスによる適応ノッチフィルタ」に変更。
- 文章の整理。
Expand Down

0 comments on commit 9a3c6ac

Please sign in to comment.