Академический Документы
Профессиональный Документы
Культура Документы
by
■of
Doctor of Philosophy
■in
Electrical Engineering
October 1991
D31S
ii
APPROVAL
Signature.
Date t O j 2.S ) 9 I
iv
ACKNOWLEDGEMENTS
Hashem Nehrir and Dr. Jim Smith for their helpful suggestions
are made to the above three for their patience and knowledge
simulation package.
appreciated.
TABLE OF CONTENTS
Page
LIST OF TABLES ................ Vlll
1. INTRODUCTION . . . . '. I
Hvdc Transmission 3
Hvdc Modelling . . . . 4
Hvdc Control ............. 5
Hvdc Modulation Control 12
Adaptive Control 13
Literature Review 14
Hvdc Modelling. 14
Hvdc Control 20
Hvdc Modulation Control 25
Hvdc Adaptive Control 29
Thesis Organization 31
Page
Introduction ................................. 61
Constant AC Voltage Control ................ 63
Constant DC Voltage Control ................ 65
Constant Reactive Current Control . . . . 65
Constant Power Factor Control ................ 67
Constant Active Power Control ................ 68
Constant Reactive Power Control ............. 69
Introduction .................................... 70
A p p l i c a t i o n .................................... 71
Introduction .................................... 86
Simulation R e s u l t s ................ .. . . . 86
Page
APPENDIX 168
viii
LIST OF TABLES
Table Page
LIST OF FIGURES
Figure Page
LIST OF FIGURES--Contimi^d
Figure Page
Figure Page
LIST OF FIGURES--Contimied
Figure Page
LIST OF F IGURES— G o n t l r m ^
Figure Page
Figure Page
Figure Page
ABSTRACT
CHAPTER I
INTRODUCTION
3 Hz) and interarea modes (0.2 to 0.8 Hz) [6,7] . A local mode
for proper operation of the power system. This has been the
Hvdc Transmission
Hvdc Modelling
Hvdc Control
current limits, tap changer control and signals needed for the
control, generates the firing angle for all the valves in the
the system.
6
minimum and the utilization of the dc line the best when the
than the current margin, then the inverter will pick up the
modes of operation.
current series system are full I2R losses even at light load
buffering of one system from the other. Even with the simplest
enable the hvdc link to vary power flow within the rating of
stability.
13
Adaptive Control
Literature Review
Hvdc Modelling
firing angle and the inverter margin angle are neither at the
the time constant associated with the firing angle control and
(less than few tens of ms) the integration time step required
Hvdc Control
as the load decreases keeping the power factor the same. Hammad
has also shown that with the CRC control, a current modulation
control [8].
wave distortions.
voltage (Vc) , and peak ac line voltage (Vp) [8] . Thus, here
Any deviations from the ideal voltage waveforms break the 120°
the harmonics [8]. However the use of filters will cause the
was found that the response time for per unit step change in
can be made to change its power flow at proper time. The above
two-terminal dc systems.
28
inverter end to damp the ac system voltage rise and large power
formance benefit.
cation links.
31
Thesis Organization
in Chapter 10, and time domain simulation results for the same
overall conclusion.
33
CHAPTER 2
HVDC MODEL
Introduction
[50] . The actual 2000 bus model from which the above
terminal bus e s .
main bus having the total load in that area lumped directly
ratings of 500 kV except for few which are rated 230 kv. The
V 345 M W
3288 MW
U
V
3 #
SC2
# 141(15 (16 #
SCI
modelled using normal d-q axis generator model and IEEE type
area NW2 and SCI (representing Pacific hvdc intertie) and the
scheme.
37
the upgrade.
using the same North to South dc line , thus making the system
3100 MW of p o w e r .
CeliIo Sylmar
400 Kv 1.8 KA 400 Kv 1.8 KA
ZS SZ
5
ZS
I
SZ
celilo
nz
in parallel
ZS SZ
ZS SZ Sylmar
ZS SZ
r —I
S ISZI
system stability.
Dc Power Modulation
chapter.
as follows [21]:
drops below 0.6 p.u. (Dv in Figure 4) [21] . Below this voltage,
Voltage (V)
K = Constant
aI = Margin Current
I DX= o!o~|
master clock and display panel [54]. The pole level controls
ADELANTO INTERMOUNTAIN
500 kV A C 345 kV A C
FIETER B A N K S FILTER B A N K S
+500 Kv D C
BIPOLE I
-500 Kv D C
+500 Kv D C
BIPOLE 2
-500 Kv D C
ADELANTO INTERMOUNTAIN
500 kV AC 345 kV AC
Model Implementation
Simulation Results
obtained a r e : ^
m o u n t a i n h v d c i n t e r t i e s r e p r e s e n t e d as e q u i v a l e n t r e a l a n d
terminal b u s e s ,
are very similar in all the four cases, some frequency components
machine for the four cases studied shows that the interarea
52
modes for the four cases are similar. This indicates that the
SR
—
Comm.
Trans. DC Bus
AC Bus Converter
Vac
Constant
Extinction
Angle
Control
- 10-
T im e (S e c .)
T im e ( S e c .)
-to-
T im e ( S e c .)
16.5 2780
-2770
1 5 .5 -2760
-2750
14.5-
-2730
| -------- Firing An8IT
"2720
-2710
12.5 -2700
-2690
1 1.5
Time (Sec.)
16.5 2080
-2070
15.5- -2060
-2050
14.5-
-2030
( Firing A n g l e 1X3 Curr e n t |
-2020
-2010
12.5- -2000
1990
11.5 1980
Time (Sec.)
F r e q u e n c y in H z
F F T Plot o f G e n e r a t o r A n g l e # 1 5
GainindB
F r e q u e n c y in H z
F F T Plot o f G e n e r a t o r A n g l e # 8
GainindB
F r e q u e n c y in H z
F F T Plot o f G e n e r a t o r A n g l e # 1 5
GainindB
F r e q u e n c y in H z
F F T Plot o f G e n e r a t o r A n g l e # 1 5
GainindB
■' 1.4
F r e q u e n c y in H z
F r e q u e n c y in H z
F F T P lot o f G e n e r a t o r A n g l e # 1 5
GainindB
F r e q u e n c y in H z
CHAPTER 3
Introduction
T h e c o n v e n t i o n a l w a y to o p e r a t e a n h v d c s y s t e m i s w i t h t h e
c o n s u m i n g t h e m i n i m u m q u a n t i t y of r e a c t i v e p o w e r . H o w e v e r if
It is p o s s i b l e to o p e r a t e t h e d c s y s t e m i n o t h e r m o d e s in w h i c h
background in o r d e r t o p r o v i d e a b e t t e r u n d e r s t a n d i n g of t h e
control functions.
c o n v e n t i o n a l c o n t r o l s c h e m e s at t h e i n v e r t e r t e r m i n a l is s h o w n
in F i g u r e 20.
DC Current
MEASURED
INPUT SIGNAL
NONCONVENTION AL
CONTROLLER
SET POINT
FIRING FIRING THYRISTOR
ANGLE PULSE FIRING
EXT. ANGLE SELECTION REGULATOR PULSES
(MEASURED)
EXT. ANGLE
EXT. ANGLE REGULATOR
(SET)
r e a c t i v e p o w e r p r o p o r t i o n a l to t h e i r r e a l p o w e r c o n v e r s i o n in
e c o n o m i c a l s o l u t i o n is to r e g u l a t e t h e r e a c t i v e p o w e r c o n s u m e d
64
I
66
limit the gamma to its minimum value and thereby avoid com
tap during and soon after the disturbance is quite large. This
power flow.
hold its power constant. Constant power control will not cause
ac bus voltages.
70
CHAPTER 4
Introduction
Application
method are then analyzed using the root locus technique. Root
special case of the general signal used in [7] which has the
( —sD, —siX
[Cq+ c^ +c2e
/Cr) (4.1)
s — X,71+1
8.
73
Controller Unfiltered
at Rectifier A C /DC Non-
Conventional Filtered
Power System Signals Signal
Low-Pass
Filter
Inverter
Firing Angle where A = 2ttf = 2jt(3) = 20.0
F i g u r e 21. I m p l e m e n t a t i o n of a g e n e r a l n o n c o n v e n t i o n a l c o n t r o l
scheme for Prony b a s e d a n a l y s i s .
o.o 1-O
Time (Sec.)
F i g u r e 22 . I n p u t s i g n a l u s e d to o b t a i n s y s t e m t r a n s f e r f u n c t i o n .
t r a n s f e r f u n c t i o n f o r e a c h of t h e o u t p u t s to s h o w t h e v a l i d i t y
fits the actual system response quite well except during the
that the movement of the poles associated with the local and
from the fact that the residues associated with both the
that these two controllers are unstable for this mode. It can
I I -------- A c iu jil O u t p u t
0.5-
T i m e (Sec.)
T i m e (Sec.)
- 100-
S -200-1
II -------- A c tu a l O u l p u t --------E a I im a U d C X iIp o I |
I -300-i
-400
-SOO-
- 600-
- 700-
T i m e (Sec.)
0.01-
O-
L
5 -0.0 1 -
I | -------- A c tu a l O u t p u t - - — E e tim a le d O u tp u t | I
I
Jf - 0 . 0 3 -
<
-0.04-
-0.05-
) i 2 3 4 5 6 7 8 9 1O
T i m e (Sec.)
- 20-
I-------- Actual Output Estimated Output I
-40-
-60-
-80-
-10O-
- 120'
Time (Sec.)
IO O -
40-;
T i m e (Sec.)
root locus
imaginary axis
real axis
root l ocus
30
20
10
imaginary axis
-10
-20
-30
-0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 O 0.1
real axis
p o r t i o n of interest expanded
F i g u r e 29 . R o o t - l o c u s p l o t f o r a c v o l t a g e s i g n a l at t h e i n v e r t e r .
81
root locus
imaginary axis
real axis
root l ocus
imaginary axis
real axis
root locus
imaginary axis
real axis
root l ocus
imaginary axis
real axis
root locus
imaginary axis
real axis
root locus
25
20
15
IO
imaginary axis
O
-5
-IO
-15
-20
-25
-4 -3.5 -3 -2.5 -2 -1.5 -I -0.5 O 0.5 I
real axis
root locus
10
8
4
imaginary axis
O
-2
-4
-6
-8
-IO
-30 -25 -20 -15 -IO -5 O
real axis
root l ocus
io
8
4
imaginary axis
O
-2
-4
-6
-8
-10
-2.5 -2 -1.5 -I -0.5 O
real axis
root locus
10
8
4
imaginaiy axis
O
-2
-4
-6
-8
-IO
-30 -20 -IO O IO 20 30
real axis
root locus
IO
4
imaginaiy axis
O
-2
-4
-6
-8
-10
-2 -1.8 -1.6 -1.4 -1.2 -I -0.8 -0.6 -0.4 -0.2 O
real axis
CHAPTER 5
Introduction
Simulation Results
local and the interarea modes of interest are very near each
inverter. The gain values used for both rectifier and inverter
are
through 46. For all other faults these figures have not been
G cw . A n * . # 4 ------- G e n . A n g . # 8
15
T i m e (Sec.)
Time (See.)
I--------A n g - # 4
T i m e (Sec.)
I --------G*w- A n g - # 4 --------
S 30-
T i m e (Sec.)
Time (Sec.)
T i m e (Sec.)
I --------G e n . A n * . # 4 --------
T i m e (Sec.)
-5-
Time (Sec.)
T i m e (Sec.)
8 30-
T i m e (Sec.)
<S -5-
Time (See.)
100 -
Time (Sec.)
-100-
-120
Time (Sec.)
Time (Sec.)
V v v v v
- 100-
-120
7000
I-------- Gen. Ang. #4
6000-
5000-
3000-
2000-
10 0 0 -
Timc (Sec.)
2000
I-------- Gen. Ang. #11 I. Ang. # 1 5 |
- 1000-
1 - 2000-
s -3000-
-4000-
-5000-
-6000-
-7000-
-8000-
-9000
Time (Sec.)
100-
Time (Sec.)
IV 1
V
- 100-
-120
Timc (See.)
V \II
VI
-IOO-
-1 2 0
CHAPTER 6
Introduction
between the areas. Also, the frequency signal at any end which
common frequencies.
102
use frequency from the rectifier end only which would eliminate
as a modulating signal.
system eigenvalues.
103
Application
figures that the Prony fit matches very closely with the actual
The root-locus plots for the modulating signals used are given
Unfiltered
Controller
AC / DC Modulating
at Rectifier Filtered
signal Signal
Power System
Controller Low-Pass
at Rectifier Filter
0.003-
0.002-
0 . 001-
=y -0.001
^ - 0. 002-
-0.003-
-0.004
T i m e (Sec.)
0.45
-------- A c tu a l O u t p u t ------- E a t i m a t a d O u t p u t | j
0.35-
f- 0.3-
I 0.25-
0 .15-
0.05-
T i m e (Sec.)
- 0 . 2-
-0.4-
- 0.6-
T i m e (Sec.)
|I A c tu a l O u t p u t ------- R M im a Io d O u t p u t | |
6 20-
- 20-
-40-
-60-
T i m e (Sec.)
root locus
imaginary axis
real axis
root l ocus
imaginary axis
real axis
root locus
imaginary axis
real axis
root l ocus
imaginary axis
real axis
root locus
imaginary axis
real axis
root locus
imaginaiy axis
real axis
root locus
imaginary axis
real axis
root locus
imaginaiy axis
real axis
CHAPTER 7
Introduction
analysis method does not use knowledge of the system input and
throughput term.
conditions.
+ ,W p-y
where D ’e 91 is a known system time delay i?0e 9t is the feedforward
-rsD;
(7.2)
J=O s +i
HS
model output is
-SD 1
a. (e sDj - e ^ +1) _,D.
Y(s) = I c i + i R‘ (7.4)
j=o J (s - X n+1) i= l(S ~ X;)
■sDj.A - s » ’l Qin + 1 Qi
+ 2j (7.5)
J=O A (s - X n+1) I=I(S1- X i)J
where
Ri
; / = l,2,...,n (7.6a)
Xi- Xn
and
no = icjda{/"-"'-"'W -D•)(
+ Q„+ M t - D 1)) (7.8)
where |i(.) denotes the unit step function and m (.) is the input
be written as
no = i (7.9)
i=l j=0 v /
-Dj- D ’)= I;
- D ’)= 0
where
Bi = ; i= 1,2,...,« (7.14)
117
Bi
; z = 1,2,...,zz (7.15)
7= 1
B i{Xi- X n+l)
Ri ; z = 1,2, ...,zz (7.16)
Z= I
m = i=i
s aLv=0
i v / '
+ Qn +l M ^ - ^ ’) (7.17)
where
-Z)')
(7.19a)
9
and
Q n + l U ( t - D ’)
B n + 1' (7.196)
118
XT
Zi = e" (7.22)
the Prony analysis is to find the B ifS, XifS l and n that result
to yk resulting in
119
rB ^
(7.23a)
ZB = Y (7.23b)
teristic polynomial
the corresponding BiiS . Knowing CiiS, D iS, and Xn from the known
ft = + a,+ A L (7.26)
^ T0 O O o 'N f B / '
Z1 Z2 ... Zfl z„+i
I I i I
Z1 Z2 ... Zn z«+i
= {121a)
Vi Z2 ... zn Zn + 1 y
^-I'J I3V 1V
021b)
(7.27c)
V 1 Z2 ... Zn + J
Z« l
^Jm - i,
S - i .. V
122
obtain
Zn+l = Zn+lK'
Knowing Q itS from the standard Prony analysis and the knowledge
Application
does not match the actual output. This suggests that the
58. In both cases the linear low-order model output fits the
the interarea modes, but at the same time to dampen other local
signal is characterized by
the loci move to the left as they departed from their open-loop
0.015-
| -------- Actual OutpuT
0.01"
0.005-
1.73472E-18--
-0.005-
- 0 . 01-
-0.015
Time (Sec.)
0.0015-
-------- Actual Output Estimated Ouput I
0.001-
0.0005-
-0.0005-
- 0 .001-
-0.0015
Time (Sec.)
- 0. 2-
-0.4-
■« - 0.8-
- 1. 2 -
Time (Sec.)
S -0.5-
- 0 .6 -
-0.7-
- 0.8-
-0.9-
Time (Sec.)
.§
root l ocus
real axis
CHAPTER 8
MODULATION SCHEMES
Introduction
Simulation Results
regulator at the rectifier end. The gain values used for both
gain values used are much lower than the range obtained from
I
the root-locus studies. This can be due to the lack of necessary
Time (Sec.)
i----
IliU Tl
- 10&
W -40-
-100
- 60-
-IOO
Time (Sec.)
-U-W-U-
V iI I
-100
Time (Sec.)
I UVi
-100
CHAPTER 9
Introduction
end does not provide the desired damping as envisaged from the
Implementation
Time (Sec.)
-100
Time (Sec.)
CHAPTER 10
Introduction
A D A P T IV E O B S E R V E R A D A P T IV E R E O U L A T O R
ID E N T IF IE R
A C /D C P O W E R S Y S T E M
I d o ( S o t . P t .)
added at the point where the current error signal for the
[58] .
U(k-1)
A D A P T IV E O B S E R V E R A D A P T IV E R E G U L A T O R
A C /D C P O W E R S Y S T E M
Ido ( S o t . P t .)
CHAPTER 11
Introduction
Chapter 10.
Simulation Results
used. An observer with its poles placed at 0.5 e±j30 was also
tried, and Figures 75 and 76 show the results with this observer
modulation schemes.
Time (Sec.)
o--
-40-
-60-
-80-
-100
22.1 27.1 32.1
27.1
Time (Sec.)
LuV-J
- 20- I
-60-
-80-
-100;
27.1 32.1
a 50-
32.1
O-- :----
- 20-
1 -40-
-60-
-10Q
27.1 32.1
WArv
W i
- 20 -
-40-
-60-
-ioa
22.1 27.1
Tim e(Sec)
22.1 32.1
? -20
-80-
-ioa
22.1 27.1
Time (Sec.)
I---- G e n . An g . # 11
\
-40-
-60-
-80-
-10a
22.1
S 50-
-60-
-IOO
27.1
6 50-
/I A M
OJLfi
- 20-
-60-
-100;
22.1 27.1 32.1
CHAPTER 12
In the case of the 42-bus test system studied the ESCR is about
explored further.
I
158
with proper voltage support at the inverter end. ' It has also
Prony fit matches very closely with the actual response even
159
feedback gain than the actual values which can be used in the
linear and the actual system with the same value of feedback
line current and the rectifier firing angle can improve system
there is more than one system output and one system input
REFERENCES CITED
162
V
163
APPENDIX
q *******************************************************.*******************
c* *
c* * Progrm: PRONYNEWID
C**
C** by: D a n T r u d n o w s k i , M o n t a n a S t a t e Univ., Sept. 1989, Oct. 1990.
C** m o d i f i e d b y P r i n c e Emmanuel, Oct. 1990
c* *
c* * T h i s p r o g r a m u s e s the P R O N Y i d e n t i f i c a t i o n m e t h o d to o b t a i n a
c* * m o d e l for a system. Th e m e t h o d of a n a l y s i s is d e s c r i b e d in Chap. 7
c* * of " D a m p i n g of L o w F r e q u e n c y O s c i l l a t i o n s in an A C /DC P o w e r Syst e m s
c* * U s i n g C o n v e r t e r C o n t r o l , " Ph.D. Thesis, EE Dept., M o n t a n a
C** S t a t e Univ., 1991, b y P r i n c e E m m a n u e l a n d C h a p t e r 3 of " D e c e n t r a l i z e d
c* * C o n t r o l S t r a t e g i e s for D a m p i n g o f P o w e r - s y s t e m E l e c t r o m e c h a n i c a l
c* * O s c i l l a t i o n s , " Ph.D. Thesis, EE Dept., M o n t a n S t a t e Univ., 1990
C** by D . Trudnowski .
C**
c* * T w o s y s t e m c a s e s ar e consid e r e d :
c* * 1) the n o n z e r o i n i t i a l c o n d i t i o n case; a n d
c* * 2) the zero i n i t i a l c o n d i t i o n case. W i t h the cas e I, a m o d e l is
c* * o b t a i n e d fo r b o t h the s y s t e m a n d the i n i t i a l c o n d i t i o n s . In the
c* * s e c o n d case, a m o d e l is f o u n d for the system.
C** T h e m o d e l is
c* *
c* *
C** W(s)
C* * I
c* * — ------------- \ I/
c* * U(s) ----- >1 G (s ) 1-- + --- > s a m p l e d at T ------>
c* * ----------- Y(s) Y(z)
c* *
c* * A system model (G(s)) and initial-condition model are identified
c* * b y this p r o g r a m w h e r e
c* *
c* * I n R E S (i ) I n R E S I N I L (i )
c* * G(s) = e x p (-sD) Is u m - t------------ +RES(O) |, W(s) = s u m -------------
c* * Ii=I s - E I G E N (i) I i=l s - E I G E N (i)
C**
C** w h e r e the e i g e n v a l u e s (EIGEN's) ar e a s s u m e d disti n c t . D is a p u r e
C** s y s t e m d e l a y k n o w n b y the user.
C** U(s) is a k n o w n inp u t of the fo r m
c* *
c* * NUMINPUTS-I e x p (- s * T * M D E L A Y (j )) - e x p (- s * T * M D E L A Y (j +1))
c* * U(s) = sum A M P (j ) -----------------------------------------------.-------
c* * j =0 s
C**
C** T h i s p r o g r a m a n a l y z e s the s e q u e n c e y (0) thr u y (N-I) to f i n d a yhat(k)
c* * that fits y(k) is a l e a s t - s q u a r e s sense. F o r the c a s e w h e r e the i n i t i a l
c* * c o n d i t i o n s of G(s) ar e nonzero, two P r o n y a n a l y s i s m u s t b e done.
c* * O n e P r o n y a n a l y s i s is c o n d u c t e d f r o m k = M D E L A Y ( M S E C D E L A Y ) to
c* * k = M D E L A Y ( M S E C D E L A Y + 1 ); the s e c o n d a n a l y s i s is c o n d u c t e d a f t e r
c* * k = M D E L A Y ( N U M I N P U T S ). N o t e that M S E C D E L A Y m u s t be less th a n
c* * NUMINPUTS.
c* *
C** T h i s p r o g r a m g i v e s l e a s t - s q u a r e d m o d e l fits for n = 1 , 2 , . . . , n m a x , r
c* * w h e r e n m a x is c a l c u l a t e d by the p r o g r a m .
c* * H o w w e l l the n t h m o d e l fits the d a t a is m e a s u r e d w i t h
c* * Err:
c* *
c* * E r r = 2 0 * l o g { 2 n o r m ( y h a t - y ) / 2 n o r m (y)}
C**
C
C M A X IS T H E M A X I M U M L E N T H OF Y, N M A X IS T H E M A X I M U M S Y S T E M ORDER,j
C A N D I N M A X IS T H E M A X I M U M N U M B E R OF P U L S E S IN T H E INPUT.
C
P A R A M E T E R (M A X = 500, MAX2=2*MAX, N M A X = I I N T ( M A X / 3 .0)+1, INMAX=IO)
C
C
I M P L I C I T R E A L * 8 ( A - H fO-Z)
I N T E G E R SY S D E L A Y
R E A L *8 M A T R I X
C O M P L E X * I 6 B R E S , RES, Z E I G E N , EIGEN, R E S I N I L , D E T
C H A R A C T E R NAME * 2 0 , T ITLE*60, I NICOND*!, N Y Q A N S * !
D I M E N S I O N Y ( M A X 2 ) , Y H A T (MAX2), I S A V E ( N M A X ) , E R R ( N M A X ) ,
Sc M A T R I X (M A X 2 ,N M A X * 2)
D I M E N S I O N A M P (O :INM-AX) , M D E L A Y (O :I N M A X + 1)
D I M E N S I O N B R E S (NMAX,2), RE S ( N M A X ) , Z E I G E N ( N M A X ) , E I G E N ( N M A X ) ,
& RESINIL(NMAX)
D I M E N S I O N T E M P ! (NMAX), T E M P 2 (NMAX), TEMP3(2*NMAX)
D A T A P I E / 3 .1 4 1 5 9 2 6 5 4 / M D E L A Y (O )/ O / I E I G E N / 2 /
D A T A ,(Y(I) ,1= 1 , M A X 2 ) / M A X 2 * O . O D O /
C**************»****«*«****ft**ft*ft*****«tt«ftftft*tt**ttft**ftft*****A***************
C** Other Variables required for calculation of RES(O)
c
complex*16 zmatrix(nmax, nmax), bnew(nmax, inmax), ynew(.nmax)
complex*16 znew(nmax), zsum, ysum, qnplsl, resO
character thruput*!
Q * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
C O P E N O U T P U T D A T A FILES:
O P E N (15,F I L E = ' O R D E R . I N ' ,S T A T U S = 'N E W ' )
O P E N (17,F I L E = 'E R R O R .T E K ',S T A T U S = ' N E W ' )
o p e n (19,f i l e = ' T e s t . o u t ' ,s t a t u s = ' n e w ' )
non
-------------------------------- I N P U T D A T A -------------------------
W R I T E (*,5)
R E A D (*,20) T I T L E
W R I T E (*,10)
R E A D (*,1000) N A M E
W R I T E (*,15)
R E A D (*,*) I N P U T T E K
W R I T E (*,30)
R E A D (*,*) T S A M
W R I T E (*,33)
R E A D (*,*) N U M I N P U T S
W R I T E (*,40) N U M I N P U T S
R E A D (*,*) ( A M P (I), 1 = 0 , N U M I N P U T S - I )
W R I T E (*,45) N U M I N P U T S
R E A D (*,*) (M D E L A Y (I),1=1,N U M I N P U T S )
W R I T E (*,46)
R E A D (*,*) S Y S D E L A Y
W R I T E (*,47)
R E A D (*,17) I N I C O N D
IF ((I N I C O N D .EQ. ' N ' ) . O R . ( I N I C O N D .EQ. ' n ' )) T H E N
W R I T E (*,50)
R E A D (*,*) M S E C D E L A Y
IF (MSEC D E L A Y .GE. N U M I N P U T S ) T H E N
W R I T E (*,*)
W R I T E (*/*) z * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
W R I T E (*,*)' ERROR: T h i s v a l u e m u s t b e less '
W R I T E (*,*)' th a n the n u m b e r of i n p u t '
W R I T E (*,*)' p u l s e s .'
W R I T E (-*,*) ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
ST O P
ENDIF
W R I T E (*,55)
R E A D (*,*) I E I G E N
ENDIF
W R I T E (*,60) I .O D O / ( 4 . ODO *TSAM)
R E A D (*,17) N Y Q A N S
C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * *
C** M o d i f i e d Part
c
w r i t e (*,65)
r e a d ( * , 1 7 ) thr u p u t
65 FORMAT!/,' Is t h r o u g h p u t exi s t ? (Y/N) — > ',$)
c
C** e n d of m o d i f i e d p a r t
C**************************************************************************
N D A T A P T S = N S A M - M D E L A Y (N U M I N P U T S ) - S Y S D E L A Y
ELSE
N D A T A P T S = M D E L A Y (M S E C D E L A Y + I )- M D E L A Y ( M S E C D E L A Y )
ENDIF
ELSE'
N D A T A P T S = N S A M - M D E L A Y (N U M I N P U T S ) - S Y S D E L A Y
ENDIF
N C O L = I I N T ( N D A T A P T S / 3 .0) - I
C ------------------------E N D OF D E T E R M I N A T I O N OF N U M B E R OF C O L U M N S
C
C
C
C --------- ---------- D E T E R M I N E D I S C R E T E - T I M E E I G E N V A L U E S ------
C
C FORM Y M A T R I X :
IF (I E I G E N .EQ. I) T H E N
M = MDELAY(MSECDELAY) + SYSDELAY
ELSE
M = M D E L A Y (N U M I N P U T S ) + S Y S D E L A Y
ENDIF
DO I = !,NDATAPTS-NCOL
D O J = I,N C O L
M A T R I X ( I fJ) = Y (NCOL+I-J+M)
ENDDO
ENDDO
C
C SOLVE OVERDETERMINED SYSTEM FOR CHARACTERISTIC EQUATION
C C O E F F I C I E N T S ( T E M P I (I) T H R U T E M P I ( N C O L ) ) :
MM - NDATAPTS-NCOL
C A L L P I N V (M A T R I X ,M M ,N C O L ,M A X 2 ,T E M P I ,Y ( N C O L + M + 1 ))
C
C F I N D D I S C R E T E - T I M E E I G E N V A L U E S F R O M TEMPI:
D O I = I fN C O L
TEMPS(I) = - T E M P I ( N C O L - I + 1 )
ENDDO
C A L L Q P O L Y R T ( T E M P S ,N C O L fT E M P I ,T E M P S ,!ROOT)
IF (I R O O T .NE. 0) T H E N
W R I T E (*,*)
W R I T E (*,*)' W A R N I N G ! T H E E I G E N V A L U E S M A Y B E WRONG'
W R I T E (*,*)' D U E T O I L L C O N D I T I O N I N G !'
ENDIF
C ------------------ E N D OF D I S C R E T E - T I M E E I G E N V A L U E F I N D I N G ---------
C
C
C
C ------------- F I N D O U T P U T R E S I D U E S A N D C O N T I N U O U S - T I M E E I G E N V A L U E S
C
C F I R S T SE T U P Z M A T R I X W I T H R E A L A N D I M A G I N A R Y PAR T S SEPAR A T E D :
JCOLUMN = 2
M = M D E L A Y (N U M I N P U T S ) + S Y S D E L A Y
210 D O J = I fN C O L
Z M A G = (TEMPI (J)**2 + T E M P 2 (J)* * 2 ) * * 0 .5D0
PHI = D A T A N ( T E M P 2 (J)/TEMPI (J))
IF ( (TEMPI (J) . L T . O.ODO) .AND. ( T E M P 2 (J) .NE. O . O D O ) ) T H E N
IF ( T E M P 2 (J) . L T . O.ODO) T H E N
PHI = PHI - PIE
ELSE
PHI = PHI + PI E
ENDIF
ENDIF
IF ( (TEMPI (J) . L T . O.ODO) .AND. ( T E M P 2 (J) .EQ. O . O D O ) ) PHI = PIE
D O I = I fN D A T A P T S
M A T R I X (IfJ) = Z M A G * * ( I - I ) * D C O S ( P H I * ( D B L E ( I - I ) ))
M A T R I X (IfJ + N C O L ) = - Z M A G * * (I - I )* D S I N ( P H I * ( D B L E (I - I )))
M A T R I X ( I + N D A T A P T S fJ) = - M A T R I X (I ,J+NCOL)
M A T R I X (I + N D A T A P T S ,J + N C O L ) = M A T R I X ( I fJ)
ENDDO
IF (J C O L U M N .EQ. 2) T H E N
ZEIGEN(J) = D C M P L X (T E M P I (J) ,T E M P 2 (J))
Xl = D L O G ( Z M A G ) / T S A M
X2 = P H I / T S A M
EIGEN(J) = D C M P L X (XIfX2)
ENDIF
ENDDO
C
C --------------- G E T R I D O F E I G E N V A L U E O N T H E N E G . R E A L A X I S -------
KCOL = NCOL
I = I
D O W H I L E (I .LE. K C O L )
IF ( ( D R E A L ( Z E I G E N ( I ) ) .L T . 0.DO).AND.
S
c ( D I M A G ( Z E I G E N d ) ) .EQ. O.ODO) ) T H E N
KCOL = KCOL - I
IF (I .EQ. (K C O L + I ) ) G O T O 220
D O J = I fK C O L
EIGEN(J) = EIGEN(J+l)
ZEIGEN(J) = Z E I G E N (J+l)
B R E S ( J fI) = B R E S (J+l,I)
B R E S (J f2) = B R E S (J+l,2)
ENDDO
ELSE
1 = 1 + 1
ENDIF
ENDDO
220 NCOL = KCOL
C --------------- E N D O F D E L E T I N G E I G E N V A L U E S O N N E G . R E A L A X I S
C
C -------------- r e m o v e e i g e n v a l u e s h a v i n g v e r y h i g h d a m p i n g
KCOL = NCOL
I = I
D O W H I L E (I .LE. K C O L )
IF ( A B S ( D R E A L ( Z E I G E N ( I ) ) ) . L T . 0.606) THEN
KCOL = KCOL - I
IF (I .EQ. (K C O L + I ) ) G O T O 222
D O J = I fK C O L
EIGEN(J) = E I G E N (J + l )
ZEIGEN(J) = Z E I G E N (J+l)
B R E S ( J fI) = B R E S (J+l,I)
B R E S (J f2) = B R E S (J+l,2)
ENDDO
ELSE
1 = 1 + 1
ENDIF
ENDDO
222 NCOL = KCOL
C
C --------- e n d of r e m o v a l of e i g n e v a l u e s h a v i n g v e r y h i g h d a m p i n g
C
C N O W S O L V E T H E O V E R - D E T E R M I N E D S Y S T E M S F O R O U T P U T RESIDUE:
D O I = I fN D A T A P T S
YHAT(I) = Y (M+ I )
Y H A T ( N D A T A P T S + I ) = O .ODO
ENDDO
C A L L P I N V (MAT R I X , 2 * N D A T A P T S , 2 * N C 0 L , M A X 2 ,T E M P 3 (I) ,Y H A T )
DO 1=1,N COL
B R E S (I ,J C O L U M N ) = D C M P L X ( T E M P 3 (I ),T E M P 3 (I + N C O L ) )
ENDDO
IF ((INI C O N D .EQ. ' N ' ) . O R . (I N I C O N D .EQ. ' n ' )) T H E N
M = MDELAY(MSECDELAY) + SYSDELAY
JCOLUMN = JCOLUMN - I
IF (JCO L U M N .EQ. I) G O T O 210
ENDIF
-------------- E N D OF O U T P U T RES. A N D EIGEN. -------------
ooooo
■— G E T R I D . O F A L L M O D E S A B O V E N Y Q U I S T /2 IF U S E R D E S I R E S
IF ((N Y Q A N S .EQ. ' Y ' ) . O R . ( N Y Q A N S .EQ. ' y ' )) T H E N
I = I
D O W H I L E (I .L E . K C O L )
IF ( D R E A L t Z E I G E N ( I ) ) . L T . O .DO) T H E N
KCOL = KCOL - I
IF (I .EQ. (K C O L + I ) ) G O T O 230
D O J = I ,K C O L
EIGEN(J) = E I G E N ( J + I)
ZEIGEN(J) = ZEIGEN(Jfl)
B R E S ( J 1I) = B R E S ( J f l 1I)
B R E S (J 12) = B R E S ( J f l 12)
ENDDO
ELSE
I = I f l
ENDIF
ENDDO
ENDIF
NCOL = KCOL
E N D OF D E L E T I N G M O D E S A B O V E T H E N Y Q U I S T / 2 RATE
o o o o o
-------- C A L C U L A T E T R A N S F E R - F U N C T I O N I N I T I A L - C O N D I T I O N R E S I D U E S
A M P ( N U M I N P U T S ) = O .ODO
on
IF T H E U S E R S P E C I F I E S T H E I N I T I A L - C O N D I T I O N R E S I D U E S A R E ZERO:
IF ((I N I C O N D .EQ. 'Y ' ) . O R . (I N I C O N D .EQ. 'y')) T H E N
D O I = I 1N C O L
R E S I N I L ( I ) = D C M P L X (0.O D O 1O-ODO)
D E T = AMP(O) * Z E I G E N (I)* * M D E L A Y (NUMINPUTS)
& - AMP(NUMINPUTS-I)'
D O J = I 1N U M I N P U T S - I
D E T = D E T + (AMP ( J ) - A M P ( J - I ) )*
& Z E I G E N ( I ) **(M D E L A Y ( N U M I N P U T S ) - M D E L A Y ( J ) )
ENDDO
RES(I) = B R E S (1,2)* E I G E N (I)/DET
ENDDO
no
IF T H E U S E R S P E C I F I E S N O N Z E R O I N I T I A L - C O N D I T I O N RESI D U E S :
ELSE
D O I = I 1N C O L
DET = D C M P L X (0.000,0.O D O )
D O J = M S E C D E L A Y f l 1N U M I N P U T S
D E T = D E T + (AMP(J) - A M P (J - I ) ) * Z E I G E N (I )* *
& (M D E L A Y (N U M I N P U T S )- M D E L A Y ( J ) )
' ENDDO
M = MDELAY(NUMINPUTS)-MDELAY(MSECDELAY)
RES(I) = E I G E N (I )*(B R E S (1,2)- B R E S (1,1)*
& Z E I G E N ( I ) **M) / D E T
R E S I N I L ( I ) = BRESd,, 2) - (A M P (0) *RES (I )/ E I G E N (I ) ) *
Sc Z E I G E N (I) *iM D E L A Y (N U M I N P U T S )
D O J = I fN U M I N P U T S
RESINIL(I) = R E S I N I L ( I ) - ( R E S d ) / E I G E N ( I ) )* ■
S c (AMP (J)-AMP(J-I) ) *
S c Z E I G E N (I) ** (M D E L A Y (NUMINPUTS) - M D E L A Y (J) )
ENDDO
RESINIL(I) = R E S I N I L d ) *
Sc ZEIGEN(I) ** (- S Y S D E L A Y - M D E L A Y (NUMINPUTS) )
ENDDO
ENDIF .
C ------------------------- E N D O F R E S I D U E C A L C U L A T I O N -----------------------
C
C
C
C--:------------- REORDER EIGNEVALUES AND RESIDUES ---------------
C --------------- ACCORDING TO CONTIBUTION TO SIGNAL ---------------
C --------------- (IN T H E S E N S E T H A T IT R E D U C E S T H E E R R O R --------- ,-----
C --------------- B E T W E E N T H E A C T U A L S I G N A L (Y) A N D T H E ---------------
C --------- '----- E S T I M A T E D S I G N A L (YHAT) . ---------------
NORTEMP = O
300 !COUNT = I
ERROLD = l.OD+35
D O W H I L E (! C O U N T .L E . N C O L )
IF (NORTEMP .GT. 0) T H E N
D O J = I fN O R T E M P
IF (!COUNT .EQ. I S A V E ( J ) ) T H E N
!DELTA = I
G O T O 400
END I F
ENDDO
ENDIF
I S A V E (NORTEMP+I) = ! C O U N T
!DELTA = I
IF ( D A B S (D I M A G (E I G E N (! C O U N T ) )) .GT. 1.0D-12) T H E N
!DELTA = 2
I S A V E (NORTEMP+2) = ! C O U N T + I
ENDIF
C
C CALCULATE YHAT AND THE ERROR ASSOCIATED WITH YHAT FOR
C ■O R D E R N O R T E M P + !DELTA:
N = NORTEMP+!DELTA
Y D E L = O .ODO
Y N O R M = 0 . ODO
o n n
C A L C U L A T E Y H A T F O R K = M D E L A Y ( M S E C D E L A Y ) + S Y S D E L A Y TO
K = M D E L A Y (M S E C D E L A Y ) + S Y S D E L A Y - I ;
IF ((I N I C O N D .EQ. ' N ' ) . O R . (INICOND .EQ. ' n ' )) T H E N
' M = MSECDELAY
Ml = M D E L A Y ( M S E C D E L A Y ) + SY S D E L A Y
D O K = Ml, M D E L A Y (M + l )+ S Y S D E L A Y - I
Y H A T (K+l) = 0.0D0
DO 1=1,N
L = ISAVE(I)
Y H A T ( K + l ) = Y H A T (K+l) + D R E A L ( B R E S ( L , I )*
c
c* Modified portion is over
C**************************************************************************
OO
-------------------------- O U T P U T T O D A T A F I L E S --------------------------------
O U T P U T ERR:
W R I T E (17,*)' N ERR(N) = N O R M ( Y - Y H A T ) / N O R M (Y) IN DB'
W R I T E (17,20) T I T L E
W R I T E (17,*) I
D O I = I,N O R T E M P
W R I T E (17,*) I, ERR(I)
ENDDO
C
C O U T P U T E I G E N V A L U E S A N D R E S I D U E S T O A D A T A F I L E SO T H A T T H E
C P R O G R A M O R D E R . F O R C A N R E A D T H E S E VALU E S :
W R I T E (I5,20) T I T L E
W R I T E (15,*) T S A M , N U M I N P U T S ,N O R T E M P ,M S E C D E L A Y ,S Y S D E L A Y
W R I T E (15,*) (M D E L A Y (I ),1=1,N U M I N P U T S )
W R I T E (15,*) ( A M P (I ) ,1=0,N U M I N P U T S - I)
W R I T E (15,1000) N A M E
W R I T E (15,*) I N P U T T E K
W R I T E (15,*)' R E A L - T I M E A N D D I S C R E T E - T I M E E I G E N V A L U E S :'
D O I = I, N O R T E M P
W R I T E (15,*) D R E A L ( E I G E N ( I S A V E ( I ) )), D I M A G ( E I G E N ( ! S A V E (I))),
& D R E A L (Z E I G E N ( ! S A V E (I))), D I M A G (Z E I G E N ( ! S A V E (I)))
ENDDO
W R I T E (15, *) ' T R A N S F E R - F U N C T I O N R E S I D U E S :.'
DO I=I,NORTEMP
W R I T E d S , * ) D R E A L ( R E S ( I S A V E ( I ) ) ) , D I M A G (RES (!SAVE (I) ) )
ENDDO
IF (M S E C D E L A Y .NE. 0) T H E N
W R I T E (15,*)' I N I T I A L - V A L U E R E S I D U E S :'
D O I = I, N O R T E M P
Xl = D R E A L ( R E S I N I L d S A V E d ) ) )
X2 = D I M A G ( R E S I N I L d S A V E d ) ) )
W R I T E d S , * ) XI,X2
ENDDO
ENDIF
£****«***«*****************************************************************
c** Modified portion for writing the zeroth Residue
c
if ( (thruput .eg. 'Y') .or. (thruput .eg. 'y')) then
write(15,*)' The Residue corresponding to throughput term:'
xl = dreal(resO)
x2 = dimag(res0)
write(15,*) xl, x2
endif
c
c** end of modified porttion for writing
Q*W************************************************************************
C
W R I T E (*,*)
W R I T E (*/*)'********** *************************************/
W R I T E (*,*)
W R I T E (*,*)' E R R O R . T E K c o n t a i n s the e r r o r s a s s o c i a t e d '
WRITEf*,*)' m o d e l o r d e r s . R u n O R D E R to o b t a i n the f i t '
THAT'S A LL FOLKS
STOP
E ND
Q*******************************************************************
C* *
C** Program ORDER
C* *
C** T h i s p r o g r a m r e a d s in the e i g e n v a l u e s a n d r e s i d u e s r e s u l t i n g
C** f r o m P R O N Y W D E L A Y . It then c a l c u l a t e s the e s t i m a t e y h a t b a s e d on
C** t h e s e r e s i d u e s a n d c o m p a r e s it w i t h the a c t u a l data. The system
C** is i n p u t b y the user,
c* *
C** O u t p u t fil e s ar e P R O N Y W D E L A Y .O U T a n d Y H A T W D E L A Y .T E K . Y H A T W D E L A Y
C** is f o r m a t t e d
C** for T E K P L O T , a n d c o n t a i n s the a c t u a l o u t p u t y a n d the e s t i m a t e d
C** o u t p u t yha t . P R O N Y W D E L A Y .O U T c o n t a i n s the r e s i d u e s a n d eigenv a l u e s .
C* *
C** W r i t t e n b y D a n T r u d n o w s k i , OCT. 1989, OCT. 1990.
C** M o d i f i e d b y P r i n c e E m m a n u e l , OCT. 1990 to i n c l u d e R e s i d u e RES(O) term.
C* *
Q***************************************************************************
C
P A R A M E T E R ( M A X = 500, N M A X = I I N T ( M A X / 3 .0)+1)
I M P L I C I T R E A L * 8 ( A - H zO-Z)
INTEGER SYSDELAY
C O M P L E X * I 6 RES, RESINIL, EIGEN, Z E I G E N , resO
C H A R A C T E R T I T L E * 6 0 , T I T L E l *60 , N A M E *20
D I M E N S I O N M D E L A Y ( 0 : N M A X ) ,A M P (0 : N M A X ) , Y(MAX)
DI M E N S I O N R E S ( N M A X ) , R E S I N I L (NMAX), E I G E N (NMAX), ZEIGEN(NMAX)
D I M E N S I O N TEMP( N M A X )
D A T A P I E / 3 .1 4 1 5 9 2 6 5 4 / M D E L A Y (0)/0/
D A T A ( R E S I N I L (I ) ,I = I fN M A X ) / N M A X * (0.O D O , 0 . O D O )/
C
C
C
C ------------------------------- O P E N D A T A F I L E S ------------------------------------
C
C I N P U T FILE:
O P E N (11,F I L E = ' O R D E R . I N ' ,S T A T U S = 'O L D ')
C
C OUTPUT FILES:
O P E N (17,F I L E = 'Y H A T .T E K ',S T A T U S = 'N E W ' )
O P E N (18,F I L E = 'P R O N Y I D .O U T ',S T A T U S = 'N E W ' )
C ------------------------------ E N D OF O P E N I N G F I L E S
C
C
C
C -------------------------------- R E A D IN D A T A -------
C
C R E A D I N T H E E I G E N V A L U E S A N D R ESIDUES:
R E A D ( 1 1 , 1 0 JTITLE
R E A D d l , * ) T S A M , NUMINPUTS, N C O L , M S E C D E L A Y , SYSDELAY
READdl,*) (MDELAY(I) ,I = I ,NUMIN P U T S )
READ(Ild) (AMP(I) , I = O zN U M I N P U T S - I )
R E A D (11,20) N A M E
R E A D (11,*) I N P U T T E K
R E A D ( I l zIO) T I T L E l
D O I = I zN C O L
R E A D d l , * ) XI, X 2 , X 3 , X4
EIGEN(I) = D C M P L X (XI,X2)
ZEIGEN(I) = D C M P L X (X3,X4)
ENDDO
R E A D (11,10)T I T L E l
DO 1=1,NCOL
R E A D (11,*)X l , X2
RES(I) = D C M P L X (XI,X2)
ENDDO
IF ( M S E C D E L A Y .NE. 0) T H E N
R E A D (11,10)T I T L E l
DO 1=1,NCOL
R E A D f l l , * ) XI, X2
R E S I N I L ( I ) = D C M P L X (XI,X 2 )
ENDDO
ENDIF
Q**************************************************************************
read(11,10)titlel
read(ll,*)xl, x2
resO = dcmplx(xl,x2)
c print *, resO
C**************************************************************************
10 FORMA T ( A 6 0 )
20 FORMAT(A20)
C
C R E A D IN Y:
O P E N (I2 , F I L E = N A M E , S T A T U S = ' O L D ' )
R E A D (12,*)
R E A D (12,*)
R E A D (12,*) M
I = O
100 1 = 1 + 1
R E A D (12,*,E N D = 2 00) T, (TEMP (J),J = I ,M)
Y(I) = T E M P (I N P U T T E K )
G O T O 100
200 NSAM = I - I
C
C CHECK DIMENSIONS:
IF (NCOL .GT. N M A X ) T H E N
W R I T E (*,250)N S A M
ENDIF
IF (NSAM .GT. MAX) T H E N
W R I T E (*,,2 60)N S A M ,
ENDIF
250 F O R M A T (/,' P a r a m e t e r M A X is too s m a l l , i n c r e a s e a b o v e ',13)
260 F O R M A T (/,' P a r a m e t e r M A X is too small, i n c r e a s e a b o v e ',13)
C-
C I N P U T S Y S T E M ORDER:
W R I T E ( * , 300) N C O L
R E A D (*,*) N
300 FORMAT(/,' S y s t e m o r d e r (less t h a n or equ a l to ',12,') -- > ',$)
C ------------------------------ E N D OF D A T A I N P U T -----------------------------------
C ■
C
C
C ---- C A L C U L A T E Y H A T F O R O R D E R N A N D O U T P U T T O D A T A F I L E S -------------------
C
C SE T U P T E K P L O T F I L E Y H A T .T E K :
W R I T E (17, *) ' TIME,. A C T U A L OUTPUT, E S T I M A T E D O U T P U T . '
WRITE(17,*)
WRITEdV,*) 2
C
C C A L C U L A T E Y H A T A N D T H E E R R O R B E T W E E N Y A N D Y H A T I N DB:
Y D E L = 0.0D0
Y N O R M = O .ODO
M S = SY S D E L A Y
DO K=O,NSAM-I
Y H A T = 0.0D0
DO 1=1,N
Y H A T = Y H A T + D R E A L ( R E S I N I L d ) *Z E I G E N (I) **K)
DO J=O,NUMINPUTS-I
IF (K .GE. (MDEL A Y ( J ) + M S ) ) Y H A T = Y H A T + D R E A L (
& AMP(J) * ( Z E I G E N ( I ) * * ( K - M S - M D E L A Y (J))- I . O D O )*
Sc RES(I)/EIGEN(I) )
IF (K .GE. (MDELAY(Jfl) + M S ) ) Y H A T = Y H A T - D R E A L (
& AMP(J) * ( Z E I G E N ( I ) * * ( K - M S - M D E L A Y ( J f l ) )- I . ODO)*
Sc RES(I) /EIGEN(I) )
ENDDO
ENDDO
Q**************************************************************************
c** This portion is modified to take into consideration
c** the resO or RES(O) term
c
do j = 0, numinputs-1
if(k .ge. (mdelay(j) f ms))yhat = yhat f dreal(
Si amp( j )*res0)
if(k .ge. (mdelay(jfl) + m s ))yhat = yhat - dreal(
& amp(j)*res0)
enddo
c
c**
Q * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
T = T S A M * D B L E (K)
W R I T E d V , * ) T, Y(Kfl) , Y H A T
Y D E L = Y D E L f ( Y ( K f l ) - Y H A T ) **2
Y N O R M = Y N O R M f Y ( K f l ) **2
ENDDO
Y D E L = Y D E L * * 0 . 5D0
Y N O R M = Y N O R M * * 0.5D0
ERROR = 2 0 . 0D0*DLOG10(YDEL/YNORM)
n n n n o
-----:------------- EN D OF YHAT' A N D E R R O R C A L C U L A T I O N
X5 = D R E A L ( R E S d ) )
X6 = D I M A G ( R E S d ) )
X7 = D R E A L ( R E S I N I L d ) )
X8 = D I M A G ( R E S I N I L d ) )
W R I T E ( 1 8 , 1 0 1 0 ) 1 , X l ,X2
C ■ W R I T E ( 1 8 , 1 0 1 5 ) I,X3 , X 4
W R I T E ( 1 8 , 1 0 2 0 ) 1 , X 5 ,X6
IF ( M S E C D E L A Y .NE. 0) W R I T E ( 1 8 , 1 0 2 5 ) I ,X 7 ,X8
ENDDO
C**************************************************************************
c** modified part
c
i = 0
xl = O.OdO
x2 = O.OdO
x3 = I.OdO
x4 = O.OdO
x5 = dreal(reaO)
x6 = dimag(res0)
write(18,1010)i,xl,x2
c write(10,1015)i,x3,x4
write(18,l02O)i,x5,x6
c
c** modified part ends here
C*********«****************************************************************
1000 FORMAT(/,A60)
10 0 5 F O R M A T (/,' E R R O R B E T W E E N Y H A T A N D Y (in db) = ' ,D12.. 4)
1007 FORMAT(/,' S Y S T E M D E L A Y IN S A M P L E S =',12,/)
1010 FORMATf/,' E I G E N V A L U E (',12,') . = ',
& D 1 2 . 4 , ' + j ' ,D12.4)
10 1 5 F O R M A T (' D I S C R E T E - T I M E E I G E N V A L U E (',12,') = ',
Sc D12.4, ' + j ' ,D12.4)
1020 F O R M A T (' T R A N S F E R - F U N C T I O N R E S I D U E (',12,') = ', •
Sc D12.4, ' + j ' ,D12.4)
1025 F O R M A T (' I N I T I A L - C O N D T I O N R E S I D U E (',12,') = ',
Sc D12.4, ' + j ' ,D12.4)
O O
W R I T E ( * , *)
W R I T E (*,*) Z***********************************,*******^*********/
W R I T E (*,*) '* * ** /
W R I T E (*,*) '** D a t a file Y H A T .T E K c o n t a i n s the e s t i m a t e d a n d **'
W R I T E (*,*) '** a c t u a l o u t p u t s in T E K P L O T f o r m a t . **'
W R I T E ( * , *) '* * . ** I
3 1762 10097233 8
H O U C H E N
B I N D E R Y LTD-
UTICA/OMAHA
NE.