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

Download

Media
831-UBC_1989_A7 H66.pdf [ 2.61MB ]
Metadata
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
831-1.0062883-fulltext.txt
Citation
831-1.0062883.ris

Full Text

I ON THE NONLINEAR BEHAVIOUR OF POPULATION DYNAMICS LN ELECTRIC D E M A N D FORECASTING B y Mr. Chris Hook B. A. , University of British Columbia, 1985 A THESIS SUBMITTED IN PARTIAL F U L F I L L M E N T O F T H E REQUIREMENTS FOR T H E D E G R E E OF M A S T E R S OF A P P L I E D SC I ENCE in T H E F A C U L T Y OF G R A D U A T E STUDIES D E P A R T M E N T OF CIVIL ENGINEERING We accept this thesis as conforming to the required standard T H E UNIVERSITY O F BRITISH COLUMB IA December 1988 © Mr. Chris Hook, 1988 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. The University of British Columbia Vancouver, Canada Department DE-6 (2/88) 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 vi 1 Electric Demand Forecasting 1 1.1 Introduction 1 1.2 Chaos 4 2 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 3 Population Dynamics 14 3.1 Overview 14 3.2 Period Doubling and Chaos 15 3.2.1 Bifurcation 15 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 Demand 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 Non-random analysis C source code 40 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 x0 8 3.2 A bifurcating system with n period doublings, and 2" systems paths . . . 15 3.3 The attractor vs. the control parameter r for the quadratic difference equation 18 3.4 A renormalization of F, demonstrating the self similarity that the conju-gation operator LT produces 20 3.5 The Lyapunov exponents vs. the control parameter r from the quadratic difference equation 21 3.6 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 Demand 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 lin-ear 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 appar-ent 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 fore-casting 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« sim-ple 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 accura-cies. 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 de-fined 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 determin-istic 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 pa-rameters) 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 chap-ter 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 fore-casting is introduced and analyzed to illustrate the possibility of the system having an inherently chaotic nature. Chapter 2 Dynamical Systems 2.1 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 02 £ <p, we have 01 0 02 £ tp, i.e., their set intersection 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, x2 € A", x1 x2, there exist disjoint open sets Oi £ <p and 02 G ip, such that Xi G 0\ and x2 G 02. 6 Chapter 2. Dynamical Systems 7 This restriction will allow us, in subsequent sections, to construct distinct open neigh-borhoods 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 x0 £ X, such that f(x0) — x0 (i.e., the mapping / : X —> X leaves the point unchanged or, alternatively, the point xD is invariant under the mapping /). By a periodic point of / [6, 10, 31], we mean that after some specific number of iterations of a mapping / of a particular point x0, we return to the point x0. That is, for some specified integer n, n = 1,2,3,..., (fn)(xD) = x0. It is seen immediately that a fixed point is simply a periodic point of period n = 1. For all periodic points, the smallest n > 0 with ( / n ) ( £ o ) = x0 is called the prime period of x0. Now, letting A" be a subset of the real line, by definition [13, 6, 30], a periodic point x0 of prime period n (and from this point forth, all periodic points will be referred to by their prime period, unless otherwise indicated) is called hyperbolic if | {fn)'(x0) [^  1. For | (fn)'(x0) |> 1, x0 is called a repelling periodic point, and for | (fn)'(x0) |< 1, x0 is called an attractive periodic point. The case of | (fTl)'(x0) |= 1 for a periodic point x0 defines an elliptic periodic point, and shall not be considered an}7 further here. Some important properties of hyperbolic fixed points (i.e., for n = 1) are as follows [15, 16, 2, 6, 30]: If x0 is an attracting hyperbolic fixed point, i.e., | f'(xD) |< 1, then 3 an open ball O about xc such that Vx £ O, l im n _ 0 0 fn(x) = xQ. If x0 is a repelling hyperbolic fixed point, i.e., j f'(x0) \> 1, then 3 an open ball O about x0 such that VIE £ O. i / xOJ Hm n_ + 0 0/ n(x) ^ O. Chapter 2. Dynamical Systems 8 Figure 2.1: Stable and unstable lines induced about a fixed point x0. Hence, 3 an open set of points about an attracting fixed point x0 which all con-verge under forward iteration of / to xQ. Conversely, 3 an open subset of points about a repelling fixed point x0 which move away from their initial neighborhood of xQ, or alternatively, move toward x„ under backward iteration of / . We define the unstable set of points Wu(x0) as being the largest open punctured interval about x0 which has the repelling characteristic. Likewise, we define the stable set of points W(x0) as being the largest open interval about x0 for which the attracting property holds. For dimensions higher than one, the stable and unstable sets of points may be ex-tended naturally from characteristic intervals to characteristic manifolds (see figure 2.1). Chapter 2. Dynamical Systems 9 2.2 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 (pt maps subsets of A' injectively into X. 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 sys-tem'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 per-turbing forces acting on those characteristic points. Finally, the resistance of the system to withstand slight perturbations without giving way to any significant long term dy-namical 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 10 2.3 Chaotic Dynamical Systems 2.3.1 Overview The study of linear mathematical systems has lead to certain characteristics in the pre-diction 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 11 attractors. 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, ipt) and (Y,ipt) are topologically conjugate [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 tpt X i -> i 9 I I 9 I -> I Y A Y That is, tpt — g'1 o ipt c g or g o ipt — ipt o g \/t. By definition, we see that the homeomorphic mapping g conjugates ipt with ipt-A mapping / : X —> X is said to be topologically transitive if, for open non-empty sets 0 i , 0 2 C A there exists a k > 0 such that (fk)(Ox) fl 02 ± 0. This states that under iteration, / moves points from any open neighborhood to any other. Chapter 2. Dynamical Systems 12 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 CT diffeomorphism if g(x) and g~l(x) are Cr homeomorphisms, where by Cr we mean that both g(x) and g~^[x) are differentiable to degree 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(x0) measures whether or not slight perturbations or dis-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: L(x0) = limx_toolim!:_^o fN(Xo + e)-fN(x0) e Chapter 2. Dynamical Systems 13 L(x0) = limx^oojj log dfN(x0) (2.1) dxD From this definition, we note that if L(x0) is positive, the system will yield exponential 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 be-havior, 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 n systems paths 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: xn+1 = F(xn) (3.2) In particular, bifurcations, renormalization group techniques, and the constrained quadratic map prove indispensable in the analysis of problems in iterative equations such as 3.2 and wil l be developed first, in isolation, and second, in 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 in two of some particular process or dynamical flow. That is, at some point in a system's evolution, the system's mapped trajectory wil l suddenly branch out in to two mutually distinct, but simultaneous paths. Chapter 3. Population Dynamics 16 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 bifur-cations, 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., Xn+1 = FX(xn) (3.3) We define a period doubling of F\ as follows [6]: 1. Fx(0) = 0 VA.in an interval about AD 2. Fi(0) = -l. 3. F£(0) + 0. 4. (0) ^ 0. ax Chapter 3. Population Dynamics 17 If the above four conditions are satisfied for Fx, where A0 is a fixed control parameter, 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 The 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]: = rxn(l - xn) 0 < xn < 1, 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 The Renormalization Group 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 2n period doublings [1, 27]) occurs. Chapter 3. Population Dynamics 18 Xn Figure 3.3: The attractor vs. the control parameter r for the quadratic difference equa-tion. 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 oper-ator: Chapter 3. Population Dynamics 19 LT(x) - (JC - qT) 9r - qT (3.5) where qT and qT are seen in figure 3.4. From equation 3.5, we produce the inverse operator (x) - (qT - qT)x + qT and the conjugation of F2, i.e., iterating Fr down to the next period doubling level, gives the renormalization of Fr, producing, for the quadratic map, an exact duplicate of the original period doubling map. Consequently, the renormalization of FT is defined as 3.5 Chaos, Period Doubling, 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 par-ticular, 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 cor-respondence -between the behavior of the bifurcations and the signs of the corresponding Lyapunov exponents. To see this consider the following: Define FT(x) as in equation 3.4. Then using equation 2.1 we calculate the Lyapunov exponents produced from the mapping Fr for various values of r. That is (3.6) Chapter 3. Population Dynamics Figure 3.4: A renormalization of F, demonstrating the self similarity that the gation operator LT produces. Chapter 3. Population Dynamics 21 1 N L ( T ) = lim — T ln | Fr'(xi) |, 0 < x{ < 1, 0 < r < 4 (3.7) 1 i=Q where F' represents the slope of the map. So, in our particular case, we obtain a spectrum of Lyapunov exponents from 1 N L(r) = Jirr^ — £ l n | r ( l - 2a;,-) |, 0 < X i < 1, 0 < r < 4 (3.8) By inspection of figure 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 22 Lyapunov exponents. 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 popu-lation 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. Further-more, 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 re-gions 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 Model Construction We recall from the previous chapter two equations of central importance to our proba-bilistic model construction and analysis. 1. x n + 1 = rxn(l — xn) 0 < xn < 1, 0 < r < 4 , equation 3.4. 2. L(r) = Hmiv-^oo -p ££L 0 l n I K 1 - 2xi) I. 0 < xi < 1. 0 < r < 4 , equation 3.8. 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 Chapter 4. Electricity Demand and the Effect of Population Dynamics 26 H{il,xn) =r}Xi(xn)-rxn(l - xn) = vXi(xn) • x n + 1 0 < 7 7 , x n < l , 0 < r < 4 (4.9) where the 7jXi{xn) are randomly distributed. Even though xn+1 has already been well analyzed, it remains to determine the addi-tional behavioral effect of rjXi(xn) on xn+1 in order to understand #(77, £ n ) more fully. As r/Xi(xn) 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 gen-erally 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)Xi(xn) that is not only randomly 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 The 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 27 1 H V ) 2 a\/2ir = v((xt(x)) where the corresponding distribution of £,Xi{x) is =>Xi{x) = / —\=e J-oo ay I T Ydt where, by the substitution s = —^ , dt = ads, equation 4.11 becomes where (4.10) (4.11) (4.12) = / ~7==e *dt J — oo V £K with corresponding standard normal density function (4.13) 1 _S (4.14) The mean of equation 4.11, i.e., of a normally distributed random variable is defined to be 1 r°° 11 T—U. \ 2 E(Xi) = — = / x-e~{*)dx CT\/2TT J-OO (4.15) 1 f°° , N _ i ( £ ^ i ) 2 . = —y= / (x — p)e 2K- " > 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) = / — / 5 • e 2 ds •+ fi = fi J — oo 2TT (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 (xn), i.e., for xn < 0.25, we expect 77 to yield a coefficient of variation of 10 per cent. 2. For intermediate values of (xn), we expect 77 to yield a coefficient of variation of 20 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 per cent. 3. For large values of (a;n), i.e., xn > 0.75, we expect a per capita demand ceiling to E(X t)with £ VXiM = I E{X{) with 2 . E(Xi) with ^ 20 10 10 , .25 < xn < .75 xn < .25 xn > .75 where the Xi are normally distributed. 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],xn) = VXi{xn)-rxn(l-xn) 0<xn<l, 0 < r < 4 (4.17) where r]X, {xn) = n(E(Xi)) and E(Xi) = — y = x-e—t'ldx (4.18) CT V 27T J-oo and culminatively v(E(Xi) = vx.M = < E{X{) with * = .10 ,xn< .25 E(Xi) with* = .20 ,.25 <a;n<.75 (4.19) E(Xi) with °- = .10 ,xn> .75 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 Model 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!}7, we note that for both the non-random and random models tested here, 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 H 0.5 0 .3 0. 1 -0. 1 -0.3 -0.5 -0.7 H -0.9 - 1 , 1 -- 1 . 3 -- 1 . 5 -- 1 . 7 -- 1 . 9 -- 2 . 1 --2.3 -2.5 i 3.2 3.4 3.6 E .V . (X ( r ) ) 3.8 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 3.2 I 3.4 3.6 E . V . ( X ( r ) ) 3.8 E.V.(Xn) 0.8 -0.6-0 . 4 0.2 — i i 1 1 1 1 1 1 1 1 1 1 1 1 — 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.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 34 Figure 4.10: Randomized renormalization group analysis for the quadratic difference equation, mean of 0.75. 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 non-random 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 non-random 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 36 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 ) ) , 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 37 4.5 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}rstem, such as has been described here, enters a region of 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 oper-ator for period two. • The bifurcation diagram (phase portrait) of the iterated quadratic difference equa-tion. • 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 a final note on methodology, the data files produced 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 sys-tems.) 39 Appendix A. Listing of Source Code 40 A . l Non-random analysis C source code /* program: quad.c, by: Chris Hook, Produces both the single and double (twice iterated) quadratic map 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 /* define a 1 map f=l or composition ff=2 */ #include <stdio.h> #include <stdlib.h> #include <process.h> char *progname; /* name f o r error messages */ FILE *efopen(char *, char *) ; void quadratic(FILE *) ; Appendix A. Listing of Source Code 41 void main(int argc, char *argv[]) { FILE *fp, *efopen(); fp = efopen(argv[l] , "w"); quadratic(fp); f c l o s e ( f p ) ; } FILE *efopen(char * f i l e , char *mode) /*open f i l e . * / { FILE *fp, *fopen(); extern char *progname; i f ((fp = f o p e n ( f i l e , mode)) != MULL) return fp; f p r i n t f (stderr, "'/,s: can't open f i l e '/,s mode '/,s\n", progname, f i l e , mode); exit(1) ; } Appendix A. Listing of Source Code 42 void quadratic(FILE *stream) { double- x, y, z; while (x <= XMAX) { y = R*x*(l - x); i f (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: b i f . c , by: Chris Hook, The i t e r a t i v e quadratic equation f(x) = r* x * ( l - x ) */ #define RMIK 2.9 Appendix A. Listing of Source Code 43 #define RMAX 4.0 #define RSTEP 0.005 #define KBEFORE 1500 #define NPLOT 120 #include <stdio.h> #include <process.h> char *progname; /* name f o r error messages */ FILE *efopen(char *, char * ) ; void b i f u r c a t e ( F I L E *stream); void main(int argc, char *argv[]) { FILE *fp, *ef openQ ; fp = efopen(argv[l], "w"); b i f u r c a t e ( f p ) ; f c l o s e ( f p ) ; } FILE *efopen(char * f i l e , char *mode) Appendix A. Listing of Source Code 44 { FILE *fp, *fopen(); extern char *progname; i f ((fp = 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 open f i l e '/.s mode '/,s\n", progname, f i l e , mode); e x i t ( 1 ) ; > void b i f u r c a t e ( F I L E *stream) { in t i ; double x, y, r; r = RMIN; while (r <= RMAX) { x = 0.1; fo r ( i = l ; i <= MBEFORE; i++) { y = r * x * ( l - x); 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: ly a . c , by: Chris Hook, A routine f o r f i n d i n g the Lyapunov exponents from the quadratic difference equation f(x) = r * x * ( l - x) then graph the r values against the corresponding Lyapunov exponent s. #define RMIN 3.0 #define RMAX 4.0 Appendix A. Listing of Source Code 46 #define RSTEP 0.005 #define WSTEPS 200 #define X0 0.005 #include <stdio.h> #include <process.h> #include <math.h> char *progname; /* name f o r error messages */ FILE *efopen(char *, char * ) ; void lyapunov(FILE * ) ; void main(int argc, char *argv[]) { FILE *fp, *efopen(); fp = efopen(argv[l] , " B " ) ; lyapunov(fp); f c l o s e ( f p ) ; } Appendix A. Listing of Source Code 47 FILE *efopen(char * f i l e , char *mode) { FILE *fp, *fopen(); extern char *progname; i f ((fp = f o p e n ( f i l e , mode)) != NULL) return fp; f p r i n t f ( s t d e r r , '"/.s: can't open f i l e '/.s mode '/,s\n", progname, f i l e , mode); e x i t ( l ) ; } void lyapunov(FILE *stream) { in t n, i ; double Lyapunov, Lambda, LTemp, x, y, r ; r = RMIN; while (r <= RMAX) { Appendix A. Listing of Source Code Lambda = 0; n = 1; x = X0; while (n <= NSTEPS) { y = r * x * ( l - x); x = y; LTemp = f a b s ( r * ( l - 2*x)); i f (LTemp == 0) 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. Listing of Source Code 49 A.2 Random model analysis C code /* program: quad.c, by: Chris Hook, Produces both the single and double (twice iterated) random version of the quadratic map f(x) = r x ( l - x). Note: The random part of the equation i s done as follows: Retrieve a standard normal va r i a b l e back from a given routine (for the renormalization diagram, the MTS systems routines are u t i l y z e d , f o r the b i f u r c a t i o n and Lyapunov diagrams, a compendium of routines, both supplied and written, are used) and then transform i t to the p a r t i c u l a r d i s t r i b u t i o n v i a the transformation Y = X*sigma + mu, where X i s returned from the chosen standard normal v a r i a b l e routine, sigma and mu being defined i n d e s c r i p t i o n of the proposed random quadratic d i f f e r e n c e model. #define XMIK 0.005 #define XMAX 1.0 #define XSTEP 0.001 #define R 3.7 #define MAP_0RDER 2 /* define a 1 map f=l or composition ff=2 */ Appendix A. Listing of Source Code 50 #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> f o r t r a n f l o a t FRAND(float * ) ; /* MTS random va r i a b l e routines */ f o r t r a n f l a o t FRAMDN(float * ) ; char *progname; /* name f o r error messages */ FILE *efopen(char *, char * ) ; void quadratic(FILE *) ; void main(int argc, char *argv[]) { FILE *fp, *efopen(); fp = efopen(argv[l] , "w"); Appendix A. Listing of Source Code quadratic(fp); f c l o s e ( f p ) ; } FILE *efopen(char * f i l e , char *mode) /*open f i l e * / { FILE *fp, *fopen(); extern char *progname; i f ((fp = f open ( f i l e , mode)) != MULL) return fp; f p r i n t f ( s t d e r r , "'/,s: can't open f i l e */,s mode '/,s\n progname, f i l e , mode); exit ( 1 ) ; } void quadratic(FILE *stream) { f l o a t RI, FR1, FSEED; double x, y, z, xplace, Rand, var; Appendix A. Listing of Source Code x = XMIN; xplace = XMIN; FSEED =1.0; FR1 = FRAND(ftFSEED); while (x <= XMAX) { srand(j); i f (x < L0W_P0P I I x > HIGH_P0P) var = L0W_HIGH_SIGMA; else var = MEDIUM,SIGMA; RI = FRAMDW(ftFRl); Rand = ((double)Rl)*var + MU; y = Rand*R*x*(l - x); i f (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, '7.f Yt'/.f \n", x, y) x += XSTEP; x += XSTEP; } Appendix A. Listing of Source Code /* program: b i f r . c , by: Chris Hook, The random vers i o n of the i t e r a t i v e quadratic equation f(x) = r * x * ( l - x ) . Here, the normal random v a r i a b l e i s produced by a routine borrowed, i n part, from "Numerical Recipes i n C". */ #define RMIK 1.0 Sdefine RMAX 4.0 #define RSTEP 0.03 #define MBEFORE 250 #define NPL0T 120 #define XSTEP 0.0028 /* equivalent to 1/(NBEFDRE+NPL0T) #define L0W_HIGH_SIGMA 0.075 #define MEDIUM.SIGMA 0.149 #define L0W_P0P 0.25 Sdefine HIGH_P0P 0.75 #define MU 0.75 #include <stdio.h> #include <stdlib.h> Appendix A. Listing of Source Code 54 #include <process.h> #include <math.h> char *progname; /* name f o r error messages */ FILE *efopen(char *, char * ) ; void b i f u r c a t e ( F I L E * ) ; double normal (void); double ran (void); void main(int argc, char *argv[]) { FILE *fp, *efopen(); fp = efopen(argv[1] , "w") ; b i f u r c a t e ( f p ) ; f c l o s e ( f p ) ; } FILE *efopen(char * f i l e , char *mode) /*open f i l e * / { FILE *fp, *fopen(); Appendix A. Listing of Source Code 55 extern char *progname; i f ((fp = f o p e n ( f i l e , mode)) != MULL) return f p ; f p r i n t f ( s t d e r r , "'/,s: can't open f i l e */,s mode '/,s\n", progname, f i l e , mode); e x i t ( 1 ) ; > void b i f u r c a t e ( F I L E *stream) { in t i ; double x, xplace, y, r, stdev, Rand; r = RMIM; while (r <= RMAX) { xplace = 0 . 1 ; x = 0 .1 ; f o r ( i = l ; i <= MBEFORE; i++) { sra n d ( i ) ; i f (xplace < LOW.POP I I xplace > HIGH.POP) stdev = L0W_HTGH_SIGMA; Appendix A. Listing of Source Code 56 else stdev = MEDIUM.SIGMA; Rand = normal ()*stdev + MU; Rand = (Rand > 1)? 1 : Rand; y = Rand*r*x*(l - x); x = y; xplace += XSTEP; } f o r ( i = 1; i <= NPLOT; i++) { srand ( i ) ; f p r i n t f (stream, '7,f */.f\n" , r , x) ; i f (xplace < L0W_P0P I I xplace > HIGH.POP) stdev = LOW_HIGH_SIGMA; else stdev = MEDIUM.SIGMA; Rand = normal () *stdev + MU; Rand = (Rand > 1)? 1 : Rand; y = Rand*r*x*(l - x); x = y; xplace += XSTEP; } r += RSTEP; } Appendix A. Listing of Source Code 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; i f ( i s e t == 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 ; i s e t = 1; return v2*fac; } else i i s e t = 0; return gset; } } double ran(void) Appendix A. Listing of Source Code { double RAND; RAND = (double)rand() ; RAND /= 32767; return RAND; /* program: l y a r . c , by: Chris Hook, A routine f o r f i n d i n g the Lyapunov exponents f o r the random version of the quadratic difference equation f(x) = r * x * ( l - x) then graph the r values against the corresponding Lyapunov exponents. The random routines are borrowed, i n part, from "Numerical Recipies i n C". #define RMIN #define RMAX #define RSTEP 0.0 4.0 0.02 Appendix A. Listing of Source Code #define NSTEPS 250 #define XSTEP 0.004 /* i s equivalent to 1/NSTEPS */ #define XO 0.004 Sdefine LOW_RTGH_SIGMA 0.075 #define MEDIUM.SIGMA 0.149 #define LDW.POP 0.25 #define HIGH.POP 0.75 #define MU 0.95 /•set the e l e c t r i c demand l e v e l here*/ #include <stdio.h> #include <stdlib.h> #include <process.h> #include <math.h> char *progname; /* name f o r error messages */ FILE *efopen(char *, char * ) ; void lyapunov(FILE * ) ; double normal(void); double ran(void); void main(int argc, char *argv[]) { Appendix A, Listing of Source Code 60 FILE *fp, *efopen(); fp = efopen(argv[l], "w") ; lyapunov(fp); f c l o s e ( f p ) ; } FILE *efopen(char * f i l e , char *mode) /* open f i l e . If can't open, terminate.*/ { FILE *fp, *fopen(); extern char *progname; i f ((fp = fopenCfile, mode)) != NULL) return fp; f p r i n t f (stderr, "'/,s: can't open f i l e V.s mode '/,s\n", progname, f i l e , mode); e x i t ( l ) ; } void lyapunov(FILE *stream) Appendix A. Listing of Source Code 61 { i n t n, i ; double Lyapunov, Lambda, LTemp, x, xplace, y, r , Rand, stdev; r = RMIN; while (r <= RMAX) { Lambda = 0 ; n = 1; s r a n d ( l ) ; x = X0; xplace = X0; while (n <= NSTEPS) { i f (xplace < LDW_P0P |'| xplace > HIGH.POP) stdev = LOW_HTGH_SIGMA; else stdev = MEDIUKLSIGMA; Rand = normal ()*stdev + MU; Rand = (Rand > 1)? 1 : Rand; y = Rand*r*x*(l - x); x = y; LTemp = f a b s ( r * ( l - 2*x)); i f (LTemp == 0) LTemp = 0.000001; Lambda += log(LTemp); n++; Appendix A. Listing of Source Code 62 xplace += XSTEP; } Lyapunov = Lambda/NSTEPS; fprintf (stream, "*/,f \t'/,f \n" , r, Lyapunov); r += RSTEP; } double normal(void) { static int iset=0; static double gset; double fac, r, v l , v2; i f (iset == 0) { do { vl = fabs(2.0*ran() - 1.0); v2 = fabs(2.0*ran() - 1.0); r = vl + v2*v2; } while (r >= 1.0); fac = sqrt(-2.0*log(r)/r); gset = vl*fac; iset = 1; return v2*fac; } Appendix A. Listing of Source Code else { i s e t = 0; return gset; } } double ran(void) { double RAND; RAND = (double)rand(); RAND /= 32767; return RAND; } Bibliography [1] Argoul, F., and A. Arneodo, "Lyapunov exponents and phase transitions in dynam-ical systems", In Arnold, L., and V. Wihstutz, eds. Lyapunov exponents. Springer-Verlag: 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 age-structured population dynamics", In Lakshmikantham, V., ed.Nonlinear phenomena in mathematical 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. Academic Press: Orlando, 64 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 vector fields. 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 Sci-ences, 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, "Time series analysis of chaotic signals", Phys-ica 28D, 1987, 409-415. [26] Royden, H . L . Real Analysis., 2nd ed. MacMi l l i an 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. Natur-forsch., 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. 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

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"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0062883/manifest

Comment

Related Items