LABORATORY 0: INTRODUCTION TO SOFTWARE AND EQUIPMENT EEE 186: COMMUNICATIONS SYSTEMS LABORATORY Department of Electrical & Electronic Engineering College of Engineering & Computer Science California State University, Sacramento FALL 2015 SIMULINK COMMANDS AND EXAMPLES After logging into MATLAB, you will receive the prompt >>. In order to open up SIMULINK, type in the following: >> simulink GENERAL SIMULINK OPERATIONS Two windows will open up: the model window and the library window. The model window is the space utilized for creating your simulation model. In order to create the model of the system, components will have to be taken from the library using the computer mouse, and inserted into the model window. If you browse the library window, the following sections will be seen. Each section can be accessed by clicking on it. Sources - This section consists of different signal sources such as sinusoidal, triangular, pulse, random or files containing audio or video signals. Sinks - This section consists of measuring instruments such as scopes and displays Linear - This section consists linear components performing operations like summing, integration, product. Nonlinear - Nonlinear operations Connections - Multiplexers, Demultiplexers Blocksets and Toolboxes - These specify different areas of SIMULINK Communications DSP Neural Nets Simulation Extras EDITING, RUNNING AND SAVING SIMULINK FILES The complete system is created in the model window by utilizing components from the various available libraries. Once a complete model is created, save the model into a file. Click on Simulation and select Run. The simulation will run, and the output plots can be displayed by clicking on the appropriate sinks. Save the output plots also into files. The model and output files can be printed out from the files. DEMO FILES Try out the demo files, both in the main library window, and in the Toolboxes window. There are several illustrative demonstration files in the areas if signal processing, image processing and communications. Some examples are given below: 1. Simulation and graphical display of continuous-time signals and systems Continuous-time system Time scope Analog signal x(t) = A sin(t) + Time scope Pseudo-random noise n(t) Time scope 2. Run the simulation for sinusoidal signal, x(t), amplitude of 5 Volts and frequency = 10 rad./s. The signal n(t) is a pseudo-random noise with maximum amplitude of 0.5 volts. Observe the combined signal on the time scope, and familiarize yourself with the settings. (b) Try changing the sinusoidal signal amplitude (2V, 10V), and frequency (20 rad./s, 50 rad./s), and observe the output on the time scope. Discrete-time system x(n) y(n) + z/(z2 +z-0.3) 0.4 z-1 (a) Observe the output signal on the time scope, for an input periodic pulse generator having the following parameters: Pulse amplitude 1 V, Pulse period 2 seconds and pulse width of 1 second. 2. Try changing the input signal amplitude (2 V, 3V) and pulse width (0.5, 1.5 sec.), and observe on the time scope. HARDWARE LABORATORY: WORKING WITH OSCILLOSCOPES, SPECTRUM ANALYZERS, SIGNAL SOURCES Hardware equipment utilized in Communications applications can be classified into three main categories: 1. Sources Sources generate signals that vary in shape, amplitude, frequency and phase. The source utilized in the laboratory is the Hewlett Packard HP 3324A Synthesized Sweep Generator. 2. Measuring devices Sinks or measuring devices are utilized to accurately graph input signals in two domains: time and frequency. The HP 54510A 100 MHz digitizing oscilloscope measures the amplitude and frequency of signals as a function of time, whereas the HP 8590L RF Spectrum Analyzer measures the spectrum of the input signal as a function of frequency. 3. Dynamic signal analyzers These analyzers are more advanced equipment, which can generate regular signals, as well as random noise. They can measure signals in both time/frequency, and can also measure frequency response of devices. The HP 35665 Dynamic Signal Analyzer in the laboratory is multi-purpose equipment. Experiment 1: In this experiment, basic time and frequency measurements will be performed using the oscilloscope and signal analyzer. Connect the equipment together as shown in the schematic below in Figure 1. Use BNC cables and a BNC Tee to connect the circuit. Please ensure that the HP3324A Synthesized sweep generator power button is in the off position. HP 3324A Synthesized Sweep Generator BNC Tee HP 54510A Oscilloscope HP 35665A Dynamic Signal Analyzer Figure 1. Experimental setup for time-frequency measurement Set the sweep generator to output a sinusoidal signal, with an amplitude of 5 Volts and frequency f = 2 MHz. Observe the time-domain signal output on the oscilloscope, and note down the measured amplitude and frequency of the sinusoidal signal. Experiment 2: In this experiment, time and frequency measurements will be performed using the HP 35665 Dynamic Signal Analyzer. The Dynamic Signal Analyzer is a very versatile low-frequency equipment that can analyze and manipulate signals in the frequency range of 0 – 50 kHz. The Dynamic Signal Analyzer has one output port called source, and two input ports called channel 1 and channel 2. The output of the source port is controlled by the source key on the top section of the Signal Analyzer. The source can generate several kinds of sources including single frequency sinusoidal, swept frequency sinusoidal and random noise. Connect the source output to channel 1 input with a BNC cable. Select the source key, and select sinusoidal source with a frequency of 10 kHz and an amplitude of 5 Volts. Select the measurement key, and alternate between time and frequency settings to observe the signal in both the domains. Time and frequency plots of the signal can be viewed simultaneously by using the dual channel display mode. Repeat the previous of this experiment with a random signal source having a peak amplitude of 1 Volt. Observe the random signal in both time and frequency domains.