History

figures for peakeq

Paul Batchelor committed 6 years ago

Commit 52b273d1 parent e8dafec7 files · +78 −23Browse files

Unified · Split

7 files
  1. _fig/figs.mk +5 −0
  2. _fig/peakeq_compute_gain.tex +9 −0
  3. _fig/peakeq_df1_difference.tex +10 −0
  4. _fig/peakeq_df2_difference.tex +10 −0
  5. _fig/peakeq_df2_structure.tex +10 −0
  6. _fig/peakeq_tforiginal.tex +13 −0
  7. peakeq.org +21 −23
_fig/figs.mk+5−0
@@ -7,4 +7,9 @@ chaosnoise_gamma.png \ · 6 unmodified lines
7osc_lerp.png \7osc_lerp.png \
8osc_lerp_simp.png \8osc_lerp_simp.png \
9osc_log2.png \9osc_log2.png \
10peakeq_compute_gain.png \
11peakeq_df1_difference.png \
12peakeq_df2_difference.png \
13peakeq_df2_structure.png \
14peakeq_tforiginal.png \
10 15
_fig/peakeq_compute_gain.tex+9−0
@@ -0,0 +1,9 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$$
7y = {(x + f) + g (x - f) \over 2}
8$$
9\bye
_fig/peakeq_df1_difference.tex+10−0
@@ -0,0 +1,10 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$$
7y(n) = \alpha x(n) + \beta(1 + \alpha)x(n - 1) + x(n - 2)
8- \beta(1 + \alpha)z^{-1} y(n - 1) - \alpha y(n - 2)
9$$
10\bye
_fig/peakeq_df2_difference.tex+10−0
@@ -0,0 +1,10 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$$
7v(n) = x(n) - \beta(1 + \alpha)v(n - 1) - \alpha v(n - 2)
8y(n) = \alpha v(n) + \beta(1 + \alpha) v(n - 1) + v(n - 2)
9$$
10\bye
_fig/peakeq_df2_structure.tex+10−0
@@ -0,0 +1,10 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$$
7v(n) = x(n) - a_1 v(n - 1) - a_2 v(n - 2)
8y(n) = b_0 v(n) + b_1 v(n - 1) + b_2 v(n - 2)
9$$
10\bye
_fig/peakeq_tforiginal.tex+13−0
@@ -0,0 +1,13 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$$
7{
8\alpha + \beta(1 + \alpha)z^{-1} + z^{-2}
9\over
101 + \beta(1 + \alpha)z^{-1} + \alpha z^{-2}
11}
12$$
13\bye
peakeq.org+21−23
@@ -19,49 +19,47 @@ has better numerical stability. · 18 unmodified lines
19We begin with the transfer function, described in the 198719We begin with the transfer function, described in the 1987
20paper:20paper:
21 21
22#+BEGIN_SRC tex22
23$$23@!(fig "peakeq_tforiginal"
24``
24{25{
25\alpha + \beta(1 + \alpha)z^{-1} + z^{-2}26\alpha + \beta(1 + \alpha)z^{-1} + z^{-2}
26\over27\over
271 + \beta(1 + \alpha)z^{-1} + \alpha z^{-2}281 + \beta(1 + \alpha)z^{-1} + \alpha z^{-2}
28}29}
29$$30``)!@
30#+END_SRC
31 31
32This has the following difference equation:32This has the following difference equation:
33 33
34#+BEGIN_SRC tex34@!
35$$35(fig "peakeq_df1_difference"
36``
36y(n) = \alpha x(n) + \beta(1 + \alpha)x(n - 1) + x(n - 2)37y(n) = \alpha x(n) + \beta(1 + \alpha)x(n - 1) + x(n - 2)
37- \beta(1 + \alpha)z^{-1} y(n - 1) - \alpha y(n - 2)38- \beta(1 + \alpha)z^{-1} y(n - 1) - \alpha y(n - 2)
38$$39``)
39#+END_SRC40!@
40 41
41The42The
42[[https://ccrma.stanford.edu/~jos/filters/Direct_Form_II.html][Direct Form II Structure]]. can be43[[https://ccrma.stanford.edu/~jos/filters/Direct_Form_II.html][Direct Form II Structure]]. can be
43represented in this generalized difference equation:44represented in this generalized difference equation:
44 45
45#+BEGIN_SRC tex46@!(fig "peakeq_df2_structure"
46$$47``
47v(n) = x(n) - a_1 v(n - 1) - a_2 v(n - 2)48v(n) = x(n) - a_1 v(n - 1) - a_2 v(n - 2)
48
49y(n) = b_0 v(n) + b_1 v(n - 1) + b_2 v(n - 2)49y(n) = b_0 v(n) + b_1 v(n - 1) + b_2 v(n - 2)
50$$50``)!@
51#+END_SRC
52 51
53Converting to direct form II is a matter of putting52Converting to direct form II is a matter of putting
54coefficients in their correct places. Placing in the53coefficients in their correct places. Placing in the
55coefficients from the Reglia and Mitra design yields the54coefficients from the Reglia and Mitra design yields the
56following difference equation:55following difference equation:
57 56
58#+BEGIN_SRC tex57@!(fig "peakeq_df2_difference"
59$$58``
60v(n) = x(n) - \beta(1 + \alpha)v(n - 1) - \alpha v(n - 2)59v(n) = x(n) - \beta(1 + \alpha)v(n - 1) - \alpha v(n - 2)
61
62y(n) = \alpha v(n) + \beta(1 + \alpha) v(n - 1) + v(n - 2)60y(n) = \alpha v(n) + \beta(1 + \alpha) v(n - 1) + v(n - 2)
63$$61``
64#+END_SRC62)!@
65 63
66Which can be translated to C code.64Which can be translated to C code.
67* Tangled Files65* Tangled Files
@@ -333,11 +331,11 @@ y = eq->a*v + eq->b*(1.0 + eq->a)*eq->v[0] + eq->v[1]; · 265 unmodified lines
333 331
334Compute the gain. This is done with the following equation:332Compute the gain. This is done with the following equation:
335 333
336#+BEGIN_SRC tex334@!(fig "peakeq_compute_gain"
337$$335``
338y = {((x + f) + g (x - f) \over 2}336y = {(x + f) + g (x - f) \over 2}
339$$337``
340#+END_SRC338)!@
341 339
342#+NAME: compute_gain340#+NAME: compute_gain
343#+BEGIN_SRC c341#+BEGIN_SRC c

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t