. L E N A Linear Electronic Network Analysis program manual Release of 31 January 1994 ============================================== Programs, Documentation and Instructions by Leonard H. Anderson Copyright (c) 1994, all rights reserved ============================================== Linear frequency analysis of electronic circuits having up to 56 nodes and 204 branches, solving single node voltage or impedance at DC or swept-frequency. Branch types include single components, series and parallel passive components in one branch, macromodels of transmission line, two-winding variable coupling transformer, bipolar hybrid-pi transistors, operational amplifier with one internal breakpoint. Requires 8086 or later CPU, 142 KB free RAM, any ASCII-character-set display and printer. Numeric co-processor version included. LENA is a smaller version of LINEA (released August 1993) and compatible in every way except repetitive waveform analysis. TABLE OF CONTENTS GENERAL............................................................1 Consent and Disclaimer.......................................1 Conventions in this Document.................................2 DESCRIPTION/OPERATION OF LENA......................................4 Introduction.................................................4 Program Command Organization.................................4 INPUT...........................................................6 General Keyboard Input in LENA...............................6 Numeric Value Entry..........................................6 Y/N Queries..................................................7 Main Commands (Listing)......................................7 Output Command Combinations.................................10 Printer Margins and Pagination..............................10 ASCII-Character Plot Equivalents............................11 Output Plot Scale Choices...................................11 Rotating Twiddle Characters.................................12 Off-Line Use of Solution Files..............................12 GENERAL INPUT-OUTPUT SOLUTION COMMANDS.........................13 Setting Frequency Limits....................................13 Node of Solution............................................13 Zero-Decibel Reference Voltage..............................14 Opening or Closing a Branch.................................14 CIRCUIT LIST COMMANDS..........................................15 Starting or Continuing a Circuit List.......................15 Branch Description and Designation..........................15 Modifying a Branch Value....................................15 Deleting a Branch...........................................16 Inserting a New Branch......................................16 General Branch-Node Circuit Building in LENA................16 CIRCUIT COMPONENTS AVAILABLE IN LENA...........................18 Type Descriptions...........................................18 Passive Single Branches.....................................18 Independent Current Sources.................................19 Current Direction in Sources................................19 Dependent Current Sources...................................19 Macromodels.................................................21 Transformer Macromodel Details..............................22 Unbalanced Transmission Line Macromodel Details.............22 Bipolar Transistor Macromodel Details.......................23 Operational Amplifier Macromodel Details....................24 ENTERING CIRCUIT COMPONENTS....................................25 Branch Entry, Single-Value Branches.........................25 Branch Entry, Double-Value Branches.........................26 Quicker Entry, Single-Value and Double-Value Branches.......26 Dependent Current Source Value Entry........................27 Signal (Generator) Value Entry..............................27 Macromodel Entries..........................................28 Required-Listed Macromodel Values...........................28 Seeing the Full Circuit List................................29 Circuit List Hardcopy.......................................30 CIRCUIT LIST EDITING...........................................30 Special Note on Insert Command..............................30 Special Notes on All Macromodels............................31 LENA - Contents Page i DISK DATA FILES................................................31 Setting the Data Storage Drive:\Directory Path..............31 Reading/Writing Circuit Files...............................32 Circuit Creation Dates and Remarks..........................32 Solution Storage and Retrieval..............................33 Compatibility with LINEA Data Files.........................33 SOLUTIONS AND OUTPUT...........................................34 General Solution Organization of LENA.......................34 Scale Limit Selection on Plot...............................34 Two Forms of Impedance Plot.................................34 Syntax on Solution Type and Form............................35 Generating Plot Artwork.....................................35 Single DC Output............................................35 CONVERTING FROM SCHEMATIC TO LISTING...........................36 In the Beginning............................................36 Node Numbers Must be Contiguous.............................36 Commons, "Ground" and Supply Lines..........................36 Parasitic Reactance, Resistance.............................37 Current Through Dependent Branches..........................37 Voltage Across Dependent Branches...........................38 Creating "Stiff" Voltage Sources............................38 Negative Resistance or Reactance............................38 Operational Amplifier Circuits..............................38 Field-Effect Transistor Models..............................39 Bandwidth-Alterable Networks with Transformer Macromodel....39 Creating "Black Box" Sub-Circuits...........................39 INSTALLING LENA...................................................40 LENA Program Set Files......................................40 Appendices..................................................40 Registry....................................................41 CPU Versions and Copies.....................................41 FIRST-USE LENA PRIMER/TUTORIAL....................................42 On-Line Help................................................42 Getting Acquainted With Circuit Listings....................42 Trying Out a Macromodel.....................................43 Trying Out Circuit Edit Functions...........................44 Saving a Circuit File, Trying out DOS Functions.............45 APPENDICES are contained in text files LE_APX_*.TXT; titles and file names are given here for reference. Appendix A, LENA Data file structures....................LE_APX_A.TXT Appendix B, Example circuit PHASER.......................LE_APX_B.TXT Appendix C, LENA Configuration...........................LE_APX_C.TXT Appendix D, General history of CAE, LINEA, LENA..........LE_APX_D.TXT Appendix E, Comparison of current "BBS" programs.........LE_APX_E.TXT ============================================= Important: See page 40 (Installing LENA) for files and necessary procedures to make your personal working copy of LENA. ============================================= LENA - Contents Page ii . GENERAL ======= LENA is a Linear Electronic Network Analysis program set for determining the frequency response of an electronic circuit having a maximum of 204 component (branches) and 56 connection points (nodes). Components may be resistors, capacitors, inductors, series and parallel resistor-reactances, reactances with specified Q, stimuli, and dependent current sources. Macromodels of transformers, transmission lines, transistors and operational amplifiers are included. Frequency range may be anything from DC to Terahertz in linear or logarithmic increments. Numerical input is free-form, scaling letter suffixes from femto to Tera at user's option. Analysis solutions may be printed or plotted on any ASCII character-set printer. Circuit lists and solutions may be stored on or retrieved from disk. LENA works in any MS-DOS computer, 80x86 CPU or later, having a minimum of 142 kilobyte contiguous free RAM. There is no restriction or requirement on special display devices, but ANSI.SYS should be present as a DEVICE stated in DOS CONFIG.SYS file to see color. Any ASCII character printer may be used for hard copy output. The Standard version is for any 8086, 80186, 80286, 80386, or 80486 CPU computer, with or without a numerical coprocessor. The Numerical coprocessor version is for any 80386DX or 80486DX CPU or those with 80x87 numeric coprocessors. A Numeric co- processor version can decrease analysis-solution times by a factor of three to seven. LENA is an analysis _tool_, useful to engineers, technicians, educators, and advanced electronics hobbyists alike. It is not intended as a teaching aid but it is very useful in lending insight into frequency- domain properties of complex circuits. The LENA program set is Shareware. Anyone may try out the LENA set on one computer for a period of 21 days; beyond that time every user is obligated to obtain a registration for continued use, including commercial, educational, or governmental associations. CONSENT AND DISCLAIMER LENA, associated LENA files and documentation are the exclusive property of Leonard H. Anderson and are copyrighted 1994. No part of the LENA program set (programs plus documentation) may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any other language or computer language in whole or in part, in any form or by any means, except for distribution without fee as a program collection or for individual single-user archive purposes, without prior written consent of the author. The author disclaims all warranties as to this software, whether express or implied, including, without limitation, any implied warranties of merchantability, fitness for a particular purpose, functionality, accuracy, data integrity or protection. The included CPUID.EXE file was written and assembled by Intel Corporation and was declared public domain by Intel Corporation. LENA - Page 1 of 46 Distribution of the LENA program collection by Bulletin Board Systems is encouraged. Companies and organizations engaged in the collection and sale of shareware shall require permission from the author before distributing all or part of the LENA program set. CONVENTIONS IN THIS DOCUMENT This Manual is an explanation of the LENA program operation and application. Users are expected to know the basics of electronics and be familiar with electronic terms. There is very little of esoteric material found in comprehensive textbooks for college courses, yet the program operates with such esoterica and solves node-branch circuit arrangements accurately and quickly for frequency-domain analysis. The LENA program set is useful to working electronics engineers, electronic technicians, hobbyists, students and educators alike. The author is an electronics engineer who is also an electronics hobbyist and a writer published in BYTE, Ham Radio, ELECTRONICS, and Popular Electronics magazines. LENA and its documentation files were written with a prime rule that the American Standard Code for Information Interchange (ASCII) characters are to be used for ALL input-output. This makes it possible to display everything, regardless of display type, and to be printed on nearly every page-size printer used in North America. As a result of restrictions to ASCII characters, the few "schematics" in here are somewhat lacking in quality and appearance. Given those limitations, diagrams are as simple and understandable as possible. Also, many of the terms common to electronics notations use subscripts and superscripts and italics, features missing in ASCII. To bridge the gap between common use and LENA, the following is a short list of not-quite- standard notation: Hfe = Hybrid forward current gain, common-emitter transistor; common term is all-lower-case italics. Hoe = Hybrid output conductance, common-emitter transistor; common term is all-lower-case italics. Ic = Transistor DC collector current, commonly written "I-sub-c." Ft = Transistor cut-off frequency; commonly written "f-sub-t." Zo = Characteristic impedance, as applied to transmission lines; commonly written all-caps as "Z-sub-O." Fc = "Corner frequency" in operational amplifiers, point of frequency intersection between open-loop gain and slope of gain falling at a rate of 20 db per decade. Av = Voltage gain, commonly written "A-sub-V", used in here denoting open-loop gain of operational amplifiers. gm = transconductance, values in mhos. = Any number not having a specific value name, as opposed to Ohms, Farads, Henries, Hertz, etc. = General designation for entry, "" explained in text. Main Commands and Branch Type Designations have no rule regarding case. They can be entered as capitals, 'small' letters, or mixed-case...the only requirement is that the letters be correct and contiguous as shown. All- capitals notation in text here is an emphasis device. LENA - Page 2 of 46 Where keyboard inputs are described within text, they are shown capitalized within single- or double-quotes. Single- or double-quotes themselves are NOT keyboard entries. All documents in the LENA program set are formatted for 8.5 x 11 inch page sizes, 85 characters maximum line width, 66 lines maximum per page. Printer Form-Feed control characters are not used. Documents are limited to 75 characters per line and include a 5-character left margin; printing is continuous and automatically paginated. For better illustration of single-branch components and their formulae, the user is directed to Byte Books' publication "Simulation; Programming Techniques Volume 2," edited by Blaise W. Liffick, pp 87-97, article entitled "Linear Circuit Analysis" by Leonard H. Anderson. Byte Publications is now owned by McGraw-Hill and the "Simulation" book, copyrighted 1979, was out of print a few years ago. Among several texts on computer-aided design/engineering, the author has found the following to be useful: "IBM Electronic Circuit Analysis Program," by Randall W. Jensen and Mark D. Lieberman (Prentice-Hall, 1968). ECAP is the grand-daddy of all CAE programs and the frequency-domain modelling techniques are applicable to LENA. "Computer Methods for Circuit Analysis and Design," by Jiri Vlach and Kishore Singhal (Van Nostrand Reinhold, 1983). A very detailed overview and theory of all CAE programs, although a bit "academic" for working circuit designers. "Basic Circuit Theory with Digital Computations," by Lawrence P. Huelsman (Prentice-Hall, 1972). Gets down to basics on individual components and presents many FORTRAN routines to analyze components and networks. LENA - Page 3 of 46 . DESCRIPTION/OPERATION OF LENA ============================= INTRODUCTION LENA analyzes the response of an electronic circuit modelled from passive and active component branches connected to contiguous nodes. Complex voltage (from specified stimuli) or complex impedance may be measured at any node at any frequency for up to 200 frequencies in a sweep, linear or logarithmic-increment. Each circuit may have a maximum of 204 branches and 56 nodes. Branches may be single R, C, or L; series or parallel R-C, R-L combinations; L or C with frequency-independent Q; dependent current sources specified by transconductance or current gain; independent current sources. Macromodels of an isolated two-winding transformer, unbalanced transmission line, bipolar transistor, and operational amplifier are included. Circuit models and analysis-solutions may be stored on disk. All values are named and have scaling letters. All non-integer numeric entries may use mantissa/decimal-point/fraction format, 'E format' common to BASIC or FORTRAN languages, or Scaling Letter suffixes ranging from femto to Tera, or any mixture thereof. Except for Scaling Letters and circuit list Remarks, there is NO distinction on entry case. No PC function keys, Control or Alternate key combinations are used at any time. All LENA program commands are done at a Main Command level using clear English words or accepted abbreviations. Circuit model lists are just lists of components; all frequency limit settings and output type selection is done at the Main Command level. Circuit lists and solution outputs may be directed to a printer port or screen; printer may be any ASCII character set type and pagination is automatic for a 66-line standard print page. "Line-printer" style graph equivalents, using ASCII characters, may be selected in lieu of tabulated values. Scale range of every graph plot output is selectable to default minimum-maximum or to user-specified limits. Each circuit model list is editable from Main Command level. Branches and macromodels may be added, inserted, deleted, have values modified, or switched open or closed. Open branches remain in a circuit list but are not analyzed. Circuit lists may be named and have remarks; all are time- date-stamped for later reference. Branch type descriptions may include reference designations. Output is selectable to any circuit node. Each circuit list is checked for errors after entry with extensive description to permit easy correction. On computer systems with color displays, functions are color-coded. If data entry is required but not entered as part of a Main Command, LENA will prompt for the data. Extensive checking is done to guard against impossible solution conditions, error messages explaining the nature of error for correction. LENA should not crash under any condition. PROGRAM COMMAND ORGANIZATION All LENA program commands are done at a 'Main Command' level, using clear English words or accepted abbreviations. Most commands are one word. Command words may be abbreviated to the first 3 letters, first 2 letters, or, sometimes, as a single letter or symbol. A few commands use two words separated by a space. Where some numeric value should be entered following the first command word, a "data word," that numeric value may be LENA - Page 4 of 46 entered following a space separator as a 'second word.' If a first command word requiring data input is given, but data inadvertently omitted, LENA displays a prompt for the type and kind of data. If that data should consist of two or three numerics and only one is entered, LENA will re-prompt for all of them. Command word entry may be the following, depending on command: <-- space separator <1stWORD> <2ndWORD> <-- space separator Data words have contiguous characters, individual data items separated by a comma, semicolon, or forward-slant delimiter. Data words may be entered as: (single item) , or ; or / ^ ^ ^ (any of the three delimiter characters accepted) ,, Circuit entry is handled much the same as Main Commands. Component type descriptions recognize, in order, first letter, first two letters, or first three letters of a component name. All other letters or numbers, including a few symbols, may be added for reference designation. The Node number entries (integer) describe the location of the branch in the circuit. Entering type but no node numbers results in a prompt for node numbers. Numeric value entry for a branch is prompted next, some branches requiring two values; omitting one value of a two-value entry will result in a "re-entry" prompt. It is possible to enter everything for a single branch on one line. Throughout LENA, the organization is aimed at being interactive, clear- language, communicating with the user. There is a minimum of 'programese' spoken, no "command line shorthand," no screen cluttering with pull-down menus or small screen displays. The only jargon is that of electronics. LENA - Page 5 of 46 . INPUT ----- GENERAL KEYBOARD INPUT IN LENA All keyboard input is free-form in nature. No PC Function keys or Ctrl- or Alt- combinations are used for any purpose. The program is controlled from a 'Main Command' level having the following screen prompt: MAIN*> (printer port inactive) (yellow, black background) -or- Main-> (printer port active) (white on blue background) Main Command expects an all-alphabetic 'command word' to be entered. The 'word' itself may be an abbreviation of, in order, the first three letters, the first two letters, or the first letter or a symbol. Some commands may require two words; two words must be separated by at least one space. Command words may be entered in all-capitals, all-lower-case, or even mixed-case; only the letters themselves matter. Exception to this overall rule occurs only with Scaling Letters or textual input for Circuit List Remarks. NUMERIC VALUE ENTRY Some commands require data as the second word. A 'data word' in LENA consists of alphanumeric data of one to five items. Each data item is separated (delimited) from the following data item by a comma, semicolon, or forward-slant ('/'). No entry for an item is considered a space for alphabetic data or zero for numeric data. ALL numeric data items in LENA have flexible input format. Each data item may have any one or a mixture of any of the following formats: * Mantissa-decimal-point-fraction. * 'E-format' style common to BASIC and FORTRAN * Scaling letter suffixes from femto to Tera. Scaling letter multipliers are as follows: T = Tera = 1E+12 f = femto = 1E-15 G = Giga = 1E+9 p = pico = 1E-12 M = Mega = 1E+6 n = nano = 1E-9 K = Kilo = 1E+3 u = micro = 1E-6 = 1 m = milli = 1E-3 Scaling letter case MUST be observed. All below unity require lower-case, all above unity require upper-case. The lower-case 'u' has been substituted for the Greek 'mu' to permit direct compatibility with ASCII- character printers. LENA - Page 6 of 46 The following keyboard-entry combinations all denote the same numerical quantity: 12345.67 12.34567E+3 12.34567K 0.01234567E+6 .01234567e+6 1234567m 12.34567KE-6 .01234567M Scaling letter suffixes take precedence over any 'E-format' power of ten; in the 7th example (12.34567KE-6), the "E-6" would be ignored. E-format allows either case for the "E." The maximum number of digits in the mantissa is limited to 7. The exponent ranges are limited to E+29 and E-28. Polarity is considered positive by default (plus signs are ignored) and a minus sign must precede a number to indicate it is negative. Except for Scaling Letters and the "E", all other characters are ignored. Where data required is expected to be integer-only, any fractional part of an entry is ignored. Data item delimiters within a numeric data word are a comma, semicolon, or forward-slant. Two contiguous separators indicate a zero value between the delimiters. In the case of a delimiter character being the first character in a data word, the first data item would be zero (null entry). Depressing an key without entering anything else in response to a prompt will make ALL requested data items zero. Y/N QUERIES In several LENA functions there are Yes-No queries having "[Y/n]" or "[y/N]" entry prompts, each having only one letter capitalized. Pressing key without entering anything else is the same as entering the capitalized key. MAIN COMMANDS All of LENA's Main Command words are listed following. All-capitals form is used here to emphasize required _letters_; user may enter either case or even mixed-case. These are all "first words"; if a second word is required, LENA will prompt for it if not entered. This list, in abbreviated form, is duplicated in the HELP display on-line and in text file MAINCMND.LST. QUIt QUI QU Q -or- Quit LENA and return to DOS level. EXIt EXI EX X HELp HEL HE ? Display 1 to 6 screens of on-line Help information. DOS DO \ Temporary drop to DOS level. One DOS request will return to LENA afterwards unless word 'COMMAND' is entered...will not leave DOS level until 'EXIT' is entered. LENA - Page 7 of 46 NEW NE Begin entry of a new circuit list. Old circuit data is discarded. ADD AD A Add to an existing circuit list. LISt LIS LI L List entire circuit to screen or printer. ON ( Enable printer port to accept outputs or circuit listing. Main Command prompt changes to "Main->" when printer port is on/enabled. All PRInts, PLOts, or LISts are directed to the printer when ON. Active printer port is that set by Operating System. Printer port remains on until turned off. OFF OF ) Disable printer port. All outputs are directed back to screen and Main Command prompt returns to "MAIN*>" to show printer port is off. Default state when LENA is first run. DRIve DRI DR & Select another Drive:\Directory path for reading or -or- writing Circuit, Solution, or Waveform data files. DIRectory DIR DI Default on LENA start is same Drive:\Directory as LENA program drive and directory. REAd REA RE R Read a Circuit file from disk. Requires only the 8-character-maximum filename. File extension of .LIN is automatically appended. 'LIN' file extension is LENA's identification for Circuit list files. WRIte WRI WR W Write an existing Ciruit file to disk. Same filename and extension conditions as REAd. SAVe SAV SA / Save a solution to disk, including frequency limits and circuit filename (but not circuit itself). Requires only the 8-character-maximum filename. File extension of .LNA is automatically appended. 'LNA' is LENA's identification for Solution data files. BRIng BRI BR B Bring (back) a previously-SAVed solution. Same file- name and extension conditions as SAVe. Displays filename of circuit that was solved but does not read it in. Used for viewing previous solutions. OPEn OPE OP O Open the connection of a designated circuit branch. Branch remains in circuit list but is not part of circuit solution. Opening a previously-opened branch has no effect. If an OPEn designates any branch in a macromodel, the entire macromodel is Opened. CLOse CLO CL C Close, or reconnect a designated circuit branch. Opposite of OPEn. Closing an already-closed branch has no effect. If a CLOse command designates any branch in an opened macromodel, the entire macromodel is closed. MODify MOD MO M Modify only the values of a designated circuit branch. Type and nodes remain intact. Inoperative with macromodels. LENA - Page 8 of 46 . DELete DEL DE | Delete a designated circuit branch from a circuit list. All higher-listed branches move down to fill in list. If a DELete command designates one branch of a macromodel, the entire macromodel is Deleted. INSert INS IN ^ Insert a new branch at the designated branch position in a list. Branch type, nodes, value prompts and entries are the same as for one component under NEW or ADD. Designated branch and all higher branches move move up to make room for INSertion. NAMe NAM NA $ Change existing circuit list filename. Circuit file REAds and WRItes assume the existing filename or allow choice of another filename; this command is primarily for hardcopy outputs so as to show the new filename prior to any WRIte to disk. REMark REM RE * Change 47-character Remark line accompanying each circuit list or output title. Remark line is written to or read from disk with other circuit list data. NODe NOD NO N Select NODe of solution. Every NEW circuit or ADDition to a circuit, MODification of branch value, INSert of a new branch, DELetion of an old branch, REAd-in of a circuit from disk will always make the highest node in a circuit as the node of solution. DBRef DBR DB D Change reference voltage for 0 db on all outputs. Default at LENA start is 1 Volt. Does not affect solution voltage, only decibel value equivalent to solution voltage. FREquency -or- First Command Word to select frequency limits, first FRE FR F or second word to select frequency-voltage output type. At LENA start there are no frequency limits. IMPedance -or- First or second word to select frequency-impedance IMP IM Z output. PRInt PRI PR P First or second word of an output to select printed, tabulated solution values. PLOt PLO PL = First or second word of an output to select ASCII- character plot equivalents. MARgin MAR Select margins for hardcopy; 1 to 7 characters left margin (5 is default), 1 to 6 lines top and bottom equally (3 is default). Margins do not appear on screen displays. SETtings SET SE Convenience screen display to show user the current circuit filename, circuit creation time/date, circuit Remarks, current time, node of solution, open circuit branches (if any), frequency limits, 0 db reference voltage, and Data file directory path. DATe DAT Current computer time and date. Convenience only; computer time and date are resettable only from DOS level. LENA - Page 9 of 46 OUTPUT COMMAND COMBINATIONS A solution output is obtained by a two-word combination of or . FREquency and IMPedance are words, PRInt and PLOt are words. Either order is fine but each word must be separated by at least one space, no other character. To obtain an IMPedance PLOt, any of the following two-word combinations can be used: PLOT IMPEDANCE IMPEDANCE PLOT PLO IMP IMP PLO PL Z Z = For user convenience, the following single-word, three-letter acronyms may be used as an alternate for output: PRF - Print tabulation of complex node voltage over frequency. PRZ - Print tabulation of complex node impedance over frequency. PLF - Plot node voltage over frequency, ASCII-character plot. PLZ - Plot node impedance over frequency, ASCII-character plot. PRINTER MARGINS AND PAGINATION Printer-directed output is formatted for the 8.5 x 11 inch North American standard page size, expecting 85 columns per page horizontal ("10 Pitch" or ten characters per inch) and 66 lines per page vertical (6 lines per inch). Top and bottom page margins, left margin are selected via the "MAR" main command. Top and bottom margins (equal) are selectable from 1 to 6 lines, 3 line margin (half inch) being default at LENA start. Left margin is selectable 1 to 7 characters/columns, 5 characters (half inch) being default at LENA start. Pagination of "Page nn of mm" is done at the bottom right of each page and "...continued from Page nn" at the top left of each page after the first page. The first page always begins with a title bearing circuit filename, when circuit was created (or last changed), remarks, current time and date, any circuit branches which are set open. Margins and the "...continued" identification are omitted from screen displays and "Page nn of mm" only appears on screen if an output or circuit list goes beyond a single page. Top and bottom margins (always equal) allow the following number of solution data lines per page: Margin Lines 1st Page Data Lines 2nd, subsequent Pages' Lines 1 52 55 2 50 53 3 48 51 <- default 4 46 49 5 44 47 6 42 45 LENA - Page 10 of 46 ASCII-CHARACTER PLOT EQUIVALENTS The "character plot" technique is an old method of making a coarse graph plot equivalent using only printer characters as data and graph marks. It is also the fastest and most equipment-versatile, requiring only that a printer support ASCII characters. LENA outputs plot graphs having 6 major divisions, 60 minor divisions, 'rotated' a quarter turn so that the lowest frequency is at page top, amplitude increasing from left to right. Every line is identified by frequency. Major graph divisions are identified by a plus sign. Any data plot character will override a graph division character. The prime data character is an asterisk, secondary a colon, tertiary an up-arrow. If, for one plot point, characters are at the same plot location, the prime character predominates. If the prime character location is calculated to be beyond the scale extremes, a left or right arrow mark at appropriate left or right limit lines indicates overscale. Data location is very close to the physical center of a character. The center of a colon character is mid-way between the two marks. Group Delay is shown by an up-arrow and the _point_ of the up-arrow is significant. Group Delay is the derivative of phase divided by derivative of radian frequency; the point of the arrow is approximately mid-way between each frequency, thus corresponding to approximate frequency of delay. OUTPUT PLOT SCALE CHOICES Every solution's plot output is scanned for minimum and maximum, those minima and maxima shown as a screen prompt. Users have a choice to accept those extremes as the scale limits or to enter desired limits. Pressing _only_ the key after the prompt accepts the solution's extremes as scale limits. There is no auto-scaling by decades or octaves. Phase-angle scale limits are fixed for frequency-voltage solutions, default value at +/- 180 degrees. Phase-angle limits may be set to any other values and will remain at those settings until changed. Impedance plots are selectable polar (default) or rectangular. Polar form impedance plot has the prime data mark signifying impedance magnitude, secondary data mark signifying impedance phase-angle. Entered impedance phase-angle plot limits remain only for that particular impedance plot. Rectangular form impedance plot has prime mark indicating Real/Resistive part, secondary mark indicating Imaginary/Reactive part. All plot outputs have the scale limit values at the header of each page. Limits can be reversed left-for-right by reversing the order of limit entry. If a re-plot of the same solution is desired with different scale limits of some parameter, it may be done without delay. Solutions are stored internally and re-plotting/re-printing may be done immediately without waiting for a new solution. LENA - Page 11 of 46 ROTATING TWIDDLE CHARACTERS Every circuit solution requires all circuit branches to be mathematically analyzed at each solution frequency. With large circuits, this may take many seconds. To indicate this is in process, "Working!" is displayed on the screen, preceded by a 'rotating twiddle character' that appears to turn in 45-degree increments for every frequency. Every 8th frequency is marked by the "equal symbol" composed of three stacked horizontal dashes. Both indicators disappear after the last frequency's analysis is completed. OFF-LINE USE OF SOLUTION FILES All solutions may be stored on disk. All files generated by LENA are the functional equivalent of ASCII files. Other programs may be used to parse the characters for any other tabulation or plot format. A full description of disk file data fields is given in Appendix file LE_APX_A.TXT. LENA - Page 12 of 46 GENERAL INPUT-OUTPUT SOLUTION COMMANDS -------------------------------------- SETTING FREQUENCY LIMITS Entering F, FR, or FRE at the Main Command prompt without a second word will invoke a prompt of: Frequency Limits [Hz] (min,max,delta): "min" and "max" are self-explanatory, but "delta" has two possibilities: A positive delta entry is the linear frequency increment while a negative delta entry refers to the _total_ number of logarithmic-increment frequencies. Entering "99K,101K,-17" would mean a log-sweep of 17 total frequencies starting at 99 KHz and ending at 101 KHz. An entry of "99K,101K,100" would mean a total of 21 linear-increment frequencies starting at 99 KHz and ending at 101 KHz. Maximum number of frequencies is 200, regardless of linear or logarithmic increment. LENA checks for that and prompts if entry is incorrect. LENA will accept a 0 minimum frequency (DC) if the delta is positive/linear, but will not accept a 0 minimum frequency if the delta is negative/logarithmic. If the delta entry is 0, regardless of whatever else is entered for minimum and maximum, the "frequency" is DC. For all other conditions of delta, minimum and maximum frequencies must be positive. Frequency limits may be set at the Main Command level by entering "F " where is the min-max-delta. This single-line short form of command requires only that one or more spaces are between the "F" and the first character of ";" also, the three data items of are separated by commas, semicolons, or forward-slants, not spaces. It is also possible to select a DC solution from the Main Command prompt by entering "FREquency DC" or just "F DC". NODE OF SOLUTION Any node in a circuit may be selected as the "measuring point" for a solution. Selection of a new node of solution will cause it to remain; however, after every ADD or NEW circuit completion, INSert new branch, DELete old branch, or REAd in of another circuit, the node of solution is reset to the highest node in the circuit. If in doubt of the node of solution, a user can use the SET command to see which node is the current node of solution. Node of solution may be set as a single-line command at Main Command level by entering "N ". LENA - Page 13 of 46 ZERO-DECIBEL REFERENCE VOLTAGE Frequency-voltage outputs give both node voltage directly and in decibels relative to a zero-db reference voltage. At LENA start, this reference voltage is 1. It may be reset at any time and will remain at that voltage reference until changed again. A zero or negative reference voltage is not allowed. Zero-db reference voltage may be given at Main Command by the single entry of "D ". OPENING OR CLOSING A BRANCH Every single branch or an entire macromodel may be "switched" open or closed, functionally the same as disconnecting and reconnecting a physical component. An OPEned branch remains in the circuit list but is not solved. CLOsing an open branch will restore it to solution with the rest of the circuit. As an example, consider a circuit having a load resistor. It may be desireable to solve for the impedance looking into the load end, without the load resistor. An easy way to do that is to OPEn the load resistor branch, then request an impedance solution at that node. The load resistor may be reconnected with a simple CLOse command for that branch. OPEns and CLOses do not affect the circuit list order, type, nodes, or values. Single-line Main Commands may be "O " for OPEn, or "C " for CLOse. "" is either the branch order number or the full type description (see circuit entry for differentiation, explanation). OPEning an open branch or CLOsing a closed branch has no effect. A reminder: 'Open' and 'close' of a branch component refers to the hardware connection; it has NO relation to computer _file_ terminology. LENA - Page 14 of 46 CIRCUIT LIST COMMANDS --------------------- STARTING OR CONTINUING A CIRCUIT LIST The single command word, "NEW," at Main Command will begin a new circuit list, starting at branch 1. All old circuit list data (if any) will be lost. The single command word, "ADD," or "AD," or just "A" at Main Command will allow new branches to be added to an existing circuit list, beginning with the next higher branch order following the last branch. If there is no circuit data, the command ADD will also begin a new circuit list, starting at branch 1. Every branch entry begins with a type description. This is followed by node connection data, finally by branch component values. Once branch data has been fully entered, branch entry begins again with the next branch. Branch entry continues until "END," "EN," "E," "ND," or "N" is entered for a branch type, signifying completion of a circuit list. BRANCH DESCRIPTION AND DESIGNATION Branch type descriptions allow up to 8 characters per branch. The minimum _first_ letters for electrical type identification are shown in the comprehensive branch descriptions following. Those minimums are from 1 to 3 alphabetic characters. The remaining characters may be used for reference designations or whatever the user wishes. As an example, a single resistor branch will be identified as to type by just the single first letter "R." Entering "RESISTOR," "R-123," "R_LOAD," or just "R" would all signify a single resistor branch for the purposes of completing a branch entry. The _entire_ type description may be used for designating a branch for some action. Main Commands OPEn, CLOse, MODify, DELete, and INSert require designation of a particular branch. Designator for those commands may be either the branch number or the full type description. LENA parses the first character of a designator entry. If that character is alphabetic, the entire circuit list is searched for a match between and any type description; if there is a match, then the circuit branch number has been reached. If that character is numeric, the designator is assumed to call out the circuit branch number directly. Since most circuit analyses concentrate on only a few components of a circuit, it is probably easier to enter "OPEN R_LOAD" to open that branch rather than entering "OPEN 109" (assuming R_LOAD was branch number 109). MODIFY A BRANCH VALUE A single-line Main Command "MOD " allows changing just the values of that branch. Type description and nodes remain intact. MODify command will not work with macromodels. The finish of a MODify will reset the circuit creation time and date to that when the MODify took place. LENA - Page 15 of 46 DELETING A BRANCH A single-line Main Command "DEL " will remove the branch at designator . This may present some slight difficulty if the DELeted branch is the dependent branch of a dependent current source. LENA does a circuit check of each circuit after an Edit command. If LENA finds an improper dependent branch relation, the dependent branch is automatically switched open, and a warning message to that effect displayed on the screen. Such an automatic Open cannot be CLOsed until the dependent branch exists in proper form. If a DELeted branch is the only link between two parts of circuit, one part having a stimulus and the node of solution being in the other part, solution analysis will stop and a warning message shown, citing that probability. DELeting any branch number within a macromodel will cause the _entire_ macromodel to be deleted. After a DELetion, all higher-order branches will move down to fill in the empty branch space. If any of the moved-down branches contain a dependent branch, the dependent branch number of a dependent current source will be automatically changed to the new number. The finish of a DELetion will also reset the node of solution to the highest node in the remaining circuit and reset the circuit creation time to the time of DELetion. INSERTING A NEW BRANCH The Main Command single-line command is "INS ". The designated branch and all higher branches will be moved up in the circuit list to make room for the INSertion. LENA will issue a prompt for the inserted branch type and nodes. Once the branch type is known (it may be a macromodel with many branches), the list movement will take place. If one of the moved branches is the dependent branch of a dependent current source, the dependent branch number of that dependent source will be automatically adjusted to be the new branch number. The finish of an INSertion will reset the node of solution to the highest node in the new circuit and reset the circuit creation time to the time of INSertion. GENERAL BRANCH-NODE CIRCUIT BUILDING IN LENA Every single component is called a "branch." Every connection point is called a "node." Every branch is connected between two nodes. Node zero is common-ground-earth to the entire circuit. Non-zero nodes must be contiguous. A branch may not have each end connected to the same node. There is no limit to the number of branches connected between the same two nodes. There is no restriction to the ordering of branches in any circuit; branches may be located anywhere in a listing. Node location makes no difference to the final solution although it may have some effect on speed of solution execution; more of that in explanation of the sample circuits distributed with the LENA program set. LENA - Page 16 of 46 As a practical matter, node ordering is best when following the general flow of a schematic diagram; that makes for easier interpretation of a circuit list at a later date. Branch and node arrangement follows conventional theoretical analysis techniques. LENA expands single component per branch theoretical concept to include parallel R-L and parallel R-C, series R-L and series R-C branches. While this is more for user convenience, in the physical world every component contains combinations of resistance, capacitance, and inductance. In LENA, each resistance is a pure resistance, each capacitance is a pure capacitance, and each inductance is a pure inductance. Current flow in LENA is provided by current sources. Every current source is assumed to be the theoretical type having an infinite source impedance. There are no voltage sources in LENA. A theoretical voltage source has zero source impedance. A voltage source may be approximated by a current source in parallel with a very low resistance. This is no problem with the large magnitude range of LENA's numeric calculation...a MegaAmpere current source in parallel with a microOhm resistor would create a very 'stiff' one-volt source...such would be numerically and theoretically correct despite the impractical-seeming combination. Current sources come in two varieties, "independent" and "dependent." Independent current sources are the stimuli or the fixed sources. Note: ALL stimuli are _always_ at phase-frequency coherence in LENA. Dependent current sources are dependent on the voltage across a branch or the current through a branch. More on those in the later section on dependent current sources. In this version of LENA, there are four macromodels. These are always made up of contiguous branches, are always handled by commands as if they were a single branch. LENA - Page 17 of 46 CIRCUIT COMPONENTS AVAILABLE IN LENA ------------------------------------- TYPE DESCRIPTIONS All of the following branch type descriptions may be found in short form in the Appendix and included in the HELP display within LENA. All TYPE letter combinations are shown in all-capitals to emphasize the _letters_ required; users may enter letters of either case or even mixed case, provided they are the correct letters. Circuit Lists will always show branch types in all-capitals. PASSIVE SINGLE BRANCHES TYPE Description ---------- -------------------------------------------- R RE RES = Single pure resistance C CA CAP = Single pure capacitance L IN IND = Single pure inductance LQ = Single inductance with specified Q; Q is constant over frequency. Q is modelled as a loss resistance in series with inductance. Loss resistance is magnitude of inductive reactance divided by Q. CQ = Single capacitance with specified Q; Q is constant over frequency. Q is modelled as a loss resistance in parallel with capacitance. Loss resistance is the magnitude of capacitive reactance divided by Q. SRL = Series R and L. SRC = Series R and C. PRC = Parallel R and C. PRL = Parallel R and L. E EN END = Non-branch. Entered by itself (no nodes), causes a -or- termination of the circuit list entry and return to N ND Main Command level. B BA BAK = Non-branch. Entered by itself (no nodes), causes listing to back up to the previous branch for re-entry. Used for correcting errors made in previous branch entry. ? HE HEL = On-line Help screen listing circuit branch types. At DC all inductors assume a resistance of 1 microOhm and all capacitors assume an infinite resistance. All passive branch values are normally entered as _positive_ quantities. A negative value may be entered at the user's discretion. Negative entries of inductance or capacitance will result in the same magnitude of reactance LENA - Page 18 of 46 over frequency but the signs of those reactances are reversed. This is useful in modelling certain theoretical circuit equivalents. INDEPENDENT CURRENT SOURCES TYPE Description --------- ----------------------------------------------- S SI SIG = "Signal generator" stimulus, specified by current in Amperes and phase-angle in degrees (optional) for frequency solutions. For time solutions with repetitive waveforms, phase-angle is ignored and the entered current is the peak value of the described waveform. D DC IDC = Direct current source. Active _only_ when the frequency is zero (DC). Independent current sources are automatically ignored during an impedance solution. All current sources have infinite source impedance. Voltage across the nodes of any current source depends on the voltage drop through all other branches connected across the current source nodes. A "stiff" voltage source may be created by a high-current source in parallel with a low-value resistance; source impedance of this "stiff" voltage source is that of the low-value resistance. CURRENT DIRECTION IN SOURCES Current flow in LENA is assumed equal to _electron_flow_. Current flow _within_ all current sources is from "plus node" to "minus node" if the entered current value is positive. Entering a negative value of current or current gain reverses the current flow. Node entry order of all passive branches is irrelevant...except for those which are dependent branches of a dependent current sources. DEPENDENT CURRENT SOURCES LENA has two types: GMS or transconductance-specified ('gm') dependent current source, and HFS or current-gain-specified ('hfe') dependent current source. Current is dependent on the voltage across a dependent branch (type GMS) or the current through a dependent branch (type HFS). Dependent branches may be any passive branch type located anywhere in the circuit; dependent branches may not be another current source. TYPE Description ---------- ----------------------------------------------- G GM GMS = Transconductance-specified current source. Current depends on the specified transconductance ('gm') times the voltage across the nodes of a specified dependent branch. Transconductance is specified in mhos, transconductance being the derivative of current divided by derivative of voltage. Current is then proportional to the voltage across a dependent branch. LENA - Page 19 of 46 H HF HFS = Current-gain-specified ('hfe') current source. Current depends on the specified current gain times the current through the dependent branch. Note: "hfe" is not conventional notation for current gain, being the hybrid parameter of collector current versus base current gain of a common-emitter transistor; it is used due to limitations of ASCII not allowing subscripts. "hfe" to most circuit designers is fairly well synonymous with current gain. Current flow in circuits with dependent current sources is illustrated following: Plus node Plus nodes o +e o ------------------o | | | /|\ | | | Current | | Rd -> GMS | Within Rm | | | \|/ GMS | Current | | | through o -e o ------------------o Rm Minus node Minus nodes Dependent Type GMS Dependent Current Source Branch with connected resistor Rm Voltage drop across Rm is in-phase with voltage across Rd. Exchanging Plus and Minus nodes of the GMS or dependent branch Rd will reverse current through the GMS and through Rm. Exchanging Plus and Minus nodes of _both_ GMS and the dependent branch, Rd, will make current through the GMS and through Rm as shown. Entering a negative transconductance value for the GMS will also reverse current flow of the GMS. If there are several branches connected to the same nodes as the dependent branch, GMS current magnitude is dependent on the total impedance magnitude across the dependent branch nodes...but GMS current direction is still dependent on the Plus and Minus node entry of the dependent branch. Plus node Plus nodes o o-------------------o | | | /|\ | /|\ | | Current | | Rd | -> HFS | Within Rm | | | | \|/ HFS | Current | Current thru | | through o dependent o-------------------o Rm Minus branch Minus nodes node Dependent Type HFS Dependent Current Source Branch with connected resistor Rm LENA - Page 20 of 46 Current through Rm is in-phase with current through Rd. Exchanging Plus and Minus nodes of the HFS or dependent branch Rd will reverse current through the GMS and through Rm. Exchanging Plus and Minus nodes of _both_ HFS and the dependent branch, Rd, will make the current through HFS and Rm as shown. Current flow in the HFS may also be reversed by entering a negative value of current gain. If several branches are connected to the same nodes of the dependent branch, HFS current magnitude is dependent _only_ on the current through the dependent branch...but HFS current direction is dependent on the node entry order for the dependent branch. MACROMODELS Macromodels use 3 to 5 branches, branches _always_ being contiguous in any list. TYPE Description ---------- --------------------------------------------- Z ZL ZLN = Unbalanced transmission line equivalent macromodel; uses 3 branch spaces, requires 3 nodes (input, output, common). Specified by characteristic impedance, velocity of propagation, length in inches, and decibels of loss per 100 feet. T TR TRF = Two-winding ideal transformer having specified coefficient of coupling between 0.01 and 0.99, DC isolation between windings. Uses 4 branch spaces, requires 4 nodes maximum (2 each for primary, secondary). Specified by primary winding inductance, turns ratio of primary winding to secondary winding, and coefficient of coupling. One node of primary, one node of secondary may be common, if desired. Q QT QTR = Bipolar transistor, hybrid-pi model. Creates 4 branches, requires 3 nodes (base, emitter, collector). Specified by: Hfe or base-to-collector current gain; Ft, cutoff frequency; Ic, average value of collector current; Hoe, collector conductance in mhos. Model does not include base spreading resistance, Rbb. Model makes no distinction between PNP or NPN. O OP OPA = Operational Amplifier. Creates 5 branches, requires 4 nodes (non-inverting input, inverting input, output, common). Specified by: DC open-loop voltage gain in db; Fc, or "corner frequency", the break-point of open-loop gain where gain begins to decrease at a rate of 20 db per decade; R-input, equivalent resistance of each input, both assumed to have equal resistance; R-output, source resistance of output. Common node is common to both inputs as well as output. LENA - Page 21 of 46 TRANSFORMER MACROMODEL DETAILS Two-winding isolated transformer macromodel is modelled as: Primary o----o-----o o----o-----o Secondary + node | | | | - node Lp HFSp < - - Ls HFSs | | | | Primary o----o-----o o----o-----o Seconday - node \ + node - - - - > - - - - - -^ where: Lp' = Calculated primary inductance. Ls' = Calculated secondary inductance. HFSp = Current-gain dependent current source dependent on current through Ls. HFSs = Current-gain dependent current source dependent on current through Lp. with internal values: Lp = Entered primary inductance. N = Entered turns ratio, primary to secondary. Ls = Secondary inductance calculated from primary inductance divided by square of N. K = Coefficient of coupling (entered) Lp' = Lp x (1 - (K x K)) Ls' = Ls x (1 - (K x K)) Hfe of HFSp = -(K / N) <- [dependent branch is Ls] Hfe of HFSs = -(K x N) <- [dependent branch is Lp] DC isolation is a relative term here. Inductors have a 1 microOhm resistance at DC to avoid an error-crash in the analysis-solution routine. While that is a very low impedance, it will show up as a small, small "leakage" of signal from primary to secondary and vice versa at DC. One primary node may be common to one secondary node in the circuit list. The orientation of secondary nodes is purposely chosen to yield a voltage polarity of the same sign as voltage across the primary. UNBALANCED TRANSMISSION LINE MACROMODEL DETAILS Unbalanced transmission line macromodel is a pi-form having the same attenuation at every frequency. Macromodel attenuation is internally computed from the ratio of specified length to the loss per 100 feet. Loss per 100 feet is a common specification for transmission lines and may be taken directly from manufacturer's data. User must compensate for loss varying over frequency. Lengths in meters must be converted to inches; legal USA conversion is 2.54 centimeters = 1.0 inch. LENA - Page 22 of 46 Open-line sections ('half-wave' resonant lines) may be created by having the "output" node isolated from all other branches; in effect, that would create the equivalent of an open end. 'Quarter-wave shorted stubs' are simulated by connecting a very low resistance branch to the output node. BIPOLAR TRANSISTOR MACROMODEL DETAILS The created bipolar transistor hybrid-pi model is as follows: Base node Collector node o------*------- --------*------o | | | | | | | | Cb'e Rb'e -> HFS (1/Hoe) | | | | | | | | -------*-----*-----*-------- | o Emitter node where: Hfe = base-to-collector current gain at Ic Ft = cutoff frequency Ic = average collector current Hoe = collector-emitter output conductance HFS is dependent on Rb'e branch current with current gain equal to Hfe such that collector voltage is at opposite phase relative to base voltage. then: Rb'e = (Hfe x 0.027) / Ic Cb'e = 1 / (Ft x 2pi x Rb'e) Hybrid-pi models have an additional resistance, Rbb, "base spreading resistance," in series with the Rb'e-Cb'e junction and external base node. Rbb is not readily calculated since it is subject to variations in design and type of the base junction rather than operating parameters. If no Rbb value is known, a suggestion is to use a value equal to or slightly larger than Rb'e. An added Rbb external to the macromodel can also include an independent DC current source (IDC) to create the Vbe diode junction voltage. However, the IDC current must be chosen to fit a PNP or NPN transistor; the bipolar transistor macromodel is neither PNP nor NPN type. An IDC branch is active _only_ at DC, ignored otherwise. Important note: Those acquainted with SPICE programs may be used to SPICE calculating the quiescent condition of transistors. LENA does not do that, presuming the transistor model already represents that quiescent bias condition. LENA - Page 23 of 46 . OPERATIONAL AMPLIFIER MACROMODEL DETAILS The equivalent operational amplifier macromodel is as follows: +Input node Output node o--- ------*-----*----- -----*----o | | | | | | | | | | | | | | Rin -> GMS+ GMS- Cfc Rfc -> GMSo Rout | | | | | | | | | | | | | | *--------*-----*-----*----*--------*----* | _ | | /| | Rin -> o | Common node | o--- GMS+ dependent on Rin at +Input; -Input node GMS- dependent on Rin at -Input with gm negative; GMSo dependent on Rfc Where: Av = open-loop voltage gain Fc = 'corner frequency' or 'breakpoint' where Av magnitude begins to decrease 20 db per decade. Rfc = 1 Ohm gm+ = transconductance of GMS+ = 1 gm- = transconductance of GMS- = -1 gmo = transconductance of GMSo = Av / Rout Then: Cfc = 1 / (Fc x 2pi) The center of this op-amp macromodel is a summing point for the current analogue to the non-inverting and inverting voltage inputs. It also modifies the DC open-loop gain over frequency. Output is a current analogue of the voltage at this center, summing 'node', multiplied by Av and divided by output source resistance. LENA simplifies this model by reducing 8 branches to only 5, using mathematical equivalents to the center summing node and output GMS. Each input node still 'sees' only R-input and the output node still has Rout. The break-point frequency is found in manufacturer's data sheets. Most op- amp ICs have more than one breakpoint frequency, the first somewhere around or below 1 KHz, others about a decade or two higher. Any higher than the first can be simulated by creating an external GMS-R-C cluster. Modelling additional breakpoints are explained in Model Tips and Hints later in this manual. "Input resistances" are seldom specified for op-amp ICs. Their existance in the macromodel is required for internal mathematical analysis-solution of dependent current sources. An approximation can be done by entering a very high resistance value. Since the exponent range of non-integer numbers in LENA is very large, a high, seemingly-impractical value will not disturb analysis-solution calculation. LENA - Page 24 of 46 . ENTERING CIRCUIT COMPONENTS --------------------------- This is a step-by-step procedure on entering circuit components in LENA. The process begins after entering "NEW" at the Main Command level. Note that ALL input to any one prompt is considered a "data word;" that is, one or more data items within the word must be separated by commas, semicolons, or forward-slants, no spaces. There is no need to memorize any special order of data entry; prompts for all items are self-explanatory. BRANCH ENTRY, SINGLE-VALUE BRANCHES The first prompt will be: Branch 1, Type, Plus-node, Minus-node: The user has a choice on input, Type description alone or Type description with the Plus and Minus nodes. Assume that RESISTOR was entered by itself, no node numbers. This results in another prompt: Branch 1, Type "RESISTOR" Plus-node, Minus-node: With the second prompt, the user gets verification that RESISTOR was indeed the Type description (LENA supplies the double quotes around RESISTOR). LENA requires _some_ kind of numerical data in response and will keep requesting until it gets something. Let's say that the Plus node was 2 and the Minus node was 3. Response to the prompt would be simply "2,3". Supplying all three data items would have an entry to the first prompt of "RESISTOR,2,3". If a mistake was made in entry and it became "RESISTOR,2,2", then LENA would recognize that both nodes were equal and the screen would show: Nodes may not be equal, please re-enter. Branch 1, Type, Plus-node, Minus-node: Let's assume that entry was good, that the Type description is RESISTOR, the Plus node is 2, and the Minus node is 3. The next prompt would be for the Value: Resistor value [Ohms]: Let's say the value is 4700 Ohms. Scaling letters can be used and an entry can be "4.7K". Or, E-format can be used for an entry of "47E2" or "4.7E3". Or simply "4700". Whichever format is easiest for the user is fine with LENA. Completion of Value entry results in a prompt for the next branch: Branch 2, Type, Plus-node, Minus-node: Note that the branch number has been incremented in the prompt. This incrementation will repeat until the list is terminated or after it has LENA - Page 25 of 46 completed Branch 204, the maximum number of branches in LENA. To end the circuit list entry at any time, just enter END or EN or E or ND or N for the Type description, no node numbers. List entry will terminate with a prompt showing the total number of branches and the node of solution being the highest node in the circuit list...then return to Main Command level. Suppose that the resistor value should have been 47 KOhms instead of 4.7 KOhms and this mistake is seen. To correct it quickly, just enter "BAK" or "BA" or "B" and the list entry 'backs up' to the previous branch's prompt for Type and Nodes. Re-entering everything is required. A mistake in Value entry could be corrected later by the MODify command... but that requires a note to oneself to do so. Going back one branch is easy enough to do now and corrects the entry immediately, allowing concentration on entering all the other branches in the list. BRANCH ENTRY, DOUBLE-VALUE BRANCHES The same Type and Nodes prompt is issued for every branch; LENA doesn't know what Values are required until the Type Description is entered. For example, suppose the branch was type LQ, a single inductor with specified Quality factor. After completion of Type and Nodes entry, the Value prompt would be: Inductance value [Henries], Q [Units]: Suppose the inductance was 56 microhenries with a Q of 70. The data word entry would be "56u,70". Note the _lower_case_ "u" for 'micro'. Scaling Letters in entry must use lower case for multipliers less than unity, upper case for greater than unity. Letter "u" replaces Greek letter "mu" for ASCII compatibility. If there was a mistake made and one Value was not entered, LENA would detect that and issue the error message: Caution: One or both values zero, please re-enter ...and then return to the Value entry prompt for that branch. That same "zero" caution would appear with single-value branches if the single Value entry was zero. LENA expects _something_ in the Value and keeps prompting until it is entered. QUICKER ENTRY, SINGLE-VALUE AND DOUBLE-VALUE BRANCHES LENA has a built-in 'shortcut' to allow entry of everything about simple branches on one line. Once the user becomes acquainted with Value entry order, Values can be entered as part of the data word following the Type and Nodes data items. For illustration, suppose the two previous examples were connected to the same nodes; the screen display would look like: Branch 1, Type, Plus-node, Minus-node: RESISTOR,2,3,4700 -and- LENA - Page 26 of 46 Branch 2, Type, Plus-node, Minus-node: LQ,2,3,56u,70 It should be emphasized that users should not try this until they are familiar with the Value entry order. It is easy to mix up two values...but the Type description and Value entry order match...L is first, Q is second in an LQ. In both kinds of R-L and R-C combinations, Resistance Value is always first. DEPENDENT CURRENT SOURCE VALUE ENTRY Whether the Type description is GMS or HFS, the second Value data item is _always_ the dependent branch identification. This identification can be done either by dependent branch's Branch Number or by its entered Type Description. If the Type Description is used for identification, then it is required that the dependent branch should have additional characters to make it distinctive; the minimum Type Description entry might be repeated the same way in several circuit list locations. For example, suppose an HFS has a current gain of 2 and it is dependent on a resistor in Branch 6 which has the Type Description of "R-78". The screen display of Value prompt and subsequent keyboard entry would like: Current Gain [Units], Dependent Branch No.: 2,R-78 -or- Current Gain [Units], Dependent Branch No.: 2,6 Either form of entry is correct. LENA checks the data of every branch after Circuit Entry termination. Dependent branches must be passive types and they must exist in the circuit list; if incorrect, an error message is made and the dependent current source is switched open. Should that error happen, the MODify command can be used to correct the dependent branch identification. SIGNAL (GENERATOR) VALUE ENTRY Value prompt for a SIG Branch Type is: Signal-source cur.[Amps], phase-angle [Deg]: Phase angle does not have to be entered. Omitting it will make the phase angle zero. A circuit list may have more than one SIG and each one may have a different current magnitude and phase angle; all stimuli are "locked" frequency-phase, so phase angles are relative to one another. Current magnitude _and_ phase angle applies only to frequency-voltage solutions. For time solutions, current magnitude entry is equal to the peak current of a waveform. Any phase angle entry is ignored for time solutions. On output of a circuit list, the display will be as if the circuit had a frequency-voltage solution; i.e., magnitude and phase-angle. A zero phase- angle will not be displayed, only assumed. LENA - Page 27 of 46 . MACROMODEL ENTRIES Only the Type Description of a macromodel is required at the Type and Nodes prompt. Once the Type Description is entered, a second prompt for specific nodes for that macromodel is given. For illustration, let's assume a Bipolar Transistor called "Q67" is to be entered beginning at Branch number 5 with Base node at 8, Emitter node at 9, and Collector node at 10. The screen display of prompts and entries might look like: Branch 5, Type, Plus-node, Minus-node: Q67 Base, Emitter, Collector nodes: 8,9,10 If the LENA user is familiar with node entry order, the one-line 'shortcut' method can be used. The screen display of prompt and entry might look like: Branch 5, Type, Plus-node, Minus-node: Q67,8,9,10 Either form is correct for LENA. Once all the nodes have been entered, the first set of Values is prompted. There is no further 'shortcut' entry method for Values of macromodels. Users have to follow the prompts. Node entry order for other macromodels is as follows: Transformer > Primary, Secondary, Primary Return, Sec. Return nodes Transmission Line > Input, Output, Common nodes Op-Amp > Non-inverting Input, Inverting Input, Output, Common nodes Note that while the transformer macromodel is designed for DC isolation, one node of the primary and one node of the secondary may be the same node. The Transmission Line macromodel is entirely passive. "Input" and "Output" labels only serve as identification. REQUIRED-LISTED MACROMODEL VALUES Individual macromodel branch data is not immediately available. Macromodels are described and listed in parameters which apply to the entire macromodel. These parameters are: Transmission Line * Characteristic Impedance in Ohms. * Velocity of Propagation (if entered zero, defaults to 0.75) * Length in inches (If length is Metric, users must convert prior to entry, using legal conversion of one inch equals 2.54 centimeters) * Attenuation per 100 foot length (obtained from cable tables or handbooks) If the attenuation of the entered line length is known, user should enter Attenuation-per-100-feet as known-attenuation LENA - Page 28 of 46 multiplied by 1200. There is no compensation of attenuation variation with frequency; users must limit frequency-sweep range for accurate attenuation effects. Ideal Transformer * Primary Inductance * Turns ratio, primary to secondary * Coefficient of coupling Coefficient of coupling is limited to a range of 0.001 to 0.999. Bipolar Transistor * Hfe, forward current gain, common-emitter (at Ic) * Ft, cutoff frequency (at Ic) * Ic, average DC collector current * Hoe, collector conductance, mhos, common-emitter (at Ic) Collector current DC value must be entered even if the Base bias network is described in the circuit. LENA does not "set" the DC collector current from any DC bias network. Operational Amplifier * Open-loop Voltage Gain in Decibels * "Corner" frequency where 20 db slope per decade voltage reduction intersects open-loop voltage gain. * Input resistance, assumed identical for both inputs. * Output source resistance. SEEING THE FULL CIRCUIT LIST Enter "LIS" or "LI" or "L" at the Main Command level. The Circuit List will appear headed by a title display. For long lists, the Pause key may have to be pressed to stop scrolling. Branch information is reasonably easy to understand without further explanation. Note: Although all non-integers are stored internally to the equivalent of 15 decimal digits, Value display is rounded-off to no more than 6 decimal digits. Any OPEned branches will be indicated by the * asterisks * in the spaces between that branch's data. The last line of the title block also displays branch numbers of opened branches; if none are switched open, the last line indicates so. Dependent branches in a dependent current source List-line are identified by both list branch number and Type Description, in that order. LENA - Page 29 of 46 CIRCUIT LIST HARDCOPY Make sure the printer is powered on, then enter ON at the Main Command. The Main prompt changes from "MAIN*>" to "Main->" indicating the output is directed to the printer. If your display has color, the "Main->" will be white letters on a screen-wide blue bar. When output is directed to the printer, there is no screen display for that output but the word "Printing" in flashing white letters on a blue background will indicate data going to the printer. All prompts, messages, entries will still appear on the screen but circuit lists, print tabulations and plot graphics are directed to the printer port. A reminder: LENA takes care of full printer page formatting. Before sending anything to the printer, position the paper so that it begins on the top edge of the paper. The end of a printout will stop at the bottom of the last page, ready for the next page. If a printout has been completed and output is to be directed back to the screen, enter OFF at the "Main->" command prompt. The prompt changes back to "MAIN*>" (yellow letters on black background) and the printer 'pops' one line feed, positioning itself at the top of the next print page. That 'pop' is a peculiarity in I/O handling of the MS-FORTRAN runtime package; the last character, usually a line-feed, is stored internally and will not be sent out until another output is started, the printer port is closed (OFF command), or exiting LENA. CIRCUIT LIST EDITING -------------------- The Edit commands are ADD, MODify, DELete, INSert, OPEn, and CLOse. They are all done from Main Command level. Except for ADD, which re-starts Circuit Entry immediately after the highest branch in the current list, all will return to Main Command level when completed. All Edit commands have been described prior to this section. Except for ADD, they will require a branch identification. That identification may be either Branch Number or full Type Description. If the identification is incorrect, a warning message will be displayed and no further action taken except a return to Main Command level. A reminder: Except for OPEns and CLOsures, alterations in the Circuit List are _final_. Old values and deleted branches cannot be restored. If versions of a circuit are desired to be kept for comparison, they can be sent to disk. See Disk Operations for storage and retrieval. SPECIAL NOTE ON INSERT COMMAND On the "INS ", the refers to where the new, INSerted branch will be located. The existing will be moved up in the circuit list to INSert the new branch. From there, everything is as it was with Circuit Entry, except that completion of a single branch or macromodel INSert will return to Main Command level. LENA - Page 30 of 46 . SPECIAL NOTES ON ALL MACROMODELS When an Edit command identifies a macromodel by Branch Number, it is possible to call out _any_ of the 3 to 5 branch numbers of that macromodel or just the Type Designation of the macromodel. LENA takes care of identification/ordering of a macromodel. A MODify will not operate with macromodels. INSert, DELete, OPEn, CLOse will all operate on the _entire_ macromodel. It may not be desireable to OPEn and CLOse an _entire_ macro-model; it may be preferred to disconnect/connect just one node. In that case, sacrifice a branch and node such that a single branch connects that macromodel node to the rest of the circuit. The single branch could be switched OPEn or CLOsed to achieve the disconnect/connect of one node. DISK DATA FILES --------------- LENA has two types of data files, identified by file extension: .LIN = Circuit Lists .LNA = Solutions The file extensions are appended automatically for both reads and writes. Users need only specify the filename. Filename follows DOS syntax: 8 characters maximum, first letter alphabetic, underline and dash allowed as symbols, no spaces within filename. DOS itself does error-checking on filenames; LENA interprets some DOS error codes to present clear-language error messages. All data files have values written in ASCII characters, and are otherwise indistinguishable from text files. For data field specifications on all data files, see the Appendix file LE_APX_A.TXT. SETTING THE DATA STORAGE DRIVE:\DIRECTORY PATH At LENA start, the Drive and Directory for all data files is, by default, the same Drive and Directory where LENA itself is located. The user may specify another location from the Main Command level by entering DRI or DIR. LENA will display a prompt for the Drive:\Directory entry showing the entry length for the Drive:\Directory string between vertical bars. Use conventional DOS syntax with the Drive:\Directory string; i.e., alphanumeric characters, no punctuation, limiting symbols to dashes and underlines, 8 characters per directory name. The following entry would be acceptible: C:\IN1492\COLUMBUS\SAILED\OCEAN\BLUE\ ^ The trailing back-slant delimiter symbol need not be entered...LENA will include it if missing. Drive C: and all five directories should already exist. LENA will reject all read/write commands to non-existant drives or directories. Note: To check the disk(s) or to inspect the available directories, enter "DOS" from Main Command level, then enter "COMMAND" (7 letters) LENA - Page 31 of 46 to stay in the DOS shell. Conventional DOS commands can be used for inspection or directory creation. When DOS operations are completed, enter "EXIT" (4 letters) at DOS level to return to LENA. LENA has remained in memory, all data intact. For short Drive:\Directory strings, it is possible to enter everything in one line at the Main Command level. The preceding example could have been entered as: DIR C:\IN1492\COLUMBUS\sailed\ocean\BLUE Alphabetic character case is not important on entry. Each Drive:\Directory entry completion has a confirmation prompt repeating the entry in all- capitals. READING/WRITING CIRCUIT FILES To read in a Circuit file, enter "R " at Main Command. If no filename is entered and no circuit list exists, LENA will prompt for the filename, the prompt including an 8-character space for the filename. If a circuit list exists, or did exist, the circuit _filename_ is in storage and LENA will display the name, then query whether or not to use it. The prompt ends with "[Y/n]" and the capitalized "Y" indicates that depressing the key alone will signify a Y for yes. Entering N (no) to the query displays a prompt for a new filename entry. When the entry is completed, the Circuit read is done and a prompt is shown, indicating "New circuit read in, old circuit discarded." This is followed by a display of the node of solution, the highest node number in the circuit. To write an existing Circuit to a disk file, enter "W " at the Main Command level. If the filename is omitted, LENA will prompt for one in the same manner as a Read. Caution: Using the same filename as an existing file will cause the existing file to be over-written. The only way to save an existing file is to vary the filename of the Circuit to be written. When a Circuit Write is completed, control returns to Main Command level without further reminders or prompts. CIRCUIT CREATION DATES AND REMARKS Any time a Circuit Value is MODified, or any time a branch is DELeted or INSerted, that time will be set into the "creation date" of the Circuit. Creation Date is Read from, and Written to, disk. That is separate from DOS' own file Write time-stamp; alteration may take place some time before a new file is written. Creation Date is a convenience for keeping track of several Circuit versions. It is also useful to include short notes about a Circuit. The "REM" (also "*") entry at Main Command level allows writing a 47-character Remarks string for such notes. The Remarks string can be entered between vertical bar symbols or directly, using "REM ". Depressing the LENA - Page 32 of 46 key without entering anything will result in a blank Remarks string. A Remarks string will remain as-is until changed manually or a new Circuit is read in from disk. A Circuit Read will displace any old Remarks string with that stored in the file, including any file-stored string which is all-blanks. SOLUTION STORAGE AND RETRIEVAL Any completed Solution may be SAVed by entering "SAV " at the Main Command level. If is omitted, its entry will be prompted. Data stored consists of the magnitudes and phase angles over all frequencies of solution, frequency limits, type of solution (frequency- voltage, impedance, etc.), time-and-date of solution, and the filename of the Circuit solved. Solution filenames may be the same as Circuit filenames; file extensions identify which is which. A Solution may be retrieved by entering "BRI " at the Main Command level. ('BRI' for BRIng back) This restores the solution data and displays the filename of the Circuit solved (stored by a SAVe). Solutions may be viewed directly but _conditions_ of analysis-solution may not be changed; i.e., if a frequency-amplitude solution is brought back, you cannot request an impedance solution since the circuit itself may be missing or the circuit does not have the same node maximum. Similarly, you cannot change the Node of Solution other than what was originally SAVed. Some care should be exercised with BRIng. You may BRIng back a PLOtted solution, change scale limits to whatever you want, print out a new PLOt, even do a PRInt-tabulation. This can be very useful in recording analysis data or visually comparing solutions, but there is no greater capability of that function. Note: A great number of combinations of conditions were tried for deliberately setting up a program crash situation. None were found but it might happen if BRIng is used improperly. The principal reason for Solution storage is to permit external program data formatting/presentation. Viewing or hardcopying previous solutions is only the secondary reason. COMPATIBILITY WITH LINEA DATA FILES LENA's circuit-list and solution files have an identical structure to those of LINEA. LINEA-generated circuit and solution files are compatible with LENA. LINEA has a third type of data file containing repetitive waveform coefficients (.LWC). Since LENA has no waveform reconstruction routines, that file type cannot be used with LENA. LENA - Page 33 of 46 SOLUTIONS AND OUTPUT -------------------- GENERAL SOLUTION ORGANIZATION OF LENA LENA has two major solution forms: Frequency-voltage ('Frequency'), and Impedance. Frequency-voltage solutions yield voltage magnitude and phase angle at one selected Circuit node at each frequency of a specified frequency sweep. Impedance solutions find the impedance at one selected node at each frequency of a specified frequency sweep. Frequency sweep is selectable up to a maximum of 200 discrete frequencies. Two forms/format of output are selectable: Tabulation ('Print') of written values or Graphical ('Plot') equivalent using characters in a simulated plot. Either output form is available from one solution. LENA compares all requested solution-output combinations requested with previous solution-output combinations, calling the time-consuming mathematical analysis-solution calculation routine only when required. Users need only request output and form. SCALE LIMIT SELECTION ON PLOT Every parameter kind in a PLOt is scanned for minimum and maximum value, then displayed with a query as to whether those extremes are to be used as scale limits. Pressing the key without entering anything else will set solution extremes as scale limits. Entering specific numerical values will make those values the scale limits. If desired, all PLOt scales can be 'flopped' left-for-right by specifying scale limits in reverse order. Specific scale value entries follow the 'data word' rules of LENA. Omitting a data item, entering only the separator character (comma, semicolon, forward-slant), will make that data item zero. Degree limits for phase angles in Voltage PLOts are fixed, _not_ set by the solution. At LENA start, those degree limits are -180 and +180 degrees. Degree limits may be set to anything else and will remain at those settings until changed again. TWO FORMS OF IMPEDANCE PLOT Either Polar or Rectangular complex form may be selected for Impedance PLOts (both forms are tabulated together in PRInts). At the query, pressing key without entering anything else will select Polar form; an "N" for 'no' must be entered to select Rectangular form. Polar form _phase_angle_ scale limits are default-set by solution values or reset by user entry, unlike the Frequency-Voltage PLOt degree setting rule. LENA - Page 34 of 46 SYNTAX ON SOLUTION TYPE AND FORM Only two Main Command words are required, one to select Type, the other to select Format. They may be in either order. "PRInt FREquency" will yield the same solution and tabulation as "FREquency PRInt." Or, to simplify entry, "P F" or "F P." Or a three-letter acronym can substitute for either double word. "PRF" would be equal to "P F" or "F P", itself being an acronym for PRint Frequency. GENERATING PLOT ARTWORK ASCII-character "plotting" is rather coarse. Quick, yes, but still too coarse for smooth graphic output. The character plot outputs can made in sections so that a 2X to 10X larger master can be generated for tracing finished art. The only requirement is that frequency spacing is continuous and the scale extremes set to allow amplitude-phase-delay to be continuous. All scale extremes may be set manually, including reverse, left-for-right direction. Solution files may be read by an auxilliary program (not included) which can format data to whatever output device is available. Solution file data is composed of ASCII characters in generally-decimal format. Records and data fields are described in Appendix file LE_APX_A.TXT. SINGLE DC OUTPUT It is possible to PRInt and PLOt zero-frequency (DC) output but hardly necessary to send such output to the printer. A DC-only PRInt or PLOt will have only one line; manual notation at each node will be as easy as printing one page for each node. To set DC-only from Main Command, enter "F DC" or "F 0,0,0". There are no provisions to analyze-solve all nodes at one output command. It is possible to examine the DC stability of transistor bias networks and the like, but somewhat cumbersome to perform with LENA. A branch(s) for base-emitter diode voltage drop must be added and, possibly, an IDC branch to simulate varying supply voltage to the bias network. MODify edit functions can vary those values, plus the bias network values to see the effect of change. It may be that conventional, manual techniques, using a pocket calculator are quicker and easier. LENA - Page 35 of 46 . CONVERTING FROM SCHEMATIC TO LISTING ------------------------------------ LENA doesn't have any way to convert from a symbolic schematic drawing to a Circuit List. To fully analyze and solve frequency response of a circuit, you need to convert the components into the nodes and branches which LENA will recognize. Most of those branches are simply duplicates of schematic symbols. IN THE BEGINNING... ...there was scratch paper. As a suggestion based on others' experiences, enough paper should be available so that you can redraw schematics, make notes, and tabulate all the branches before keying a circuit into LENA> A few things will not appear the same as either schematic or actual actual circuit or may require different components. Redrawing the schematic saves the original diagram. Node numbering can follow signal flow, low node numbers toward input, high numbers toward output. That also results, generally, in quicker solution execution times. LENA produces the same solution results regardless of node ordering. One method is to mark redrawn schematics with node numbers enclosed in a circle, a distinctive marking not usually used as a symbol except in "Sams Photofact" (tm) schematics. Passive components can convert readily to single branches. Since LENA allows up to 8 characters for type descriptions, you can use conventional reference designations such as "R-12," "C-5A," and so forth. Follow the signal flow again, branches beginning at signal input, generally ending at signal output. NODE NUMBERS MUST BE CONTIGUOUS LENA will check for missing node numbers and display a prompt indicating each one. LENA won't "crash" but it will stop analysis of the circuit (error message shown) or result in zero node voltage or impedance. It is better to organize the node ordering in the beginning to avoid missing node numbers. During the course of analyzing-solving a circuit, a connecting branch may be manually OPEned. If such an OPEn results in the equivalent of a missing branch number, analysis may stop with an error message or produce a zero solution. Again, non-fatal, but it can cause some confusion until the user understands what was done. It is better to plan ahead and anticipate which branch openings might result in breaking signal flow. COMMONS, "GROUND" AND SUPPLY LINES Overall circuit 'ground' (or 'earth' common) is ALWAYS node 0. Always. Power supply lines can _also_ be node 0...provided they are well bypassed to ground in the actual circuit. This is a startling departure from usual circuit thinking but, considering LENA does the equivalent of "small- signal" analysis-solution in frequency domain _only_, quite acceptible. LENA - Page 36 of 46 LENA doesn't normally set bias, enabling DC control of collector current, or the like. In "small-signal," frequency-domain analysis, all voltages are presumed to be linear. There are no provisions for simulating transistor or diode saturation or cut-off. As far as AC and RF are concerned, power supply lines are just another common; if well bypassed to ground, they can BE ground to LENA. If there is some doubt as to a supply line's bypassing, use a separate node or nodes for that line and simulate the bypassing, using series R-C branches for electrolytics (resistance approximately calculated from an electrolytic's ESR), possibly even small inductances in series with capacitors. It is possible to model a very-high-gain amplifier circuit in LENA. [over 200 db gain is possible] High-gain amplifiers might have destructive feedback via inadequate supply line decoupling. LENA can show such feedback without simulating the oscillation that would happen with a real- world circuit. PARASITIC REACTANCE, RESISTANCE LENA branch types LQ and CQ are good for simulating lossy reactances at RF. For practical programming and memory reasons, Q is the same at every frequency except DC. A quick look at Q tables from manufacturer's data sheets indicates Q does vary at least 2:1 over a wide frequency range. Accurate simulation might require limiting analysis bandwidth, modifying Q for the next limited analysis bandwidth, and so on. LQ branches are simulated internally by a series R-L equivalent, resistive part equal to inductive reactance magnitude divided by Q. CQ branches are simulated internally by a parallel R-C equivalent, conductive part equal to capacitive susceptance magnitude divided by Q. Together, an LQ branch and a CQ branch can accurately portray a real L-C resonant circuit. Resistors have some parasitic capacity in parallel with resistance, varying from 100 femtofarads (SMTs) to 1 picofarad (axial-lead types). At frequencies where that capacity becomes significant, a PRC branch should be used. If a circuit has very long leads on a resistor, lead inductance can have an effect on total component impedance but can be simulated with an SRL branch. A capacitor with lead inductance or an inductor with lots of winding capacity must each use two branches. The most difficult part about modelling parasitics is _knowing_ what the parasitics are. LENA can't help you there, but, once known, LENA can simulate parasitics exactly. CURRENT THROUGH DEPENDENT BRANCHES Using a type HFS dependent current source to monitor current through a branch is an excellent _non-intrusive_ technique of analysis. There is absolutely no 'probe capacity' or change in any measured branch due to the real-world measuring equipment. However, some of us 'schematic oriented' analysts may fall into a trap with certain branches. LENA - Page 37 of 46 LENA's double-component branches LQ, CQ, SRL, SRC, PRL, and PRC are analyzed as complex quantities at each frequency. If you want to measure the current through an LQ, you will get the current through the _entire_ series R-L equivalent branch, not just the inductor. With a type CQ, current is the total to the parallel R-C, not just the capacitor. Measuring separate resistive or reactive currents requires a circuit having only resistance or reactance. VOLTAGE ACROSS DEPENDENT BRANCHES The voltage across a dependent branch for a type GMS dependent current source is straightforward. It should be kept in mind that voltage polarity depends on the ordering of Plus and Minus nodes for a dependent branch. You can visualize a GMS's dependent branch as having a differential voltmeter connection to the GMS...reversing the 'voltmeter' leads will reverse the 'reading' polarity. CREATING "STIFF" VOLTAGE SOURCES Ideal current sources have infinite source resistance. Voltage across such a source is the voltage drop across _everything_ connected to that source. While that will correctly model a transistor collector or drain, or a vacuum tube plate, you may want a very _low_ impedance voltage source or one with a specified source impedance. LENA allows real-world-impractical voltage sources. A 1000 Ampere current source across a 1 milliohm resistance will produce a 1 Volt voltage source having a source impedance of 1 milliohm. Add a series resistance of, say, 50 Ohms, and you have a voltage source with a 50 Ohm source resistance. A Mega-Ampere current source across a micro-Ohm resistance makes an even 'stiffer' voltage source. Such is quite within the magnitude range of LENA. NEGATIVE RESISTANCE OR REACTANCE There are a few _theoretical_ equivalents to real-world circuits that require 'negative' value components. LENA allows this; just enter a negative resistance, capacitance, or inductance. Negative values do not change the magnitude of single-component branches, only the phase-angle/polarity. A negative inductor has inductive reactance magnitude proportional to frequency, a negative capacitor has capacitive reactance magnitude inversely proportional to frequency. OPERATIONAL AMPLIFIER CIRCUITS All 'Op-Amp' Integrated Circuits have a built-in "breakpoint" frequency where the open-loop gain begins to fall at a rate of 20 db per decade of frequency...and also produces a definite phase-shift at higher frequencies. This _will_ affect overall response of ideal voltage-frequency-selective circuits which don't have compensation for that Op-Amp phase shift. LENA - Page 38 of 46 If you are analyzing a circuit which is questionable as to such phase-shift compensation, try setting all Op-Amp macromodels to high Megahertz breakpoint frequencies at first. Get a hardcopy response printout, then replace all the Op-Amp macromodels with those having a lower breakpoint frequency, re-analyze, finally comparing the responses. Note: At least two hardcover textbooks have circuit examples and tables of values, all of which assume _ideal_, no-breakpoint Op-Amps. Such circuits will only work as advertised over a frequency range _below_ real-world Op-Amp breakpoint frequencies. FIELD-EFFECT TRANSISTOR MODELS These were not included in LENA because they are simple enough to model with four conventional branches: Three single capacitors representing the three junction capacities and a GMS across the Source-Drain junction dependent on Source-Gate capacitance voltage. BANDWIDTH-ALTERABLE NETWORKS WITH THE TRANSFORMER MACROMODEL Double-tuned transformers with specific coupling coefficients are a simple way to set the passband of an amplifier. Coupling coefficient k is one of the critical items. The transformer macromodel can be used quite effectively in the analysis-solution of such circuits since coupling coefficient is one of the parameters of the macromodel. There is one word of caution on such use: The macromodel does not include quality factor Q and Q is often the other critical parameter. Q of a tuned transformer can be modelled with parallel resistances across each winding. Resistance value is Q times the resonance-frequency inductive reactance. An alternate can be a series resistance with each winding, resistance equal to resonance-frequency inductive reactance divided by Q. The alternate requires at least one extra circuit node, which may not be practical in large circuits. Another possibility is to not use the macromodel at all and to manually calculate the four branch values illustrated under TRANSFORMER MACROMODEL DETAILS. The difference here is that each winding can use an LQ branch type instead of a pure inductance. CREATING "BLACK BOX" SUB-CIRCUITS If you have a component with _known_ characteristics over frequency, some creativity will allow a combination of branches to simulate that component. LENA will allow tailoring that "black box" simulation to fit the known characteristics. That may take several nodes. To apply such a simulation to the entire circuit, it can be re-created there...but the nodes needed _within_ the simulation cannot be connected to other parts of the entire circuit. LENA - Page 39 of 46 . INSTALLING LENA =============== LENA PROGRAM SET FILES README.1ST - Short text description of LENA Program Set. LENAMANL.TXT - Text file, description/instruction for LENA program. LENACFG.EXE - Configuration program, LENA.CFG file generator. LENAS.EXE - Standard/non-coprocessor version executable. LENAN.EXE - Numeric coprocessor version executable. LENAMAIN.HLP - On-line Help file for LENA Main commands. LENACKT.HLP - On-line Help file for LENA circuit model types. LENAREG.TXT - Text file for LENA Registry SINGSHOW.LIN - Circuit file example, all single branches. TRANSFRM.LIN - Circuit file for transformer macromodel circuit. TLINE.LIN - Circuit file for transmission-line macromodel. BIPOLAR.LIN - Circuit file for transistor macromodel circuit. OPAMP.LIN - Circuit file for operational amplifier macromodel in a Sallen-Key low-pass filter. PHASER.LIN - Circuit file, audio phase-shift network for a phasing-method SSB generator. PHASER7.LNA - Solution file for PHASER circuit, node 7. RES100K.LIN - Circuit file, simple 100 KHz resonant circuit. FILE_ID.DIZ - Short text file description preferred in some BBSs. LE_APX_A.TXT - Appendix text on LENA data file structure. LE_APX_B.TXT - Appendix text on use of example circuit PHASER. LE_APX_C.TXT - Appendix text on Configuring LENA, use of LENACFG file. LE_APX_D.TXT - Appendix text, history of LINEA - LENA, other CAE. LE_APX_E.TXT - Appendix text, comparison of LENA with other programs; transferring circuits to/from SPICE net-lists. LENACMND.LST - One-page list of main command words for optional user reference. CIRCTYPE.LST - One-page list of circuit model Type words for optional user reference. CPUID.EXE - CPU/numeric coprocessor identifying program; public domain from Intel Corporation. LENA.CFG is required to run either LENAS or LENAN (or their renamed equals) and that file is generated by LENACFG.EXE. LENACFG must be run first. Answering the few questions in that program will set up constants for incorporation into the created LENA.CFG file. LENACFG does not alter any other computer system data. LENACFG will ask for your computer system's CPU (Central Processor Unit) type and whether or not you have a numeric coprocessor. If you answer "don't know" to that question, it will prompt you to run CPUID from within LENACFG. CPUID will produce a one-line statement indicating the detected CPU and coprocessor. All .EXE files are compiled to run with an 8086 or higher CPU (every PC except the very first). If you have an 80386DX or 80486DX CPU, the numeric coprocessor is built in. The last action of LENACFG is a request to rename/copy either LENAS or LENAN to LENA. LENAS is compiled to include software mathematics routines and will run whether or not a numeric coprocessor is present. LENAN is compiled with in-line calls to a numeric coprocessor and is smaller in code size and much faster in execution. Trying to run LENAN on a computer without a numeric coprocessor will result in a system "hang." LENA - Page 40 of 46 Once LENA.CFG is created and LENA.EXE copied/renamed, copy/move those two files and the two .HLP files to a more-permanent directory. All four should reside in the _same_ directory. Data files (.LIN and .LNA extensions) may be in a different directory. Note: LENA allows for Data files in other drives:\directories but, when first run, assumes the same drive:\directory as LENA.EXE and LENA.CFG. The Help files (.HLP extension) are optional. As an alternate to the Help files, the enclosed .LST files are each one page, containing Main Command words and circuit model Type words. It is recommended that LENAMANL.TXT be printed out first. This text file (the document now being read) is formatted for 8 1/2 by 11 paper size, 75 character maximum line width (5-character left margin provided), 66 lines per page and is directly printable by DOS command "COPY LENAMANL.TXT PRN". APPENDICES All LE_APX_x.TXT files are appendices for this manual. Users can append them to LENAMANL with any text editor, print them out separately, or leave them as they are. Those references were split from the manual text so as to make the manual more manageable. CPUID.EXE is a public-domain executable file that may be used elsewhere or on another computer to identify CPU type. It was written and assembled by Intel Corporation. It is included as an aid to running LENACFG. REGISTRY The LENA Program Set is _not_ free. It is Shareware. You are free to use it on a trial basis for 21 days. After the trial period, continued use obligates the individual user to Register the LENA Program Set with the author. Full details on Registry are found in text file LENAREG.TXT and are briefly noted following: Individual user Registry is $30 U.S., payable by check or money order. This also applies to any business, organization, or educational institution after the trial period. Upon registration, each registrant is sent a disk containing the LENA Program Set without the registration message on-screen. CPU VERSIONS AND PROGRAM SET COPIES Installation of a numeric co-processor is highly recommended. LENA does extensive floating-point numeric calculation; a numeric coprocessor can greatly reduce execution times. Additional copies of the LENA Program Set (with choice of disk size, on high-density media) is available from the author for $10 U.S., postpaid, surface mail only. Additional copies may be ordered only by registrants. LENA - Page 41 of 46 FIRST-USE LENA PRIMER/TUTORIAL ------------------------------- This assumes that the entire LENA program set is on disk and that LENACFG has been run and completed. The following short primer assumes the user has some knowledge of circuit theory but is unacquainted with computer- aided design/engineering programs. ON-LINE HELP A short, 6-screen display of commands and circuit elements is available at the Main Command by entering HELp, HEL, HE, or ?. Help screens are always in the same order and all but the last have a "More [Y/n] ?" prompt. To get the next screen, just depress the key or enter "Y". To exit the Help display, enter "N" and it will return to Main Command level. Help screens are stored on disk as a Text file, approximately 10K in size. Users familiar with LENA may delete that .HLP file, if desired. If the .HLP is deleted, a Help request will only result in an error message indicating that the Help file cannot be read. Help file presence or absence does not affect LENA operations. GETTING ACQUAINTED WITH CIRCUIT LISTINGS At the Main Command, enter "READ SINGSHOW". This reads example data file SINGSHOW.LIN from disk into LENA, a non-working listing showing all available single-branch circuit components. A prompt will appear indicating a new circuit read in, old circuit (if any) discarded, and the node of solution, then return to Main Command. Enter "LIST" at Main Command. The circuit list will scroll up, headed by the title display showing circuit filename, when it was created, remarks for that circuit, node of solution, current time and date, and any branches opened. To get a printed copy, check that printer paper is positioned at the top of a page, enter "ON" at Main Command, then enter "LIS" again. The screen only shows the Main prompt which has changed from "MAIN*>" to "Main->" indicating output is directed to printer. Enter "OFF" at Main; Command prompt becomes "MAIN*>" again indicating output is to screen. [printer will do one line-feed on the OFF command, quite normal] List data is fairly self-explanatory. Branch type descriptions allow up to 8 characters maximum but only the first one, two, or three letters matter. The first branch is designated RESISTOR but it could also have been "R-1" or just "R" or even "R_FIRST." Note: Branch type descriptions will always be displayed as all-capitals, regardless of entry case. 'Plus' nodes and 'Minus' nodes have specific meanings only for current _sources_ and for dependent branches of a dependent current source. If this is confusing, please review the description of independent and LENA - Page 42 of 46 dependent current sources given earlier. 'Plus' and 'Minus' nodes would be arbitrary for a circuit composed entirely of passive branches. In the value columns, two-value branches will always have the same ordering as the minimum branch type description; i.e., an LQ branch would show inductance first, Quality factor second. The number of significant digits is rounded-off to five. There is a bit of shorthand in the 3-letter type description of series and parallel R-L and R-C branches. The first letter for a Series branch is "S." The first letter of a Parallel branch is "P." Dependent current sources GMS or HFS will always indicate their dependent branches by both branch number and type description. TRYING OUT A MACROMODEL Read in circuit file TLINE ("R TLINE" at Main Command), then List it. Note that SIG ('signal generator') and the two resistors (R-SOURCE, R-LOAD) are in the same format as with SINGSHOW...all three are single branches. Type "Z" is a minimum type description for a transmission line macromodel and occupies three contiguous branch positions in a List, corresponding to the three branches created and analyzed within LENA. Where single branches had node numbers under both Plus and Minus columns, a macromodel has only one node (under Plus column) with an identification of that node of the model (under Minus column). [A transmission line doesn't really have an "input" and "output" but that arbitrary identification is better than saying "one end" and "other end."] Values are shown for the entire model, not individual model branches. Enter "F 1M,50M,-15" at Main Command. This tells LENA to set a frequency sweep from 1 MHz to 50 MHz in 15 logarithmic steps. ["1M" and "50M" must use upper-case M for Mega] You can confirm this by entering "SET" at Main...resulting in a circuit title describing TLINE followed by frequency range. A SETtings display is screen-only and useful for checking current settings. Enter "PRI FRE" at Main...requesting a Print (tabulation) of voltage solutions over Frequency. Tabulation will scroll up on the screen. The node of solution is 2 and the voltage across R-LOAD is 22.800 Volts. LENA has a default zero-decibel reference of one volt so the DB column shows 27.15 decibels. TLINE has no reactive branches so the voltage remains constant over frequency. Phase angle at node 2 varies over frequency (expected) but Group Delay is constant at 13.556 nanoseconds. Group Delay follows actual time delay from a signal source to node of solution...provided that frequency increments are small enough and phase angle changes are smooth enough...it is a calculated value of differential phase angle divided by differential frequency. TLINE has a transmission line length of 120 inches and a velocity of propagation of 0.75, equivalent to a free-space path of 160 inches. Signal propagation at the speed of light (299,792.5 KM/Sec) over a 160 inch distance is 13.556 nanoseconds. Enter "DBR 25" at Main Command. This tells LENA to set the zero-db reference at 25 Volts. Enter "P F" at Main to repeat the tabulation of LENA - Page 43 of 46 voltage at node 2. Everything is the same as before except the decibels column shows "-0.80 db" instead of the previous 27.15 db. Enter "PLOT F" at Main. Three prompts will appear in sequence, each one indicating minimum and maximum solution values of voltage, phase angle, and group delay. To use solution extremes as scale limits, just use the key at each query. A simulation of a graph plot will appear following a circuit title header. Scale limits are shown on the graph top. Relative voltage in db [* mark] and Group Delay [^ mark] is fairly constant; phase angle [: mark] changes over the entire scale range. You can experiment with different scale limits by entering "PLF" (alternate single-word command for "PLOt FREquency") and then entering your own values at each limit prompt. Note: If there is no change in frequency limits, no node of solution change, no circuit change, LENA retains the first solution; repeated PLOts use the same solution data, changing only the simulated plot mark positions. Enter "NOD 1" at Main to tell LENA to solve for voltage at node one (signal generator or transmission line 'input'). Enter "PRF" at Main (shorthand for "PRInt FREquency"). Tabulation of voltage at node one shows a constant 25 Volt, 0 db, 0 degree phase-angle over frequency. Considering the 50 ohm characteristic impedance line is matched at both ends with perfect 50 Ohm resistors, this is expected at the signal source end of the line. To check the "input" impedance of the line, enter the following at each Main Command prompt: "O 2" (OPEn branch 2); "PR Z" (Print-tabulate Impedance). R-SOURCE has been temporarily disconnected and LENA will tabulate impedance "looking into" node 1. Impedance will be a constant, resistive 50 Ohms. [All signal sources are automatically disconnected during impedance solutions.] Perfect transmission lines with perfect resistive terminations tend a bit towards boredom. For variety, Open and Close the terminations and check voltage at each end, or use the Modify command to change the termination resistance values. This is quick way to see the effects of "open" and "shorted" transmission line sections over frequency. TRYING OUT CIRCUIT EDIT FUNCTIONS Read in SINGSHOW and note branch number four's list line. Enter "OPEN 4" at Main Command, then "LIST" again. Branch 4 will show asterisks between the fourth branch's data, indicating that, while it is still in the list, it is "struck out" of any analysis. Displays in color show an open branch in grey rather than cyan. Branch 4 is now disconnected but it remains in the listing. Note the bottom line in the circuit header display indicating number 4 branch open. At Main Command, enter "CLOSE 4," then "LIS." Branch 4 has no asterisks, indicating its connections have been closed to the rest of the circuit. The bottom line of the title display indicates that no branches are open. Note branches 5 and 6, then enter "DELETE 5" at Main Command. Enter "LI" to see the list again. Old branch 5 is gone and the former branch 6 now occupies that list position. All higher branches have moved down one. LENA - Page 44 of 46 Enter "INSERT 5" at Main Command. A new prompt for Type-Nodes will appear, indicating that INSert has jumped into the Circuit Entry. Enter "CQ,1,5" at the Type-Nodes prompt. Enter "5u,50" at the prompt for Branch 5 values. The Main Command will return. Enter "L" to see the list again. Branch 5 has been restored, and all higher branches have returned to their original branch order numbers. However, a 5 microfarad capacitor with a Q of 50 is unlikely while a 5 nanofarad capacitor is more realistic. Enter "MODIFY CQ" at Main Command. This results in a request for values of branch 5 (type "CQ"). Enter "5n,50" at the values prompt (being careful to enter a lower-case 'n') then List the circuit. Branch 5 has been changed to 5 nanofarads with a Q of 50. Note that the creation time and date is now the same as the current time and date. Enter "OPE 1" at Main Command. A prompt will appear indicating that branch 13 is dependent on an open branch and, as a result, branch 13 has been made open also. List the circuit to show both branches indicated as open. LENA has checked for this possibility after the OPEn command was completed. Had this check not been done, LENA would not have crashed or hung, merely stopped trying to analyze the circuit (and indicating it stopped) and returned to Main Command. LENA lets you know what caused most of the common errors. Enter "CLO 1" at Main Command, then List the circuit. Branch 1 is back to closed connection but branch 13 is still open. Notice also that 13 must have a separate CLose command to restore it. The extra CLOse command is necessary since one passive branch can be the dependent branch for several dependent current sources. Note the dependent branch description of branch 13. Enter "DE 1" at Main. A notice will appear that branch 12 is now open and dependent on a "" branch. Branch 1, "RESISTOR," will be gone from a Listing, all higher branches have moved down one list position, and the "HFS" branch is dependent on branch "0, ." LENA automatically opened the HFS dependent current source since it no longer has a dependent branch. The HFS cannot be CLOsed...but you can MODify that branch to be dependent on another branch that does exist in the circuit. Once the dependent branch exists, a dependent current source can be CLOsed and OPEned at will. You have the choice of entering a branch number or a branch's type description for any edit function. This is also true for entry of dependent branch of a dependent current source. LENA is quite flexible... and forgiving. An "ADD" at Main Command drops into Circuit Entry, beginning at the next highest branch number...operation is otherwise identical to "NEW." This is a good time to try out adding in your own circuit components, to get the "feel" of building a circuit. SAVING A CIRCUIT FILE, TRYING OUT DOS FUNCTIONS With SINGSHOW circuit edited to something else, enter "WRITE" at Main Command. A prompt will tell you that "SINGSHOW" filename exists and queries if you want to use that name. Enter "N" for no. Another prompt requests the new filename, cursor stopping at left-most position within two vertical bars. Enter something like "TEST1." The edited file will be LENA - Page 45 of 46 written to disk in the same directory containing LENA. Enter "L" at Main Command. The List header now shows "TEST1" as the filename, not "SINGSHOW." LENA always uses the last circuit filename entered as the filename of the circuit title. Using the "NAMe" command, just the circuit filename can be changed. Circuit title Remarks will remain the same as for SINGSHOW and that can be changed any time with the "REMarks" Main Command. Enter "DOS" at Main Command. This goes into a 'DOS Shell' with LENA held in memory. A prompt reminds you to enter "COMMAND" if you want to stay in DOS; the Shell is good for only one DOS command unless that "COMMAND" word is entered. Request DOS to show the directory. TEST1.LIN will appear in the directory list, indicating you really did write the circuit file. If you entered "COMMAND" once in DOS, you can stay in that environment until you enter "EXIT." You can change directories, delete or rename old files, do any DOS command. LENA remains patiently in the background, all data intact. [Note: This assumes your computer has a minimum of 142K free RAM] Entering "EXIT" takes you out of the DOS Shell and returns to LENA...the Main Command prompt will appear, indicating you returned safely. Enter an "L" for List and the TEST1 circuit will scroll up. Except for the DRIve and DIRectory commands, LENA has no other DOS functions within program. The "DATe" command at Main is a user- convenience, display-only function; resetting the computer time and date must be done at DOS level. To change the DRIve:\DIRectory for LENA data files, drive and directory must _already_ exist; LENA doesn't create them. If a non-existant drive or directory is specified, a prompt is issued to that effect, no read or write is done, and there is a return to Main Command level. LENA - Page 46 of 46 .