SAMPLING WITH AUTOMATIC GAIN CONTROL

Similar documents
CARRIER RECOVERY. Phase Tracking. Frequency Tracking. adaptive components. Squared Difference Phase-locked Loop Costas Loop Decision Directed

1. Clearly circle one answer for each part.

DIGITAL FILTERING AND THE DFT

PULSE SHAPING AND RECEIVE FILTERING

1. Clearly circle one answer for each part.

STUFF HAPPENS. A Naive/Ideal Communication System Flat Fading What if... idealized system. 9: Stuff Happens

Chapter-2 SAMPLING PROCESS

Sampling and Signal Processing

The Sampling Theorem:

ANALOG (DE)MODULATION

YEDITEPE UNIVERSITY ENGINEERING FACULTY COMMUNICATION SYSTEMS LABORATORY EE 354 COMMUNICATION SYSTEMS

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

CHAPTER 3 Syllabus (2006 scheme syllabus) Differential pulse code modulation DPCM transmitter

Laboratory Assignment 5 Amplitude Modulation

CHAPTER 4. PULSE MODULATION Part 2

Multirate Digital Signal Processing

(Refer Slide Time: 3:11)

Recap of Last 2 Classes

Appendix. RF Transient Simulator. Page 1

Digital Processing of Continuous-Time Signals

Module 3 : Sampling and Reconstruction Problem Set 3

Fundamentals of Digital Communication

Digital Processing of

Spectrum Analysis - Elektronikpraktikum

EEE 309 Communication Theory

EEE 309 Communication Theory

Communications IB Paper 6 Handout 3: Digitisation and Digital Signals

Communications I (ELCN 306)

EE 400L Communications. Laboratory Exercise #7 Digital Modulation

Lecture Schedule: Week Date Lecture Title

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

Digital Communication System

Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals

System on a Chip. Prof. Dr. Michael Kraft

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Principles of Baseband Digital Data Transmission

Application of Fourier Transform in Signal Processing

Analyzing A/D and D/A converters

Symbol Synchronization Techniques in Digital Communications

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

EE 460L University of Nevada, Las Vegas ECE Department

Hideo Okawara s Mixed Signal Lecture Series. DSP-Based Testing Fundamentals 14 FIR Filter

Direct Digital Synthesis Primer

The Discrete Fourier Transform. Claudia Feregrino-Uribe, Alicia Morales-Reyes Original material: Dr. René Cumplido

Sampling and Pulse Trains

Theory of Telecommunications Networks

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans Homework #5 Solutions

Sampling, interpolation and decimation issues

Channelization and Frequency Tuning using FPGA for UMTS Baseband Application

Laboratory Manual 2, MSPS. High-Level System Design

Signals. Continuous valued or discrete valued Can the signal take any value or only discrete values?

QUESTION BANK. SUBJECT CODE / Name: EC2301 DIGITAL COMMUNICATION UNIT 2

SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication

2) How fast can we implement these in a system

Communication Channels

TE 302 DISCRETE SIGNALS AND SYSTEMS. Chapter 1: INTRODUCTION

FFT Analyzer. Gianfranco Miele, Ph.D

Digital Communication System

ECE 2111 Signals and Systems Spring 2012, UMD Experiment 9: Sampling

Sampling of Continuous-Time Signals. Reference chapter 4 in Oppenheim and Schafer.

Appendix B. Design Implementation Description For The Digital Frequency Demodulator

Part I - Amplitude Modulation

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

Pulse Code Modulation

Digital frequency modulation as a technique for improving telemetry sampling bandwidth utilization

INTRODUCTION TO COMMUNICATION SYSTEMS LABORATORY IV. Binary Pulse Amplitude Modulation and Pulse Code Modulation

Design Implementation Description for the Digital Frequency Oscillator

Final Exam Solutions June 7, 2004

MITOCW MITRES_6-007S11lec18_300k.mp4

Sampling and Reconstruction of Analog Signals

Frequency Domain Representation of Signals

