2016年11月5日土曜日

Synchronized AM demodulator by using “IQ demodulator” and calculations of square-multiplying and square root (Preliminary)

Synchronized AM demodulator by using “IQ demodulator” and calculations of square-multiplying and square root (Preliminary)
(C) Noboru, Ji1NZL, Nov. 2, 2016


[Abstract] 
AM receivers can cancel the change of the phase on the received signal by using an IQ demodulator and the math operation Vout = √(I(t)^2+q(t)^2). 
The IQ demodulator here may configured by analog circuit and that the math operation Vout = √(I(t)^2+q(t)^2) can be calculated by some MPU or DSP. This AM detector can get good quality of sound with very low distortion.

 Fig.1 An architecture of AM synchronized detector

1. How the AM synchronized demodulator works

AM RF signal received on the radio expressed as the equation (1). 
Here, I assume that Vam changes the phase θ(t)[rad] on the propagation path of the AM RF/ ( E/M ) wave. 

Vam= ( Vdc+x(t) )*Vc*sin(ωc*t+θ(t)) …(1)  

Vdc : DC voltage at AM modulator. Unit is [V].
x(t) : Baseband signal function for AM modulator. Unit is [V].
Vc  : Carrier peak voltage that AM receiver receives. Unit is [V].
ωc : Angular frequency of the AM modulator. Unit is [rad・Hz].
fc  : Frequency of the carrier ωc. Unit is [Hz].

There is a problem that the signal strength of decoded tone changed by this phase change. For example, when the receiver used the oscillator frequency = π/2 [rad] shifted for the equation (1), the decoded signal becomes 0. It means there is no tone. Or we feel it as “fading” phenomenon as time goes on.

The AM decoder here synchronized with the phase of the carrier, fix this problem.
Assume the baseband signal is a sine wave voltage of single audio frequency defined as (2) here.

x(t)=Vs*sin(ωs*t) …(2)  

Vs  :  Peak voltage of (2). Unit is [V].
ωs : Angular frequency of a sine baseband signal. Unit is [rad・Hz].
ωs = 2πfs …(3)
fs : Frequency of baseband sine wave. Unit is [Hz].

The voltage of the oscillator Vosc is expressed as

Vosc = Vo*sin(ωc*t) …(4)

Vo : Peak voltage of (4). Unit is [V].

At the equation (1), 

sin(ωc*t+θ(t)) = sin(ωc*t)*cos(θ(t))+cos(ωc*t)*sin(θ(t))  … (5)

Then (1) becomes


Vam= Vc*{Vdc+ Vs*sin(ωs*t)}* { sin(ωc*t)*cos(θ(t))+cos(ωc*t)*sin(θ(t)) } …(6)
      = Vc{ Vdc*sin(ωc*t)*cos(θ(t))+Vdc*(cos(ωc*t)*sin(θ(t))) )
              +Vs*sin(ωs*t)*sin(ωc*t)*cos(θ(t))+Vs*sin(ωs*t)*cos(ωc*t)*sin(θ(t)) } …(7)

Since V3 = Vam*Vosc , then (7)x(4) becomes V3,

V3 = Vc{ Vdc*sin(ωc*t)*cos(θ(t))+Vdc*(cos(ωc*t)*sin(θ(t))) )
              +Vs*sin(ωs*t)*sin(ωc*t)*cos(θ(t))+Vs*sin(ωs*t)*cos(ωc*t)*sin(θ(t)) } * Vo*sin(ωc*t)

=Vc*Vo{ Vdc*(sin(ωc*t))^2*cos(θ(t))+Vdc*(sin(ωc*t)*cos(ωc*t)*sin(θ(t))) )
            +Vs*(sin(ωs*t)*sin(ωc*t))^2*cos(θ(t))+Vs*sin(ωs*t)*sin(ωc*t)*cos(ωc*t)*sin(θ(t)) }

