⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 3105030036_q3.m

📁 电路模拟的例程 包括图形 仿真的说明 欢迎大家下载
💻 M
字号:
%-----------------------题  目  3-----------------------
clear, close all, format compact
Us=72; R1=5000; R2=7500; L=2.5; C=1e-7;   % 给出原始数据
R=R1+R2;
dt=0.00001; t=0:dt:0.01;                  % 设定时间数组
uc0=Us; iL0=0;                            % 算出初值iL0及uc0
Va0=uc0+iL0*R1                            % 算出初值Va0
disp('dVa/dt初值(初值计算)=');
dVa=-iL0/C-R1*(uc0-(R1+R2)*iL0)/L;        % 算出初值dVa/dt
disp(dVa)
num=[uc0, R/L*uc0+iL0/C];                 %uc(s)的分子系数多项式
den=[1, R/L, 1/L/C];                      %uc(s)的分母系数多项式
[r,s,k]=residue(num,den);                 % 求极点留数
ucn=r(1)*exp(s(1)*t)+r(2)*exp(s(2)*t);    % 求时域函数 
iLn=C*diff(ucn)/dt;                       % 对ucn求导得到电流iLn
iLn=[iL0,iLn];
Va=ucn+iLn*R1;                            %计算Va的值
dVa=diff(Va)/dt;                          %通过差分计算初值dVa/dt
disp('dVa/dt初值(差分计算)=');
disp(dVa(2));
subplot(3,1,1), plot(t, ucn), grid        %绘图
xlabel('t'),ylabel('ucn')
subplot(3,1,2), plot(t, iLn), grid
xlabel('t'),ylabel('iLn')
subplot(3,1,3), plot(t, Va), grid
xlabel('t'),ylabel('Va')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -