UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

On the nonlinear behaviour of population dynamics in electric demand forecasting Hook, Chris 1988

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata


831-UBC_1989_A7 H66.pdf [ 2.61MB ]
JSON: 831-1.0062883.json
JSON-LD: 831-1.0062883-ld.json
RDF/XML (Pretty): 831-1.0062883-rdf.xml
RDF/JSON: 831-1.0062883-rdf.json
Turtle: 831-1.0062883-turtle.txt
N-Triples: 831-1.0062883-rdf-ntriples.txt
Original Record: 831-1.0062883-source.json
Full Text

Full Text

I  ON T H E NONLINEAR BEHAVIOUR OF POPULATION DYNAMICS LN ELECTRIC D E M A N D FORECASTING By Mr. Chris Hook B. A . , University of British Columbia, 1985  A THESIS  S U B M I T T E D IN P A R T I A L F U L F I L L M E N T O F  T H E REQUIREMENTS MASTERS  FOR T H E DEGREE OF  OF A P P L I E D  SCIENCE  in T H E FACULTY OF GRADUATE DEPARTMENT  O F CIVIL  STUDIES  ENGINEERING  We accept this thesis as conforming to the required standard  T H E UNIVERSITY  O F BRITISH C O L U M B I A  December 1988  © Mr. Chris Hook, 1988  In  presenting this  degree at the  thesis  in  partial  fulfilment  of  the  requirements  University  of  British  Columbia, I agree that the  freely available for reference and study. I further agree that copying  of  department  this thesis for scholarly or  by  his  or  her  purposes may be  representatives.  It  is  for  an  Library shall make it  permission for extensive  granted by the understood  head of my  that  publication of this thesis for financial gain shall not be allowed without permission.  Department The University of British Columbia Vancouver, Canada  DE-6 (2/88)  advanced  copying  or  my written  Abstract  The problem of electric demand forecasting is analyzed for behavioral traits in the hope that an underlying dynamical process may be revealed. It is assumed that since electric demand is closely related to population growth, the iterative chaotic quadratic difference equation should yield a deeper level of insight toward the understanding of such a process. In particular, the topic of mathematical dynamical systems is developed and then applied, first to problems of constrained population growth, and then to the pertinent issue of per capita electric power demand. A new, randomized quadratic difference model is developed whose behavior appears both predictable and unexpected. Of primary significance, it was found that the hypothesized underlying dynamical system was sensitive to both the level or rate of population growth and the mean level of a randomly distributed (where a gaussian distribution was assumed) per capita electric demand. This was concluded with suggestions on relevant analytical models to be used for forecasting under differing parametric situations.  Table of Contents  Abstract  ii  List of Figures  v  Acknowledgement 1  2  3  vi  Electric D e m a n d Forecasting  1  1.1  Introduction  1  1.2  Chaos  4  Dynamical Systems  6  2.1  Mathematical Foundations  6  2.2  General Properties  9  2.3  Chaotic Dynamical Systems  10  2.3.1  Overview  10  2.3.2  Strange Attractors  11  Population Dynamics  14  3.1  Overview  14  3.2  Period Doubling and Chaos  15  3.2.1  15  Bifurcation  3.3  The Quadratic Map  17  3.4  The Renormalization Group  17  3.5  Chaos. Period Doubling, and the Quadratic Map  19  iii  4  Electricity D e m a n d and the Effect of Population Dynamics  24  4.1  Introduction  24  4.2  Model Construction  25  4.3  The Development of the Distribution Function .  26  4.4  Model Analysis  29  4.5  Discussions and Conclusions  37  Appendices  39  A  Listing of Source Code  39  A.l  40  Non-random analysis C source code  A.2 Random model analysis C code  49  Bibliography  64  IV  List of Figures  2.1  Stable and unstable lines induced about a fixed point x  8  3.2  A bifurcating system with n period doublings, and 2" systems paths . . .  3.3  The attractor vs.  0  the control parameter r for the quadratic  difference  equation 3.4  18  A renormalization of F, demonstrating the self similarity that the conjugation operator L  T  3.5  produces  20  The Lyapunov exponents vs. the control parameter r from the quadratic difference equation  3.6  15  21  A n alignment of the bifurcation and Lyapunov mappings shows the direct correspondence of the two analytic techniques  23  4.7  Full and partial inspection of the Lyapunov exponents for a mean of 0.75.  31  4.8  Full and partial inspection of the non-random Lyapunov exponents.  . . .  32  4.9  Full and partial inspection of the phase portraits for a mean of 0.75. . . .  33  4.10 Randomized renormalization group analysis for the quadratic  difference  equation, mean of 0.75  34  4.11 Randomized Lyapunov exponents for: top diagram, mean of 0.95, bottom diagram, mean of 0.50  36  v  Acknowledgement  I would like to thank both my academic advisors, Dr.'s S.O. Russell and L. Roberts for the considerable input, advice, and direction they gave me at all stages of the thesis development.  vi  Chapter 1  Electric D e m a n d Forecasting  1.1  Introduction  The forecasting of electric power demand is an issue of tremendous importance at both the regional and national level of economic development. That such forecasting is not easily done is evident by the large volume of literature currently available on this pertinent problem. Most of the work done to date consists of large collections of empirical data collected in a post hoc manner which are then analyzed for trends that seem to be fundamentally characteristic. Unfortunately, the findings which are reasonably robust to scrutiny are those of a descriptive nature [22, 19]. Such analysis is not of much use to the modeling of electric demand forecasting as it makes no attempt to infer any particular pattern or systems behavior. Rather, the descriptive statistical techniques commonly employed simply present past collections of data in some easily comprehensible format (e.g., bar charts, tables, histograms). Typically, forecasting on the basis of collected data has been and is done primarily by linear statistical techniques such as regression analysis [19, 7. 3, 22]. More recently, in order to account for the high level of predictive inaccuracies, certain stochastic parameters have been introduced into the regression equation [19, 7, 3]. While these stochastic models have proven useful and fairly accurate when applied to short-term electric demand analysis [19], (i.e., up to time periods no longer than three years in length) the same cannot be said of the predictive results for long-term prediction time spans, ones that  1  Chapter  1. Electric Demand Forecasting  typically range from ten to thirty-five years [22, 19]. The fact that regression techniques (and their more complicated counterparts) are heavily used today is not without foundation. In North America, the first five decades of this century proved to be quite compliant to demand prediction analysis via the linear extrapolation of population and economic growth trends. That is, after regressing the data compiled, even long-term continuations of the emergent linear trends produced predictive results which served as useful and accurate guidelines for demand forecasting needs [22]. Such an approach is called the naive approach, and truly accounted for little in the way of the complicated dynamics that are inherently a part of any population dependent economic system [22]. The weakness of the naive approach became apparent in the 1960's, as the former predictive results became increasing less accurate at both regional and national levels [22, 19, 3]. It was at this point that economists and engineers constructed more and more complex multi-variable regression models, under the assumption that the electric demand prediction inaccuracies lay more in the lack of salient parameter considerations, than with the fundamental inaccuracies involved in the linearization of what might prove to be a nonlinear system. With the widespread use of the complex multi-variate regression models came a still high level of prediction inaccuracy, and stochastic fluctuations (i.e., fluctuations which randomly occurred over time) were thought to play a significant role. For very short term periods (i.e., time periods lasting weeks or months), complex stochastic models proved useful as such time periods are generally subject to unpredictable demand levels of electric power supply [20]. But for longer periods of time, the ultimate effect of such seemingly random demand fluctuations is not at all well understood. For instance, are most fluctuations damped out over a sufficiently long period of time, or do changes to some particular systems parameters lead to permanent changes in the course of long term demand?  Linear models — such as almost all models in the regression family  Chapter 1. Electric Demand Forecasting  3  — are unable to account for these system perturbations, and so give no indication of their ultimate effect (the full accounting for such disturbances is a basically nonlinear consideration). Notably, one system parameter of indisputable importance to electric demand forecasting is that of population growth and dynamics, particularly at the regional residential economic level [19, 22]. Linear demographic population models have been the models of predominant choice for assessing this dynamical system [3, 19]. As such, these models can only account for a system's behavior in a linear sense, and so come with many of the same short comings as was indicated for regression models. It is the intent of this thesis to demonstrate that population dynamics is not a linear system subject to« simple linear prediction modeling techniques. Rather, it is hypothesized that the systems involved are highly nonlinear dynamical systems subject to unpredictable, and yet not completely random, chaotic behavior. If this hypothesis proves correct, then a parameter so important to electric demand as population growth and dynamics must be given a more dominant place in the design of demand forecasting models. It is supposed that one feature of particular significance that could emerge from chaotic systems analysis would be the time span bounding of demand prediction accuracies. Within such a bound, a reasonable level of statistical confidence should be attainable for the accurate assessment of population growth and the ensuing electric demand (e.g., we might find that predictions of a certain rate of population growth and electric demand can be safely made over a period of three years). Beyond this time span bound, it would be expected that population growth prediction accuracy would drop markedly, at which point demand predictions would be tenuous at best. This thesis does not directly pursue the statistical analysis of such demand prediction time span bounds, but hopes to motivate such research by demonstrating the inherent chaotic nature of population growth and dynamics, particularly over an evolving time  Chapter 1. Electric Demand Forecasting  4  span. 1.2  Chaos  In the previous section electric demand forecasting was hypothesized as being an integral part of a fundamentally nonlinear dynamical system. Nonlinear dynamical systems have, during the past twenty-five years, become an area of intense research, yielding numerous significant results. Perhaps the most startling of these results has been the concept of chaos, or deterministically chaotic dynamical systems. While the terms deterministic and chaos initially appear to be at odds, the nonlinearity of a dynamical system allows their simultaneous coexistence. This coexistence is not at all obvious or intuitive, but rather only emerges upon deeper inspection of the more general theory of mathematical dynamical systems. At the turn of the nineteenth century, the French mathematician H. Poincare (1892) started the theory of dynamical systems in order to allow himself a broader, more global geometric characterization of systems of nonlinear ordinary differential equations. Then, during the first half of the twentieth century, Birkhoff and others more precisely defined the theory, following which emerged a spawning off trend toward the disciplines of differential topology and geometry.  During the 1960's, following the establishment  of a more general ergodic theory of dynamical systems, theoreticians and practitioners began to more closely assess particular nonlinear systems which appeared to follow no determinable pattern of evolution. In particular, in 1963, E. Lorenz [17] introduced his seminal paper on stably chaotic systems in meteorology, which opened up an entire field of chaotic systems analysis. In that paper, Lorenz demonstrated that a system of three very simple nonlinear ordinary differential equations could, while being fully deterministic by definition, gives rise to quasi-periodically strange, unpredictable behavior. He  Chapter 1. Electric Demand Forecasting  5  showed that even slight perturbations (i.e., very small changes to the equation's parameters) could turn a completely predictable system into one which oscillated wildly, sometimes appearing random, other times almost predictable. The early to mid 1970's saw a flurry of activity aimed at investigating such chaotic behavior in numerous fields, from quantum physics to economics. It was discovered that this strangely random yet predictable behavior was inherent in many systems which hitherto were undeterminable by the more traditional analytic techniques. While chaotic analysis has been used to open new fields of enquiry, it is important to note just what it does and does not do. Chaotic analysis does not attempt to provide the investigator with design numbers or systems construction specifications. Rather, it attempts to characterize nonlinear systems by the occurrence of strange behavior and the nature of its onset. Chaotic analysis is, then, a qualitative tool and the results it produces must be analyzed in light of this. Hence, the appearance of chaos tells one when a system has or will go into an undeterminable state, rather than inform the investigator as to how to put the next piece of his/her system together. To employ chaotic analysis past the level of elementary concepts, it is necessary to delineate and develop the mathematical tools involved. Consequently, a mathematically descriptive exposition of dynamical systems and chaos directly follows this opening chapter of the thesis. Following this, the logistic or Verhulst model of population dynamics — the so-called quadratic difference equation — is dealt with in some detail. Finally, a particular model of population dynamics considered relevant to electric demand forecasting is introduced and analyzed to illustrate the possibility of the system having an inherently chaotic nature.  Chapter 2  Dynamical  2.1  Systems  Mathematical Foundations  Before proceeding to the general theory of dynamical systems, it is pertinent that all constructs utilized be clearly and rigorously defined. Consequently, the intent of the following section is to lay the necessary mathematical foundations of dynamical systems in a self-contained manner. By a topological space [26, 31, 10], we mean a pair < A', ip >, where X is a nonempty set of points and <p is a family of subsets of X , called open sets, where: 1. I 6 p , l 6 p ; i.e., the empty set and the entire set are both members of tp. 2. For open sets Oi E tp and 0 £ <p, we have 0 0 0 £ tp, i.e., their set intersection 2  1  2  is open. 3. If we have an indexed family of open sets Oj £ ip, then \JjOj  £ <p, i.e., the union  of open sets is open. The family tp is called a topology for the set A'. In general, one may construct numerous topologies on a set X, but in this thesis, we confine ourselves primarily to those topologies which are separable in the Hausdorff sense. That is, for a topological space to be Hausdorff, the following must be satisfied: Given two points in the set A", i.e., x\ £ X, x € A", x 2  1  x , there exist disjoint open 2  sets Oi £ <p and 0 G ip, such that Xi G 0\ and x G 0 . 2  2  6  2  Chapter 2. Dynamical Systems  7  This restriction will allow us, in subsequent sections, to construct distinct open neighborhoods about each point in our dynamical systems, an important feature which greatly simplifies the investagative process for chaotic behavior. Let / : X —* X be a function. By a fixed point of / [6, 10, 31], we mean a point x £ X, such that f(x ) 0  — x (i.e., the mapping / : X —> X leaves the point unchanged  0  0  or, alternatively, the point x is invariant under the mapping /). D  By a periodic point of / [6, 10, 31], we mean that after some specific number of iterations of a mapping / of a particular point x , we return to the point x . That is, 0  0  for some specified integer n, n = 1,2,3,..., (f )(x )  = x . It is seen immediately that  n  D  0  a fixed point is simply a periodic point of period n = 1. For all periodic points, the smallest n > 0 with  ( /  n  ) ( £ o )  x is called the prime period of x .  =  0  0  Now, letting A" be a subset of the real line, by definition [13, 6, 30], a periodic point x of prime period n (and from this point forth, all periodic points will be referred to 0  by their prime period, unless otherwise indicated) is called hyperbolic if | {f )'(x ) n  0  For | (f )'(x )  |> 1, x is called a repelling periodic point, and for | (f )'(x )  n  n  0  0  0  [^ 1.  |< 1, x is 0  called an attractive periodic point. The case of | (f )'(x ) Tl  0  |= 1 for a periodic point x defines an elliptic periodic point, 0  and shall not be considered an} further here. 7  Some important properties of hyperbolic fixed points (i.e., for n = 1) are as follows [15, 16, 2, 6, 30]: If x is an attracting hyperbolic fixed point, i.e., | f'(x ) 0  D  about x such that Vx £ O, l i m _ c  n  f (x)  = x.  n  00  Q  If x is a repelling hyperbolic fixed point, i.e., j f'(x ) 0  0  about x such that VIE £ O. i / x 0  \> 1, then 3 an open ball O  Hm _ / (x) ^ O. n  OJ  |< 1, then 3 an open ball O  n  +00  Chapter 2. Dynamical Systems  8  Figure 2.1: Stable and unstable lines induced about a fixed point x . 0  Hence, 3 an open set of points about an attracting fixed point x  0  which all con-  verge under forward iteration of / to x . Conversely, 3 an open subset of points about Q  a repelling fixed point x  0  which move away from their initial neighborhood of x , or Q  alternatively, move toward x„ under backward iteration of / . We define the unstable set of points W (x ) as being the largest open punctured u  0  interval about x  which has the repelling characteristic. Likewise, we define the stable  0  set of points W(x ) 0  as being the largest open interval about x for which the attracting 0  property holds. For dimensions higher than one, the stable and unstable sets of points may be extended naturally from characteristic intervals to characteristic manifolds (see figure  2.1).  Chapter 2. Dynamical Systems  2.2  9  General Properties  In general terms, a dynamical system may be defined as being a pair (X,tp), where X is a topological space and <p = {ft}  is a set of maps (also called flows or dynamics) on  the space [15, 6, 13, 30, 16]. X is typically called the state space and ip the dynamic on that space. The mapping subscript t indicates that the set of mappings are indexed over t £ R, where each (p maps subsets of A' injectively into X. t  In applications, the index t,t 6 R  +  generally stands for time, and so the question of  interest is to determine where the dynamical system evolves to over some long period or span of time. Important behavioral features of dynamical systems are typically found in the system's fixed, periodic, and homoclinic points [13, 6, 27].  It is of particular interest to  determine the system's behavior, orbits, and modification under the influence of perturbing forces acting on those characteristic points. Finally, the resistance of the system to withstand slight perturbations without giving way to any significant long term dynamical modifications is known as the system's structural stability. Both the determination of a dynamical system's characterizing hyperbolic points and its incumbent structural stability play a central role in the determination of chaos within a system. As such, what follows now is first a broad overview as to what is meant by chaos and chaotic dynamical systems. After that, a more complete mathematical description follows, one which points out the so-called different routes to chaos.  Chapter 2. Dynamical Systems  2.3  10  Chaotic Dynamical Systems  2.3.1  Overview  The study of linear mathematical systems has lead to certain characteristics in the prediction of long term systems behavior. In general, it is expected that small perturbations will produce only small changes to a system's state. Simple systems are expected to give rise to easily determined, simple behavior. Finally, deterministic systems (i.e., systems which may be described by some unique set of difference or differential equations) are expected to be explicitly determinable at any point in their evolution. In contrast, nonlinear mathematical systems may or may not be defined by any of the above characterizations. Instead, they must be studied with special analytic tools, the tools of chaos, to reveal their inherent nature. It is of interest to note that the nonlinearity of a system does not guarantee chaotic behavior, but simply qualifies it as being a potential candidate (linear equations and systems can be solved via some Laplace transform, and so can never be chaotic in nature [9]). Instead, it is the topological properties of the dynamical system and its periodic points which determines its level of chaos.  Within this, there has emerged three particular  qualities in the determination of chaos, the so-called routes to chaos. The most recently determined route to chaos has been the period doubling route, a part of bifurcation theory.  This route to chaos has become the predominant method of assessing chaos  in problems of population dynamics [24, 8, 14, 5, 27]. The second route to chaos is the intermittency route, and is characterized by patterns in time series data which are neither completely random nor well determined [12, 28, 4]. Most of the work in this regime has been confined to the determination of chaos amidst 1/f noise within a system.  This  route has not been of primary interest to problems in population dynamics, and so is not pursued any further here. The third route to chaos is the route involving strange  Chapter 2. Dynamical Systems  attractors.  11  These attractors play a central role in both the theory and application of  chaos. They are intrinsic to both of the other routes to chaos, and so are now inspected in detail.  2.3.2  Strange Attractors  In order to fully understand the implications inherent within these special attracting systems points, it is necessary to give a somewhat complete description of them in a mathematical framework. We say that two dynamical systems (A, ip ) and (Y,ip ) are topologically conjugate t  t  [6, 15, 16, 2] if and only if there exists a homeomorphism (i.e., a bijective mapping which maps open sets to open sets in both the backwards and forwards direction) g : X —> Y such that the following diagram commutes:  X  tp  i  ->  9I I  1  t  X i  I 9 -> I  Y  That is, tp — g'  t  A  Y  o ip c g or g o ip — ip o g \/t. By definition, we see that the t  t  t  homeomorphic mapping g conjugates ip with iptt  A mapping / : X —> X is said to be topologically transitive if, for open non-empty sets 0 i , 0  C A there exists a k > 0 such that (f )(O ) k  2  x  fl 0 ± 0. 2  This states that under iteration, / moves points from any open neighborhood to any other.  12  Chapter 2. Dynamical Systems  We note that a subset U C X is said to be dense if the closure of it is equal to the entire set. A function g(x) is a C diffeomorphism if g(x) and g~ (x) are C homeomorphisms, T  l  r  where by C we mean that both g(x) and g~^[x) are differentiable to degree r. r  We are now equipped to give a full definition of strange attractors and structural stability, two of the most indicative features in chaotic system analysis. For a dynamical system (X, <p) with a family 5 of mappings ip of X into X (where 5 is equipped with a topology), we say that a mapping (p 6 5 is structurally stable in 5 if VX/J  6  5 sufficiently close to <p the systems (X,ip)  and (Y,tp) are topological^/ conjugate.  This simply states that small perturbations to the flow, or dynamics, of the system do not cause ultimate large changes to the system. The most widely used method of assessing the structural stability of a system is via the method of Lyapunov exponents, particularly when a system's sensitivity to initial conditions is a concern [21, 2, 11, 32, 25, 1]. The Lyapunov exponent L(x ) measures whether or not slight perturbations or dis0  turbances lead to slight separations from original mappings (as would be predicted by linear systems analysis), or to more drastic long term exponential separations. Consider the following iterative mapping / , perturbed by some small amount e > 0. By definition, we look for the presence of exponential separation of our system under N iterations. Hence  is sought. Taking logarithms of both sides and observing as N — > oo, e —»• 0, we get: f( N  L(x ) = 0  limx_ lim _^o too  !:  Xo  +  e)-f (x ) N  0  e  Chapter 2. Dynamical Systems  13  df (x ) N  L(x ) 0  = limx^oojj  log  0  dx  (2.1)  D  From this definition, we note that if L(x ) is positive, the system will yield exponential 0  separation, even over the long term, from only slight perturbations and hence the sign of L has become one of the most consistently employed methods of assessing a nonlinear system's degree of chaos. Finally, an attractor is said to be strange if it is sensitive (in the Lyapunov sense) with respect to initial conditions, i.e., that small perturbations to initial conditions give rise to positive Lyapunov exponents. We note immediately that homoclinic points would be potential candidates for being strange attractors, and often are [11, 13, 6, 27]. For a space X and a mapping <p : A" — > X, <p is said to chaotic on X if: 1. <f has sensitive dependence on initial conditions. 2. ip is topologically transitive. 3. periodic points are dense in A'. This concludes a description of the most fundamental topological properties inherent in chaotic dynamical systems and lays the foundation for the analysis of chaos in problems of population growth and dynamics, the focus of the next chapter.  Chapter 3  Population Dynamics  3.1  Overview  The predominant method for assessing chaos in problems of population dynamics has been via the period doubling route, an integral part of bifurcation theory. It is interesting to note that this method does not preclude the topological foundations already developed for chaotic analysis, nor does it supersede it. Rather, one of the main focal points of this chapter will be to establish the pervasive link between the two approaches. Hence, the period doubling route is best seen as an augmentation and not a replacement of the topological, strange attractors route to chaos. The results so far indicate that small fluctuations to certain parameters in nonlinear dynamical systems may give rise to exponent]ally large changes in the eventual state of the system. This raises the question: Can such nonstable behavior be found in problems of population dynamics, and if so, can their particular parameters, under modification, control the level of chaotic behavior? For certain constrained growth problems in population dynamics this question has already been answered in the affirmative, and have been found to maintain chaotic behavior, even under the addition of extraneous parameters [27, 5, 1. 12, 14, 25]. As this particular model of constrained population dynamics is central to the development of a model representing the influence of population growth on electric power demand, a full development of it and its pertinent relating issues will now be developed.  14  Chapter 3. Population Dynamics  15  Figure 3.2: A bifurcating system with n period doublings, and 2 systems paths n  3.2  Period Doubling and Chaos  In this section we consider issues central to the period doubling route to chaos for maps of the form:  x  n+1  = F(x ) n  (3.2)  In particular, bifurcations, renormalization group techniques, and the constrained quadratic map prove indispensable i n the analysis of problems i n iterative equations such as 3.2 and will be developed first, i n isolation, and second, i n correspondence to the theory of structural stability and strange attractors.  3.2.1  Bifurcation  B y bifurcations within a dynamical system, we mean a splitting i n two of some particular process or dynamical flow. T h a t is, at some point i n a system's evolution, the system's mapped trajectory will suddenly branch out i n to two mutually distinct, but simultaneous paths.  16  Chapter 3. Population Dynamics  This splitting apart or bifurcating may occur many times in a system, with branched paths splitting apart into yet more branches. Hence, with a system producing n bifurcations, n = 0, 1,2,..., we will have 2" simultaneous systems paths occurring (see figure 3.2). It is important to note that bifurcations occur only at or near non-hyperbolic fixed and periodic points [6]. Two types of bifurcations that are particularly useful to chaotic systems analysis are the saddle node bifurcation and the period doubling bifurcation. As the saddle node bifurcation is not of practical significance to problems of population dynamics, it is not developed here. Conversely, as has been previously mentioned, the period doubling bifurcation has become so central to the assessment of certain tj'pes of chaotic systems that it is well known just by its name alone. It is now treated in detail.  Period Doubling Bifurcations  Given some dynamical function F(x) where F(x) is as in equation 3.2, we consider the case where F is controlled via some functional control parameter, A, i.e.,  X +1 = n  F (x ) X  n  We define a period doubling of F\ as follows [6]: 1. Fx(0) = 0 VA.in an interval about A  D  2. Fi(0)  =  -l.  3. F£(0) + 0. 4.  ax  (0) ^ 0.  (3.3)  Chapter 3. Population Dynamics  17  If the above four conditions are satisfied for Fx, where A is a fixed control parameter, 0  then there exists an interval E about 0 and a function q : E —> R such that  and  This then gives an algorithm for the determination of whether or not a system contains a period doubling bifurcation at certain parametrically dependent fixed or periodic points. 3.3  T h e Quadratic M a p  The most widely accepted law for constrained population growth and dynamics in a bounded region is the logistic or Verhulst equation [27, 24, 6, 13, 14, 5]:  = rx (l n  - x) n  0< x  < 1,  n  0< r < 4  (3.4)  We note that x is restricted to the unit interval as one may always rescale equation 3.4 to retain all dynamics found in larger intervals [24, 27, 8]. Amazingly, this simple quadratic difference equation exhibits very complex and in fact highh* chaotic behavior as the growth rate control parameter r is altered in the interval 0 < r < 4.  3.4  T h e Renormalization G r o u p  It is of interest to note that maps of the form 3.4 contain a single extremum in the unit interval, and under the influence of an increase of r from 0 to 4 a cascade of period doublings (i.e., for n — > oo, a cascade would be 2 period doublings [1, 27]) occurs. n  Chapter 3. Population Dynamics  18  Xn  Figure 3.3: The attractor vs. the control parameter r for the quadratic difference equation. Amazingly, there exists a high degree of self similarity at each level of branching or period doubling of equation  3.4, where the branches occur at the bifurcating periodic  points. This self similarity property was first documented by Mitchell Feigenbaum and in fact he demonstrated that for maps such as 3.4, universal constants 8 = 4.6692016... and a = —2.5029078... determine the interval rate of doubling of such a system [8, 27, 1]. The usefulness of the renormalization group is found not only in the Feigenbaum constants 8 and a, but also in the microscopic investigation it affords on a system such as  3.4  [18, 27, 6]. The renormalization group gives what is often called a window [27, 14, 12] for the mapping produced by a particular control parameter value. To see how this renormalization group method works, we define a conjugation operator:  19  Chapter 3. Population Dynamics  L (x) T  9r - q  (3.5)  (JC - q ) T  T  where q and q are seen in figure 3.4. T  T  From equation 3.5, we produce the inverse operator (x) - (q - q )x + q T  T  T  and the conjugation of F , i.e., iterating F down to the next period doubling level, 2  r  gives the renormalization of F , producing, for the quadratic map, an exact duplicate of r  the original period doubling map. Consequently, the renormalization of F is defined as T  (3.6)  3.5  Chaos, Period D o u b l i n g , and the Quadratic M a p  Whereas multi-leveled period doubling bifurcations in a dynamical system give rise to being more fully inspected under analytic techniques such as the renormalization group, the presence of such cascading bifurcations does not necessarily imply the existence of chaos within a system. To assert the presence of chaos in a bifurcating dynamical system such as 3.4, we find it necessary to return to the topics of strange attractors and structural stability. In particular, we find that by determining the Lyapunov exponents produced by equation 3.4 for different values of the population growth rate parameter r, there exists a direct correspondence -between the behavior of the bifurcations and the signs of the corresponding Lyapunov exponents. To see this consider the following: Define F (x) as in equation 3.4. Then using equation 2.1 we calculate the Lyapunov T  exponents produced from the mapping F for various values of r. That is r  Chapter 3. Population Dynamics  Figure 3.4: A renormalization of F, demonstrating the self similarity that the gation operator L produces. T  Chapter 3. Population Dynamics  21  1 L ( T ) = lim — T ln | F '(xi) |, 0 < x < 1, 0 < r < 4 i=Q N  r  {  (3.7)  1  where F' represents the slope of the map. So, in our particular case, we obtain a spectrum of Lyapunov exponents from 1 L(r) = Jirr^ — £ l n | r ( l - 2a;,-) |, 0 < N  By inspection of figure  X i  < 1, 0 < r < 4  (3.8)  3.6, we see that when the bifurcation diagram produces  dark vertical bands (indicating an infinite frequency spectrum [27, 28]) we have a direct correspondence with the sign of the Lyapunov exponents, i.e., the period doublings occur at the points where the Lyapunov exponents vanish, L(r) = 0, and dark bands occur where L(r) > 0. In other words, infinite period doubling type branching in a dynamical system is a clear indication of the presence of chaos, as indicated by the positive, L{r) > 0,  Chapter 3. Population Dynamics  Lyapunov exponents.  22  Figure 3.6: An alignment of the bifurcation and Lyapunov mappings shows the direct correspondence of the two analytic techniques.  Chapter 4  Electricity Demand and the Effect of Population Dynamics  4.1  Introduction  To study the population growth model in a setting more appropriate to electric demand forecasting, we need not only look at the inherent dynamical model of constrained population growth, but also we must consider what kind of per capita demand for electricity is to be associated with our growing population. This is obvious as one can see immediately that a huge and dense population with no need of electricity is hardly a chaotic system as far as electric power supply is concerned. Consequently, we shall only be concerned with populations that are dependent on electricity, but with their per capita demand or dependency being at least partly unknown. We say at least partly unknown because long term trends in per capita demand for electricity are not completely understood [22, 3, 7]. Hence, we cannot construct a model with completely determined variables for electric demand in the same way as was done for the model of population dynamics. Furthermore, other relevant issues, such as the elasticity of demand for electricity, the price of electric power substitutions (e.g., gas and/or oil), and the electrical dependency of the population under inspection, all play a significant role in demand forecasting, and hence their influence must be accounted for. As none of the above factors are well understood in a deterministic sense, it becomes apparent that we must somehow construct a relevant probabilistic model of our original quadratic population growth model, equation  3.4.  Furthermore, this probabilistic model must incorporate some kind of demand variation  24  Chapter 4. Electricity Demand and the Effect of Population Dynamics  25  to account for the inherent differences in electric demand when considering areas or regions of different population densities (i.e., it is only reasonable to expect areas of high, medium, and low population densities to exhibit different levels of variation or fluctuation in their electric power demand). The construction of this model is the primary focus of the next section, following which, a chaotic analysis of it is presented. It is hoped that such as analysis will reveal levels of confidence as to when chaos would most likely become the predominant influence in the pattern of areal electric demand.  4.2  M o d e l Construction  We recall from the previous chapter two equations of central importance to our probabilistic model construction and analysis. 1. x  n + 1  = rx (l — x )  2. L(r) =  n  n  Hmiv-^oo -p  0 < x < 1, 0 < r < 4 , equation 3.4. n  ££L  0  l n  I K - i) 1  2x  I.  0  < i < 1. 0 < r < 4 , equation 3.8. x  It is hoped that the model to be proposed, a probabilistic version of equation  3.4,  while somewhat crude (i.e., this model does not attempt to incorporate the demand differences of various income groups, as little of practical use has come from this type of segmented analysis [22], at least in part because of a lack of knowledge of the underlying demand distributions.), will be much more realistic in its appraisal of ensuing chaos, and so be of more practical use in the forecasting of electric demand. In a sense, the above quadratic population model may be seen as having a probability of per capita electric demand of one, i.e., it reflects a situation where every member of the population always demands their maximum amount of electricity. Consequently, to determine equation 3.4 in a probabilistic sense, we would seek to determine the behavior of  26  Chapter 4. Electricity Demand and the Effect of Population Dynamics  H{il,x )  =r} (x )-rx (l  n  Xi  n  n  - x) n  = v (x ) Xi  n  •x  n+1  0<77,x <l, n  0 < r < 4 (4.9)  where the 7jXi{x ) are randomly distributed. n  Even though x  n+1  has already been well analyzed, it remains to determine the addi-  tional behavioral effect of rj (x ) Xi  As r/ (x ) Xi  n  n  on x  n+1  in order to understand #(77, £ ) more fully. n  must represent many economic behavioral factors simultaneously, we con-  sider an underlying normal or gaussian distribution of per capita demand for each value of Xi, i = 1,... ,n. This distribution assumption is made primarily because of the generally unknown state of the summed cumulative true distributions (i.e., the distributions of all probabilistic factors pertinent to electric demand) as well as the presence of an eventual large number of member representations. As has been previously stated, it is unrealistic to expect the variation in per capita demand of electric power to be equal for areas of low, medium, and high population densities. Consequently, it is necessary to construct an T) (x ) that is not only randomly Xi  n  distributed, but also variable in spreading the distributions. Hence, r\ will reflect the distribution variance of each randomly distributed X\. Finally, since the chaotic nature of equation 3.4 has already been demonstrated, we are not so much concerned as to whether or not equation 4.9 will ultimately be chaotic, but rather, because of the probabilistic nature of 4.9. we are more concerned with how and when to expect the onset of chaos. 4.3  T h e Development of the Distribution  Function  First, since we are to assume a gaussian distribution as being an intrinsic part of 77^. (a^), we expect to have, in general, for all x  Chapter 4. Electricity Demand and the Effect of Population Dynamics  1  H V )  a\/2ir  2  =  where the corresponding distribution of £,Xi{ )  Ydt  —\=e  x  ay  x  t  (4.10)  is  x  =>Xi{ ) = / J-oo  v((x ( ))  27  (4.11)  IT  where, by the substitution s = —^ , dt = ads, equation 4.11 becomes  (4.12) where  = /  ~7==e  J — oo  (4.13)  *dt  V £K  with corresponding standard normal density function 1  _S  (4.14)  The mean of equation 4.11, i.e., of a normally distributed random variable is defined to be 1 r°° E(Xi) = — = / CT\/2TT  1  f°°  \  2  J-OO  ,  = —y= /  11 T—U.  x-e~{*)dx  N  _i(£^i)  (x — p)e  2K  2  (4.15)  .  - " > dx +  (TyJI'K J-oo  and using the same substitution as in equation 4.12 (but replacing x for t, and letting x = as + fi), we get  E(Xi)  =  /  /  —  2TT  J  5  — oo  •e  2  ds •+ fi = fi  (4.16)  Chapter 4. Electricity Demand and the Effect of Population Dynamics  28  as the integral —containing an odd function intergrand— evaluates to zero. Hence, we see that E(Xi) = p, where the particular values of p and a are yet to be determined. Now rj is to be determined as a function which yields different coefficients of variations (i.e., the relative distribution spread determined by coeff. of var. = (r/p), for various population densities. The primary justification for this is that very low and very high population densities are expected to be less subject to variability in per capita demand (a floor and ceiling effect, respectively) than will be intermediate population densities. Consequently, 77 should distribute each random variable X; in a manner appropriate to the particular expected behavior of a given density per capita electric demand. Letting Xi be the corresponding normally distributed value for each ajj , i = 1, .. . , n, we may see 77 as a variance function of each Xi, with the variational behavior being as follows: 1. For small values of (x ), i.e., for x n  n  < 0.25, we expect 77 to yield a coefficient of  variation of 10 per cent. 2. For intermediate values of (x ), we expect 77 to yield a coefficient of variation of 20 n  per cent. 3. For large values of (a; ), i.e., x > 0.75, we expect a per capita demand ceiling to n  n  have been achieved, and hence, once again a coefficient of variation of 10 per cent. By the above behavioral description of the 77 function, we see that 77 may be described as follows E(X )with £  10  = I E{X ) with 2  20  . E(Xi) with ^  10  t  VXiM  {  where the Xi are normally distributed.  x < .25 n  , .25 < x  n  x > .75 n  < .75  Chapter 4. Electricity Demand and the Effect of Population Dynamics  29  Hence, our equation of interest for electric demand forecasting, when considering both population dynamics and per capita electric demand is  H(r],x ) n  = {x )-rx (l-x ) VXi  n  where r] , {x ) = n(E(Xi)) X  n  n  0<x <l,  n  0<r<4  n  (4.17)  and  E(Xi)  =—y=  x-e—t'ldx  CT V 27T  (4.18)  J-oo  and culminatively E{X ) {  v(E(Xi)  = vx.M  = < E(Xi)  E(Xi)  with * = .10 ,x < .25 n  with*  = .20 ,.25 <a; <.75 n  (4.19)  with °- = .10 ,x > .75 n  Now it remains to analyze equation 4.17 in a manner similar to that done for the unit quadratic difference equation, and then see how the behavior of the system has changed with respect to the introduction of the per capita demand of electric power parameter.  4.4  M o d e l Analysis  From the graphed results (see figures  4.7, 4.8, 4.9, 4.10, 4.11) we can immediately  notice that a multiplication of the standard quadratic difference equation by a normally distributed random variable produces both phase portraits (figure 4.9) and Lyapunov exponents (figure 4.7) which are noticeably different from their non-random counterparts (see figure 4.8). The results of this model are fundamentally different from the results obtained by simply adding on a factor of external noise, the noise being distributed as a standard normal random variable (for a complete investigation of this additive random model see [1, 12, 25]). The additive random model produces results very similar to  Chapter 4. Electricity Demand and the Effect of Population Dynamics  30  the non-random model, the primary difference being a smoothing out of the Lyapunov exponent spectrum by the random variable. As is obvious from the graphed Lyapunov exponents (figures  4.8, 4.7) the shape and trend of the exponents change markedly  under the influence of a multiplicative normal random variable. Further inspection of the corresponding phase portrait gives support to the drastic behavioral change in the system (figure 4.9). Interesting!} , we note that for both the non-random and random models tested here, 7  both produce constant positive Lyapunov exponent values for values of r greater than 3.85. This result is as would be expected when one considers that on average, equation 4.17 multiplies the standard quadratic difference equation by a factor of 0.75, and so chaotic behavior is inevitable as we let r approach 4. The slow continual growth to chaos is especially noticeable upon inspection of the full spectrum randomized phase portrait, figure 4.9. Here the population cycle bandwidth widens on a slow but steady rate until, for r > 3.8, the bandwidth spreads out, giving an indication of the system heading toward infinite bifurcation cycles or chaos. Interestingly, the multiplicative random factor obscures the ability to pinpoint bifurcations, giving support to the Lyapunov exponents as a more concrete, consistent measure of chaotic behavior. As for the effect of the variable coefficient of variation, the randomized renormalization map diagrams (figure 4.10) show that each individual cycle retains the basic non-random shape, but with a tolerance band now introduced. We notice that the renormalization graphs have a wider band of variance in their center than at their ends, a result that would be expected in light of the nature of the underlying model, equation 4.17. This bandwidth effect is not immediately noticeable when inspecting the random Lyapunov exponent of phase portrait graphs, but its effect is made in their ultimate distribution of points. We recall that the effect is one of greater  Chapter 4. Electricity Demand and the Effect of Population Dynamics  31  L(E.V.(X(r))) 0.9 0.7 0.5 0.3 0. 1 -0. 1 -0.3 -0.5 -0.7 -0.9 -1,1-1.3-1.5-1.7-1.9-2.1-2.3 -2.5  H  H  i  3.2  3.6  3.4  3.8  E.V.(X(r))  L(E.V.(X(r)))  E.V.(X(r))  Figure 4.7: Full and partial inspection of the Lyapunov exponents for a mean of 0.75.  Chapter 4. Electricity Demand and the Effect of Population Dynamics  Figure 4.8: Full and partial inspection of the non-random Lyapunov exponents.  Chapter 4. Electricity Demand and the Effect of Population Dynamics  33  E.V.(Xn)  0.8 -  0.6  .-••••••IMi  0.4 -  0.2  I  3.2  3.4  3.6  3.8  E.V.(X(r))  E.V.(Xn)  0.8 -  0.6-  0.4  0.2  1  —i 1.2  i  1.4  1  1  1  1  1.6  1.8  2  2.2  1  1  2.4 2.6 E.V.(X(r))  1  1  1  2.8  3  3.2  1  3.4  1  1 —  3.6 3.8  4  Figure 4.9: Full and partial inspection of the phase portraits for a mean of 0.75.  Chapter 4. Electricity Demand and the Effect of Population Dyn  Figure 4.10: Randomized renormalization group analysis for the quadratic difference equation, mean of 0.75.  34  Chapter 4. Electricity Demand and the Effect of Population Dynamics  35  dispersion from the mean and less dispersion from the endpoints, as indicated in equation 4.19. This should yield a conservatively averaged onset of chaos as this model is more tolerant toward outlying values. Naturally, the narrower the coefficients of variation, the more the random model approaches being equivalent to a non-random quadratic difference equation simply multiplied by a constant factor between the values of zero and one (i.e., a simple scaling down of equation 3.4). Of further interest, we see that at a 0.75 mean level of electric demand, there exists a period of chaos for population growth ranging from 1 < r < 2. This may be a very typical growth rate for certain types of areas. This chaotic region is not at all present in the nonrandom model, as only system bifurcations occur prior to the r parameter exceeding the value of 3.6. In fact, we see that as the mean electric per capita demand p is decreased from 0.95 (i.e., almost perfect demand and hence a strong correspondence with the nonrandom model) to 0.50, the intermediate chaotic region grows from a bifurcation point at r = 1 to a region of chaos for 1 < r < 2, p — 0.75, and a full region of chaos for 1 < r < 2.8, p = 0.50. From a comparison of the full spectrum Lyapunov exponent graphs (i.e., considering values of 0 < r < 4), it is evident that as p is decreased, the graph of the randomized Lyapunov exponents becomes horizontally stretched for values of r > 1. This tendency certainly implies that the mean per capita electric demand is a critical parameter when trying to determine which growth rates are subject to chaotic behavior and which are not. In fact, this unexpected behavior in the midrange of the r values may be of help toward the explanation of the constant unpredictability of long-term electric demand forecasting in even modest population growth areas.  Chapter 4. Electricity Demand and the Effect of Population Dynamics  0 0.2 0.4 0.6 0.8  36  1 1.2 1.4 1.6 1.8. 2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 4 E.V.(X(r))  ,  L(E.V.(X(r)))  0 0.2 0.4 0.6 0.8  1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 4 E.V.(X(r))  Figure 4.11: Randomized Lyapunov exponents for: top diagram, mean of 0.95, bottom diagram, mean of 0.50.  Chapter 4. Electricity Demand and the Effect of Population Dynamics  4.5  37  Discussions and Conclusions  From the preceding graphical analysis, we notice that the behavior of the multiplicative random quadratic difference equation differs markedly from its non-random counterpart. As would be expected, since the random version of the quadratic difference equation is basically multiplied, on average, by a factor less than one, the final occurrence of terminal chaos (i.e., chaotic behavior from which their is no return) is both delayed and damped (i.e., in the sense of the positive Lyapunov exponent magnitudes being damped). This would infer that growth predictions would be more reliable for random electric demand than for simple constrained population growth. Unexpectedly, we find that as the average per capita electric demand is decreased, a midrange of chaotic behavior commencing at r = 1 appears and actually grows as the mean per capita demand /z decreases. It was observed that, in fact, under this trend, the Lyapunov exponent graph stretched horizontally for growth rates in the positive direction (i.e., for values of r > 1). Very little change in the Lyapunov exponents was observed for values of r < 1. regardless of the model being used. Consequently, it is determined that both the mean per capita electric demand and the area population rate of growth are critical parameters in electric demand forecasting. Once the inspected system enters a chaotic region (either temporal or ultimate) little can be done in the way of useful long term demand forecasting. In such a case, it was previously argued that short term statistical analysis should yield as accurate a result as most other methods. When not in a critical or chaotic region, more ambitious long term forecasting models should produce feasible results. However, these results will be extremely sensitive to the population growth rate and the per capita demand of electric power. Consequently, extreme care must be taken as an accurate appraisal of these two critical parameters  Chapter 4. Electricity Demand and the Effect of Population Dynamics  38  is usually very difficult to make. Whether such a high risk type of environment is ever going to produce consistent, reliable forecasting results is tenuous at best. It must be remembered that once a s}stem, such as has been described here, enters a region of r  chaotic behavior, no degree of model complexity will suffice to overcome the level of unpredictability that would inevitably ensue. Hence, we conclude as follows: • Electric demand is an integral part of a larger, fundamentally nonlinear dynamical system. • The forecasting of electric demand is subject to various undeterminable states, whose onset and magnitude are directly related to the population growth rate and the per capita electric demand. • The most likely levels of per capita demand (i.e., levels ranging from 50% to 75%) produce undeterminable chaotic regions, even under moderate rates of population growth. So it is determined that under almost all demand forecasting situations, it is highly unlikely that meaningful demand forecasting could be optimized past the results obtained by simple short-term linear regression models, or their stochastic counterparts.  Appendix A Listing of Source Code  The following is a listing of the source code (written primarily in C) used for the analysis of the dynamical systems. The first section is a listing of the non-random quadratic difference equation programs of analysis. They are: • The plain noniterative quadratic difference equation and the renormalization operator for period two. • The bifurcation diagram (phase portrait) of the iterated quadratic difference equation. • The Lyapunov exponent graph. The second section of this appendix is comprised of the corresponding computer analysis of the randomized quadratic difference equation, equation 4.17. As afinalnote on methodology, the datafilesproduced from the C code were graphed via the UBC TELL-A-GRAF graphics package. (note: To reproduce the graphs exactly as produced in the body of this thesis, remove the following line from each of the random model C programs: Rand = (Rand > 1) ? 1 : Rand;  this is an inserted upper bound check to prevent exponential overflow on some systems.)  39  Appendix A. Listing of Source Code  A.l  /*  40  N o n - r a n d o m analysis C source code  program:  quad.c,  by: C h r i s Hook,  Produces b o t h t h e s i n g l e q u a d r a t i c map  and double  (twice i t e r a t e d )  f ( x ) = r x ( l - x) .  */  #define  XMIW  0.005  #define  XMAX  1.0  #define  XSTEP  0.005  #define  R  3.5  #define  MAP_ORDER  1  #include  <stdio.h>  #include  <stdlib.h>  #include  <process.h>  char  *progname;  FILE *efopen(char void  /* d e f i n e a 1 map f = l o r c o m p o s i t i o n  /* name f o r e r r o r messages */ *, char *) ;  q u a d r a t i c ( F I L E *) ;  ff=2 */  41  Appendix A. Listing of Source Code  void main(int  argc,  char  *argv[])  {  FILE * f p , *efopen();  f p = e f o p e n ( a r g v [ l ] , "w"); quadratic(fp); fclose(fp); }  FILE * e f o p e n ( c h a r  *file,  char  *mode) /*open  file.*/  {  FILE * f p , *fopen(); extern  if  char  *progname;  ( ( f p = f o p e n ( f i l e , mode))  != MULL)  return f p ; f p r i n t f (stderr,  "'/,s: can't  progname, f i l e , exit(1) ; }  mode);  open f i l e  '/,s mode '/,s\n",  Appendix A. Listing of Source Code  void  quadratic(FILE  *stream)  {  double-  while  x, y, z;  (x <= XMAX)  y = R*x*(l if  {  - x);  (MAP _ ORDER = = 2 ) z = R*y*(l  {  - y);  y = z; } f p r i n t f (stream,  '"/.f \t'/,f \n" , x, y) ;  x += XSTEP; }  /* program:  bif.c,  The i t e r a t i v e  #define RMIK  by: C h r i s  quadratic  2.9  Hook,  e q u a t i o n f ( x ) = r * x * ( l - x ) */  42  Appendix A. Listing of Source Code  #define RMAX  4.0  #define RSTEP  0.005  # d e f i n e KBEFORE  1500  #define NPLOT  120  #include  <stdio.h>  #include  <process.h>  char FILE  *progname; *efopen(char  /* name f o r e r r o r messages */ *, char * ) ;  void bifurcate(FILE  *stream);  v o i d m a i n ( i n t a r g c , char * a r g v [ ] ) {  F I L E * f p , *ef o p e n Q ;  fp  = e f o p e n ( a r g v [ l ] , "w");  bifurcate(fp); fclose(fp); }  FILE  *efopen(char  *file,  char *mode)  43  44  Appendix A. Listing of Source Code  {  FILE * f p , *fopen(); e x t e r n char  if  *progname;  ( ( f p = f o p e n ( f i l e , mode))  != MULL)  return f p ; f p r i n t f (stderr,  '"/,s: can't  progname, f i l e ,  mode);  open f i l e  exit(1); >  void  bifurcate(FILE  *stream)  {  int i ;  double x, y, r ;  r  = RMIN;  while  ( r <= RMAX)  {  x = 0.1; for  ( i = l ; i <= MBEFORE; i++)  y = r*x*(l  - x);  {  '/.s mode '/,s\n",  Appendix A. Listing of Source Code  x = y; } for  (i  = 1;  i  <= NPLOT; i++)  fprintf(stream,  "'/.f  {  '/.fYn", r , x);  y = r*x*(l - x); x = y; } r  += RSTEP;  } }  /* program: l y a . c ,  by: C h r i s Hook,  A routine f o r finding  t h e Lyapunov  exponents from t h e q u a d r a t i c d i f f e r e n c e f(x) = r*x*(l then graph  equation  - x)  the r values against the corresponding  Lyapunov exponent s.  #define  RMIN  3.0  #define  RMAX  4.0  Appendix A. Listing of Source Code  #define RSTEP  0.005  #define WSTEPS  200  #define X0  0.005  #include  <stdio.h>  #include  <process.h>  #include  <math.h>  char  *progname;  FILE *efopen(char void  /* name f o r e r r o r messages */ *, char * ) ;  lyapunov(FILE * ) ;  v o i d m a i n ( i n t a r g c , char * a r g v [ ] ) {  FILE * f p , *efopen();  fp = efopen(argv[l] , " B " ) ; lyapunov(fp); fclose(fp); }  46  47  Appendix A. Listing of Source Code  FILE *efopen(char  *file,  char *mode)  {  FILE * f p , *fopen(); e x t e r n char *progname;  if  ((fp= fopen(file,  mode))  != NULL)  return f p ; fprintf(stderr,  '"/.s: can't open f i l e  progname, f i l e ,  mode);  '/.s mode '/,s\n",  exit(l); }  void  lyapunov(FILE  *stream)  {  int  n, i ;  double Lyapunov, Lambda, LTemp,  r  = RMIN;  while  ( r <= RMAX)  {  x, y, r ;  Appendix A. Listing of Source Code  Lambda = 0; n = 1; x = X0; while  (n <= NSTEPS)  y = r*x*(l  {  - x);  x = y; LTemp if  = fabs(r*(l  (LTemp == 0)  - 2*x)); LTemp = 0.000001;  Lambda += log(LTemp); n++; } Lyapunov = Lambda/NSTEPS; f p r i n t f (stream, "*/.f \t'/,f \n" , r , Lyapunov) r += RSTEP;  >  Appendix A.  A.2  /*  49  Listing of Source Code  R a n d o m model analysis C code  program: quad.c,  by:  Produces b o t h the  s i n g l e and  random v e r s i o n Note: The  C h r i s Hook,  of the  quadratic  random p a r t  Retrieve  double  of the  a standard  (twice  map  f(x) = r x ( l - x).  equation  ( f o r the r e n o r m a l i z a t i o n  the MTS  systems r o u t i n e s  and  Lyapunov diagrams,  and  written,  i s returned sigma and  mu  v i a the from the  random q u a d r a t i c  #define XMIK  given  diagram,  a compendium of r o u t i n e s , then t r a n s f o r m  transformation chosen standard  defined  both  supplied  i t t o the p a r t i c u l a r  Y = X*sigma + mu,  where X  normal v a r i a b l e  routine,  i n d e s c r i p t i o n of the  proposed  d i f f e r e n c e model.  0.005  #define XMAX  1.0  #define XSTEP  0.001  #define R  3.7  #define MAP_0RDER  follows:  are u t i l y z e d , f o r the b i f u r c a t i o n  are used) and  being  i s done as  normal v a r i a b l e back from a  routine  distribution  iterated)  2 /* d e f i n e  a 1 map  f = l or c o m p o s i t i o n  ff=2  */  Appendix A. Listing of Source Code  #define  LOW_HIGH_SIGMA  0.075  #define  MEDIUM_SIGMA  0.149  #define  L0W_P0P  0.25  #define  HIGH_P0P  0.75  #define  MU  0.75  #include  <stdio.h>  #include  <stdlib.h>  fortran  float  FRAND(float  fortran  flaot  FRAMDN(float * ) ;  char  *progname;  FILE *efopen(char  *);  /* MTS random v a r i a b l e  /* name f o r e r r o r messages */ *, char * ) ;  void  q u a d r a t i c ( F I L E *) ;  void  m a i n ( i n t a r g c , char * a r g v [ ] )  {  FILE * f p , *efopen();  f p = e f o p e n ( a r g v [ l ] , "w");  50  r o u t i n e s */  Appendix A. Listing of Source Code  quadratic(fp); fclose(fp); }  FILE *efopen(char  *file,  char *mode) /*open  file*/  {  FILE * f p , *fopen(); e x t e r n char  if  *progname;  ( ( f p = f open ( f i l e ,  mode)) != MULL)  return f p ; fprintf(stderr,  "'/,s: can't open f i l e  progname, f i l e ,  mode);  exit(1);  }  void  q u a d r a t i c ( F I L E *stream)  {  float double  RI, FR1, FSEED; x, y, z, x p l a c e , Rand,  var;  */,s mode '/,s\n  Appendix A. Listing of Source Code  x = XMIN; x p l a c e = XMIN; FSEED = 1 . 0 ; FR1  = FRAND(ftFSEED);  while  (x <= XMAX)  {  srand(j); if  (x < L0W_P0P var  I I x > HIGH_P0P)  = L0W_HIGH_SIGMA;  else var  = MEDIUM,SIGMA;  RI = FRAMDW(ftFRl); Rand = ( ( d o u b l e ) R l ) * v a r  + MU;  y = Rand*R*x*(l - x ) ; if  (MAP.ORDER ==2)  {  RI = FRANDN(ftFR); Rand = ( (double)R1)*var  + MU;  z = Rand*R*y*(l - y ) ; y = z; } f p r i n t f (stream, x += XSTEP; x += XSTEP; }  '7.f Yt'/.f \n",  x, y)  Appendix A. Listing of Source Code  /* program: b i f r . c ,  by: C h r i s Hook,  The random v e r s i o n of t h e i t e r a t i v e quadratic  equation f(x) = r * x * ( l - x ) .  random v a r i a b l e p a r t , from  i s produced  "Numerical  Here,  by a r o u t i n e borrowed, i n  R e c i p e s i n C". */  #define RMIK  1.0  S d e f i n e RMAX  4.0  #define RSTEP  0.03  #define MBEFORE  250  #define NPL0T  120  #define XSTEP  0.0028 /* e q u i v a l e n t  #define L0W_HIGH_SIGMA #define MEDIUM.SIGMA  0.075  0.149  #define L0W_P0P  0.25  S d e f i n e HIGH_P0P  0.75  #define MU  0.75  #include  <stdio.h>  #include < s t d l i b . h >  t h e normal  t o 1/(NBEFDRE+NPL0T)  54  Appendix A. Listing of Source Code  #include  <process.h>  # i n c l u d e <math.h>  char *progname;  /* name f o r e r r o r messages  FILE *efopen(char  */  *, char * ) ;  void bifurcate(FILE * ) ; double normal  (void);  double r a n ( v o i d ) ;  v o i d m a i n ( i n t a r g c , char * a r g v [ ] ) {  FILE * f p , *efopen();  fp  = efopen(argv[1] , "w") ;  bifurcate(fp); fclose(fp); }  FILE *efopen(char  *file,  {  FILE * f p , * f o p e n ( ) ;  char *mode)  /*open  file*/  Appendix A. Listing of Source Code  e x t e r n char  if  55  *progname;  ((fp = fopen(file,  mode))  != MULL)  return f p ; fprintf(stderr,  "'/,s: can't  progname, f i l e ,  mode);  open f i l e  */,s mode '/,s\n",  exit(1); >  void  bifurcate(FILE  *stream)  {  int i ; double x, x p l a c e ,  r  y, r , stdev,  Rand;  = RMIM;  while  ( r <= RMAX)  {  xplace = 0 . 1 ; x = 0.1; for  ( i = l ; i <= MBEFORE; i++)  {  srand(i); if  ( x p l a c e < LOW.POP stdev  I I xplace  = L0W_HTGH_SIGMA;  > HIGH.POP)  Appendix  A. Listing  of Source Code  56  else s t d e v = MEDIUM.SIGMA; Rand = normal ( ) * s t d e v  + MU;  Rand = (Rand > 1)? 1 : Rand; y = Rand*r*x*(l  - x);  x = y; xplace  += XSTEP;  } for  ( i = 1; i <= NPLOT; i++)  {  srand(i); f p r i n t f (stream, if  '7,f  ( x p l a c e < L0W_P0P stdev  */.f\n" , r , x) ; I I xplace  = LOW_HIGH_SIGMA;  else stdev  = MEDIUM.SIGMA;  Rand = normal () *stdev  + MU;  Rand = (Rand > 1)? 1 : Rand; y = Rand*r*x*(l x = y; xplace  += XSTEP;  } r += RSTEP; }  - x);  > HIGH.POP)  Appendix A. Listing of Source Code  double  normal(void)  { static  i n t iset=0;  static  double  gset;  double f a c , r , v l , v2;  if  (iset do  ==  0)  {  { vl  = fabs(2.0*ran()  - 1.0);  v2 = f a b s ( 2 . 0 * r a n ( )  - 1.0);  r = v l + v2*v2; }  while  ( r >=  1.0);  fac = sqrt(-2.0*log(r)/r); gset  = vl*fac;  iset  = 1;  return  v2*fac;  } else iset  i = 0;  return  gset;  } }  double  ran(void)  Appendix A. Listing of Source Code  { double RAND;  RAND = ( d o u b l e ) r a n d ( ) ; RAND /= 32767; r e t u r n RAND;  /* program:  lyar.c,  A routine version  by: C h r i s  f o r finding  t h e Lyapunov  of t h e q u a d r a t i c  f(x) = r*x*(l  difference  exponents f o r t h e random equation  - x)  t h e n graph t h e r v a l u e s exponents.  Hook,  The random  against  routines  f r o m "Numerical R e c i p i e s  #define RMIN  0.0  #define RMAX  4.0  #define RSTEP  0.02  the corresponding a r e borrowed,  i n C".  Lyapunov  i n part,  Appendix A. Listing of Source Code  #define NSTEPS  250  #define XSTEP  0.004  #define XO  0.004  S d e f i n e LOW_RTGH_SIGMA  0.075  #define MEDIUM.SIGMA  0.149  #define LDW.POP  0.25  #define  0.75  HIGH.POP  #define MU  0.95  #include  <stdio.h>  #include  <stdlib.h>  #include  <process.h>  #include  <math.h>  char *progname;  /•set  *, char * ) ;  lyapunov(FILE * ) ;  double n o r m a l ( v o i d ) ; double  ran(void);  v o i d m a i n ( i n t a r g c , char * a r g v [ ] ) {  the e l e c t r i c  /* name f o r e r r o r messages */  FILE *efopen(char void  /* i s e q u i v a l e n t  t o 1/NSTEPS */  demand l e v e l  here*/  Appendix A, Listing of Source Code  60  FILE * f p , *efopen();  fp  = efopen(argv[l],  "w") ;  lyapunov(fp); fclose(fp); }  FILE *efopen(char  *file,  char *mode) /* open f i l e .  I f can't open, t e r m i n a t e . * /  {  FILE * f p , *fopen(); e x t e r n char  if  ((fp =  *progname;  fopenCfile,  mode))  != NULL)  return f p ; f p r i n t f (stderr,  "'/,s: can't open f i l e  progname,  mode);  file,  exit(l); }  void  lyapunov(FILE  *stream)  V.s mode '/,s\n",  Appendix A. Listing of Source Code  61  {  i n t n,  i ;  double Lyapunov, Lambda, LTemp, x, x p l a c e , y, r , Rand, s t d e v ;  r  = RMIN;  while  ( r <= RMAX)  {  =0;  Lambda n = 1;  srand(l); x = X0; xplace while if  = X0; (n <= NSTEPS)  ( x p l a c e < LDW_P0P stdev  {  |'| x p l a c e  > HIGH.POP)  = LOW_HTGH_SIGMA;  else stdev  =  MEDIUKLSIGMA;  Rand = normal ( ) * s t d e v  + MU;  Rand = (Rand > 1)? 1 : Rand; y = Rand*r*x*(l  - x);  x = y; LTemp = f a b s ( r * ( l if  (LTemp == 0)  - 2*x)); LTemp = 0.000001;  Lambda += log(LTemp); n++;  Appendix A. Listing of Source Code  xplace += XSTEP; } Lyapunov = Lambda/NSTEPS; f p r i n t f (stream, "*/,f \t'/,f \n" , r , Lyapunov); r += RSTEP; }  double normal(void) { s t a t i c i n t iset=0; s t a t i c double gset; double f a c , r , v l , v2;  if  (iset == 0) { do  {  v l = fabs(2.0*ran() - 1.0); v2 = fabs(2.0*ran() - 1.0); r = v l + v2*v2; }  while (r >= 1.0);  fac = s q r t ( - 2 . 0 * l o g ( r ) / r ) ; gset = v l * f a c ; iset = 1; return v2*fac; }  62  Appendix A. Listing of Source Code  else iset  { = 0;  return  gset;  } }  double  ran(void)  { double RAND;  RAND = ( d o u b l e ) r a n d ( ) ; RAND /= 32767; r e t u r n RAND;  }  Bibliography  [1] Argoul, F., and A. Arneodo, "Lyapunov exponents and phase transitions in dynamical systems", In Arnold, L., and V. Wihstutz, eds. Lyapunov exponents. SpringerVerlag: Berlin, 1986. [2] Bhatia, N.P., and G.P. Szego. Stability theory of dynamical systems. Springer-Verlag:  Berlin, 1970. [3] Bolet, A.M., ed. Forecasting U.S. electric demand. Westview: Boulder, 1985. [4] Crutchfield, J.P., Farmer, J.D., and B.A. Huberman, "Fluctuations and simple chaotic dynamics", Phys. Rep. 92, 45, 1982. [5] Cushing, J.M., "Bifurcation of periodic solutions of non-linear equations in agestructured population dynamics", In Lakshmikantham, V., ed.Nonlinear in mathematical  phenomena  sciences. Academic Press: New York, 1892.  [6] Devaney, R.L. An introduction  to chaotic dynamical systems. Addison-Wesley: Red-  wood City, 1987. [7] Dubin, J .A. Consumer durable choice and the demand for electricity.  Elsevier: Am-  sterdam, 1985. [8] Feigenbaum, M., "Low dimensional dynamics and the period doubling scenario", In Garrido, L., ed. Dynamical  systems and chaos. Springer-Verlag: Berlin, 1983.  [9] Ford, J., "Solving the unsolvable, predicting the unpredictable",In Barnsley, M.F., and S.G. Demko, eds. Chaotic dynamics and fractals. 64  Academic Press: Orlando,  Bibliography  65  1986. [10] Friedman, A. Foundations of modern analysis. Dover: New York, 1982. [11] Garrido, L., and C. Simo, "Some ideas about strange attractors", In Garrido, L., ed. Dynamical systems and chaos. Springer-Verlag: Berlin, 1983.  [12] Geisel, T., "Chaos and noise", In Buchler, J.R., et al., eds. Chaos in Astrophysics. Reidel: New York, 1985. [13] Guckenheimer, J., and P. Holmes. Nonlinear oscillations, dynamical systems, and bifurcations of vectorfields.Springer-Verlag: New York, 1983.  [14] Guckenheimer, J., Oster, G., and A. Ipaktchi, "The dynamics of density dependent population models", J. Math. Biology, 4, 1977. [15] Hirsch, M.W., "The dynamical systems approach to differential equations", Bulletin of the Amer. Math. Soc, Vol. 11, No. 1, July 1984,  1-64.  [16] Irwin, M.C. Smooth dynamical systems. Academic Press: London, 1980. [17] Lorenz, E.N., "Deterministic non-periodic flow", Journal of the Atmospheric Sciences, Vol. 20, 1963, 130-141. [18] Ma, S. K., "Introduction to the renormalization group", Review of modern physics, Vol. 45, No. 4, Oct. 1973, 589-614. [19] Munasinghe, M. The economics of power system reliability and planning. John Hop-  kins: Baltimore, 1979. [20] Murphy, F.H., and A.L. Soyster. Economic behavior of electric utilities. Prentice-  Hall: Englewood Cliffs, 1983.  Bibliography  66  [21] Newhouse, S . E . "Understanding chaotic dynamics", In Chandra, J . , ed. Chaos in nonlinear dynamical systems. S I A M : Philadelphia, 1984. [22] Pachauri, R . K . The dynamics of electrical energy supply and demand. Praeger: New York, 1975. [23] Palis, J . Jr., and W . de Melo. Geometric theory of dynamical systems, trans, by A . K . Manning. Springer-Verlag: New York, 1982. [24] Peitgen, H . O . , and P . H . Richter. The beauty of fractals. Springer-Verlag:  Berlin,  1986. [25] Rabinovitch, A . , and R . Thieberger, " T i m e series analysis of chaotic signals", Physica 28D, 1987, 409-415. [26] Royden, H . L . Real Analysis., 2nd ed. M a c M i l l i a n Press: New York, 1968. [27] Schuster, H . G . Deterministic chaos, 2nd ed. V C H : Weinheim, 1988. [28] Shaw, R . , "Strange attractors, chaotic behavior, and information flow", Z. Naturforsch., 36a, 1981, 80-112. [29] Sparrow, C . The lorenz equations: bifuractions, chaos, and strange attractors. Springer-Verlag: New York, 1982. [30] Szlenk, W . An introduction to the theory of smooth dynamical systems. Wiley: Chichester, 1984. [31] Taylor, A . E . . General theory of functions and integration. Blaisdell: New York, 1965. [32] Wolf, A . , Swift, J . B . , Swinney, H . L . , and J . A . Vastano, "Determining Lyapunov exponents from a time series", Physica 16D ,1985, 285-317.  


Citation Scheme:


Citations by CSL (citeproc-js)

Usage Statistics



Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            async >
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:


Related Items