Академический Документы
Профессиональный Документы
Культура Документы
%%
% Here you specify the source impedance, the reference impedance and the
% load impedance. In this example the load |Zl| is modeled as a series R-L
% circuit. You could instead measure the impedance of the load and use
% that directly.
Zs = 50; % Source impedance (ohm)
Z0 = 50; % Reference impedance (ohm)
Rl = 40; % Load resistance (ohm)
L = 12e-8; % Load inductance (Henry)
%%
% Define the number of frequency points to use for analysis and set up the
% frequency vector.
Npts = 256; % No. of analysis frequency points
fLower = fc - (BW/2); % Lower band edge
fUpper = fc + (BW/2); % Upper band edge
freq = linspace(fLower,fUpper,Npts); % Frequency array for analysis
w = 2*pi*freq; % Frequency (radians/sec)
%%
% Use <matlab:doc('rf/smithchart'); |smithchart|> to create a Smith chart
% that shows plot the variation in the load reflection coefficient with
% frequency. Input reflection coefficient closer to center of the Smith
% chart means a better matching performance. This plot shows that the load
% reflection coefficient is far away from this point and so, there is an
% impedance mismatch.
fig = figure;
l = smithchart(GammaL);
set(l,'LineWidth',1.0,'Color','r');
legend('\Gamma_L');
%%
% You can confirm this mismatch by plotting the transducer gain as a
% function of frequency.
plot(freq.*1e-6,Gt,'r');
grid on;
title('Power delivered to load - No matching network')
xlabel('Frequency (MHz)')
ylabel('Magnitude (decibels)')
legend('G_t','Location','Best')
%%
% As the plot shows, there is approximately 10 dB power loss around the
% desired region of operation (295 - 405 MHz). As a result, the antenna
% needs a matching network that operates over a 110 MHz bandwidth that is
% centered at 350 MHz.
%%
% Use the constructor <matlab:doc('rf/rfckt.lcbandpasstee');
% |rfckt.lcbandpasstee|> to build the matching network. The impedance and
% frequency transformations are included in this for denormalization
% purposes. Please note that the topology demands an LP prototype that
% begins with a series inductor. If the topology chosen is an LC bandpass
% pi then you would begin with shunt C for the LP prototype.
Lvalues = zeros(N,1); % Preallaocate to store inductors
Cvalues = zeros(N,1); % Preallocate to store capacitors
Lvalues(1:2:end) = LCprototype(1:2:end).*Zs./(wU-wL); % Series L's (H)
Cvalues(1:2:end) = (wU-wL)./(Zs.*(w0^2).*LCprototype(1:2:end)); % Series C's (F)
%%
% The objective function used during the optimization process by
% |fminsearch| is shown here.
type('broadband_match_antenna_objective_function.m');
%%
% There are several ways to choose the cost function and some options are
% shown within the objective function above (in comments). The optimization
% variables are the first and last inductors, L1 and L5 respectively. The
% element values are stored in the variable |L_Optimized|.
nIter = 125; % Max No of Iterations
options = optimset('Display','iter','MaxIter',nIter); % Set options structure
L_Optimized = [Lvalues(1) Lvalues(end)];
L_Optimized = fminsearch(@(L_Optimized)
broadband_match_antenna_objective_function(MatchingNW,...
L_Optimized,freq,Zl,Zs,Z0),L_Optimized,options);
%%
% The optimized matching network improves the performance of the circuit.
% In the passband (295 MHz to 405 MHz), the input reflection coefficient is
% closer to the center of the Smith chart.
%%
% Plot the power delivered to load, with the matching network, using the
% <matlab:doc('rf/plot'); |plot|> method of the |rfckt| object.
plot(MatchingNW,'Gt');
hold all;
plot(freq*1e-6,Gt,'r');
grid on;
title('Power delivered to load')
legend('Optimized network','No matching network','Location','Best');
%%
% The power delivered to the load is approximately 1 dB down for the
% optimized matching network.
%%
L5_Initial = L_Initial(end)
L5_Optimized = L_Optimized(end)
%%
% There are a few things to consider when setting up an optimization:
%
% * Choosing a different objective function would change the result.
%
% * You can use advanced direct search optimization functions such as
% |patternsearch| and |simulannealband| in your optimization, but you must
% have the Global Optimization Toolbox installed to access them.
%
% A Low noise amplifier design example is covered in the second example
%
<matlab:helpview(fullfile(matlabroot,'toolbox','rf','rfexamples','html','broadband_
match_amplifier.html'));
% Designing Broadband Matching Networks (Part 2: Amplifier)>.
%%
close(fig);
%% References
%
% [1] RF Circuit Design, Theory and Applications, Reinhold Ludwig and P.
% Bretchko, pp 229-239,Prentice Hall, 2000.
%
% [2] Microwave Engineering, David M. Pozar, 2nd ed., John Wiley and Sons,
% 1999.
%
% [3] Broadband Direct-Coupled and Matching RF networks, Thomas R.
% Cuthbert, pp 31-33, TRCPEP, 1999.
displayEndOfDemoMessage(mfilename)