=Vc*Vo{ (sin(ωc*t))^2* {Vdc*cos(θ(t)) + Vs*sin(ωs*t)*cos(θ(t))}
            + (sin(ωc*t)*cos(ωc*t)*{ Vdc*sin(θ(t)) + Vs*sin(ωs*t)*sin(θ(t)) } }

=Vc*Vo{ (sin(ωc*t))^2* (Vdc + Vs*sin(ωs*t))*cos(θ(t))
          + (sin(ωc*t)*cos(ωc*t)) *(Vdc + Vs*sin(ωs*t))*sin(θ(t)) }  …(8)


Here,
(sin(ωc*t))^2 = (1/2)*(cos(2*ωc*t)-cos(ωc-ωc)) = (1/2)*{cos(2*ωc*t)-1}  …(9) 
sin(ωc*t)*cos(ωc*t) =(1/2)*sin(2*ωc*t) …(10)

Replace (sin(ωc*t))^2 and sin(ωc*t)*cos(ωc*t) in (8) by (9) and (10)
Then

V3 = Vc*Vo{  (1/2)*{cos(2*ωc*t)-1} * (Vdc+Vs*sin(ωs*t))*cos(θ(t)) + (1/2)*sin(2*ωc*t) *(Vdc+Vs)*sin(θ(t)) } 
    = Vc*Vo{ (1/2)*cos(2*ωc*t)*(Vdc+Vs)*cos(θ(t)) -(1/2)* (Vdc+Vs)*cos(θ(t)) + (1/2)*sin(2*ωc*t) *(Vdc+Vs*sin(ωs*t))*sin(θ(t)) }  …(10)

Very high RF frequency voltage cos(2*ωc*t) and cos(2*ωc*t) can be remove from (10) by LPF,

Then
V-i = Vc*Vo{ -(1/2)* (Vdc+Vs*sin(ωs*t))*cos(θ(t)) }  
    = -(1/2)*Vc*Vo{ (Vdc+Vs*sin(ωs*t)) *cos(θ(t)) } …(11)

V2 is -π/2[rad] shifted signal of the oscillator (4),

V2= Vo*sin(ωc*t-π/2) = -Vo*cos(ωc*t) …(12)

Here the equations (4) and (12) configures as so-called an “orthogonal oscillator”. 
They may generate orthogonal sine waves or square (pulse) waves that they are shifted -π/2 [rad] each other.

When the orthogonal oscillator generates sine waves, the mixer devices must be used as analog multipliers.

When the orthogonal oscillator generates square (pulse) waves, analog switches can be used as the mixer devices. 

Get V4 = Vam * V2, 
V4 = Vc{ Vdc*sin(ωc*t)*cos(θ(t))+Vdc*(cos(ωc*t)*sin(θ(t))) )
            +Vs*sin(ωs*t)*sin(ωc*t)*cos(θ(t))+Vs*sin(ωs*t)*cos(ωc*t)*sin(θ(t)) } * (-Vo*cos(ωc*t)) }
    = -Vc*Vo{ Vdc*sin(ωc*t)*cos(ωc*t)*cos(θ(t))+Vdc*((cos(ωc*t)^2)*sin(θ(t))) )
                    +Vs*sin(ωs*t)*sin(ωc*t)*cos(ωc*t)*cos(θ(t))+Vs*sin(ωs*t)*(cos(ωc*t))^2*sin(θ(t)) }
    =  -Vc*Vo{ sin(ωc*t)*cos(ωc*t){Vdc*cos(θ(t)) +Vs*sin(ωs*t)*cos(θ(t))}
                    +((cos(ωc*t)^2) {Vdc*sin(θ(t))+ Vs*sin(ωs*t)*sin(θ(t))}  }
  =  -Vc*Vo{ sin(ωc*t)*cos(ωc*t){Vdc +Vs*sin(ωs*t)}*cos(θ(t))
                  +((cos(ωc*t)^2) {Vdc+ Vs*sin(ωs*t)}*sin(θ(t))) } …(13)

Here,
(cos(ωc*t))^2 = (1/2)*(cos(2*ωc*t)+cos(ωc-ωc)) = (1/2)*{cos(2*ωc*t)+1}  …(14) 

sin(ωc*t)*cos(ωc*t) =(1/2)*sin(2*ωc*t) …(10)

V4 = -Vc*Vo{  (1/2)*sin(2*ωc*t) *{Vdc +Vs*sin(ωs*t)}*cos(θ(t))
                  +((1/2)*{cos(2*ωc*t)+1}) {Vdc+ Vs*sin(ωs*t)}*sin(θ(t))) }
    = -Vc*Vo{  (1/2)*sin(2*ωc*t) *{Vdc +Vs*sin(ωs*t)}*cos(θ(t))
                  +((1/2*Vdc)*{cos(2*ωc*t)) + (1/2){Vdc + Vs*sin(ωs*t)}*sin(θ(t))} ) } …(15)

Very high RF frequency voltage sin(2*ωc*t) and cos(2*ωc*t) can be remove from (15) by LPF,

Then
V-q= -Vc*Vo{ (1/2){Vdc + Vs*sin(ωs*t)}*sin(θ(t))} ) } 
= -(1/2)*Vc*Vo*{Vdc + Vs*sin(ωs*t)} *sin(θ(t)) } …(16)

