Question

3 Accuracy of Sampling Let us sample the function gt)cos(2fo) at sampling interval dt- 1, for frequency values of f 0,0.25,0.5,0.75, 1.0 hertz. In each case, plot on the screen the points of the resulting time series (as isolated red crosses) to see how well it approximates g(t) (plotted as a blue-dotted line, try a very small dt fine sampling). Submit only plots for frequencies of 0.25 and 0.75 Hertz, use xlabel, ylabel, title commands to annotate each plot. For each frequency that you investigated, do you think the sampling time series is a fair representation of the original time series g )? What is the apparent frequency for the sampling time series? (Figure out after how many points (N) the series repeats itself, then the apparent frequency 1/(N*dt). You can do this either mathematically or by inspection. A flat time series has apparent frequency = 0.) Can you guess with a sampling interval of dt = 1 , what is the maximum frequency f of g() such that it can be fairly represented by the discrete time series? (Please attach your Python code.)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The required MATLAB CODE is as follows:

fs=0.01; %Very high sampling rate
f=1; %Frequency of sinusoid
nCyl=5; %generate five cycles of sinusoid
maxf=nCyl*f;
t=0:fs:maxf; %time index
x=cos(2*pi*f*t); % continious wave

fs1=0.25; %1/0.25 sampling rate
t1=0:fs1:maxf; %time index
x1=cos(2*pi*fs1*t1);

fs2=0.75; % 1/0.75 sampling rate
t2=0:fs2:maxf; %time index
x2=cos(2*pi*fs2*t2);

figure
subplot(2,1,1);
plot(t,x);
hold on;
stem(t1,x1); % plot the first sample
xlabel('Time(s)');
ylabel('Amplitude')
title('f=0.25');

subplot(2,1,2);
plot(t,x);
hold on;
stem(t2,x2); % plot the first sample
xlabel('Time(s)');
ylabel('Amplitude')
title('f=0.75')

**************************************SAMPLE OUTPUT**********************

f-0.25 O ㄒㄧ ㄒㄧㄧㄒ-00000-7 0.5 -0.5 f-0.75 Time(s) 0.5 0.5 Timafc

Add a comment
Know the answer?
Add Answer to:
3 Accuracy of Sampling Let us sample the function gt)cos(2fo) at sampling interval dt- 1, for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Problem 31: (34 points) 1. (10 points) A pulse width modulated (PWM) signal fPwM(t) in Figure...

    Problem 31: (34 points) 1. (10 points) A pulse width modulated (PWM) signal fPwM(t) in Figure 2. The symbol D represents a duty cycle, a number between zero and one. Determine the compact trigonometric Fourier series coefficients (Co C,11 %) of the signal f(t). 2. (10 points) One use of PWM is to generate variable DC voltages. While the PWM signal is not DC, you should be able to see from your results in part 1 that it hss a...

  • 1. Using the Fourier series analysis Equation 3 for the periodic function r(t) shown in Figure 2....

    1. Using the Fourier series analysis Equation 3 for the periodic function r(t) shown in Figure 2.1, determine both the DC coefficient ao and a general expression for the other Fourier series coefficients ak. Do this by hand, not in Matlab. Show all your work in your lab report. You can add these pages as hand-written pages, rather than typing them in to your lab report, if you prefer Hint 1: It will be easiest to integrate this function from...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT