Dr. Binboga Siddik Yarman has published a fantastic reference on RF matching network theory and design: Design of Ultra Wideband Power Transfer Networks, by Wiley 2010

An excellent resource, I was using his (and Carlin’s, to be fair) powerful Real Frequency Direct Technique for synthesizing a broadband double matching circuit for some RF amplifiers. He provides a good number of examples of the techniques as well as an ample MATLAB code base for solving your own problems. After fishing around through a number of resources, I finally came across his work that essentially answered all of my questions. It’s a great book, hands down. I’ll purchase a copy after my library lease runs out since it’s great for my private library.

Unfortunately, there are some errors, both in the published first-edition text and the code distributed by Wiley here: http://www.wiley.com//legacy/wileychi/yarman/

While other errors may exists, I’m listing the ones I know of here, since I was unable to find any other reference to this required errata online. With any luck, this will save at least one other lucky soul from wasting as much time as I did tracking this down. If one were to download the example code and compare the run-time results of examples 11.1 and 11.4 with the plots/values listed in the book, they would find them significantly different. Here’s what’s wrong:

1. The MATLAB code available from Wiley calculates the impedance of an L + R||C circuit incorrectly. This is REALLY hard to track down because the code given in the 1st-edition book is actually correct! The affected MATLAB function is: RLC_LOAD and the corrected implementation is as follows. Don’t forget to change this in each example directory you work with (read: there is a copy of this in each example folder 11.1 and 11.4)

function [RL,XL]=RLC_Load(w,R,C,L,KFlag) % function [RL,XL]=RLC_Load(w,R,C,L,KFlag) % This function generates the impedance data for a given R//C load % Inputs: % w,R,C,L,KFlag % Generate the load impedance % Errata by me@ryaneguerra.com p=sqrt(-1)*w; % Errata: this used to be YL=(1/R)+1/C/p; YL=(1/R)+C*p; ZL=p*L+1/YL; if KFlag==1;% Work with impedances RL=real(ZL); XL=imag(ZL); end if KFlag==0;%Work with admittances % Errata, the following line was not present: YL = 1/ZL; RL=real(YL); XL=imag(YL); end

2. The second problem is that the intermediary results published in the 1st-edition book have incorrect imaginary-part values. This makes it very hard to track down the problem. Specifically, the values given for {RLA, XLA} on the top of page 545 are wrong. To the best of my knowledge, the correct values should be the following. If you get these values, then the plots later in the example match what is published in the 1st edition.

RLA = 1.0000 0.7353 0.4098 0.2358 0.1479 0.1000 0.0270 XLA = 0 -0.2412 -0.0918 0.1755 0.4450 0.7000 1.8378

3. The third typo is on page 583, where step-by-step inputs to the example 11.6′s program are given. RGen=1, CGen=2, and LGen=0.3 are the correct values according to Figure 11.23.

4. While the book claims to use the MATLAB implementation of the Levenberg-Marquardt algorithm for non-linear optimization of the driving immitance function in the dual-matching problems, the default algorithm according to the MATLAB website is ‘trust-region-reflective’: http://www.mathworks.com/help/toolbox/optim/ug/lsqnonlin.html In order to explicitly use the Levenberg-Marquardt algorithm, one should adjust to optimization parameters:

OPTIONS = optimset('Algorithm','levenberg-marquardt','MaxFunEvals',20000,'MaxIter',50000);

5. The given initial values to Example 11.6 do not yield an optimal result as shown in the textbook, at least with my MATLAB 2012a installation. I tried the following initial values and was able to get the given optimal TPG plot:

c0 = [1, 1, -1, -1, 1]; % c0 = [-1, -1, -1, -1, 1]; % the old init value

Apparently the algorithm is quite sensitive to initial conditions–it’s very easy to get stuck in a local minimum, resulting in a poor or physically un-realizable result.

August 9, 2012 – After a lot of experience modifying this code and applying it to my problem, I found that the initial conditions are incredibly important. In my case, I was able to brute-force the initial conditions for my particular problems, since they weren’t that hard. I saw a large difference in the optimization results based on the initial c0 vectors.

6. On page 623, two equations are given to denormalize the component values. The one dealing with capacitance is incorrect. Follow the instructions on page 490, instead.

I have notified Dr. Yarman of these errors, but now this is a Google-able list of errata. He actually replied with a sheet of known errata for earlier sections of the book, if anyone would like. He was very supportive of our efforts to find and correct any bugs.

I definitely have to give credit to my good friend Naren Anand for helping me track some of these down!