Help to plot the LED Characteristic Curve

3 次查看(过去 30 天)
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)

回答(1 个)

Sulaymon Eshkabilov
The answer in signal-to-noise ratio value, e.g:
SNRdB = 20; % Gives a nice looking one!
  3 个评论
Sulaymon Eshkabilov
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 2021-9-11
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulation, Tuning, and Visualization 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by