Sunteți pe pagina 1din 10

TITLE: TMS320C6713 INPUT AND OUTPUT SIGNAL Objectives: At the end of this laboratory, student should be able to:

i. ii. iii. Develop real-time input and output signal through the A1C23 codec. Generate input signal using signal generator and send to DSP processor. Observe the real-time output signal and understand the Nyquist sampling theorem and aliasing effect from the DSP processor by using digital oscilloscope. iv. Apply Matlab programming and compare the programming result with the experimental result. Equipments: 1. TMS320C6713 DSK 2. Signal generator 3. Digital oscilloscope 4. PC/workstation (installed with Code Composer Studio and Real Time DSP Training System Software) Theory: A signal is defined as any physical quantity that varies with time, space and any other independent variable or variables. More precisely, a signal is a function of a set of independent variables. The word processing means the operating in some fashion on signal to extract some useful information. Lastly, the word digital means that the processing is done with a digital computer or special purpose digital hardware. So, the digital signal processing can be defined as the processing of signals using digital technology. DSP and analog signal processing are subfields of signal processing. Digital signal processors are like fast special-purpose microprocessors with a specialized type of architecture and instruction set appropriate for signal processing. Digital signal processors are used for a wide range of applications, from communications and controls to speech and image processing. These processors have become the product of choice for a number of consumer

applications, since they have become very cost-effective. They can handle different tasks, since they can be reprogrammed readily for a different application. DSK support tools: 1. TIs DSP starter kit (DSK). The DSK package includes : a) Code Composer Studio (CCS) b) A board c) A parallel cable that connects the DSK board to a PC d) A power supply for the DSK board 2. An IBM-compatible PC. 3. An oscilloscope, signal generator, and speakers. Shannon Sampling Theorem For a uniformly sampled DSP system, an analog signal can be perfectly recovered as long as the sampling rate is at least twice as great as the highest frequency of the analog signal to be sampled. The sampling theorem establishes a minimum sampling rate for sampling a given band-limited analog signal with the highest frequency component fmax. If the sampling rates satisfy the equation fs 2fmax, then the analog signal can be recovered via its sampled values using the lowpass filter. The half of sampling frequency fs/2 is usually called the Nyquist frequency (Nyquist limit) or folding frequency. The sampling theorem indicates that a DSP system with a sampling rate of fs can ideally sample an analog signal with its highest frequency up to half of the sampling rate without introducing spectral overlap (aliasing). Hence, the analog signal can be perfectly recovered from its sampled version. The process of sampling the analog time-continuous signal requires an efficient anti-aliasing filter to obtain an unambiguous digital, time-discrete representation of the signal. Ideally, a lowpass filter having a flat passband and extremely sharp cutoff at the Nyquist frequency is required. Anti-aliasing filters are commonly implemented as active filters using feedback operational amplifiers or as switched capacitor filters. One way to relax the requirements of the analog antialiasing filter is to use over-sampling techniques.

Procedures: Hardware Connectivity: 1. The connection is constructed as shown in figure below. 2. The signal generators are set to sine wave 1000 Hz, 2 Vp-p and the signal is monitored at the oscilloscope channel 1. 3. The DSK is connected to the workstation and the DSK is powered on.

Figure 1: Hardware connection diagram Software Program: Code Composer Studio 1. The DSK CCStudio icon on the workstation is double clicked. 2. The Debug -> Connect menu is used to establish a connection to the DSK board. 3. The inoutanalog.pjt Code Composer Project is opened by choosing Project -> Open, and selecting inooutanalog.pjt. it is in the directory C:\CCStudio\real time dsp training system\InOutAnalog. Reviewing the Source Code: 4. In the Project View Window, inoutanalog.pjt is double clicked and the Source Folder in the Project View Window is selected. 5. The inoutcodec.c file in the Project View is double clicked to open the source code of the program.

Build and Run the Program: 6. Project -> Rebuild All is chose or the Rebuild All toolbar button is clicked. The program recompiles, reassembles, and relinks all the files in the project. The build frame at the bottom of the window displays messages about this process. 7. The inoutanalog.pjt executable file is loaded by selecting File -> Load Program. It will open a file browser dialog. The inoutanalog.out files are selected in the Debug directory in the file browser and Open is hit to load the executable file. The compiled executable must be reloaded every time make changes to the program. 8. The Debug -> Run option under the Debug menu is selected, or the Run toolbar button is clicked. 9. The output is came in the real time on the digital oscilloscope channel 2, and it is followed the signal in channel 1. 10. When satisfied that the program is indeed running correctly, the program is stopped by selecting Debug -> Halt, or Halt toolbar button is clicked. Observations and Results: 1. Draw the observation for the output signal from oscilloscope channel 1 (Output from signal generator) and channel 2 (Output from DSK) Amplitude 1 Vp-p, frequency 1000 Hz.

Figure 2: The ouput signal when frequency is 1 kHz

