You are on page 1of 83

Copyright

Copyright © 2022 Matt Carrick. All rights reserved. No portion of this book
may be reproduced in any form without permission from the publisher,
except as permitted by U.S. copyright law.

For permissions contact: matt@wavewalkerdsp.com


Preface

A practicing DSP engineer must be able to answer two fundamental


questions:

How?
Why?

Answering How? is being able to describe how to design a low-pass filter,


how to demodulate a signal or how to implement an algorithm in software.
How? can be taught but Why? has to be experienced.

The most common question I receive from young engineers: Why?

Why is the filter applied in this way?


Why did you choose an FIR filter over an IIR filter?
Why do you need to pulse shape before transmitting symbols?

This book is the first in a series in which I will answer Why? for digital
signal processing. In this first edition I’ve done my best to answer questions
such as why sometimes Cartesian form is used instead of Polar form, why
arctangent has a phase ambiguity and why sine and cosine are used so
frequently in DSP among others.

This book summarizes all of my experience to help you answer your own
“Why?”. Please email me at matt@wavewalkerdsp.com or leave a
comment at https://wavewalkerdsp.com with any of your own why?
questions and I will do my best to answer them.

Thank you for reading my book!


About the Author

The author has gathered 20 years of DSP experience across academia and
industry. He has performed research both academically and in industry for
cyclostationary and software radio systems. He received a PhD in Electrical
Engineering from Virginia Tech on the topic of interference-mitigating
multicarrier waveforms using cyclostationarity 1 which resulted in a patent.
He also has his MSEE and BSEE in Electrical Engineering.

He has published a journal paper through IEEE 2 and EURASIP 3 on


cyclostationarity along with 9 other conference papers across various DSP
topics 4,5, 6,7,8,9, 10,11,12. He has been a user of GNU Radio for 10 years and
was funded by NumFOCUS.org and the GNU Radio Foundation to write a
set of beginner tutorials for GNU Radio 13.
Dedication

See, I am doing a new thing! Now it springs up; do you not perceive it?
Isaiah 43:19

The heart of the discerning acquires knowledge, for the ears of the wise
seek it out. Proverbs 18:15
Contents

1 Complex Numbers
1.1 Real, Imaginary and Complex Numbers
1.2 RE(⋅) and IM(⋅) Operators
1.3 Cartesian Form
1.4 Adding Complex Numbers In Cartesian Form
1.5 Multiplying Complex Numbers in Cartesian Form
1.6 Complex Number as a Triangle
1.7 Hypotenuse of a Triangle
1.8 Angle of a Triangle
1.9 Arctangent
1.10 Radians and Degrees
1.11 Positive and Negative Angles
1.12 Arctangent2
1.13 Conjugation
1.14 Euler’s Formula
1.15 The Unit Circle
1.16 Polar Form
1.17 Multiplying Complex Numbers in Polar Form
1.18 Dividing Complex Numbers
2 Derivations
2.1 Simplifying jn
2.2 Deriving Euler’s Formula
2.3 Sine as Complex Exponentials
2.4 Cosine as Complex Exponentials
2.5 Phase Relationship Between Sine and Cosine
2.6 Derivative of ejx
2.7 Derivative of Sine
2.8 Derivative of Cosine
2.9 Deriving sin2x + cos2x = 1
3 References
Chapter 1
Complex Numbers

Would you believe that today’s most sophisticated wireless communications


systems are based on the geometry and trigonometry taught in high school? It’s
true! This chapter applies basic geometry and trigonometry to complex numbers to
establish a proper mathematical foundation before moving onto advanced DSP
concepts.

This chapter introduces complex numbers, the mathematical language for all of
DSP. Geometry and trigonometry is applied to the complex plane in order to derive
mathematical tools for complex numbers such as calculating the magnitude and
phase of a complex number. Euler’s formula is presented as a way for a complex
number to be represented by its amplitude and phase. Later sections assume
knowledge and expertise with the foundational tools developed in this section.

Section 1.1: Describes real, imaginary and complex numbers


