# Phase shifting a sine wave smoothly

Discussion in 'Electronic Design' started by Greysky, Jan 7, 2004.

1. ### GreyskyGuest

I have a bit of a problem... I have to be able to shift the phase of an 5
MHz sine wave oscillator by plus / minus 90 degrees. It needs to be done
via analog (continuous) means, and without distorting the waveform in the
process. I once saw a circit that did something like this, by using a
voltage controlled resistor circuit, but that was soo long ago I don't
remember any particulars. Are there any nice methods of doing this and also
keeping the phase distortion of the output signal as small as possible?
Thanks

Luckily for you, the integral and derivative of a sine wave just so happens
to be the same sine wave with a phase difference of -90 or +90 degrees.
You can build very good integrators out of op-amps. Making the various
errors 'as small as possible' becomes a function of how good your op-amp and
support components (i.e., the integrating capacitor) are.

Differentiators tend to be more difficult to build due to the their rising
gain with frequency -- this is especially problematic if you're shooting for
very low noise designs. You could instead just invert your signal and then
integrate, although this is only the same as differentiating at one
frequency (since the trend of the magnitude response is 'wrong' -- if you
don't care about the magnitude response or can fix it later though, this is
still viable).

3. ### Spehro PefhanyGuest

sin(wt +/- a) = sin(wt) * cos(a) +/- cos(wt) * sin(a)

If digital in the control signal was acceptable, you could probably
use a couple of digital pots and a LUT in a micro with ADC input.

Best regards,
Spehro Pefhany

4. ### Michael BlackGuest

Do you need the fixed phase shift, or does this have to be variable?
The former is easy, the latter is more trouble.

Just look up single sideband generated by the phasing method. You need
a carrier with two signals 90 degrees apart. At a fixed frequency it's really
easy, but with more parts one can come up with a network that works
over a wider range.

The trick is usually to have two networks, each shifting by 45 degrees,
and when they accumulate you get the 90 degrees between points.

Michael

5. ### Active8Guest

Do you need the fixed phase shift, or does this have to be variable?
The former is easy, the latter is more trouble.

Just look up single sideband generated by the phasing method. You need
a carrier with two signals 90 degrees apart. At a fixed frequency it's really
easy, but with more parts one can come up with a network that works
over a wider range.

The trick is usually to have two networks, each shifting by 45 degrees,
and when they accumulate you get the 90 degrees between points.

Michael
[/QUOTE]
I bet the Mini-Circuits Phase modulators would do the job, if not,
there's enough info on circuit topology to get started, at least in
the handbook.

6. ### John SmithGuest

Source on the left, output on the right. I saw this one somewhere a long
time ago. Finding an op-amp to handle the 5 MHz is left to those who know
op-amps.

------------+--------------.
| |
.-. |
| | '
| | ---
'-' ---
| | |\|
+----------------------+-|-\
| | | >-
| +--------+|+/
| | |/|
' .-.
--- | |
--- | |
| '-'
-------------+--------------+
|
===
GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

7. ### Michael BlackGuest

But this is just another occurance of someone trying to extend audio

It's almost like "is the glass half full, or half empty". You've
shown something that works, but then it may not be the best choice
at RF because of the active element limitations.

Yet anyone with radio background would automatically suggest
an LC network, and the op-amp would be nowhere to be seen.

Michael

8. ### John LarkinGuest

Nowadays, 1 GHz opamps are cheap, and there are a few faster parts
around. Lots of classic "radio" functions can now be done with an
opamp or two.

John

9. ### John SmithGuest

Well... not really trying. It just happens to be an approach I remembered.

I didn't say it was the best choice. As with so many topics here, there are
a myriad of approaches which the reader must evaluate and eventually choose.
It's just an idea.

I'm not trying to compete with you, Michael. Perhaps your idea is better and
the OP may choose to use it. My feelings won't be hurt. I just assume people
would like to have a number of different approaches from which to choose and
I didn't see any harm in presenting it.

John

10. ### Michael BlackGuest

