http://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&feed=atom&action=historyClass SLNoiseStats.TSLNoiseStats - Revision history2024-03-29T15:52:40ZRevision history for this page on the wikiMediaWiki 1.17.0http://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&diff=49762&oldid=prevDavid Alm: Automated Syncronization with Documentation2013-06-26T00:31:06Z<p>Automated Syncronization with Documentation</p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 00:31, 26 June 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 28:</td>
<td colspan="2" class="diff-lineno">Line 28:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>=== C# (.NET): ===</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>=== C# (.NET): ===</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><code></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><code></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>'''public ref class''' <del class="diffchange diffchange-inline">TSLNoiseStats </del>: [[Class SLFourier.TSLFourierBase|Mitov.SignalLab.FourierBase]]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>'''public ref class''' <ins class="diffchange diffchange-inline">NoiseStats </ins>: [[Class SLFourier.TSLFourierBase|Mitov.SignalLab.FourierBase]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></code></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></code></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Summary ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Summary ==</div></td></tr>
</table>David Almhttp://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&diff=47220&oldid=prevDavid Alm: Automated Syncronization with Documentation2013-06-26T00:11:56Z<p>Automated Syncronization with Documentation</p>
<table style="background-color: white; color:black;">
<tr valign='top'>
<td colspan='1' style="background-color: white; color:black;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black;">Revision as of 00:11, 26 June 2013</td>
</tr></table>David Almhttp://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&diff=44324&oldid=prevDavid Alm: Automated Syncronization with Documentation2013-06-25T23:53:54Z<p>Automated Syncronization with Documentation</p>
<table style="background-color: white; color:black;">
<tr valign='top'>
<td colspan='1' style="background-color: white; color:black;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black;">Revision as of 23:53, 25 June 2013</td>
</tr></table>David Almhttp://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&diff=41426&oldid=prevDavid Alm: Automated Syncronization with Documentation2013-06-11T02:45:49Z<p>Automated Syncronization with Documentation</p>
<table style="background-color: white; color:black;">
<tr valign='top'>
<td colspan='1' style="background-color: white; color:black;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black;">Revision as of 02:45, 11 June 2013</td>
</tr></table>David Almhttp://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&diff=38530&oldid=prevDavid Alm: Automated Syncronization with Documentation2013-06-11T00:17:29Z<p>Automated Syncronization with Documentation</p>
<table style="background-color: white; color:black;">
<tr valign='top'>
<td colspan='1' style="background-color: white; color:black;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black;">Revision as of 00:17, 11 June 2013</td>
</tr></table>David Almhttp://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&diff=35634&oldid=prevDavid Alm: Automated Syncronization with Documentation2013-06-11T00:07:17Z<p>Automated Syncronization with Documentation</p>
<table style="background-color: white; color:black;">
<tr valign='top'>
<td colspan='1' style="background-color: white; color:black;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black;">Revision as of 00:07, 11 June 2013</td>
</tr></table>David Almhttp://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&diff=32738&oldid=prevDavid Alm: Automated Syncronization with Documentation2013-06-10T20:30:15Z<p>Automated Syncronization with Documentation</p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 20:30, 10 June 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 67:</td>
<td colspan="2" class="diff-lineno">Line 67:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>exclude a single bin adjacent left and adjacent right of the</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>exclude a single bin adjacent left and adjacent right of the</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>first harmonic, inside the event handler use code such as:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>first harmonic, inside the event handler use code such as:</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"><b>Diagram:</b></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">[[Image:SLNoiseStats_Preview.png]]</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 105:</td>
<td colspan="2" class="diff-lineno">Line 111:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>in the FFT output spectrum by setting them to the average</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>in the FFT output spectrum by setting them to the average</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>amplitude of the signal.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>amplitude of the signal.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Note</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Note</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>This change has effect only for statistic calculations that</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>This change has effect only for statistic calculations that</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 113:</td>
<td colspan="2" class="diff-lineno">Line 121:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>=== Published ===</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>=== Published ===</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">*[[Property SLNoiseStats.TSLNoiseStats.Normalization|Normalization]] - The normalization type for the FFT operation. </ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>*[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]] - Array of Count integers holding the values of bins to be masked from statistic calculations.  </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>*[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]] - Array of Count integers holding the values of bins to be masked from statistic calculations.  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>*[[Property SLNoiseStats.TSLNoiseStats.MinDataVal|MinDataVal]] - The minimal value expected in the data stream.  </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>*[[Property SLNoiseStats.TSLNoiseStats.MinDataVal|MinDataVal]] - The minimal value expected in the data stream.  </div></td></tr>
</table>David Almhttp://www.mitov.com/wiki/index.php?title=Class_SLNoiseStats.TSLNoiseStats&diff=7497&oldid=prevDavid Alm: Automated Syncronization with Documentation2011-11-22T00:24:31Z<p>Automated Syncronization with Documentation</p>
<p><b>New page</b></p><div><b><span style="color:red"><br />
This is a Beta Read Only version of this page. <br />
Please review and send recommendations to [mailto:mitov@mitov.com mitov@mitov.com]. <br />
We will enable the editing as soon as we are happy with the overall Wiki site.<br />
</span></b><br />
<br />
[[Image:BIGSLNoiseStats.gif]] [[Image:SLNoiseStats.gif]] [[Image:NETSLNoiseStats.gif]]<br />
<br />
'''Package:''' [[Package SignalLabPkg|SignalLabPkg]]<br />
<br />
'''Unit:''' [[Unit SLNoiseStats|SLNoiseStats]]<br />
<br />
'''Inherits:''' [[Class SLFourier.TSLFourierBase|TSLFourierBase]]<br />
<br />
== Syntax ==<br />
=== Delphi: ===<br />
<code><br />
'''type''' TSLNoiseStats = '''class'''( [[Class SLFourier.TSLFourierBase|TSLFourierBase]] )<br />
</code><br />
=== C++ Builder: ===<br />
<code><br />
'''class''' TSLNoiseStats : '''public''' [[Class SLFourier.TSLFourierBase|TSLFourierBase]]<br />
</code><br />
=== Visual C++ (MFC): ===<br />
<code><br />
'''class''' CTSLNoiseStats : '''public''' [[Class SLFourier.TSLFourierBase|CTSLFourierBase]]<br />
</code><br />
=== C# (.NET): ===<br />
<code><br />
'''public ref class''' TSLNoiseStats : [[Class SLFourier.TSLFourierBase|Mitov.SignalLab.FourierBase]]<br />
</code><br />
== Summary ==<br />
Calculates the noise stats of a signal. <br />
<br />
== Description ==<br />
[[Class SLNoiseStats.TSLNoiseStats|TSLNoiseStats]] is a component that accepts either a real or<br />
complex input data stream containing a single fundamental<br />
frequency within a noisy signal, and analyzes the stream in<br />
order to calculate a number of useful statistics, including<br />
Signal-to-Noise ratio (SNR), Total Harmonic Distortion (THD),<br />
and Signal-to-Noise-and-Distortion (SINAD). The component<br />
achieves these calculations with the following sequential<br />
steps: 1) The input signal is normalized and an initial FFT<br />
is performed, 2) the fundamental frequency and its harmonics<br />
are located within the FFT output spectrum, 3) the various<br />
statistics are calculated, 4) a [[Type SLNoiseStats.TSLNoiseStatsNotifyEvent|TSLNoiseStatsNotifyEvent]] is<br />
generated to supply the calculated statistics (in the form of<br />
a [[Class SLNoiseStats.TSLNoiseStatResults|TSLNoiseStatResults]] object) to the client, and finally 5)<br />
the results of the initial FFT are made available on the<br />
OutpuPin and SpectrumOutputPin.<br />
<br />
<br />
<br />
In addition to the above 5-step process, an event is provided<br />
to allow clients to mask (exclude) certain bins from the<br />
statistic calculations. For example, clients sometimes need<br />
to exclude skirt bins near the fundamental or harmonics.<br />
And because harmonic location occurs in step (2) above, and<br />
statistic calculations occur in step (3) above, bin exclusion<br />
needs to be specified midway through the algorithm. To allow<br />
this, a [[Type SLNoiseStats.TSLBinMaskOpportunityEvent|TSLBinMaskOpportunityEvent]] is generated just after<br />
step (2). To utilize this event, assign property<br />
[[Event SLNoiseStats.TSLNoiseStats.OnBinMaskOpportunity|OnBinMaskOpportunity]] to an event handler. Within the handler,<br />
clients have access to the fundamental and harmonic bin<br />
locations, and can call the [[Class SLNoiseStats.TSLNoiseStats|TSLNoiseStats]].[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Add()<br />
method to add a bin number to exclude. For example, to<br />
exclude a single bin adjacent left and adjacent right of the<br />
first harmonic, inside the event handler use code such as:<br />
<br />
<br />
<br />
Delphi Example:<br />
<br />
<code><br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Clear(); // remove all existing masks<br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Add( Harmonics.HarmonicBin[ 0 ] 1 );<br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Add( Harmonics.HarmonicBin[ 0 ] + 1 );<br />
</code><br />
<br />
C++ Builder Example:<br />
<br />
<code><br />
SLNoiseStats1->[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]]->Clear(); // remove all existing masks<br />
SLNoiseStats1->[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]]->Add( Harmonics->HarmonicBin[ 0 ] 1 );<br />
SLNoiseStats1->[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]]->Add( Harmonics->HarmonicBin[ 0 ] + 1 );<br />
</code><br />
<br />
Visual C++/MFC Example:<br />
<br />
<code><br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Clear(); // remove all existing masks<br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Add( Harmonics.HarmonicBin[ 0 ] 1 );<br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Add( Harmonics.HarmonicBin[ 0 ] + 1 );<br />
</code><br />
<br />
Visual C# Example:<br />
<br />
<code><br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Clear(); // remove all existing masks<br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Add( Harmonics.HarmonicBin[ 0 ] 1 );<br />
SLNoiseStats1.[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]].Add( Harmonics.HarmonicBin[ 0 ] + 1 );<br />
</code><br />
<br />
This code will change the amplitudes of these adjacent bins<br />
in the FFT output spectrum by setting them to the average<br />
amplitude of the signal.<br />
Note<br />
This change has effect only for statistic calculations that<br />
follow the FFT there is no change in the actual FFT output<br />
stream available on the OutputPin or SpectrumOutputPin.<br />
<br />
== Properties ==<br />
<br />
=== Published ===<br />
*[[Property SLNoiseStats.TSLNoiseStats.BinMask|BinMask]] - Array of Count integers holding the values of bins to be masked from statistic calculations. <br />
*[[Property SLNoiseStats.TSLNoiseStats.MinDataVal|MinDataVal]] - The minimal value expected in the data stream. <br />
*[[Property SLNoiseStats.TSLNoiseStats.MaxDataVal|MaxDataVal]] - The maximal value expected in the data stream. <br />
*[[Property SLNoiseStats.TSLNoiseStats.WindowThreshold|WindowThreshold]] - Threshold for bins with (frequency-domain) window magnitudes. <br />
*[[Property SLNoiseStats.TSLNoiseStats.NumHarmonics|NumHarmonics]] - The NumHarmonics harmonic frequencies used in the calculation of SINAD and THD <br />
*[[Property SLNoiseStats.TSLNoiseStats.DCBinWidth|DCBinWidth]] - Size of a bin window (number of bins) to be treated as a single bin for the DC component of the signal. <br />
*[[Property SLNoiseStats.TSLNoiseStats.HarmonicBinWidth|HarmonicBinWidth]] - Size of a bin window (number of bins) to be treated as a single bin for determining the fundamental and harmonic contributions. <br />
*[[Property SLNoiseStats.TSLNoiseStats.SynchronizeType|SynchronizeType]] - Type of thread buffer synchronization. <br />
<br />
=== Public ===<br />
*[[Property SLNoiseStats.TSLNoiseStats.Masked|Masked]] - Array of Boolean, with each element corresponding to the initial FFT output bin. <br />
*[[Property SLNoiseStats.TSLNoiseStats.CompexData|CompexData]] - Returns pointer to the processed FFT data. <br />
*[[Property SLNoiseStats.TSLNoiseStats.DataSize|DataSize]] - Returns the size of the processed FFT data. <br />
<br />
== Events ==<br />
*[[Event SLNoiseStats.TSLNoiseStats.OnBinMaskOpportunity|OnBinMaskOpportunity]] - Occurs after the initial FFT and location of the fundamental frequency and harmonics. <br />
*[[Event SLNoiseStats.TSLNoiseStats.OnStatsAvailable|OnStatsAvailable]] - Occurs after all [[Class SLNoiseStats.TSLNoiseStats|TSLNoiseStats]] calculations are performed. <br />
<br />
== From [[Class SLFourier.TSLFourierBase|TSLFourierBase]] ==<br />
<br />
== Properties ==<br />
<br />
=== Published ===<br />
*[[Property SLFourier.TSLFourierBase.WindowType|WindowType]] - Windowing function to be applied on the signal prior performing FFT. <br />
*[[Property SLFourier.TSLFourierBase.NumberTerms|NumberTerms]] - Specifies the number of Cosine sum window function terms. <br />
*[[Property SLFourier.TSLFourierBase.Order|Order]] - The order of the FFT. <br />
*[[Property SLFourier.TSLFourierBase.SamplingWindowStep|SamplingWindowStep]] - Step in samples when the next FFT will be applied. <br />
*[[Property SLFourier.TSLFourierBase.Synchronize|Synchronize]] - Specifies if the [[Event SLFourier.TSLFourierBase.OnFrequencyResult|OnFrequencyResult]] event will be synchronized with the main thread. <br />
<br />
== Pins ==<br />
*[[Pin SLFourier.TSLFourierBase.FrequencyOutputPin|FrequencyOutputPin]] - Single Sample Real(double) data Highest Frequency Output Pin. <br />
<br />
== Events ==<br />
*[[Event SLFourier.TSLFourierBase.OnFrequencyResult|OnFrequencyResult]] - Occurs when highest amplitude frequency is detected. <br />
<br />
== From [[Class SLFourier.TSLFourierBaseComponent|TSLFourierBaseComponent]] ==<br />
<br />
== Properties ==<br />
<br />
=== Published ===<br />
*[[Property SLFourier.TSLFourierBaseComponent.Alpha|Alpha]] - Adjustable parameter associated with some of the windowing equations. <br />
*[[Property SLFourier.TSLFourierBaseComponent.IgnoreDC|IgnoreDC]] - Ignores the DC component. <br />
<br />
== Pins ==<br />
*[[Pin SLFourier.TSLFourierBaseComponent.InputPin|InputPin]] - The Real(double) or Complex input pin of the FFT. <br />
*[[Pin SLFourier.TSLFourierBaseComponent.OutputPin|OutputPin]] - The Complex output pin of the FFT. <br />
*[[Pin SLFourier.TSLFourierBaseComponent.SpectrumOutputPin|SpectrumOutputPin]] - The Real(double) spectrum output pin. <br />
<br />
== From [[Class SLCommonFilter.TSLBasicThreadedFilter|TSLBasicThreadedFilter]] ==<br />
<br />
== Properties ==<br />
<br />
=== Published ===<br />
*[[Property SLCommonFilter.TSLBasicThreadedFilter.Threading|Threading]]<br />
<br />
[[Category:Components]][[Category:Classes]]</div>David Alm