Subject: Bode Plotter (Good One) Bode Plotter for the HP48sx The following is an ASC-> encoded program to display bode plots on an HP48SX. Download the program, press ASC->, then type 'BODE' STO. Directions are included below. INSTRUCTIONS FOR BODE PLOTTER First download and install the bode plot routines from the earlier posting. Enter the BODE directory. You sould see [BODED] [MAG] [ANG] [SMOO] in the first 4 menu entries. An example has been preloaded so just press [MAG] to see the magnitude plot for the tranfer function: H(s)=[50*(s*(1+s/10))]/[(1+s/10^4)*(1+s/10^7)] Once the plot has completed use the arrow keys to move the cursor around the screen. You can press [COORD] to get the cursor coordinates. The X-coordinate is the frequency (rad/s) in decades (e.g. x=1.5 => 10^1.5 rad/s). Tick marks are every decade. The Y-coordinate is in decibels (e.g. y=20 => 20 dB). Tick marks are every 20 dB. Now press [ON] to return to the menu. Next press [ANG] to see the angle bode plot. The X- coordinate is once again the frequency (rad/s)in decades (e.g. x=1.5 => 10^1.5 rad/s). Tick marks are every decade. The Y- coordinate is in degrees (e.g. y=20 => 20 degrees). Tick marks are every 20 degrees. Press [ON] to return to the menu. Now we will step through an example from the beginning. Press [BODED]. A temporary menu is created and the calculator is halted. The menu should now look like this: [S] [EQN] [BD] [ED] [PPD] [CONT] and if you press [NXT] you should see [ABORT]. You will now enter the tranfer function: 100*s/[(1+s/10)*(1+s/10^4)*(1+s/(2*10^4))] Next store it into EQN (left shift [EQN]). After that specify a beginning decade (0 left shift [BD]), ending decade (7 left shift [ED]), and the points per decade (7 left shift [PPD]). The higher PPD is, the longer the calculator will take, but a more accurate plot will result. Now press [CONT]. If you had wished to cancel the plot you could have pressed [NXT] [ABORT]. You will have to wait for approx. 90 seconds for the calculator to finish its computations. Once it is done you will hear 2 short beeps if BEEP is enabled. As before press [MAG] to view the magnitude plot of a band-pass filter and [ANG] to produce the angle plot. If you ever press [ANG] and the plot is split in two (due the value returned by the ARG function), then press [SMOO] to smooth out the plot and press [ANG] again. Do not use [SMOO] unless the plot is split otherwise the angle values taken from the plot will be incorrect. CREDITS: The bode plot routines were written entirely by Thedore W. Gregg and are copyright 1991, EXCEPT for the SPLOT and GETC routines (originally LPLOT and GETC) which were written first by Paul Dale and modified for use in these programs. You have my permission to freely distribute and use these routines for any non-profit or non-published purpose. FOLLOWING IS PAUL DALE'S DISCLAIMER FOR LPLOT AND GETC: ------------------------------------------------------------------ As usual, this program is copyright myself, 1991 all rights reserved but as usual, any non-profit usage of this program is ok by me (if you want to include it in your commercial software or publish it in a book/journal then you require my permission first --- it is usually given). Enjoy... Pauli seeya Paul Dale | Internet/CSnet:grue@batserver.cs.uq.oz.au Dept of Computer Science| Bitnet:grue%batserver.cs.uq.oz.au@uunet.uu.net Uni of Qld | JANET:grue%batserver.cs.uq.oz.au@uk.ac.ukc Australia, 4072 | EAN:grue@batserver.cs.uq.oz | UUCP:uunet!munnari!batserver.cs.uq.oz!grue f4e6g4Qh4++ | JUNET:grue@batserver.cs.uq.oz.au ------------------------------------------------------------------------ DISCLAIMER: These routines are provided "as is" with no expressed or implied warrantees. Any damage or losses caused by the use of these programs is soley the resposibility of the user. If you find these programs useful or have questions please drop me a note. If you can think of any way to speed them up please do so. --------------------------------------------------------------------------- \ Theodore W. Gregg | The most endangered species- the honest man, / \ MACC-Operations | Will still survive annihilation. / \ 1210 W. Dayton St. | Forming a world state of integrity, / \ Madison, WI 53715 | Sensistive, open, and strong. / \ gregg@macc.wisc.edu | (N. Peart) / ---------------------------------------------------------------------------