Speech, music, images, and video are examples of analog signals. Each of these signals is characterized by its bandwidth, dynamic range, and the

EE390 Final Exam Fall Term 2002 Friday, December 13, 2002

EXPERIMENT WISE VIVA QUESTIONS

Signals and Systems Lecture 9 Communication Systems Frequency-Division Multiplexing and Frequency Modulation (FM)

DSBSC GENERATION. PREPARATION definition of a DSBSC viewing envelopes multi-tone message... 37

Chapter 2 Analog-to-Digital Conversion...

ENGR 210 Lab 12: Sampling and Aliasing

Signals and Systems Lecture 6: Fourier Applications

y(n)= Aa n u(n)+bu(n) b m sin(2πmt)= b 1 sin(2πt)+b 2 sin(4πt)+b 3 sin(6πt)+ m=1 x(t)= x = 2 ( b b b b

Final Exam Solutions June 14, 2006

CARRIER ACQUISITION AND THE PLL

6 Sampling. Sampling. The principles of sampling, especially the benefits of coherent sampling

Department of Electronic Engineering NED University of Engineering & Technology. LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202)

10 Speech and Audio Signals

Lecture 7 Frequency Modulation

Digital Signal Processing

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

Communication Engineering Prof. Surendra Prasad Department of Electrical Engineering Indian Institute of Technology, Delhi

Signals and Filtering

CHANNEL ENCODING & DECODING. Binary Interface

Costas Loop. Modules: Sequence Generator, Digital Utilities, VCO, Quadrature Utilities (2), Phase Shifter, Tuneable LPF (2), Multiplier

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

16QAM Symbol Timing Recovery in the Upstream Transmission of DOCSIS Standard

Time division multiplexing The block diagram for TDM is illustrated as shown in the figure

Module 3 : Sampling & Reconstruction Lecture 26 : Ideal low pass filter

two computers. 2- Providing a channel between them for transmitting and receiving the signals through it.

Noise and Distortion in Microwave System

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #2. Prof. Brian L. Evans. Scooby-Doo

Transcription:

SAMPLING WITH AUTOMATIC GAIN CONTROL Impulse Sampler Interpolation Iterative Optimization Automatic Gain Control Tracking Example: Time-Varying Fade idealized system Software Receiver Design Johnson/Sethares/Klein 1/32

Sampling with AGC Continuing our expansion out from the channel at the center of our telecommunication system beyond the analog up and down converters Binary message w { 3, 1, 1, 3} sequence b Coding P(f) Pulse shaping Other FDM Transmitted users Noise signal Analog Channel upconversion Carrier specification Analog received signal Antenna Analog conversion to IF T s Input to the software receiver Digital downconversion to baseband Downsampling Equalizer Decision Decoding Timing synchronization T m Carrier synchronization Pulse matched filter Q(m) { 3, 1, 1, 3} Source and Reconstructed error coding message frame synchronization we now focus on the sampler and its surrounding automatic gain control (AGC) in the receiver front end b^ Analog received signal Antenna BPF Analog conversion to IF r(t) a AGC Sampler s(kt s ) s[k] Quality Assessment Software Receiver Design Johnson/Sethares/Klein 2/32

Impulse Sampler 6: Sampling with Automatic Gain Control With w(t) the input to an impulse sampler, the output w s (t) is w s (t) =w(t) δ(t kt s ) k= Analog w(t) is multiplied point-by-point by a pulse train Signal w(t) Pulse train (t kt s ) Impulse sampling w s (t) Point sampling w[k] w(kt s ) w(t) t kts Software Receiver Design Johnson/Sethares/Klein 3/32

Impulse Sampler (cont d) Using (A.28) with f s =1/T s W s (f) =f s n= W (f nf s) Relative to W (f), W s (f) has been scaled by f s and contains replicas at every f s. Largest frequency in W (f) less than f s /2 (top plot) and slightly larger than f 2 /2 (bottom) W(f) -f s 2 -B B f s 2 f W s (f) -2f s -f s -f s+b -B B f s f (a) s-b f W(f) -B -f s f s B 2 2 W s(f) f -2f s -f s -B -f s +B f s 2f s (b) f Software Receiver Design Johnson/Sethares/Klein 4/32

