DSPRelated.com
Forums

Generating SSB by a DAC with Hilbert image rejection (AD9786)?

Started by MM November 28, 2003
Hi all,

I am again looking at the AD9786 datasheet:
(http://www.analog.com/UploadedFiles/Data_Sheets/34595181746736AD9786_prc.pd
f) and in particular on Fig.13,
trying to understand how the chip works and whether I can generate a SSB
signal with it (supposedly I should be able to). I wrote a simple MATLAB
script (see below) to simulate the image rejection algorithm implemented in
the AD9786, but it seems that I am missing something basic... If I apply a
complex baseband signal I don't seem to have any images to reject, which I
believe is a correct behaviour of a quadrature modulator. However, if I
apply real input signal the images happily propagate through to the
output...

Can anyone point me to what I am doing wrong here?

Thanks,
/Mikhail

% An M-file script demonstrating Hilbert transform usage
% for suppressing extra images in quadrature modulation.
% Based on the AD9786 TxDAC datasheet

Fs = 10e3;      %Sampling Rate in Hz
f1=500;         %Tone 1 frequency in Hz
f2=600;         %Tone 2 frequency in Hz
N=2048;         %Number of samples
Fc = Fs/4;      %Carrier frequency
Ts=1/Fs;        %Sampling period

%Generate baseband signal of frequency f, sampled with the rate Fs
t = (0:Ts:(N-1)*Ts);
%s = cos(2*pi*f1*t) + cos(2*pi*f2*t);
s = exp(i*2*pi*f1*t)+exp(i*2*pi*f2*t)

%Perform complex modulation
x=s.*exp(i*2*pi*Fc*t);

%Perform another complex modulation with the pi/2 shift
y=s.*exp(i*(2*pi*Fc*t-pi/2));

%Calculate complex Hilbert transform
z=imag(hilbert(real(y))) + i*imag(hilbert(imag(y)));

%Subtract from the original complex modulation output
c=x-z;

%Calculate spectra
X=fft(x, N);
Y=fft(y, N);
Z=fft(z, N);
C=fft(c, N);

% Move zero frequency to the center
X=fftshift(X);
Y=fftshift(Y);
Z=fftshift(Z);
C=fftshift(C);

%Display the results
figure(1);
faxis= Fs*(-N/2:N/2-1)/N;
plot(faxis,abs(X));
title('Frequency content of X')
xlabel('frequency (Hz)')
grid on

figure(2);
plot(faxis,abs(Y));
title('Frequency content of Y')
xlabel('frequency (Hz)')
grid on

figure(3);
plot(faxis,abs(Z));
title('Frequency content of Z')
xlabel('frequency (Hz)')
grid on

figure(4);
plot(faxis,abs(C));
title('Frequency content of C')
xlabel('frequency (Hz)')
grid on


"MM" <mbmsv@yahoo.com> wrote in message news:<bq8feg$1vpntk$1@ID-204311.news.uni-berlin.de>...

> trying to understand how the chip works and whether I can generate a SSB > signal with it (supposedly I should be able to). I wrote a simple MATLAB > script (see below) to simulate the image rejection algorithm implemented in > the AD9786, but it seems that I am missing something basic...
May be I am wrong, but looking at the block diagram of that chip, I think you have forgotten the delay inserted in the upper branch, and marked as DeltaT on that diagram. Look at the square block above the other square block with "Hilbert" written inside. So your code : --- %Calculate complex Hilbert transform z=imag(hilbert(real(y))) + i*imag(hilbert(imag(y))); %Subtract from the original complex modulation output c=x-z; --- should have a delay applied to x before the subtraction. Don't shoot at me if I goofed...:-) Alberto
"Alberto" <adibene@yahoo.com> wrote in message
news:e9aa0d73.0311291505.20d3510f@posting.google.com...
> "MM" <mbmsv@yahoo.com> wrote in message
news:<bq8feg$1vpntk$1@ID-204311.news.uni-berlin.de>...
> > May be I am wrong, but looking at the block diagram of that chip, I > think you have forgotten the delay inserted in the upper branch, and > marked as DeltaT on that diagram. Look at the square block above the > other square block with "Hilbert" written inside.
I didn't forget it, I decided it was there to compensate for the delay in the Hilbert transformer. Since MATLAB actually uses FFT to calculate Hilbert transform I thought it was not required... Another thing on that diagram I am failing to understand is that Re()/Im() expression after the subtraction... /Mikhail