Help to plot the LED Characteristic Curve

3 visualizaciones (últimos 30 días)
adriane duarte
adriane duarte el 10 de Sept. de 2021
Comentada: adriane duarte el 11 de Sept. de 2021
I am trying to plot the LED characteristic curve, but I am not getting the correct curve.The theoretical curve is below.
The curve I'm finding is this. A little different than expected.
Someone could help me with what I'm wrong. I'm submitting my code below.
% LED information
Vt = 0.5;
Is = 0.5;
% LED model
K = 0.5;
imax = 0.5;
threshold = 150;
sigmaV2 = (imax./threshold).^2;
% number of bits
L = 1e4;
SNRdB = 40;
% Signal-to-Noise Ratio Lin.
SNR = 10.^(SNRdB/10);
r = 10.^(SNRdB/10);
% signal standard deviation (power)
sigmaX2v = SNR.*sigmaV2;
% Maximum number of iterations for a single SNR
max_run = 100;
for sk = 1:length(SNRdB)
for tk = 1:max_run
s = linspace(0,100,10000); % input
s1 = s.';
stdS = std(s1);
X = zeros(1,4.*L);
X(2:2:end) = [s1; conj(s1(end:-1:1))];
xTD = ifft(X);
xTD = (sqrt(sigmaX2v(sk))).*xTD./std(xTD);
xx = xTD;
ind = find(xTD < 0);
xx(ind) = zeros(size(ind));
ss = xx;
iLED = Is.*(exp(ss./Vt) - 1);
xLED = iLED./((1 + (iLED./imax).^(2.*K)).^(1./(2.*K)));
y = xLED;
Nframe = length(y);
Xhat = (fft(y)+10);
Shat = Xhat(2:2:Nframe/2);
Shat = stdS.*Shat./std(Shat);
Y = Shat; % output
end
end
plot(s1,Y)

Respuestas (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 10 de Sept. de 2021
The answer in signal-to-noise ratio value, e.g:
SNRdB = 20; % Gives a nice looking one!
  3 comentarios
Sulaymon Eshkabilov
Sulaymon Eshkabilov el 10 de Sept. de 2021
Your obtain curve shape changes because of the SNR value. Thus, whichever value is your actual value for simulation that would be appropriate. You can simulate your code with different values of SNR and see how SNR inluences your curve shape.
adriane duarte
adriane duarte el 11 de Sept. de 2021
I found my curve in the figure above very strange because it grows back from a certain point. I thought the LED curve couldn't happen.

Iniciar sesión para comentar.

Categorías

Más información sobre Simulation, Tuning, and Visualization en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by