Plotting signals in time domain
Mostrar comentarios más antiguos
Q: In the operation of V.34 class voiceband modems, tone signals that are narrowly spaced apart must be quickly identified for initialization. We want to design a signal processing algorithm that can easily detect which signal is received. ITU-T V.25 and V.8 recommendations specify the signals as
𝑠0(𝑡) = 𝐴0 cos(2𝜋𝑓c𝑡 + 𝜃) : ANS signal
𝑠1(𝑡) = 𝐴1[1 + 𝜌 cos(2𝜋𝑓0t + 𝜙)] cos(2𝜋𝑓c𝑡 + 𝜃) : ANSam signal
The parameters are given by: 𝜌 = 0.2, 𝑓0 = 15 Hz, 𝑓c = 2100 Hz, 𝐴1 = 1, 𝐴0 = 𝐴1(1 +𝜌^2/2) Thevalues for 𝜃 and 𝜙 are arbitrary.
1. Plot ANS and ANSam signals in the time domain. Use sampling rate 𝑓s = 1/𝑇s = 4𝑓c(2𝑛 + 1), where 𝑛 = 0,1,2,…. Describe the difference of the two signals.
2. Plot the magnitudes of the Fourier transforms of the two signals. Confirm that ANS is a single tone and ANSam is a sum of three narrowly spaced tones. What is the spacing between the tones in the ANSam signal? [Hint: In order to have a high frequency resolution, the FFT points N must be large enough. Also, you might want to zoom into around f = 2100 Hz to be able to see the narrowly spaced tones clearly.]
My Code:
p = 0.2;
f0 = 15;
fc = 2100;
A1 = 1;
A0 = A1 * ((1 + ((p.^2)/2)))*0.5;
theta = -pi+2*pi*rand(100,1);
phi = -pi+2*pi*rand(100,1);
n = 100;
fs = 4*fc*((2*n)+1); % Sampling frequency
T = 1/fs; % Sampling period
L = fs; % Length of signal
t = (0:L-1)*T; % Time vector
s0 = A0 .* cos((2*pi*fc*t)+theta); % ANS signal
s1 = A1 .* (1+(p*cos((2*pi*f0*t)+phi))) .* cos((2*pi*fc*t)+theta); % ANSam signal
X = [s0,s1];
for i = 1:2
subplot(2,1,i)
plot(t(1:100),X(i,1:100))
title(['Row ',num2str(i),' in the Time Domain'])
end
Problem: It is not giving me a cosine output for the 1st part. I haven't attempted the 2nd part yet. Need help.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Filter Design en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


