{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Data\n",
    "\n",
    "In the cell below, we obtain a signal of the system $y(k) = 0.1y(k-1) - 0.5u(k-1)y(k-1) + 0.1u(k-2)$. You can change it as you wish, or use your own data collected elsewhere. If you want to use your own data, it is better to use [this software](https://github.com/rnwatanabe/FROLSIdentification) in the Matlab or Octave environment."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGkCAIAAACgjIjwAAAACXBIWXMAABcSAAAXEgFnn9JSAAAA\nB3RJTUUH4AIWDhsP5jURAAAAACJ0RVh0Q3JlYXRpb24gVGltZQAyMi1GZWItMjAxNiAxMToyNzox\nNSnnhUAAAAAkdEVYdFNvZnR3YXJlAE1BVExBQiwgVGhlIE1hdGhXb3JrcywgSW5jLjxY3RgAABO4\nSURBVHic7d3blqLIFgVQOaP+/5c5D3bZtiAictmXOZ+6s8w0CHbEIgBxGMfxBgBX+9/VDQCA200g\nARCEQAIgBIEEQAgCCYAQBBIAIQgkAEIQSACEIJAACEEg5TAMwzAMV7cC4EACiQ9kIZEdV58q/3x/\nrm4Aq3jkIFCeFRIAIQwOvVO4nzp47Kzn/30+q/C8N799zezbvZyyUC3s7l1x3rbWp8rPywopt5dh\nMz3lPT0P/tVpceOQ48wW5171qfIzcg0psWF4XeDeB+HLD9e85iPjk4NMFy4//pF3P1T58VkhJfbL\nUHH7ENeaPWk2Pc920PsSk0AqbhpajvjoQOVnJJAACEEgARCCQAIgBIFU3OyN4Je0BM6k8jMSSE0t\nf4DjzJbQ0+wNde8+rzp9zY/ve8Rf5nc+h1TfdJg9xuT9E+lrxuGamQI2WCi/H+tT5adjhVTcOI7L\nn5Od/u/yC2Avs8W2V32q/Iw8y64sR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BEAIAgmAENI8qeErz4+863wb4fLD\nLLr10ppHmmbpkyztPJoKf5G9yAuukF52ia+PnNWql4ZhePdY3oWfhO2TLO28VrdeqlHk1T6HND1i\navvIu0eprXkMYOFemu2H6Q+z9EmWdp5AhT+UKfKCK6SXzo3T16eZPVZ60a2X1mxvlj7J0s7jqPBZ\nBYq8VCAt1Gi0lemhxr9m/1UvTWXpkyztPJoK3yBFt9S8qQEeoh0Dwu7KFHmpFRKsFO3UOewuY5EL\nJNqJc4ICDpK0yJ2yo5GF+7KghtRFLpBoIfKHAWEXBYpcIFFf6mNGWKNGkZe6hrSwJ1LvpH1166U1\nAzVLn2Rp57Ua9lKZIi8VSHfBn40RRLdeWjPksvRJlnZeq2EvFSjyao8Ous11cb1tXGnhvs8+vbQ8\n5GYftTL7r3FkaecJVPhdmSIvuEIK/myMIPTSVJY+ydLOa+mlWcG7peAKCYCMCq6QAMhIIAEQgkAC\nIASBBEAIAgmAEAQSACEIJABCEEgAhCCQAAhBIAEQgkACIASBBEAIAgmAEAQSACEIpMqGYVj5jZDr\nXwlxqPBiBFJuH4fZyu+78rVYxKTCWxFIZW04HnQISSIqvB6BVNlXR4UOIUlHhRfz5+oGsN3jcO/+\nH8/jbfZI8OWHs+NzGHyrPVGo8G6skBL7alxNB7DTFwSnwruxQqpgdtxODydfXna/XPz8w3EcjWEC\nUuFNWCEVtHLIjeP47pzG3i2CPanwqgRSI8Yhtanw7ARSC4/jxOGva9sD+1LhNQikLl5OXxi0FKPC\nC3BTQy/TEesWWCpR4alZIbXgaJHaVHgNAgmAEKxnc3s+Knw5WTH9TMb016d73ykOQlHhrVgh5bYw\ntD4+RmV2rO7VMNiFCm/FTQ3prT/cc2BIRiq8DyukmjaPTEOaFFR4SQKpsq9OUDibQToqvBiBVNaG\nI0EHjySiwusRSMWtPCp06xFJqfBK7CQAQrBCAiCE/wPBStX4nnO0sAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "x =\n",
       "\n",
       "     4"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "Fs = 100; % Sampling frequency of the data acquisition, in Hz.\n",
    "u = randn(2000, 1);    \n",
    "y = zeros(size(u));\n",
    "t = (1:length(y))/Fs;\n",
    "for k = 5:length(y)\n",
    "   y(k) = 0.1*y(k-1) - 0.5*u(k-1)*y(k-1) + 0.1*u(k-2); \n",
    "end\n",
    "subplot(1,2,1);plot(t, u); title('input'); xlabel('t(s)')\n",
    "subplot(1,2,2);plot(t, y); title('output');  xlabel('t(s)')\n",
    "x=2+2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Prepare the data\n",
    "\n",
    "Here we throw away the first 100 samples to avoid transient effects. This prepare could also involve some kind of normalization."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true,
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [],
   "source": [
    "input = u(100:end);   \n",
    "output = y(100:end);  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Identification Process"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "source": [
    "$\\require{dsfont}$\n",
    "The model structure that we use to identify the nonlinear  system is called as NARMAX and has the following structure:\n",
    "\n",
    "$\n",
    "\\begin{equation}\n",
    "y(k) = F\\left[y(k-1), y(k-2),..., y(k-m_y), u(k-d), ..., u(k-d-m_u), \\xi(k-1), ..., \\xi(k-m_\\xi) \\right]  \n",
    "\\end{equation}\n",
    "$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "source": [
    "where $u$ is the input signal, $y$ is the output signal and $\\xi$ is the residue signal. The format of the NARMAX model used is the polynomial form:\n",
    "\n",
    "$\n",
    "\\begin{equation}\n",
    "  y(k) = \\beta_0 + \\sum\\limits_{i_1=1}^n\\beta_{i_1}x_{i_1}(k) + \\sum\\limits_{i_1=1}^n\\sum\\limits_{i_2=i_1}^n\\beta_{i_1i_2}x_{i_1}(k)x_{i_2}(k)+...+\\sum\\limits_{i_1=1}^n...\\sum\\limits_{i_l=i_{l-1}}^n\\beta_{i_1i_2... i_l}x_{i_1}x_{i_2}... x_{i_l} + \\xi(k)\n",
    "\\end{equation}\n",
    "$\n",
    "with"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "source": [
    "$\n",
    "\\begin{equation}\n",
    "x_m(k) = \\left\\{ \\begin{array}{l l}\n",
    "u(k-m) & 1\\leqslant m \\leqslant m_u\\\\\n",
    "y(k-(m - m_u)) & m_u+1\\leqslant m \\leqslant m_u + m_y\\\\\n",
    "\\xi(k - (m - m_u - m_y)) & m_u+m_y+1 \\leqslant m \\leqslant m_u+m_y+m_\\xi\n",
    "\\end{array}\\right.  \n",
    "\\end{equation}\n",
    "$\n",
    "\n",
    "where $m_u$ is the number of input  past values to be considered in the model search, $m_y$ is the number of output  past values to be considered in the model search, $m_\\xi$ is the number of the residue past values to be considered in the model search and $l$ is the maximal polynomial degree to be considered to form the combinations between the signals $u$, $y$ e $\\xi$."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "source": [
    "Calling each combination $x_{i_1}x_{i_2}... x_{i_l}$ as $p_i$, the Equation above can be rewritten as:\n",
    "\n",
    "$\n",
    "\\begin{equation}\n",
    "  y(k) = \\sum\\limits_{i=1}^M \\beta_ip_i(k) + \\xi(k)\n",
    "\\end{equation}\n",
    "$\n",
    "\n",
    "where $M$ is the number of combinations used in the model search. In matricial form, the equation above is:\n",
    "\n",
    "$\n",
    "\\begin{equation}\n",
    "  Y = PB+\\xi \n",
    "\\end{equation}\n",
    "$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "source": [
    "where:\n",
    "\n",
    "$\n",
    "\\begin{align}\n",
    "  Y&=\\left[y(1),y(2), ..., y(N)\\right]^T\\\\\n",
    "  B &= \\left[\\beta_1, \\beta_2, ..., \\beta_M \\right]^T\\\\\n",
    "  \\xi&=\\left[\\xi(1), \\xi(2), ..., \\xi(N) \\right]^T\\\\\n",
    "  P = \\left[p_1,p_2,..., p_M\\right] &= \\left[\\begin{array}{cccc}\n",
    "  p_1(1)&p_2(1)&...&p_M(1)\\\\\n",
    "  \\vdots&\\vdots&\\ddots&\\vdots\\\\\n",
    "  p_1(k)&p_2(k)&...&p_M(k)\\\\\n",
    "  \\vdots&\\vdots&\\ddots&\\vdots\\\\\n",
    "  p_1(N)&p_2(N)&...&p_M(N)\n",
    "  \\end{array}\\right]  \n",
    "\\end{align}\n",
    "$\n",
    "\n",
    "where $^T$ stand for the matrix or vector transponse."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Parameters of the identification process\n",
    "\n",
    "For the identification of the system described at the beginning of this notebook we use the parameters in the cell bellow. As in this demonstration of the FROLS method we know our system, the used parameters are exactly what we need,  but normally we do not know what parameters to use! Normally, to find these parameters, we need to try some values before finding the right ones. If you use $m_u, m_y$ and $m_\\xi$ values higher than necessary, the algorithm will work but the time of processing will be longer. If you use them lower than necessary, the algorithm will not find the correct model. Try to modify the parameters below to see what happens."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "mu = 2; \n",
    "my = 1; \n",
    "me = max(mu,my); \n",
    "degree = 3; \n",
    "delay = 1; "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "dataLength = 500; % number of samplings to be used during the identification process. Normally a number between 400 and\n",
    "% 600 is good. Do not use large numbers.\n",
    "pho = 1e-2; % a lower value will give you more identified terms. A higher value will give you less.\n",
    "delta = 1e-1; "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Build the P matrix"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "numberOfCandidates = round(findPMatrixSize(mu - delay + 1, my, degree));\n",
    "begin = randi([1 length(input) - dataLength - 1], 1);\n",
    "u = input(begin+1:begin + dataLength);\n",
    "y = output(begin+1:begin + dataLength);\n",
    "[p, D]= buildPMatrix(u, y, degree, mu, my, delay);\n",
    "y = y(max(mu,my) + 1:end);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "The terms that the FROLS algorithm will use to try to find the model are:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Columns 1 through 6\n",
       "\n",
       "    '1'    'u(k-1)'    'u(k-2)'    'y(k-1)'    'u(k-1)u(k-1)'    'u(k-1)u(k-2)'\n",
       "\n",
       "  Columns 7 through 10\n",
       "\n",
       "    'u(k-1)y(k-1)'    'u(k-2)u(k-2)'    'u(k-2)y(k-1)'    'y(k-1)y(k-1)'\n",
       "\n",
       "  Columns 11 through 13\n",
       "\n",
       "    'u(k-1)u(k-1)u(k-1)'    'u(k-1)u(k-1)u(k-2)'    'u(k-1)u(k-1)y(k-1)'\n",
       "\n",
       "  Columns 14 through 16\n",
       "\n",
       "    'u(k-1)u(k-2)u(k-2)'    'u(k-1)u(k-2)y(k-1)'    'u(k-1)y(k-1)y(k-1)'\n",
       "\n",
       "  Columns 17 through 19\n",
       "\n",
       "    'u(k-2)u(k-2)u(k-2)'    'u(k-2)u(k-2)y(k-1)'    'u(k-2)y(k-1)y(k-1)'\n",
       "\n",
       "  Column 20\n",
       "\n",
       "    'y(k-1)y(k-1)y(k-1)'"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "disp(D)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "The first 15 lines of the $P$ matrix are:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Columns 1 through 7\n",
       "\n",
       "    1.0000    0.4590    1.9524    0.0381    0.2107    0.8962    0.0175\n",
       "    1.0000   -0.3993    0.4590    0.1903    0.1595   -0.1833   -0.0760\n",
       "    1.0000   -0.2254   -0.3993    0.1029    0.0508    0.0900   -0.0232\n",
       "    1.0000   -0.2803   -0.2254   -0.0180    0.0786    0.0632    0.0051\n",
       "    1.0000    1.3067   -0.2803   -0.0269    1.7075   -0.3663   -0.0351\n",
       "    1.0000   -0.2844    1.3067   -0.0132    0.0809   -0.3716    0.0037\n",
       "    1.0000   -0.7917   -0.2844    0.1275    0.6268    0.2251   -0.1009\n",
       "    1.0000    0.2406   -0.7917    0.0348    0.0579   -0.1905    0.0084\n",
       "    1.0000   -0.0946    0.2406   -0.0799    0.0090   -0.0228    0.0076\n",
       "    1.0000    0.7932   -0.0946    0.0123    0.6292   -0.0751    0.0098\n",
       "    1.0000    0.9594    0.7932   -0.0131    0.9205    0.7611   -0.0126\n",
       "    1.0000    1.0871    0.9594    0.0843    1.1818    1.0430    0.0916\n",
       "    1.0000    0.6472    1.0871    0.0586    0.4188    0.7035    0.0379\n",
       "    1.0000    0.6326    0.6472    0.0956    0.4001    0.4094    0.0605\n",
       "    1.0000    1.9033    0.6326    0.0440    3.6225    1.2039    0.0838\n",
       "\n",
       "  Columns 8 through 14\n",
       "\n",
       "    3.8118    0.0744    0.0015    0.0967    0.4114    0.0080    1.7497\n",
       "    0.2107    0.0874    0.0362   -0.0637    0.0732    0.0303   -0.0841\n",
       "    0.1595   -0.0411    0.0106   -0.0114   -0.0203    0.0052   -0.0359\n",
       "    0.0508    0.0041    0.0003   -0.0220   -0.0177   -0.0014   -0.0142\n",
       "    0.0786    0.0075    0.0007    2.2313   -0.4786   -0.0459    0.1027\n",
       "    1.7075   -0.0172    0.0002   -0.0230    0.1057   -0.0011   -0.4856\n",
       "    0.0809   -0.0363    0.0163   -0.4962   -0.1782    0.0799   -0.0640\n",
       "    0.6268   -0.0275    0.0012    0.0139   -0.0458    0.0020    0.1508\n",
       "    0.0579   -0.0192    0.0064   -0.0008    0.0022   -0.0007   -0.0055\n",
       "    0.0090   -0.0012    0.0002    0.4991   -0.0596    0.0077    0.0071\n",
       "    0.6292   -0.0104    0.0002    0.8832    0.7302   -0.0121    0.6037\n",
       "    0.9205    0.0809    0.0071    1.2847    1.1339    0.0996    1.0007\n",
       "    1.1818    0.0637    0.0034    0.2711    0.4553    0.0245    0.7648\n",
       "    0.4188    0.0619    0.0091    0.2531    0.2589    0.0383    0.2649\n",
       "    0.4001    0.0279    0.0019    6.8945    2.2914    0.1595    0.7615\n",
       "\n",
       "  Columns 15 through 20\n",
       "\n",
       "    0.0341    0.0007    7.4420    0.1452    0.0028    0.0001\n",
       "   -0.0349   -0.0145    0.0967    0.0401    0.0166    0.0069\n",
       "    0.0093   -0.0024   -0.0637    0.0164   -0.0042    0.0011\n",
       "   -0.0011   -0.0001   -0.0114   -0.0009   -0.0001   -0.0000\n",
       "    0.0098    0.0009   -0.0220   -0.0021   -0.0002   -0.0000\n",
       "    0.0049   -0.0000    2.2313   -0.0225    0.0002   -0.0000\n",
       "    0.0287   -0.0129   -0.0230    0.0103   -0.0046    0.0021\n",
       "   -0.0066    0.0003   -0.4962    0.0218   -0.0010    0.0000\n",
       "    0.0018   -0.0006    0.0139   -0.0046    0.0015   -0.0005\n",
       "   -0.0009    0.0001   -0.0008    0.0001   -0.0000    0.0000\n",
       "   -0.0100    0.0002    0.4991   -0.0082    0.0001   -0.0000\n",
       "    0.0879    0.0077    0.8832    0.0776    0.0068    0.0006\n",
       "    0.0412    0.0022    1.2847    0.0692    0.0037    0.0002\n",
       "    0.0391    0.0058    0.2711    0.0400    0.0059    0.0009\n",
       "    0.0530    0.0037    0.2531    0.0176    0.0012    0.0001"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "disp(p(1:15,:))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The system identification"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "global l q g err A ESR M0;\n",
    "s = 1;\n",
    "ESR = 1;\n",
    "M = size(p, 3);\n",
    "l = zeros(1, M);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### The function that implements the FROLS algorithm is written below, with brief explanations about some parts inserted in the code. Actually this function can handle more than one data collection of the same system (that is the reason of the m in mfrols), but in this notebook we will not use multiple trials. Just ignore the outside loop and the variable j.\n",
    "\n",
    "function beta = mfrols(p, y, pho, s)\n",
    "    \n",
    "$\\text{The global variables are used due to the lack of pointers in Matlab/Octave}$\n",
    "\n",
    "    global l;\n",
    "    global err ESR;\n",
    "    global A;\n",
    "    global q g M0;\n",
    "    beta = [];\n",
    "    M = size(p,2);\n",
    "    L = size(p,3);\n",
    "    gs=zeros(L,M);\n",
    "    ERR=zeros(L,M);\n",
    "    qs=zeros(size(p));\n",
    "    \n",
    "    for j=1:L\n",
    "        sigma = y(:,j)'*y(:,j);\n",
    "        \n",
    "        for m=1:M\n",
    "            if (max(m*ones(size(l))==l)==0)\n",
    "            "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$\\text{The Gram-Schmidt method was implemented in a modified way, as shown in Rice, JR(1966)}$\n",
    "\n",
    "$\\text{For each } m, \\text{ we compute: } \\\\\n",
    "qs_m = p_m - \\sum\\limits_{r=1}^{s-1}\\frac{q_r^Tqs_m}{q_r^Tq_r}q_r$\n",
    "                 \n",
    "                 qs(:,m,j) = p(:,m,j);\n",
    "                 for r=1:s-1\n",
    "                     qs(:,m,j) = qs(:,m,j) - (squeeze(q(:,r,j))'*qs(:,m,j))/...\n",
    "                         (squeeze(q(:,r,j))'*squeeze(q(:,r,j)))*squeeze(q(:,r,j));\n",
    "                 end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " \n",
    "$\\text{We compute for each candidate that was not chosen:}$\n",
    "\n",
    "$gs_m = \\frac{y^Tqs_m}{qs_m^Tqs_m}\\\\\n",
    "\\text{ERR}_m = gs_m^2\\frac{qs_m^Tqs}{y^Ty}$\n",
    "\n",
    "                gs(j,m) = (y(:,j)'*squeeze(qs(:,m,j)))/(squeeze(qs(:,m,j))'*squeeze(qs(:,m,j)));\n",
    "                ERR(j,m) = (gs(j,m)^2)*(squeeze(qs(:,m,j))'*squeeze(qs(:,m,j)))/sigma;\n",
    "            else\n",
    "                ERR(j,m)=0;\n",
    "            end\n",
    "        end \n",
    "    end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "    \n",
    "$\\text{And here we chose to be part of the model the candidate term with the highest ERR.}$\n",
    "\n",
    "    ERR_m = mean(ERR, 1);\n",
    "    l(s) = find(ERR_m == max(ERR_m), 1);\n",
    "    err(s) = ERR_m(l(s));\n",
    "    for j=1:L"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$\\text{After the model term has been chosen we compute the values of the matrix } A$\n",
    "\n",
    "\n",
    "$a_{r,s} = \\frac{q_r^Tp_{\\text{chosen term}}}{q_r^Tq_r}, 1 \\leqslant r \\leqslant s - 1\\\\\n",
    "a_{s,s} = 1$\n",
    "\n",
    "        for r = 1:s-1\n",
    "            A(r, s, j) = (q(:,r,j)'*p(:,l(s),j))/(q(:,r,j)'*q(:,r,j));    \n",
    "        end\n",
    "        A(s, s, j) = 1;\n",
    "        q(:, s,j) = qs(:,l(s),j);\n",
    "        g(j,s) = gs(j,l(s));\n",
    "    end    \n",
    "\n",
    "    \n",
    "$\\text{After this process the matrix } A \\text{ will have the format: }\\\\\n",
    "A=\\left[\\begin{array}{cccc}\n",
    "  1&a_{12}&...&a_{1s}\\\\\n",
    "  0&1&...&a_{2s}\\\\\n",
    "  \\vdots&\\vdots&\\ddots&\\vdots\\\\\n",
    "  0&...&1&a_{s-1,s}\\\\\n",
    "  0&0&...&1  \\end{array} \\right]$\n",
    "\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "  ESR = ESR - err(s);  \n",
    "  \n",
    "$\\text{The stop criterium is based on the ERR value of the chosen term. If it is lower than } \\rho,\\text{ the process of search for terms stops.}$\n",
    "    \n",
    "    if (err(s) >= pho && s < M)\n",
    "       s = s + 1; \n",
    "       clear qs \n",
    "       clear gs\n",
    "       \n",
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "      \n",
    "$\\text{Here is the recurrent call of the frols algorithm.}$\n",
    "\n",
    "       beta = mfrols(p, y, pho, s);\n",
    "    else\n",
    "       M0 = s;\n",
    "       s = s + 1;\n",
    "       for j=1:L\n",
    "\n",
    "$\\text{ At the end, we compute the coefficients } \\beta \\text{ of each term by doing:}\\\\\n",
    "B = A^{-1}g$\n",
    "\n",
    "            beta(:,j) = A(:,:,j)\\g(j,:)';\n",
    "       end       \n",
    "    end   \n",
    "end"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "q = []; err=[]; A=[]; g=[]; \n",
    "beta = mfrols(p, y, pho, s);\n",
    "la = l(1:M0)';\n",
    "Da = D(la)';"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "[Dn, an, ln] = NARXNoiseModelIdentification(input, output,  degree, mu, my, me, delay, dataLength, 1, pho,  ...\n",
    "        beta, la);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "[a, an, xi] = NARMAXCompleteIdentification(input, output, Da, Dn, dataLength, ...\n",
    "        1,  delta, degree, degree);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Identified Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'u(k-2)'    '0.1'\n",
       "\n",
       "    'u(k-1)y(k-1)'    '-0.5'\n",
       "\n",
       "    'y(k-1)'    '0.1'"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "for i = 1:length(Da)\n",
    "    disp({Da{i}, num2str(a(i))}) \n",
    "end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "Note that the found terms should be the same of the system difference equation on the top of this notebook."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Generalized Frequency Response Function (GFRF)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "If your identified system has terms with inputs and outputs, the GFRF will be non-null for \n",
    "degrees higher than the maximal polynomial degree. In this case, a good number\n",
    "is to add one to your maximal polynomial degree. If you have only\n",
    "inputs or outputs terms, the GFRFdegree will be the maximal\n",
    "polynomial degree."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "GFRFdegree = 3;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "Hn = computeSignalsGFRF(Da, Fs, a, GFRFdegree);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GFRF of order 1: \n",
       "\n",
       "            /   pi f1 i \\\n",
       "         exp| - ------- |\n",
       "            \\     25    /\n",
       "  - ---------------------------\n",
       "       /    /   pi f1 i \\     \\\n",
       "       | exp| - ------- |     |\n",
       "       |    \\     50    /     |\n",
       "    10 | ---------------- - 1 |\n",
       "       \\        10            /\n",
       "GFRF of order 2: \n",
       "\n",
       "             /   pi f1 i \\    /   pi f1 i \\    /   pi f2 i \\\n",
       "          exp| - ------- | exp| - ------- | exp| - ------- |\n",
       "             \\     25    /    \\     50    /    \\     50    /\n",
       "  - --------------------------------------------------------------\n",
       "       /    /   pi f1 i \\     \\ /    /   pi f1 i   pi f2 i \\     \\\n",
       "       | exp| - ------- |     | | exp| - ------- - ------- |     |\n",
       "       |    \\     50    /     | |    \\     50        50    /     |\n",
       "    20 | ---------------- - 1 | | -------------------------- - 1 |\n",
       "       \\        10            / \\             10                 /\n",
       "GFRF of order 3: \n",
       "\n",
       "    /    /   pi f1 i \\                      /   pi f3 i \\                \\\n",
       "  - | exp| - ------- | exp(-#2) exp(-#1) exp| - ------- | exp(- #2 - #1) | /\n",
       "    \\    \\     25    /                      \\     50    /                /\n",
       "  \n",
       "     /\n",
       "     |\n",
       "     |    / exp(-#2)     \\ / exp(- #2 - #1)     \\\n",
       "     | 40 | -------- - 1 | | -------------- - 1 |\n",
       "     \\    \\    10        / \\       10           /\n",
       "  \n",
       "     /    /             pi f3 i \\     \\ \\\n",
       "     | exp| - #2 - #1 - ------- |     | |\n",
       "     |    \\               50    /     | |\n",
       "     | -------------------------- - 1 | |\n",
       "     \\             10                 / /\n",
       "  \n",
       "  where\n",
       "  \n",
       "           pi f2 i\n",
       "     #1 == -------\n",
       "             50\n",
       "  \n",
       "           pi f1 i\n",
       "     #2 == -------\n",
       "             50"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "for j = 1:GFRFdegree\n",
    "        disp(['GFRF of order ' num2str(j) ': '])\n",
    "        pretty(Hn{j})\n",
    "end"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Undefined variable Hn.\n"
     ]
    }
   ],
   "source": [
    "Hfun = matlabFunction((abs(Hn{1})));\n",
    "freq = [linspace(-50, 0, 50) linspace(0, 50, 50)];\n",
    "plot(freq, Hfun(freq))\n",
    "xlabel('f (Hz)'); ylabel('H_1')\n",
    "x = 2+2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGkCAIAAACgjIjwAAAACXBIWXMAABcSAAAXEgFnn9JSAAAA\nB3RJTUUH4AETFRooOilTWQAAACJ0RVh0Q3JlYXRpb24gVGltZQAxOS1KYW4tMjAxNiAxOToyNjo0\nMK4r91wAAAAkdEVYdFNvZnR3YXJlAE1BVExBQiwgVGhlIE1hdGhXb3JrcywgSW5jLjxY3RgAACAA\nSURBVHic7Z3tUeQ800ZbT70BLBksGSwZLBncZAAZLBFsEQFkABlABksGkAFkABno/dF2jyx1t+T5\n9Md1amtrxiN7zIzHx91qySHGSAAAAMCp+d+pdwAAAAAggpAAAABMBAgJAADAJICQAAAATAIICQAA\nwCSAkAAAAEwCCAkAAMAkgJAAAABMAggJAADAJICQAAAATAIICQAAwCSAkAAAAEwCCAkAAMAkgJAA\nAABMAggJAADAJICQAAAATAIICQAAwCSAkAAAAEwC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Uv8ucFAQIc2VtdmIyWKLE+5JxoxiuCOD8h/QDoQ0S9ZmI/Uv5fPIpE7lav/QdHZvXqD8Z4VASGBa\nZOea2Z0jJhvDrRx8F7MAQjo2u+cH1OyQbLy6BByCucRwywDlP0sFQtoPY0eWHOEkNdNLwumfMuYe\nw60Q5E7nAoQ0GrWnNEvUjD30/fYrqctyaDmhOKHnCj8xIMBGMwJCOgFHq+pZ9o9QPdGUFwd7f99l\nf6oLAzaaFxDSHtguPDpo1m6m+ToL6Ywpl1ebHXPeIMRwAOwCBsbuk3bHHOEEtLBzXGO9xqTSm1YM\n5zwFwu7fXVr+k3GItwO7gwhpb2wR8RwoSFpqWdd0ZK++6cRjuEkxkUSCvMVBtw/aWeaZ6/gs1QFg\nFI2mWdVs3xnytzcWoza23H2X1vZFTBOcRvcAbATAKKYWIeH3OxHQhwQAmDQHTakhXzcp0Ie0H9Ar\nAMAhOMIYCfxapwOEtAdwQANwUFD+sxIgJADApDmcM2CjqYE+JAAAAJMAQgIAADAJICQAAACTAH16\nAAAAJgEiJAAAAJMAQgIAADAJICQAAACTAEICAAAwCSAkAAAAk+D/Ac100ENaNnWXAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Hfun = matlabFunction((abs(Hn{2})));\n",
    "freq1 = [linspace(-50, 0, 20) linspace(0, 50, 20)];\n",
    "freq2 = [linspace(-50, 0, 20) linspace(0, 50, 20)];\n",
    "[F1,F2] = meshgrid(freq1,freq2);\n",
    "surf(F1, F2, Hfun(F1,F2));\n",
    "xlabel('f_1 (Hz)'); ylabel('f_2 (Hz)');"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Nonlinear Output Frequency Response Function (NOFRF)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "The frequency response of the output signal $y$ of a system to a given input $u$ is:\n",
    "\n",
    "$Y(j\\omega) = \\sum\\limits_{n=1}^N Y_n(j\\omega)$\n",
    "\n",
    "where:\n",
    "\n",
    "$Y_n(j\\omega)=\\frac{1/\\sqrt{n}}{(2\\pi)^{n-1}}\\int\\limits_{\\omega=\\omega_1+...+\\omega_n}H_n(j\\omega,...,j\\omega_n)\\prod\\limits_{i=1}^nU(j\\omega_i)d\\sigma_{\\omega n}$ "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As an example of the use of NOFRF, below the expressions above will be used to predict what will be the output of the system to the input signal $u(t) = cos(2\\pi 8t)$. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "t = 0:1/Fs:10000/Fs-1/Fs;\n",
    "u = cos(2*pi*8*t);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First, we compute the FFT of $u(t)$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGkCAIAAACgjIjwAAAACXBIWXMAABcSAAAXEgFnn9JSAAAA\nB3RJTUUH4AETFRsNaDa2XwAAACJ0RVh0Q3JlYXRpb24gVGltZQAxOS1KYW4tMjAxNiAxOToyNzox\nM/LpNcYAAAAkdEVYdFNvZnR3YXJlAE1BVExBQiwgVGhlIE1hdGhXb3JrcywgSW5jLjxY3RgAAA0g\nSURBVHic7d3Rcqs2GIVRq5P3f2V6wRwPAwQEtuMtaa2LzjlxaA1N8uUHGZdpmh4A8G3/ffsJAMDj\nIUgAhBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiAB\nEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACL8fPsJrJVSnn+epunS\n5y/VbAtAjqwJaVWX32IDQH+CJqQ5P8vJppRSSqmZdcxDAK3LmpBWXanMjBoBdCBlQjo4O3cwJD23\nqr/y5DQgMLLk3+BTgvSK3StPBwc9+f/Hp1WeAu3V4Lv/GP4IDL77j/jfyHsI0mNz5emLzwSAe7Ku\nIV01/bP64GOMLA2wi8BA2g4SAN0QpLEMfgJ98N1/DH8EBt/9fIIEQISUIN1bFDe/cvYzzwiAP5US\npNlbbh10uuwbgEBBy76nadpOPKuurGKzu8l2KwDyZU1IN24dtP0cNQJoUdCENDvOye6jCgTQgawJ\nCYBhCRIAEQQJgAiCBEAEQQIggiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACI\nIEgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiAB\nEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACIIEgARBAmACIIEQARB\nAiCCIAEQQZAAiPDz7SewVkp5/nmapnub39gQgO/KmpCWNdr+9ermADQkaELaDjellFKKcQdgBFkT\n0qo9l1JkPAJoWsqEdJCTmiHpOV3VZOnFy1QArWjrN/WUIL3i6kIGEQIGsfpxF96nrFN2N1hWB9CH\n5oMEQB/aDpLxCKAb/VxD2n5EqAAa0vaEBEA3UiakgxXbB4PO9iGzEUCjsiakF28dBEC7Uiakx78h\naRWh3UX0BiCA/mRNSK/cOgiApgVNSLPjCJ0mSsMAGpU1IQEwLEECIIIgARBBkACIIEgARBAkACII\nEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiABEEGQAIggSABE\nECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAA\niCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiABEEGQAIggSABEECQAIggSABEECYAIP99+AmullOef\np2m6sdWlDQEIkTUhrbqy+utvm2w/rW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CBEAEQQIggiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACI\nIEgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiAB\nEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACIIEgARBAmACIIEQARB\nAiDCz7efwFop5fnnaZpubHt1KwASZE1Iyxpt/wpAx4ImpO18U0oppVROPOoF0LSsCWnVnvoUqRFA\n61ImpIOinA5Jz0crs/TKZSqAhrT1y3pKkP6SCAGDWP24C+9T1ik7AIYlSABEECQAIggSABEECYAI\nKUE6WPlmURzACFKCNHPrIIBhBb0OaZqm7T0XdhfRm5kA+pM1Id27dRAAHQiakGaVdwm68SgAybIm\nJACGJUgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIg\ngiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACIIEgARBAmACIIE\nQARBAiCCIAEQQZDaNk2PUr79JADeQZAAiCBITSrlMU3ffhIAbyVIAEQQJAAiCBIAEQQJgAiCBEAE\nQQIggiABEEGQ2uNFSECXBAmACIIEQARBasz2fJ37qwJ9ECQAIghSS35bzjAPSTVzUhl7mBp89x/D\nH4HBdz/fz7efwHssv86mHpegzft3sGfzQ6efBhCrhyCtfusppfTRpOVuVe6QLAHtaj5Ic42WBSql\nZDbp6tmC23uwzNL2QS9jAjI1H6TH5hzdNE3HZ4q/dRr5jzOw+5+bUz3wifSR9302+BEYfPfTtR2k\ng/AcDknf+ZIM+U5wXRfI1HaQbgg8lQfAw7JvAEIIEgARBAmACIIEQARBAiBC20E6WDJnNR1AW9oO\n0mx766BvPRMAbku8xc5V2wJ1sFMAo+lhQtreOuhbzwSA23qYkADoQA8TEgAdECQAIggSABEECYAI\nggRAhIHeD2n5cqVB1hZu3999++isswOyemna7t51vPsPR+Cfg2+BXnf/tzsDbPcx8AiMMiG5m8NK\nrweklLLdl9OPdLP7D0dg4fgdpSs/s1eZR2CI1yFtf0s6Hh368PwK++03o/4OyO4ubz/Y6+7Pftu7\nxzBH4Om3b4G+d79mX2KPwCgT0lB3c9j9HXml4wNSs2u97v7uj5WhjsDT8bdA37tfszuZR6D/INWP\n7d2Y/tl9dMADsjT47j/GOAKVl47qH2rFcxfKwm+fc7D5twy0qIHuhfyW90UHP4LHOTij7e/W7vWh\nJg6IING5hr4b3ytwDdUfGPZ/98ruRcR8/Z+yY2QNfSt+lOMwiN3T9fNfm/gaMCHRp4NFhoNYrakr\npf8ltcaj1gkSvRnzVNWBaZqa+O34XX67jO+LIZ8g0ZXBByM/eWla/9eQDr45x/y+7fiA1NSo492v\n1PERmDaWH3/++WDzv3iWn3TjNYiVD/2N/oM0y7xPxhd1fEBqvqk63v1H3d71fQRODbX7u3Nz5hHo\n/zrnbHu4R9jxSy8P7OCA1L84v8vdn1XeW7PjI7D027dAx7u/+wXQyhEYZULKvE/GFw1+QDre/d2b\ndJx+pKcjUKPj3a/5v7/9YMgRGGVCAiDcKBMSAOEECYAIggRABEECIIIgARBBkACIIEgARBAkACII\nEgARBAmACIIEQARBAiCCIAEQQZAAiPDz7ScAbTh4f/Tlu8AdvCni6aOvfz40zYQE507f4PlDzZAi\nhiJIUGv3zVhPW/W6P/hPQAJBgld9dI4xJDEO15DgxHNA2V7ReXF2Odh81aFSijLRPRMSnFAC+Bsm\nJKi1W6ZXcnW8YG/5aS4jMQJBgpsOInGvH6dLxs1q9M0pO4hgBgITErzf8Qtjb2wIIzAhwfe5IwM8\nBAm+To1gJkjwTWoET4IEQASLGuCm118etLoHxOpffvoR6IwJCV7i5qrwLiYkOFc/nRx/5vYWDPef\nE3THhAT3/VlRpIsRCBK86qOn1JyvYxyCBC/5g9nFeMQgBAne4ENzjBuqMhRf7gBEMCEBEOF/Z+Cd\nzvGmi8wAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fres = 0.1; % the frequency resolution of the NOFRF\n",
    "fmin = 0; % lower frequency limit of the NOFRF\n",
    "fmax = 50; % upper frequency limit of the NOFRF\n",
    "\n",
    "\n",
    "U = computeSignalFFT(u', Fs, fres); f_u = -Fs/2:fres:Fs/2;\n",
    "plot(f_u, abs(U));xlim([0 50]); xlabel('f(Hz)');ylabel('|U(f)|')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGkCAIAAACgjIjwAAAACXBIWXMAABcSAAAXEgFnn9JSAAAA\nB3RJTUUH4AETFSog67TtmAAAACJ0RVh0Q3JlYXRpb24gVGltZQAxOS1KYW4tMjAxNiAxOTo0Mjoz\nMg9GYkAAAAAkdEVYdFNvZnR3YXJlAE1BVExBQiwgVGhlIE1hdGhXb3JrcywgSW5jLjxY3RgAAA0e\nSURBVHic7d3RcuK4AkVRdCv//8u6D9RQtG2MIHZ8JK31MNUNMWO5EzbCwim11hsAXO1/V+8AANxu\nggRACEECIIIgARBBkACIIEgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIA\nEQQJgAiCBEAEQQIggiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIMLPSY9bSnn8udb6xbav\ntnp+5C8eHIBMp8yQFs1Y/PU3D7t+qKMeHIBrlcNnGOv5zf6MZ3Pz9ddv3v7qiwHozikzpEUe2lP0\ndrrz3SMDkO/gc0g7RSnlzWzsce+Bb/Ed8jgAw0h+HX/WoobDfXcQN7d6m8axGb7hX70Xl5l8+Lf4\nl+l9L/v+6OwUAMk6DlJ46gH4SDdv2T2zuA5gPJ0F6Teft/39hmMw/Kt34UqGf/UusKenIJkYAQzs\n4HNIO6n4ZUXUCGBsPV066KZGAOM6/i27Wuv6mgub1wH6oi6v2iZUAL0LunQQADM7a1FD41WC2u9V\nNYCxdfzBWABGIkgARBCkvrl8EjAMQQIggiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIg\nARBBkACIIEgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAE\nQQIggiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACIIEgARfi78\nf5dSHn+utX6x7adbARDrshnSc43WfwVgNtfMkNbzm1JKKaVxxqNeAOO5bIa0aE97itQIYEgXzJB2\nivJ2kvS4tzFLvzlNBdC7vl7BX7mo4Q+IEDCzxXNgeJ8s+wYggiABEEGQAIggSABEECQAIlwQpJ2V\nbxbFAUzLpYMAiHDN55BqretrLmyulzdnAphEZ5cOAmBUV16pofEqQV/cC0B3rLIDIIIgARBBkACI\nIEgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiAB\nEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACIIEgARBAmACIIEQARB\nAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBECEn5Met5Ty+HOt9aitnr/g0wcHINkpM6RFNtYV\n+W6rzcdpfHAAwh0/Q7oX4nniUkoppexPZd5u9QjP4mvu/zVPAujdKTOkRR4aa9Gy1XePDEC+g2dI\nO2+g7cxjvtvq0/1RL2A2fZ3UOGtRw+Fqreu3/tZv9K23+oudA4i0eA4M71M3Qbo9NWlx41X7A8CB\nevocklV2AAPrZoa0+e6cVXYAw+hjhvTqXJEOAQyjjyABMLyDg/TdgjfL5ADo49JB9yw1XkwIgB4d\nv6ihZXH2+pxQ45LuzQKZRQEMoJtLB9VaNxc1qBHAGM5a9r3fiVf3vq2L/ACMyio7ACIIEgARBAmA\nCIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiABEEGQAIggSABEECQAIggS\nABEECYAIggRABEECIIIgARBBk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FEJEgARBAmACIIEQARBAiDCyL8Pae35Y0yTLC/c+QWG\nt6EPyOIja29/haPhn75PV2j8BZ4jDf/V5QJe/XbTV/deYqIZkqs8LIx6QEop67G8vcXwz92tK+wM\naobh78s8ArN8Dmn9Qml/6jCGxzdZy69+H+OAbA55feOow7+9HtptjuE/e/X9P/bwW8YSewQmmiFN\ndZWHzZfJCwMfkJahDTn8zaeVeYb/bP/7f+zhtwwn8whMEaT2mfsw6n82753wgDwz/C/u6kvjqaP2\nu3rxGEJ58uprdja/ylyLGhheyAu9q+w8Bc9zZGYb79rm+aEuDoggMb6OfiAPFLiG6g/M+W+9tnkS\nMd8Ub9kxs45+Gs/jIExi8736+1+7+B4wQ2JYO4sMZ7BYU1fK+EtqTY96J0gMaM53q16ptXbx6vgo\nr07j+07IJ0iMZuaJkWdeujbFOaSdn885f3QHPiAtNRp4+C0GHn5deb798eedzf9iL8/0xQcQG+/6\nG1ME6S7zUhkXGviAtPxcDTz8lqENPPwWUw1/c96ceQTGP8/5sD7iM4z9o08IDnBA2j+fP+Twb83X\n1hx1+Auvvv8HHv7mN0AvR2CiGVLmpTIuNPkBGXX4m1foeHvLMMNvNPDwW/711zeGHIGJZkgAJJto\nhgRAMkECIIIgARBBkACIIEgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAET4P01tEaqF\nUDd+AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "% Initialize variables for the NOFRF computation\n",
    "fv = -Fs/2:fres:Fs/2;\n",
    "f_out = fmin:fres:fmax;\n",
    "f_inputMin = 4;\n",
    "f_inputMax = 12;\n",
    "NOFRF = zeros(size(f_out));\n",
    "% NOFRF computing\n",
    "for i = 1:3\n",
    "       if  logical(Hn{i} ~= 0)\n",
    "           HnFunction = matlabFunction(Hn{i});\n",
    "           for j = 1:length(f_out)\n",
    "               if i == 1\n",
    "                   validFrequencyIndices = abs(fv-f_out(j))<=1e-3 & f_out(j)>=f_inputMin(1) & f_out(j) <= f_inputMax(1);\n",
    "                   if ~isempty(U(validFrequencyIndices))\n",
    "                        NOFRF(j) = 2 * HnFunction(f_out(j)) * U(validFrequencyIndices);\n",
    "                   end\n",
    "               else\n",
    "                   NOFRF(j) = NOFRF(j) +  2 * computeDegreeNOFRF(HnFunction, U, Fs, i, f_out(j), fres, f_inputMin, f_inputMax);\n",
    "               end\n",
    "           end \n",
    "       end\n",
    "end \n",
    "plot(f_out, abs(NOFRF));xlim([-1 50])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGkCAIAAACgjIjwAAAACXBIWXMAABcSAAAXEgFnn9JSAAAA\nB3RJTUUH4AETFSorfGY0EAAAACJ0RVh0Q3JlYXRpb24gVGltZQAxOS1KYW4tMjAxNiAxOTo0Mjo0\nMzcAxBEAAAAkdEVYdFNvZnR3YXJlAE1BVExBQiwgVGhlIE1hdGhXb3JrcywgSW5jLjxY3RgAAAz3\nSURBVHic7d3rburIFoVRqpX3f2X3D7QRso1vYHtW1Rg6OkqHkE2RhI9lG1OGYXgAwN3+u/sGAMDj\nIUgAhBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiAB\nEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACL83X0DjiilvD4ehuHA\ntXZdEYALlOoel0ddeWxIy/QqG68IwGUqC9IzLe+3efqZ2avMXmv5igBcqb59SKOEbCzKsWsBcJma\n9iF92vL2vOiHjVn4hwCqlvx0vKYgHXPs3p+91m+zVwVL7kSHq+5wyY/4Z9v1bbL7idU9TwBcrMcg\nhT9HAOhT+5vs3jm4DiBWL0E69lrakQ4zZsmd6HDVHS45XxdBMhgB5KtpH9JCTva+MBaANDUF6Wl0\nSMLGIxTUCCBcZZvshmEopSyfJnX2kG6nswMIV9+E5CRAAE2qbEJ6Wo6QYgHUqL4JCYAmCRIAEQQJ\ngAiCBEAEQQIggiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACII\nEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiABEEGQAIggSABE\nECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAA\niCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIg\nARBBkACI8Hf3DRgrpbw+HobhwHWn13r/nu/2fn8AzpM1IY3K8SkkALQnaEKazjellFLKxjlmtV7m\nIYBkWRPSqBnbU6RGALVLmZAWirI6JL0unf0mr0/u2jv1za4sgBB17fhICdLZZvdOLZRGhIAGjB7K\nwvvUS5Aek71TN94SAKay9iGdYfhn9MmHLAEkaT9IAFRBkACIIEgAREgJ0nkHvG15lRIAt0sJ0tNl\npw5aPewbgIsFHfY9DMN0mpk9iH5XSGa/7d5vAsDZsiakY6cO2vttf/idAfiVoAnpaeNZgvZeqkAA\n4bImJAC6JUgARBAkACIIEgARBAmACIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAE\nQQIggiABEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACIIEgARBAkACIIEgARBAmA\nCIIEQARBAiCCIAEQQZAAiCBIAEQQJAAiCBIAEQQJgAiCBEAEQQIggiABEEGQAIggSABEECQAIggS\nABEECYAIggRABEHqSyl33wKADwQJgAiCBEAEQQIgwt/Gryvf7XwYhuGbqwPQPBMSABG2TkhGHABO\nZUICIIIgARBh6ya7WbNHOti4B8ABR4K0fMTd61JlAmC7fUF6T9FCb55f9vx/WQJgi92vQ9oSmNfX\nlFJKKZoEwKodE9KBrjyvokkArNp6lN03RVEjAFY57BuACFuD9Nw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Ls5vfn\nf1bxszYh0a+FAwsbNjqmrpQ2D7XteTyqlyDRo342Wy0YhqGKZ83f+LRLv9sfejhBojsdDkYehamC\nfUhLFv6A+/nbbuxO2FKjxpa8UWOrHibeP//6eOHqV9zKXzvwmsKNF11DkNZlnmPjYo3dCVv+8Bpb\n8mPbitpb9armlzw7H2euus39mb81/VG1eqfteglhpXfC9hftN7Pkp43n3Gxs1e8+/Xo3tuTZH3Qt\nqzYhrcs8x8bFOrwTGlvy7Mk4Vj9T+6q3aGzJW37K00+GrNqEBEAEExIAEQQJgAiCBEAEQQIggiAB\nEEGQAIggSABEECQAIggSABEECYAIggRABEECIIIgARBBkACI8Hf3DYBaLbwb+vt7wS287eHqpd9/\nPVTEhARHrL7l80nNkCIaJkhw3OzbsK626nsX/BNwPUGC3zt1jjEk0Sr7kGC314Ay3aPz5eyycPVR\nh0opykRjTEiwmxLAGUxIcNxsmb7J1fIBe+9fZjcS7REk+JmFSBzrx+oh42Y1WmKTHYQyA9EbExJc\nYfmFsQeuCO0xIUEiZ2SgQ4IEcdSIPgkSZFEjuiVIAERwUAP8zPcvDxqdA2L0zVc/A1UzIcGPObkq\nHGNCgiO2TyfLXzk9BcPx2wSVMyHBL11WFOmiPYIEv3fqJjXb62iVIMGPXTC7GI9okiDBKU6aY5xQ\nlYb55QYgggkJgAj/A758paCvz/fGAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "y = zeros(size(u));\n",
    "t = (1:length(y))/Fs;\n",
    "\n",
    "for k = 5:length(y)\n",
    "   y(k) = 0.1*y(k-1) - 0.5*u(k-1)*y(k-1) + 0.1*u(k-2); \n",
    "end\n",
    "Y = computeSignalFFT(y', Fs, fres); f_y = -Fs/2:fres:Fs/2;\n",
    "plot(f_y, 2*abs(Y));xlim([-1 50]); xlabel('f(Hz)');ylabel('|Y(f)|')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "Slideshow",
  "kernelspec": {
   "display_name": "Matlab",
   "language": "matlab",
   "name": "matlab_kernel"
  },
  "language_info": {
   "codemirror_mode": "Octave",
   "file_extension": ".m",
   "help_links": [
    {
     "text": "MetaKernel Magics",
     "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
    }
   ],
   "mimetype": "text/x-matlab",
   "name": "octave"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}