# Quadrature sinewave output

Discussion in 'Electronic Design' started by Remi, Nov 11, 2003.

1. ### RemiGuest

Dear All

From a sinewave signal input (frequency varies continually: ~1.6MHz ±
200kHz, amplitude ~5Vpp) I would like to obtain two levelled sinewave
signals in quadrature. The two signals must be in the same frequency
as the input: one in phase, the other exactly in quadrature. I don't
think I can use a simple integrator/filter, as the amplitude and the
phase are generally function of the frequency. Maybe do you know a
good idea or know the magic component that does this directly?
Thank you for your help

Remi B.

2. ### Keith R. WilliamsGuest

How about a DLL with a tap at 90 degrees (tapped at 1/3 of the loop
delay)?

3. ### anthony wooldridgeGuest

Try searching for an all pass filter.
This has theoretically unity gain but phase varies with frequency.
A simple opamp invertor with the input signal also fed to the positive opamp
input
via a lowpass RC network does the trick.

Regards
Anthony

4. ### ETchncnGuest

Dear All
Probably not the only approach but you might consider using an AD9854 DDS chip.
Two possibilities-either use the DDS to be the frequency source if that's
possible (the chip has two outputs in quadrature). If that's not possible you
could use a heterodyne technique in which you mix the input signal with the
outputs of the DDS with a frequency offset or simply as a dual phase
synchronous detector to measure signal amplitude and phase. Apply the required
low pass filtering to the two mixer outputs. Another possibility that I've been
investigating is using two of the lower cost DDS chips, setting the output of
the two to be in quadrature within a very small percentage of error. This would
require that the two chips could be synchronized so that quadrature could be
achieved. If you need to be sure your outputs are in quadrature (you have to
filter the DDS outputs to remove spurs, etc. and you'll no doubt end up with
unequal phase shifts through the filters due to component tolerances) you can
again use a phase detector (passive or active). Mix the outputs of the two
quadrature signals and low pass filter the output of the mixer. There will be a
null in the output when the signals are in quadrature. It's not the smallest
parts count solution but it might give you some ideas.

Regards,
Jim

Regards,
Jim

5. ### anthony wooldridgeGuest

Sorry my fault I didn't read the question properly!
I didn't see that the frequency varied.
The all pass will obviously change the phase as the frequency varies.
But maybe its accurate enough?
Regards
Anthony

6. ### John WoodgateGuest

I read in sci.electronics.design that Remi
2003:
That's no problem.
Does it HAVE to be in phase with the input? How much tolerance can you
allow?
How 'exactly'?

You need to specify two things:

- the maximum acceptable phase difference between the 'in phase' output
and the input;

- the maximum deviation from exact quadrature between the 'quadrature'
and in phase' outputs.

7. ### Fred BloggsGuest

This technique will give very good results:
http://www.maxim-ic.com/appnotes.cfm/appnote_number/1946/ln/en

8. ### Luhan MonatGuest

Remi,

Are you actually processing an existing signal, or are you just trying
to produce the sin/cos pair?

There are lots of ways to generate a pair of signals from scratch.

If you start with an existing signal, the most common method is not to
produce the 90 degree phase shift, but to produce a pair of outputs at
+45 and -45 degrees using passive components. This exact problem came
up when 'single side band' (SSB) transmission became popular in ham radio.

9. ### Ken SmithGuest

If you have the signal why do you need another one in phase with it?
A 2 pole low pass filter has 90 degree phase shift near the cut off
frequency. If you make a voltage controlled low pass filter, you can use
an XOR type phase detector and feedback to make exactly 90 degrees of
shift.

10. ### Jim ThompsonGuest

I've been successful building all-pass filters on-chip that hold 90°
over nearly an octave.

Use two all-pass filters:

Filter #1... corner at (sqrt(2)-1)*Fcenter

Filter #2... corner at (sqrt(2)+1)*Fcenter

Phase between outputs will be 90°±2° over an octave range. (Tolerance
from memory

...Jim Thompson

11. ### John LarkinGuest

An allpass can be made to have flat gain and constant 90 degrees phase
shift over a very wide frequency range; one common SSB generation
technique does this. ARRL handbooks usually have circuits.

John

12. ### Herbert BlennerGuest

Subject: Quadrature sinewave output
Two feedback ideas for precise ninety-degree phase shifts come to mind. The
first uses an integrator to produce a precise ninety-degree phase shift and a
leveler to maintain a constant output amplitude. This leveler circuit consists
of an amplitude modulator, amplitude detector and error amplifier. The second
approach uses a voltage-controlled allpass filter, quadrature phase detector
and error amplifier.

Herbert

13. ### John WoodgateGuest

I read in sci.electronics.design that Herbert Blenner <>
Which tend to be just a wee bit complicated.

14. ### gwhiteGuest

PLL?

+---------------------------O Cos(A)
|
| /¯¯¯\ +---+ +---+
Cos(A) O--+--( X )---|LPF|--|VCO|-+-O Sin(A)
\___/ +---+ +---+ |
| |
+-------------------+

The PD*LPF has zero output for 90 deg inputs and phase lock.

That is: Sin(A)Cos(A) = Sin(2x)/2

Obviously Sin(2x) is knocked out by the LPF.

Please do the right thing when it comes to "leveling" and filtering out
harmonics.

Once you figure out the solutions are rarely trivial for any significant
bandwidth, you might redefine the scope of your problem. Digital dividers can
do near perfect wideband 50% dutyCycle phase splitters if you can input 4f.
However, the digital outputs are square. Also peruse "Phase-Sequence network"
on p295 of AoA for a wideband analog solution.

15. ### RemiGuest

The tolerance for the deviation between the I and Q signal is less
than 1deg, and the phase difference between the input and the I signal
is also less than 1deg.
About the PLL: I thought that the output of PLL is always square wave,
am I wrong? Is it possible to find one with sinevave output?

Anyway, thank you for your advices; I will probably consider technique
like SSB to produce the quadrature signals.

Regards,
Remi

16. ### Bill SlomanGuest

The waveform you get out of your VCO depends on the VCO. I've built
one phase-locked loop with an LC-sine-wave oscillator. The voltage
control of frequency was effected by a pair of varactor diodes (driven
in anti-phase by a centre-tapped inductor to minimise distortion). The
machine it was designed for never went into production, but the design
was pinched by one of my colleagues for an electron microscope that
did go into production.

If you set up a digital phase-locked loop, you can use the Analog
Devices DSP chips as your VCO. The AD9854 has already been recommended

It would give you are very nice pair of sine waves.

17. ### gwhiteGuest

You are wrong in the sense it is whatever you design it to be. "Square wave" is
a very specific case too, as it implies a 50-50 min-max and that it is
rectangular. Generally speaking, the more specific the requirements, the harder
the solution.
Why not make it? This is s.e._design_. I could not care less how you solve
your problem, whatever works best for you is what you should do, but the PLL
approach is capable of a very precise 90 deg phase difference (approaches 0).
All oscillators use some sort of limiting. So if you are willing to use a bit
more sophisticated approach to the limiting mechanism in the VCO, you can obtain
a fairly pure sine wave out. Or you can just filter the output before it is put
into the PD.

It is a matter of spec'ing requirements and you did not define purity. A "sine
wave" in the absolute sense is not achievable (we would need to wait for an
eternity to see if it was "pure"). If you find your solutions to be unwieldy,
(complex and/or expensive), it is fair to question both the original spec and
the solution approach. At some point things stop being worth doing.