JPS60253331A - Initial value setting system in control start mode - Google Patents

Initial value setting system in control start mode

Info

Publication number
JPS60253331A
JPS60253331A JP10991284A JP10991284A JPS60253331A JP S60253331 A JPS60253331 A JP S60253331A JP 10991284 A JP10991284 A JP 10991284A JP 10991284 A JP10991284 A JP 10991284A JP S60253331 A JPS60253331 A JP S60253331A
Authority
JP
Japan
Prior art keywords
modem
value
circuit
distortions
equalization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10991284A
Other languages
Japanese (ja)
Inventor
Hiroshi Yamada
寛 山田
Koji Aoki
青木 耕司
Naoki Watanabe
直樹 渡辺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP10991284A priority Critical patent/JPS60253331A/en
Publication of JPS60253331A publication Critical patent/JPS60253331A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/04Control of transmission; Equalising

Abstract

PURPOSE:To equalize the circuit distortions regardless of variation of the transmission characteristics in an MODEM by equalizing the distortions within the MODEM with return of own station to store the equalization value as the initialization value and starting the automatic equalization and the control of an automatic phase control circuit for the circuit distortions based on said initialization value. CONSTITUTION:Switches SW1 and SW2 are set at the dotted line sides for return at own station in order to equalize the distortions within an MODEM before the circuit distortions are equalized by the MODEM. In this case, the initialization value of the center value of a dynamic range is given previously to up/down counters 19, 23 and 27 from RAM29-31. Then the equalization is carried out, and the values of counters 19, 23, 27 are stored in RAM29-31 as the result of equalization. Then switches SW1 and SW2 are changed to the solid line sides to secure the actuation of the MODEM. In this case, the values stored in RAM29-31 are given to counters 19, 23, 27 as the initial values. Then the circuit distortions are equalized from the value obtained by equalizing the distortions within the MODEM. Therefore, a large distortion does not suddenly produce when the working is started.

Description

【発明の詳細な説明】 (a) 発明の技術分野 本発明は回線歪を等化する自動等化器及び自動位相制御
回路を持つモデムに併1)、動作開始時モデム内の歪の
影響をうけない制御開始時の初期値設定方式に関する。
DETAILED DESCRIPTION OF THE INVENTION (a) Technical Field of the Invention The present invention provides a modem having an automatic equalizer and an automatic phase control circuit that equalizes line distortion; This invention relates to an initial value setting method at the start of control that is not subject to change.

(b) 技術の背景 アナログ・伝送路を使用するデータ回線では、送信側の
データ信号をアナログに変換して伝送路へを用いる。又
モデムは通常伝送路の回線歪を等化する自動等化器及び
自動位相制御回路を持っている。
(b) Technical background In data lines that use analog transmission lines, the data signal on the transmitting side is converted to analog and used for the transmission line. In addition, modems usually have an automatic equalizer and an automatic phase control circuit to equalize line distortion in the transmission line.

(e) 従来技術と問題点 回線歪を等化する自動等化器(以下AEQと称す)及び
自動位相制御回路(以下APCと称す)を持つ従来例の
モデム及び問題点に付き説明する。
(e) Prior Art and Problems A conventional modem having an automatic equalizer (hereinafter referred to as AEQ) and an automatic phase control circuit (hereinafter referred to as APC) for equalizing line distortion and its problems will be explained.

第1図は従来例のモデムのブロック図である。FIG. 1 is a block diagram of a conventional modem.

第1図において送信側は、直列に送られてくるデータを
符号化回路1にて多値符号に変換し、ディジタル・アナ
ログ変換器(以下D/Aと称す)2にでアナログに変換
し、低域F波器(以下LPFと称す)3にてナイキスト
整形を行々い、変調ば以下MODと称す)4にて変調し
、帯域通過r波器(以下BPFと称す)5にて不要波を
取除き伝送路に送出する。
In FIG. 1, on the transmitting side, serially sent data is converted into a multilevel code by an encoding circuit 1, converted to analog by a digital-to-analog converter (hereinafter referred to as D/A) 2, and A low-pass F wave filter (hereinafter referred to as LPF) 3 performs Nyquist shaping, modulation is performed in a modulation unit (hereinafter referred to as MOD) 4, and a band pass R wave filter (hereinafter referred to as BPF) 5 removes unnecessary waves. is removed and sent to the transmission line.

