Fault detection and forecast in dynamical systems

126 291 0
Fault detection and forecast in dynamical systems

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

FAULT DETECTION AND FORECAST IN DYNAMICAL SYSTEMS LEE SOO GUAN, GIBSON (B.Eng (Hons.), NUS) A THESIS SUBMITTED FOR THE DEGREE OF MASTER OF ENGINEERING DEPARTMENT OF ELECTRICAL & COMPUTER ENGINEERING NATIONAL UNIVERSITY OF SINGAPORE 2009 ACKNOWLEDGEMENTS I would like to express my gratitude to all those who have given me support for the completion of this thesis. I am particularly grateful to my supervisor Prof Wang QingGuo of National University of Singapore (NUS) for his sound advice during the course of my research. i TABLE OF CONTENTS ACKNOWLEDGEMENTS SUMMARY I III LIST OF TABLES V LIST OF FIGURES VI LIST OF SYMBOLS VIII CHAPTER 1 INTRODUCTION 1.1 Background 1.2 Objective 1 1 12 PART I – F16 AIRCRAFTS CHAPTER 2 F-16 AIRCRAFT MODEL 2.1 Aircraft Dynamics 2.2 Simulation Model 15 15 20 CHAPTER 3 FAULT DETECTION 3.1 Methodology 3.2 Simulation Results 30 30 32 CHAPTER 4 FAULT DIAGNOSIS 4.1 Methodology 4.2 Simulation Results 45 45 49 PART II – STOCK MARKETS CHAPTER 5 CRASH FORECAST WITH LOG-PERIODIC FORMULA 5.1 Methodology 5.2 Case Study 60 60 64 CHAPTER 6 CRASH FORECAST WITH INDICATORS 6.1 Methodology 6.2 Case Study 84 84 89 CHAPTER 7 CONCLUSION 108 BIBLIOGRAPHY 110 ii SUMMARY This thesis is divided into two parts, where two diverse application areas of fault detection and forecast are studied. In the first part of the thesis, we will be looking at fault detection and diagnosis in an F-16 aircraft. Most of the past works on fault detection and diagnosis are in the area of large scale industrial applications. There are little works on fault detection and diagnosis in F-16 aircraft. In this thesis, the model-based approach is used for fault detection and diagnosis. The F-16 aircraft was simulated with and without noise and possible actuator faults. Residuals were generated by taking the difference in output of the two systems. By studying the system residuals, chi-square testing method was proposed to be used for the detection of actuator faults. When a fault is detected, the system residuals are further studied for fault diagnosis. Some useful information was extracted from the residuals, which was defined as residual characteristics. Most past research works use the extended Kalman filter for fault isolation. Using the proposed method, different actuator faults are determined from the different residual characteristics. In the second part of the thesis, crashes in the stock markets were studied. Two different approaches for crash forecast were proposed: the technical approach using log-periodic mathematical model and the indicator approach which uses indicators to set up an early warning system (EWS) for market crashes. The technical approach involves using a log-periodic formula to determine the crash time of a stock index. There are some works on using log-periodic formula for iii crash forecast in the stock markets. However, no work has been done on the local Singapore market and on the recent stock market crashes arising from the subprime mortgages. In the thesis, the log-periodic formula for crash forecast is extended to study on the local market and US markets. As the log-periodic formula is complex, it is broken down into two parts. The first part describes the power law behaviour of the stock price and the second part describes its log-periodic oscillation. The critical time obtained from the second part of the formula was taken as the crash time forecast of the stock market. This method was applied on S&P 500 to predict its crash for the Black Monday in 1987, the Straits Times Index to predict its crash during the dot-com bubble and the Dow Jones Industrial Average to predict the crisis in 2008. The indicator approach involves determining the relevance of the various economic, real sector and commodity indicators to stock market crashes. There are past works on using economic indicators to form an early warning system (EWS) for currency crisis. However, no work has been done on the relevance of these indictors to stock market crashes. In this thesis, study is done on the relevance of economic indicators on stock market crashes. Indicators that are useful in the forecast of stock markets’ crashes are identified. These indicators would form the components of the EWS. Weights are assigned to these components to form the EWS indicator, which issues a signal, warning of a probable market crash within the next 12 months. iv LIST OF TABLES Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 Table 7 Table 8 Table 9 Table 10 Table 11 Table 12 Table 13 Mass Properties of F-16 Aircraft Wing Dimensions of F-16 Aircraft Fault coding Detection time of various faults Residual Characteristics Grid of Signal and Crash Performance of Indicators Components of Grid for S&P 500 Crash Prediction Performance of Indicators for S&P 500 Crash Prediction Crash Detection with EWS Summary of Result for STI Crash Prediction Performance of Indicators for STI Crash Prediction Crash Detection with EWS 20 20 29 43 58 87 87 97 97 98 105 106 106 v LIST OF FIGURES Figure 1 Definition of aircraft directions Figure 2 F-16 Simulink model Figure 3 F-16 Residual Generator Model Figure 4 Actuator of F-16 Real Model Simulator Figure 5 Actuator of Ideal F-16 Simulator Figure 6 F-16 Nonlinear Plant Figure 7 Plant outputs Figure 8 Residuals under normal condition Figure 9 I(k) under normal condition Figure 10 Residuals under elevator fault Figure 11 Residuals under aileron fault Figure 12 Residuals under rudder fault Figure 13 Residuals under elevator and aileron faults Figure 14 Residuals under elevator and rudder faults Figure 15 Residuals under aileron and rudder faults Figure 16 Residuals under elevator, aileron and rudder faults Figure 17 I(k) under fault condition (elevator fault) Figure 18 Setting of threshold levels for fault diagnosis Figure 19 Residual of phi under aileron actuator fault Figure 20 Residual of phi under aileron actuator fault (zoom-in) Figure 21 Residual of theta under aileron actuator fault Figure 22 Residual of theta under aileron actuator fault (zoom-in) Figure 23 Residual of psi under aileron actuator fault Figure 24 Residual of psi under aileron actuator fault (zoom-in) Figure 25 Residual of roll rate (P) under aileron actuator fault Figure 26 Residual of roll rate (P) under aileron actuator fault (zoom-in) Figure 27 Residual of pitch rate (Q) under aileron actuator fault Figure 28 Residual of pitch rate (Q) under aileron actuator fault (zoom-in) Figure 29 Residual of yaw rate (R) under aileron actuator fault Figure 30 Residual of yaw rate (R) under aileron actuator fault (zoom-in) Figure 31 Standard & Poor 500 Figure 32 S&P 500 Power Law Parameter Fitting Figure 33 Residuals Obtained with Power Law Estimation Figure 34 Residual Frequency Spectrum Figure 35 Residual Frequency Spectrum (zoom in) Figure 36 S&P 500 Log-periodic Oscillation Figure 37 S&P 500 Log-periodic Behaviour Figure 38 Straits Times Index Figure 39 STI Power Law Parameter Fitting Figure 40 Residuals Obtained with Power Law Estimation Figure 41 Residual Frequency Spectrum Figure 42 Residual Frequency Spectrum (zoom in) Figure 43 STI Log-periodic Oscillation Figure 44 STI Log-periodic Behaviour 16 22 24 26 27 28 31 34 35 36 37 38 39 40 41 42 43 50 52 52 53 53 54 54 55 55 56 56 57 57 65 66 67 68 68 69 70 71 72 73 73 74 75 76 vi Figure 45 Figure 46 Figure 47 Figure 48 Figure 34 Figure 35 Figure 51 Figure 52 Figure 53 Figure 54 Figure 55 Figure 56 Figure 57 Figure 58 Figure 59 Figure 60 Figure 61 Figure 62 Figure 63 Figure 64 Figure 65 Figure 66 Figure 67 Figure 68 Figure 69 Figure 70 Figure 71 STI Log-periodicity before Crash Dow Jones Industrial Average DJIA Power Law Parameter Fitting Residuals Obtained with Power Law Estimation Residual Frequency Spectrum Residual Frequency Spectrum (zoom-in view) DJIA Log-periodic Oscillation DJIA Log-periodic Behaviour US GDP Quarter-on-Quarter Growth US Bank Lending Rate US CPI Year-on-Year Change USD Exchange Rate Month-on-Month Fluctuation US Current Account US Capital Account US National Reserve (exclude gold) Month-on-Month Change Yield Curve Gold Price CBOE Volatility Index (VIX) Singapore GDP Quarter-on-Quarter Growth Singapore Bank Lending Rate Singapore CPI Year-on-Year Change SGD Exchange Rate Month-on-Month Change Singapore Current Account Singapore Capital Account Singapore National Reserve Month-on-Month Change Gold Price CBOE Volatility Index (VIX) 76 78 79 80 80 81 82 82 91 92 92 93 93 94 94 95 95 96 100 101 101 102 102 103 103 104 104 vii LIST OF SYMBOLS “FDD” Fault detection and diagnosis “FDI” Fault detection and isolation “F-16” Lockheed Martin F-16 Fighting Falcon “LIP” Lock in-place “HOF” Hard-over fault “LOE” Loss of effectiveness “FTA” Fault tree analysis “ETA” Event tree analysis “PCA” Principle components analysis “EKF” Extended Kalman filter “GUI” Graphic User-Interface “MMAE” Multiple model adaptive estimation “AI” Artificial intelligence “ANN” Artificial neural network “RBF” Radial basis function “six-DOF” six-degree-of-freedom “US” United States “DJIA” Dow Jones Industrial Average “S&P 500” Standard & Poor 500 Composite “STI” Straits Times Index “GDP” Gross Domestic Product viii “CPI” Consumer Price Index “Fed” Federal Reserve “EWS” Early Warning System “VAR” Vector Autoregressive “P/E Ratio” Price-Earning Ratio “Y-o-Y” Year-on-Year “M-o-M” Month-on-Month “Q-o-Q” Quarter-on-Quarter “IFS” International Financial Statistics “IMF” International Monetary Fund “CBOE” Chicago Board of Options Exchange “VIX” Volatility Index ix CHAPTER 1 1.1 INTRODUCTION Background In our everyday life, we encounter many dynamical systems. At home, we make use of many simple appliances that are dynamic in nature. An example is the air-conditioner system, whose operation is dependant on its changing environmental factors. In industrial and engineering applications, the physical dynamical systems are large and complex. These complex systems have many different parts and components, making them difficult to control. The complexity of the systems means that they are prone to system errors, component faults and abnormal operations. The effect of the faults and errors can be costly. They may cause the systems to malfunction. If not detected and corrected early, the malfunctions may have serious implications to productivity and may even put the safety of the users at risk. For example, in industrial applications, the presence of faults in a power plant reduces the performance of the plant and causes it to work less efficiently. The fault may even cause permanent damage to the plant and cause the system to stop functioning. This causes system down time, resulting in the loss of production time. In an aircraft, the presence of faults may result in abnormal movements of the aircraft. In the worst case scenario, the malfunction of the aircraft may even cause it to crash, jeopardising the safety of the pilot and his passengers. In recent decades, there has been an increasing interest in fault detection and diagnosis in engineering applications. R. Isermann and P. Balle [1] have observed and gathered the developments of fault detection and diagnosis at selected conferences 1 during 1991 – 1995. In the paper, they have observed that parameter estimation and observer-based methods are used most often for fault detection. There is also a growing trend in research in the area of neutral network based method for fault detection. The researches on fault detection and diagnosis (FDD) span over many different areas of engineering applications. The research areas include small scale laboratory processes like fault detection in induction motor [2] and large scale industrial processes like the application of residual generation to a heat exchanger [3]. There are some works on fault detection in different types of aircrafts, like the Lockheed Martin F-16 Fighting Falcon aircraft [4, 5], PIPER PA 30 aircraft [6, 19, 20] and B747 commercial aircraft [7]. In the first part of this thesis, we will concentrate on fault detection and isolation (FDI) in the F-16 aircraft. In general, faults are deviations from the normal behaviour of the system. There are many types of faults in the systems, including additive process faults, multiplicative process faults, sensor faults and actuator faults. Additive process faults are faults caused by unknown inputs to the system. These unknown inputs cause abnormal behaviour in the outputs. An example of additive process fault in an aircraft is the wind gust. Multiplicative process faults are faults caused by the changes in plant parameters. These multiplicative faults cause the output of a component to be amplified. An example is the deterioration of a system component, which causes it to operate less effectively. Sensor faults are faults due to differences between measured outputs and the 2 actual outputs. These are usually due to failures of the sensors of the systems. Actuator faults are faults due to the differences in the input commands of actuators and the outputs of actuators. Common actuator faults include lock in-place (LIP) fault, float fault, hard-over fault (HOF) and loss of effectiveness (LOE) fault. The LIP fault occurs when the actuator is stuck at a certain value. The actuator output no longer reacts to the input command. The float fault occurs when the actuator floats at zero regardless of the input command. In HOF, the actuator moves to its upper or lower limit position regardless of the input command. In LOE fault, the actuator gain is reduced, thus the actuator output is reduced too. In this thesis, we will focus on actuator faults. Simulations will be done on LIP fault and the simulation results will be discussed. Fault analysis consists of two stages: fault detection and fault diagnosis. In fault detection, the system is monitored to check if there is any malfunctioning of the system. Accuracy and speed of detection are important. The number of false alarm and undetected faults should be kept to the minimum and the speed of detection to be as fast as possible. When a fault is detected, fault diagnosis follows. Fault diagnosis consists of two parts: fault isolation and identification. Fault isolation involves locating the source of the fault and fault identification involves estimating the magnitude of the fault. This research focuses mainly on fault isolation in an F-16 aircraft. Fault detection and diagnosis methods can be broadly classified into three main categories: model-based method, knowledge-based method and signal-based method. 3 Model-based fault detection can further be classified into two categories: quantitative and qualitative models. Quantitative models make use of differential equation, state space model or transfer function for model analysis. Some common methods used for fault detection include parameter estimation, state estimation and parity space concept. A comprehensive mathematical model is required for this approach. Qualitative models make use of qualitative reasoning to detect fault. More commonly used methods include fault tree analysis (FTA) and event tree analysis (ETA) to determine the probability of a safety hazard using Boolean logic. Knowledge-based methods make use of artificial intelligence (AI) techniques to detect fault. These methods include artificial neural networks (ANN) and fuzzy logic. The neural network approach involves training the neurons in the networks, which are then used to model the complex relationship between the inputs and the outputs. Fuzzy logic method is based on simple rules that are approximate rather than precise. These methods are used in large complex system applications, as explicit mathematical models of the systems are not required. In the signal-based approach, signal-processing methods such as spectral analysis and principle components analysis (PCA) are used. These signal-processing methods do not required explicit model application. Most of the past academic works on fault detection in an aircraft involve one or a combination of the methods described above. According to the compilation of research papers by R. Isermann and P. Balle [1], there has been an increased interest in the research on model-based fault detection and diagnosis methods in the last 4 decade. In aircraft applications, there are works using extended Kalman filter (EKF) in their model-based approach [11, 12, 15, 16, 17, 21]. Y.J.P Wei and S. Ghayem (1991) used EKF or residual generation and a likelihood ratio filter to compensate for the damage effect of the residue [12]. R. Kumar (1997) has further researched on the robustness issue in fault detection and has developed a Graphic User Interface (GUI) for actuator fault detection and surface damage fault detection and isolation [11]. P. Eide and P. Maybeck (1995) made an evaluation of the multiple model adaptive estimation (MMAE), which uses a series of Kalman filters for detecting faults [1995]. They (1997) further implemented MMAE on a non-linear six-degreeof-motion F-16 aircraft for single and dual complete failures of the system actuators and sensors. Other popular model-based methods for fault detection in aircrafts include analytical redundancy [6, 10, 19, 20] and the use of parity equations [13, 14]. Analytical redundancy refers to analysing the system by comparing the information from actual system and the redundant information. Redundant information can be generated by using several sensors measuring the same physical quantities or by using mathematical description of the system. S. Simani, M. Bonfe, P. Castaldi and W. Geri (2007) applied the analytical redundancy method to a PIPPER PA30 aircraft to test for sensor faults. They analysed the residues with fixed thresholds to check for any faults in the sensors. In another paper (2007), they have also designed two FDI schemes based on polynomial method and nonlinear geometric approach [10]. 5 In recent years, there has been increased interest in using machine-learning method for aircraft FDD [9, 22]. Y. M Chen and M. L Lee (2001) used the multilayer radial basis function (RBF) neural network as fault detection for nonlinear approximation of the F-16 aircraft model [22]. W.Z Yan (2006) applied the random forest classifier to aircraft engine fault diagnosis [9]. The advantage of using such methods is that no explicit mathematical model is required. However, there might be problems on non-convergence of training data. In this thesis, a model-based approach is used in analysing F-16 actuator faults. An analytical redundancy method is used for residual generation. There are some related works using analytical redundancy method for fault detection in F-16 aircraft [12, 15, 17]. The difference between our work and past work is the extraction of residual characteristics from the generated residual for fault isolation. In our work, useful information is extracted from the residuals generated from the outputs of the systems and residual characteristics are defined by observing the behaviours of these residuals. With these residual characteristics, it is possible to isolate the different actuator faults present in the F-16 aircraft. Other than the engineering world, “faults” also exist in financial markets. In the financial world, the stocks markets are dynamical systems that change with different market conditions. “Faults” come in the form of crashes in the stock markets. Since history, there were many large crashes in the stock markets. These crashes belong to the category of “extreme events” in complex systems and the sudden collapse of prices in the financial world had caught academics and investors by surprise. Many studies on major financial crashes have been carried out. Most took 6 the form of post-mortem analysis of historical crashes. Market crashes have devastating effects on investments. The Black Monday’s crash on 19 October 1987 saw DJIA dropping by 22.6%, wiping out US$500 billion in stock value in a single day [47]. It caused some investors to lose their savings overnight. The number of bankruptcies rose and businesses were affected, resulting in socio-economical problems. Since history, many academics have studied market crashes and have tried to explain them. It is generally believed that many market crashes were followed by the build-up of “speculative bubbles”. During the build-up phrase, the economy was strong, usually characterised by high growth rate, low inflation and low unemployment rate. Consumers were willing to spend and investors were optimistic on the outlook of these companies in these growing industries. Stock prices increased and investors were willing to pay high prices for these “growth companies”. Priceearning ratio (P/E ratio) became unusually high as speculators bided up the prices of the stocks. However, the “bubble” burst when investor began to realise that the even high growth rate of the companies is inadequate to substantiate the inflated P/E ratio of the companies. The market became panic-stricken and collapsed. Throughout history, there were many instances of crashes of such nature. The tulip mania and the South Sea bubble were two famous examples. The tulip mania refers to period in Netherland’s history where high prices were charged on tulip bulbs due to high demand [48]. Tulip speculation took place in the early 17th century when tulips was popular among the Dutch and became an 7 important plant in the Dutch garden. During that period, a single bulb of famous tulip could cost more than ten times the annual income of an average Dutch. Some traders sold land and houses to invest in tulip, with an expected monthly return of more than 40 times of his annual income. Greed and absurd expectation on investment return gave rise to speculation in tulip trading. As the price of tulips had been constantly increasing, the future contracts were popular to buyers. This sale of future contracts exacerbated the “speculative bubble”. In early 1637, the prices of tulip had risen so high that people became sceptical on the sustainability of the inflated price of a tulip bulb. People began to decrease their demand for tulips, and as a result, prices of tulips dropped. Tulip traders could no longer fetch excessive price for their tulips. The market became pessimistic and panic spread. Eventually traders were met with difficulty selling their tulips. The bubble burst and the price of a tulip bulb dropped drastically, leaving investors with future contracts of tulips at prices more than ten times its current price. The collapse of the tulip mania is a classical example of how “mania” could result in exorbitant market prices, but this inflated price is unsustainable. This case is still being widely discussed by academics in present day. Another classical example of “speculative bubble” in history is the South Sea bubble [49]. It refers to the speculation of the South Sea Company in the early 18th century. The South Sea Company was a British company granted monopoly rights to trade with South America in 1711. In return, it had to assume £10 million short-term government debt. In 1719, it owned £11.7 million out of the £50 million public debt. In order to 8 increase the number of shares issued, the directors proposed the scheme of buying more than half the British government public debt in January 1720. Before the proposal was accepted in April 1720, the company had started to spread rumours on the value of potential trade in South America. The share price shot up drastically from £100 pound in January and surpassed the psychological barrier of £1000 in June, fuelled by frenzy buying by investors from all social classes. The company would even lend people money to buy its share. Gradually, more and more people became sceptical that the inflated price could be sustained. The bubble eventually burst when people began to sell off their shares. The stock price fell drastically and many investors became bankrupts. The effect of the collapse of bubble was contagious. Banks were affected as speculators could not repay loans taken to speculate in the South Sea Company. There were also crashes whose origins could not be traced back to the “speculative bubble”. This makes prediction of crashes difficult due to the different nature and the different leading factors of each crash. According to the efficient market hypothesis, crashes are caused by the broadcast of a new piece of information in the market. Investors are bombarded with enormous information from different sources everyday, making it difficult to identify useful information. Black (1986) explained how noises could affect the market and made the market inefficient [32]. Testing of models and economic theories is complicated by the existence of such noises. In the paper “Does the Stock Market Overreact?”, De Bondt and Richard (1985) established two portfolios: the “loser portfolio” and the “winner portfolio” 9 [33]. The “loser portfolio” consists of stocks that have experienced significant capital loss over a period while the “winner portfolio” consists of stocks that have experienced large capital gain over the same time period. They found that the “loser” outperformed the “winner” by 25% three years after establishing these portfolios. This shows that the market overreacts in view of unexpected events. It is possible that such overreaction might cause “panic” selling upon the release of negative news and cause the market to crash. In the book “Trading Catalysts”, Webb (2007) has listed various events that moved the market [34]. He called these events trading catalysts. These trading catalysts include Federal Reserve interest rate cut, comments by influential politicians like Alan Greenspan, geopolitical events like the Iraq War and natural diseases. By identifying these trading catalysts, it is possible to look at how global events could affect stock prices and the extent of stock movements in response to events. Through technical analysis, Didier Sornette tried to explain major market crashes in his book “Why Stock Markets Crash: Critical Events in Complex Financial Systems” [37]. He proposed a log-periodic formula to predict crashes and tested the formula against several major stock markets [38]. However, no work has been done on the Singapore stock market and on the current stock market crashes caused by massive delinquency of subprime mortgages. The log-periodic formula proposed by D. Sornette is too complex with many variables. In the second part of this thesis, we break the formula down into two parts: the power law component, and the log-periodic oscillation component. First, we check the accuracy for the prediction of crash date using our method, by applying it to 10 Standard and Poor 500 (S&P 500) crash on 1987 Black Monday. Then we use this methodology to study the Straits Times Index (STI) crash in 2000 and the Dow Jones Industrial Average (DJIA) crash in the 2008 global financial crisis. From the fundamentalist point of view, macroeconomic indicators reflect the state of the economy and generally the movement of stock prices indicates investors’ changes in expectation of the economy. It is possible that investors and speculators would take signals from the changes in the macroeconomic indicators. Kaminsky, Lizondo and Reinhart (1998) have identified several leading economic indicators in their early warning system (EWS) model to detect currency crisis [30]. Edison (2000) has derived an operational EWS model, tested it on various countries and found that there were many false alarms of crisis episodes in his model in detecting currency crises [31]. Zhuang and Dowling (2002) improvised the EWS model by introducing weightings to indicators to show their relative importance in predicting a currency crisis [36]. They identified several useful leading indicators for the model, which is able to identify the currency crisis in Asian economy during the financial turmoil. These indicators include current account balance, components in the capital account, performance of financial sector, the real sector, and the fiscal sector. However, the author has only used the model to detect the currency crisis. Although there are several works on using indicators to construct a EWS for currency crisis, there has been no work done on the relevance of these indicators on stock market crashes. In the second part of this thesis, the relevance of some indicators on crash forecast in stock markets will be studied. Indicators include 11 commodity prices and market indicators which have not been studied previously. With the selected indicators, EWS for signal generation is formed to warn of a probable stock market crash within the next 12 months. 1.2 Objective In this thesis, two applications of fault detection and forecast are investigated. The first application is in an engineering domain, involving detection and diagnosis in an F-16 aircraft. The second application is in the financial domain, where stock market crashes are predicted. The first part of the thesis focuses on fault detection and isolation in the F-16 aircraft. A model-based approach is adopted to check the actuator faults in the system. Two simulation models, one to simulate a real F-16 system with noise and faults and the other to simulate an ideal F-16 system that is not corrupted by noise or faults, are used. Simulations are done for an ideal system so that the real outputs can be compared to the ideal outputs for the residual generation for analysis. In Chapter 2, a general description of the F-16 aircraft, the aircraft dynamics and the simulation models will be given. The aircraft position, its orientation and the equations used to describe the aircraft dynamics will be defined. The simulation models will then be introduced. As the models used are nonlinear, we will set the simulation conditions and parameters needed to find the trim condition of the aircraft. After introducing the F-16 aircraft models, the FDI methods that used in this thesis and the simulation results will be presented. The FDI process consists of two parts: the detection of faults by analysing residuals generated and the isolation of faults. In Chapter 3, the methodology used for fault detection and the simulation 12 results will be shown. The fault detection process involves studying the system outputs generated from the simulation models. The differences in system outputs of the two models are compared and residuals are generated. The chi-square test is then performed on the residuals to check for fault. When a fault is detected, the residuals are further analysed to isolate the faults. In Chapter 4, these residuals will be processed to extract the certain characteristics of the residuals. After which, the relationship between the input actuator faults and the processed residual characteristics will be sought. In the second part of the thesis, financial market crashes are studied. Two different methods to analyse stock market crashes are proposed. The first method takes the technical analysis approach, whereby a log-periodic formula is used to predict stock market crashes; the other is the EWS model approach, whereby fundamental indicators like the country’s gross domestic product (GDP), interest rate and consumer price index (CPI) and other market indicators are used to create a EWS model for stock market crashes. In Chapter 5, we present the log-periodic formula for stock market crash prediction and apply it on the S&P 500, the STI and the DJIA for crash prediction. First, we will describe the mechanism behind the log-periodic behaviour of the stock prices. Then we will explain the different parameters in the log-periodic formula and the three-step process of finding the various parameters identified in the formula. Lastly, we will apply the methodology to the stock indices to find a crash date and compare it with the date of the actual crash. In Chapter 6, we will look at the EWS model approach in predicting crashes. 13 First, we will describe the indicators used in our EWS model and look at the performance of each indicator in crash detection. Then we would describe the EWS model, which we use in detecting stock market crashes. Finally, we will apply this EWS model to test the accuracy in predicting large drop in the S&P 500 in the period 1981-2005 and large drop in the STI in the period 1995-2004. In chapter 7, we summarise and conclude the work done on fault detection and diagnosis in the F16 systems and crash analysis in the stock markets. We will also give suggestions on direction for future works. 14 PART I – F16 AIRCRAFTS CHAPTER 2 2.1 F-16 AIRCRAFT MODEL Aircraft Dynamics The Lockheed Martin F-16 Fighting Falcon (F-16) is a single-engine, supersonic, multirole technical aircraft. Being lighter weight and easier to operate as compared to its predecessors, it is the world’s most popular fighter plane, with more than 4400 aircrafts built for air forces of 25 countries [28]. The nonlinear aircraft model used in this thesis is based on the book written by Lewis and Stevens (1992) [23]. We assume that the F-16 is a rigid body, which means that all in point in the aircraft remains in fixed relative position at all time. Being a fighter aircraft, F-16 is designed to have little body flexibility. Thus the assumption is valid. The centre of mass (CM) of the aircraft is also assumed to coincide with its centre of gravity (CG) in a uniform gravitational field. In this model, the centre of mass is considered as the coordinate origin. The motion of equations of the rigid aircraft can be separated into translation motions and rotational motions. When fixed in space, the rotational motions correspond to the rolling, pitching and yawing of the aircraft. The other three degrees of freedom are the translational motions of the aircraft. Thus, the derived state model is an F-16 aircraft model with six degree-of-freedom. The coordinate axes of the aircraft x, y and z are defined to be mutually perpendicular. With the CM as the coordinate origin, x-axis is defined positive through the aircraft’s nose, y-axis is positive through the starboard (right) wing and z- 15 axis is positive downwards, according to the right-hand screw rule. u, v and w are the velocities in the x, y and z directions respectively; p is the roll rate, q is the pitch rate and r is the yaw rate; L is the rolling moment, M is the pitching moment and N is the yawing moment. The orientation of the aircraft is shown on the figure below: Figure 1 Definition of aircraft directions 12 state variables are chosen to form the state vector. Three components of position (pN, pE, h) are chosen to describe the potential energy in the gravitation field and three components of velocity (u, v, w) are chosen to describe the translational kinetic energy. Another three components of angular velocity (p, q, r) are chosen to describe the rotational kinetic energy and finally three Euler angles ( φ , θ , ψ ) are chosen to specify the orientation relative to the gravity vector. Using the model described by Steven and Lewis [23], we have the following force equations, kinematic equations, moment equations and navigation equations: 16 Force Equations ⋅ u = rv − qw − g 0' sin θ + Fx m ⋅ v = − ru + pw + g 0' sin φ cos θ + Fy m ⋅ F w = qu − pv + g 0' cos φ sin θ + z m (2.1) Kinematic Equations ⋅ φ = p + tan(q sin φ + r cos φ ) ⋅ θ = q cos φ − r sin φ ⋅ q sin φ − r cos φ ψ = cos θ (2.2) Moment Equations ⋅ p = (c1 r + c 2 p )q + c3 L + c 4 N ⋅ q = c5 pr − c6 ( p 2 − r 2 ) + c7 M (2.3) ⋅ r = (c 8 p − c 2 r ) q + c 4 L + c 9 N Navigation Equations ⋅ p N = u cos θ cosψ + v(− cos φ sinψ + sin φ sin θ cosψ ) + w(sin φ sinψ + cos φ sin θ cosψ ) ⋅ p E = u cos θ sinψ + v(cos φ cosψ + sin φ sin θ sinψ ) (2.4) + w(− sin φ cosψ + cos φ sin θ sinψ ) ⋅ h = u sin θ − v sin φ cos θ − w cos φ cos θ The constants ci are defined as follows: 17 Γc1 = ( J y− J z ) J z − J xz2 Γc 3 = J z J − Jx c5 = z Jy c7 = 1 Jy Γc2 = ( J x − J y + J z ) J xz Γc4 = J xz c6 = J xz Jy (2.5) Γc8 = J x ( J x − J y ) + J xz2 Γc 9 = J x where Γ = J xJ z − J xz2 ⋅ ⋅ ⋅ In the navigation equations (2.4), p N , p E , h are the north, east and vertical components of aircraft velocity in the north-east-down (NED) coordinate system in the locally geographical plane on the Earth’s surface. Other parameters like φ , θ and ψ are the roll angle, pitch angle and yaw angle respectively. In the six-DOF model, Fx , Fy , Fz , L, M , N are the force and moment components in the x-, y-, and z- axis respectively, which are dependent on the aerodynamic and thrust components of the system. In the equations (2.5), J is the moment of inertia in the various axis. The forces on the body of the aircraft are defined as follows:  Fx  FB =  Fy   Fz  − D  SFB =  Y  + SFBT  − L  (2.6) The forces and moments acting on the complete aircraft are defined in terms of dimensionless aerodynamic coefficients. We have: 18 drag , D = q SC lift , L = q SC D L sideforce , Y = q SC Y rolling pitching yawing (2.7) moment , L = q SbC moment , M = q S cC M moment , N = q SbC N where q = free − stream dynamic pressure S = wing reference area b = wing span c = wing mean geometric chord The various dimensionless coefficients CD, CL, CY, CL, CM and CN depend on the actuator deflections and the aerodynamic angles: angle of attack, alpha (α), and angle of side-slip, beta (β), as shown in (2.8). C D ≡ C D (C L ) + ∆C D (δ el ) + ∆C D ( β ) + ∆C D ( M ) + Λ C L ≡ C L (α , Tc ) + ∆C L (δ el ) + ∆C L ( M ) + ∆C LST (α , Tc ) + Λ CY ≡ CY ( β ) + ∆CY (δ rud ) + Λ C l ≡ C l ( β ) + ∆C l (δ ail ) + ∆C l (δ rud ) + b [C lp P + C lr R ] + Λ 2VT (2.8) C M ≡ C M (C L , TC ) + ∆C M (el ) + ∆C MST (α , TC ) + ∆C M ( M ) + • x C c [C mq Q + C ⋅ α ] + R L + Λ mα 2VT c C N ≡ C N ( β ) + ∆C N (δ rud ) + ∆C N (δ ail ) + b [C np P +C nr R ] + Λ 2VT As demonstrated above, these aerodynamic and thrust components are 19 dependant on the control surface deflections. The control surface deflections, together with the throttle setting, are the inputs to the nonlinear system: u in = [δ thl , δ el , δ ail , δ rud ]T (2.9) The control input uin consists of throttle setting (δthl), elevator deflection (δel), aileron deflection (δail) and rudder deflection (δrud) respectively. The expression (2.9) presents the control input and its components. Mass properties and wing dimensions of the F-16 aircraft are given in Table 1 and 2 respectively. Other parameters for the aircraft include its reference c.g. location Xcg = 0.35 c and the engine angular momentum assumed to be fixed at 160 slut-ft2/s. Table 1 Mass Properties of F-16 Aircraft Weight (lbs): W = 20,500 Moments of Inertia (slug-ft2): Jxx = 9,496 Jyy = 55,814 Jzz = 63,100 Jxz = 982 Table 2 Wing Dimensions of F-16 Aircraft Span Area m.a.c 2.2 30 ft 300 ft2 11.32 ft Simulation Model This thesis makes use of the F-16 model constructed by the students in the Aerospace Engineering and Control Science and Dynamical Systems Department at the University of Minnesota, supervised by Dr Gary Bala. There are two simulation 20 models: the low-fidelity (lo-fi) model, which is based on Stevens and Lewis [23] and the high-fidelity (hi-fi) model, which is based on NASA Technical Paper 1538 [24]. Both models use the same navigation equations and the equations of motions. The difference between the lo-fi and the hi-fi model is that the hi-fi model has an additional control surface, the leading edge flap deflection, which allows the aircraft to fly at a higher angle of attack. However, as we are not considering cases where the aircraft is flying at high angle of attack in this thesis, the simpler lo-fi model will be used in our research. The Simulink model (Figure 2) consists of “The Cockpit” for pilot and control input, the F-16 nonlinear plant, integrator of state variables, leading edge flap deflection for feedback and output. The plant requires 13 input variables. Nine of these 13 variables are described in the previous section. These nine variables are north position (pN), east position (pE), altitude ( h ), roll angle ( φ ), pitch angle ( θ ), yaw angle ( ψ ), roll rate ( p ), pitch rate ( q ) and yaw rate ( r ). The other four variables are total velocity ( Vt ), angle of attack ( α ), angle of side-slip ( β ) and the leading edge flap deflection ( δ LEF ). However, the model only allows us control over thrust ( δ thl ), elevator deflection ( δ el ), aileron deflection ( δ ail ) and rudder deflection ( δ rud ) in “The Cockpit” to influence these input variables to the plant. 21 Figure 2 F-16 Simulink model 22 Pilot/Control Input "The Cockpit" Nonlinear Equations of plant and Aerodynamic T ables : - Aircraft Control & Simulation, Stevens & Lewis - NASA T echincal Paper 1538 Nguyen et al., 1973 Leading Edge Flap delta_lef (deg) state F-16 Non-linear Plant Demux 1 s Integrate F16 State Derivatives rad2deg Clock 0 Subsystem Time T The system output is an 18 dimension vector. Other than the 12 variables described earlier, the other six components in the system output vector are the normalised accelerations in the x, y and z directions ( a nx , a ny and a nz ), the Mach number M, the free-stream dynamic pressure q and the static pressure Ps. In this thesis, we design a residual generator (Figure 3) by modifying the Simulink model created by Dr Gary Bala’s team. We have created two plants, one to simulate fault in a real F-16 system corrupted with noise and the other to simulate an F-16 model operating under ideal conditions with no fault or noise. Outputs from the second plant provide estimates for the real system’s output under ideal conditions. We control “The Cockpit” of the systems to inject noise and faults to the systems. In this thesis, we will call the system with noise and fault to be the “F-16 plant” and the nominal system without noise and fault “F-16 model”. These two systems, together with the residual generator, will be called “F-16 residual generator model”. 23 Figure 3 F-16 Residual Generator Model 24 Pilot/Control Input "The Cockpit" Nominal Model Pilot/Control Input "The Cockpit" Real Model Simulator 1 s Integrate F16 State Derivatives1 Nonlinear Equations of plant and Aerodynamic Tables : - Aircraft Control & Simulation, Stevens & Lewis - NASA Techincal Paper 1538 Nguyen et al., 1973 F-16 Non-linear Plant Nominal Model Demux F-16 Non-linear Plant Real Model Simulator Demux 1 s Integrate F16 State Derivatives rad2deg1 rad2deg Clock 0 Nominal Model Subsystem Real Model Subsystem T Time Residue Figure 4 shows the internal functioning of “The Cockpit” of the F-16 plant whereby random white noise is added and actuator faults are modelled. The trim value setting is calculated from the initial states of the system. This is done by the F16 nonlinear model routine, to ensure that the system is in a stable state of flight. This trim value setting represents the equilibrium point of the aircraft at the particular flight condition. This is the point whereby all the state derivatives are equal to zero. Figure 5 shows the internal functioning of “The Cockpit” of the F-16 model whereby the control inputs are the trim values of thrust, elevator deflection, aileron deflection and rudder deflection calculated. The actuator blocks convert the input controls from units in degrees to radians and check that the input controls are within set values. 25 Figure 4 Actuator of F-16 Real Model Simulator 26 White Noise -C- trim Rudder Trim Setting -C- Rudder Fault Out1 Aileron Trim Setting -C- Aileron Fault Out1 Elevator Trim Setting -C- Elevator Fault Out1 Thrust Trim Setting Units: deg. Units: deg. Units: deg. Units: lbs. In1 In1 In1 In1 Rudder Actuator Aileron Actuator Elevator Actuator Thrust Model Out1 Out1 Out1 Out1 Rudder Scope Aileron Scope Elevator Scope 1 Control Surface Deflections surfaces Out1 Figure 5 Actuator of Ideal F-16 Simulator 27 trim Rudder Trim Setting -C- Aileron Trim Setting -C- Elevator Trim Setting -C- Thrust Trim Setting -C- Units: deg. Units: deg. Units: deg. Units: lbs. In1 In1 In1 In1 Rudder Actuator Aileron Actuator Elevator Actuator Thrust Model Out1 Out1 Out1 Out1 Rudder Scope Aileron Scope Elevator Scope 1 Control Surface Deflections surfaces_nominal Out1 From Figure 6, we can see the internal functioning of both the F-16 plant and F-16 model. The inputs to the nlplant (non-linear) block are the 13 state variables calculated according to the trim conditions of the aircraft and four input controls. The leading edge flap (LEF) deflection and fidelity flag are zeros for the lo-fi mode. The output from the “nlplant” is a 12-dimension vector as discussed earlier. 1 States 2 Controls MATLAB Function F16 nlsim nlplant 3 LEF -C- 1 Out1 Fidelity Flage tells nlplant which Model to use: 0: Low Fidelity 1: High Fidelity Fidelity Flag Figure 6 F-16 Nonlinear Plant In the simulation, an F-16 aircraft manoeuvring at steady wings-level flight is considered. The aircraft’s velocity is set at 500ft/s and the altitude of cruising is set at 15000ft. For the simulation of faults, only the LIP actuator faults are considered. An LIP actuator fault occurs when an actuator is stuck at a certain value. In the simulations, these values are set near the threshold values of the respective actuators to simulate actuators stuck at near threshold values. The fault vector as F has three components f1, f2, and f3. These three components represent three physical actuators of the system, with f1 representing the elevator actuator, f2 representing the aileron actuator and f3 representing the rudder actuator. The component fi is encoded 1 if there is fault in the particular actuator; 28 otherwise fi is encoded with 0. Table 3 shows the different faults that were considered in the simulation. Table 3 Fault code F1 F2 F3 F4 F5 F6 F7 Fault coding Components (1, 0, 0)T (0, 1, 0)T (0, 0, 1)T (1, 1, 0)T (1, 0, 1)T (0, 1, 1)T (1, 1, 1)T 29 CHAPTER 3 3.1 FAULT DETECTION Methodology The method used for fault detection is similar to the work of Mehra and Pescon (1971) on the generation of error signal or innovation process [25], R. Kumar’s work (1997) on failure detection of actuator and the work of C.L Lin and C.T Liu (2007) on the calculation of the total error between the actual system and the ideal system. The error signal or innovation process is defined as the difference between actual system output and the expected model output. In this thesis, this inconsistency of behaviour between the actual and expected outputs is referred to as residuals of the system. The fault detection technique is based on statistical decision theory, where statistical analysis of the residuals is used to detect fault in the system. The F-16 residual generator model (Figure 3), mentioned in Chapter 2 monitors the system for any possible sign of faults. It consists of two systems: the F16 plant used to simulate the real F-16 that has noise and possible faults and the F-16 model used to simulate an F-16 operating in the absence of noise and fault. The outputs of the two plants are compared to generate the residuals of the system. From Figure 7, we can see the 12 output variables from the plants. From the 12 output variables, we select six variables ( θ , φ , ψ , P, Q, R) for observation and comparison between the measured output and the output estimate of the system. The measurement output of the F-16 plant is denoted by Y (k ) = [θ (k ), φ (k ),ψ (k ), P(k ), Q(k ), R(k )]T and the estimate using the F-16 model is ) ) ) ) ) ) denoted by Yˆ (k ) = [θ (k ), φ (k ),ψ (k ), P (k ), Q (k ), R (k )]T . 30 Scope npos (f t) epos (f t) Scope1 alt (f t) phi (deg) theta (deg) Scope2 psi (deg) v el (ft/s) alpha( deg) Scope3 Demuxbeta (deg) 1 In1 p (deg/s) q (deg/s) Scope4 r (deg/s) nx (g) ny (g) Scope5 nz (g) mach qbar (lb/f t f t) ps (lb/f t f t) y_sim States Figure 7 Plant outputs The residual vector is denoted by ) R(k ) = Y (k ) − Y (k ) (3.1) R(k) is a 6-dimensional vector. Under ideal conditions, the residuals should be zero when there is no fault or error in the system. However, the residuals are not zero due to system noises and disturbances. 31 If the system is functioning normally, the residual is a zero mean white noise of known covariance V(j). It is a Gaussian process with a flat power spectral density. For fault detection, we define the statistic I(k) in (3.2), which is a chi-square random variable with Np degree of freedom [11, 25]: I (k ) = k ∑R T ( j )V −1 ( j ) R ( j ) (3.2) j = k − N +1 This statistic is compared to the threshold value ε using a chi-square table at a certain confidence level or the probability of failure Pf. For example, using the chisquare table, ε for 30 degrees of freedom at a confidence level of 0.001 is 59.7. We postulate the hypothesis as follows: H 0 : Fault in system ⇔ I (k ) > ε H 1 : No fault in system ⇔ I (k ) < ε (3.3) From the statistics, we can conclude that fault is present in the system with a confidence level Pf if I(k) calculated is greater than the threshold value ε . If I(k) calculated is less than ε , we reject H0 and conclude that there is no fault in the system. 3.2 Simulation Results In the simulation, six output variables ( θ , φ , ψ , P, Q, R) are selected to generate the residual vector R (k ) . The window length N is set to 5 seconds with a confidence level Pf = 0.001. From the chi-square table, the threshold value for rejection at Pf = 0.001 with Np = 30 degree of freedom is 59.7. First, we run the simulation for 30 seconds under normal (no-fault) condition, with only random white noise added to the real model. Figure 8 shows plots of the 32 residuals of the six output variables studied. We can see that the fluctuations of the residual values are within ± 2 due to white noise in the system. The I(k) obtained is less than the threshold value 59.7 (Figure 9). From this statistics, we reject H0 and conclude that the system is fault-free, which is in line with what we have expected. 33 0.4 T H E T A (d e g re e s ) 2 P H I (d e g re e s ) 0.2 1 0 -0.2 5 10 15 20 Time (sec) 25 30 -0.4 2 2 R o ll R a t e (d e g / s ) 0 P S I (d e g re e s ) -1 0 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 0 -1 0 5 10 15 20 Time (sec) 25 -2 30 0.3 Y a w R a te (d e g /s ) 0.5 P it c h R a t e (d e g / s ) 5 1 1 -1 0 0.2 0 -0.5 0.1 0 5 10 15 20 Time (sec) Figure 8 25 30 0 -0.1 Residuals under normal condition 34 25 20 I(k) 15 10 5 0 0 5 Figure 9 10 15 Time (sec) 20 25 30 I(k) under normal condition Next, we run the simulation under various fault conditions (Table 3). Each of the 3 actuator faults and the different combination of these faults are simulated in the real system, corrupted with random white noise. The onset of fault is set at t = 5.0. Figures 10 to 16 show the various plots of the residuals of the six outputs under different fault conditions. We can see that the residual behaviours are different under different fault conditions. With the residuals obtained, I(k) is updated using (3.2) and compared to the threshold, which is set to 59.7 obtained using the chi-square table. When I(k) first exceeds the threshold, the detection time td is noted. From Figure 17, we can see the plot of the statistic I(k) for elevator failure, up to the time when it exceeds the threshold of 59.7. I(k) increases substantially after t = 5 at the time of the fault. The time when I(k) exceeds the threshold of 59.7 is noted. Similarly, the process is done for other fault conditions. 35 4 100 T H E T A (d e g re e s ) 2 x 10 P H I (d e g re e s ) 0 -2 -4 -6 0 5 10 15 20 Time (sec) 25 50 0 -50 -100 30 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 4 1 R o ll R a t e (d e g / s ) P S I (d e g re e s ) 100 0 0 -100 -1 -200 -300 -2 0 5 10 15 20 Time (sec) 25 -3 30 500 Y a w R a te (d e g /s ) P it c h R a t e (d e g / s ) 200 0 -200 -400 -600 x 10 0 5 10 15 20 Time (sec) Figure 10 25 30 0 -500 -1000 Residuals under elevator fault 36 50 T H E T A (d e g re e s ) 1000 P H I (d e g re e s ) 0 -1000 -2000 -3000 0 5 10 15 20 Time (sec) 25 30 P S I (d e g re e s ) -100 0 5 10 15 20 Time (sec) 25 30 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 -200 20 Y a w R a te (d e g /s ) 40 P it c h R a t e (d e g / s ) 0 -100 -200 20 0 -20 -100 100 0 -300 -50 R o ll R a t e (d e g / s ) 100 0 0 -20 0 5 10 15 20 Time (sec) Figure 11 25 30 -40 Residuals under aileron fault 37 50 T H E T A (d e g re e s ) P H I (d e g re e s ) 500 0 -500 -1000 -1500 0 5 10 15 20 Time (sec) 25 30 R o ll R a t e (d e g / s ) P S I (d e g re e s ) 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 50 0 -200 -400 0 -50 -100 0 5 10 15 20 Time (sec) 25 30 -150 20 Y a w R a te (d e g /s ) 40 P it c h R a t e (d e g / s ) -50 -100 200 -600 0 20 0 -20 0 -20 -40 0 5 10 15 20 Time (sec) Figure 12 25 30 -60 Residuals under rudder fault 38 T H E T A (d e g re e s ) P S I (d e g re e s ) 30 500 30 100 30 0 -1 0 10 20 Time (sec) 50 0 -50 P it c h R a t e (d e g / s ) 100 R o ll R a t e ( d e g / s ) 1 Y a w R a t e (d e g / s ) P H I (d e g re e s ) 4 x 10 0 10 20 Time (sec) 50 0 -50 0 10 20 Time (sec) Figure 13 0 -100 0 10 20 Time (sec) 30 0 10 20 Time (sec) 30 0 10 20 Time (sec) 30 0 -500 0 -100 Residuals under elevator and aileron faults 39 50 T H E T A (d e g re e s ) P H I (d e g re e s ) 100 0 -100 -200 -300 0 5 10 15 20 Time (sec) 25 30 0 -50 -100 0 -500 -1000 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 -50 0 5 10 15 20 Time (sec) 25 30 -150 100 Y a w R a te (d e g /s ) P it c h R a t e (d e g / s ) 10 -100 50 0 -50 -100 5 50 R o ll R a t e (d e g / s ) P S I (d e g re e s ) 500 0 0 5 10 15 20 Time (sec) Figure 14 25 30 50 0 -50 Residuals under elevator and rudder faults 40 50 T H E T A (d e g re e s ) P H I (d e g re e s ) 500 0 -500 -1000 -1500 0 5 10 15 20 Time (sec) 25 30 -50 -100 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 100 R o ll R a t e (d e g / s ) P S I (d e g re e s ) 500 0 0 0 -100 -500 -1000 -200 0 5 10 15 20 Time (sec) 25 30 20 Y a w R a te (d e g /s ) P it c h R a t e (d e g / s ) 60 40 20 0 -20 0 -20 -300 -40 0 5 10 15 20 Time (sec) Figure 15 25 30 -60 Residuals under aileron and rudder faults 41 50 T H E T A (d e g re e s ) P H I (d e g re e s ) 500 0 -500 -1000 -1500 0 5 10 15 20 Time (sec) 25 R o ll R a t e (d e g / s ) P S I (d e g re e s ) -500 0 5 10 15 20 Time (sec) 25 30 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 0 5 10 15 20 Time (sec) 25 30 500 0 -500 -1000 200 Y a w R a te (d e g /s ) P it c h R a t e (d e g / s ) 50 0 100 -50 -100 0 1000 0 -1000 -50 -100 30 500 0 0 5 10 Figure 16 15 20 Time (sec) 25 30 0 -100 Residuals under elevator, aileron and rudder faults 42 70 60 50 I(k) 40 30 20 10 0 0 Figure 17 5 10 15 Time (sec) 20 25 30 I(k) under fault condition (elevator fault) Below is a table of the type of the fault present in the real system and its detection time: Table 4 Detection time of various faults Type of fault F1 F2 F3 F4 F5 F6 F7 Detection time (in seconds) 5.2 5.1 5.2 5.1 5.2 5.1 5.1 From Table 4, we can see that the faults are detected within 0.2s after its onset. The detection speed using this method is also accurate. However, this test does 43 not distinguish the different types of faults present in the system. Upon detection of faults, fault diagnosis is done to isolate the faults in the system, which will be discussed in the next chapter. 44 CHAPTER 4 4.1 FAULT DIAGNOSIS Methodology Fault diagnosis consists of two parts: fault isolation and fault identification. Fault isolation refers to finding the source or cause of the fault; fault identification refers to finding the magnitude of the fault. In this thesis, the focus is on fault isolation. When a fault is detected using chi-square testing, the output residuals are further analysed for fault identification. To differentiate the residuals from faulty systems with no-fault system, first we need to study the residual behaviours of nofault system. Y.M Chen and M.L Lee (2002) used neural networks to detect and diagnose system failure [22]. They used radial basis function (RBF) to detect stuck actuator failure of high performance aircraft. In the implementation, they came up with a residual index, which is the ratio between current residual and previous residual, and set a threshold, beyond which an error signal will be generated. Similarly, in this thesis, we study the residual behaviours of the system. However, instead of making use of an index to compare the residuals, we extract some useful information from the behaviour of residuals for study. We define a residual characteristic vector to quantify this information extracted from the residuals. Under ideal conditions, in the absence of noise, disturbance and fault, the residuals obtained from the residual generator model should be zero. However, in the presence of random white noise, the residuals are expected to deviate from zero. Threshold values are set to accommodate these deviations of residuals’ values. As 45 different output variables change differently with the addition of noise in the system, two separate different threshold values are set for each residual, ri , where i = 1, …, 6. In the thesis, the concept of residual characteristics of the systems is introduced. Residual characteristic is defined as the behaviour of the residual over the 30-second simulation. Using the residuals of no-fault system, the residual characteristics are studied to set the threshold for fault diagnosis. The thresholds are set according to the residuals of no-fault system as shown on Figure 18. For each residual ri , we set two thresholds: the upper threshold level τ h to check the residual if it exceeds τ h and the lower threshold level τ l to check if the residual is lower than τ l during the simulation. With these two threshold levels, we defined two residual characteristics riH and riL for each residue ri . If the residual ri exceeds its upper threshold τ h , the residual characteristic riH is set to 1, otherwise riH is set to zero. Similarly, if ri is lower than its lower threshold τ l , the residual characteristic riL is set to 1. It is possible for ri to exceed its upper threshold at a certain time, but falls below the lower threshold at a later time, or vice versa, during the simulation. In this case, both the residual characteristics riH and riL are set to 1. We gather the residual characteristics extracted from the residuals to form the residual characteristic vector: R all = [r1H , r2 H , r3 H , r4 H , r5 H , r6 H , r1L , r2 L , r3 L , r4 L , r5 L , r6 L ]T (4.1) From R all , we reduce its size by further extracting useful residual characteristics, forming the vector R . The fault pattern injected into the system is a three-dimension vector F, whose components are denoted by f1, f2 and f3, such 46 that F = [ f 1 , f 2 , f 3 ]T . Each component fi of the fault vector represents a physical actuator component, with f1 representing the elevator actuator, f2 representing the aileron actuator and f3 representing the rudder actuator. fi is assigned the value 1 if there is a fault in the particular actuator and zero if there is no fault. For example, we want to simulate faults in the elevator and rudder actuator, the fault vector will be represented by F = [1, 0, 1]T. For each fault pattern F injected into the system, we generate a set of residuals, of which we extract the residual characteristic vector R . From the residual characteristic vector R extracted, we have the following relation: R = AF (4.2) where R is an n-dimension vector, A ∈ ℜ n xℜ m and F is a m-dimension vector. A is the transformation matrix which map the fault vector to the residual vector. In our simulation, seven sets of fault vector Fi, with i = 1, 2, .., 7, are injected and seven sets i of residual characteristic vectors R , which corresponds to the seven sets of fault vectors, are extracted from the residuals generated. The seven sets of fault vector are defined according to the different possible actuator faults discussed in chapter 3. From (4.2), we get: 1 R = AF 1 ; 2 R = AF 2 ; • • • 7 R = AF 7 We group the seven expressions together to form the following: 47 1 2 3 4 5 6 7 [ R , R , R , R , R , R , R ] = A[ F 1 , F 2 , F 3 , F 4 , F 5 , F 6 , F 7 ] (4.3) R = AF where 1 2 3 4 5 6 7 R = [R , R , R , R , R , R , R ] and F = [F 1 , F 2 , F 3 , F 4 , F 5 , F 6 , F 7 ] . Manipulating (4.3), we have the following: F = A∆ R A∆ = F R (4.4) ∆ (4.5) ∆ where A ∆ and R are the pseudo-inverse of A and R respectively. In order to identify the fault presence in the system, we need to know A ∆ , ∆ which can be calculated from (4.5). But to calculate A ∆ , we need R , which is the pseudo-inverse of the matrix R found in (4.3). As A and R are not square matrices, their inverses cannot be found by the standard methods, like Gaussian elimination. Instead, we can find the pseudo-inverse of a non-square matrix by using the transformation: ∆ t R = ( R R) −1 R ∆ t t (4.6a) t R = R ( R R ) −1 (4.6b) The pseudo-inverse of the matrix does not exist if the matrix R is not full row rank or full column rank. If R is full row rank, the formula (4.6a) is used; otherwise if R is full column rank, the formula (4.6b) is used. After A ∆ is found, we can identify the fault vector using the residual characteristic vector from simulations by the expression: 48 F = A∆ R 4.2 (4.7) Simulation Results Using the simulation settings mentioned in section 3.2, we run the simulation under no-fault condition for 30 seconds and observe the six state variables. We set the smallest τ h and the largest τ l for each residual to keep it bounded. From Figure 18, we take the upper bounds τ h and the lower bounds τ l of the residuals. We can see that τ h set for phi, theta, psi, roll rate, pitch rate and yaw rate are 2, 0.4, 1.7, 1.1, 0.4 and 0.25 respectively and the τ l set are -0.2, -0.3, -0.1, -1.3, -0.45 and -0.1 respectively. 49 Figure 18 Setting of threshold levels for fault diagnosis The simulation is further run under seven different fault conditions as shown on Table 3. As described in section 4.1, we observe the behaviours of the six residuals to extract the residual characteristics of the system. Different faults generate different residual characteristics. These residual characteristics will form the fault signature for each fault condition. Using the residuals from the simulation of a system with aileron fault, we 50 show how residual characteristics can be extracted. From Figure 19 – 30, we can see the behaviour of the six residuals of the system with aileron actuator fault. In each figure, the upper dot-dashed line represents τ h and the lower dotted line represents τ l . When a residual exceeds τ h or goes below τ l , the respective residual characteristic variable will be assigned the value 1, otherwise the residual characteristic value will be zero. For example, from Figure 19 and 20, we can see that the residual of phi does not exceed τ h , so r 1H = 0 , but the residual goes below τ l , so r 1L = 1 . Similarly, from Figure 21 and 22, we get the value r 2 H = 0 and r 2 L = 1 . We obtain the other residual characteristic values and form the residual characteristic vector R all (4.1). The fault signature R all is a vector of 12 elements, corresponding to the 12 residual characteristics that we are monitoring. We reduce the residual characteristics monitored to nine, as we only need to identify the seven fault conditions and one nofault condition. Thus, R is a nine-dimension vector (n=9). 51 500 0 PHI (degrees) -500 -1000 -1500 -2000 -2500 -3000 0 5 10 Figure 19 15 Time (sec) 20 25 30 Residual of phi under aileron actuator fault 100 80 60 40 PHI (degrees) 20 0 -20 -40 -60 -80 -100 3.6 3.8 Figure 20 4 4.2 4.4 4.6 Time (sec) 4.8 5 5.2 5.4 Residual of phi under aileron actuator fault (zoom-in) 52 20 0 THETA (degrees) -20 -40 -60 -80 -100 0 5 10 Figure 21 15 Time (sec) 20 25 30 Residual of theta under aileron actuator fault 20 15 10 THETA (degrees) 5 0 -5 -10 -15 -20 0 Figure 22 1 2 3 4 Time (sec) 5 6 7 8 Residual of theta under aileron actuator fault (zoom-in) 53 100 50 0 PSI (degrees) -50 -100 -150 -200 -250 -300 0 5 10 Figure 23 15 Time (sec) 20 25 30 Residual of psi under aileron actuator fault 80 60 40 PSI (degrees) 20 0 -20 -40 -60 2 Figure 24 4 6 Time (sec) 8 10 12 Residual of psi under aileron actuator fault (zoom-in) 54 50 Roll Rate (deg/s) 0 -50 -100 -150 -200 0 5 10 Figure 25 15 Time (sec) 20 25 30 Residual of roll rate (P) under aileron actuator fault 30 20 Roll Rate (deg/s) 10 0 -10 -20 -30 1 Figure 26 2 3 4 5 Time (sec) 6 7 8 9 Residual of roll rate (P) under aileron actuator fault (zoom-in) 55 40 35 30 Pitch Rate (deg/s) 25 20 15 10 5 0 -5 0 5 Figure 27 10 15 Time (sec) 20 25 30 Residual of pitch rate (Q) under aileron actuator fault 6 4 Pitch Rate (deg/s) 2 0 -2 -4 -6 2 3 4 5 6 7 8 9 Time (sec) Figure 28 Residual of pitch rate (Q) under aileron actuator fault (zoom-in) 56 5 0 -5 Yaw Rate (deg/s) -10 -15 -20 -25 -30 -35 -40 0 5 Figure 29 10 15 Time (sec) 20 25 30 Residual of yaw rate (R) under aileron actuator fault 6 4 Yaw Rate (deg/s) 2 0 -2 -4 -6 2 3 4 5 6 7 8 9 Time (sec) Figure 30 Residual of yaw rate (R) under aileron actuator fault (zoom-in) 57 The fault coding for the seven fault conditions is shown in Table 3. The residual characteristic vectors corresponding to the different fault conditions are as follows: Table 5 Fault F1 F2 F3 F4 F5 F6 F7 Residual Characteristics Residual characteristic vector (1, 1, 0, 1, 1, 1, 1, 1, 1)t (0, 0, 1, 0, 1, 0, 1, 0, 1)t (1, 1, 1, 1, 1, 1, 1, 1, 1)t (1, 1, 1, 1, 0, 1, 1, 1, 1)t (0, 0, 1, 0, 1, 0, 1, 1, 1)t (0, 1, 1, 1, 1, 0, 1, 1, 1)t (0, 1, 1, 1, 1, 1, 1, 1, 1)t Using (4.6a), R ∆ is calculated to be: 0 −1 0 0 0 0  0 0 0 0 0 0 1 0 1 0 1 0  0 0 0 −1 0 0  0 − 0.5 0 − 0.5 0 0  0 0.5 0 0.5 0 −1  0 0 0 0 1 −1 0.5   0.5 − 1 0.5  − 1 0 −1  0.5 0 0.5  0 1 0  0 0 0   0 0 0  0.5 0 With R ∆ and (4.5), A ∆ is found to be: 0 −1 0 −1 −1 1 1 1  0   0 0 0 0 0 0.5 0 0.5  −1  0 − 0.5 1 − 0.5 0 1 − 0.5 1 − 0.5    With A ∆ , we are able to isolate any LIP actuator faults in the system using the residual characteristic vector extracted from simulations with F = A ∆ R (4.7). In this thesis, we have shown that how the residuals from the system can be studied to extract useful information to isolate faults in the system. We quantify the useful information extracted by defining a residual characteristic vector. When used 58 to detect more faults, other useful information can be used for fault isolation. For example, some residuals exhibit oscillatory behaviour. This property can be made used to form the residual characteristics used for fault detection. The method used is simpler and more direct in application as compared to the neural network approach proposed by Y.M Chen and M.L Lee (2002) [22]. However, a more comprehensive work has to be done to include other types of faults in the system. 59 PART II – STOCK MARKETS CHAPTER 5 CRASH FORECAST WITH LOG-PERIODIC FORMULA 5.1 Methodology In the financial world, there are generally two approaches in analysing the financial markets: the technical approach and the fundamental approach. Technical analysis refers to the use of past market data, mainly price and volume, in analysing the market. Technical analysts believe that market prices incorporate all the market information. They believe in the existence of price patterns in the market and that these price patterns repeat themselves. By looking at charts, these analysts seek to find these price patterns and the market trends. Through chart study, many technical indicators have been developed to analyse the market. These indicators include charting overlays like support and resistance levels, price-based indicators like moving averages and relative strength index, and volume-based indicators like money flow. However, most of these indicators are only useful in studying market prices in normal market conditions. These indicators are ineffective in the study of abnormal market conditions like major market crashes. A. Johansen and D. Sornette (1998) have shown that large market crashes are outliers [39]. These outliers form a class of their own and need a different model to explain their behaviours. Common technical indicators used for detecting price patterns in the usual market conditions are not useful in studying these large market 60 crashes. New mathematical models and rules are required to study the behaviours of market crashes. The underlying cause of market crashes is the positive feedback of speculators in the market. This positive feedback gives raise to speculative bubbles. Speculative bubbles cause the market price to deviate from its fundamental, resulting in market instability. The mechanism behind this positive feedback is the imitative behaviour of the investors in the market, which leads to the herding effect. There are many explanations for the collective imitative behaviour of investors. One of the reasons given is reputation herding of investors. These investors might have little information of the market and choose to follow the analysts’ recommendations. Thus, reputable analysts have an effect in influencing the market decisions of individual investors, which might result in collective buy/sell action in the market. Another reason given for collective behaviour is information cascades. Information cascades occur when the market is overwhelmed by aggregate information, overruling the private information that each individual might have. This results in euphoria in the market. All these mimic behaviours, resulting from these trend-followers, lead to positive feedback in the system, which create speculative bubbles. Trend-followers make up one group of investors in the market. The other group of investors are value-investors, who look at the fundamentals of companies when making investments. These value-investors restore the price in the market to its fundamental value. However, this restoring force often leads to overshoot in the target 61 price. With positive feedback from the trend-following speculators, the overshoot accelerates. The restoring force of the value-investors, together with the positive feedback from the speculators, results in accelerating oscillations in price. This explains the accelerating log-periodic behaviour of the price in the market, which we modelled using the log-periodic formula presented below: p (t ) = A + B(t c − t ) z + C (t c − t ) z cos(ω log(t c − t ) + φ ) (5.1) where p(t) is the price index at time t, A, B and C are dummy variables, tc is the time of singularity or critical time when the probability of the crash is the highest, z is the rate of exponential increase due to the positive feedback, ω is the angular frequency of the log-periodic oscillation and φ the phase lag. The method proposed for the study of stock market crashes makes use of the mathematical equation (5.1). As the equation is complicated with many variables, we break the equation into two parts for testing on real data. The first part of the equation is a power law formula (5.2) and the second part of the equation is the log-periodic oscillation (5.3): p1 (t ) = A + B(t c − t ) z (5.2) p 2 (t ) = C (t c' − t ) m cos(ω log(t c' − t ) + φ ) (5.3) The curve-fitting of the real stock index data to the log-periodic formula is an optimisation process. We make use of the least-square method in fitting the real data to the power law formula (5.2) and then in fitting the residue to the log-periodic oscillation (5.3). The algorithm used for the optimisation process is a large-scale algorithm, which is based on the interior reflective Newton method described in [45] 62 and [46]. The power law formula (5.2) has an exponential term (t c − t ) z . This term models the general upward trend of the stock price index. B represents the amplitude of the exponential increase; z represents the rate of the increase and tc the critical time when the probability of the crash is the highest. The log-periodic oscillation formula (5.3) models the oscillatory movement of the stock index before a crush. It consists of an exponential term (t c' − t ) m and an oscillatory term cos(ω log(t c' − t ) + φ ) . In the oscillatory term, ω represents the angular frequency of the stock index and φ represents the phase difference between the stock index and the log-periodic parameterisation that we have done. As the log-periodic formula is complicated, we break the parameter identification process into three steps. First, we use the stock price data p i (t ) to find the regression equation on the power law formula (5.2) to identify the variables A, B, tc and z. In this regression equation, the dependable variable is price p1(t) and the independent variable is time t. After the power law formula has been parameterised, we calculate the residual by deducting the value obtained using parameterised power law from the stock price (5.4). r (t ) = p (t ) − p1 (t ) (5.4) The second step involves estimating the angular frequency ω . With the ∧ residual obtained, we find an angular frequency estimate ω by doing a fast Fourier transform on the residual r (t ) and plot it in the frequency domain. We can then identify the principal frequency of the residual by looking at its peak on the frequency 63 spectrum. With this angular frequency estimate, we are able to set the initial value ω 0 . Estimate for the critical time and the exponent term are taken from the values found earlier using the power law formula. These estimates are used to set as initial values for iteration when using the log-periodic formula to find the variable values. The initial values of dummy variable C and the phase lag φ are generated randomly. The third step consists of finding the parameters in the log-periodic oscillatory formula (5.3). Due to the separation of log-periodic formula into two parts for the optimisation process, we have two different critical times, t c' in (5.3) and t c in (5.2). The exponential power m in (5.3) is also different from the exponential z in (5.2). t c and z found earlier are set as initial values for iteration process to find t c' and m. The expression in (5.2) describes the upward trend of stock prices, while the expression in (5.3) describes the log-periodic oscillation, which causes the stock prices to collapse. Hence, we use t c' to predict the crash time, as depicted by a large decline in the stock index. We apply this method on three stock indices. We apply it on the S&P 500 to predict the crash on Black Monday in 1987, STI to predict the stock market crash due to the bursting of the dot-com bubble in 2000 and DJIA to predict the crash during the credit crunch in 2008. The objective is to find a crash time using the above methodology, which is as close as the actual crash time in the stock market. 5.2 Case Study 5.5.1 Black Monday 64 Black Monday occurred on 19 October 1987. On this day, the S&P 500 dropped 20.5% from 282.84 points to 224.84 points, the largest single-day drop in S&P 500 in history. Before the crash, it increased rapidly from 165.37 points in 2 Jan 1985 to 336.77 points in 25 Aug 1987. The figure below shows the performance of the S&P 500 before the crash: S&P500 340 320 300 280 Index 260 240 220 200 180 160 85 85.5 86 Figure 31 86.5 Year 87 87.5 88 Standard & Poor 500 Using the data prior to the crash, we find the parameterised power law formula (5.2). Using the least-square method in fitting the real data to the power law formula, the parameters found are A = 317.8275, B = -78.9302, tc = 87.5703 and z = 0.6764. The figure below shows the parameterised power law curve of S&P 500 before the crash: 65 S&P500 340 320 300 280 Index 260 240 220 200 180 160 85 85.5 Figure 32 86 86.5 Year 87 87.5 88 S&P 500 Power Law Parameter Fitting After finding the parameterised power law, we generate residuals by deducting the values calculated based on the power law from the S&P 500 data (Figure 33). With the residuals, we can find an estimate of the angular frequency by finding its spectrum by using Fast Fourier Transformation (FFT). The cyclic components of the log-periodic oscillation can be resolved by spectrum analysis using FFT. From Figure 34, we can see that the amplitude of the spectrum peak at two extreme ends, the high frequency and the low frequency. The peak at high frequency is filtered off as it is most probably due to noises (eg. daily fluctuation of the stock index), thus is ignored. We zoom in the graph at the low frequency end to find a more ∧ precise value of the peak (Figure 35). The estimate of the angular frequency is f = 66 ∧ 1.95 or ω = 12.246. Residual with power law estimation 25 20 15 10 Residual 5 0 -5 -10 -15 -20 -25 85 85.5 Figure 33 86 86.5 Year 87 87.5 88 Residuals Obtained with Power Law Estimation 67 Single-Sided Amplitude Spectrum of y(t) 3000 2500 |Y(f)| 2000 1500 1000 500 0 0 50 100 150 Figure 34 200 Frequency (Hz) 250 300 350 400 Residual Frequency Spectrum Single-Sided Amplitude Spectrum of y(t) 2480 2470 |Y(f)| 2460 2450 2440 2430 -3 -2 -1 Figure 35 0 1 2 Frequency (Hz) 3 4 5 6 7 Residual Frequency Spectrum (zoom in) 68 S&P 500 Log-periodic Oscillation 25 20 15 10 Index 5 0 -5 -10 -15 -20 -25 85 85.5 Figure 36 86 86.5 Year 87 87.5 88 S&P 500 Log-periodic Oscillation The parameterised log-periodic oscillation (5.3) of the S&P 500 is then obtained and plotted (Figure 36). The parameters are C = -7.6722, m = 0.5000, t c' = 87.4443, ω = 13.0280 and φ = 3.3849. Putting together the parameterised power law and log-periodic oscillation, we obtain the parameterised log-periodic formula: p = 317.8275 − 78.9302(t − 87.5703) 0.6764 − 7.6722(87.4443 − t ) 0.5 cos(13.028 log(87.4443 − t ) + 3.3849) The graph is plotted as follows: 69 S&P500 340 320 300 280 Index 260 240 220 200 180 160 85 85.5 Figure 37 86 86.5 Year 87 87.5 88 S&P 500 Log-periodic Behaviour From Figure 37, we can see that the S&P 500 exhibited a log-periodic behaviour before the October 1987 crash. The estimated crash date of the S&P 500 is 11 June 1987 (decimated date t c' = 87.4443), which is about four months away from the actual crash. However, the parameterised log-periodic formula only predicted a 23 points (6.8%) dip from the peak in August 1987. This shows that although the logperiodic formula is able to give a good estimate of the date of the Black Monday crash in the S&P 500, it is unable to predict the magnitude of the crash. 5.5.2 Dot-Com Bubble The dot-com bubble refers to the speculative bubble in many of the developed countries from 1995-2001. During this period, there was frenzy on internet-based companies. The market values of these companies increased rapidly as speculators 70 bided up the prices of the stocks. When the dot-com bubble burst, stock indices worldwide dropped significantly. In Singapore, the STI dropped 21.7% (560 points) in less than three months, from 2582 points on 3 January 2000 to 2022 points on 15 March 2000. Before the crash, the STI increased more than 220% (1777 points) in less than two years, from 805 points on 4 September 1998 to 2582 points in 3 January 2000, as shown on Figure 38: STI 2600 2400 2200 2000 Index 1800 1600 1400 1200 1000 800 98.6 98.8 99 99.2 Figure 38 99.4 Year 99.6 99.8 100 100.2 Straits Times Index Using data before the crash on 3 January 2000, we find the parameterised law periodic formula (5.2). The parameters found are: A = 3829.6, B = -1271.2, tc = 2001.0874, z = 0.9. The figure below shows the parameterised power law curve of STI before the crash: 71 STI 2600 2400 2200 2000 Index 1800 1600 1400 1200 1000 800 98.6 98.8 99 Figure 39 99.2 99.4 Year 99.6 99.8 100 100.2 STI Power Law Parameter Fitting Residuals are generated using the parameterised power law and STI data (Figure 40). Using the generated residuals, its frequency spectrum is found using FFT ∧ ∧ (Figure 41). The angular frequency estimate is f = 2.9 Hz or ω = 18.212 (Figure 42). 72 Residual with power law estimation 400 300 200 Residual 100 0 -100 -200 -300 98.6 98.8 Figure 40 99 99.4 Year 99.6 99.8 100 100.2 Residuals Obtained with Power Law Estimation 4 2 99.2 Single-Sided Amplitude Spectrum of y(t) x 10 1.8 1.6 1.4 |Y(f)| 1.2 1 0.8 0.6 0.4 0.2 0 0 50 100 Figure 41 150 200 Frequency (Hz) 250 300 350 400 Residual Frequency Spectrum 73 4 Single-Sided Amplitude Spectrum of y(t) x 10 1.8418 1.8417 1.8417 1.8416 |Y(f)| 1.8416 1.8415 1.8415 1.8414 1.8414 1.8413 2.85 2.86 2.87 Figure 42 2.88 2.89 2.9 Frequency (Hz) 2.91 2.92 2.93 2.94 2.95 Residual Frequency Spectrum (zoom in) Using the angular frequency estimate and other parameters obtained earlier, the parameters for the log-periodic oscillation (5.3) are found using optimisation by iteration. The parameters are C = 145.8252, m = 0.1, t c' = 2000.1357, ω = 7.7284 and φ = 1.2467. The log-periodic oscillation of the STI residual is plotted on Figure 43. Together with the log power law parameters found earlier, we have the following logperiodic formula: p = 3829.6 − 1271.2(t − 2001.0874) 0.9 − 145.8252(2000.1357 − t ) 0.1 cos(7.7284 log(2000.1357 − t ) + 1.2467) Using the formula above, two figures are plotted. Figure 44 shows the STI calculated from mid 1998 to early 2000 and its critical time singularity (tc) during the crash in the early 2000. tc determines the crash time of the stock index. Figure 45 further demonstrates the log-periodicity behaviour of STI in the late 1999 before the 74 crash. STI 400 300 200 Index 100 0 -100 -200 -300 98.6 98.8 99 Figure 43 99.2 99.4 Year 99.6 99.8 100 100.2 STI Log-periodic Oscillation 75 6 2 STI x 10 1.5 1 Index 0.5 0 -0.5 -1 -1.5 -2 98.6 98.8 99 Figure 44 99.2 99.4 Year 99.6 99.8 100 100.2 100 100.2 STI Log-periodic Behaviour STI 2600 2400 2200 2000 Index 1800 1600 1400 1200 1000 800 98.6 98.8 99 Figure 45 99.2 99.4 Year 99.6 99.8 STI Log-periodicity before Crash Using data before the crash to obtain the parameters for the log-periodic 76 formula, we are able predict the impeding crash in 2000 (Figure 44). Figure 45 further shows the evolution of the STI before the crash, which exhibits a log-periodic signature before the crash. The predicted crash time is 18 February 2000, which is less than 2 months from the actual crash. Hence, the log-periodic formula is fairly accurate in predicting the STI crash date due to the dot-com bubble. 5.5.3 Global Financial Crisis 2008 The global financial crisis is an ongoing financial crisis that has affected the world stock markets. The crisis is caused by delinquency in subprime mortgages. The massive delinquency in subprime mortgages caused banks to run into liquidity problems and results in a credit crunch. The effect is widespread and has caused major stock indices around the world to crash. 77 4 1.5 DJIA 2008 Crash x 10 1.4 1.3 Index 1.2 1.1 1 0.9 0.8 4 4.5 5 Figure 46 5.5 6 6.5 Year 7 7.5 8 8.5 9 Dow Jones Industrial Average The downtrend of the DJIA started from late 2007 (Figure 46). The index dropped 2142 points (15.2%), from 14093 points in 12 October 2007 to 11951 points in 14 March 2008. However, there are more prominent crashes from September 2008 to December 2008. From 15 September to 1 December, the DJIA dropped a total of 2768 points or 25.4%. The index dropped more than 7% in many days during this period. On 29 September, the index dropped 778 points (7.0%); on 9 October, it dropped 679 points (7.3%); on 15 October, it dropped 733 points (7.9%); and on 1 December, it dropped 680 points (7.7%). Our objective is to determine a crash date from the log-periodic formula in (5.2) that is as close as the actual crash dates as possible. First, curve-fitting is done using data prior to the crash to find the parameters in the power law formula (5.2). Figure 47 shows the curve based on the power law, 78 with parameters A = 9583.1, B = 4827.7, tc = 8.6088, z = -1.3708. 4 1.45 Power Law Parametric Fitting of DJIA x 10 1.4 1.35 1.3 Index 1.25 1.2 1.15 1.1 1.05 1 0.95 4 4.5 Figure 47 5 5.5 6 Year 6.5 7 7.5 8 DJIA Power Law Parameter Fitting Residuals are generated using the parameterised power law and DJIA data (Figure 48). Using the generated residuals, its frequency spectrum is found using FFT ∧ ∧ (Figure 49). The angular frequency estimate is f = 0.688 or ω = 4.32 (Figure 50). 79 Residual with power law estimation 600 400 0 -200 -400 -600 -800 4 4.5 5 Figure 48 5.5 6 Year 6.5 7 7.5 8 Residuals Obtained with Power Law Estimation 4 8 Single-Sided Amplitude Spectrum of y(t) x 10 7 6 5 |Y(f)| Residual 200 4 3 2 1 0 0 20 40 60 80 100 120 140 Frequency (Hz) Figure 49 Residual Frequency Spectrum 80 4 7.7705 Single-Sided Amplitude Spectrum of y(t) x 10 |Y(f)| 7.77 7.7695 7.769 7.7685 0.67 0.675 Figure 50 0.68 0.685 0.69 Frequency (Hz) 0.695 0.7 0.705 Residual Frequency Spectrum (zoom-in view) After finding the estimate of the angular frequency, and using the parameters found earlier to set the initial values for iteration to parameterise the law periodic oscillation formula (5.3). Figure 51 shows the parameterised log-periodic oscillation, with C = 144.5417, m = -0.1327, t c' = 8.1492, ω =10.2878 and φ =-0.623. Putting the power law formula and the log-periodic oscillation, we obtained the log-periodic formula: p 2 (t ) = 9583.1 + 4827.7(8.6088 − t ) −1.3708 + 144.5417(8.1492 − t ) −0.1327 cos(10.2878 log(8.1492 − t ) + −0.623) 81 Logperiodic oscillation 600 400 200 Index 0 -200 -400 -600 -800 4 4.5 5 5.5 Figure 51 6.5 7 7.5 8 DJIA Log-periodic Oscillation 8 2 6 Year Log-perodic formula on DJIA x 10 1.5 1 Index 0.5 0 -0.5 -1 -1.5 4 4.5 5 Figure 52 5.5 6 6.5 Year 7 7.5 8 8.5 9 DJIA Log-periodic Behaviour 82 From Figure 52, we can see the critical time singularity due to log-periodic oscillation. The crash time obtained using (5.3) is t c' = 8.4192 (25 February 2008), which is earlier than the major crashes in September 2008. However, the crash time determined is within the period of major declines in DJIA from October 2007 to late 2008 (Figure 46). In this chapter, using a technical analysis approach, the log-periodic formula has been proposed to predict market crashes. Three crashes, the Black Monday, the dotcom bubble and the global financial crisis in 2008, have been studied. These case studies have shown favourable result in the prediction of the crash dates. However, the magnitudes of the crashes are not determined. 83 CHAPTER 6 6.1 CRASH FORECAST WITH INDICATORS Methodology Fundamental analysis refers to the use of fundamental economic indicators, for example GDP and interest rate, to analyse the market. Economic indicators reflect the economic health of a country. In “leading indicators of currency crisis”, Kaminsky, Lizondo and Reinhart have found that several economic indicators exhibit unusual behaviour before the currency crisis using empirical evidence from the past [30] and develop an early warning system (EWS) model to predict currency crisis. This EWS model makes use of several economic indicators to analyse currency crisis. By setting a threshold for each of these indicators, an indicator is said to have issued a signal if its value exceeds or falls below the threshold value. The principle of the model is to select the indicators whose contributions to the crisis prediction are the greatest. In the paper by Zhuang and Dowling (2002), they found out that weightings can be assigned according to the relative importance of the economic indicators to improve the accuracy of the currency crisis prediction. The health of the economic environment can have an effect on the stock market. Bordo and Wheelock (2006) found that the 20th century stock market booms were closely linked to domestic and international macroeconomic policies [40]. They create monthly real stock index for ten countries and found that booms occurred during periods of above moderate economic growth and below average inflation rate. An earlier study done by Heatcotte and Apilado (1974) made used of leading economic indicators to devise trading rules [41]. The trading rules constructing an index using economic indicators and filter the period to buy and sell a particular stock 84 or a basket of stocks. However, their simulation result was not outstanding. There are many other studies done by academic on the influence of a particular macroeconomic indicator on the stock market. Using empirical evidence from Singapore and the US, Wong, Khan and Du (2005) has found that stock prices are in long-run equilibrium with interest rate, though the relationship is less evident in the US [42]. Abdalla and Murinde (1997) have found the causal linkages between leading prices in foreign exchange markets and the stock markets in emerging countries [42]. Wu (2001) has found that a negative correlation between stock prices in Singapore and Singapore dollar exchange rate with respect to developed countries’ currencies before and during the 1997 Asian Financial Crisis [43]. Doing a case study on Cyprus, Tsoukalas (2003) used a Vector Autoregressive (VAR) model to study the relationship between macroeconomic factors and stock prices [35]. In the case study, the Granger causality test was implemented by using k the VAR equation of the form : RS t = ∑ bi X t −i + u t , where RSt refers to the stock i =1 return at time t and Xt-1 refers to the macroeconomic factor, for example CPI or exchange rate, at time t-1. From the test, Tsoukalas has found that macroeconomic indicators and stock prices in Cyprus are strongly related. Estrella and Mishkin (1996) have further shown the interest rate yield curve is useful in predicting recessions in the United States (US) [29]. Interest rate yield curve spread is calculated by taking the difference between the interest rate on ten-year Treasury note and the three-month Treasury bill. It was found that the recession probability increases when the value of the spread becomes more negative. For 85 example, the probability of a recession four quarters ahead is 50% when the spread is -0.82. In this thesis, we set up an early warning system and test its accuracy in detecting stock market crashes. Although there are research works being done on EWS, most of these works have been applied to currency crisis and none has been used for stock market crashes. Moreover, in most literatures, the time horizon for a crisis to happen is within 24 months upon the signal indication. In our research, we tested our EWS for stock market crashes within 12 months of signal indication. A stock market crash refers to a sharp decline in the stock index. In this thesis, we identify monthly drops of more than 5% in the stock index as crashes in the market. To set up an early warning system model for stock crashes, we monitor a set of indicators that reflect the general health of the economy. These indicators include GDP and CPI which reflect performance in the real sector of the economy; bank loan rate and yield curve which reflect the financial sector; exchange rate, current account, capital account and the national reserve (excluding gold) which reflect the external sector and the price of gold as market sentiment on the commodity market. Monthly data of these indicators are collected. These indicators are monitored for any divergence from their “normal” levels. The behaviour of each monitored indicator differs before a market crash. While analysing the behaviour of each indicator, we set a different threshold for each indicator. The threshold level is set to define the boundary of the “normal” level of the indicator. When the indicator exceeds its threshold value, it is taken as a warning signal that the stock market might crash in the next 12 months. This threshold value is 86 chosen to strike a balance between false signals and missed signals. When the threshold value is set too high, the false signals will be low but there will be many missed signals. Similarly, if the threshold value is set too low, there will be many false signals though the number of missed signals is low. The table below shows the grid of four possible scenarios in signal generated for crash prediction: Table 6 Signal No Signal Grid of Signal and Crash Crash (within 12 months) A C No Crash (within 12 months) B D In this grid, A is the total number of months the indicator generate a signal which has predicted correctly a crash within 12 months. B is the total number of months the indicator generate a false signal when no crash is observed within the next 12 months. C is the total number of months of missed signal of a crash and D is the total number of months when the indicator does not generate signal when there is no crash within the next 12 months. An ideal indicator is one that generates signals for crash (A) and does not generate signal when there is no crash (D), such that B and C are zeros. Table 7 Total no. of Crashes Crashes Detected Performance of Indicators A /(A+C) B /(B+D) Noise /Signal A /(A+B) For each stock market studied, a table is tabulated according to Table 7 to show the performance of various indicators. The first column indicates the total number of crashes over the period when data for a particular indicator is available. 87 The second column of the table indicates the number of crashes the indicator issued at least one signal in the previous 12 months. This statistic is different from the statistic A from Table 6, which is the total number of months which a signal issued, is followed by a crash within 12 months. Using the statistics from Table 6, we calculate the ratio A/(A+C) which is the ratio of the number of good signals to the possible number of good signals could have been issued. This ratio should be as big as possible. Ratio of one would mean that the indicator issues a signal every month during the 12 months before a crash. This statistic will be tabulated on the third column of Table 7. The ratio B/(B+D), which is the ratio of the number of bad signal to the possible number of bad signal could have been issued, is also calculated. This ratio should be as low as possible. This statistic is shown on the fourth column of Table 7. Fifth column of Table 7 shows the noise-to-signal ratio of the various indicators studied. The noise-to-signal ratio is calculated by taking the ratio of the two results found earlier, [B/(B+D)]/[A/(A+C)]. This statistic shows the ratio of false signal to good signal. It reflects the ability of the indicator to issue good signal and avoid false signal. Ratio of more than one would mean that the indicator issued more false signals than good signals, which makes the indicator unsuitable for predicting a crash. Another way of comparing the “noisiness” of the indicators is by looking at the ratio A/(A+B), which indicates the proportion of signal issued by indicator followed by a crash within the next 12 months. This ratio should be as high as possible. Ratio of one would mean that every signal issued is followed by a crash in 88 the next 12 months. After comparing the performance of the various indicators, we select the indicators with noise-to-signal ratio of less than one to form the components of an early warning system (EWS). Each of these components is denoted by ci and will also be assigned a weighting wi, which reflects its relative importance in the EWS model. The EWS indicator value is calculated by the formula below: I = ∑ ci wi (6.1) i When the value I calculated in (6.1) exceeds a certain threshold, a “crash” signal is issued. A table is tabulated to show the total number of crashes during the period of study, the number of crashes detected, the number of good signals issued and the total number of false signal issued. 6.2 Case Study 6.2.1 Standard and Poor 500 (S&P 500) Using monthly S&P 500 index data from January 1981 to December 2005, we have identified 15 instances with a monthly drop of more than 5%. We have selected ten indicators for signal generation to detect these crashes. These indicators are US GDP quarter-on-quarter (q-o-q) growth rate, bank loan rate, CPI year-on-year (y-o-y) change, exchange rate month-on-month (m-o-m) fluctuation, current account, capital account, national reserve (exclude gold), yield curve, gold price and the volatility index (VIX) obtained from the Chicago Board of Options Exchange (CBOE). Different threshold values are set for different indicators. The threshold values are determined from past values of the indicators, chosen to strike a balance between 89 false signal and missed signal of a crash. For GDP q-o-q growth rate, the lower threshold is set to be 0.2%, below which a signal is being generated (Figure 53). For the bank lending rate, an upper threshold is set at 9.4%, above which a signal is generated (Figure 54) and for CPI y-o-y change, a lower threshold is set at 0% (Figure 55). The statistic for the US exchange rate used in the thesis is obtained from the International Financial Statistics (IFS) tabulated by the International Monetary Fund (IMF). This statistic is calculated by weighting the US Dollar against a basket of currencies. Using the exchange rate statistic, we calculated its m-o-m fluctuation. Two threshold values are then set. The upper threshold is 4% and the lower threshold is -4% (Figure 56). Three statistics (current account, capital account, month-on-month change in national reserve) which reflect the external sector of the economy are grouped together to form a single indicator for analysis. When at least two out of the three statistics monitored exceed their respective threshold levels for a particular month, a signal is generated; otherwise, no signal is generated. The lower threshold set for the current account is -US$30 billion (Figure 57), the lower threshold set for the capital account is -US$3 billion (Figure 58) and the lower threshold set for the month-onmonth change in national reserve is -4% (Figure 59). For the yield curve, the lower threshold set is 0.5% (Figure 60). Two threshold values are set for the price of gold per troy ounce. The upper threshold is set at US$450 and the lower threshold is set at US$300 (Figure 61). For VIX, an upper threshold of 30 is set (Figure 62). 90 Figure 53 Jan-05 Jan-04 Jan-03 Jan-02 Jan-01 Jan-00 Jan-99 Jan-98 Jan-97 Jan-96 Jan-95 Jan-94 Jan-93 Jan-92 Jan-91 Jan-90 Jan-89 Jan-88 Jan-87 Jan-86 Jan-85 Jan-84 Jan-83 Jan-82 Jan-81 In Percentage GDP QoQ Growth 1.2000 1.0000 0.8000 0.6000 0.4000 0.2000 0.0000 -0.2000 Date US GDP Quarter-on-Quarter Growth 91 Figure 55 Jan-05 Jan-04 Jan-03 Jan-02 Jan-01 Jan-00 Jan-99 Jan-98 Jan-97 Jan-96 Jan-95 Jan-94 Jan-93 Figure 54 Jan-92 Jan-91 Jan-90 Jan-89 Jan-88 Jan-87 Jan-86 Jan-85 Jan-84 Jan-83 Jan-82 Jan-81 In Percentage Point 0.0000 Jan-05 Jan-04 Jan-03 Jan-02 Jan-01 Jan-00 Jan-99 Jan-98 Jan-97 Jan-96 Jan-95 Jan-94 Jan-93 Jan-92 Jan-91 Jan-90 Jan-89 Jan-88 Jan-87 Jan-86 Jan-85 Jan-84 Jan-83 Jan-82 Jan-81 Bank Lending Rate 25.0000 20.0000 15.0000 10.0000 5.0000 0.0000 Date US Bank Lending Rate CPI YoY Change 10.0000 8.0000 6.0000 4.0000 2.0000 Date -2.0000 -4.0000 -6.0000 US CPI Year-on-Year Change 92 In Billion US Dollars Ja n8 Ja 1 n82 Ja n8 Ja 3 n8 Ja 4 n85 Ja n8 Ja 6 n87 Ja n8 Ja 8 n89 Ja n9 Ja 0 n91 Ja n9 Ja 2 n93 Ja n9 Ja 4 n95 Ja n9 Ja 6 n97 Ja n9 Ja 8 n99 Ja n0 Ja 0 n01 Ja n0 Ja 2 n0 Ja 3 n04 Ja n05 Figure 56 USD Exchange Rate Month-on-Month Fluctuation Current Account 50.0000 0.0000 Date -50.0000 -100.0000 -150.0000 -200.0000 -250.0000 Figure 57 US Current Account 93 Capital Account 1.0000 Jan-05 Jan-04 Jan-03 Jan-02 Jan-01 Jan-00 Jan-99 Jan-98 Jan-97 Jan-96 Jan-95 Jan-94 Jan-93 Jan-92 Jan-91 Jan-90 Jan-89 Jan-88 Jan-87 Jan-86 Jan-85 Jan-84 Jan-83 Jan-82 -1.0000 Jan-81 0.0000 Date In Billion US Dollars -2.0000 -3.0000 -4.0000 -5.0000 -6.0000 -7.0000 -8.0000 Figure 58 Figure 59 US Capital Account US National Reserve (exclude gold) Month-on-Month Change 94 Ja n8 Ja 1 n8 Ja 2 n83 Ja n8 Ja 4 n85 Ja n8 Ja 6 n8 Ja 7 n88 Ja n8 Ja 9 n90 Ja n9 Ja 1 n9 Ja 2 n93 Ja n9 Ja 4 n95 Ja n9 Ja 6 n9 Ja 7 n98 Ja n9 Ja 9 n00 Ja n0 Ja 1 n0 Ja 2 n03 Ja n0 Ja 4 n05 Yield Curve 5.0000 4.0000 3.0000 2.0000 1.0000 0.0000 Date -1.0000 -2.0000 -3.0000 -4.0000 Figure 60 Figure 61 Yield Curve Gold Price 95 VIX 50 45 40 35 Volatility 30 25 20 15 10 5 n05 n04 Ja Ja n02 n03 Ja Ja n00 n01 Ja Ja n98 n99 Ja Ja n96 n97 Ja Ja n94 n95 Ja Ja n92 n93 Ja n91 Ja Ja n89 n90 Ja Ja n87 n88 Ja Ja n85 n86 Ja Ja n83 n84 Ja n82 Ja Ja Ja n81 0 Date Figure 62 CBOE Volatility Index (VIX) With the available data for the various signal-generating indicators, the values of A, B, C and D, presented in Table 6, are calculated. These values are tabulated in Table 8. In table 9, we can further see the performance of the indicators in S&P 500 crash prediction. In term of the number of detected crashes, gold price is the best indicator. The indicator is able to issue a signal within 12 months before a crash for 12 out of the 15 crashes observed. The exchange rate indicator is the worst indicator, issuing a signal for only three out of the 11 crashes observed. For the ratio of good signal to the number of months a good signal could have been issued, the bank lending rate is the best indicator, which issued 44.5% of possible good signals. The external sector indicator, which consists of the current account, capital account and national reserve components, is the worst indicator, 96 issuing only 4% of possible good signals. For the ratio of bad signal to the number of months a bad signal could have been issued, the VIX is the best indicator, with a ratio of zero. The worst indicator, the bank lending rate, has a ratio of only 28.4%. This shows that the incidence of bad signals issued by the indicators studied is low. The fifth column of Table 9 indicates the noise to signal ratio. From the table, the ratios for all the indicators are less than one. The VIX is the best indicator, with a ratio of zero. The VIX is also the best indicator in term of proportion of signal issued followed by crash within the next 12 months. A ratio of one indicates that every signal issued by the VIX indicator is followed by a crash within the next 12 months. Table 8 GDP Bank Lending Rate CPI Exchange Rate External Sector Yield Curve Gold Price VIX Table 9 GDP Bank Lending Rate Components of Grid for S&P 500 Crash Prediction A 13 49 B 5 50 C 90 61 D 169 126 29 3 4 27 6 5 63 76 95 144 154 170 35 48 10 14 21 0 76 61 45 162 158 113 Performance of Indicators for S&P 500 Crash Prediction Total no. of Crashes 15 15 Crashes Detected A /(A+C) B /(B+D) Noise /Signal A /(A+B) 7 8 0.126 0.445 0.028 0.284 0.227 0.637 0.722 0.494 97 CPI Exchange Rate External Sector Yield Curve Gold Price VIX 12 11 7 3 0.315 0.037 0.157 0.037 0.500 0.987 0.517 0.333 13 5 0.040 0.028 0.707 0.444 15 15 8 9 12 6 0.315 0.440 0.181 0.079 0.117 0 0.252 0.266 0 0.714 0.695 1 As the noise-to-signal ratios of all the indicators are less than one, all the indicators studied are selected as components of the EWS. The number of components is eight. The notation for the various components in the EWS is assigned successively according to Table 9, with GDP denoted by c1, the bank lending rate denoted by c2¸ and so on. Weightings are assigned to each indicator based on the proportion of crashes detected over period whereby data are available. For the period when all data is available, the weightings are w1 = 0.106, w2 = 0.121, w3 = 0.133, w4 = 0.062, w5 = 0.088, w6 = 0.137, w7 = 0.182 and w8 = 0.171. A single EWS indicator is formed. The indicator value is calculated by (6.1) and compared to the threshold value of 0.3. When the EWS indicator value is more than 0.3 in a particular month, a warning signal is generated. The result is summarised in the table below: Table 10 Total Crashes 15 Crash Detection with EWS Crashes Detected 12 Right Signal 44 False Signal 8 From the table, we can see that the proportion of crashes detected is high (80%). Out of 52 signals issued, 44 or 84.6% are right signals. This means that 86.4% of the signals issued are followed by a crash within 12 months. In summary, the eight indicators studied are useful for S&P 500 crash 98 prediction. The performance of the indicators varies when different statistics are used to analysis them. Overall, yield curve and gold price give a good prediction with a high percentage of crashes detected, a high proportion of good signal, low proportion of false signal and a low noise to signal ratio. The EWS, formed by the various economic and market indicators studied, is able to predict 80% of the crashes in S&P 500. The proportion of right signal issued is also high. 6.2.2 Straits Times Index (STI) Using monthly STI data from January 1995 to December 2004, we have identified 17 instances with a monthly drop of more than 5%. We have selected nine indicators for study. These nine indicators are Singapore GDP q-o-q growth rate, bank loan rate, CPI y-o-y change, exchange rate m-o-m fluctuation, current account, capital account, national reserve (exclude gold), gold price and VIX. Different thresholds are set for different indicators. For Singapore GDP q-o-q growth, the lower threshold is set to be 0.1%, below which a warning signal is generated (Figure 63). For Singapore bank lending rate, an upper threshold of 7% is set, beyond which a signal is issued (Figure 64). For CPI y-o-y change, the lower threshold is 0.1% (Figure 65). The source for the exchange rate data is the IFS tabulated by the IMF. The statistic is calculated by weighting the Singapore dollar against a basket of currencies. Using this statistic, we calculate its monthly fluctuation. Two thresholds are being set. The upper threshold is 1% and the lower threshold is -1% (Figure 66). Similar to S&P 500 crash analysis, we group the three statistics (current 99 account, capital account, national reserve) together for analysis. When at least two statistics exceed the thresholds for a particular month, a warning signal is issued. The lower threshold for the current account is S$ 1200 million (Figure 67); the lower threshold for capital account is –S$15 million (Figure 68); the lower threshold for mo-m change in national reserve (excluding gold) is -0.1% (Figure 69). Two thresholds are set for gold prices (Figure 70). The upper threshold is set to be US$395 per troy ounce and lower threshold is set to be US$290 per troy ounce. As volatility index is not available for the STI, we make use of VIX tabulated by CBOE for the US market. An upper threshold is set to be 24 (Figure 71). GDP QoQ Growth 8 6 2 0 Date M 1 1 M 99 5 5 19 M 9 9 5 1 M 99 1 5 1 M 99 5 6 1 M 99 9 6 1 M 99 1 6 1 M 99 5 7 19 M 9 9 7 1 M 99 1 7 19 M 9 5 8 1 M 99 9 8 1 M 99 1 8 1 M 99 5 9 19 M 9 9 9 1 M 99 1 9 20 M 0 5 0 2 M 00 9 0 2 M 00 1 0 20 M 0 5 1 2 M 00 9 1 2 M 00 1 1 2 M 00 5 2 2 M 00 9 2 2 M 00 1 2 20 M 0 5 3 2 M 00 9 3 2 M 00 1 3 2 M 00 5 4 2 M 00 9 4 20 04 In Percentage 4 -2 -4 Figure 63 Singapore GDP Quarter-on-Quarter Growth 100 M 1 1 M 99 5 5 19 M 9 9 5 1 M 99 1 5 19 M 9 5 6 1 M 99 9 6 1 M 99 1 6 1 M 99 5 7 19 M 9 9 7 1 M 99 1 7 19 M 9 5 8 1 M 99 9 8 1 M 99 1 8 1 M 99 5 9 1 M 99 9 9 1 M 99 1 9 20 M 0 5 0 2 M 00 9 0 2 M 00 1 0 20 M 0 5 1 2 M 00 9 1 2 M 00 1 1 2 M 00 5 2 2 M 00 9 2 2 M 00 1 2 2 M 00 5 3 2 M 00 9 3 2 M 00 1 3 2 M 00 5 4 2 M 00 9 4 20 04 In Percentage Points M 1 1 M 995 5 1 M 995 9 1 M 995 1 19 M 96 5 1 M 996 9 19 M 96 1 1 M 997 5 19 M 97 9 1 M 997 1 19 M 98 5 1 M 998 9 19 M 98 1 1 M 999 5 1 M 999 9 1 M 999 1 2 M 000 5 20 M 00 9 2 M 000 1 20 M 01 5 2 M 001 9 20 M 01 1 2 M 002 5 20 M 02 9 2 M 002 1 2 M 003 5 2 M 003 9 2 M 003 1 2 M 004 5 20 M 04 9 20 04 In Percentage Lending Rate 9.00 8.00 7.00 6.00 5.00 4.00 3.00 2.00 1.00 0.00 Date Figure 64 Figure 65 Singapore Bank Lending Rate CPI YoY Change 3 2.5 2 1.5 1 0.5 0 Date -0.5 -1 -1.5 -2 Singapore CPI Year-on-Year Change 101 Figure 66 SGD Exchange Rate Month-on-Month Change Figure 67 Singapore Current Account 102 In Millions SG Dollars Figure 69 Figure 68 M9 2004 M5 2004 M1 2004 M9 2003 M5 2003 M1 2003 M9 2002 M5 2002 M1 2002 M9 2001 M5 2001 M1 2001 M9 2000 M5 2000 M1 2000 M9 1999 M5 1999 M1 1999 M9 1998 M5 1998 M1 1998 M9 1997 M5 1997 M1 1997 M9 1996 M5 1996 M1 1996 M9 1995 M5 1995 M1 1995 Capital Account 0.0000 Date -5.0000 -10.0000 -15.0000 -20.0000 -25.0000 Singapore Capital Account Singapore National Reserve Month-on-Month Change 103 M 1 1 M 995 5 19 M 95 9 1 M 995 1 19 M 96 5 1 M 996 9 19 M 96 1 1 M 997 5 19 M 97 9 1 M 997 1 19 M 98 5 1 M 998 9 19 M 98 1 1 M 999 5 19 M 99 9 1 M 999 1 20 M 00 5 2 M 000 9 20 M 00 1 2 M 001 5 20 M 01 9 2 M 001 1 20 M 02 5 2 M 002 9 20 M 02 1 2 M 003 5 20 M 03 9 2 M 003 1 20 M 04 5 2 M 004 9 20 04 VIX M 1 1 M 995 5 1 M 995 9 1 M 995 1 19 M 96 5 1 M 996 9 19 M 96 1 1 M 997 5 1 M 997 9 1 M 997 1 1 M 998 5 19 M 98 9 1 M 998 1 19 M 99 5 1 M 999 9 19 M 99 1 2 M 000 5 2 M 000 9 2 M 000 1 20 M 01 5 2 M 001 9 20 M 01 1 2 M 002 5 20 M 02 9 2 M 002 1 2 M 003 5 2 M 003 9 20 M 03 1 2 M 004 5 2 M 004 9 20 04 US Dollars Per Ounce Gold Price 500.0000 450.0000 400.0000 350.0000 300.0000 250.0000 200.0000 150.0000 100.0000 50.0000 0.0000 Date Figure 70 Figure 71 Gold Price Volatility Index 50 45 40 35 30 25 20 15 10 5 0 Date CBOE Volatility Index (VIX) 104 Table 11 shows the statistics for the various indicators for STI crash prediction. Table 12 further shows the performance of the various indicators. In term of crashes detected, both the GDP indicator and the external sector are perfect indicators, with at least a signal issued for all crashes detected. The bank lending rate is the worst indicator, issuing correct signal for only five out of the 17 crashes. The external sector indicator also has the highest ratio of good signal to the number of months a good signal could have been issued. It also has the lowest noise to signal ratio of 0.249 and the highest proportion of signal issued (93.4%) followed by crash within the next 12 months. Four out of the seven indicators have a noise to signal ratio of more than one. This means that these indicators issued more false signals than good signals. These indicators are unsuitable for crash detection, despite the high detection rate of some indicators. Table 11 GDP Bank Lending Rate CPI Exchange Rate M-o-M Change External Sector Gold Price VIX Summary of Result for STI Crash Prediction A 28 8 B 12 2 C 47 68 D 9 19 17 13 7 5 47 53 14 14 43 3 32 18 37 29 5 11 42 47 13 10 105 Table 12 GDP Bank Lending Rate CPI Exchange Rate External Sector Gold Price VIX Performance of Indicators for STI Crash Prediction Total no. of Crashes 17 17 Crashes Detected A /(A+C) B /(B+D) Noise /Signal A /(A+B) 17 5 0.373 0.105 0.571 0.095 1.530 0.904 0.7 0.8 16 17 6 13 0.265 0.196 0.333 0.263 1.254 1.336 0.708 0.722 17 17 0.573 0.142 0.249 0.934 17 17 14 15 0.468 0.381 0.277 0.523 0.593 1.372 0.880 0.725 The selected indicators to form the components of the EWS are bank lending rate indicator, denoted by c1, external sector indicator, denoted by c2, and the gold price indicator, denoted by c3. The weightings are w1 = 0.139, w2 = 0.472 and w3 = 0.389. The EWS indicator value is calculated using (6.1). It is compared to a threshold of 0.3, beyond which the EWS issue a warning signal. The table below shows the result: Table 13 Total Crashes 17 Crash Detection with EWS Crashes Detected 17 Right Signal 53 Wrong Signal 6 The EWS is able to detect all the 17 crashes in the STI during the period January 1995 to December 2004. Out of 59 signals issued during that period, only six are wrong signals. This means that only 10% of the signals issued by the EWS indicator are wrong. In summary, most of the indicators are shown to be unsuitable for use in crash detection for the STI index. However, three indicators (bank lending rate, external 106 sector and the gold price) proved to be useful as components in the the early detection system in crash detection. This EWS formed for STI also has a low rate of wrong signal issued. In this chapter, fundamental analysis is done on economic indicators and an EWS is set up to predict market crashes. Case studies are done on the S&P 500 and the STI and the results have shown that the EWS set up using this methodology give remarkable results for predicting market crashes in the S&P. However, the results for predicting crashes in the STI are not outstanding. 107 CHAPTER 7 CONCLUSION In this thesis, we have studied fault detection and prediction in the field of engineering and financial world. For engineering application, we make use of the chisquare test method for fault detection in an F-16 aircraft and devise a new method of fault diagnosis using the characteristics of residuals in the system. The main contribution of this thesis is the fast detection of actuator faults using chi-square testing, the extraction of residual characteristics from the residual behaviour and the use of simple mapping method to identify the type of actuator fault from its fault signature. We have shown that using chi-square testing method, actuator faults can be detected within 0.2 second accurately. To isolate the fault, we observe the residual behaviour and extract useful residual characteristics. The mapping method used for identifying the system fault with the residual characteristic vector is simple and thus need low computation power. The current work is investigative in nature. Further works can be done to include other types of faults, such as the sensor faults. More residual characteristics can be studied when other faults are considered. In the field of finance, we have studied market crashes using two approaches, using technical analysis for stock market crashes and using indicators to set up an early warning system for crashes. In technical analysis, we have studied the STI for the dot-com crash in 2000 and the DJIA for the recent 2007-2008 stock market crash rooted from the subprime crisis. Our method has shown result in predicting the STI crash in 2000. The STI exhibited log periodic behaviour and singularity before the 108 crash. Using the log-periodic formula, we can also estimate the crash dates of the indices to an accuracy of within 6 months from the actual crashes. Our work on recent DJIA crash has also shown promising result, with a predicted crash date in the period of large market crashes between 2007 and 2008. In the indicator approach, we have extended the research on EWS from currency crisis predictions to stock market crash predictions. We have shown that some economic indicators are useful in the prediction of market crashes. These indicators can be extended to statistics that reflect the real economy, the commodity market such as gold and market indicator such as the volatility index. Further work can be done include more indicators for crash prediction. 109 BIBLIOGRAPHY [1] R. Isermann and P. Balle, “Trends in the Application of Model-Based Fault Detection and Diagnosis of Technical Processes”, Control Eng. Practice, Vol. 5, No. 5, pp. 709-719, 1997 [2] S Altug, M.Y Chen and H.J Trussell, “Fuzzy inference systems implemented on neural architectures for motor fault detection and diagnosis”, IEEE Transactions on Industrial Electronics, Vol. 46, Issue 6, pp. 1069-1079, Dec. 1999 [3] Y.B Peng, A. Youssouf, A. P. Arte and M. Kinnaert, “A Complete Procedure for Residual Ceneration and Evaluation with Application to a Heat Exchanger, IEEE Transactions on Control Systems Technology, Vol. 5, No. 6, Nov. 1997 [4] R.J McDuff, P.K Simpson and D. Gunning, “An Investigation of Neural Networks for F-16 Fault Diagnosis”, IEEE Automatic Testing Conference, Sept 1989 [5] S. Thomas, H.G Kwatny and B.C Chang, “Nonlinear Reconfiguration for Asymmetric Failures in a Six Degree-of-Freedom F-16”, Proceeding of the 2004 American Control Conference, Boston, Massachusetts, Jun.-Jul. 2004 [6] S. Simani, M. Bonfe, P.Castaldi and W. Geri, “Residual Generator Design and Performance Evaluation for Aircraft Simulated Model FDI”, 16th IEEE International Conference on Control Applications, Oct. 2007 [7] M. Luo, J.L Aravena and F.N Chowdhury, “Pseudo Power Signatures for Aircraft Fault Detection and Identification”, Digital Avionics Systems Conference 2002 Proceedings, 2002 110 [8] S. Glavaski and M. Elgersma, “Active aircraft fault detection and isolation”, AUTOTESTCON Proceedings 2001, IEEE Systems Readiness Technology Conference, Aug. 2001 [9] W.Z Yan, “Application of Random Forest to Aircraft Engine Fault Diagnosis”, Computational Engineering in Systems Applications, IMACS Multiconference on, Vol. 1, pp. 468-475, Oct 2006 [10] M. Benini, M. Bonfe, P. Castaldi, W. Geri and S. Simani, “Design and Analysis of Robust Fault Diagnosis”, Journal of Control Science and Engineering, Vol. 2008 [11] R. Kumar, “Failure Detection, Isolation and Estimation for Flight Control Surfaces and Actuator, National Aerospace Laboratory Institutional Repository Technical Report, Project Document FC 9701, Feb. 1997 [12] Y.J.P Wei and S. Ghayem, “F-16 failure detection isolation and estimation study”, IEEE Transactions on Aerospace and Electronics Conference, Vol. 2, pp. 515-521, May 1991 [13] A.K Caglayan, S.M Allen, K. Wehmuller, “Evaluation of a second generation reconfiguration strategy for aircraft flight control systems subjected to actuator failure/ surface damage”, IEEE Transactions on Aerospace and Electronics Conference, Vol.2, pp. 520-529, May 1998 [14] E.Y. Chow, “A failure detection system design methodology, Ph.D Dissertation, MIT, 1981 [15] P. Eide and P. Maybeck, “An MMAE failure detection system for the F-16”, IEEE Transactions on Aerospace and Electronic Systems, Vol. 32, Iss. 3, pp. 111 1125-1136, Jul. 1996 [16] F. Caliskan and C.M Hajiyev, “Aircraft sensor fault diagnosis based on kalman filter innovation sequence”, Conference on Decision and Control, Proceedings of 37th IEEE, Dec. 1998 [17] P. Eide and P. Maybeck, “Evaluation of a multiple-model failure detection system for the F-16 in a full-scale nonlinear simulation”, IEEE Transactions on Aerospace and Electronics Conference, 1995, Vol. 1, pp. 531-536, May 1995 [18] C.L Lin and C.T Liu, “Failure detection and adaptive compensation for fault tolerable flight control systems”, IEEE Transactions on Industrial Informatics, Vol. 3, No. 4, Nov 2007 [19] S. Simani and M. Bonfe, “Modelling and identification of residual generator functions for fault detection and isolation of a small aircraft”, 43rd IEEE Conference on Decision and Control, Dec. 2004 [20] M. Benini, M. Bonfe, P. Castaldi, W. Geri and S. Simani, “Residual generator function design for actuator fault detection and isolation of a Piper PA30 aircraft”, 43rd IEEE Conference on Decision and Control, Dec. 2004 [21] N. Meskin and K. Khorasani, “Fault detection and isolation of actuator faults in overactuated systems”, Proceedings of the 2007 American Control Conference, 2007 [22] Y.M Chen and M.L Lee, “Neural networks-based scheme for system failure detection and diagnosis”, Mathematics and Computers in Simulation, Vol. 58, Iss. 2, pp. 101-109, Jan 2002 112 [23] B. Stevens and F. Lewis, “Aircraft Control and Simulation”, Wiley Interscience, New York, 1992 [24] Nguyen, Ogburn, Gilbert, Kibler, Brown and Deal, “NASA Technical Paper 1538 – Simulator Study of Stall / Post-Stall Characteristics of a Fighter Airplane with Relaxed Longitudinal Static Stability”, Dec 1979 [25] R.K Mehra and J. Peschon, “An Innovations Approach to Fault Detection and Diagnosis in Dynamic Systems”, Automatica Vol. 7, pp. 637-640, Pergamon Press, Sept.1971 [26] A.S Willsky, “A Survey of Design Methods for Failure Detection in Dynamic System”, Automatica, Vol. 12, pp. 601-611, Pergamon Press, Nov. 1976 [27] R.K Mehra, “On the identification of variances and adaptive Kalman filtering”, IEEE Transaction Automatic Control, Apr. 1970 [28] Lockheed Martin Press Release (6 Jun. 2008), “United States Government Awards Lockheed Martin Contract to Begin Production of Advanced F-16 Aircraft for Morocco” , retrieved 28 Nov. 2008 [29] Arturo Estrella and Frederic S. Mishkin, “The Yield Curve as a Predictor of US Recessions”, Current Issues in Economics and Finance, Vol. 2, No. 7, June 1996 [30] Graciela Kaminsky; Saul Lizondo; Carmen M. Reinhart, “Leading Indicators of Currency Crises”, Staff Papers – International Monetary Fund, Vol. 45, No. 1 pp. 1-48, Mar 1998 [31] Hali J. Edison, “Do Indicators of Financial Crises Work? An Evaluation of an Early Warning System”, Board of Governors of the Federal Reserve System, 113 International Finance Discussion Papers, No. 675, July 2000 [32] Fisher Black, “Noise”, The Journal of Finance, Vol. 41, No. 3, Papers, Jul. 1986 [33] Werner F. M. De Bondt and Richard Thaler, “Does the Stock Market Overreact?”, The Journal of Finance, Vol. 40, No. 3, Jul. 1985 [34] Robert I. Webb., “Trading Catalysts: How Events Move Markets and Create Trading Opportunities”, Financial Times Prentice Hall, 2007 [35] Dimitrios Tsoukalas, “Macroeconomic Factors and Stock Prices in the Emerging Cypriot Equity Market”, Managerial Finance Vol. 29 No.4, 2003 [36] Juzhong Zhuang and J. Malcolm Dowling, “Causes of the 1997 Asian Financial Crisis: What can an Early Warning System Model tell us?”, ERD Working Paper No. 26, Oct 2002 [37] Didier Sornette, “Why Stock Markets Crash : Critical Events in Complex Financial Systems”, Princeton University Press, Princton and Oxford, 2003 [38] A. Johansen and D. Sornette, “Bubbles and Anti-Bubbles in Latin-America, Asian and Western Stock Markets: An Empirical Study”, International Journal of Theoretical and Applied Finance. [39] A. Johansen, D. Sornette, “Stock Market Crashes are Outliers”, European Physic Journal B 1, pp 141-143, 1998 [40] Michael D. Bordo and David C. Wheelock, “When Do Stock Market Booms Occur? The Macroeconomic and Policy Environments of 20th Century Booms”, Federal Reserve Bank of St Louis Working Paper 2006-051A, Sept 2006 114 [41] Wing-Keung Wong, Habibullah Khan and Jun Du, “Money, Interest Rate and Stock Prices: New Evidence from Singapore and the United States”, U21Global Working Paper No. 007/2005, July 2005 [42] Abdalla, I.S.A. and V. Murinde, “Exchange Rate and Stock Price Interactions in Emerging Financial Markets: Evidence on India, Korea, Pakistan, and Philippines,” Applied Financial Economics 7, pp. 25-35, 1997 [43] Ying Wu, “Exchange rates, stock prices and money markets: evidence from Singapore”, Journal of Asian Economies 12, pp. 445-458, 2001 [44] Karl E. Case, John M. Quigly and Robert J. Shiller, “Comparing Wealth Effects: The Stock Market versus the Housing Market”, Program on Housing and Urban Policy Woring Paper No. W01-004, 2005 [45] Coleman, T.F. and Y. Li, "An Interior, Trust Region Approach for Nonlinear Minimization Subject to Bounds," SIAM Journal on Optimization, Vol. 6, pp. 418-445, 1996 [46] Coleman, T.F. and Y. Li, "On the Convergence of Reflective Newton Methods for Large-Scale Nonlinear Minimization Subject to Bounds," Mathematical Programming, Vol. 67, Number 2, pp. 189-224, 1994 [47] Ron Chernow, “The House of Morgan: An American Banking Dynasty and the Rise of Modern Finance”, Grove Press, ch. 35, pp. 699, 2001 [48] Anne Goldgar, “Tulipmania: Money, Honor and Knowledge in the Dutch Golden Age”, University of Chicago Press, 2007 [49] Peter M. Garber, “Famous First Bubble”, MIT Press, ch 16, 2001 115 116 [...]... crash, jeopardising the safety of the pilot and his passengers In recent decades, there has been an increasing interest in fault detection and diagnosis in engineering applications R Isermann and P Balle [1] have observed and gathered the developments of fault detection and diagnosis at selected conferences 1 during 1991 – 1995 In the paper, they have observed that parameter estimation and observer-based... Accuracy and speed of detection are important The number of false alarm and undetected faults should be kept to the minimum and the speed of detection to be as fast as possible When a fault is detected, fault diagnosis follows Fault diagnosis consists of two parts: fault isolation and identification Fault isolation involves locating the source of the fault and fault identification involves estimating the... faults in the systems, including additive process faults, multiplicative process faults, sensor faults and actuator faults Additive process faults are faults caused by unknown inputs to the system These unknown inputs cause abnormal behaviour in the outputs An example of additive process fault in an aircraft is the wind gust Multiplicative process faults are faults caused by the changes in plant parameters... are used most often for fault detection There is also a growing trend in research in the area of neutral network based method for fault detection The researches on fault detection and diagnosis (FDD) span over many different areas of engineering applications The research areas include small scale laboratory processes like fault detection in induction motor [2] and large scale industrial processes like... model and look at the performance of each indicator in crash detection Then we would describe the EWS model, which we use in detecting stock market crashes Finally, we will apply this EWS model to test the accuracy in predicting large drop in the S&P 500 in the period 1981-2005 and large drop in the STI in the period 1995-2004 In chapter 7, we summarise and conclude the work done on fault detection and. .. episodes in his model in detecting currency crises [31] Zhuang and Dowling (2002) improvised the EWS model by introducing weightings to indicators to show their relative importance in predicting a currency crisis [36] They identified several useful leading indicators for the model, which is able to identify the currency crisis in Asian economy during the financial turmoil These indicators include current... investigated The first application is in an engineering domain, involving detection and diagnosis in an F-16 aircraft The second application is in the financial domain, where stock market crashes are predicted The first part of the thesis focuses on fault detection and isolation in the F-16 aircraft A model-based approach is adopted to check the actuator faults in the system Two simulation models, one... regardless of the input command In LOE fault, the actuator gain is reduced, thus the actuator output is reduced too In this thesis, we will focus on actuator faults Simulations will be done on LIP fault and the simulation results will be discussed Fault analysis consists of two stages: fault detection and fault diagnosis In fault detection, the system is monitored to check if there is any malfunctioning of the... present in the F-16 aircraft Other than the engineering world, “faults” also exist in financial markets In the financial world, the stocks markets are dynamical systems that change with different market conditions “Faults” come in the form of crashes in the stock markets Since history, there were many large crashes in the stock markets These crashes belong to the category of “extreme events” in complex systems. .. outputs of actuators Common actuator faults include lock in- place (LIP) fault, float fault, hard-over fault (HOF) and loss of effectiveness (LOE) fault The LIP fault occurs when the actuator is stuck at a certain value The actuator output no longer reacts to the input command The float fault occurs when the actuator floats at zero regardless of the input command In HOF, the actuator moves to its upper ... within the next 12 months 1.2 Objective In this thesis, two applications of fault detection and forecast are investigated The first application is in an engineering domain, involving detection and. .. cos φ sinψ + sin φ sin θ cosψ ) + w(sin φ sinψ + cos φ sin θ cosψ ) ⋅ p E = u cos θ sinψ + v(cos φ cosψ + sin φ sin θ sinψ ) (2.4) + w(− sin φ cosψ + cos φ sin θ sinψ ) ⋅ h = u sin θ − v sin φ... jeopardising the safety of the pilot and his passengers In recent decades, there has been an increasing interest in fault detection and diagnosis in engineering applications R Isermann and P Balle

Ngày đăng: 06/10/2015, 20:50

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan