<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>C# power spectral density Archives - CenterSpace</title>
	<atom:link href="https://www.centerspace.net/tag/c-power-spectral-density/feed" rel="self" type="application/rss+xml" />
	<link>https://www.centerspace.net/tag/c-power-spectral-density</link>
	<description>.NET numerical class libraries</description>
	<lastBuildDate>Tue, 02 Jun 2020 22:51:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
<site xmlns="com-wordpress:feed-additions:1">104092929</site>	<item>
		<title>NMath Driving New High Performance Signal Visualizer</title>
		<link>https://www.centerspace.net/nmath-driving-new-high-performance-signal-visualizer</link>
					<comments>https://www.centerspace.net/nmath-driving-new-high-performance-signal-visualizer#respond</comments>
		
		<dc:creator><![CDATA[Paul Shirkey]]></dc:creator>
		<pubDate>Mon, 30 Aug 2010 22:56:35 +0000</pubDate>
				<category><![CDATA[CenterSpace]]></category>
		<category><![CDATA[Corporate]]></category>
		<category><![CDATA[arction chart]]></category>
		<category><![CDATA[arction lightning chart]]></category>
		<category><![CDATA[c# chart tool]]></category>
		<category><![CDATA[c# FFT]]></category>
		<category><![CDATA[C# power spectral density]]></category>
		<category><![CDATA[c# real time chart]]></category>
		<category><![CDATA[centerspace news]]></category>
		<category><![CDATA[lightning chart]]></category>
		<category><![CDATA[signal processing .NET chart]]></category>
		<category><![CDATA[signal visualization .NET]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=2589</guid>

					<description><![CDATA[<p><img src="https://www.centerspace.net/blog/wp-content/uploads/2010/08/3DFFTWaveMonitor_Single-150x150.jpg" alt="" title="Power Spectrum" width="150" height="150" class="excerpt" /><br />
CenterSpace Software and <a href="http://www.lightningchart.com/">Arction</a> have created a new partnership to bring our shared customers a new high performance computing and visualization package. </p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/nmath-driving-new-high-performance-signal-visualizer">NMath Driving New High Performance Signal Visualizer</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>CenterSpace Software and <a href="http://arction.com/">Arction</a> have created a partnership to bring our shared customers a new high performance computing and visualization package. Arction has built a .NET chart tool for demanding visualization applications such as:</p>
<blockquote>
<ul>
<li>professional high-speed data acquisition software</li>
<li>real-time measurement and signal monitoring applications</li>
<li>PC-based oscilloscopes and signal analyzers</li>
<li>scientific research</li>
<li>medical measurement displays</li>
<li>topographic map rendering</li>
</ul>
</blockquote>
<p>Arction chose CenterSpace&#8217;s NMath tool set for driving their prototypical examples for the 2010 Measuring and Testing conference in Helsinki.</p>
<figure id="attachment_2600" aria-describedby="caption-attachment-2600" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.centerspace.net/blog/wp-content/uploads/2010/08/3DFFTWaveMonitor.jpg"><img decoding="async" class="size-medium wp-image-2600" title="Lightening Chart of Power Spectrum" src="https://www.centerspace.net/blog/wp-content/uploads/2010/08/3DFFTWaveMonitor-300x201.jpg" alt="" width="300" height="201" srcset="https://www.centerspace.net/wp-content/uploads/2010/08/3DFFTWaveMonitor-300x201.jpg 300w, https://www.centerspace.net/wp-content/uploads/2010/08/3DFFTWaveMonitor-1023x688.jpg 1023w, https://www.centerspace.net/wp-content/uploads/2010/08/3DFFTWaveMonitor.jpg 1571w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2600" class="wp-caption-text">Visualization by Arction, Spectrum computation by CenterSpace</figcaption></figure>
<h3>Package Offer</h3>
<p>Our Arction and CenterSpace <a href="/order/">partnership offer</a> is a bundle of the <strong>Arction LightningChart Ultimate</strong> and the <strong>NMath Suite</strong> for $3395.00 &#8211; that&#8217;s more than a 20% discount. That price includes a one-year subscription on all product extensions and upgrades. Both products are fully compatible with Visual Studio 2008 and 2010.</p>
<figure id="attachment_3258" aria-describedby="caption-attachment-3258" style="width: 309px" class="wp-caption aligncenter"><a href="https://www.centerspace.net/blog/wp-content/uploads/2010/08/ArctionPromoImage.png"><img decoding="async" loading="lazy" class="size-full wp-image-3258" title="Arction Images" src="https://www.centerspace.net/blog/wp-content/uploads/2010/08/ArctionPromoImage.png" alt="Arction images" width="309" height="75" srcset="https://www.centerspace.net/wp-content/uploads/2010/08/ArctionPromoImage.png 309w, https://www.centerspace.net/wp-content/uploads/2010/08/ArctionPromoImage-300x72.png 300w" sizes="(max-width: 309px) 100vw, 309px" /></a><figcaption id="caption-attachment-3258" class="wp-caption-text">Arction sample images</figcaption></figure>
<h3>Arction&#8217;s LightningChart Pro</h3>
<p>The LightningChart .NET \ C# chart tool is a complete and full featured real-time signal visualization tool. Here are a few of LightningChart&#8217;s key features.</p>
<ul>
<li>Different X-axis <em>real-time monitoring</em> scrolling modes: Scrolling, sweeping, stepping, oscilloscope style level triggered</li>
<li>Smoothly renders huge amounts of <em>measured data as graphs in real-time</em> &#8211; up to hundreds of millions of new data points per second</li>
<li>Full 64-bit support. Utilizes over 2 GB memory (in 64-bit systems).</li>
<li>Various series types: SampleData, PointLines, FreeformLines, Bars, Bands, Constant lines</li>
<li>Many Y axes/chart: stacked or layered</li>
<li>Automatic scale fitting, grids and divisions</li>
<li>Comprehensive user interface customization</li>
</ul>
<p>For more information please visit the LightningChart <a href="http://arction.com/">product website</a>.</p>
<p>Happy Computing,<br />
Paul</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/nmath-driving-new-high-performance-signal-visualizer">NMath Driving New High Performance Signal Visualizer</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/nmath-driving-new-high-performance-signal-visualizer/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2589</post-id>	</item>
		<item>
		<title>Power Spectral Density with NMath</title>
		<link>https://www.centerspace.net/power-spectral-density-with-nmath</link>
					<comments>https://www.centerspace.net/power-spectral-density-with-nmath#respond</comments>
		
		<dc:creator><![CDATA[Paul Shirkey]]></dc:creator>
		<pubDate>Wed, 13 Jan 2010 19:35:53 +0000</pubDate>
				<category><![CDATA[NMath]]></category>
		<category><![CDATA[NMath Tutorial]]></category>
		<category><![CDATA[C# power spectral density]]></category>
		<category><![CDATA[C# power spectrum]]></category>
		<category><![CDATA[estimating PSD]]></category>
		<category><![CDATA[fft C#]]></category>
		<category><![CDATA[filtering c#]]></category>
		<category><![CDATA[power spectral density]]></category>
		<category><![CDATA[PSD .NET]]></category>
		<category><![CDATA[PSD C#]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=725</guid>

					<description><![CDATA[<p><img src="https://www.centerspace.net/blog/wp-content/uploads/2010/01/SGPkFndrExplPeriodogram-150x136.jpg" alt="" title="Periodogram Example" class="excerpt" /><br />
We've had several customers ask about computing the PSD in C# with NMath, so I thought it was time for a post on the subject.  The power spectral density provides an estimate of the power present within each slice of spectrum, and is presented as graph of the signal power versus frequency.  It's a common signal processing calculation across many fields from acoustics to chemistry, and can provide insight into periodicities contained within a time domain signal.  </p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/power-spectral-density-with-nmath">Power Spectral Density with NMath</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Application Note</h2>
<h2>Computing the Power Spectrum in C#</h2>
<p>We&#8217;ve had several customers ask about computing the PSD in C# with NMath, so I thought it was time for a post on the subject. The power spectral density provides an estimate of the power present within each slice of spectrum, and is presented as graph of the signal power versus frequency. It&#8217;s a common signal processing calculation across many fields from acoustics to chemistry, and can provide insight into periodicities contained within a time domain signal.</p>
<p>For stationary, square summable-signals, the PSD is expressed as,</p>
<p> </p>
<center><br /><img decoding="async" title="S_f(\omega) = \underset{T \rightarrow \infty }{lim} {\left | F_T(\omega) \right |^2 \over T}" src="http://latex.codecogs.com/gif.latex?S_f(\omega) = \underset{T \rightarrow \infty }{lim} {\left | F_T(\omega) \right |^2 \over T}" /></center>
<p> </p>
<p>where <code>F(w)</code> is the Fourier transform of the time domain signal <code> f(t)</code>, and <code>T</code> is the width of the time domain sampled signal. Naturally we can never sample the entire signal, so calculations of the PSD (power spectrum density) are all estimates. Techniques for estimating the PSD can be divided into two classes, parametric (model based), and non-parametic (non-model based). We will discuss only non-parametic techniques here. For discrete signals that are not square-summable (i.e. non-stationary signals &#8211; and so the Fourier transform does not exist), estimates of the power spectral density can be derived from,</p>
<p> </p>
<center><br /><img decoding="async" title="S_f(\omega) = F \left \{ \underset{T \rightarrow \infty} {\lim } {{1} \over {T}} (f^*(t) *_T f(t)) \right \}" src="http://latex.codecogs.com/gif.latex?S_f(\omega) = F \left \{ \underset{T \rightarrow \infty} {\lim } {{1} \over {T}} (f^*(t) *_T f(t)) \right \}" /></center>
<p> </p>
<p>Which is the Fourier transform of the autocorrelation as the correlation width of the sampled signal tends to infinity. For a concise derivation of both of these formulas read <a href="http://www.ee.nmt.edu/~elosery/lectures/power_spectral_density.pdf">these</a> short lecture notes.</p>
<h3>Computing the PSD in C# with NMath</h3>
<p>Concentrating on stationary (periodic) signals, the PSD is most efficiently computed by applying smoothing to discrete periodograms .</p>
<p> </p>
<center><br /><img decoding="async" title="Periodogram(\omega_n) = {\left | F_n(\omega) \right |^2 \over n}" src="http://latex.codecogs.com/gif.latex?Periodogram(\omega_n) = {\left | F_n(\omega) \right |^2 \over n}" /></center>
<p> </p>
<p>Where <code>n</code> is the number of signal samples. Each point in the periodogram represents the relative contribution to the variance in the time domain signal at that frequency. (Visualization provided courtesy of <a href="http://www.infragistics.com/products/wpf#Overview">Infragistics</a>.)</p>
<figure id="attachment_1163" aria-describedby="caption-attachment-1163" style="width: 360px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="size-full wp-image-1163" title="Periodogram Example" src="https://www.centerspace.net/blog/wp-content/uploads/2010/01/SGPkFndrExplPeriodogram.jpg" alt="Periodogram of sun spot data." width="360" height="136" srcset="https://www.centerspace.net/wp-content/uploads/2010/01/SGPkFndrExplPeriodogram.jpg 360w, https://www.centerspace.net/wp-content/uploads/2010/01/SGPkFndrExplPeriodogram-300x113.jpg 300w" sizes="(max-width: 360px) 100vw, 360px" /><figcaption id="caption-attachment-1163" class="wp-caption-text">An example periodogram of sunspot data. This is smoothed in some fashion to estimate the PSD.</figcaption></figure>
<p>Another estimation technique involves computing multiple windowed periodograms and then combining these together to get a progressively more accurate estimate (Welch&#8217;s Method, similarly MTM with Slepian windows). The time domain signal should be detrended before any of these operations.<br /><span id="more-725"></span><br />The following C# code estimates the PSD by smoothing the periodogram using a Savitzy-Golay zero phase shift filter.</p>
<pre lang="csharp"><code>using CenterSpace.NMath.Core;

/* Estimate the Power Spectrum Density in C# / .NET */
public DoubleVector PSDEstimate(DoubleVector signal)
{
  // Detrend the periodic data<br /></code><code>  signal = signal - NMathFunctions.Mean(signal); </code><br /><br /><code>  // Compute the periodogram </code><br /><code>  var forwardFFT = new DoubleForward1DFFT( signal.Length); </code><br /><code>  var packedFFT = forwardFFT.FFT( signal ); </code><br /><code>  DoubleSymmetricSignalReader reader = forwardFFT.GetSignalReader( packedFFT ); </code><br /><code>  DoubleComplexVector fft = reader.UnpackSymmetricHalfToVector();<br /><br />  </code><code>// Square of the absolute value, scale the result by the length, 1/N.</code><br /><code>  DoubleVector pg = NMathFunctions.Pow( NMathFunctions.Abs(fft), 2.0) / fft.Length; </code><br /><code>  <br />  // Smooth w/ filter of width of 7, &amp; polynomial degree of 5. </code><br /><code>  var sgf = new SavitzkyGolayFilter(3, 3, 5); </code><br /><code>  DoubleVector smoothedPSD = sgf.Filter(pg);<br /><br />  </code><code>return smoothedPSD;
}
</code></pre>
<p>Or using a Daniell filter and the <code> MovingWindowFilter </code> class to smooth the periodogram.</p>
<pre lang="csharp"><code>MovingWindowFilter mwf = 
  new MovingWindowFilter(2, 2, new DoubleVector(.125, .25, .25, .25, .125));
mwf.WindowBoundaryOption = 
  MovingWindowFilter.BoundaryOption.PadWithZeros;

DoubleVector smoothedPSDaniell = mwf.Filter(data);
</code></pre>
<p>More information about NMath&#8217;s FFT class set can be found on our <a href="/topic-fast-fourier-transforms/">fft landing page</a>. <del datetime="2013-10-21T18:31:19+00:00">The class <code>SavitzkyGolayFilter</code> will be avaliable in our next release, however, current users can use the <code>MovingWindowFilter</code> class with Savitzky-Golay coefficients generated via a provided helper method.</del> The class <code>SavitzyGolayFilter</code> is available in the current release.</p>
<p>Happy Computing,</p>
<p><em> Paul </em></p>
<p><strong>References</strong></p>
<p>Haykin, S. “Adaptive Filter Theory”. Prentice-Hall, Inc. 1996.</p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/power-spectral-density-with-nmath">Power Spectral Density with NMath</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/power-spectral-density-with-nmath/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">725</post-id>	</item>
	</channel>
</rss>