受信側では伝送路よシ送られてきたアナログ信号の不要
波をBPF6にて取除いた信号の中から搬送波を位相同
期回路(以下PLL回路と称す) ′13江で抽出し、
搬送波自動位相制御回路(以下CAPCと称す)14の
移相回路17にて最適位相とし、復調器(以下DEMと
称す)7に加え、DEM7にて復調し、不要波をLPF
8にて取除き、アナログ・ディジタル変換器(以下A/
Dと称す)9にてディジタルに変換し、自動等止器(以
下AEQと称す)XOK<符号量干渉がないように波形
整形を行ない識別回路11に入力する。
On the receiving side, a phase-locked circuit (hereinafter referred to as a PLL circuit) extracts a carrier wave from the signal from which unnecessary waves of the analog signal sent through the transmission line have been removed using a BPF6.
The phase shifting circuit 17 of the carrier automatic phase control circuit (hereinafter referred to as CAPC) 14 sets the optimum phase, and in addition to the demodulator (hereinafter referred to as DEM) 7, demodulation is performed in the DEM 7, and unnecessary waves are passed through the LPF.
8, and the analog/digital converter (hereinafter referred to as A/
The signal is converted into a digital signal by an automatic equalizer (hereinafter referred to as AEQ) 9 (hereinafter referred to as D), subjected to waveform shaping so that there is no code amount interference, and input to the identification circuit 11.

識別回路11では、入力した信号が多値信号の中心レベ
ルより高いか低いかの極性信号及び目標とする等化波形
を表す基準信号と比較した等化器すなわち基準値に対す
る大小を示すエラー信号を、AEQIOの相関回路に入
力すそと共に、多値信号のレベルを識別し、復号化回路
12にて多値信号を直列信号として出力する。
The identification circuit 11 receives a polarity signal indicating whether the input signal is higher or lower than the center level of the multilevel signal, and an error signal indicating the magnitude of the equalizer compared with a reference signal representing a target equalized waveform, that is, the reference value. , AEQIO's correlation circuit identifies the level of the multi-level signal, and the decoding circuit 12 outputs the multi-level signal as a serial signal.

この場合LPF8の出力よりPLL15にてタイミング
クロックを抽出し、タイミングクロック自動位相制御回
路(以下TAPCと称す)16内の移相回路21にて最
適位相としたタイミングクロックヲAEQI O,II
I*別回路111 ’41号化回路12に供給する0 AEQloでは、入力した信号をシフトレジスタ25に
入力し各タップから得られた遅延信号をビット毎に時分
割多重化した信号xtは、演算器26レジスタ25のタ
ップにわたり累算されて波形等化された信号を得る。
In this case, the PLL 15 extracts the timing clock from the output of the LPF 8, and the phase shift circuit 21 in the timing clock automatic phase control circuit (hereinafter referred to as TAPC) 16 outputs the timing clock with the optimum phase.
I* Separate circuit 111 '41 0 In AEQlo, the input signal is input to the shift register 25 and the delayed signal obtained from each tap is time-division multiplexed bit by bit. 26 is accumulated over the taps of register 25 to obtain a waveform equalized signal.

一方相関回路28では識別回路11から極性信号及びエ
ラー信号が入力されており、タップ毎に両者の相関をと
シ、タップ毎の等化の補正方向征負)をアップダウンカ
ウンタ27に与えタップ毎に設定された重み量だけ等化
補正係数yiを修rると共に、パルスの両側のサンプリ
ング点のタイミングの位相のずれによる最適値からのレ
ベルのずれ(正負)及び搬送波位相のずれによる最適値
からのレベルのずれ(正負)をTAPC回路16の相関
回路24.CAPC14の相関回路20に与える。
On the other hand, the correlation circuit 28 receives the polarity signal and the error signal from the identification circuit 11, calculates the correlation between the two for each tap, and provides the up/down counter 27 with a correction direction for equalization for each tap. In addition to correcting the equalization correction coefficient yi by the weight amount set in The level deviation (positive or negative) of the TAPC circuit 16 is calculated by the correlation circuit 24. It is applied to the correlation circuit 20 of the CAPC 14.

