Help to plot the LED Characteristic Curve

조회 수: 2(최근 30일)
adriane duarte
adriane duarte 2021년 9월 10일
댓글: adriane duarte 2021년 9월 11일
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
Sulaymon Eshkabilov 2021년 9월 10일
The answer in signal-to-noise ratio value, e.g:
SNRdB = 20; % Gives a nice looking one!
  댓글 수: 3
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.

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by