You are on page 1of 7

SCHOOL OF ELECTRICAL AND INFORMATION ENGINEERING ELEC4505 COMMUNICATIONS

INTRODUCTION TO SYSTEM MODELLING UISNG TIMS
EQUIPMENT: • Telecommunication Instructional Modelling System (TIMS) with the following movable plugin modules: MODULES Qty. AUDIO OSCILLATOR 1 PHASE SHIFTER 1 ADDER 1 MULTIPLIER 1 Digital Storage Oscilloscope (GDS-820C) PC with Matlab BNC-to-BNC Coaxial Cables: for connections between the Module SCOPE SELECTOR and Oscilloscope Banana-Plug Patch Cords: for connection between TIMS modules Stereo Audio Cable (with RCA plugs): for connection between TIMS and PC

• • • • •

Figure 1: TIMS 1. INTRODUCTION TO TIMS TIMS (Telecommunication Instructional Modelling System) is rack and module system (Figure 1), in which each module performs a basic signal processing or communication function. Movable modules can be plugged into any of the 12 identical slots located at the upper part of the rack. They can then be connected with other modules using Banana-Plug Cables plugged into the front panels

1

to create a variety of systems. Several fixed modules are located in the lower part of the rack. These provide common signals and measurement facilities. The digital oscilloscope can be connected to the TIMS SCOPE SELECTOR module, a fixed module, by BNC-to-BNC cables. The SCOPE SELECTOR module has four input ports and enables any two of these to be viewed simultaneously on the oscilloscope. The PC provides measurement and signal processing functions. The Analog-to-Digital converter interface between the PC and TIMS is the sound card system. The sound card and TIMS are connected by the stereo audio cable terminated with RCA plugs. For stereo recording, the RCA plugs should be connected to the sockets at the CH1 and CH2 inputs of the CRO, but for mono recording only the red RCA plug should be connected. Only mono recording is required for this laboratory. Data acquisition and processing software is provided by MATLAB. MATLAB is a high performance numeric computation and visualisation software package that is used for a wide range of applications in signal processing, control, applied mathematics, image processing etc. MATLAB is supplied with a large library of powerful and useful functions, but users can extend and customise the capabilities of MATLAB by writing their own functions and procedures. Important rules for connecting Modules For all the modules used in the TIMS system the following rules apply: Left hand socket inputs Right hand socket outputs Red Socket TTL levels (0 and 5 volts) Yellow sockets Analog levels, nominally 4 volt peak-to-peak, may be larger Green sockets common, ground or earth level DO NOT CONNECT YELLOW OUTPUTS TO RED INPUTS 2. PREPERATION 2.1 Write down the Fourier transform of the sinusoidal signal () = sin( ) (1)

2.2 Using simple trigonometry or otherwise, write down the Fourier series expansion/representation of the periodic signal (2) () = 2 (t) where () is defined in (1).
Sketch () and the magnitude and phase of its frequency spectrum.

Sketch () and the magnitude and phase of its frequency spectrum.

where = 2 is the angular frequency and A is the amplitude of the signal.

2

3. EXPERIMETNT 3.1 Sum of two Sinusoid Signals 3.1.1 Basic theory When you add two sinusoid waves 1 () and 2 () of the same frequency , equal amplitude A and a phase difference a, the output () can be expressed as follows: () = 1 () + 2 () = �2 � + �2 + � = 2�2 + /2�cos(/2) (1)

Obviously, depending on the phase term , the maximum and minimum of the output wave amplitude can be 2A (when = 0) and 0 (when = 1800 ) respectively. In this experiment, you will demonstrate experimentally that two sinusoid waves of the same frequency, equal amplitude and 180o out-of-phase, when added, will become zero. Throughout the experiment, you will gain important knowledge and experience in using the TIMS system to model basic mathematic equations, which can serve as the foundation to the more complicated communication systems.

Source v1(t)

Adder y(t)

v2(t) Phase Shift
Figure 2a: Functional block model of Equation (1).

A
Frequency Knob

B

Figure 2b: The TIMS model of Equation (1).

3

3.1.2

Tasks

