How to modulate a signal to a certain frequency in time domain?
8 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am reading a paper where a root-raised cosine pulse signal of bandwidth 500 MHz (double-sided) is modulated at the frequency 6 GHz, their result looks like this :
If I understand well, to modulate the root raised cosine, it needs to be "multiplied" by a signal like h(t)=cos(ωt) with ω=2πf and f= 6 GHz.
I am trying to implement this same method to modulate a Butterworth pulse of 500 MHz bandwidth at a 8 GHz frequency.
My problem is that, in Matlab, when I multiply my pulse by a cosine this is not the result I get at all. I get something like this :
Could someone please explain what I might be doing wrong here.
Here is my code :
%% Create Butterworth pulse
% 1. Create a 4-th order Butterworth filter with 3-db bandwidth (cutoff) at 500 MHz
N = 4; % Filter Order
Fc = 500e6; % Cut off frequency is 500 MHz and it's a low pass butterworth filter
Fs = Fc*4; %
[b,a] = butter(N, Fc/Fs); % Fc/Fs is the normalized cut off frequency
% 2. Pass an impulse to the Butterworth filter to create a Butterworth pulse
Tp = 2; % ns
NTp = 8; %
xSpan = NTp*Tp; %
impulse = [1; zeros((NTp*4)-1), 1)]; % creating the impulse
pulse = filter(b, a, impulse); % passing the impulse signal to the filter
% account for filter delay, center waveform at t=0 : by searching for the
% maximum and moving it to t=0
[~, idx] = max(pulse); % dummy ~ we ignore the "maximum value of the pulse vector" we just want its index idx
len = length(pulse);
pulseCentered = [zeros(round(len/2)-idx, 1); pulse(1:(end-round(len/2)+idx))];
%% LO (Local Oscillator) signal cos(wt) at 7.9 GHz
f=7.9*10^(9);
A=1; % amplitude
w=2*pi*f;
t2 = (-xSpan/2:((xSpan/(len-1))):xSpan/2);
h=A.*cos(w*t2); % my cosine function
plot(t2,h);
xlabel('Time, (ns)');
ylabel('Local oscillator signal cos(wt), V');
title('LO signal f = 7.9 GHz')
grid on
axis tight
%% Multiplying my pulse response with the cosine function
m=(pulseCentered.*h);
figure
plot(m)
grid on
xlabel('Time, (ns)')
title('Modulated signal')
Thank you in advance for your help!
7 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!