Hi Lubin,
By accident I found your embedded target for Microchip dsPIC.
I am a student at the Technical University of Delft in The Netherlands.
For one of my projects I need to capture a frequency of 500Hz and filter random noise away.
I consider to use your Input Capture Block and Output Compare block.
Can you provide me with some models? I have searched for it on your Forum, but I could not find models with the Input Capture Block.
Val
Input Capture Block and Output Compare block
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: Input Capture Block and Output Compare block
Hi Val,
I hope this is a nice accident !
you will find example about Input Capture block on the example page : http://www.kerhuel.eu/wiki/Category:Example
look at the autopilote model, I think it's using IC blocks.
Also, have a look on the IC block help : http://www.kerhuel.eu/wiki/Block/Output_Compare
your information is coded in Pulse Width Modulation ?
If you want to filter an analog signal at 500Hz, use the ADC block and configure the simulink time step at 500Hz. Example of such filtering is explain (and one example is in the example directory of the blockset)
Lubin
I hope this is a nice accident !
you will find example about Input Capture block on the example page : http://www.kerhuel.eu/wiki/Category:Example
look at the autopilote model, I think it's using IC blocks.
Also, have a look on the IC block help : http://www.kerhuel.eu/wiki/Block/Output_Compare
your information is coded in Pulse Width Modulation ?
If you want to filter an analog signal at 500Hz, use the ADC block and configure the simulink time step at 500Hz. Example of such filtering is explain (and one example is in the example directory of the blockset)
Lubin
Re: Input Capture Block and Output Compare block
Hi Lubin,
Thank you very much for the appreciated intention to help me.
However, I am a little bit confused, because I cannot find the simulink model on the page of the the autopilote model.
You wrote:
If you want to filter an analog signal at 500Hz, use the ADC block and configure the simulink time step at 500Hz. Example of such filtering is explain (and one example is in the example directory of the blockset)
Please give me the name of the examples. Are you talking about two examples?
I suppose the time step in the solver must be the same as in the ADC block? And how to set the period in the Output Compare block to get a fine resolution.
How to configure the time step if I expect an analog signal from 400Hz to 500Hz and I want to filter out a signal of 440Hz with a Notch filter?
I suppose I have to take into account the Nyquist theorem.
Val
Thank you very much for the appreciated intention to help me.
However, I am a little bit confused, because I cannot find the simulink model on the page of the the autopilote model.
You wrote:
If you want to filter an analog signal at 500Hz, use the ADC block and configure the simulink time step at 500Hz. Example of such filtering is explain (and one example is in the example directory of the blockset)
Please give me the name of the examples. Are you talking about two examples?
I suppose the time step in the solver must be the same as in the ADC block? And how to set the period in the Output Compare block to get a fine resolution.
How to configure the time step if I expect an analog signal from 400Hz to 500Hz and I want to filter out a signal of 440Hz with a Notch filter?
I suppose I have to take into account the Nyquist theorem.
Val
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: Input Capture Block and Output Compare block
Hi Val,
I respond very quickly:
If you undersample your signal (at a frequency lower than the nyquist frequcney : 880Hz, the 440Hz will be folded into a lower frequency that you can still filter out. (for example if your real 440Hz is folded in 200Hz because of low frequency sampling, you may filter out that 200Hz, but that will also remove the 200Hz of the real signal !).
You may find smart solution using this principle ! you should Have a look first on the frequency present in the original signal.
Anyway, if you want to keep it simple, sample at something like 2Khz and filter out the 440Hz with a notch filter.
I'll be absent for two weeks from now (from 5 of june until 20 of june 2009). Thus, I will not be able to provide response for that time. If anybody can give you answers during theses two weeks...
Lubin
I respond very quickly:
Ok, I did not upload it yet. my mistake. Will do it soon.val wrote:I cannot find the simulink model on the page of the the autopilote model
http://www.kerhuel.eu/wiki/Explorer_16_Boardval wrote:Please give me the name of the examples.
it must be equal or higher. (equal is the easiest solution)val wrote:I suppose the time step in the solver must be the same as in the ADC block?
Have a look on the block's help. or a quick glance at the examples.val wrote:how to set the period in the Output Compare block to get a fine resolution
About nyquist frequency, the question is which frequency are you willing to keep ? and How to keep them untouthced ?val wrote:I want to filter out a signal of 440Hz with a Notch filter
If you undersample your signal (at a frequency lower than the nyquist frequcney : 880Hz, the 440Hz will be folded into a lower frequency that you can still filter out. (for example if your real 440Hz is folded in 200Hz because of low frequency sampling, you may filter out that 200Hz, but that will also remove the 200Hz of the real signal !).
You may find smart solution using this principle ! you should Have a look first on the frequency present in the original signal.
Anyway, if you want to keep it simple, sample at something like 2Khz and filter out the 440Hz with a notch filter.
I'll be absent for two weeks from now (from 5 of june until 20 of june 2009). Thus, I will not be able to provide response for that time. If anybody can give you answers during theses two weeks...
Lubin
Who is online
Users browsing this forum: Google [Bot] and 15 guests