Impulse Sampler (cont d) Nyquist Sampling Theorem: If the signal w(t) is bandlimited to B, (W (f) =for all f >B) and if the sampling rate is faster than f s =2B, thenw(t) can be reconstructed exactly for all t from its samples w(kt s ). Sub-Nyquist Sampling: What if the signal to be sampled is a passband signal, but the signal to be reconstructed is this passband signal downconverted to a baseband signal with a much lower maximum frequency? Can sub-nyquist sampling of the passband signal be employed without aliasing of the baseband signal? The following examples provide a positive answer. Software Receiver Design Johnson/Sethares/Klein 5/32

Impulse Sampler (cont d) Example: Consider fs = f c /2 W(f) 1 B f (a) B S(f) 1/2 f c B f c f c B f c B f c f c B f (b) Y(f) Works for fs = f c /n What if fs not exactly f c /n? 3f c /2 f c /2 f c f c f c /2 3f c /2 (= f c f s ) (= f c f s ) f Software Receiver Design Johnson/Sethares/Klein 6/32

Impulse Sampler (cont d) Another Example: For a PAM system the sampler, downconverter, and downsampler (to symbol period T ) should produce an output x 8 with a spectrum matching that of a sampled version (with sample period T ) of the baseband source x 1. Software Receiver Design Johnson/Sethares/Klein 7/32

Impulse Sampler (cont d) Another Example (cont d) For the following specifications in khz f 1 =5 f 2 =169 f 3 =192 f 4 =146 f 5 =162 f 6 =176 f 7 =8 f 8 =9 f 9 =6 given X 1 (f) as even-symmetric, triangular shaped, and centered at zero frequency, we can draw X i (f) for i =1, 2,...,8 to show that X 8 (f) matches X 1 (f) (up to a scalar gain factor) with M =2. Software Receiver Design Johnson/Sethares/Klein 8/32

Impulse Sampler (cont d) Another Example (cont d) Software Receiver Design Johnson/Sethares/Klein 9/32

Impulse Sampler (cont d) Another Example (cont d) Software Receiver Design Johnson/Sethares/Klein 1 / 32

Interpolation 6: Sampling with Automatic Gain Control Objective: Use signal samples from times kt s to reconstruct the analog signal value at a time instant not among this set of sample times. Sinc interpolator: w(t) t=τ = w(τ) = t= w s (t)sinc(τ t)dt Because w s (t) is nonzero only when t = kt s, w(τ) = w s (kt s )sinc(τ kt s ) k= Prescription for perfection: As long as f s > 2B (where B is the highest frequency present in w(t)) this (doubly infinite) sinc interpolator is exact. Filtering interpretation: Creation of w(τ) can be interpreted as a convolution of w s with a sinc-shaped impulse response. Software Receiver Design Johnson/Sethares/Klein 11 / 32

Interpolation (cont d) Ideal LPF Interpolator: Convolution in time domain is multiplication in frequency domain. Spectrum of sinc is a rectangle, i.e. an ideal LPF. Thus, an ideal lowpass filter with appropriate cutoff frequency is a perfect interpolator for a Nyquist-sampled signal. Perfection inhibiting practicalities: Inpractice,itisnecessaryto truncate the doubly infinite convolutional sum. Furthermore, w(t) can always be expected to have traces of frequencies above B. Therefore, in practice, we must settle for an approximation. Non-ideal LPF interpolator: Fortunately,anysuitableLPF(with nonzero, flat magnitude and linear phase up to frequency B and fully rejecting before reaching next higher frequency chunk in spectrum of w s ) will provide accurate interpolation. Software Receiver Design Johnson/Sethares/Klein 12 / 32

Interpolation (cont d) Example: Using sininterp to reconstruct a sinusoid sampled five times per period (as indicated by the choppy staircase zero-order-hold reconstruction of the samples) Amplitude 1.8.6.4.2.2.4.6.8 1 1 1.5 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 1.5 Time Software Receiver Design Johnson/Sethares/Klein 13 / 32

