Difference between revisions of "Gesture Signal Processing"

From CCRMA Wiki
Jump to: navigation, search
(Filtering)
(Filtering)
Line 11: Line 11:
 
</center>
 
</center>
  
We can approximate integration and differentiation by using digital filters.  Let '''q''' be the input signal and '''p''' be the output signal. 
 
  
Here is a simple approximation of an integrator.  We see that with each time step, '''p<sub>intgr</sub>''' is updated to be nearly the same as the previous '''p<sub>intgr</sub>''', but it is affected by the input '''q'''.
+
Here is a simple approximation of an integrator.  In this case, we integrate an acceleration measurement in order to obtain velocity.  We see that with each time step, '''v''' is updated to be nearly the same as the previous '''v''', but it is affected by the input '''a'''.  This is an example of a low-pass filter because the filter passes mainly low frequencies.
 
<pre>
 
<pre>
p<sub>intgr</sub> = 0.1*q + 0.9*p<sub>intgr</sub>;
+
v = 0.1*a + 0.9*v;
 
</pre>
 
</pre>
example of lp filter
 
  
  
Next we show how to approximate a differentiator.  The extra variable '''r''' is introduced to represent the previous input value.
+
 
 +
Next we show how to approximate a differentiator, so now '''x''' represents a measured position, and '''v''' represents velocity (although the result is scaled by a constant).  The extra variable '''r''' is introduced to represent the previous position measurement.  This is an example of a high-pass filter because it passes mainly high frequencies.
 
<pre>
 
<pre>
p<sub>diff</sub>[n] = q[n] - q[n-1]
+
v = x - r;
 +
r = x;
 
</pre>
 
</pre>
example of hp filter
 
  
[http://ccrma.stanford.edu/~jos/filters/ book on simple filter design]
+
Filter design is an important part of the field of signal processing.  For more details, see
 +
[http://ccrma.stanford.edu/~jos/filters/ Julius Smith's book on simple filter design].
  
 
== Thresholding ==
 
== Thresholding ==

Revision as of 17:43, 10 October 2008

Interpolation

Filtering

While studying sensors, we discovered that often a particular sensor will measure the position x, velocity v, or acceleration a of an object. However, we might like to use a different variable to control the way we synthesize sound. Ideally, integration and differentiation can be applied to convert between variables.

Variables.png


Here is a simple approximation of an integrator. In this case, we integrate an acceleration measurement in order to obtain velocity. We see that with each time step, v is updated to be nearly the same as the previous v, but it is affected by the input a. This is an example of a low-pass filter because the filter passes mainly low frequencies.

v = 0.1*a + 0.9*v;


Next we show how to approximate a differentiator, so now x represents a measured position, and v represents velocity (although the result is scaled by a constant). The extra variable r is introduced to represent the previous position measurement. This is an example of a high-pass filter because it passes mainly high frequencies.

v = x - r;
r = x;

Filter design is an important part of the field of signal processing. For more details, see Julius Smith's book on simple filter design.

Thresholding