Section 1.2: The RE(⋅) and IM(⋅) operators
Section 1.3: How complex numbers are plotted on the complex plane using the
Cartesian form
Section 1.4: How to add complex numbers
Section 1.5: How to multiply complex numbers in Cartesian form
Section 1.6: A complex number is interpreted as a triangle
Section 1.7: Calculating the magnitude of a complex number
Section 1.8: Calculating the phase of a complex number with sine and cosine
Section 1.9: Calculating the phase of a complex number with arctangent
Section 1.10: Describes the use of radians instead of degrees
Section 1.11: Representing angles as both positive and negative values
Section 1.12: Fixing the phase ambiguity in arctangent with arctangent2
Section 1.13: Conjugating complex numbers
Section 1.14: Euler’s Formula
Section 1.15: Understanding the unit circle with Euler’s formula
Section 1.16: Representing complex numbers as complex exponentials in Polar
form
Section 1.17: How to multiply complex numbers in polar form
Section 1.18: How to divide complex numbers
1.1 Real, Imaginary and Complex Numbers

One way to think of real numbers is they are the numbers you use everyday: the
balance in your bank account, the temperature and the price of milk. Real numbers
can be whole numbers, often called integers. Real numbers have multiple decimal
places. Real numbers can be positive and negative. The following are examples of
real numbers:

2.39392
62
−15.3

1⁄3

An imaginary number is a real number that is joined by a partner j. A real number


7.8 becomes an imaginary number when it is multiplied by j,
(1.1)

The number j is a special number because it is the square-root of a negative number,


(1.2)

The square-root of a negative number (1.2) is a confusing concept when first


encountered. Put aside the need for a mathematical answer for a moment. The
number j can be interpreted as a designator that means the number is imaginary. The
following are examples of imaginary numbers:

53.6j
−j
−7.519j
j
j⁄7

Electrical engineers use j to represent however mathematicians and other


disciplines use i to represent the same quantity.

Complex numbers are the superset of real and imaginary numbers. A complex
number c is typically represented using the form
(1.3)
where a is the real component and jb is the imaginary component.

Real numbers can be interpreted as complex numbers where the imaginary


component is zero. For example, 3 is a real number which can be interpreted as the
complex number 3 + 0j. Similarly, an imaginary number is a complex number
whose real component is zero. For example, −6.13j is an imaginary number which
can be interpreted as the complex number 0 − 6.13j. The following are examples of
complex numbers:

75.4 − 7j
−2.8 − 0.8j
0 + 5.4j
0.28 + 0j
−4 − j
6.02 + πj

1.2 RE(⋅) and IM(⋅) Operators

The RE(⋅) and IM(⋅) are the mathematical operations which extract the real and
imaginary components of a complex number. The real and imaginary portions of a
complex number c = a + jb can be obtained by the operators
(1.4)

(1.5)

Note that the IM operator in (1.5) does not include the j term. For example, when
(1.6)

the real and imaginary components are


(1.7)

(1.8)
Being able to treat the real and imaginary components of c independently can be
useful in situations such as measuring the angle of a complex number (Section 1.8).

1.3 Cartesian Form

Complex numbers written as


(1.9)

are referred to as Cartesian form. Complex numbers in the Cartesian form may also
be referred to as Cartesian coordinates because they can be interpreted as a two-
dimensional vector in the complex plane. The complex plane has two axes, the real
dimension and the imaginary dimension. Figure 1.1 is an example of the complex
number 2 + 3j being plotted in the complex plane as a complex vector.

Figure 1.1: The complex vector 2 + 3j in the complex plane.

Notice from Figure 1.1 that the number a describes how far and what direction the
complex vector protrudes into the real dimension. Similarly the number b describes
how far and what direction the complex vector protrudes into the imaginary
dimension.

The Cartesian form is the default representation for complex numbers used in
computing systems, software radios and field-programmable gate arrays (FPGA)
because they are easily represented as a two-dimensional array. However, the polar
form (Section 1.16) tends to be easier to manipulate when working with equations
by hand.

1.4 Adding Complex Numbers In Cartesian Form

For a complex number


(1.10)

the real component a and imaginary component jb are like oil and water: they do
not mix and cannot mix. The mathematical way to say this is that they are
orthogonal. Adding a real number m to a complex number a + jb only effects the
real component,
(1.11)

For example, adding the number 2 to the number 2 + 3j results in


(1.12)

Figure 1.2 shows how only the real dimension of the complex number is effected by
the addition of a real number in (1.12).
Figure 1.2: Adding the real number 2 to 2+3j only effects the real portion of
the complex vector.

Adding an imaginary number nj to a complex number a + jb only effects the


