Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Digital Zero crossing detector variable sample rate problem

Status
Not open for further replies.

Milruwan

Member level 1
Member level 1
Joined
Jan 20, 2013
Messages
35
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,546
I implement a Zero crossing detector in a fpga. It can detect the zero crossings of a signal and it could successfully demodulate a FM modulated signal. The problem is the demodulated signal doesn't have a fixed sample rate,Because when a zero crossing is met counter will start. when the other zero crossing is met counter save the present value to a register and restart the counter.This process will continue.... The value of the register is the demodulated signal.But it doesn't have a fixed sample rate. So the demodulated signal cannot be filtered.

1) How to get a fixed sample rate?
2)What is the sample rate we should take as the sampling rate of the filter?
3)How to overcome this problem?
 

"variable sample rate" means exactly what?
Generally speaking, you may want to interpolate the signal to a higher sample rate.
 
You are coming at it from the wrong direction.

Don't count the time between zero crossings, count the number of zero crossings in a output rate sample period (Works best with a high IF).

Let K be a fixed point register.

@Input zero crossing: K = K +1;

@Ouput sample rate :
output = HPF (k); -- Remove the DC component.
K = K * 0.99;

Best if the highest modulating frequency be small compared to the output sample rate.

You can also do a phase detector and use the fact that frequency is the rate of change of phase.

Regards, Dan.
 
Thanks for all the replies.
"variable sample rate" means exactly what?

Variable sample rate means the sample data is coming in non constant (non regular) time intervals.
I can't understand what you explained above. Can you explained it further.

Don't count the time between zero crossings, count the number of zero crossings in a output rate sample period (Works best with a high IF).
Dan Mills, As you explained above your method is worked with high sample rate. The if frequency of my circuit is 10.7MHz and have a signal bandwidth of 100kHz.So using your method will be inappropriate. That is why I used my method,but it doesn't have a fixed sample rate.
How to overcome my problem?
 
Last edited:

At this rate, you could try something like the following:
1.) keep track of 1 us windows of time.
2.) within any 1us window, you will have 20 or 21 crossings.
3.) starting with the first transition in the 1us window, run a counter until you reach some number of (eg, 16 or 19 or 20) crossings, then stop.
4.) at the end of the 1us window, report this value.

This is an approximation, just like using zero-crossings instead of sampled values. It doesn't make use of every zero crossing in order to provide an estimate.
 
permute, I got what you say.But according to my knowledge I feel something like this.

As you say within the 1us time intervals we get 20 or 21 for 10.7MHz signal. for 2MHz signal we get 4 zero crossings. Am I correct? Then the IF frequency of the signal is 10.7MHz which has a 150kHz bandwidth and 75kHz frequency deviation. Then the signal vary from 9.95MHz to 11.45MHz. Now zero cross detection detect 19 for 9.95MHz and 22 for 11.45MHz then the variation of the zero cross detector is quite small. We couldn't use this signal for DSP.
 

You didn't yet manage what the "variable sample rate" exactly is. Is it pairs of time stamp and magnitude? What's the maximum time interval between samples?

Presumed that the Nyquist criterion is fulfilled, the original signal can be reconstructed and thus demodulated. In other words you are looking for suitable methods of signal reconstruction. Review your digital signal processing text books.
 
Thanks FvM, for you reply. What is the more practical variable sample rate reconstruction algorithm which is easy to implement in fpga. Can you give me an example.

As you told before I need to interpolate the data in order to reconstruct the data.Interpolation is the inverse of decimation. That means we need to add extra samples to the original signal. How to do that? Can I do it by copying the variable sample rate data to a register with a rate more than the maximum sample rate of the signal? And use that copying rate as the new sample rate?
 
Last edited:

We still don't know how the variable sample rate data are represented.

A general way could be
- connect the samples by straight lines
- resample it with a fixed data rate
- apply a low-pass filter
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top