<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.formulasearchengine.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=69.201.190.50</id>
	<title>formulasearchengine - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.formulasearchengine.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=69.201.190.50"/>
	<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/wiki/Special:Contributions/69.201.190.50"/>
	<updated>2026-08-26T03:14:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.47.0-wmf.7</generator>
	<entry>
		<id>https://en.formulasearchengine.com/w/index.php?title=Substring_index&amp;diff=11693</id>
		<title>Substring index</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/w/index.php?title=Substring_index&amp;diff=11693"/>
		<updated>2014-01-05T02:52:13Z</updated>

		<summary type="html">&lt;p&gt;69.201.190.50: I removed the phrase &amp;quot;o(n) means less than O(n)&amp;quot; as it isn&amp;#039;t accurate.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{merge to|Phase (waves)|date=September 2013}}&lt;br /&gt;
{{inadequate lede|date=July 2013}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Instantaneous phase&#039;&#039;&#039; and &#039;&#039;&#039;instantaneous frequency&#039;&#039;&#039; are important concepts in [[signal processing]] that occur in the context of the representation and analysis of time-varying functions.&amp;amp;nbsp; The instantaneous phase (or &amp;quot;local phase&amp;quot; or simply &amp;quot;phase&amp;quot;) of a complex-valued function, &#039;&#039;x&#039;&#039;(&#039;&#039;t&#039;&#039;), is the real-valued function&#039;&#039;&#039;:&#039;&#039;&#039;&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(t) = \arg[x(t)].\,&amp;lt;/math&amp;gt; &amp;amp;nbsp; (See [[Arg (mathematics)|arg function]].)&lt;br /&gt;
&lt;br /&gt;
And for a real-valued function, &#039;&#039;s&#039;&#039;(&#039;&#039;t&#039;&#039;), it is determined from the function&#039;s [[analytic signal|analytic representation]], &#039;&#039;s&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;a&#039;&#039;&amp;lt;/sub&amp;gt;(&#039;&#039;t&#039;&#039;)&#039;&#039;&#039;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(t) = \mathrm{arg}[ s_\mathrm{a}(t)] &lt;br /&gt;
.\,&amp;lt;/math&amp;gt;&amp;lt;ref&amp;gt;{{cite book|last=Blackledge|first=Jonathan M.|title=Digital Signal Processing: Mathematical and Computational Methods, Software Development and Applications|year=2006|publisher=Woodhead Publishing|isbn=1904275265|page=134|edition=2}}&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
When &amp;lt;math&amp;gt;\phi(t)\,&amp;lt;/math&amp;gt; is constrained to its [[principal value]], either the interval (-π, π]&amp;amp;nbsp; or &amp;amp;nbsp;[0, 2π),&amp;amp;nbsp; it is called the &#039;&#039;wrapped&#039;&#039; phase. &amp;amp;nbsp;Otherwise it is called &#039;&#039;unwrapped&#039;&#039;, which is a continuous function of argument &amp;lt;math&amp;gt;t,\,&amp;lt;/math&amp;gt; assuming &amp;lt;math&amp;gt;s_\mathrm{a}\,&amp;lt;/math&amp;gt; is a continuous function of &amp;amp;nbsp;&amp;lt;math&amp;gt;t.\,&amp;lt;/math&amp;gt; &amp;amp;nbsp;Unless otherwise indicated, the continuous form should be inferred.&lt;br /&gt;
&lt;br /&gt;
[[File:Phase vs Time, wrapped and unwrapped.jpg|thumb|400px|Instantaneous phase vs. time]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
:&#039;&#039;&#039;Example 1:&#039;&#039;&#039; &amp;amp;nbsp;&amp;lt;math&amp;gt;s(t) = A\cdot \cos(\omega t + \theta),\,&amp;lt;/math&amp;gt;&amp;amp;nbsp; where &amp;lt;math&amp;gt;A\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\omega\,&amp;lt;/math&amp;gt; are positive values.&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
s_\mathrm{a}(t) = A\cdot e^{i (\omega t +\theta)}&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;\phi(t) = \omega t + \theta\,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:In this simple sinusoidal, mono-frequency example, the constant &amp;lt;math&amp;gt;\theta\,&amp;lt;/math&amp;gt; is also commonly referred to as &#039;&#039;phase&#039;&#039; or phase &#039;&#039;offset&#039;&#039;. &amp;amp;nbsp;&amp;lt;math&amp;gt;\phi(t)\,&amp;lt;/math&amp;gt; is a function of time. &amp;amp;nbsp;&amp;lt;math&amp;gt;\theta\,&amp;lt;/math&amp;gt; is not.&lt;br /&gt;
:In the next example, we also see that the phase offset of a real-valued sinusoid is ambiguous unless a reference (sin or cos) is specified. &amp;amp;nbsp;&amp;lt;math&amp;gt;\phi(t)\,&amp;lt;/math&amp;gt; is unambiguously defined.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Example 2:&#039;&#039;&#039; &amp;amp;nbsp;&amp;lt;math&amp;gt;s(t) = A\cdot \sin(\omega t) = A\cdot \cos\left(\omega t -\begin{matrix} \frac{\pi}{2}\end{matrix}\right)\,&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
s_\mathrm{a}(t) = A\cdot e^{i \left(\omega t -\begin{matrix} \frac{\pi}{2}\end{matrix}\right)} &lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;\phi(t) = \omega t -\begin{matrix} \frac{\pi }{2}\end{matrix}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In both examples the local maxima of &amp;amp;nbsp;&amp;lt;math&amp;gt;s(t)\,&amp;lt;/math&amp;gt;&amp;amp;nbsp; correspond to &amp;amp;nbsp;&amp;lt;math&amp;gt;\phi(t) = N\cdot 2\pi,\,&amp;lt;/math&amp;gt;&amp;amp;nbsp; for integer values of N.  This has applications in the field of computer vision.&lt;br /&gt;
&lt;br /&gt;
== Instantaneous frequency ==&lt;br /&gt;
&lt;br /&gt;
In general, the instantaneous angular frequency is defined as&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;math&amp;gt;\omega(t) = \phi^\prime(t) = {d \over dt} \phi(t),\,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:and the &#039;&#039;&#039;instantaneous frequency&#039;&#039;&#039; (Hz) is: &lt;br /&gt;
&lt;br /&gt;
::&amp;lt;math&amp;gt; f(t) = \frac{1}{2 \pi} \phi^\prime(t).&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The inverse operation is:&lt;br /&gt;
:{|&lt;br /&gt;
|&amp;lt;math&amp;gt;\phi(t) = 2 \pi \int_{-\infty}^{t} f(\tau)\, d \tau \ &amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;= 2 \pi \int_{-\infty}^{0} f(t)\, dt + 2 \pi \int_{0}^{t} f(\tau)\, d \tau&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;= \phi(0) + 2 \pi \int_{0}^{t} f(\tau)\, d \tau.&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For discrete-time functions, this can be written as a recursion:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(nT) \ = \ \phi((n-1)T) + 2\pi T f(nT) \ = \ \phi((n-1)T) + \underbrace{\arg(s_a(nT)) - \arg(s_a((n-1)T))}_{\Delta \phi(nT)}.\,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Discontinuities can then be removed by adding 2π whenever &amp;amp;nbsp;&amp;lt;math&amp;gt;\scriptstyle \Delta \phi(nT) \ \le \ -\pi&amp;lt;/math&amp;gt;&amp;amp;nbsp; and subtracing 2π whenever &amp;amp;nbsp;&amp;lt;math&amp;gt;\scriptstyle \Delta \phi(nT) \ &amp;gt; \ \pi.&amp;lt;/math&amp;gt;  That allows &amp;lt;math&amp;gt;\scriptstyle \phi(nT)&amp;lt;/math&amp;gt; to accumulate without limit and produces an &#039;&#039;&#039;unwrapped&#039;&#039;&#039; instantaneous phase.[http://www.mathworks.com/help/matlab/ref/unwrap.html]&amp;amp;nbsp; An equivalent formulation that replaces the modulo 2π operation with a complex multiplication is:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(nT) \ = \ \phi((n-1)T) + \arg(s_a(nT)\cdot s_a^*((n-1)T)),\,&amp;lt;/math&amp;gt;&amp;amp;nbsp; &amp;amp;nbsp;where the asterisk denotes complex conjugate.&lt;br /&gt;
&lt;br /&gt;
== Complex representation ==&lt;br /&gt;
In some applications, such as averaging the values of phase at several moments of time, it may be useful to convert each value to a complex number, or vector representation&#039;&#039;&#039;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
|&amp;lt;math&amp;gt;e^{i \phi(t)}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;= \frac{s_\mathrm{a}(t)}{|s_\mathrm{a}(t)|}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;= \cos(\phi(t)) + i\cdot \sin(\phi(t)).\,&amp;lt;/math&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;([[Euler&#039;s formula]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This representation is similar to the wrapped phase representation in that it does not distinguish between multiples of 2π in the phase, but similar to the unwrapped phase representation since it is continuous.  A vector-average phase can be obtained as the &#039;&#039;&#039;[[Arg (mathematics)|arg]]&#039;&#039;&#039; of the sum of the complex numbers without concern about wrap-around.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Analytic signal]]&lt;br /&gt;
* [[Frequency modulation]]&lt;br /&gt;
&lt;br /&gt;
==Citations==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*{{cite book |first=Leon |last=Cohen |title=Time-Frequency Analysis |location= |publisher=Prentice Hall |year=1995 }}&lt;br /&gt;
*{{cite book |last=Granlund |first= |last2=Knutsson |first2= |title=Signal Processing for Computer Vision |location= |publisher=Kluwer Academic Publishers |year=1995 |isbn= }}&lt;br /&gt;
&lt;br /&gt;
[[Category:Signal processing]]&lt;br /&gt;
[[Category:Digital signal processing]]&lt;br /&gt;
[[Category:Time–frequency analysis]]&lt;br /&gt;
[[Category:Fourier analysis]]&lt;br /&gt;
[[Category:Electrical engineering]]&lt;br /&gt;
[[Category:Audio engineering]]&lt;/div&gt;</summary>
		<author><name>69.201.190.50</name></author>
	</entry>
</feed>