How to extract Signal Parameters from an Eye Diagram

8 次查看(过去 30 天)
Hello and Good day every one
I have this eye Diagram which I attached its code the data to run the code and plot the eye. I have this eye diagram:
Now I want to extract some vital information about the signal such as Cross over area in eye diagram (jitter), signal to noise ratio (Distortion), Bit error rate, Slope of the eye (Sensitivity), Eye height, width and amplitude and pretty much everything possible about the signal one can read from an eye diagram. I do not know how to manipulate my data to achieve these parameters.
The code:
load('eye2.mat')
hold on;
for k = 1:N_symb
u_idx = samp_per_symb*(k - 1) + rel_idx;
if (k == 1) || (k == N_symb)
u_idx = mod(u_idx - 1, N_samp) + 1;
end
plot(t_plot, real(u(:, u_idx)),'k');
end
ylabel('I channel')
grid on;
zoom on;
box on;

回答(1 个)

Suraj Kumar
Suraj Kumar about 4 hours 前
Hi Proman,
To analyze an eye diagram and extract several key parameters like height, width, jitter and SNR ratio you can go through the following steps:
1. Load the eye diagram data from ‘eye.mat’ and initialize arrays to store the parameters required.
load('eye.mat');
% Initialize parameters
eye_heights = [];
eye_widths = [];
crossings = [];
2. Iterate over each symbol, plotting segments of the signal to construct the eye diagram. For the ‘height’ iterate over the maximum and minimum signal levels for each segment of the eye diagram.
for k = 1:N_symb
u_idx = samp_per_symb * (k - 1) + rel_idx;
if (k == 1) || (k == N_symb)
u_idx = mod(u_idx - 1, N_samp) + 1;
end
signal = real(u(:, u_idx));
plot(t_plot, signal, 'k');
% Calculate eye height
eye_heights = [eye_heights, max(signal) - min(signal)];
end
avg_eye_height = mean(eye_heights);
3. For calculating the ‘width’ identify the zero-crossings and calculate the time differences between these crossings. The average of these differences provides a measure of the eye width.
% Find zero crossings for jitter and eye width
zero_crossings = find(diff(sign(signal)) ~= 0);
crossings = [crossings, t_plot(zero_crossings)];
% Calculate average eye height
avg_eye_height = mean(eye_heights);
if length(crossings) > 1
eye_widths = diff(crossings);
avg_eye_width = mean(eye_widths);
else
avg_eye_width = NaN;
end
4. To estimate ‘jitter’, calculate the standard deviation of time differences between zero crossings and for ‘SNR’ estimate the signal power from the mean square of the eye heights and derive noise power from their variance.
jitter = std(eye_widths);
% Estimate SNR (simplified approach)
signal_power = mean(eye_heights.^2);
noise_power = mean((eye_heights - avg_eye_height).^2);
snr = 10 * log10(signal_power / noise_power);
5. Estimate the ‘bit error rate’ using the Q-factor, which is derived from the height and the noise power under the assumption of Gaussian noise.
% Calculate Q-factor and estimate BER
Q_factor = avg_eye_height / (2 * sqrt(noise_power));
BER_estimate = 0.5 * erfc(Q_factor / sqrt(2));
You can refer to the output below for a better understanding:
For more details on the ‘mean’, ‘std’ and ‘erfc’ functions in MATLAB you can go through the following documentations:
Hope this helps!

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by