Professional Documents
Culture Documents
Open a new model window and draw the circuit as shown above. The random number generator
generates pulses of random amplitudes. The Random number is compared with a constant D.C.
value (0) using the relational operator '>'. The output is 1 if the random number is >0 and 0 for
random number <0.
Set the simulation parameters as, max step size=0.01, start time = 0 and stop time =30 sec.
Connect a Scope to the output and check the output and confirm that the blocks produce binary
data patterns.
Select the entire circuitry in the model using Ctrl+A and right click anywhere on the selected
circuit and choose 'Create Subsystem'. Change the name of the subsystem as 'Binary Data
Source'.
Set the frequency to 10 Hz and amplitude to 1 Volt. Check the output of the sine wave by
connecting a scope to the output of the 'sine wave' block.
Add a 'Product' block as shown in the figure. The system is now a binary source + ASK
modulator. Check its output using a Scope.
(iii) The ASK modulator + Demodulator:
The modulator output is amplified by a factor of 10. The bipolar signal is converted to uni-polar
by using an absolute value block. This process is equivalent to the function of a rectifier. The
unipolar signal is passed through a LPF with a cutoff frequency of 10 radians/sec to recover the
data.
The 'Gain' block is in the 'Math' operations of the library browser. Change the default gain
parameter which is 1 to 10 by double clicking on the block.
The 'abs' (which stands for absolute value) block is also available in the 'Math' operations of the
library browser.
The LPF is built using the 'Transfer Fcn' in the 'Continuous' time domain functions of the
Simulink library browser. Set the parameters as shown in the figure.
The output of the low pass filter is passed through a 'Pulse shaper', which is built using a
'Constant' block and a 'relational operator'. The pulse shaper compares its input which is the
output of the LPF to a threshold constant of 2 Volts. The output is a logic 1 if the input of the
pulse shaper is > 2 and a logic 0 if the input to the pulse shaper is < 2.
Add a Band Limited White Noise block from the Sources browser of the Simulink Library
Browser. Set the Noise Power to 2 mW, Sample time to 1 second and seed to 23341. Click ok
and close the window.
Band-limited Noisy Channel:
The channel is modeled as a LPF of cutoff frequency of 20 Hz and an additive Band-limited
white noise of noise power = 2 mW. (Set the Sample time to 1 second and seed to 23341). Set
the Low pass Filter block parameters as shown below.
Name this subsystem as Band Limited Noisy Channel. Place a scope at both Out1 and Out2
and observe the output waveforms.
Exercise: How to demodulate the above FSK modulated signal ? In the next lab session, you
should design a suitable demodulator and demonstrate its working.
----------------------------
FSK Demodulator
The input to FSK modulator contains an amplitude limiter to remove the amplitude noise
during the channel. The limited signal is fed to a PLL with VCO natural frequency of 10 Hz,
at the unmodulated carrier frequency. The LPF in the PLL is set to a cutoff frequency of 1
Hz (2*pi*1 radians/sec). The output of the LPF is set to be the output 1 of the FSK
Demodulator.
Pulse Shaper
The signal from Out1 is passed through the Pulse shaper to recover the original signal.
The pulse shaper uses a threshold of 0 V to decide a logic 1 or logic 0. Click on
Simulink in the Simulink Library Browser and click on Math Operations. Select
Relational Operator and drag it into the workspace. Double click on the Relational
Operator block and choose the Relational Operator to be > from the parameters.
Click on Simulink in the Simulink Library Browser and click on Sources. Select the
Constant block and drag it into the workspace. Then, double click the Constant block
and change the constant value to 2. Click Ok to close the dialog box.
Create a subsystem for the pulse shaper according to the procedure outlined in the
previous sections by building the subsystem as shown below.
Place a Scope from the Sinks in the Simulink at In1, Out1 and observe the waveforms.