Iterative Optimization Task: Find value of x at which polynomial is minimized. Plot cost function: J(x) =x 2 4x +4 Zeroing derivative: Settingthederivative J(x) x =2x 4 to zero by selecting x =2locates a stationary point, i.e. either a maximum or minimum. Software Receiver Design Johnson/Sethares/Klein 14 / 32

Iterative Optimization (cont d) Minimum or maximum: The stationary point x =2is a minimum because the derivative of the derivative evaluated at x =2is positive, i.e. 2 J(x) (2x 4) x 2 = =2 x A negative second derivative would indicate a local maximum. Iterative gradient descent minimizing strategy: Becausethederivative points toward larger values, we descend in the opposite direction with µ positive (and small) x[k + 1] = x[k] µ J(x) x x=x[k] In this case, x[k + 1] = x[k] µ(2x[k] 4) Software Receiver Design Johnson/Sethares/Klein 15 / 32

Iterative Optimization (cont d) Simulated test: From 5 different starting points with µ =.1 (using polyconverge), we converge to the desired setting 5 4 3 2 1 1 2 5 1 15 2 25 3 35 4 45 When maximizing: If seeking maximum, would change sign on correction term so x[k + 1] = x[k]+µ J(x) x x=x[k] Software Receiver Design Johnson/Sethares/Klein 16 / 32

Iterative Optimization (cont d) Convergence consequence: If x converges to the tight vicinity of a particular value, then the update term must be zero (at least on average). For a gradient descent, this implies that the gradient is zero, as expected. In our example, zeroing the update term 2x[k] 4 leads trivially to the desired answer of x =2. Cost function modality: With only one stationary point, our cost function J(x) =x 2 4x +4is unimodal. Other cost functions could be multimodal, which would mean that a gradient descent would be trapped in a local minimum. The particular local minimum would depend on the starting value of x. Software Receiver Design Johnson/Sethares/Klein 17 / 32

Automatic Gain Control (AGC) An AGC maintains the dynamic range of a (zero-average) signal by attenuating when it is too large (as in (a)) and by amplifying when too small (as in (b)). (a) AGC adjusts gain parameter a so average energy at output remains (roughly) fixed, despite fluctuations in average received energy. (b) r(t) a Sampler s(kt) s[k] Quality Assessment Software Receiver Design Johnson/Sethares/Klein 18 / 32

AGC (cont d) Gain Tuning: 6: Sampling with Automatic Gain Control We are to choose a for a received waveform r(t) segment that produces sampler outputs s[k] with the intent of having the average s 2 value over that dataset match a preselected constant S 2. Because s[k] =ar(kt s ), we can choose a 2 = ( 1 N S 2 N i=1 r2 [k + i]) = (preferring a>) tomake(asdesired) { 1 N N s 2 [k + i]} = S 2 i=1 S 2 avg{r 2 [k]} Unfortunately, we need the samples of r, which are not available on the DSP side of the receiver, to solve this formula for a. Our search for a gain tuner continues. Software Receiver Design Johnson/Sethares/Klein 19 / 32

AGC (cont d) Heuristic Algorithm Development: As an alternative, consider the following strategy: select an initial positive a. As a sample s arrives, compare its square to S 2. If s 2 at that particular sample instant is greater than S 2,wewill reduce a positive a to a smaller positive value. If a is negative, we would decrease its magnitude, i.e. increase it toward zero. Plus, the correction term should be larger the further s 2 is from S 2. Similarly, if s 2 <S 2, we will increase a positive a by an amount proportional to S 2 s 2.Ifa is negative, a should be decreased (i.e. made more negative), so its magnitude increases. Software Receiver Design Johnson/Sethares/Klein 2 / 32