imaginary component,
(1.13)

Adding the number −5j to the number 2 + 3j results in


(1.14)

Figure 1.3 shows how only the imaginary dimension of the complex number is
effected by the addition of a imaginary number in (1.14).
Figure 1.3: Adding the imaginary number −5j to 2 + 3j only effects the
imaginary portion of the complex vector.

Combining (1.11) and (1.13), the addition of two complex numbers is defined as
(1.15)

For example, adding 1 + 3j and 6 − 2j results in


(1.16)

shown in Figure 1.4.


Figure 1.4: An example of adding two complex numbers. The addition result
is as if one complex vector was placed at the tail of the other.

1.5 Multiplying Complex Numbers in Cartesian Form

Multiplication of a complex number is distributive, meaning the multiplication of a


real number m against a complex number a + jb is
(1.17)

Both the real and imaginary components are multiplied by m. For example,
multiplying complex number 1 + 2j by real number 1.5 results in
(1.18)
as shown in Figure 1.5.

Figure 1.5: Multiplying a complex number by a real number scales both real
and imaginary components of the complex number.

Multiplication of an imaginary number jn is also distributive, meaning both the real


and imaginary components are multiplied by jn,

(1.19)

What is to be made of j2 in (1.19)? Recall from (1.2) that j = . The square-root


of a number can be written with an exponent,
(1.20)

such that
(1.21)

Therefore

(1.22)

By substituting (1.22) into (1.19) the multiplication is therefore written as

(1.23)
(1.24)

(1.25)

(1.26)

For example, the multiplication of c0 = −2 + 3j by c1 = −2j results in

(1.27)

as shown in Figure 1.6.

Figure 1.6: An example of multiplying a complex number by an imaginary


number.

The multiplication of two complex numbers can be written using (1.17) and (1.26),
(1.28)
(1.29)

(1.30)

For example, two complex numbers c2 = −2 − 3j and c3 = 4 + 2j are multiplied


according to (1.30) and result in
(1.31)

(1.32)

(1.33)

as shown in Figure 1.7.


Figure 1.7: An example of multiplying complex numbers in Cartesian form.

Computing systems multiply complex numbers using the Cartesian form in (1.30)
however it can be cumbersome when working with pen and paper. Multiplication of
two complex numbers using the polar form (Section 1.16) is much easier and less
prone to error when working with equations by hand.

1.6 Complex Number as a Triangle

A complex number c = a + jb can be interpreted as a triangle whose opposite side is


length a and whose adjacent side is length b. Interpreting a complex number as a
triangle enables the use of trigonometric equations as a set of tools to analyze and
represent complex numbers. The complex number c = 2 + j is displayed in the
complex plane in Figure 1.8 as three parts: the complex number c, the real
component 2 and the imaginary component j.

Figure 1.8: The real and imaginary components of the complex number c in
the complex plane.
The “open” end of the triangle can be enclosed by the imaginary component as
shown in Figure 1.9. The number 2j is not moved, it is only drawn to make
visualizing the triangle easier so the angle can be displayed.

Figure 1.9: A complex number can be interpreted as a triangle in the complex


plane.

Complex numbers are described as triangles because it enables the broad


mathematical toolbox of trigonometric functions to both analyze and modify
complex numbers. Section 1.7 shows how the magnitude of a complex number is
described by the length of the hypotenuse of the triangle. Section 1.8 demonstrates
how to compute the angle of a complex number based on the real and imaginary
elements.

1.7 Hypotenuse of a Triangle

Section 1.6 describes how a complex number c = a + jb can be interpreted as a


triangle with sides a and b. The magnitude of a complex number |c| is the same as
the hypotenuse of a triangle which is calculated by
(1.34)
For example, the magnitude of c = 1 − 2j is

(1.35)

Figure 1.10 demonstrates how the magnitude of a complex number can be


calculated as the length of the hypotenuse of a triangle using (1.34).

Figure 1.10: The magnitude of a complex number is the length of the


hypotenuse of the triangle formed by the opposite and adjacent lengths of
the complex vector.

The magnitude of a complex number is it’s length in the complex plane. The sides
of the triangle represented by c can be negative, however the magnitude cannot be a
negative number. The numbers a and b are real numbers and the square of a real
number must be positive. Therefore (1.34) must be a positive number.

1.8 Angle of a Triangle

The angle of a triangle


