Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

matlab modeling of mosfet current mirror(req)

Status
Not open for further replies.

ravitest

Advanced Member level 4
Full Member level 1
Joined
Feb 1, 2007
Messages
118
Helped
6
Reputation
12
Reaction score
4
Trophy points
1,298
Location
india
Activity points
1,977
matlab code for mosfet operation

hi, please help me, i wrote a matlab program for mosfet which shown below with result, then how can i use this code for generating of basic current mirror in matlab, please give me suggestions.




kn=1e-3; vt=1.5;
vds=0:0.5:12;
vgs=4:2:8;
m=length(vds);
n=length(vgs);
for i=1:n
for j=1:m
if vgs(i) < vt
cur(i,j)=0;
elseif vds(j) >= (vgs(i) - vt)
cur(i,j)=kn * (vgs(i) - vt)^2;
elseif vds(j) < (vgs(i) - vt)
cur(i,j)= kn*(2*(vgs(i)-vt)*vds(j) - vds(j)^2);
end
end
end
plot(vds,cur(1,:),'w',vds,cur(2,:),'w',vds,cur(3,:),'w')
xlabel('Vds, V')
ylabel('Drain Current,A')
title('I-V Characteristics of a MOSFET')
text(6, 0.009, 'Vgs = 4 V')
text(6, 0.023, 'Vgs = 6 V')
text(6, 0.045, 'Vgs = 8 V')
 

mosfet, matlab

Given a reference current you can calculate the VGS with this equation:
cur(i,j)=kn * (vgs(i) - vt)^2; (VDS=VGS for simple current mirror)
Then, use this VGS to the mirrored MOS device, the mirrored current can be calculated.

Be sure that the mirrored MOS device should operate at linear region (VDS>VGS-Vth), or else the mirrored current is not accurate as you want.
 

    ravitest

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top