2. Slowly increase the signal frequency to 2 kHz, 4 kHz, 6 kHz and 8 kHz and draw the both output signals in one table.

Figure 3: The output signal when frequency is 2 kHz

Figure 4: The output signal when frequency is 4 kHz

Figure 5: The output signal when frequency is 6 kHz

Figure 6: The output signal when frequency is 8 kHz

3. What is the frequency that the aliasing occurs? Relates your result with Nyquist Sampling theorem. The frequency that aliasing occur is 4 kHz. This is relates to the theorem of fs 2fmax.

Exercises: Write a Matlab for approximation the following continuous-time periodic signals: a) Sinusoidal waveform of amplitude 2 Vp-p, fundamental frequency 1500 Hz and sampling frequency 8000 Hz.

Figure 7: The output of the Matlab program when the fundamental frequency is 1500 Hz

b) Sinusoidal waveform of amplitude 2 Vp-p, fundamental frequency 2000 Hz and sampling frequency 8000 Hz.

Figure 8: The output of the Matlab program when the fundamental frequency is 2000 Hz

Discussion: This experiment is about TMS320C6713 input and output signal. TMS320C6713 DSK is one of the digital signal processors. In this experiment we use this processor connect to the digital oscilloscope, signal generator and PC/workstation that installed with Code Composer Studio and Real Time DSP Training System Software to enhance the output. First, we do the hardware connectivity. The connectivity is connecting as the picture given. The signal generator is set to sine wave 1000 Hz, 2Vp-p and the signal is monitored on the oscilloscope channel 1. This channel is set as the input signal. Then the DSK is connected to the workstation using the cable given. After done with all the connection, we need to do the test using 6713DSK Diagnostics. This test is to check whether the connection is correct or not. If the diagnostic status is PASS, then the connection is correct. If the diagnostics status is FAIL, then there is something wrong with the connection.

Figure 9: The 6713DSK Diagnostic test The next step is for software program. This is important to establish a connection to the DSK board. If we did not do this part, then the DSK board will not connect to the program although it is already connect physically. After connect to the program, the next step is reviewing the source code. We just follow the procedure to review the source code. The last step is build and run the program. After click the button Rebuild All, the program will recompiles, reassembles and relinks all the files in the project. The build frame at the bottom of the window displays messages about this process. So, we will know whether there is the error or not. It also will show the warning if the is any wrong connection and remarks that

we need to be aware off. After reload the program, click the Run button and the output will come in the real time on the digital oscilloscope channel 2. The signal on this channel is set as the output signal.

Figure 10: The build frame The output signal for 1000 Hz frequency is same as the input signal. The Vmax for the input signal and output signal is same that it is 960mV. The output signal for 2 kHz frequency also same with the input signal. The Vmax for the input signal and output signal is surely same that it is 960mV. But at this time, the period for one cycle is become smaller. This is because the frequency is related to the period based on this equation:

The output signal when 4 kHz applied is differ with the input signal. At this time, the distortion started to occur. The Vmax for the output signal is 440mV and the Vmax for input signal is 920mV. The output signal when frequency is 6 kHz also differs with the input signal. The distortion is worse than the distortion in the output signal of 4 kHz frequency. The Vmax for the output signal is 6.20mV and the Vmax for the input is still same that is 960mV. Lastly, for 8 kHz frequency, it is surely differ in the output signal with the input signal. The distortion is worsteds than when frequency of 4 kHz and 6 kHz is applied. The Vmax for the output signal is 5.00mV and the Vmax for the input signal is 920mV. The aliasing occur when the frequency is 4 kHz. This is because at this frequency, the distortion is started to occur. Based on the Nyquist sampling theorem, the aliasing occur when fs 2fmax. In the Matlab part, there is a differ in the sinusoidal waveform for fundamental frequency 1500 Hz and 2000 Hz. The period for one cycle becomes smaller when the frequency is high. This is because the frequency is inversely proportional to the period of one cycle.

Conclusion: At the end of this laboratory, we able to develop real-time input and output signal through the A1C23. The output of the signal is showed on the channel 2 of the digital oscilloscope. We also able to generate input signal using signal generator and send to DSP processor. The realtime output signal is observed and the Nyquist sampling theorem and aliasing effect from the DSP processor is understand using digital oscilloscope. Aliasing occur when there is a distortion. The Matlab programming is applied. The programming result and the experimental result show the same thing. It is when the frequency high, the period will become smaller.

References: 1. Digital Signal Processing, Ramesh Babu C. Durai, page 3 2. DSP Applications Using C and the TMS320C6x DSK, Rulph Chassing, page 1-3 3. Fundamentals of Analog and Digital Signal Processing, Jean Jiang Li Tan, page 161-162 4. Digital Signal Processing: Dsp and Applications, Dag Stranneby, page 37 5. Lectures Note DSP, Madam Nur Fatihah binti Azmi

S-ar putea să vă placă și