AGC (cont d) 6: Sampling with Automatic Gain Control An algorithm that performs this strategy is a[k + 1] = a[k]+µ{sign(a[k])}(s 2 s 2 [k]) where µ is a suitably small positive stepsize. (The sign(a[k]) term can be removed if a[k] starts and stays positive.) Can this algorithm be implemented from data available on the DSP side of the sampler? Ans: Yes,s (and not r) isneeded Will this algorithm converge to the desired a of ±S/ Ans: It depends what you mean by converge. 1 N N i=1 r2 [k]? Software Receiver Design Johnson/Sethares/Klein 21 / 32

AGC (cont d) The candidate algorithm a[k + 1] = a[k]+µ{sign(a[k])}(s 2 s 2 [k]) cannot be expected to converge to a fixed value. Because r ranges widely, only on average does a 2 r 2 (or s 2 )actually equal S 2. The resulting (typically) nonzero instantaneous error in S 2 s 2 and a nonvanishing stepsize µ will result in a change in a even if it is already at the right value for the average behavior of s 2. A sufficiently small µ should keep this asymptotic rattling within a tolerable level. Software Receiver Design Johnson/Sethares/Klein 22 / 32

.5 1 1.5 5 5 Adaptive gain parameter Input r(k) Output s(k) iterations AGC (cont d) Testing: 6: Sampling with Automatic Gain Control Using agcgrad with avg{r 2 } 1 and S 2 =.15, thedesired a.15.38. Start at a[] = 2 with µ =.1 2 1.5 1.5 Adaptive gain parameter 1 2 3 4 5 6 7 8 9 1 Input r(k) 5 5 1 2 3 4 5 6 7 8 9 1 Output s(k) 5 Start of a[] = 2 with µ =.1 5 1 2 3 4 5 6 7 8 9 1 Iterations 2 1 2 3 4 5 6 7 8 9 1 5 1 2 3 4 5 6 7 8 9 1 5 1 2 3 4 5 6 7 8 9 1 Software Receiver Design Johnson/Sethares/Klein 23 / 32

AGC (cont d) 6: Sampling with Automatic Gain Control Start at a[] =.5 with µ =.1 2 Adaptive gain parameter 1.5 1.5 1 2 3 4 5 6 7 8 9 1 Input r(k) 5 5 1 2 3 4 5 6 7 8 9 1 Output s(k) 5 Start at a[] = 2 with µ =.2 5 1 2 3 4 5 6 7 8 9 1 iterations 2 Adaptive gain parameter 1.5 1.5 1 2 3 4 5 6 7 8 9 1 Input r(k) 5 5 1 2 3 4 5 6 7 8 9 1 Output s(k) 5 5 1 2 3 4 5 6 7 8 9 1 iterations Software Receiver Design Johnson/Sethares/Klein 24 / 32

AGC (cont d) Observations: 6: Sampling with Automatic Gain Control Asymptotically, this algorithm hovers in a small region about the desired answer. The asymptotic hovering region s size can be decreased by reducing the stepsize µ, which also reduces the algorithm convergence rate. When the average value of the hovering parameter has effectively reached a fixed value, the average of a[k + 1] will equal the average of a[k] such that from our algorithm a[k + 1] = a[k]+µsign(a[k])(s 2 s 2 [k]) the average of the correction term µsign(a[k])(s 2 s 2 [k]) must be zero. With µ> and the asymptotic hovering a[k] not changing sign, zeroing the average correction term zeros the average of S 2 s 2. But, indeed that is what we seek. Software Receiver Design Johnson/Sethares/Klein 25 / 32

AGC (cont d) 6: Sampling with Automatic Gain Control Gradient Descent Algorithm Development: As a more generalizable approach to adaptor algorithm development consider specifying a cost function and using an iterative optimizer based on gradient descent. Try J LS (a) =(1/4)avg{ [ s 2 [k] S 2] 2 } with the definition of avg as With s[k] =ar[k] k N+1 avg{x[k]} =(1/N ) x[i] i=k J LS (a) =(1/4)avg{ [ a 2 r 2 [k] S 2] 2 } A gradient descent algorithm a[k + 1] = a[k] µ J LS(a) a a=a[k] Software Receiver Design Johnson/Sethares/Klein 26 / 32

