From: Leyo Joseph on
Hello

In the attached mfile,I am :

1. calculating the series resistor (Se_R) and shunt resistor (Sh_R) of an attenuator for various values of attenuation. This works fine.

2. calculating the current (Id) vs resistance (R_total) of a PIN diode. This also works fine.

3. How to calculate (id) for the values of vector (Se_R) and vector (Sh_R)? Is it possible to get an equation for Id vs the resistance?

Appreciate your help.
Thanks,
Leyo

%% This File calculates the the resistor values of PI Pad

clear all;
close all;
clc;
%% Main Calculation
att_dB=0:0.5:50;
Z=50;
att_linear=10.^(1*att_dB./20);
Se_R=Z/2*((att_linear.^2-1)./att_linear);
Sh_R=Z*((att_linear+1)./(att_linear-1));
%% Plotting the results
figure(1)
hold off
plot (att_dB,Se_R);
xlabel 'Attenuation dB'
ylabel ' Series resistor'
title ('Attenuation Vs Series resistor')
grid on
figure(2)
plot(att_dB,Sh_R);
xlabel 'Attenuation dB'
ylabel ' Shunt resistor'
title ('Attenuation Vs Shunt resistor')
grid on
%% the characteristics of PIN diode Avago HSMP381X is plotted
% following paramters for the diode is defined
RMAX=12000;
RMIN=2.5;
A=0.0902;
K=0.987;
% the variable ressitor is calculated;
id=0.01:0.05:100;
R_var=A./((id./1000).^K);
% Total resistance of Pin diode
R_total=RMIN+((RMAX.*R_var)./(RMAX+R_var));
figure(3)
loglog(id,R_total)
grid on
xlabel 'Id mA'
ylabel 'Resistance ohms'
title (' Id VS Resistance of HSMP3186')
 | 
Pages: 1
Prev: coefficients of b-spline
Next: Perlin noise