Ladpac-2002 August 11, 2002, December 7, 2002. Contents 1. General Information. 2. LowHi.exe: Design of LC low pass and high pass filters. 3. GPLA.exe: General Purpose Ladder Analysis. 4. DTC.exe and TTC.exe: Double and Triple Tuned Circuits. 5. LadBuild.exe: Assembling and editing for ladder filters. 6. XLAD.exe: Crystal Ladder bandpass filters. 7. FINETUNE.exe: Adjusting the frequency of individual meshes in a crystal ladder filter. 8. BiasNPN.exe: Biasing of an NPN transistor. 9. FBA.exe: Design of single transistor feedback amplifier. 10. Cascade: Evaluation of a cascade of up to 10 stages for cascaded noise figure and third order IMD. 11. Impedance Matching 12. A 14 pole crystal filter case study. 1. General Information. Ladpac is short for "Ladder Package," representing a package of circuits primarily aimed at the design and analysis of ladder filters. A few other programs (NPN_Bias, FBA, Cascade) are included even though they are outside the central ladder theme. 1.1. System Requirements: This software was written for use on a computer using Windows 95, 98, ME, or Windows NT. The system should have 5 Meg of RAM or more, with another 5 Meg available on a hard disc for storage of programs and files. An Intel Pentium processor with a speed of 200 MHz or greater is recommended, although we often use the programs on a slower machine. A monitor set for a color display with a resolution of 640 x 480 (or more) is required. Early versions used much greater screen resolution, but the final programs were written to accommodate the less demanding display. 1.2. Installation. Run setup.exe and follow the on-screen directions to install the software. Many of the programs within LADPAC will read from or write to the disc. The filter design programs will generate output files that can then be read by the analysis program, GPLA. Circuits can be further edited with LadBuild.exe. 1.3. General characteristics. The various programs have many similarities in the way they function. We will list some of the common characteristics as an aid to understanding their use. Generally, the methods that we expect from the Microsoft Windows © environment are used. 1.3.1. The programs were written in Delphi 3.0 from Borland. This was our introduction to this environment, one that turned out to be a very positive experience. A very small subset of the available performance of Delphi is used here. 1.3.2. All programs have data in them as a default and will run, generating useful (we hope) data with but a few mouse clicks. For example, when the biasing program, BiasNPN is run, a schematic diagram appears. Move the mouse cursor to the "Calculate" button and (left) click. This produces a readout of the currents and voltages within the circuit. 1.3.3. Input parameters, shown initially as default values, are all changed merely by moving the mouse to the box with the input data. Again using BiasNPN as an example, move the mouse cursor over the 510 Ohm emitter resistor box and double click. This causes the entire "510" entry to be highlighted. It is then replaced by typing a new value. The results are updated by again clicking "Calculate." As an alternative to direct editing, the emitter resistor in BiasNPN can be increased or decreased by 5% by clicking on small boxes next to the value window. 1.3.4. The window containing the operating program can be minimized without disturbing any of the data in it. The buttons at the upper right of the window are used, just as with any windows program. It is often useful to have more than one of the LADPAC programs running at a time. 1.3.5. Many of the programs use a sequence of commands. These are numbered and should be executed in order. However, if you wish to try something different, go back and change an input parameter. Then click on all of the buttons from the change forward. 1.3.6. All of the programs use more than one window. The other windows are activated by clicking on an indicated button in the active window. For example, clicking on the "About Bias" in the upper left part of BiasNPN will cause a window to be shown with program copyrights and the like. Another button in that window causes a return to the main window. 1.3.7. Most programs allow a file to be saved for further analysis. This is done by clicking on File in the upper left corner of the display window, a characteristic of virtually all Windows programs. Once into the File menu, click on the SAVE-AS button. This will bring up a dialog box showing a listing of files of the type related to the program. You can use an open-ended format for naming files. (If you save files in the older DOS format [8max.3max characters], they can be analyzed with G87.exe, a DOS program distributed with "Introduction to Radio Frequency Design," 1994, ARRL.) 1.3.8. Files are opened from the File menu in those programs where files are read. Opening is much like the SAVE-AS operation described. 1.3.9. When a program is finished, it can be closed with the usual "X" in the upper right of the window, or by clicking on "exit" in the File menu. 1.3.10. We urge you to open any of the programs and merely play with them to gain intuition about their operation, and more important, about circuit behavior. Use the programs interactively by designing a filter in one program, then examine the result in the LadBuild editor, and finally analyze the results in the General Purpose Ladder Analysis program. 1.3.11. The units used in LADPAC are Ohms, picofarad, nanohenry, and MHz. Crystal filters use Hz for frequency, but always referenced to a crystal nominal frequency in MHz. 1.3.12. It may be useful to print these instructions so you can read them while running the programs. 1.3.13. The programs within LADPAC include no specific printing routines. However, obtaining a printout is relatively easy within the Microsoft Windows environment. If you wish to make a record of any screen shown at a point in time, press the print-screen command. (Printers should be off at that time.) This causes the entire screen image to be copied to the Windows clipboard. Then minimize the running program and open the standard Windows "Paint" program. When that is open, paste into it. (Click Edit, followed by clicking on Paste, or key in Ctrl-V.) This view can then be saved, as it stands. Alternatively, the PAINT program can be used to crop the display. The result can be saved as a .GIF or .JPG file and sent over the internet, or can be printed. 1.3.14. Above all else, remember that these programs are all simple examples using simple models. The results represent the limitations of the circuit models which may be nothing more than an approximation to physical reality; that is the way of all science. These programs are intended to supplement the data within the book "Experimental Methods in Radio Frequency Design." They are not intended to be used alone without the additional information provided by the text. 1.3.15. These programs are a part of the text and should not be distributed to friends or colleagues. 2. Low_High: Design of LC low pass and high pass filters. This program is used to generate LC low pass and high pass filters. The program is started by double clicking it from Windows Explorer and following the numbered instructions. You will have to pick the number of elements in the filter, and the allowed passband ripple. Default values of 5 and 0.1 are built into the program. Clicking the first button, labeled "Generate G(n) table," then generates the normalized data for that Chebyshev filter. A Butterworth filter will be designed if a ripple of 0 is entered. A value is also calculated showing the ratio of the 3 dB cutoff to the ripple cutoff frequencies. This value is useful with other programs. Next, specific data is entered about the filter you wish to design. This includes the 3 dB cutoff frequency and the terminating impedance at the load end of the filter. A box is also available for unloaded inductor Q. Although this has no impact on the design, it is vital for later analysis. You will then select between a low and a high pass response, and decide if the first component at the load will be parallel or series connected. Then click on "Design Filter" and the resulting component values are shown in the "memo box." If you had elected to design an even ordered Chebyshev filter, the termination resistance at the source will also be calculated. A design can be saved to disc for later analysis upon completion of the design. This program is restricted to filters up to the 30th order, much more than most of us need. The filters designed here are a subset of a greater possible collection of Chebyshev and Butterworth filters with a wide variety of terminations. 3. GPLA: General Purpose Ladder Analysis. GPLA is the central program for the LADPAC collection. It allows the user to calculate the gain and input impedance match magnitude for a wide variety of filters that fit into the "ladder" category. The elements that can be placed in the ladder include capacitor, inductor, resistor, crystal, and wire. The "wire" is nothing more than a default connection that extends to a termination. Also included are duplicate capacitors, inductors, and resistors, components that are linked or "ganged" to other parts in a filter. A default filter circuit is included within the program. We will use this data as a "guided tour," a means of illustrating the program operation. Begin by calling the program by double clicking it from Windows Explorer to show a complicated screen filled with buttons. Start by clicking on the "Plot" button on the left side of the window. The response for the default circuit immediately appears, showing the gain (S21) in red and the return loss at the source (S11) in blue. If you do not wish to show the return loss, un-click the checked S11 box near the bottom right of the screen. The default circuit is a 7 MHz double tuned circuit with the sweep set for 0 to 25 MHz. You can see the response in greater detail by changing the sweep parameters for a 5 to 12 MHz sweep with 1 MHz per division graphed. This is done by editing the values in the "Frequency" row, below the plot. After the editing, click "Plot" again to see the update. You can also alter the vertical resolution, especially useful if you want to look at the passband details. If a positive number is entered to represent the screen bottom, it will be converted to a negative one. The top is always 0 dB. Zoom capabilities are built into the program. While viewing the response, move the mouse cursor onto the graph. Assume you wish to view the response between 6 and 8 MHz to the -60 dB point. Move the mouse to 6 MHz and press the left mouse button. Then drag the mouse to the right, keeping the button pressed, until the mouse is at 8 MHz and -60 dB. Release the left mouse button to create a new sweep. It would also have worked if you had started the new sweep rectangle at 8 MHz with an end at 6 MHz. You can continue to zoom. When there is no more insight to be extracted, click on the "zoom to original sweep" button below the graph. Because the top of the screen is always 0 dB, the rectangle used during zoom is always close to the top, even when the mouse does not start there, making zooming an easy operation. Try to stay inside the graph border when marking a region for zooming. A cursor can be used with the graph. To place a cursor on the graph, first click on the "Place Cursor" button below the response. Then put the mouse cursor inside the graph and click at the frequency of interest. A vertical cursor line (dashed red) is then drawn on the graph, and the frequency and gain response are shown below the graph on the cursor line. Cursor frequency is maintained with zoom or value change actions that may follow. The cursor can be replaced or moved with another "Place Cursor" action, or eliminated with the "Reset Cursor" button. Placing a cursor with the mouse is one way to activate the function. Another is to merely edit the frequency in the Cursor Data box. Type "7" in this box and then click on the PLOT button. This generates a cursor exactly at 7 MHz. We can examine the components in our filter by clicking on the "Click to Review Circuit" box. This then shows the circuit elements including the terminations and the global inductor Q. Any of these values may be changed. If, for example, you wish to change the capacitor that is the 4th element in the circuit, enter 4 for N and a new value in the "New Value" box. Then, clicking the "Enter new value and Click" button will change the circuit and reprint the circuit description. An independent 1500 nH inductor is shown as part 3. However, part 6 is shown as a "dupe ind," which is the program code for a duplicate inductor. The "value" shown for part 6 is 3, indicating that part 6 is a duplicate of part 3. Part 4 is a capacitor that tunes the first inductor while part 7 is a "dupe cap," a duplicate capacitor. Duplicate components "gang" or link the values to each other. If capacitor 4 is changed, that at 7 moves along with it. Try changing part 4 and re-sweeping by again clicking Plot. We have made several changes that could complicate this description. Let's fix that by clicking on the Exit in the File menu. Again restart the program and change the sweep back to the previous 5 to 12 by 1 MHz. Let's now save this circuit by calling the File | Save-As menu, using the file name gpladef.cir, and click on the "Save" button. The circuit is now on the disc for later use by GPLA. It is also available for viewing in the "LadBuild" program, discussed later. You can now call the File | Open menu and open the file. This causes the existing plot to be erased. When a file is opened, the name of that file appears in a data box in the "Frequency" row. If the file description is so long that it cannot all be seen in the box, place a cursor within the box with the mouse. Then move the cursor with the keyboard left or right arrow keys. GPLA includes a "tune" capability, controlled in a box at the bottom of the GPLA window. The default has part 4 selected for tuning in 5% steps. Click on the "Up" button, causing the capacitor value of part number 4 to go up by 5%. This causes a new sweep to be generated. Actually, both capacitor 4 and the duplicate capacitor #7 are increasing in this example, for #7 is a duplicate. If circuit data was present in the review window, that data would disappear with the new sweep. But the new value of part 4 is now shown in the Tune box. Often when tuning it is useful to know what the response had been at an earlier time. Click on the box labeled "Save S21 as ref." This is located just above the Value Tune Mode box. This click causes whatever gain data is present in the plot to be stored in computer memory. Near this "save" button is another button labeled "plot reference." Check this box and then click on the Plot button. Note that the reference is now plotted in maroon while the newly tuned response is shown in red. (Click a Tune Up button to generate a different plot.) S11 data is not saved as a reference. If you zoom in after having started a sweep with a comparison plot, the reference disappears. Activating the "Plot Reference" button again still generates the original plot. The reference values are not altered by a zoom operation. Let's return to the tuning box. The increment, defaulted as 5%, can be changed. Tuning the capacitor value "up" will make the response move down in frequency in this example. The reference display is very useful for comparing two different plots. This will be illustrated with two files that should already be on your hard disc, having been copied during installation. Start by loading DTC0.cir into GPLA. This is a double tuned circuit that was designed with DTC.exe. As soon as the file is loaded, click Plot to get a plot of the file, then click the "Save S21 as Ref." Button. With that response now residing in memory, go back to the File menu and load another circuit, TTC0.cir. This circuit is a triple tuned circuit, a bandpass filter with 3 resonators. Both filters have the same bandwidth of 0.25 MHz, but the improved skirt response of the triple tuned filter is evident. Be sure that "Plot reference" is clicked, and click the Plot button to show the two responses. Both of the circuit files contained sweep data, causing the sweep to extend from 5.75 to 8.25 MHz. Generally you will have to take care of these details when making a valid comparison. The reference (maroon) sweep is nothing but data that has already been calculated and will not change if sweep parameters are adjusted with a zoom. GPLA will also plot the response of crystal filters. An included file is named X5.cir. Load this into GPLA and click the Plot button. You may have to "un-click" the "show reference" plot button, for early data may still be present. The frequency has now shifted to units of Hz instead of MHz. The frequencies shown in plots and tables are referenced against the nominal crystal series resonant frequency which shows up in the data presented in the circuit review box. Reviewing the circuit of a crystal filter shows a value for each crystal. These values are frequency offsets for each crystal. While this would, ideally, be the offset with respect to the ideal series resonance, it is sufficient in practice to insert a value that is an offset with respect to an average, or a maximum. X5, the circuit we just loaded, is for a filter with 5 crystals. The offset value for each crystal is 0, the result generated by XLAD, the crystal filter design program. The designer can now insert practical measured values. Later, we will discuss the tuning of such filters when offsets exist. The "global" crystal parameters are listed for the parts in the crystal filter and can be changed with editing. For example, try changing the crystal Q to a much lower value of 20000. Some details: GPLA was written using a scheme known as "the ladder method," with details presented in "Introduction to Radio Frequency Design," ARRL, 1994. This method is generally quite fast compared to matrix methods. (This made a big difference when our computers were slower, but is of little consequence now.) The ladder method is not as powerful as other techniques, and is not suitable for amplifier analysis. But the method is exact within the constraints of our ideal L, C, and R component models. We have chosen to assign a uniform unloaded Q to all inductors within a circuit. Capacitors are assumed to be lossless. All crystals within a circuit are assumed to have an identical unloaded Q, and identical parallel C values. 4. DTC and TTC: Double and Triple Tuned Circuits. These two programs are more than cousins; they are almost identical to each other. DTC and TTC are for the design of double and triple tuned circuits. Like other programs within LADPAC-2002, these begin with built in defaults. In this case, it's a 7 MHz bandpass filter with a 0.25 MHz bandwidth. It uses 1500 nH inductors with unloaded Q of 250. These values are all changed with editing. In both DTC and TTC, the coupling and loading coefficients are set to generate Butterworth filters. The programs are easy to use by merely following the numbered instructions. We begin by describing the filter in terms of center frequency, bandwidth, inductor characteristics, and termination. After the parameters are in place, click on Begin Calculation. The program now displays two parameters. One is the "nodal capacitance," which is merely the C required to resonate the chosen L at the center frequency you picked. The other is the minimum series capacitance needed to couple from the load to the end resonator. The next step requires you to enter a series capacitor. This choice is largely dictated by what is available. You can retain the default shown, which is the text "min" which forces use of the minimum number of parts. But you can enter a value larger than the minimum. This then causes the program to calculate the value of the shunt end capacitor to be used. After a value is entered, click on "Finish Design" and see the resulting filter. Among the data supplied is an estimate of the filter insertion loss. You will get a better value by performing a simulation in GPLA, but this is still useful for typical filters. This value is very inaccurate for very lossy filters with IL over 10 dB or so. If you go through the program several times you can design the filter to be compatible with available components. We will illustrate this with DTC, starting with the built-in default 7 MHz filter. Quickly clicking on the Begin and Finish buttons creates a design with a coupling capacitor of 8.7 pF, certainly not a standard. However, we can change some parameters to force the coupling capacitor to 10 pF. The first thing we try is changing the bandwidth. Increasing B to 0.29 MHz and again clicking on Begin, followed by Finish, generates a 10 pF coupling capacitor between resonators. But assume that the wider bandwidth is not compatible with our application. So, we drop B back to 0.25 MHz and decrease L. The coupling capacitor becomes 10.04 pF (use 10 in practice) when L is 1300 nH. If we now pick a series end capacitor of 100 pF instead of using the "min" value, we end up with 498 pF shunt capacitors at the ends. This exact value will not be critical and we could use standard 510 or 470 pF parts. Remember to re-click "Finish" if changes are made to the series capacitor after an initial design is modified. There is some virtue in including the shunt end capacitors. It will improve the vhf stopband performance of the filters, which can be easily observed with GPLA. It is often useful to have different terminations at the two filter ends. This is easily done with the various programs available in LADPAC. Assume we need a filter with a 50 Ohm input termination, but an output termination of 3000 Ohms, perhaps the input of an integrated circuit. We first design the filter for 50 Ohms. We use an inductance of 2700 nH with a bandwidth of 0.24 MHz to generate a filter with a coupling capacitor of 4.64 pF. We will use 4.7 when we build the filter. We pick series end capacitors of 47 pF and get a working filter with shunt end caps of 210 pF. The tuning capacitor across the inductor is 142 pF. (Jot this schematic down on a scrap of paper.) We now go back and change the termination to 3000 Ohms. Re-click BEGIN and see a new min C value. Enter 10 pF for the series C and Finish. The result is a filter with the same 4.64 pF coupling capacitor, but end caps of 10 pF series and 2.17 (use 2.2, a standard) shunt, and 183 pF tuning capacitors. Jot this schematic down too. With this information on hand, we can save one of the two filters we have just designed and take it into GPLA. Pick the one with the 3000 Ohm termination and use a file name of dtc3k.cir. We load this into GPLA and examine the result, seeing an expected result. We now go into the part value editor part of GPLA and change R-load to 50 Ohms and the three capacitors closest to the load to the capacitors from that part of the circuit. The result is identical to the equally terminated filter. There is a subtlety here: When very high impedances are encountered, we loose some of the freedom we expect in designing these filters. For example, if you try the double tuned circuit with default values and a 1300 nH inductance, you find that an error message occurs when a 3000 Ohm termination is used. This indicates an impossible filter. But going to slightly higher inductance produces a viable design. The filter we ended up designing used 2700 nH inductors. We could build this filter with standard components, although it is vital to use a valid Qu value. This is important in both analysis with GPLA and during the design process with DTC or TTC. 5. LadBuild: This program is a general purpose editor, allowing modification of existing circuits or construction of new ones. Once the circuit is drawn in LadBuild, it can be saved to disc for analysis in GPLA. The components allowed are capacitors, inductors, resistors, duplicate capacitors, duplicate inductors, duplicate resistors, crystals, a return loss bridge, and wires. All crystals within a circuit must have an identical nominal frequency, unloaded Q, and parallel capacitance. However, each crystal frequency can be offset from the specified series resonance with the offset, in Hz, being the "value" related to the part. A blank screen appears when LadBuild is started. However, clicking anywhere within the drawing area with the mouse causes a default (nonsense) circuit to appear. Clicking on any part of the circuit causes a cursor dot to appear over the part. The number of that part is shown at the top of the drawing while the component value is shown at the bottom. The values are printed within the schematic below the component symbol. A selected component can be altered by keying in a new value at the drawing bottom. It can also be changed to a completely new component type by clicking on the desired new part (C, L, R, RLB, or Xtl.) Values are "fixed" by clicking anywhere with the mouse. Components can be toggled from a series or parallel placement with a button near the screen bottom. A "wire" can be inserted into the circuit at either the load end or just after a marked part. A part can be deleted from the circuit, or changed to become a duplicate of another part. Files are loaded and/or saved with the same methods used with the other LADPAC programs through the File menu. The duplicate elements are especially useful, for they allow values to track each other. It is not necessary that a duplicated part have the same connection as the parent. But, be careful not to declare a duplicate of another duplicate when using this feature. Several global parameters are included within the file. These can be reviewed with a suitable button at the bottom of the Ladbuild window. Note that the numbering of parts we use throughout the series of programs begins with the load end of the filter. This was a natural consequence of the ladder method (IRFD, p 51). All of the filters we deal with are bi-directional. Once a circuit has been edited, it should be saved via the File menu. If you now click the button named "Write Summary File," a text file is created that completely describes the circuit. If the circuit had been saved as "junk.cir," the summary file would then be "junk.cir.txt" . Double clicking this file from Windows Explorer will evoke "Notepad" and display the text. You can add comments at that time. If you write a summary before saving, you will generate a file named "not_yet_saved.txt." 6. XLAD: Crystal Ladder bandpass filter design. This program is aimed at the design of crystal filters of the lower sideband ladder type as described in EMRFD, chapter 3. Filters used in several places in the book were designed with this program, or the earlier DOS equivalent. The program is structured for use with tables of normalized coupling and loading, or k and q. A good source is the classic text by Zverev, "Handbook of Filter Synthesis," Wiley, 1967. A subroutine is included for calculation of k and q parameters for Butterworth and Chebyshev filter shapes. The program begins with data about the crystals to be used in the filter. A crystal motional inductance and capacitance are measured with a frequency counter and an oscillator that includes a switched capacitor in series with the crystal. Parallel capacitance is measured with one of several methods operating at low frequency, well away from crystal resonance. The measurements are described in Chapter 7. Some assumptions are made for the filter design. First, we assume that all crystals are on the same frequency. This is rarely possible, but it is a reasonable starting point. A later program, FINETUNE, will facilitate departures. Second, we assume that all crystals have identical unloaded Q and parallel capacitance. This is a reasonable assumption when the crystals are from the same manufacturing process. This represents the example when a batch of crystals of one type from one manufacturer is purchased from a catalog. The filter design is a six or seven step process. The first step is to enter global crystal data at the top of the window including nominal frequency, followed by clicking on button 1. Next, a filter bandwidth and order (number of crystals in filter) is picked and entered into the program with a click of button 2. The next step will not be used if you plan on entering k and q data from a table. However, if a Butterworth or Chebyshev filter is to be designed, click on button 2A. This takes you to a different screen where the k and q data will be generated. Normalized k and q data for up to 20 element filters can be generated here. However, the basic program is confined to 10th order filters. Don't use step 2A if you already have k and q data in place that you plan on using, for activating 2A erases that k data. The default k and q data built into the program is for a Gaussian-to-6 dB filter shape with 5 crystals. This is a filter we have built and used for spectrum analysis purposes as well as in receivers. This shape lacks the component symmetry of Butterworth and Chebyshev filters. Step 3 enters normalized end section q data, followed by a click of button 3. Then, step 4 denormalizes the data at the filter ends. The designer picks a terminating impedance to enter, followed by clicking button 4. If you pick a value that is too low, an error will be issued. Pick a higher value and try again. When this step is successful, shunt end capacitors will be calculated and displayed in the box at the mid right part of the window. The two capacitors will be equal for equally terminated Butterworth and Chebyshev filters, but may not be for other shapes. The next step enters normalized coupling data (k) followed by clicking on button 5. This data will already be in place if you have performed Chebyshev or Butterworth calculations via step 2A. Clicking on button 5 causes the shunt coupling capacitors between crystals to be calculated and displayed. The final step is normally no more than a click of button 6 to tune the filter. This calculates the tuning capacitors that will be in series with each crystal. These capacitors are required to force each mesh (or loop) in the filter to have the same resonant frequency when isolated from the other meshes. With different coupling capacitors, each mesh would have a different frequency without tuning with series capacitors. The program will evaluate the resonant frequency of each mesh before inserting series tuning capacitors. One will be the highest in frequency and will not have to be "raised" with a tuning capacitor. The program merely inserts a value of 99999 pF for the related tuning capacitor, indicating that it is merely replaced by a wire when the filter is built. A practical subtlety is built into the program that may not be apparent. The tuning capacitors are calculated by reading the values that are presently in the END capacitor and coupling capacitor edit windows. If you wish to use practical values that are close to those calculated by the program, you can edit the practical values into the edit windows before clicking on the tuning button. You may even wish to change the tuned values to close practical substitutes before saving. The plots reveal another subtle, yet profound truth of crystal ladder filters: The filter frequency passband is always above the series resonant frequency of the nominal crystal. The exact filter edge is not simply related to the filter parameters. Indeed, you can change the position by changing tuning capacitors throughout the filter. Hence, it is difficult to order a batch of crystals with the idea of exactly hitting a design frequency. Rather, the usual practice has the designer/builder ordering available crystals, measuring them, designing a filter, and even building it, before exactly establishing the filter frequency. While XLAD is restricted to filters with at most 10 crystals, it is possible to push it further, up to order 20. An example with 14 crystals has been built. The design process is summarized at the end of this manual. 7. FINETUNE: Adjusting the frequency of individual meshes in a crystal ladder filter. FINETUNE is the program that allows the careful experimenter to realize excellent filter performance with crystals that are spread over a modest frequency range. When we call FINETUNE we see a schematic with one mesh. A mesh is that part of the crystal filter related to but one crystal. The same global crystal parameters are entered that we used in XLAD and GPLA. The mesh capacitors (coupling and tuning) are also entered. If this is an end mesh, the terminating resistance is entered, while R is set to a very large value for an interior mesh. Pressing "Calculate" then shows the mesh frequency in Hz with respect to the nominal frequency at the top of the page. The schematic presented in FINETUNE has the termination on the left side of the drawing. That end of the mesh has both a resistor and shunt capacitor. If you are evaluating a mesh with a resistor on the right hand side in your drawing, do a mental flip. That is place the terminating resistor and its capacitor together on the left in FINETUNE with the un-terminated capacitor on the right. FINETUNE use normally begins with an examination of all meshes in a given filter, assuming a tuning capacitor that is very large (99999 pF.) The actual relative crystal F is used for each mesh. Once all meshes have been evaluated, the highest frequency is noted. That frequency is edited into the "target" box. The individual meshes are now examined again. However, this time a "non-wire" tuning capacitor value is used. A value can be entered via editing, followed by a click on "Calculate." The calculated mesh frequency is displayed. Clicking on the + and - buttons will increase or decrease the tune capacitor value, allowing one to quickly match the "target" frequency. The increment percent can be edited, as needed. We will illustrate the use of FINETUNE with an example. Going into XLAD, we design a 4th order 0.5 dB Chebyshev bandpass filter with a bandwidth of 1000 Hz. The default 5 MHz internal crystal is used with motional L=0.11 H. The filter is terminated in 500 Ohms at each end. The end capacitors are 12.5 pF while the coupling capacitors are 54, 64, and 54 pF. The filter is tuned with 79 pF capacitors in the two end meshes with "wires" as the inner capacitors. This filter is in memory as c4a.cir. We will use the actual tuning C values for the initial analysis. FINETUNE is now used to examine each mesh, one at a time. Because all crystals are on the same frequency, all meshes are on the same frequency, which comes out as 713 Hz above the nominal 5 MHz crystal series resonance. We should point out that the actual series resonance of the crystals is not at 5.0000 MHz for the crystals we used. Rather, it's about 1.5 kHz below this. However, this difference is of no consequence. Only the relative spacing is significant. The schematic in FINETUNE shows the terminated side closest to the crystal with the tuning capacitor next to following coupling capacitor. However, the tuning capacitor and crystal can be exchanged with no consequence. Both networks have the same impedance. First we test a rule of thumb that says a crystal frequency difference of 10 % of a filter bandwidth will have little effect. Examining these errors tends to confirm this rule for this particular filter. Next we pick some more severe errors of +200, -100, +100, and 0 for the 4 meshes, left to right in LadBuild. We again check resonance for all 4 meshes in FINETUNE and get the expected mesh frequencies of 913, 613, 813, and 713 Hz. This filter is saved as c4b.cir and is examined with GPLA. These errors of up to 20% do indeed compromise filter shape, although not so much as to make the filter dysfunctional. Next we eliminate all tuning capacitors through the filter. The inner meshes had none anyway, so they do not change. The outer meshes do drop in frequency. The four mesh frequencies are now, in sequence, 664, 613, 813, and 464 Hz in a filter now saved as c4c.cir. The shape distortion observed with GPLA is severe. Adding series tuning to a mesh increases the resonant frequency of that mesh. So we pick the highest mesh as one to leave alone. This is mesh #3 at 813 Hz. The three remaining meshes are now entered into FINETUNE and the series capacitors are adjusted until they are all at 813 Hz. This value is entered into the "target" edit box, which has no function other than serving as a useful notepad. The filter with tuning capacitors of 134, 92, none, and 55.6 pF is now saved as c4d.cir. We now use GPLA to compare the first and the last filter. We begin by loading c4a.cir and examine the display. We click the button to "Save S21 as Ref." We now load c4d.cir, click the button to cause the reference to be plotted, and click the Plot/Tune button. The two filter shapes are virtually identical, although the latest one is perhaps 100 Hz higher in frequency. Bandwidth is 1060 Hz. A final experiment is aimed at moving the filter to higher frequency. We move the "target" from 813 up to 1200 Hz and now tune on all 4 meshes in the filter. The final result, saved as c4e.cir, has tuning capacitors of 35, 29.57, 46.26, and 24.82 pF. The shape and loss look much like the original filter, although the 3 dB bandwidth has now dropped to 940 Hz. Clearly, the careful designer/builder has great freedom in building crystal filters. However, minor variations are beginning to alter the results, emphasizing the approximations that were used in the original filter design program, XLAD. As a filter is moved further from the lowest possible frequency, tuning becomes much more sensitive to small variations in values. 8. BiasNPN: Biasing of an NPN transistor. This simple program evaluates the bias in a NPN transistor operated from a single power supply. Bias uses only resistors. The model is a very simple one of a current generator with constant beta. A diode with a constant voltage drop is included within the base. Program operation is straightforward. When the program is called, merely click on "Calculate" to show the results with the default resistors shown. Results displayed include emitter current, collector dissipation, base current, and voltages throughout the circuit. The transistor parameters, supply voltage, and any of 5 resistors can be changed in the circuit by editing the appropriate boxes. The equations used in this program are found in chapter 1 of Introduction to Radio Frequency Design. We have added error trapping to the program, allowing 0 to be inserted for resistor values without causing program instability. The emitter resistor may also be adjusted in 5% steps with a mouse click. 9. FBA: Design of single transistor feedback amplifier. The astute reader will detect negative feedback as a central theme through much of the book. A favorite radio frequency amplifier circuit uses a single transistor with negative feedback in two forms: emitter degeneration and parallel feedback from collector to base. This amplifier is one that offers good stability and bandwidth with well defined input and output impedances. This program, FBA, analyzes these circuits. The model used is the familiar "hybrid-pi" where the high frequency effects of reduced gain with increasing frequency is modeled with a capacitor between base and emitter. The model is extended to include a base spreading resistance and a collector-to-base capacitance (a.k.a., Miller capacitor.) External inductance in the emitter and in the feedback from collector to base are also included and can be especially significant at VHF. This program performs a small signal analysis, showing the transducer power gain, input and output impedance with the terminations shown, along with related return losses. The feedback elements, emitter current, terminations, frequency, and transistor characteristics can all be altered. After changes are made, re-click on "Calculate" to show the results. The default transistor built into the program approximate the familiar 2N3904. The schematic shows the familiar transformer in the output circuit. The circuit is specified by the external load resistance and N, a turns ratio for the transformer. Negative feedback is obtained directly from the collector rather than from a tap on the transformer, a scheme that can compromise stability with really "hot" transistors. The output impedance calculated by the program is that seen looking from the transformer into the collector node. The values we would measure at the transformer secondary are transformed accordingly. The return loss would be the same if the transformer is indeed ideal. It is useful to open FBA and NPN_BIAS in two adjacent windows. This then allows one to design amplifiers that combine biasing with RF feedback, another special amplifier topology used through the book. Feedback amplifiers are discussed in Chapter 2 and applied to receivers and transmitters in Chapter 6. A pair of buttons are included for both the parallel feedback resistor and the emitter degeneration resistor. This allows the respective resistors to be incremented or decremented by 5% with a mouse click. 10. CASCADE: Evaluation of a cascade of up to 10 stages for cascaded noise figure and third order IMD. This program is used in the design of systems to evaluate the effect of cascading several stages. Noise figure, net gain, and third order intermodulation intercepts are then calculated for the cascade. Some system parameters are also evaluated such as receiver two tone dynamic range, MDS, and receiver factor, all presented in Chapter 6. Several example receiver designs are presented in Chapter 6. We urge you to use these with the program as a means of study. A file included on the CD is titled gp_rx_fe.cas, standing for "general purpose receiver front-end." This design is used with some receivers in the book. Each stage in a cascade is described by entering its gain, noise figure, and output intercept. This data, for a single stage, occupies a column. A short text description of that stage is shown at the top. The name has no significance in program operation other than reminding the user of prior thoughts. Some stages, such as filters and pads, are assumed to be free of IMD. This is represented to the program with a extremely high OIP3 for that stage, usually +100 dBm. The model used in CASCADE.EXE for IMD combination is coherent addition of distortion voltages. This assumes that distortion products from all stages add in phase. This represents a worst case. It is also consistent with the behavior we have measured in many receivers and power amplifier chains. 11. Impedance Matching A frequent problem that also generates a ladder network is that of impedance matching. The common L-network is the simplest example of such a circuit. Assume, for example, that we need a network to match from a 50 Ohm source up to 1000 Ohms in the output of an amplifier. We will perform this transformation with the high pass variation of the L-network using a shunt inductor and series capacitor. Assume the operating frequency is 50 MHz. This network can be designed directly. However, we can also get at it with GPLA, the central analysis program in LADPAC-2002. Let's do a computer analysis that resembles what we would do with experiments. We begin in LADBUILD with a 1000 Ohm load, created first with the File/New option, followed by editing the 50 Ohm load to become 1000 Ohms. Part 1 is a shunt inductor with part 2 set up as a series capacitor. We start with guessed values of 100 nH and 20 pF. A return loss bridge is placed as part #3, and that at part 30 is removed. Reviewing the global parts, we set f-beg to 20 MHz and f-end to 80 MHz. We use f/div of 10 with dB Bot=40. The file is saved as match50.cir. We now exit LADBUILD. GPLA is called and we open match50.cir. We immediately see a high pass response, but the cutoff is clearly high, perhaps above 100 MHz. The impedance match is poor. We enter 50 MHz in the Cursor data, followed by the PLOT command. Tuning on the capacitor produces little in the way of an impedance match, but tuning on the inductor is more productive. Increasing L in 5% steps produces a 12 dB match with L=552 nH. We now tune on C, seeing a very good match in the form a deep S11 null at C=11 pF, albeit at 65 MHz. Bouncing between the two, just as we might adjust a practical network, we find an excellent match with 710 nH and 14.92 pF. This is all done by tuning for the best dip in S11. 12. Designing a 14 pole crystal filter with XLAD--A design case study. This study is included to illustrate methods that allow a high order filter to be designed beyond the limits of the program. Here a 14 pole filter is designed even when the program is only set up for 10th order crystal filters. A. Pick crystals. Use default 5 MHz parts built into program, Lm=0.11H, 3pF Do step 1 of program. B. Enter B=2000 and leave n at 5. click button 2. C. Click 2A for Chebyshev. Now set N to 14 and ripple to 0.1. Click to calculate k and q. q1=qn=1.2293 k12=.7403 k23=.5534 k34=.5214 etc. Click and return to Filter Design. D. Now, go back to N and set it to 10. That is as high as the arrays in this part of the program are set to go. Go all the way to the beginning and click 1. Re-click "button 2." Do NOT click on 2A. Click 3 and 4. E. Experimenting with step 4 provided a match when hit 3000 Ohms for R. F. Click 5 to get the coupling caps. They may not all be quite right, but we will get there. G. Click 6 and get some tuning caps. H. Save the filter as cheb14start.cir. I. Open this file in the schematic editor. Zap cap part 3, which is 99999. Now we have a filter with 10 crystals, but the numbers used for the design were 14th order things. So, add parts to the filter to retain the topology, but don't worry about values. Do the adding at the source end, which you do by going to the last cap, a 7.33, #30, and then clicking on "Add wire after N" until the RLB is over at the source. J. Notice that the first mesh has no tuning cap. We zapped it out. Hence, the last mesh, #14, will have no tuning cap. K. Now, starting at the load end. grab each part, copy it to the clip board, and then paste it in the source. Keep doing this, working your way into the filter from the ends. L. There will finally be a center cap, one with 25.03 pF. This is after the 7th mesh. This is the center of the filter. M. The filter is finished now, without ever using the tuning program. Save it as cheb12x2k.cir, and analyze it. This is one sharp filter. Bandwidth was 2160 Hz, a bit more than the 2000 Hz design value.