is related to the adjacent side a and opposite side b through

(1.36)

(1.37)

where |c| is the hypotenuse of the triangle or equivalently the magnitude of the
complex number c and a = RE and b = IM . The angle can be calculated by
taking the arccosine of (1.36),

(1.38)

(1.39)

where arccosine is the inverse of cosine such that


(1.40)

Similarly, the angle can be calculated by taking the arcsine of (1.37),

(1.41)

(1.42)
where arcsine is the inverse of sine such that
(1.43)

For a complex number c = 1 + 0.5j (Figure 1.11) the magnitude is calculated as

(1.44)

The angle of c can be calculated using (1.39),

(1.45)

The same angle can also be calculated using (1.42),

(1.46)
Figure 1.11: The angle can be calculated using trigonometric identities which
relate the sides of the triangle to the hypotenuse.

Section 1.9 demonstrates how the angle of a triangle can be calculated more
efficiently using the arctangent of the two sides since it does not require the
additional calculation of the magnitude.

1.9 Arctangent

Tangent and arctangent are useful because they calculate the angle of a triangle
based on the sides a and b and without having to also calculate the magnitude.
Calculating the angle of a complex number is common in DSP and saving
computations results in more efficient systems.

Tangent relates the angle


of a triangle to the adjacent side a and opposite side b,

(1.47)

Substituting in (1.36) and (1.37) for cos and sin in (1.49), tangent can then be
written in terms of a and b,

(1.48)

(1.49)

The inverse of tangent, or arctangent, is used to calculate the angle. Taking the
arctangent of both sides of (1.49),

(1.50)

(1.51)

Returning to the triangle example in Figure 1.11 the complex number is


(1.52)

The angle of c can therefore be calculated using (1.53),

(1.53)
which is the same angle as shown in Figure 1.11.

Warning! The arctangent has a angle ambiguity which is discussed in Section 1.12
and demonstrates why arctan2 should be used instead of arctan.

1.10 Radians and Degrees

The angles in Sections 1.8 and 1.9 are given in terms of π because their unit is in
radians, however degrees are more commonly used in every day language. In 1999
Tony Hawk completed a “900” 1 in which he spun 900∘ on a skateboard. Using
“900” to represent the number of revolutions appears to be a more elegant method
than using 5π radians or even 15.7 radians. So why are π and radians used in DSP?

Radians are the unit used to represent angles in terms of π. The number π represents
the ratio of the circumference of a circle C to it’s diameter d,

(1.54)

The diameter d of a circle is twice the length of the radius r, d = 2r, such that the
circumference C (1.54) can be written as
(1.55)

Figure 1.12 shows a circle of radius r. The distance between the two vectors shows
an example arc length L. The arc length is the distance along the circumference of
the circle corresponding to the angle
Figure 1.12: The arc length L is the distance along the circumference
corresponding to the angle. The arc length at multiple points along the
circumference are labeled outside the circle.
Figure 1.13: The circumference of the circle is laid out on a number line from
0 to 2πr. The arc length L is the distance between the two points along the
circumference of the circle.

Figure 1.13 lays out the circumference of the circle on a number line from 0 to 2πr.
A longer radius r results in a larger arc length for the same angle. Therefore
dividing the arc length by the radius (Figure 1.14) produces the range of angles in
the circle from 0 radians to 2π radians 2.

Figure 1.14: The angle is laid out on a number line from 0 to 2π.

Radians can be converted into degrees by through

(1.56)

which scales the angle in radians by the ratio of degrees in a circle by the number of
radians. Degrees can be converted into radians by rearranging (1.56),
(1.57)
Radians are used because of the geometric relationships that cause angles to be in
terms of π. The polar form (Section 1.16) for complex numbers is a compact way to
represent sine and cosine of an angle, therefore the polar form will also use angles
in radians.

1.11 Positive and Negative Angles

Angles in the complex plane are measured from the point 1 + 0j. Positive angles are
measured in the counter-clockwise direction from 1 + 0j and are represented from 0
to 2π as in Figure 1.15.

Figure 1.15: Positive angles are measured from 1 + 0j in the counter-clockwise


direction and are given within the range of 0 to 2π.

Negative angles are measured in the clockwise direction from 1 + 0j and are
represented from −2π to 0 as in Figure 1.16.
Figure 1.16: Negative angles are measured from 1 + 0j in the clockwise
direction and are given within the range of −2π to 0.

