view m-toolbox/html_help/help/ug/franklin_ng_content.html @ 22:b11e88004fca database-connection-manager

Update collection.fromRepository
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

The following sections gives an introduction to the <a href="noisegen.html">generation of model noise</a> using the noise generator implemented in LTPDA.
<ul>
  <li><a href="#franklin">Franklin's noise generator</a></li>
  <li><a href="#description">Description</a></li>
  <li><a href="#inputs">Inputs</a></li>
  <li><a href="#outputs">Outputs</a></li>
  <li><a href="#usage">Usage</a></li>
</ul>
<h2><a name="franklin">Franklin's noise generator</a></h2>
Franklin's noise generator is a method to generate arbitrarily long time series with a prescribed spectral density.
The algorithm is based on the following paper:
</p> 
<p>Franklin, Joel N.:
  <i> Numerical simulation of stationary and non-stationary gaussian
  random processes </i>, SIAM review, Volume {<b> 7</b>}, Issue 1, page 68--80, 1965.
</p>
<p>
  The Document <i> Generation of Random time series with prescribed spectra </i> by Gerhard Heinzel (S2-AEI-TN-3034) <br> corrects a mistake in the aforesaid paper and describes the practical implementation.
</p>
<p>
  See <a href="noisegen.html">Generating model noise</a> for more general information on this.
</p>
<p>
  Franklin's method does not require any 'warm up' period. It starts with a transfer function given as ratio of two polynomials.<br/> 
  The generator operates on a real state vector y of length n which is
  maintained between invocations. It produces samples of the time series in equidistant steps <tt>T = 1/fs</tt>, where <tt>fs</tt> is the sampling frequency.
</p>
<p>
  <ul>
    <li> y0 = Tinit * r, on initialization 
    <li> yi = E * yi-1 + Tprop * r, to propagate
    <li> xi = a * yi , the sampled time series. 
  </ul>
  r is a vector of independent normal Gaussian random numbers 
  Tinit, E, Tprop which are real matrices and a which is a real vector are determined once by the algorithm.
</p>

<h2><a name="description">Description</a></h2>
<p>
  When an analysis object is constructed from a pole zero model Franklin's noise generator is called (compare <a href="ao_create.html#pzmodel">Creating AOs from pole zero models</a>).
</p>


<h2><a name="inputs">Inputs</a></h2>  
for the function call the parameter list has to contain at least: 
<ul>
  <li> nsecs - number of seconds (length of time series)
  <li> fs    - sampling frequency
  <li> pzmodel with gain 
</ul>

<h2><a name="outputs">Outputs</a></h2> 
<ul>
  <li> b   - analysis object containing the resulting time series 
</ul>
</p>
<h2><a name="usage">Usage</a></h2>
The analysis object constructor <a href="ao_create.html">ao</a> calls the following four functions when the input is a pzmodel.
<ul>
  <li> ngconv
  <li> ngsetup
  <li> nginit
  <li> ngprop
</ul>
<p>
  First a parameter list of the input parameters is to be done. For further information on this look at <a href="plist_create.html#params">Creating parameter lists from parameters</a>.<br/>
</p>
<h2><a name="starting">Starting from a given pole/zero model</a></h2>
<p>
  The parameter list should contain the number of seconds the resulting time series should have <tt>nsecs</tt> and the sampling frequency <tt>fs</tt>. <br/> 
  The constructor call should look like this:
</p>
<div class="fragment"><pre>
    f1 = 5;
    f2 = 10;
    f3 = 1;
    gain = 1;
    fs = 10;  <span class="comment">% sampling frequency</span>
    nsecs = 100; <span class="comment">% number of seconds to be generated</span>
    p = [pz(f1) pz(f2)];
    z = [pz(f3)];
    pzm = pzmodel(gain, p, z);
    a = ao(pzm, plist(<span class="string">'nsecs'</span>, nsecs, <span class="string">'fs'</span>,fs))
    
</pre></div>
The output will be an analysis object <tt>a</tt> containing the time series with the spectrum described by the input pole-zero model.
</p>