Here, define K(t) is as
K(t) ≡ -(1/2)*Vc*Vo*{Vdc + Vs*sin(ωs*t)} …(17)

Then (16) can be written as
V-q = K(t)*sin(θ(t)) …(18)

and (11) can be written as
V-i = K(t)*cos(θ(t))  …(19)

By using (18) and (19),

V-i^2 + v-q^2 = {K(t)*cos(θ(t)) }^2 + {K(t)*sin(θ(t))}^2
                    = K(t)^2*{cos(θ(t))}^2 + K(t)^2*{sin(θ(t))}^2 
                    = K(t)^2*{ {cos(θ(t))}^2 + {sin(θ(t))}^2 }  … (∵ {cos(θ(t))}^2 + {sin(θ(t))}^2 =1 )
                    = K(t)^2

∴ √(V-i^2 + v-q^2) = K(t)
                            = -(1/2)*Vc*Vo*{Vdc + Vs*sin(ωs*t)} …(20)

The equation (20) is the same as AM decoded voltage Vout on the Fig.1.
∴ Vout = -(1/2)*Vc*Vo*{Vdc + Vs*sin(ωs*t)} 
            = -(1/2)*Vc*Vo*Vdc  - (1/2)*Vc*Vo*Vs*sin(ωs*t) …(21) 

The equation (21) does not have the variable θ(t) in these parameters.
And Vo and Vdc are constant value. 
The DC voltage -(1/2)*Vc*Vo*Vdc [V] can be removed by some condenser such as 1uF.
Vc (signal strength) can change according to the time goes. 
However it can be nearly constant by using AGC (Automatic Gain Control) in the receiver.

This means output signal voltage Vout is extracted the baseband signal Vs*sin(ωs*t) as the output “Vout” from Vam, 
it is independent of change value of the phase θ(t),
and the AM Synchronized reception is possible by using the architecture of Fig.1.

I draw the Fig.1 by referencing the schematic[1] and changed the delay function to configure an orthogonal OSC(oscillator). that generates a 1MHz sine or square (pulse) wave and a π/2 [rad] shifted one.

If voltages V-i and V-q are sampled by A/D convertors, MPU or DSP can calculate Vout by the equation (21). 


Fig.2 is an example of simulation result of the transient analysis by LTspice iV developed by (C) Linear Technology inc. 
The quality of the detector is pretty better than the traditional diode detector.


Fig.2 Simulation result of the transient analysis by LTspice iV 


2. Subjects

(1) Frequency stability of the orthogonal oscillator and error of demodulated tone

    The orthogonal signal oscillator have to have good frequency stability such as a few Herz.
    But old type of PLL that sets the frequency such as 100Hz every steps is used, 100Hz low beat can occur.
    Frequency error for the orthogonal oscillator can affect the tone difference. Especially, when listening music or songs. 
    It seems that human’s ears are very sensitive for 8Hz frequency drift.
    Accuracy and stability of frequency for the orthogonal oscillator is very important.  
    Latest DDS can satisfy this accuracy.

(2) Sampling noise of ADC (AD converter)
    The sampling noise of ADC (AD convertor) may affect the RF input of the receiver. It must be minimized.

(3) Switching noise of Analog switches
    When analog switches are used as the orthogonal mixer, they generates some noise. However, it can removed by LPF.
    In the actual experiments, they are practical enough.

(4) Wide dynamic range of AM demodulator
    The traditional diode AM detector so called “Peak detector” or “Envelope detector” generates harmonics tone such as 2KHz, 3KHz, …. if the baseband frequency is 1KHz used. This is derived from the electric characteristics of exponential function on the diodes current.  { The current on diode is expressed as  “ i = Is*(exp(K*v)-1) “. }
This demodulator can have much wider dynamic range for the baseband signal swings then the diode detector. 
Because the demodulator by analog multipliers or analog switch can have wide dynamic range without tone distortion such as the traditional diode detector.

(5) Programmable LPF/BPF
The LPF/BPF at I/Q output sides can be defined by the software on the DSP or MPU. Eg. FIR filter, IIR filter.
These LPF/BPF also can be configured by the analog circuit such as CR filter, LC filter, or other filter used with OP amps.  

References:
[1] The schematics of “AM synchronous detector” by the author Mr. “Kaikyou no Kaze” / “The wind from the sea” 
(Copyright of the schematics is reserved and is respected as nice knowledge of the author.)

Return to INDEX