However, the most common way of representing angles is on the range from −π to π
as in Figure 1.17.
Figure 1.17: Angles are most commonly measured between −π to π.

1.12 Arctangent2

The angle of a complex number c = a + jb can be computed using the arctangent


however there is an angle ambiguity due the division of the real a and imaginary
components b in arctangent (Section 1.9). The arctangent2 operation 3,4 is
introduced to correct for the angle ambiguity.

Consider the two complex numbers


(1.58)

(1.59)

The angle of c0 using the arctangent (1.53) is calculated as


(1.60)
and the angle of c1 is calculated as

(1.61)

The angles of c0 and c1 are calculated to be the same value, arctan , due to the
division of b⁄a. However, their actual angles are π⁄4 and −3π⁄4 as shown in Figure
1.18.

Figure 1.18: The complex numbers c0 and c1 with their correct angles
displayed.

The complex numbers


(1.62)

(1.63)

also have a problem with angle ambiguity when using arctangent. The angles of c2
and c3 are calculated to be the same when using arctangent,

(1.64)

(1.65)

However, the correct angles of c2 and c3 are 3π⁄4 and −π⁄4 as shown in Figure 1.19.
Figure 1.19: The complex numbers c2 and c3 with their correct angles
displayed.

The arctangent2 takes into account the polarity of the real and imaginary portions to
correct for the angle ambiguity in arctangent. The angle of a complex number c = a
+ jb is denoted by the symbol ∢.

(1.66)

The angles for c0, c1, c2 and c3 are calculated using arctangent2,

(1.67)

(1.68)

(1.69)

(1.70)

1.13 Conjugation

Conjugation negates the imaginary component of a complex number. The


conjugation operator is given by (⋅)∗ and the conjugate of a complex number c is
denoted by c∗. For c = a + jb the conjugate is given by
(1.71)

Conjugation is the mirroring of c across the imaginary axis which also negates the
angle of the complex number,
(1.72)

Figure 1.20 plots the complex number c = −1 + 2j and it’s conjugate c∗ = −1 − 2j in


the complex domain.
Figure 1.20: The conjugation of a complex number negates the imaginary
component which negates the angle of the complex number.

1.14 Euler’s Formula

A complex number c can be interpreted as a triangle in the complex plane (Section


1.6).

Euler’s formula 5,
(1.73)

uses a complex exponential

to relate the phase


to the adjacent side cos and opposite side j sin of a triangle as in Figure 1.21.
The term angle is used for a triangle however the term phase is used to represent the
same quantity for a complex number.

Figure 1.21: The cos and j sin terms represent the adjacent and opposite
sides of a triangle in the complex plane.

Where the geometry in Section 1.6 is true for any size triangle, Euler’s formula
refers to a specific subset of triangles whose hypotenuse is 1. Taking the magnitude
of (1.73) with the aid of (2.66),

(1.74)

(1.75)

(1.76)

(1.77)
(1.78)

The phase of the complex exponential

is

derived according to
(1.79)

(1.80)

(1.81)

which can also been seen from Figure 1.21. Euler’s formula therefore represents a
complex vector with magnitude 1 and phase
(1.82)

Euler’s formula is widely applied in DSP because it is the foundation for the polar
form (Section 1.16) and in representing the unit circle (Section 1.15). Section 2.2
describes how Euler’s formula is derived and why a complex exponential is written
as sine and cosine, forming the basis for complex sinusoids.

1.15 The Unit Circle

The unit circle is a circle of radius 1 centered at 0 + 0j in the complex plane. The
unit circle can be represented by a complex exponential

with Euler’s formula (1.73) where the angle is defined over


Figure 1.22 shows examples of complex vectors on the unit circle using Euler’s
formula.

Figure 1.22: Examples of complex exponentials using Euler’s formula plotted


atop the unit circle.

The unit circle is useful because it provides a reference point in the complex plane.
Signal and filter parameters can be measured based on their relationship to the unit
circle. For example, the unit circle is used as a reference when measuring and
visualizing the phase, frequency and amplitude of a complex signal, displaying
constellation diagrams in the complex plane and for displaying pole-zero plots to
describe the response of digital filters.

1.16 Polar Form

The polar form of complex number c is given by


(1.83)

where R is the magnitude and


