基于Matlab的策动点阻抗快速综合库函数-微带线综合

基于Matlab的策动点阻抗快速综合库函数-微带线综合

参考书籍:

MICROWAVE AMPLIFIER AND ACTIVE CIRCUIT DESIGN USING THE REAL FREQUENCY TECHNIQUE

1、环境安装

下载RFPLSynth包,链接:https://github.com/Grant-Giesbrecht/RFPLSynth。在下载得到的文件中打开install.m文件并运行:

如果运行得到如下安装成功的结果,则安装完成:

这个包需要安装MSTD的Matlab依赖包,链接:
https://github.com/Grant-Giesbrecht/MSTD/tree/main

这个包可以帮助进行简单日常计算的 MATLAB 函数。许多(但不是全部)函数都侧重于基本电路方程和数据导入或处理。

同样在下载的文件中找到install.m文件并运行

如果运行得到如下安装成功的结果,则安装完成:

此外,RFPLSynth包中的Netlist文件的四百多行存在一些错误需要改正:

使用如下的代码进行部分替换即可,不然运行会报错(mt.table_title没有定义这个方法,且scaleNumUnit找不到这个函数):

matlab 复制代码
% Initialize table
				mt = MTable();
				% mt.table_title(title_str);
				mt.row(["Ref.", "Value", "Node 1", "Node 2", "Z0", "Stub Type"]);

				rowstr = "";

				for c=obj.components

					rowstr = strcat(c.ref_type, string(c.ref_num));
					% rowstr(2) = scaleNumUnit(c.val, c.val_unit, 'DecimalPlaces', precision);
                    rowstr(2) = strcat(string(c.val),c.val_unit);
					rowstr(3) = c.nodes(1);
					rowstr(4) = c.nodes(2);
					rowstr(5) = "N/A";
					rowstr(6) = "N/A";

2、微带线综合

matlab 复制代码
%=========================================================================%
% This example shows how to use Richard's extraction to realize a
% distributed element circuit from an impedance function. The impedance
% function must be in terms of te Richard's variable (t = j*Z0*tan(theta))
% rather than the laplace variable 's'. This example demonstrates circuits
% with both stubs and stepped impedance lines. This example replicates the
% example in Section 3,8,1 and 3,8,2 of "Microwave Amplifier and Active
% Circuit Design Using the Real Frequency Technique" by P. Jarry & J.
% Beneat.
%
% PROBLEM DESCRIPTION:
% Design a distributed element circuit realizing the input impedance
% functions:
%    1.         100*t^3 + 50*t^2 + 300*t + 30
%		Z(t) = -------------------------------	(Section 3,8,1 Ex.)
%                9*t^3 + 170*t^2 + 31*t + 30
%
%    2.               18*t^2 + 240*t + 30
%		Z(t) = -------------------------------	(Section 3,8,2 Ex.)
%                9*t^3 + 170*t^2 + 31*t + 30
%
% such that 't' is the Richard's variable.
%
% 
% Author: G. Giesbrecht
% Contact: grant.giesbrecht@colorado.edu
%
%=========================================================================%


% Define polynomial vectors
num_1 = [100, 50, 300, 30];
num_2 = [18, 240, 30];

den = [9, 170, 31, 30];

% Example from J+B Section 3,8,1
synth_1 = NetSynth(num_1, den);
synth_1.generate("Richard");

% Example from J+B Section 3,8,2
synth_2 = NetSynth(num_2, den);
synth_2.generate("Richard");

% Print Results
displ("Section 3,8,1 Example:");
displ(synth_1.circ.str());

displ(newline, "Section 3,8,2 Example:");
displ(synth_2.circ.str());


% 使用4GHZ的微带线,最高控制到4GHz,特性阻抗1欧姆
f=4e9;
fe=4e9;

we=2*pi*fe;
tau=pi/2/we;
%光速
c=299792458;
ele_l=360*tau*f;
l=ele_l/360*c/f;
disp(['此处使用在',num2str(f/1e9),'GHz下电长度为',num2str(ele_l),'°的微带线进行实现']);

%求解频率范围,单位GHz
f_start=0.1;
f_stop=4;
f_step=0.1;
%求解范围
freq_solve=[f_start:f_step:f_stop]*1e9;
%计算不同频率下的相移常数beta
beta=2*pi*freq_solve/c;
%转换到lamda域
lamda=1j*tan(beta*l);

%    1.         100*t^3 + 50*t^2 + 300*t + 30
%		Z(t) = -------------------------------	(Section 3,8,1 Ex.)
%                9*t^3 + 170*t^2 + 31*t + 30
num_num1=0;
for i=1:1:length(num_1)
    num_num1=num_num1+num_1(i).*lamda.^(length(num_1)-i);
end
num_den=0;
for i=1:1:length(den)
    num_den=num_den+den(i).*lamda.^(length(den)-i);
end
Zin=num_num1./num_den;
figure
plot(freq_solve,abs(Zin))


%    2.               18*t^2 + 240*t + 30
%		Z(t) = -------------------------------	(Section 3,8,2 Ex.)
%                9*t^3 + 170*t^2 + 31*t + 30
num_num1=0;
for i=1:1:length(num_2)
    num_num1=num_num1+num_2(i).*lamda.^(length(num_2)-i);
end
Zin=num_num1./num_den;
figure
plot(freq_solve,abs(Zin))

第一个案例的结果:

Matlab的Zin结果:

ADS结构:

ADS的Zin结果:

第二个案例的结果:

Matlab的Zin结果:

ADS结构:

ADS的Zin结果:

相关推荐
一个有温度的技术博主4 分钟前
网安实验系列四:信息收集-旁站、C段信息
网络
木下~learning12 分钟前
对于Linux中等待队列和工作队列的讲解和使用|RK3399
linux·c语言·网络·模块化编程·工作队列·等待队列
F1FJJ12 分钟前
Shield CLI 命令全解析:15 个命令覆盖所有远程访问场景
网络·数据库·网络协议·容器·开源软件
郝学胜-神的一滴18 分钟前
【技术实战】500G单行大文件读取难题破解!生成器+自定义函数最优方案解析
开发语言·python·程序人生·面试
愤豆22 分钟前
02-Java语言核心-语法特性-注解体系详解
java·开发语言·python
是翔仔呐37 分钟前
第13章 SPI通信协议全解:底层时序、4种工作模式与W25Qxx Flash芯片读写实战
c语言·开发语言·stm32·单片机·嵌入式硬件·学习·gitee
攻城狮在此44 分钟前
华为汇聚交换机DHCP中继配置
网络·华为
2401_878530211 小时前
自定义内存布局控制
开发语言·c++·算法
wjs20241 小时前
SQLite 子查询
开发语言
婷婷_1721 小时前
【PCIe验证每日学习·阶段复盘01】Day1~Day7 纯理论深度复盘
网络·程序人生·芯片·每日学习·pcie 验证·ic 验证·pcie学习