In my Matlab code I have a simple simulation of FPGA with the ability to simulate doppler shift, and after I and Q components plugged into IQmod with some carrier freq.
In my Matlab code when I multiply primordial signal $s_{prim}(t)e^{(jwt)}$ and have mirror signal after? And what's strange when I carrying that signal onto carrier frequency this carried signal doesn't have mirror signal.
totally working Matlab code included, will be glad to any ideas.
t = 0:0.000001:0.1;
fs = 1/(t(2) - t(1));
%ss = exp(j*2*pi*100*t) + exp(j*2*pi*200*t) + exp(j*2*pi*300*t) + exp(j*2*pi*900*t) + exp(j*2*pi*600*t); %Generating I-Q signal *.bin file for AWG
N=8;
bit_stream = round(rand(1,N));
f = 1000;
P1= 0;
P2= pi;
PSK_signal = [];
for ii = 1:1:N
PSK_signal = [PSK_signal (bit_stream(ii)==0)*sin(2*pi*f*t + P1)+...
(bit_stream(ii)==1)*sin(2*pi*f*t + P2)];
end
ss = PSK_signal;
figure(1); plot(ss);
sp = fft(ss);
N = length(ss);
fp = ((0:N-1)/(N-1))*fs;
fp = fp(1:N/2);
sp = abs(sp(1:N/2))/(N/2);
figure(2); hold on; plot(fp,sp); %Spectre of primordial signal
w = 3000*pi*2;
t = (1:length(ss))/fs;
%Real outputs from AWG
I = real(ss); % I Input on FPGA
Q = imag(ss); % Q Input on FPGA
%Adding frequency SHIFT in Simuation FPGA plate
ss_i_real = I.*cos(w*t) - Q.*sin(w*t); % I component from FPGA
ss_i_imag = I.*sin(w*t) + Q.*cos(w*t); % Q component from FPGA
sp = fft(ss_i_real+1j*ss_i_imag);
N = length(ss_i_real);
fp = ((0:N-1)/(N-1))*fs;
fp = fp(1:N/2);
sp = abs(sp(1:N/2))/(N/2);
figure(2); plot(fp,sp);
w = 40000*pi*2;
t = (1:length(ss_i_real))/fs;
%ss_c = ss_i.*exp(1j*w*t); %Modulation that carrying signal from FPGA on Carrier Frequency (40KHz)
ss_c_real = ss_i_real.*cos(w*t) - ss_i_imag.*sin(w*t);
ss_c_imag = ss_i_real.*sin(w*t) + ss_i_imag.*cos(w*t);
ss_c = ss_c_real+ss_c_imag*1j; % Real part of Signal onto carrier <- this is the signal that will be transmitting from modulator
sp = fft(ss_c);
N = length(ss_c);
fp = ((0:N-1)/(N-1))*fs;
fp = fp(1:N/2);
sp = abs(sp(1:N/2))/(N/2);
figure(2); plot(fp,sp); %Spectre of signal onto carrier freq
% figure(4); plot(ss_c_real); %I - component of signal onto carrier freq
%
% figure(5); plot(ss_c_imag); %Q - component of signal onto carrier freq
edit1: What causes my confusion, when I'm using the signal:
%ss = exp(j*2*pi*100*t) + exp(j*2*pi*200*t) + exp(j*2*pi*300*t) + exp(j*2*pi*900*t) + exp(j*2*pi*600*t); %Generating I-Q signal *.bin file for AWG
I have this nice picture:
1 primordial signal, 1 shifted signal and 1 carried onto 40KHz shifted signal. When I'm using the BPSK signal I'm shifting this signal I have mirrored signal and shifted (i mean two signals with $F_{shift} \pm F_{prim}$)
To be simple I just want to add shift on intermediate frequency and after carry that shifted signal onto carrying frequency without clone signal at $f_{car}-f_{shifted}$ as I have now.
ss
to be imaginary? You take the imaginary part of it, but I can't see why it should be complex-value. $\endgroup$ – Peter K.♦ Sep 8 '17 at 18:45