相関回路24.20では入力する2つのタイミング位相
のずれ、2つの搬送波位相のずれによる信号の相関をと
り補正方向(正や)をアップダウンカウンタ23.19
に与えアップダウンカウンタ23゜19の出力を補正方
向に変化させn/A 22 * 18にて直流に変換し
、タイミングクロック、搬送波を最適位相にするよう移
相回路21,17の移相量を制御する。
The correlation circuit 24.20 correlates the signals due to the shift in the two input timing phases and the shift in the two carrier phases, and uses an up/down counter 23.19 to determine the correction direction (positive direction).
The output of the up/down counter 23゜19 is changed in the correction direction, converted to DC by n/A 22*18, and the amount of phase shift of the phase shift circuits 21 and 17 is adjusted so that the timing clock and carrier wave have the optimum phase. Control.

アップダウンカウンタ19,23.27に初期値を与え
る方法につき、代表例としてアップダウンカウンタ19
を例えば4ビツトカウンタとし、第2図を用いて説明す
ると、4ピツトの最大値″1゜1.1.ビ最小値″o、
 o、 o、 o”の中心値″1゜0、0.0″を固定
ロード値とし、ダイナミックレンジの中心になるよう初
期値を設定し、相関回路20よりの補正方向に従かいア
ップ又はダウンカウントを行わせ、アップ又はダウンし
た値をo/A18にて直流信号に変換して搬送波を最適
位相になるよう移相回路17の移相量を制御する。
Regarding the method of giving initial values to the up/down counters 19, 23.27, the up/down counter 19 is a typical example.
For example, let's take a 4-bit counter and explain it using Figure 2.The maximum value of 4 bits is ``1゜1.1.Biminimum value''o,
The center value "1°0, 0.0" of "o, o, o" is set as a fixed load value, the initial value is set to be the center of the dynamic range, and the load value is increased or decreased according to the correction direction from the correlation circuit 20. A count is performed, and the up or down value is converted into a DC signal by the o/A 18, and the amount of phase shift of the phase shift circuit 17 is controlled so that the carrier wave has an optimum phase.

しかしモデムにはアナログ回路が含まれている為温度湿
度の変化により伝送特性(振幅、遅延特性)が変化を受
ける。
However, since modems include analog circuits, their transmission characteristics (amplitude and delay characteristics) are subject to changes due to changes in temperature and humidity.

従ってモデムを動作させずに例えば低温の所に置いてお
いた場合、低温による伝送特性の変化(歪)が大きいと
、モデムの電源をオンとし動作を開始した時に、この変
化量(歪)と伝送路上の歪が重畳され大き々歪が急に発
生し、識別回路11にて、目標とする等化波形を表す基
準信号と比較し基準値に対する大小をめる場合、正負の
方向の推定を間違え表い範囲を越え制御不能になること
があるO 即ち正負の方向を推定するのけ、多値レベルを基準レベ
ルとし、この基準レベルよシ多値レベルの間隔の1/2
以内大きい場合は正とし、小さい場合は負としているが
、多値レベルの間隔のl/2以上レベルがかわると、ル
ベル高いか低いかの多値レベルを基準として比較する範
囲に入り、正負の方向の推定が逆となり、1制御不能と
なる。
Therefore, if the modem is left in a low-temperature place without operating, and the change (distortion) in the transmission characteristics due to the low temperature is large, when the modem is turned on and starts operating, the amount of change (distortion) will be When distortion on the transmission path is superimposed and a large distortion suddenly occurs, the identification circuit 11 compares it with a reference signal representing the target equalized waveform to determine the magnitude of the reference value. In other words, when estimating the positive and negative directions, the multivalue level is used as the reference level, and from this reference level, the interval between the multivalue levels is 1/2.
If the level is greater than or equal to 1/2, it is considered positive, and if it is smaller, it is considered negative. However, if the level changes by more than 1/2 of the multi-value level interval, it enters the range of comparison based on the multi-value level, which is higher or lower, and is considered positive or negative. The estimation of the direction is reversed, resulting in a loss of control.

