基于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: [email protected]
%
%=========================================================================%


% 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结果:

相关推荐
宋一平工作室8 分钟前
单片机队列功能模块的实战和应用
c语言·开发语言·stm32·单片机·嵌入式硬件
豆豆(设计前端)21 分钟前
在 JavaScript 中,你可以使用 Date 对象来获取 当前日期 和 当前时间、当前年份。
开发语言·javascript·ecmascript
freyazzr1 小时前
TCP/IP 网络编程 | Reactor事件处理模式
开发语言·网络·c++·网络协议·tcp/ip
电院工程师1 小时前
SM3算法Python实现(无第三方库)
开发语言·python·算法·安全·密码学
YuTaoShao1 小时前
Java八股文——MySQL「存储引擎篇」
java·开发语言·mysql
AI风老师1 小时前
通信网络基础概念
开发语言·网络·php
王德博客1 小时前
【Java课堂笔记】Java 入门基础语法与面向对象三大特性详解
java·开发语言
wkj0011 小时前
接口实现类向上转型和向上转型解析
java·开发语言·c#
边啵儿2 小时前
如何确定某个路由器的路由表?(计算机网络)
网络·计算机网络
勤奋的小王同学~2 小时前
(功能测试Charles)如何抓取手机http的报文
网络·网络协议·http