Code Monkey home page Code Monkey logo

time-series-prediction-narx's Introduction

Time series prediction using NARX

The project uses a nonlinear autoregressive exogenous (NARX) model to make time-series prediction on data obtained from drive cycling testing on buses. In total 25 data-series, corresponding to three different drive cycles were obtained from the same bus. In each dataset four variables were experimentally quantified: engine torque, engine speed, air temperature intake, and exhaust fume temperature. Exhaust fume temperature served as the output variable, while the remaining 3 were the inputs of the NARX. Five different MATLAB scripts were included in the repository:

Code description

Data pre-processing

Data pre-processing is conducted in DataPreProcessingBus2.m. The data are modified in order to create a single training dataset, containing 22 of the 25 time series. Three datasets, one from each corresponding driving cycle, were not involved in training, instead they were used to evaluate NARX’s generalization ability.

Training

Two different scripts for ANN training are included. TrainANN.m trains a NARX with 10 hidden neurons and an input delay of 2. This network architecture was decided via trial and error. A typical divison of the training data sat in training (70%), validation (15%), and testing (%) subsets was used to prevent overfitting. TrainANNsinLoop.m includes the same training procedure in a loop. A number of models are trained, their performance on the 3 testing datasets is quantified but only the ‘best’ model is saved.

Prediction

Two variation of prediction scripts were included. The first one (Prediction.m)makes a strictly closed-loop prediction of the tree testing datasets, while PredictionOpenClose.m uses executes an open-loop prediction for the initial 1/3 of the test sets and a closed-loop prediction for the remaining data-points.

Results

The optimally trained NARX was able to successfully predict all 3 testing datasets, each one corresponding to a single driving cycle. For the first 1/3 of the prediction an opened loop NARX version was utilised, while for the remaining time series data points a closed-loop one was employed.

alt text

Figure 1: Real and predicted values of exhaust fume temperature for 3 distinct experimental drive cycles.

time-series-prediction-narx's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.