I wasn't intending to attack your solution. It was more a general observation
(and I believe someone else mentioned op-amps in this thread too).

In the hierarchy generally, I've seen plenty of times when people say
"I need to build a 2MHz oscillator, and I used an 8038 [or sometimes a 555]
and it's not working right. What am I doing wrong?". Or "I need to
get 3KHz bandwidth at 10MHz, but when I tried to design it with an
active filter it wouldn't work." Their vision is from the standpoint of
audio, and they just want to push the device a bit. But people with radio
background would come up with more suitable solutions that would work fine.
Sometimes things scale, sometimes they don't.

Look at audio circuitry, and you want to avoid inductors as much as possible,
because at low frequencies they are bulky, difficult to wind or procure,
and in some applications end up being more a problem than a solution.
But get to RF, and the values become much more manageable. And it's harder
to synthesize actual needs at radio with RC components than at audio.

So there often is a point where one wants to flip from "audio" thinking
to radio thinking. 1MHz for an RC oscillator is often pushing it,
yet it's real easy to make an LC oscillator at that frequency. But you've
got to have a really good reason to build an LC oscillator at 1KHz.

Michael

11. ### Michael A. TerrellGuest

That reminds me of a guy who thought he could build Cable TV
descrambler using a 741 op-amp in an active notch filter to remove the
inband jamming signal from Ch 3 TV (60 - 66 MHz) He saw a sample circuit
for a twin T audio filter and he was convinced that, "Its just a matter
of picking the right resistors."

--
We now return you to our normally scheduled programming.

Take a look at this little cutie! ;-)

Michael A. Terrell
Central Florida

12. ### MacGuest

I don't thing 5 MHz really qualifies as RF these days. At least in the
sense that no special techniques are required, other than using a ground
plane on your circuit board, and some small ceramic chip capacitors near
the op-amp power supply inputs.

Mac

13. ### MacGuest

I know you said digital is out, but have you considered a DDS? If I had to
do what you are doing, I'm sure I would use a DDS from Analog Devices, but
that is because I don't really know how to design a variable phase
shifter. Although, come to think of it, I think Analog Devices has those,
too.

You should also try minicircuits.

Just a thought.

Mac

14. ### Keith BuckGuest

Hi, A Goniometer works a treat and you may be able to find one in an old Tek
Vectorscope.
Regards Keith Buck

15. ### Phil HobbsGuest

I usually do this by using an active all-pass filter. You don't need an
op amp, any differential amp with high-impedance inputs works fine, as
long as the + input has twice the gain of the - input. The op amp
circuit below does this automatically, but you can arrange it with a
voltage divider otherwise. (Twenty years ago, I built two of these in
cascade, as part of a successive-approximation 60 MHz phase digitizer.
I used NE592s running at low gain for the amplifier, and put a
divide-by-2 voltage on the inverting input.)

R3

+--RRRRR--+
| |
Vin R2 | |
| |\ |
0---*----RRRRR--*--|-\ |
| | \ |
| | >--*----0 Ouput: Amplitude = Vin
| | /
+--RRRRRR---*--|+/ phase=2*arctan(R1/X)
| |/
R1 | where X is the total
| reactance of the LC circuit
+---------*
| |
| __L__
| \ / Hyperabrupt varactor,
| \ / e.g. MVAM series
| V
| ---+---
| ---+---
L2 | L1 |
LLL LLL L1 chosen to resonate with varactor at about 1V
LLL LLL L2 chosen to resonate with series circuit just
LLL LLL above whatever upper voltage limit you like
LLL LLL
| |
| *----------RRRRRR-----O Phase shift control
| | 2-15V -> 150 degree range
| ---+--- +- 4 degree linearity
| ---+--- Big cap
| | Xc << R1
+---------*
|
GNDGNDGND
GNDGNDGND

16. ### Phil HobbsGuest

