last day (14 days later) » 

10:53 AM
0
A: digital filter implementation

MajenkoDigital filters perform mathematical operations on numbers. They're as "simple" as that. The complexity comes in the operations that are performed. The simplest you can imagine is a basic "2x averaging filter" or 50% low-pass filter. This takes a set of samples and halves the bandwidth, resulti...

 
But in what form are these numbers. Are they in the form of bits or some particular voltage representative of these bits..
 
They are bits clustered into samples, and each sample represents a discrete voltage level. The mathematical operations are performed on the numerical representation of the sample voltage. A bit is just a bit, and has no meaning by itself, only in the context of an entire number.
 
Do we need a DAC for this clustering
 
A DAC "undoes" the digitalness to convert it back into analog. You use an ADC to convert from a real voltage into a numerical representation of the voltage.
 
But the samples are stored in the form of bits. If I want to use a previous sample in the filter how would I get its discrete voltage level
 
10:53 AM
That all depends on how your system stores them. You would typically have a sample buffer which contains samples over a specified time frame. Your filter then operates on that buffer.
 
But If I am storing data as bits do I need the above conversion
for the filter to operate
??
 
What is a bit ... ?
 
We store data inside the registers in the form of bits
 
So what does one single bit represent?
 
Bit is a unit of information
Physically it is represented by high voltag
voltage*
 
10:58 AM
I know all that
I mean in regards to a digital filter
What is the meaning of any one bit?
 
I don't know please tell me
 
A single bit has no meaning by itself. It only has a meaning when it forms part of a sample. For instance, 8 bits together would make an 8-bit sample for a value between 0 and 255
 
Ok
 
Those 8 bits have to be treated as a single unit to have any meaning
 
But when we save a sample value say 3 in a register wouldn't we save it in the form 011
 
11:01 AM
Yes you would, but that storage has nothing really to do with the maths of the filter
You operate on the number 3
 
Yes but how do we get the number 3 again from the stored value
that is my question
 
The number 3 is a human concept
Internally it's just 011
You don't "get" the number 3 from 011 since 011 is a different representation of 3
 
But I thought we would convert the number 011 stored in some form of voltage that would represent 3
 
Let's take the example I cite in my answer as a demo.
You have two samples, say 38 and 41. They would be stored internally (in 8 bit form) as 00100110 and 00101001.
 
ok
ok so now when the filter work back on these values in what form it takes these values
 
11:06 AM
You want to average them to make a new sample. You'd add them, then divide by two. Adding them would be 38 + 41, or in binary 00100110 + 00101001, which would result in 01001111, or 79. Then you'd divide by two, which is a right shift, so 00100111, or 39.
 
ok
 
Your circuit would do the addition on the binary values using, for instance, a full adder. Then it's just a case of taking the upper 7 bits and using them as the lower 7 for the left shift.
So you end up with a binary representation of the number 39.
 
ok so we work on bits directly
that clears my doubt
 
In the digital realm there is only the bits.
but the context of those bits is paramount
It is that context that defines what the bits mean.
 
ok thank-you Majenko I think I undersatand it now
 
11:09 AM
Ok
 
12:07 PM
I have one more question
In your answer you said that low pass filter (2x averaging filter) reduces the sample size by 50 percent. Does this result in loss of information
Also in general this seems to be true for any kind of filter, for example a high pass filter will assign a new sample to be the difference of two successive samples
 

last day (14 days later) »