通常は歪の変化速度は遅いので以上のようなことは起こ
らないが、電源投入し動作開始した時は、モデムの歪が
大きいと、太き表歪か急に発生するのでこのような問題
が発生する。
Normally, the rate of change in distortion is slow, so the above problem does not occur, but when the power is turned on and the modem starts operating, if the modem has a large distortion, thick distortion will suddenly occur, so this problem may occur. Occur.

(d) 発明の目的 本発明の目的は上記の問題に紹み、モデムの動作開始時
、モデム内の伝送特性の変化に影響されずに、回線歪を
等化出来る制御開始時の初期値設定方式の提供にある。
(d) Purpose of the Invention The purpose of the present invention is to address the above problem and provide an initial value setting at the start of control that can equalize line distortion without being affected by changes in transmission characteristics within the modem when the modem starts operating. The purpose is to provide a method.

(e) 発明の構成 本発明の目的は、モデム内の歪を自局折返しであらかじ
め等化して、その等化した値を初期設定値として記憶素
子に記憶さしておき、回線歪に対しては該初期設定値か
ら自動等化及び自動位相制御回路の制御を開始するよう
にすることで達成出来る。
(e) Structure of the Invention The purpose of the present invention is to equalize distortion in the modem in advance by looping back to the local station, store the equalized value in a storage element as an initial setting value, and apply it to line distortion. This can be achieved by starting control of the automatic equalization and automatic phase control circuit from the initial setting value.

即ちこのように制御開始時初期値を設定すれば、モデム
内の伝送特性の変化は既に等化されておシ、回線歪と重
畳されることはなく彦るので太き表歪が急に発生するこ
とはなく回線歪を等化出来る。
In other words, if you set the initial value at the start of control in this way, changes in the transmission characteristics within the modem have already been equalized and will not be superimposed with line distortion, so thick table distortion will suddenly occur. Line distortion can be equalized without having to do anything.

(f) 発明の実施例 以下本発明の一実施例につき図に従って説明する。(f) Examples of the invention An embodiment of the present invention will be described below with reference to the drawings.

第3図μ本発明の実施例のそデムのブロック図、第4図
はアップダウンカウンタに制御開始時の初てあり10′
はAEQ、14’はCAP(’、xs′はTAPC,2
9釉31はRAM5WI、SW2はスイッチを示す。
Fig. 3 is a block diagram of the system of the embodiment of the present invention.
is AEQ, 14' is CAP (', xs' is TAPC, 2
9. Glaze 31 indicates RAM5WI, and SW2 indicates a switch.

第3図で第1図と異々る点は自局折返しを可能とするよ
うスイッチSWI、SW2を設けた点と、自局折返しで
モデム内の歪を等化する場合アップダウンカウンタ19
,23.27に初期値を設定し、等化器のアップダウン
カウンタ19.23.27の値を記憶するRAM29〜
31を設けた点である。
The difference between FIG. 3 and FIG. 1 is that switches SWI and SW2 are provided to enable loopback to the local station, and an up/down counter 19 is used to equalize distortion in the modem by loopback to the local station.
, 23.27 and stores the value of the equalizer up/down counter 19.23.27.
31 was provided.

第3図の場合は、モデムにて回線歪を等化する前に温度
湿度等で発生したモデム内の歪を等化する為に、スイッ
チSWI、SW2を点線側として自局折返しとする。
In the case of FIG. 3, the switches SWI and SW2 are set to the dotted line side to return to the local station in order to equalize the distortion within the modem caused by temperature, humidity, etc. before equalizing the line distortion in the modem.

この場合アップダウンカウンタ19.23.27にはR
AM29〜31よ)従来と同じく、ダイナミックレンジ
の中心値の初期設定値を与えておき、等化を行ない等化
結果のアップダウンカウンタ19゜23.27の値をR
AM29〜31に記憶させておく。
In this case, the up/down counter 19.23.27 has R
AM29-31) As before, give the initial setting value of the center value of the dynamic range, perform equalization, and set the value of the up/down counter 19°23.27 of the equalization result to R.
It will be stored on AM29-31.

