home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: bit.listserv.csg-l
- Path: sparky!uunet!usc!sdd.hp.com!spool.mu.edu!tulane!darwin.sura.net!Sirius.dfn.de!solaris.rz.tu-clausthal.de!news!zzwz
- From: zzwz@rrzn.uni-hannover.de (Wolfgang Zocher)
- Subject: Re: Primer for modelers: draft
- Message-ID: <1992Nov11.100607.17235@newsserver.rrzn.uni-hannover.de>
- Sender: news@newsserver.rrzn.uni-hannover.de (News Service)
- Organization: RRZN
- X-Newsreader: Tin 1.1 PL4
- References: <01GQY0F9Q842006FKI@VAXF.COLORADO.EDU>
- Date: Wed, 11 Nov 1992 10:06:07 GMT
- Lines: 80
-
- POWERS_W%FLC@VAXF.COLORADO.EDU (William T. Powers) writes:
- :
- : Experimenting with the control paradigm
- : A primer for computer modelers
- : DRAFT: William T. Powers
- :
- [ beginning part deleted ...]
-
- : The simplest control system to model on a digital computer is one in
- : which all the functions are simple proportionalities except the
- : output function, which is an integrator. Alternatively, the feedback
- : function or the input function can be made into an integrator;
- : however, only one function should be an integrator and the rest
- : should be proportional multipliers. We will use a design with an
- : integrator in the output function; you can experiment with the other
- : possibilities.
-
- Why should there be only one integrator?
-
- ..stuff deleted...
-
- : NOTE: I would appreciate it if programmers versed in BASIC, Pascal,
- : and other languages would write versions of the above program, test
- : them, and transmit them to me for inclusion in an appendix to this
- : primer. Programs should be as generic as possible so as to run on as
- : many computers as possible. I especially need versions for mainframes
- : and workstations. In the future I will simplify the program and make
- : it easier for the user to change parameters from the keyboard. For
- : now, I hope that all programmers and would-be programmers will try
- : the program as it stands and learn from it, even if you have to get
- : some help from a 14-year-old. As this primer evolves I will post
- : revisions and again ask for your help.
- : ------------------------------------------------------------------
-
- Here is a PASCAL-Version of your program. It should work on whatever
- platform ..
-
-
- program control;
- const kd = 1.0;
- ki = 1.0;
- ko = 8.0;
- kf = 1.0;
- dt = 0.1;
-
- var sp, sr, se : real;
- qi, qo, qd : real;
- i : integer;
-
- begin
- (* initialize variables *)
- sp := 0.0;
- sr := 20.0;
- se := 0.0;
- qo := 0.0;
- qi := 0.0;
- qd := 0.0;
-
- for i := 0 to 24 do begin
- if i > 12 then qd := 10.0 else qd := 0.0;
- qi := kf*qo + kd*qd;
- sp := ki*qi;
- se := sr - sp;
- qo := qo + ko*se*dt;
-
- write ('qd = ',qd:6:2,' qi = ',qi:6:2,' qo = ',qo:6:2);
- writeln (' sp = ',sp:6:2,' sr = ',sr:6:2,' se = ',se:6:2);
- end;
- readln;
- end.
-
- : Best,
- :
- : Bill P.
-
- --
- Wolfgang Zocher
- Regionales Rechenzentrum f. Niedersachsen
- Schlosswender Strasse 5
- 3000 Hannover
-