Names:_________________________ EE354: Lab 07 – Intro to Amplitude, Frequency, and Phase Shift Keying Simulation This lab will have you create and analyze a simple amplitude shift-keyed (ASK), frequency shift-keyed (FSK), and phase shift-keyed (PSK) waveform. Part 1: Pre-Lab Theory Digital bandpass communication signals can be represented mathematically by: u p ( t ) b [ n ] p ( t − kTb ) cos ( 2p f c t ) , Amplitude Shift Keying (ASK): = Frequency Shift Keying (FSK): Phase Shift Keying (PSK): ak = 0 /1 u p (t ) = ∑ (1 − b [ n]) p ( t − kTb ) cos ( 2p f0t ) + ∑ b [ n] p ( t − kTb ) cos ( 2p f1t ) , b ∈ {0, 1} = u p ( t ) b [ n ] p ( t − kTb ) cos ( 2p f c t ) ; b ∈ {−1, + 1} For this lab, the ASK and PSK signals will operate on a 10 kHz cosine carrier w/amplitude 1V. For FSK, the two tones will be at 4.0 kHz and 16.0 kHz. The message signal will be a 4.410 kbps binary bitstream. 1. Complete the theoretical predictions in Table 1 for the ASK, FSK, and PSK waveforms. *** Note: Amplitudes should be in Volts, Powers in dBm. Table 1: Theoretical Characteristics of the Digital Bandpass Signals Parameter Min value of envelope, Amin Max value of envelope, Amax Amplitude of carrier, Ac Carrier Frequency, fC RF Bandwidth Overall power (50Ω load) ASK PSK FSK 2. Assuming a bit pattern of “1100100100010001”, sketch the time-domain signal and the spectrum of each of the digital bandpass signals (positive frequencies only). The sketches do not need to be to scale, however, all pertinent data needs to be labeled and they need to be crisp. ASK Signal – Time Domain ASK Signal – Frequency Spectrum FSK Signal – Time Domain FSK Signal – Frequency Spectrum PSK Signal – Time Domain PSK Signal – Frequency Spectrum Instructor Verification:_____________ Part 2: Simulation 1. In MATLAB, create the three digital bandpass signals from Part 1. For this lab, the random bit sequence has been pre-generated by the instructor and is available on the course website in the file askfskpsk_511bits.txt. The code snippet below can be used to generate the binary bitstream that will be input to your ASK/FSK/PSK modulators. clear all close all fs = #####; % Set sampling rate equal to soundcard sampling rate Ts = 1./fs; % Set sampling time Rb = #####; % Set bit rate sam_per_bit = fs./Rb; %Number of samples per bit – Make sure its an integer! bits = load('askfskpsk_511bits.txt'); %Load the Bits Tstop = Ts.*sam_per_bit.*length(data); % Stop time of the simulatin time = 0:Ts:Tstop; % Establish timevector % Generate Unipolar NRZ and Bipolar NRZ unipolar_NRZ = rectpulse(bits, sam_per_bit); bipolar_NRZ = 2.*unipolar_NRZ – 1; 2. Create a time-domain plot of the three signals…zoom in as necessary so that you can visually identify the modulated bits. Visually identify each bit on the time-domain plot. NOTE: For the time-domain plots, it may help to adjust the carrier in order to avoid the “big blue blob” syndrome. 3. Use MATLAB to create a plot of the frequency spectrum (positive frequencies only). Zoom in to clearly see the spectrum of the signal. Turn in this properly labeled plot with your report Instructor Verification:_____________ Part 3: Hardware Verification Next, use the oscilloscope to capture and analyze the ASK, FSK, and PSK signals you just generated. Start by connecting the output of your PC’s sound card to the Channel 1 input of your oscilloscope (you will require a set of adapters provided by the instructor), as shown below in the following diagram. Note that: the audio output jack of the PC at your bench may be at a different location than the one shown below. After connecting the Oscope, use Matlab to output the digital line code to your PC’s sound card. The Matlab command to generate an audio output is sound(<varname>, fs, Nbits). In this case, your output data stream will be the <varname> output, fs will 44.1 kHz, and Nbits should be set to 16. Audio Out LeCroy Scope ` CH1 1/8" Male to RCA Female Audio Splitter Adapter RCA Male to BNC Female Adapter CH2 CH3 CH4 Standard BNC Cable Figure 2: Illustration of the connection between the PC Audio Output and the LeCroy Oscilloscope. Oscilloscope Captures 1. Configure the oscilloscope to capture 500,000 samples, and adjust the screen until it displays one complete data pattern. Record the time-domain ASK waveform to a Matlab .dat file; generate a Matlab plot of the time-domain signal for the coversheet. 2. Using either the oscilloscope or spectrum analyzer, perform the following measurements. Avg. Power in ASK Transmission (50 Ω load) in dBm First-Null Bandwidth Amplitude for Signal s0 Amplitude for Signal s1 Bit duration, Tb Data Rate, Rb Bit Pattern (first 10 bits) 3. Configure the oscilloscope to capture 500,000 samples, and adjust the screen until it displays one complete data pattern. Record the time-domain FSK waveform to a Matlab .dat file; generate a Matlab plot of the time-domain signal for the coversheet. Avg. Power in FSK Transmission (50 Ω load) in dBm Total Occupied Bandwidth Frequency for Signal s0 Frequency for Signal s1 Bit duration, Tb Data Rate, Rb Bit Pattern (first 10 bits) 4. Configure the oscilloscope to capture 500,000 samples, and adjust the screen until it displays one complete data pattern. Record the time-domain PSK waveform to a Matlab .dat file; generate a Matlab plot of the time-domain signal for the coversheet. Avg. Power in PSK Transmission (50 Ω load) in dBm First-Null Bandwidth Bit duration, Tb Data Rate, Rb Bit Pattern (first 10 bits)