The functional block diagram of the experiment is shown in Figure 2a. We ensure that two sinusoid signals are of the same frequency by obtaining them from the same oscillator source. A phase shift block is placed between the Source and the Adder to model the phase difference between two sinusoid waves. You are asked to complete the following tasks: (a) The TIMS model of the setup is shown in Figure 2b. There are three movable plug-in modules, namely: an AUDIO OSCILLATOR, a PHASE SHIFTER and an ADDER. In addition, there are two fixed modules, namely: FREQUENCY COUNTER and SCOPE SELECTOR. Before proceeding, outline and record to your logbook their various features as described in the accompanying TIMS User Manual. (b) Referring to Figure 2b, the output () of AUDIO OSCILLATOR is connected to IN of PHASE SHIFTER as well as the input B of ADDER. OUT of PHASE SHIFTER is patched to the input A of ADDER. (c) Set the front switch of the FREQUENCY COUNTER to a GATE TIME of 1s, which is the most common selection for frequency measurement. Also note the effect of other Gate Times. (d) Check the minimum setting of AUDIO OSCILLATOR (around 0.24 kHz) by tuning the knob fully counter-clockwise. Connect TTL of AUDIO OSCILLATOR to TTL of FREQUENCY COUNTER and observe the reading, which is around 0.24 kHz. Now adjust the knob so the output sinusoids signal of AUDIO OSCILLATOR to be near 2 KHz, which is the signal frequency for this experiment. (e) To observe and compare signals, CH1 and CH2 of the digital storage oscilloscope are connected to CH1 and CH2 coaxial connectors of the module SCOPE SELECTOR through two BNC-to-BNC coaxial cables. By patching the signal ( () of AUDIO OSCILLATOR) and the output signal (GA+gB of Adder) to the input CH1 INPUT “A” and CH2 INPUT “A” of SCOPE SELECTOR (INPUT SELECTOR Switch to A), you may observe that two signal traces can be displayed simultaneously on the scope. At this stage, you need to spend some time to get familiar with the functionality of this oscilloscope such as time division control, volts division control, the scope ‘Measure’ function, and the use of ‘Cursor’ to obtain measurements, (f) Measure the frequency and amplitude of the two signal traces displayed on the scope using both the ‘Cursor’ and the inbuilt ‘Measure’ functions. Are they matched as expected? (g) Note that there is USB cable connection between the PC and Scope. To capture the image on the scope, the software FreeView is to be executed. After a window pops up, click “File”

4

and then “Connect”. Therefore you can observe an image as shown in Figure 3, and save it through “Save/Print”. Using the software to record key measurements for preparing the lab report.

Figure 3: Image captured by FreeView (h) Alternatively, having CH2 of the Oscilloscope display the “wanted” signal. Connect the audio input of the audio cable to the MIC of the PC, and the RCA plug to the CH1 of the Oscilloscope through the T-junction. Obtain the Matlab files: getrec.m and ampspec.m and save them to c:\work. Then execute the following instructions in the Matlab command line. % Change to working directory. cd c:\work % Obtain a record of 1024 samples with sampling rate of 44.1 kHz. x = getrec(1024, 44100); % Set the time scale for display in ms t = (1:1024)/44.1 % Plot the sampled signal x. plot(t, x); grid % Obtain the amplitude spectrum of the signal. ampspec(x, 44100); You will obtain the time domain and frequency domain representation of the signal observed in CH1 of the Oscilloscope. Record and save your measurements. Compare the amplitude response with the theoretical frequency spectrum of the sinusoidal signal (of infinite duration).

5

Note that the values of the signal spectra displayed by ampspec() are not directly comparable with values calculated from theory, because the ampspec() calculations are for finite record lengths of sampled signals. Comparison should be made on a relative basis. (i) At this stage, the output is not zero, because we have not adjusted two gains ‘g’ and ‘G’ of ADDER to equality, and have not adjusted the PHASE SHIFTER to introduce 180o. The correct way to adjust gains is as follows: first, disconnect the patch cord that goes into INPUT A of ADDER, and adjust ‘g’, so that V pp of the signal 1 on the scope is 3V. Second reconnect the patch cord back into INPUT A of ADDER and disconnect the patch cord that goes into INPUT B of the Adder, and then adjust ‘G’ so that the V pp of the signal 2 is also 3V. Reconnect the patch cord back into INPUT B of ADDER. Now amplitudes of two signals are equal. (j) Turn to PHASE SHIFTER. Observe the effect of 180o toggle switch and tuning COASE knob. Can you make the amplitude of the output signal reduced? In order to completely get a Null at the output, you need to adjust the FINE knob. Record the progression of the reduced output signal. (k) After you reach your final result of Null for the output signal y(t), reverse the position of the PHASER SHIFTER toggle switch. Record the amplitude of the output signal y(t). Can you explain it using the theory? 3.2 Multiplier connected as a Squarer Circuit/Frequency Doubler Connect the Audio Oscillator and Multiplier modules as shown in Figure 5.
AUDIO OSCILLATOR MULTIPLIER
DC SYNC cos(wt)

f TTL

x

sin(wt)

y

kXY

Figure 5

Set the AO frequency to about 3 kHz. Sketch the Multiplier input and output on the CRO. What are the amplitude, frequency of the Multiplier output, and the value of the dc offset? Are the values obtained consistent with theory? Determine the multiplier scaling factor k. Without using MATLAB, calculate and sketch the spectrum of this signal. 6

Now use the statement x = getrec(1024, 44100); to obtain a record of the multiplier output signal. Sketch its amplitude spectrum using ampspec(x, 44100). Something is absent from the spectrum. What is missing and why is it missing?

7