AGC (cont d) 6: Sampling with Automatic Gain Control For small stepsize µ, from Appendix G, differentiation and averaging are approximately interchangeable ( ) J LS (a) 1 = a 4 a [avg{a2 r 2 (kt) S 2 ) 2 }] ( ) 1 avg{ 4 a [a2 r 2 (kt) S 2 ) 2 ]} So J LS (a) a avg{ar 2 (kt)(a 2 r 2 (kt) S 2 )} Replace ar with s and ar 2 with s/a and a with a[k] a[k + 1] = a[k] µavg{(s 2 [k] S 2 ) s2 [k] a[k] This is different from the heuristically developed algorithm. Software Receiver Design Johnson/Sethares/Klein 27 / 32

AGC (cont d) 6: Sampling with Automatic Gain Control Consider another cost function J N (a) =avg{ a ((s 2 [k]/3) S 2 )} For small stepsize µ, from Appendix G, differentiation and averaging are approximately interchangeable J N (a) a = a [avg{ a ( a 2 r 2 (kt) 3 S 2 )}] avg{ ( a 2 a [ a r 2 (kt) S )]} 2 3 With a / a = sign(a) and (A.6) J N (a) avg{ a (1/3)2ar 2 (kt)+sign(a)(1/3)a 2 r 2 (kt)} sign(a)s 2 a With sign(a) a = a J N (a) a avg{sign(a) ( a 2 r 2 (kt) S 2) } Software Receiver Design Johnson/Sethares/Klein 28 / 32

AGC (cont d) 6: Sampling with Automatic Gain Control With a 2 r 2 = s 2 JN(a) avg{sign(a) ( s 2 [k] S 2) } a So, the stationary points of zero gradient are in the right places with avg{s 2 } = S 2. With (sign(a))/ a =everywhere but a =, the second derivative is approximately avg{ a [ sign(a) ( a 2 r 2 (kt) S 2)] } =avg{2a sign(a)r 2 (kt)} =avg{2 a r 2 (kt)} > So, stationary points at other than a =are minima. Software Receiver Design Johnson/Sethares/Klein 29 / 32

AGC (cont d) 6: Sampling with Automatic Gain Control With constant avg{r 2 } and S, J N has double dip egg carton style cross section as does J LS. For specific data set (with N = 1) in agcerrorsurf cost J LS (a) cost J N (a).25.2.15.1.5.1.2.3.8.6.4.2.2.4.6.8.2.1.4.8.6.4.2.2.4.6.8 Adaptive gain a Software Receiver Design Johnson/Sethares/Klein 3 / 32

AGC (cont d) Computation of the gradient requires that a remain constant over the N samples over which avg{s 2 } is composed. Consider squeezing the averaging window to a single sample so N =1and a[k + 1] = a[k] µsign(a[k]) ( s[k] 2 S 2) This is the algorithm developed heuristically and tested previously. This algorithm also emerges from first reducing the averaging window to N =1in the cost function and then taking the gradient and forming a gradient descent iteration. This technique of shrinking the averaging window so averaging is explicitly removed works because LPF action of adaptation acts similarly to averaging before updating. Software Receiver Design Johnson/Sethares/Klein 31 / 32

Tracking Example: Time-Varying Fade To demonstrate desired tracking capability, use agcvsfading to test a[k + 1] = a[k] µsign(a[k]) ( s[k] 2 S 2) with µ =.1, S 2 =.5, a[1] = 1, and a large, slow, oscillating channel gain (initially.75) Input r(k) 5 5.5 1 1.5 2 2.5 3 3.5 4 4.5 5 1 4 Adaptive gain parameter 1.5 1.5.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Output s(k) 1 4 5 5.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Iterations 1 4 Fade must be changing sufficiently slowly and the input must never die for the AGC with small stepsize to track adequately. NEXT... DFT and digital filter design tidbits for the variety of linear filters in a recevier. Software Receiver Design Johnson/Sethares/Klein 32 / 32