is the phase of the complex number. The polar form is a generalization of Euler’s
formula (1.73). Where Euler’s formula is a complex number with magnitude 1 the
polar form represents a complex number with magnitude R. Any complex number
can be represented by either the polar form or Cartesian form.

The polar form of a complex number can be converted into the Cartesian form
through Euler’s formula (1.73),
(1.84)

A complex number in Cartesian form c = a + jb can be converted into polar form by


calculating the magnitude and phase

(1.85)

(1.86)

and then substituting (1.85) and (1.86) into (1.83).

For example, a complex number 4 − j can be converted into polar form by


calculating the magnitude (1.85) and phase (1.86),
(1.87)

(1.88)

The polar form of 4 − j can therefore be written as


(1.89)

The complex vector 4 − j and its angle is given in Figure 1.23.


Figure 1.23: The complex vector 4 − j plotted in the complex plane alone with
the angle.

Polar form is most commonly used mathematically (pen and paper) due to its
simplified multiplication (Section 1.17). Almost all useful DSP functions require
complex multiplication and therefore the polar form is the most common when
working through the mathematics manually.

1.17 Multiplying Complex Numbers in Polar Form

Two complex numbers in polar form (Section 1.16) are given by

and

The multiplication of two complex exponentials is given by


(1.90)
which is the multiplication of the two magnitudes R0 ⋅R1 and the addition of the two
phases

For example, two complex exponentials 1.5ejπ and 2ej3π⁄4 are multiplied resulting in
(1.91)

Figure 1.24 shows how the magnitude of the multiplication result is the scaled
version of the two magnitudes and the phase of the result is the addition of the two
phases.

Figure 1.24: The multiplication of two complex numbers scales their


magnitudes and adds their two phases.
1.18 Dividing Complex Numbers

The division of complex numbers is most easily understood using the polar form.
Any division can be written as the multiplication of one quantity with the inverse of
another. As an example the division of real numbers x and y can be written as a
multiplication by

(1.92)

The complex numbers

and

are divided by using (1.92),

(1.93)

What is to be done about a complex exponential raised to a negative power? The


exponent of a quantity is applied to each of the terms,

(1.94)

Using (1.94) the inverse of the complex exponential is therefore

(1.95)

When an number is raised to an exponent, and that quantity is also raised to an


exponent, the result is the multiplication of the two exponents,
(1.96)
The inverse of the complex exponential can simplified using (1.96),

(1.97)

therefore (1.95) can be written as

(1.98)

By substituting (1.98) into (1.93) the division of the two complex numbers is
written as

(1.99)

(1.100)

(1.101)

(1.102)

which is the division of the two magnitudes and the subtraction of the two phases.
Compare (1.102) against the multiplication of two complex numbers (Section 1.17)
which is the multiplication of their magnitudes and the addition of their phases.

For example, the division of two complex numbers 3ejπ and 2ejπ⁄3 using (1.102) is
given by
(1.103)
(1.104)

Figure 1.24 shows result of the division of the two complex exponentials.

Figure 1.25: The division of two complex numbers results in the ratio of the
two magnitudes and the subtraction of the two phases.
Chapter 2
Derivations

Much of the undergraduate DSP education has to be taken on faith due to the large
amount of material to be covered in a limited time. This section answers why? some
of the foundational formulas and equations came to be and how they are derived.
The derivation of Euler’s formula is described as well as host of trigonometric
identities which use Euler’s formula.

Section 2.1: Simplifying jn


Section 2.2: Deriving Euler’s formula
Section 2.3: Writing sine as complex exponentials
Section 2.4: Writing cosine as complex exponentials
Section 2.5: Showing phase relationship between sine and cosine
Section 2.6: Derivative of Euler’s number ejx
Section 2.7: Taking the derivative of sine
Section 2.8: Taking the derivative of cosine
Section 2.9: Deriving sin2x + cos2x = 1

2.1 Simplifying jn

The term j is defined as


(2.1)

Therefore j2 can be simplified as

(2.2)

Using (2.2) j3 can be simplified as


(2.3)

Using (2.2) j4 can be written as


(2.4)
A pattern emerges when continuing jn for n > 4,

(2.5)

which can be simplified as


(2.6)

2.2 Deriving Euler’s Formula

Euler’s formula (1.73) is

(2.7)

The derivation of Euler’s formula starts by writing ex as a Taylor series expansion


