If you really want to know how this works, try that little example out on your computer using some programming language that you are comfortable with. Enter in the input data and do the math in the program and see how the output looks after filtering. I think you will be very happy with the results and you'll then have a really good idea how this works.
Make sense so far?
Yes, but i just wanted to ask you if you understand the program that's all.
So you understand what all the lines mean basically?
constant e=2.718281828459
atom V,v1,R,C,t
V=v1*(1-power(e,-t/(R*C)))
printf(1,"%f\n",V)
The choice of what h(n) to use varies as widely as the application it is going to be used in.
For example, if you are going to build a display that displays your music audio to light up different LEDs depending on the frequency band of the audio, you would probably want to make h(n) that of a bandpass filter. But if you wanted to build a DC voltmeter you might want to make h(n) that of a low pass filter so it averages out small variations in the input DC level.
So the choice of what h(n) to use varies as much as your choice when you need a regular passive or active filter. You make h(n) the same as the filter's response of the passive or active filter you would have chosen had you done it in all analog. This is one reason why i demonstrated the use of the digital low pass filter, so you can get an idea what you use this for.
You should also keep in mind that the number of ways to approach these designs varies widely too. There are many ways to design filters, and more ways to design digital filters. We've just touched the surface here, but there is probably much much more on the web with a little searching.
Just to show a simple example of how varied the digital filter applications are, consider the application of copying files on your computer from one hard drive to another. Not really an electronic application? That's right, but the digital filter can still be used here as follows...
When you select a very large number of files le2C but the digital filter can still be used here as follows...
When you select a very large number of files lets say, say 100000 files, and click "Copy". Then you click "Paste" (to the new hard drive). The files begin to be copied from one location to the other, but they dont copy in zero time. It takes considerable time to copy that many files. In the mean time, you probably want to know what the progress is in say percent. 0 percent means no files were copied, 100 percent means all the files were copied. While they are copying, the percentage should increase, 0, 1, 2, 3, ....10, 11, 12, etc., until it reaches 100 percent. That's not too much of a problem, as you just look at say the number of bytes and do a little division for how many bytes have already been copied over all the bytes that have to be copied.
But say you also want to know how much time remains to copy ALL of the files?
You can estimate based on the total number of bytes to be copied and the time to copy say 1000 bytes, but unfortunately the software isnt that predictable because there are a number of variables that constantly change the time it might take to copy 99999 files after 1 has already been copied lets say.
Because of this, we have to constantly update the time remaining to copy the remaining files. This varies quite a bit on an actual PC computer. For 100000 files it may calculate out as 10 minutes (im making this simple) but then later it goes down to 9 minutes 5 seconds for say 90000 files, but the variation is so unpredictable that sometimes it takes longer to copy 1000 files and sometimes it happens faster, so this time display might go like this:
9 mins 5 secs
8 mins 45 seconds
8 mins 40 seconds
8 mins 30 seconds
8 mins 55 seconds
7 mins 34 seconds
From this little example we can see that the time goes up AND down, because the estimate changes over time because the error in the estimate changes.
Now notice that if those were voltage values instead of time values we could use an RC low pass filter to make the fluctuations smaller and smoother. This would be more presentable to the user like you or me who is copying all these files. This is where the low pass digital filter comes in.
We design a digital filter that takes as input the actual time values, convolve them with an h(n) that is a low pass filter, then display the output time values rahter than the original time values. The above might then look like this:
9 mins 5 secs
8 mins 45 seconds
8 mins 40 seconds
8 mins 30 seconds
8 mins 25 seconds
8 mins 02 seconds
8 mins 03 seconds
Note that this makes much more sense to somebody copying files. Also note that the time did go up a little there at the last sample, but it was much less than it was before we applied the filter.
If you really want to know how this works, try that little example out on your computer using some programming language that you are comfortable with. Enter in the input data and do the math in the program and see how the output looks after filtering. I think you will be very happy with the results and you'll then have a really good idea how this works.
printf(1,"%s\n",{"First Program"})
while 1 do
end while
Eventually once you get your system set up for the language you will only have to double click the .exw file to get it to run for you. It may be set up already if you installed
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?