I usually do this by using an active all-pass filter, which has the huge
shift. The circuit below gets you a very wide range, reasonable
linearity, and low distortion if you don't let the bias voltage get too
small or the signal swing too large. You don't need an op amp, any
differential amp with high-impedance inputs works fine, as long as the +
input has twice the gain of the - input. The op amp circuit below does
this automatically, but you can arrange it with a voltage divider
otherwise. (Twenty years ago, I built two of these in cascade, as part
of a successive-approximation 60 MHz phase digitizer.
I used NE592s running at low gain for the amplifier, and put a
divide-by-2 voltage on the inverting input.) The math is at the bottom,
but it's easy to work out.

R3 (R3= R2)

+--RRRRR--+
| |
Vin R2 | |
| |\ |
0---*----RRRRR--*--|-\ |
| | \ |
| | >--*----0 Ouput: Amplitude = Vin
| | /
+--RRRRRR---*--|+/ phase = -2*arctan(X/R1)
| |/
R1 | where X is the total
| reactance of the LC circuit
+---------*
| |
| __L__
| \ / Hyperabrupt varactor,
| \ / e.g. MVAM series
| V
| ---+---
| ---+---
L2 | L1 |
LLL LLL L1 chosen to resonate with varactor at about 1V
LLL LLL L2 chosen to resonate with series circuit just
LLL LLL above whatever upper voltage limit you like
LLL LLL
| |
| *----------RRRRRR-----O Phase shift control
| | 2-15V -> 150 degree range
| ---+--- +- 4 degree linearity
| ---+--- Big cap
| | Xc << R1
+---------*
|
GNDGNDGND
GNDGNDGND

Vout/Vin = (-1+2(jX/(R1+jX)) = (R1-jX)/(R1+jX) = exp(-j*2*arctan(X/R))
(gain is always 1)

17. ### Reg EdwardsGuest

Draw a bridge. Series C and R in the left-hand arm. Series R and C in the
right-hand arm. All 4 components with the same fairly low impedance.

Connect sinewave generator to top of the bridge.

Ground bottom of bridge.

Connect a high-value sliding potentiometer between the centres of the right
and left-hand arms. Tap off a phase-shifted voltage from the pot slider to
a following high input impedance circuit such as a source-follower. The
output voltage will vary between + and - 45 degrees relative to the
generator.

Do it twice in succession with a 2-gang pot and the phase will vary between
+ and -90 degrees. If I remember correctly the output amplitude is constant
versus phase shift. A little elementary circuit analysis will soon show.
---
Reg.

--
............................................................
Regards from Reg, G4FGQ
http://www.btinternet.com/~g4fgq.regp
............................................................

18. ### Tom BruhnsGuest

As one who has worked in the RF domain for quite a while now, I might
suggest LC, but that likely would not be my first suggestion. The
common way to do this task is to generate contra-phase signals, equal
amplitude, and put an RC between them, picking the output at the
junction of the R and C. Then vary the R or the C, and you vary the
phase of the output without varying its amplitude (assuming a high
input impedance buffer amplifier). Works fine and easily up into the
few-MHz region. Can be made to work much higher. No op amps
required, but they are allowable if you wish. Cascade a couple stages
of it to get more variation. You can use varicap diodes for the
variable C if you keep the RF voltage low enough; an anti-series pair
helps. You can see this circuit used as an PM modulator, for example,
in ICOM equipment and I suppose lots of other places. I may have
first seen it in a WWII radar training book, but surely it's been
known longer than that.

Cheers,
Tom

19. ### Fred BloggsGuest

Please view in a fixed-width font such as Courier.

V
+-------------+
| |
o-----+ | /
| | \ R
)||( /
V )||( \
in )||(----+ |
)||( | +----->Vout
)||( --- |
| | COM |
o-----+ | ===C
| |
+-------------+
-V

1
--- - R
jwC
Vout= V x -------- = V x /-2 ATN(wRC)
1 ------------
--- + R
jwC

The phase is NOT a very linear function of R or C.

It is good for jumping between discrete phase angles.

20. ### Fred BloggsGuest

Okay- you're getting very close to a good vector modulator...BTW, what's
a LUT ? Oh- Look-Up-Table, there's a name for people who acronymize
everything.