次にスイッチSWI、SW2を実線側としてモデムとし
ての動作を行なわす。この時の初期値としてはRAM2
9〜31に記憶された値をアップダウンカウンタ19,
23.27に与え、モデム内の歪を既に等化した値よシ
回線歪を等化さずようにし、動作開始時大きな歪が急に
発生しないようにする。
Next, the switches SWI and SW2 are set to the solid line side to operate as a modem. The initial value at this time is RAM2
The values stored in 9 to 31 are transferred to the up/down counter 19,
23.27, and do not equalize the line distortion to the value that has already equalized the distortion in the modem, so that large distortion does not suddenly occur at the start of operation.

この自局折返し及びモデムとして動作さす場合の初期値
の与え方を、代表例としてアップダウンカウンタ19を
例えに4ビツトカランタとして第4図を用いて設問する
と、自局折返し時は、従来と同じくダイナミックレンジ
の中心値である1′1゜0、0.0”を初期値として、
牟テム内の歪を等化し、等化器の値が例えば1.1. 
O,Oとなればこの値をRAM29に記憶させておき、
回線歪等化開始時は、この値を初期値としてアップダウ
ンカウンタ19にロードして制御を開始するようにする
When asked how to give an initial value when returning to the own station and operating as a modem, using the up/down counter 19 as a typical example and using a 4-bit counter as shown in Fig. With the center value of the range 1'1°0,0.0'' as the initial value,
The distortion within the meter is equalized, and the value of the equalizer is, for example, 1.1.
If it becomes O, O, store this value in the RAM 29,
When starting line distortion equalization, this value is loaded into the up/down counter 19 as an initial value and control is started.

従って回線歪等化開始時大きな歪が急に発生することは
なく回線歪を等化出来る。
Therefore, when line distortion equalization is started, large distortion does not suddenly occur, and line distortion can be equalized.

(g) 発明の効果 以下詳細に説明せる如く本発明によれけモデムの動作開
始時、モデム内の歪が回線歪に重畳され急に大きな歪を
等化することがなく々るので、回線歪を等化出来々くな
る危検性を減少させる効果がある。
(g) Effects of the Invention As will be explained in detail below, according to the present invention, when the modem starts operating, the distortion inside the modem is superimposed on the line distortion, so that the line distortion is not suddenly equalized. This has the effect of reducing the risk of failure to equalize.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は従来例のモデムのブロック図、第2図は第1図
のアップダウンカウンタに初期値を設定する一例のブロ
ック図、第3図は本発明の実施例のモデムのブロック図
、第4図は第3図の7ツプダウンカウンタに制御開始時
初期値を設定する一例のブロック図である。 図中1は符号化回路、2,18.22はディジタル・ア
ナログ変換器、3,8は低減沖波器、4は変調器、5,
6は帯域通過ν波器、7は後調器、9はアナログ・デジ
タル変換器、10.10’は自動等止器、11は識別回
路、12は復号化回路、13.、15は位相同期回路、
14.14’は搬送波自動位相制御回路、16.16’
はタイミングクロック自動位相゛制御回路、17.21
は移相回路、 19.23.27はアップダウンカウン
タ、20,24.28は相関回路、25はシフトレジス
タ、26は演算器、29〜31はRAMを示す。
FIG. 1 is a block diagram of a conventional modem, FIG. 2 is a block diagram of an example of setting an initial value to the up/down counter in FIG. 1, and FIG. 3 is a block diagram of a modem according to an embodiment of the present invention. FIG. 4 is a block diagram of an example of setting an initial value at the start of control to the 7-up down counter shown in FIG. In the figure, 1 is an encoding circuit, 2, 18, 22 are digital-to-analog converters, 3, 8 are reduction wave generators, 4 is a modulator, 5,
6 is a band-pass ν waveform generator, 7 is a post-adjuster, 9 is an analog-to-digital converter, 10.10' is an automatic equalizer, 11 is an identification circuit, 12 is a decoding circuit, 13. , 15 is a phase locked circuit;
14.14' is carrier wave automatic phase control circuit, 16.16'
is a timing clock automatic phase control circuit, 17.21
19, 23, 27 are up/down counters, 20, 24, and 28 are correlation circuits, 25 is a shift register, 26 is an arithmetic unit, and 29 to 31 are RAMs.

