I need to write a MATLAB function to estimate the best initial sampling point for demodulation of a 16-QAM.
I can do it by looking at the eye diagram, the point which at which the eye is "open", but can this be done in MATLAB?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.Sign up to join this community
An eye diagram can be created by just framing up your QAM signal (probably after matched filtering), where the frame length is the number of samples per QAM symbol. In MATLAB, this is very simple:
x = output_of_matched_filter; N = number_of_samples_per_symbol; eye = reshape(x,N,); % "eye" now is a two-dimensional matrix, with each column containing one trace % to plot on the eye diagram. you can then plot all of the traces with: plot(eye);
One note: the call to
reshape requires that the length of
x is a multiple of
N. If it isn't already, you'll need to slice the array to make it true:
nsyms = floor(length(x)/N); eye = reshape(x(1:nsyms*N),N,nsyms);