MIMP, Advanced Design Studio, scikit-rf

I was searching for a program to match RF circuits. I already calculated input complex impedance and choose pi filter as topology.

First I looked Motorola Impedance Matching Program. It is really old program, runs in Dosbox and is quite awful. User interface is manageable after reading the manual couple of times. Got the filter values from the program, but I'm not sure in these since I'm not sure I used it correctly. But in its free and cross platform so, why not use it.

I also tried Agilent Advanced Design Studio, but yea, it is meant for full time RF engineers. It looks like it can do everything. Usability is almost okay, feels inconvenient like ltspice.

Next I tried to simulate the circuit with scikit-rf. Importing the network worked fine, but the easy part ended there. To make components I first needed to make Media. There was no lumped element Media, so I took the one easiest to use - Freespace. Also the connections don't sound really correct.

#Program accepts one argument - C1 value in picoFarads of PI filter. 
#It outputs transistor output impedance (calculated from amp.s1p file) 
#and a graph showing preferred PI filter component values.
import matplotlib.pyplot as plt
from pylab import *
plt.ion()

import skrf as rf
rf.pico = 1e-12

import sys

#amp that we are matching only S22
amp = rf.Network('amp.s1p')

print amp.z

#we need media to make components. weird
media = rf.media.Freespace(amp.frequency)

def get_db(C1, L, C2):
   #pi filter begin
   C1 = media.shunt_capacitor(C1*rf.pico);
   L = media.inductor(L*rf.nano)
   C2 = media.shunt_capacitor(C2*rf.pico);

   filter = rf.connect(rf.connect(rf.connect(amp,0,C1,0),0,L,0),0,C2,0)
   return filter.s_mag[0][0][0]

print get_db(10,22,7)

out = []
for L in range(1,15*3,3):
   out.append([])
   for C2 in range(1,15*2,2):
      out[-1].append(get_db(int(sys.argv[1]),L,C2))

#raw_input()
#print out
figure()
title('Pi matching network, C1 = '+sys.argv[1]+' pF')
imshow(out)
xlabel('C2 value [pF]')
ylabel('L value [nH]')
xticks(range(15), range(1,15*2,2))
yticks(range(15), range(1,15*3,3))
cbar = colorbar()
cbar.set_label('Return Loss Magnitude')
grid(False)

show()

raw_input()
PI filter values in respect of output reflected power.

PI filter values in respect of output reflected power.

And this program provides graph you can see on the right. Really nice graph what in theory should show right values. I like how I can look at the graph and pick values that exists in the shop and see how effective filter would be. But again, I can't verify these values on other tools so there is probably small miscalculation in my code.

2 thoughts on “MIMP, Advanced Design Studio, scikit-rf

  1. Thank you for this link. This guy has several really useful programs that I have been looking for.

Leave a Reply

Your email address will not be published. Required fields are marked *