基于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结果:

相关推荐
不写八个5 分钟前
Python办公自动化教程(005):Word添加段落
开发语言·python·word
HEX9CF9 分钟前
【CTF Web】Pikachu xss之href输出 Writeup(GET请求+反射型XSS+javascript:伪协议绕过)
开发语言·前端·javascript·安全·网络安全·ecmascript·xss
赵荏苒34 分钟前
Python小白之Pandas1
开发语言·python
丶Darling.36 分钟前
代码随想录 | Day26 | 二叉树:二叉搜索树中的插入操作&&删除二叉搜索树中的节点&&修剪二叉搜索树
开发语言·数据结构·c++·笔记·学习·算法
两点王爷39 分钟前
使用WebClient 快速发起请求(不使用WebClientUtils工具类)
java·网络
人生の三重奏44 分钟前
前端——js补充
开发语言·前端·javascript
wusam1 小时前
螺蛳壳里做道场:老破机搭建的私人数据中心---Centos下Docker学习03(网络及IP规划)
运维·服务器·网络·docker·容器
平凡的小码农1 小时前
JAVA实现大写金额转小写金额
java·开发语言
yttandb1 小时前
重生到现代之从零开始的C语言生活》—— 内存的存储
c语言·开发语言·生活
我明天再来学Web渗透1 小时前
【hot100-java】【二叉树的层序遍历】
java·开发语言·数据库·sql·算法·排序算法