Claims (1)

【特許請求の範囲】[Claims] 回線歪を等化する自動等化器及び自動位相制御回路を持
つモデムにおいて、1!モデム内の歪を自局折返しであ
らかじめ等化して、その等化した値を初期設定値として
記憶素子r(記憶させておき、回線歪に対しては該初期
設定飴から該自動等止器及び自動位相制御回路の制御を
開始するようにしたことを特徴とする制御開始時の初期
値設定方式。
In a modem with an automatic equalizer and automatic phase control circuit that equalizes line distortion, 1! Distortion in the modem is equalized in advance by loopback to the local station, and the equalized value is stored as the initial setting value in the memory element r (memorized). An initial value setting method at the start of control, characterized in that control of an automatic phase control circuit is started.
JP10991284A 1984-05-30 1984-05-30 Initial value setting system in control start mode Pending JPS60253331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10991284A JPS60253331A (en) 1984-05-30 1984-05-30 Initial value setting system in control start mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10991284A JPS60253331A (en) 1984-05-30 1984-05-30 Initial value setting system in control start mode

Publications (1)

Publication Number Publication Date
JPS60253331A true JPS60253331A (en) 1985-12-14

Family

ID=14522295

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10991284A Pending JPS60253331A (en) 1984-05-30 1984-05-30 Initial value setting system in control start mode

Country Status (1)

Country Link
JP (1) JPS60253331A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001024403A1 (en) * 1999-09-29 2001-04-05 Matsushita Electric Industrial Co., Ltd. Communication terminal and radio communication method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001024403A1 (en) * 1999-09-29 2001-04-05 Matsushita Electric Industrial Co., Ltd. Communication terminal and radio communication method
US6609011B1 (en) 1999-09-29 2003-08-19 Matsushita Electric Industrial Co., Ltd. Radio communication system, communication terminal apparatus, base station apparatus, and radio communication equalizing method

Similar Documents

Publication Publication Date Title
US4227152A (en) Method and device for training an adaptive equalizer by means of an unknown data signal in a quadrature amplitude modulation transmission system
JPS61198848A (en) Data communication system
US5049830A (en) Carrier recovery system and digital phase demodulator
US4433425A (en) Method and apparatus for detecting the training sequence for a self-adapting equalizer
CA1327840C (en) Auto-threshold/adaptive equalizer
US4097807A (en) Automatic equalizing method and system
JPH061908B2 (en) Transmission line distortion compensation method
US3757221A (en) Automatic equalizer system for phase modulated data signals
US3872381A (en) Digital transmission system
US4528512A (en) Timing synchronizing circuit for demodulators
AU639618B2 (en) Decision feedback equalizer
US5113142A (en) QAM demodulator having automatic adaptive equalizer
KR100278536B1 (en) Automatic equalization system, noise reduction circuit, phase locked control circuit
JPS6387828A (en) Digital demodulation system
US4477913A (en) Automatic equalizer apparatus
US4727534A (en) Timing and carrier recovery in dual polarization communications systems
US6463106B1 (en) Receiver with adaptive processing
JPS60253331A (en) Initial value setting system in control start mode
JPH0586093B2 (en)
JP3264142B2 (en) PLL control method
JP2861778B2 (en) Demodulator
JP2764945B2 (en) Digital demodulator
JP2518502B2 (en) Equalizer
JP2654535B2 (en) Reset method for automatic equalizer
JP2000286916A (en) Demodulator