1,2,

(2.8)

Substituting jx → x into (2.8),


(2.9)
The term jn is periodic such that jn = jn+4 (2.6) therefore (2.9) is separated into four
summations,

(2.10)

The terms jn are simplified according to (2.5),


(2.11)

(2.12)

(2.13)

(2.14)

Substituting (2.11) - (2.14) into (2.10),

(2.15)

The even and odd terms are gathered into their respective series,

(2.16)

By defining n = 2m the even series can be written as

(2.17)
which is the Taylor series expansion for cosine 3,

(2.18)

By defining n = 2m + 1 the odd series can be written as

(2.19)

which is the Taylor series expansion for sine 4,

(2.20)

The Taylor series expansion of ejx can therefore be written as a combination of the
even and odd series,

(2.21)

Euler’s formula is created by substituting (2.18) and (2.20) into (2.21),


(2.22)

2.3 Sine as Complex Exponentials

Sine can be written in terms of complex exponentials,

(2.23)
Start with Euler’s formula (1.73),

(2.24)

Subtract

from both sides of Euler’s formula,


(2.25)

By gathering like terms and simplifying, (2.25) can be written as

(2.26)

Dividing (2.26) by 2j results in

(2.27)

which is the starting form (2.23).

2.4 Cosine as Complex Exponentials

Cosine can be written in terms of complex exponentials,

(2.28)

Start with Euler’s formula (1.73),

(2.29)

Add
to both sides of Euler’s formula,
(2.30)

By gathering like terms and simplifying, (2.30) can be written as

(2.31)

Dividing (2.31) by 2 results in

(2.32)

which is the starting form (2.28).

2.5 Phase Relationship Between Sine and Cosine

Sine and cosine are related to one another through a delay of π⁄2,

(2.33)

as shown in Figure 2.1.

Figure 2.1: Sine and cosine are related through a delay of π⁄2.
Using the variable ϕ, cosine can be written as the summation of two complex
exponentials (2.28),

(2.34)

Defining
(2.35)

allows (2.34) to be written as


(2.36)

Two terms can be simplified in (2.36),

(2.37)

(2.38)

Substituting (2.37) and (2.38) into (2.36),

(2.39)

Multiplying (2.39) by j⁄j and simplifying,

(2.40)

The term j2 is simplified as

(2.41)

therefore
(2.42)
Sine can be written as the summation of two complex exponentials (2.23),

(2.43)

which is the same as the right hand side of (2.42), therefore

(2.44)

as stated in (2.33).

2.6 Derivative of ejx

The derivative of Euler’s number is given by 5,

(2.45)

Substituting j = → a into (2.45),

(2.46)

2.7 Derivative of Sine

The derivative of sine is cosine 6,


(2.47)
Sine can be written as the summation of two complex exponentials (2.23),

(2.48)

Taking the derivative of (2.48) is therefore

(2.49)

(2.50)

Substituting for the derivative

from (2.46),

(2.51)

(2.52)

(2.53)
(2.54)

(2.55)

which is the same as the starting condition (2.47).

2.8 Derivative of Cosine

The derivative of cosine is negative sine 7,

(2.56)

Cosine can be written as the summation of two complex exponentials (2.28),

(2.57)

Taking the derivative of (2.57) is therefore

(2.58)

(2.59)
Substituting for the derivative

from (2.46),

(2.60)

(2.61)

(2.62)

(2.63)

(2.64)

(2.65)

which is the same as the starting condition (2.56).

2.9 Deriving sin2x + cos2x = 1

Sine-squared and cosine-squared are equal to 1,

(2.66)
The terms sin2x and cos2x are considered separately and then summed.

Sine can be written in terms of complex exponentials (2.23),

(2.67)

therefore sine-squared is

(2.68)

(2.69)

(2.70)

Cosine can be written in terms of complex exponentials (2.28),

(2.71)

therefore cosine-squared is

(2.72)

(2.73)

(2.74)
Adding (2.70) and (2.74),

(2.75)

(2.76)

(2.77)

(2.78)

which is the same as (2.66).


Chapter 3
References
1M. Carrick, Cyclostationary Methods for Communication and Signal Detection Under Interference.

September 24, 2018, https://vtechworks.lib.vt.edu/handle/10919/85126


2M. Carrick. J. Reed, C. Spooner, Mitigating Linear-Frequency-Modulated Pulsed Radar Interference

