|
发表于 2024-5-10 19:29:49
|
显示全部楼层
clear all;
clc;
% Series resonant circuit model of montional osillation
syms wm fm Lm Cm Rm Q real;
fm=4.0e6;Cm=5.0e-15;Rm=600.0;% Designer specified parameters:motional resonant frequency,motional capacitance and motional resistance
wm=2*pi*fm;% Calculate motional resonant angular frequency
Lm=wm^-2/Cm;% Calculate motional inductance
Q=1/(wm*Cm*Rm);% Calculate quality factor
%
% Ocillator circuit model
syms Rf C3 C1 C2 Cload gm real;
Rf=1e6;
%gm=34.5e-3;
C3=5.0e-12;C1=16.0e-12;C2=16.0e-12;
Cload=C1*C2/(C1+C2);
% Actual ocillation angular frequency
syms w f;
w=wm*(1+Cm/(2*(C3+Cload)));% Calculate actual ocillation angular frequency
f=w/(2*pi);
% The mount of frequeancy pulling above wm
syms p real;
p=(w-wm)/wm;
% Motional impedance
syms Zm;
Zm=Rm+i*2*p/(w*Cm);
% Oscilator circuit impedance
syms Zc Z1 Z2 Z3;
%Z1=1/(i*w*C1);Z2=1/(i*w*C2);Z3=1/(i*w*C3+1/Rf);% Rf
Z1=1/(i*w*C1);Z2=1/(i*w*C2);Z3=1/(i*w*C3);% For lossless circuit
Zc=(Z1*Z3+Z2*Z3+gm*Z1*Z2*Z3)/(Z1+Z2+Z3+gm*Z1*Z2);
% Transconductances
syms gm_crit gm_max gm_opt Rneg Rneg_max real;
Rneg=real(Zc);
gm_opt=solve(diff(Rneg),gm);
gm_opt=double(gm_opt(2));
%gm_opt=w*(C1+C2+C1*C2/C3);
Rneg_max=double(subs(Rneg,'gm',gm_opt));
%Rneg_max=-1/(2*w*C3*(1+(C1+C2)*C3/(C1*C2)));
double(solve([Rneg==-Rm],[gm]));
gm_crit=ans(1);
%gm_crit=(w*(C1*C2+C2*C3+C3*C1)^2)/(Q*Cm*C1*C2);
gm_max=ans(2);
clear ans;
%Actual gm and Rneg
gm=0.1e-3:0.1e-4:300.0e-3;
Rneg=double(subs(Rneg,'gm',gm));
figure(1);
semilogx(gm,Rneg,'r');grid on
xlabel('gm(mS)');
ylabel('Negtive Resistance(ohm)');
title('Negtive Resistance VS. gm');
hold on
xlim=get(gca,'Xlim');
plot(xlim,[min(Rneg),min(Rneg)],'b')
plot(xlim,[-Rm,-Rm],'c');
ylim=get(gca,'Ylim');
plot([gm_crit,gm_crit],ylim,'k--');
plot([gm_opt,gm_opt],ylim,'k--');
plot([gm_max,gm_max],ylim,'k--');
clear xlim ylim;
text(gm_crit,-Rm,['(',num2str(1000*gm_crit,'%.2f'),'m,',num2str(-Rm,'%.0f'),')',newline]);
text(gm_opt,Rneg_max,['(',num2str(1000*gm_opt,'%.2f'),'m,',num2str(Rneg_max,'%.0f'),')',newline]);
text(gm_max,-Rm,['(',num2str(1000*gm_max,'%.2f'),'m,',num2str(-Rm,'%.0f'),')',newline]);
legend('Negtive Resistance','Max Negtive Resistance','Motional Resistance','Location','Best');
|
|