Date: Fri, 22 Feb 1991 15:03 CST
Subject: Re:  Nyquist Plot Program
Lines: 36

I have created two small programs for doing Nyquist plots, NYQL (does a line
plot) and NYQUIST (does a point plot).  Also in the directory is G, which
is the open-loop transfer function in terms of 'S'.  To do different equations
and values of gain just edit 'G'.  To plot in different ranges of
frequency (W) and step rates, simply change the values in the FOR STEP loop.
Change plot x/y parameters to approprate Real/Imaginary range of plot.

Hope this will help... although I'm sure it could be improved, at least it
gets the job done.

%%HP: T(3)A(D)F(.);
DIR
  G
    \<< \-> S '10/(S*(S         @ edit this transfer function, leave \-> S
+1)*(S+2))'                     @ in tact
    \>>
  PPAR { (-5,-10)               @ Real/Imaginary range of plot
(.1,20) W 0 (0,0)
FUNCTION C }
  NYQUIST                       @ Nyquist point plot
    \<< ERASE .001              @ Adjust .001 100 to appropriate start,
100                             @ stop frequency range
      FOR W i W * G
\->NUM PIXON PICT RCL
\->LCD .1                       @ Adjust .1 to appropriate freq. step rate
      STEP
    \>>
  NYQL                          @ Nyquist line plot
    \<< ERASE .001 i
* G \->NUM .001 100             @ Adjust .001 100 to appropriate start,
      FOR W i W * G             @ stop frequency range
\->NUM DUP 3 ROLLD
LINE PICT RCL \->LCD
.5                              @ Adjust .5 to appropriate freq. step rate
      STEP
    \>>
END
