ZZ Matlab DAQ Lab

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Matlab 

DAQ Tutorial 

1. Simulate a signal with noise (amplitude 1 mV) 
2. Implement simulated ADC  
3. Test simulated signals and show them in time and frequency (FFT). Use 10 bits, 
range [‐5, 5] V. 
a. Sine with f = 1 kHz, A = 4 V, fs = 1 MS/s, N = 10000 (100 periods) – zoom 
in near the maximum to see the discretization 
b. Sine with f = 1 kHz, A = 4 V, DC = 0,5 V, fs = 10 kS/s, N = 100 (10 periods) 
‐ FFT 
c. Square com f = 1 kHz, A = 4 V, fs = 100 kS/s, N = 2000 (20 periods) 
d. Show that the spectrum goes to 5 kHz and 50 kHz in b. and c. cases 
4. Explain how to remove samples to have an integer number of periods 

Note that if the sine has 1 kHz frequency, with 10 samples per period, the 
sampling frequency must be 10 times higher than the signal frequency, 
therefore the number of points per period is fs/f. 

5. Open NI MAX to identify the DAQ board and perform initial tests. 
6. Adjust generator amplitude to 4 V, using NI MAX 
7. Acquire the data with myDAQ in Matlab 
8. Test with Sine signal, f = 1 kHz, A = 4 V, fs = 10 kS/s, N = 100 (10 periods) 
9. FFT and present the spectrum in linear and dB units 
10. IpDFT to obtain the fundamental frequency 
11. Test with a Square signal, f = 1 kHz, A = 4 V, fs = 100 kS/s, N = 2000 (20 periods) 
12. FFT and present the spectrum in linear and dB units 
13. Adjust window to clearly see the signal harmonics 
14. IpDFT to obtain the fundamental frequency 

You might also like