RECOHP II USERS' PROGRAM NO. 1102
PROGRAM TITLE: 125-R FIRST ORDER SYSTE1~i (FLOATING POINT) PROGRAM CLASSIFICATION: Subrou tine
AUTHOR:
PURPOSE:
DATE:
w.
WellmanServomechanisms, Inc.
Research Division Goleta, California To solve the equation,
c - r =
'T
(dr/dt)for r, where c is given as a function of time.
11 M£W 1961
Published by
RECOUP Users' Library at
AUTONETICS INDUSTRIAL PRODUCTS
A DIVISIOn OF NORTH AMERICAN AVIATION, INC.
3400
E. 10th Street, Long Beach5,
Calif.DI!')ClAIMER
Although It is assumed that all the precautions have been
!aken to check out. t~is program thoroughly, no responsibility
IS taken .by the originator of this program for any erroneous
~esul!s, misconceptions, or mi:;rcpre:;entations that may appear
In thiS I?rogram. .Furthermore, no responsibility is taken by Autonetlc~ Industrial Products for the correct reoroductions uf this program. No warranty, express or irTiplied, i:; cxtend;;'d by the use or application of the program.
1ZSR Pa e 1
RESE~QCH D IV I S ION • SER\(';r.~ECH.A.r.; IS~,·S. INC ..
---=-::;.a_=_..::...,
PURPOSE:
FIRST ORDER SYSTEM (floating point)
To solve the equation, c - r = i (dr /dt)
for r, where c is given as a function of time.
METHOD:
The following recursion relation is used:
r
=
A ( c - c 1) + B ( r 1-c 1)+
cn n n- n- n- n
where: A= .2...(I_€-~t/·r) B
=
€-~t/TL1 t . ,
giving the. value of r at the n'th instant in terms of c at the n'th instant and.
the previous rand c at the (n-l)'th instant. Since all storages are upgraded internally, it is only necessary to enter the routine with successive CiS,
exiting with the successive r's, if the interval between n an.d 'n-l is unchanged.
The routine assumes that c varies linearly with time between points, so that it is only necessary to choose the points 0'1 c so that c is sufficiently well represented as a series of straight lines.
RESTRICTIONS:
T:>O
CALLING SEQUENCE:
TRA (location of this routine); exit is to next half-word. On entry, A and R should contain c ; on exit, A and R will contain r .
n n
Pa e 2
RESEARCH DIVISIOf\ • SERVOMECHANISMS, INC.---~~t.;;;..-=--
. PARAMETER STORAGE:
The following locations must be filled a8 indicat~d with the correct initial conditions before this subroutine is used. The rand c values are upgraded automatically; time i8 assumed to increase by an amount ~t
each time through the routine.
Lo + 30 r Lo
+
32 cLo
+
34 At Lo + 36 TIn addition, the following are calculated and made available in the location.
shown, but need not be filled with initial conditions.
Lo + 42 c-r Lo
+ _
44 dr/dtNew r 1 or c 1 values can be stored in the-indicated locations at any time,
n- n-
resulting in a discontinuitYi thus discontinuities in either. r or c can be solved for accurately.
A t may be changed a8 desired to provide larger or smaller steps in time, to show more or le88 detail, or to suit the nature of the input function' c. T may also be changed in a step-wise fa8hion, thus yielding an approxi- mate solution to many non-linear equations.
ROUTINE REQUIRED:
Exponential (AN -044) in 1050; called for by TRA instruction in (Location of this routine
+
46)STORAGE REQUIRED:
100(8) sectors, plus use of both high speed loops.
REMARKS:
Thelolution i. "exact" in that the recursion relationship will give the exact solution (except for round-off errors) if c varies linearly between
' . 10 0 4 A F< f v • 2 60
125R Pa e 3
RESEARCH DIVISIO\ . SER'v:CME(H,IH.IS~,45o I I \ ; C . - - - 1 I I : - - -
points and T is a constant. Non-linear and time-varying solutions can be approximated by choosing A t small enough so that T
is
essentially constant over each computation interval. The constants A and B in the recursion relationships 'are computed with an accuracy within O. 5 x 10 .. 10• TIME:
0.8 seconds to 80lve for r and evaluate A and B.
n
0.2 seconds to solve for r (no change in ~ t or , ).
n CHECKOUT:
This routine generated correct solutions to:
(1) simple step response: r
=
8(S+ 1 1)=
1- €-tiT
1
=
(2) non-linear sY8tem step response: r =~~---
a(1+ s+ ta)
FILE UNITERMS:
t
l+t
First Order System, Differential. Equation. Time Constant
~---~--~---~ ~, l{j 0 4'" fl.f'" 2 6 0
.
: ___ .a_-....-..-:.._- -
SM/I, Research Division, Digital Computing Facility Page
--L
of..LProgram No .. 12.5
R
Title F,~ iZ:Q
R. Q~&.S")!iZ::f:,..
Programmed by: Date
-
~-Il-' (
Loc'n. Cm'd -Addr. Contents Accumulator b Remarks
·0.0
fF·S·T ; "'."1.0 .
C·T·V .;2.·0.0
· I fS'h'~ i
7 ·7-1., ·j·o
T·Ft·A
2-1:..7.·7 ..
·0 .. -., 2.l...~ F·e·A F·~·B ·~·o
. 5'=6
~ ~ I ... tt ~..
~~ .. c;1 .)( ~ * -
·3 F·D>J ·~o·O -~ ('1- ) ( , -to -" )
~,-,
&A.
1---·7·tJD
~
.'\
~ 'O·ooo.o\
-·0·0 o.o.o.~.t) ) A·~ll
..
e··)·S
fi-·O·O 000·0.0,
-·oc ()
o~-t)·111
-6
It·o .() O·(';)·{).(')·o 'l3 ~"SB ... ·0·0 oo~.~.o·7
F·C·A, ·5-"6·0 1. 4:-hc.,..c If K <. 2,,,.,0rr:R.·A --
.]§'I)..
. ',0 F·C.A :!t~ .0 I(,.
F·s· ... r
:~ -:2.·0 <'01
· I F·s·S
l1·'·'·2.·0
~.~..
Reaur~o V":F·",·P .0·&1·0 Al~-tCo\ ./
. 2- 1='. S·T 7·'_·7 ·D.fJ 1a din • (
F.:.C,S
'·7·'·0;(;) ..
~.\
3
FAP7·'·b·"',0
~1!:2 ~D -"-0 J.f.nj.p
. t)·().o 8 BloCf) -ro) Ir
.~
Un 7·'·7·0·0
Al~·_~_'\-Bt rft-(~F·~·T ·~·~·o £ • III: - ,.. I
·S iF·!)·" 7·~~ ~ ;! )
F·S·T . . ~:~.c~
.f., F-e·A ~2·0 It!
,
"
F·5·6 ·..,·a·()
A: - .......
J---
.",
'F·S·7 ·3·0·{)"'0
~;
if·R.·A
...Q...e - - -. ~1- IT t- ~..
I,
.2.,.{) .... l).O O.()·O·o.o ~ _ A-t/y-0·0 000-0·0
,
• f .i-.Q.Q iOO·Q·()·O
1
-.O·D O·O·O·O()
1/ --
a.
,A·PI):7·2..7·,·0
:C·T·L. ·3·0·0 L,·3 :ST·(j ·lry·D e..J<.1f
F·e·S
,j·7·b·¥·O_
- 6. of.~
,F·D·V 7·j·,·hD
1'" - A.+: / '1'F·s:r '·7-'·lf
0.s
~·'5·B'·7·7·0·0
olJ l A~/,..)f-r.i'·E .7-'.0 .... ""'.,
~k~..
.tc.··k
P,C·A7·7·'·'t·{)
' J '. . . . . ..
.
'r-R·A
.~.,()·7 F·S.T
·3·0.0 !"\ b v """ tfI_,,·«·A
0.0.0.0·1 )~
-
,
SM/I, Research Division, Digital Computing Facility Page
--.3:.
of"3,
Program No .. I 2. S -(~ T i tl e
Programmed by: Date
_. S-tl .. "
Loc'n Cm'd .Addr. Contents Accumulat'or b
-
Remarks·3·0 i\ .'
I'~.
\.-1')
\•• J
' J. .
'. If
/T \\ , _1 I T I A ....·2 "
r\
~ r:.,....
~ .::. t ) I.l r::. IT-, ""
j ", \
·3 if
I· \
\ -
, ·4 1\
A~·
·5 - \-
J--
If
J,
. .b
i\.,-. /
~ ,f
. ., J - -;
j 17
~'
. ·1J.f) ,:+.'1.0
00·0.0.0i\
E -A<f:I-r·
I :
-.0.0(;:J.o·o·oo
· . ,
i - -~t.~q (::>0.0.0 .0, ·
'I
-.O.CI 0.0.0.0.1.
1 - - . _ . ~.--
r\
·2. ·f·O·D ()O·O.o.o 1..-
c-r
·
-.0·0 OOOO!)·3
r·oe
rJ.~~o.~ .0 }·
~ ..,'_.-.. ,:-.0.0 o~.C,.o/)
V
·
.If k-.O.C> 0. :~().C.O!\ ;'::
t'l",-.0.') ,-., ,,.., "... r, •.
, .
·
... .,.'.1._ ... ' •. , ... . J.~ "'·0.0 ~··,:.t .. ·~,.~.,::., I
-.0.0 D.C.C.O.O
V
6 IF·2.I.
' . ·2.;0·0j. IT-RA- l'O' s:~.o r\ l:" ~
.11 ...
·1 p.2»£,
'7.
7·'·~(.)
~ • AlJc_Jc.~;rR
·4b·' ..
"
.-~C C·T·l . bOO IT-IR.·A 7·7·'·0·0
·
.J +-·00 .00.0·0.0 '3(2J,g-.0..0 00.0·3.0 .'2,
+.,
·2'i.2..,.o.,
'/~J-q·o
'1-2·'·0·1·3 1+·4'()
0·0.0 ·0·0 1/7. !-·o·t>
0.0.0.00·
,It +·0·0 IO·S:S:Af·CII
fa' -·l..·b 6·0·4.·7·0· S
i+.t}:z. IS:
l·S"·~·1 IJ&f ,·
-.~ J.. ~.2·S.l..'. · '" +./.1
17·'"}·'"j·7·1 .,~1\
_f:l"'~ " ,. ,+-7·, ,·7·7·7·1 \
~7 +·o.() 0·0.0.0.0 ~,..~
J
-.D·C o·!')·C;·c>·t:> I
I~MI
I, Research Division, Digital Computing Facility P a g e i o f l Program No ..'25"- S
TitleProgrammed by: Date
S-'-ll -,
I-
Loc'n Cm'd .Addr. Contents Accumulator b Remarks
.,~ F·~·1" ·~·O·D ~ -w-
e8
-,Foe·A.
·:to.o
") - At/1---
-
---_.-
. t ·X·A·R ID,O·() ·()O
--
~.----.---·A·L.~S 0.0.0·'·0 CX-"_ 'I .cP·~8
-- .. -
.2-
·C;·"A17·7·"·5""·'
,~A'D'D ·571.0 '3Ci'~e· e-.p -+'!t
- . -
. '
.:3 rr-PL
·0·;)..·0 ,...:.... C 1(p ~ -3 -- x> 2-)..
~ ~.
c.'·V ·7·DtJ
I~ 1Ift/,. '" 'I A C~eu1A.t...
8 ..clir-e,.11,
t .~
L4--'O·D
. ().1o.(J 6of~ G38 c::.)\P "''It.rr-m.,
·()'70 ~ e AD ulfo ~. -~:~ 1-110 ~ ~d 8&.~_·5 IX·A~ 00·0·00' ,
I "
IA·R.S OOlJD·t;:
-•• ''1''
(FoI •.. .2-1.
\L > ~ ... e.b
5T·O,7·'J·7·..,·{j
vs~ ~dA.1 .!,.~~..I.It'» PR- ·).'10
"c.
t+.
cAI.:ul .. "t~ 8.7
~C.·T·L·s-oo
IAoO'D ·7·7·0 \( s-I
·7.{)
t1'Jp.R,.7·1·7·']0
~IA·DD
17· 7·/:'·S'·()
'I",!
.,
mPR 7·7·7':J 0 I..-
-~'."'---.-
" AD·D 1·7t, ·'2,.,0 "~
,
... _ •..-
.'2,. MP·R ?'7·7,'·rJ
"
lLf'ln
7·7·'
.~() 112. ,·3
ImPR7·7·,·,·1)
Ie_XI,,!
+ K'/~~_+K!', Fs-r ,·7·/:;·' .()
te-.* ..I.j F.C·A 7·71-·h·O ~
A-D-D '7·7·~·1 0
l ,
-I: -11/1')( ''1ot,].~ ,.'
·s
IC·,.L .~.> t).of. F·S;,- ·(j·J..fIJ
e
·
.l, -:';r.V .,.0.0I . ·T-R·A 'J. ']·7·CIo'IJ
"
.,
.,...OD J;. 2,.. I · 0·1 II ::J-·,·0
J.j.2,..,.{)./f . · . · · .
.
~ '"..
. . . '
· ·
· .
,