Вы находитесь на странице: 1из 12

“TO USE FUNCTION GENERATOR”

Equipment:

 Function generator
 Digital Multimeter
 Oscilloscope
 10X probes

Experiments No.1 “To generate a sinusoid using function generator”

 Generate and observe the waveform V=Asin(2pf), where A=100 mV and f=5kHz.

 Remember the A is in millivolts and not volts. Use the attenuator function.

 Capture the waveform by digital oscilloscope.

 Smooth the waveform using the average feature keeping M=4, 16 and 128.

 Acquire the data and recreate in MATLAB.


by increasing value of M we get smoother sine wave.This reduces the level of noise. Using this technique
the oscilloscope can display the latest acquisition with the noise as well as the averaged signal, so
observing the effect of the averaging. When the desired level of noise reduction is achieved we can view
the shape of the averaged signal and make measurements.

RECREATING IN MATLAB:

n=size(columnD);
ts=0.0025;
b=(n*ts)-ts;
t=0:ts:b;
plot(t,columnD)
xlabel('time')
ylabel('amplitude')
title('Sine wave v=Asin(2pf)')
axis([0 2 -1 1])
n=size(columnD);
ts=0.0025;
b=(n*ts)-ts;
t=0:ts:b;
plot(t,columnD)
xlabel('time')
ylabel('amplitude')
title('Sine wave v=Asin(2pf) with M=128')
axis([0 1 -0.5 0.5])
Experiments No.2 “To generate PWM waveform”

 Create a pulse waveform with 20% duty cycle and 90% duty cycle with peak to peak
voltage of 1v and 1kHz

 Capture the waveform by digital oscilloscope.

 Acquire the data and recreate in MATLAB


RECREATING IN MATLAB:

n=size(columnE);
ts=0.0025;
b=(n*ts)-ts;
t=0:ts:b;
plot(t,columnE)
xlabel('time')
ylabel('amplitude')
title('20% duty cycle')
axis([0 2 -1 1])
n=size(columnE);
ts=0.0025;
b=(n*ts)-ts;
t=0:ts:b;
plot(t,columnE)
xlabel('time')
ylabel('amplitude')
title('90% duty cycle')
axis([0 2 -1 1])
Experiments No.3 “To generate sawTooth waveform”

 Create a saw tooth waveform with positive slope and negative slope.

 Capture the waveform by digital oscilloscope.

 Acquire the data and recreate in MATLAB


RECREATING IN MATLAB:

n=size(columnE);
ts=0.0025;
b=(n*ts)-ts;
t=0:ts:b;
plot(t,columnE)
xlabel('time')
ylabel('amplitude')
title('sawtooth wave with positive slope')
axis([0 2 -1 1])
n=size(columnE);
ts=0.0025;
b=(n*ts)-ts;
t=0:ts:b;
plot(t,columnE)
xlabel('time')
ylabel('amplitude')
title('sawtooth wave with negative slope')
axis([0 2 -1 1])
Experiments No.4 “To use gate mode”

 Use the gate function to gate a sinusoidal wave created in experiment no 2 to a 10Hz,
20% duty cycle pulse wave.

 Capture the waveform by digital oscilloscope.

 Acquire the data and recreate in MATLAB.

n=size(columnE);
ts=0.0025;
b=(n*ts)-ts;
t=0:ts:b;
plot(t,columnE)
xlabel('time')
ylabel('amplitude')
title('gate mode')