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.

Tracking Phase comparator Logic

Status
Not open for further replies.

curious_mind

Full Member level 4
Full Member level 4
Joined
Apr 14, 2019
Messages
212
Helped
0
Reputation
0
Reaction score
3
Trophy points
18
Activity points
1,603
I have two waveforms, A and B of identical frequency. "A" is the reference wave which is fixed, "B" wave moves in steps of 5us- 20ms. All I need is to track the change in phase without recomputing every time. Can anybody suggest proven method in hardware
 

Hi,

The obvious thing is to use a "phase comparator circuit".
But most probably you already tried/simulated this and failed .... otherwise you did not start this thread.

I have two waveforms,
good that you know .... but if you need detailed help, you should give us the information, too.
Is it a random, noisy waveform, sine, triangle, square wave, or any other waveform.

But "5us- 20ms" is meaningless as long as we don't know the both frequency ranges of A and B.

Klaus

Added:
Please enlighten us. What does:
* "track ....without recomputing"
* "every time"
mean for you.

You want some
* analog value, or some
* digital value (update period, resolution, precision...)?

Klaus
 

look up CD4046 - it will give you a few ideas on phase comparators - and how it can be done ....
 

Here are details. A and B are square wave TTL level 50 Hz signals from field. Based on field conditions, B wave moves in steps of 5us with respect to A wave (the direction is always left wrt A wave, ie.. B leads A). All I need is to track this phase change and display it digitally. My first though was to use XOR gate and measure pulse width. But recomputing of this width happens everytime, the phase changes. I require that when B moves by 5us, count is 1 and 10us, count is incremented from 1 (already tracked value).
 

Hi,

I'm still not sure whether you want a digital system or an analog system.

XOR --> low_pass_filter --> analog value
You may use an additional DFF to find lead/lag information.

Or you use a microcontroller with capture_feature to get duty_cycle.

*****
I'm still confused with your informations.
* If one leads the other you have a phase_shift_range of 0...180°, which means 0...10ms.
* With stepsize of 5us you get 0...2000 steps.
* A and B are synchronous to each other. Just the phase angle jumps.
Is all the above true?

Klaus
 

I need a digital system and phase should be accumulated as it changes. To make it simple, whenever B lags or leads A, phase accumulator either increments or decrements to indicate the total change in phase (I am looking for a concept, as the time 5us indicated is only tentative and subject to change)
 

Hi,

What about a sketch and/or timing diagram?

"Phase should be accumulated", means:at the beginning, if phase is 5us then the result is "5us" .... if at the next period the phase still is 5us ... the results accumulates up to "10us" ..... is this what you want?

Before you clearly said "B leads A" now you say "B lags or leads A" .... it contradicts...

Klaus
 

If phase remains unchanged it should be still 5us. only when it changes to 10us, phase accumulator must detect this change and add with its past input. I need a tracking phase accumulator.
 

well - you need to sit down and do some sketches and some design ... and try to largely work it out yourself
 

If I understand the requirement and it has to be done digitally, an XOR function of the two signals will produce a high during the time phase difference. What you need to do is count at 5uS rate during that high period. At your reference time, look to see if the second signal is high or low to see whether you should be counting up or down.

Brian.
 

Hi

If phase remains unchanged it should be still 5us. only when it changes to 10us, phase accumulator must detect this change and add with its past input. I need a tracking phase accumulator.
Then you don´t need to accumulate something, you just need to measure the phase difference.

If phase difference is 5us --> show 5us (= "1" )
If phase difference is 10us --> show 10us (= "2" )
If phase difference is X us --> show X us (= "X / 5us" )

If I understood correctly then you just measure in steps of 5us.

Klaus
 

If phase remains unchanged it should be still 5us. only when it changes to 10us, phase accumulator must detect this change and add with its past input. I need a tracking phase accumulator.

This makes zero sense. By your definition, if the phase difference is 5us, your output is 5. If it changes to 10uS you "add with its past input", so now your output is 15?

People keep asking you to explain what you're trying to do, and you lead us further and further down the rabbit hole.

I REALLY don't think you want a "phase accumulator"; I think (as everybody else here does) that you want a phase detector.
 

I have two waveforms, A and B of identical frequency. "A" is the reference wave which is fixed, "B" wave moves in steps of 5us- 20ms. All I need is to track the change in phase without recomputing every time. Can anybody suggest proven method in hardware

Though the problem requirement not very clear but you may consider two counters, one running on A signal and one on B. at reset force zeros on counters. Then they provide tracking. I will use a system clock faster than your signal and count up using the edge of A/B as clock enable. The difference of counters then indicates phase shift up to resolution of your counters.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top