2
$\begingroup$

Suppose I have a continuous signal x(t), which was sampled using sampling function s(t) whose sampling rate is Ts.How can I sample the continuous signal by Ts/2 instead of Ts in order to get two fractional sampled signals.

for example: y(t) = s(t) * x(t) with t = nTs ,

So if I sampled with sampling rate Ts/2, I supposed to have Y1 = S1(t) * x(t) and Y2 = S2(t)* x(t), with Y1, Y2 and S1(t), S2(t) are the polyphase components of y(t) and s(t) respectively.

Is that right : 

close all, clear all
Fx = 20; Tx=1/Fx; % Original sampling frequency in Hz
tx = 0:Tx:1; % Time vector tx
x = 0.9*sin(2*pi*tx); % Input sequence
y = resample(x,2,1); % Re-sampling
ty = (0:(length(y)-1))*1*Tx/2; % New time vector ty
y1 = y(1:2:end);    % First representation of signal x
y2 = y(2:2:end);    % Second representation of signal x

If so, .. and if y is the first polyphase component of input signal, so where is the second component, or how can I get it?

thank you.

$\endgroup$
  • $\begingroup$ I must be misunderstanding the question. Aren't the two upsampled polyphase signals simply y(1:2:end) and y(2:2:end)? I took your question to mean that you were looking for two representations of the original x(t), one perhaps being the original x(t) and the other being the interpolated version with Ts/2 (or generally Ts/n) time offset. - ? $\endgroup$ – user35336 Jul 25 '18 at 5:00
  • $\begingroup$ @msm .. "I took your question to mean that you were looking for two representations of the original x(t), one perhaps being the original x(t) and the other being the interpolated version with Ts/2 (or generally Ts/n) time offset" .. Yes exactly, how can I get two representations of the original x(t)? is it true what I mentioned above in code? I edited the code, .. or how can I get those two representation for the signal x(t). $\endgroup$ – Zeyad_Zeyad Jul 25 '18 at 8:33
  • $\begingroup$ Yes, it seems you have already answered your question. The fidelity of your resampling depends on how you have configured Matlab's resampler. If the default is sufficient, you are done. You can check the response by having 'resample' return the filter used: [y,h] = resample(...) and look at the frequency response of h. $\endgroup$ – user35336 Jul 25 '18 at 13:52
  • $\begingroup$ Oooh .. Thank you so much .. that's really useful. you mean [y,h] = resample(...), h return the frequency response of the channel filter for example.. that's really interesting, in other words, I can resample at frequency response it high or low .. is that right? $\endgroup$ – Zeyad_Zeyad Jul 25 '18 at 15:26
  • $\begingroup$ Once you have h, you can use something like H = freqz(h,1,4096); plot(abs(H).^2) to see the frequency response of the upsampling filter. I don't know what you mean by high or low. $\endgroup$ – user35336 Jul 26 '18 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.