to OFDM. January 14, 2019, https://ieeexplore.ieee.org/document/8611466


3M. Carrick, J. Reed, C. Spooner, Paramorphic multicarrier communications for interference

mitigation. January 5, 2018, https://asp-eurasipjournals.springeropen.com/articles/10.1186/s13634-


017-0523-7
4M. Carrick, J. Reed, f. harris, An optimal filter for signals with time-varying cyclostationary

statistics. August 23-25, 2017. https://ieeexplore.ieee.org/document/8096078


5M. Carrick, J. Reed, Exploiting the cyclostationarity of radar chirp signals with time-varying filters.

November 14-16, 2017, https://ieeexplore.ieee.org/document/8308647


6M. Carrick, J. Reed, Improved GFDM equalization in severe frequency selective fading. September

18-20, 2017, https://ieeexplore.ieee.org/document/8080391


7M. Carrick, D. Jaeger, f. harris, Design and Application of a Hilbert Transformer in a Digital

Receiver. November 29 - December 2, 2011,


https://www.wirelessinnovation.org/assets/Proceedings/2011/2011-1b-carrick.pdf
8M. Carrick, S. Sayed, C. Dietrich, Integration of FPGAs into SDR via Memory-Mapped I/O.

December 1-4, 2009, https://www.wirelessinnovation.org/index.php?


option=com_content&view=article&id=350:sdr09-proceedings&catid=19:site-content
9M. Yao, M. Carrick, M. Sohul, V. Marojevic, C. Patterson, J. Reed, Semidefinite Relaxation-Based

PAPR-Aware Precoding for Massive MIMO-OFDM Systems. October 8, 2018,


https://ieeexplore.ieee.org/document/8485724
10M. Sohul, M. Yao, A. Abdallah, M. Carrick, V. Marojevic, J. Reed, Quality of service assurance-

based auction for spectrum sharing systems. May 1, 2017, https://dl.acm.org/doi/10.1007/s10470-


017-0932-4
11T. Koehn, M. Carrick, P. Athanas, An efficient structure for run-time configuration of synthesis

and channelizer filter banks. December 7-9, 2015, https://ieeexplore.ieee.org/document/7393302


12J. Neel, S. Sayed, M. Carrick, C. Dietrich, J. Reed, PCET: A Tool for Rapidly Estimating Statistics

of Waveform Components Implemented on Digital Signal Processors. October 26-30, 2008,


https://www.wirelessinnovation.org/assets/Proceedings/2008/sdr08-4.4-3-neel.pdf
13M. Carrick, New GNU Radio Beginner Tutorials. February 2, 2022,

https://www.wavewalkerdsp.com/2022/02/02/new-gnu-radio-beginner-tutorials/
1Dose Skateboarding, Remembering Tony Hawk’s 900. June 29, 2020,

https://doseskateboarding.com/articles/remembering-tony-hawk-900
2Wikipedia, Radian. March 2, 2022, https://en.wikipedia.org/wiki/Radian
3The Mathworks, Inc., atan2. March 4, 2022,

https://www.mathworks.com/help/matlab/ref/atan2.html
4NumPy Developers, numpy.arctan2. March 4, 2022,

https://numpy.org/doc/stable/reference/generated/numpy.arctan2.html
5R. Lyons, Understanding Digital Signal Processing, Third Edition. 2011.
13Brown1Blue, What is Euler’s formula actually saying? — Ep. 4 Lockdown live math. April 28,

2020, https://www.youtube.com/watch?v=ZxYOEwM6Wbk
2Wikipedia, Taylor series. March 3, 2022, https://en.wikipedia.org/wiki/Taylor_series
3Wikipedia, Taylor series. March 3, 2022, https://en.wikipedia.org/wiki/Taylor_series
4Wikipedia, Taylor series. March 3, 2022, https://en.wikipedia.org/wiki/Taylor_series
5Wikipedia, Differentiation rules. March 4, 2022, https://en.wikipedia.org/wiki/Differentiation_rules
6Wikipedia, Differentiation of trigonometric functions. March 2, 2022,

https://en.wikipedia.org/wiki/Differentiation_of_trigonometric_functions
7Wikipedia, Differentiation of trigonometric functions. March 2, 2022,

https://en.wikipedia.org/wiki/Differentiation_of_trigonometric_functions

You might also like