<< Chapter < Page Chapter >> Page >

Quantization of an input is another kind of common nonlinearity. The M atlab function quantalph.m (available on the website) quantizes a signal to the nearest element of adesired set. Its help file reads

% y=quantalph(x,alphabet) %% quantize the input signal x to the alphabet % using nearest neighbor method% input x - vector to be quantized % alphabet - vector of discrete values%            that y can assume %            sorted in ascending order% output y - quantized vector time=.5; Ts=1/10000;                    % total time and sampling interval t=Ts:Ts:time;                           % define a "time" vectorfc=1000; cmod=cos(2*pi*fc*t);           % create cos of freq fc fi=100; x=cos(2*pi*fi*t);               % input is cos of freq fiy=cmod.*x;                              % multiply input by cmod figure(1), plotspec(cmod,Ts)            % find spectra and plotfigure(2), plotspec(x,Ts) figure(3), plotspec(y,Ts)
modulate.m change the frequency of the input (download file)

Let x be a random vector x=randn(1,n) of length n . Quantize x to the nearest [ - 3 , - 1 , 1 , 3 ] .

  1. What percentage of the outputs are 1's? 3's?
  2. Plot the magnitude spectrum of x and the magnitude spectrum of the output.
  3. Now let x=3*randn(1,n) and answer the same questions.

The fifth element: mixers

One feature of most telecommunications systems is the ability to change the frequency of the signal without changing itsinformation content. For example, speech occurs in the range below about 8K Hz. In order to transmit this, it is upconverted(as in [link] ) to radio frequencies where the energy can easily propagateover long distances. At the receiver, it is downconverted (as in [link] ) to the original frequencies. Thus the spectrum is shifted twice.

One way of accomplishing this kind of frequency shifting is to multiply the signal by a cosine wave, as shown in [link] . The following M atlab code implements a simple modulation.

The mixing operation shifts all frequencies of a signal x(t) by an amount defined by the frequency f0 of the modulating sinusoidal wave.
The mixing operation shifts all frequencies of a signal x ( t ) by an amount defined by the frequency f 0 of the modulating sinusoidal wave.

The first three lines of the code create the modulating sinusoid (i.e., an oscillator). The next line specifies the input(in this case another cosine wave). The M atlab syntax .* calculates a point-by-point multiplication of the two vectors cmod and x .

The output of modulate.m is shown in [link] . The spectrum of the input contains spikes representingthe input sinusoid at ± 100 Hz and the spectrum of the modulating sinusoid contains spikes at ± 1000 Hz. As expected from the modulation property of the transform, the output contains sinusoids at ± 1000 ± 100 Hz, which appear in the spectrum as the two pairs of spikesat ± 900 and ± 1100  Hz. Of course, this modulation can be applied to any signal, not justto an input sinusoid. In all cases, the output will contain two copies of the input, one shifted up in frequency and the other shifted downin frequency.

Mimic the code in modulate.m to find the spectrum of the output y ( t ) of a modulator block (with modulation frequency f c = 1000 Hz) when

The spectrum of the input sinusoid is shown in the top figure. The middle figure shows the spectrum of the modulating wave. The bottom shows the spectrum of the point-by-point multiplication (in time) of the two, which is the same as their convolution (in frequency).
The spectrum of the input sinusoid is shown in the top figure. The middle figure shows the spectrum of the modulating wave. The bottom shows thespectrum of the point-by-point multiplication (in time) of the two, which is the same as their convolution (in frequency).
  1. the input is x ( t ) = cos ( 2 π f 1 t ) + cos ( 2 π f 2 t ) for f 1 = 100 and f 2 = 150 Hz,
  2. the input is a square wave with fundamental f = 150 Hz,
  3. the input is a noise signal with all energy below 300 Hz,
  4. the input is a noise signal bandlimited to between 2000 and 2300 Hz,
  5. the input is a noise signal with all energy below 1500 Hz.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Software receiver design. OpenStax CNX. Aug 13, 2013 Download for free at http://cnx.org/content/col11510/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Software receiver design' conversation and receive update notifications?

Ask