0% found this document useful (0 votes)
369 views10 pages

Signals and Systems

Exponential and sinusoidal signals play an important role in signal analysis. Here we will see how they look by generating and viewing some samples of them in Matlab. Real exponentials with positive and negative a values are called growing and decaying exponentials respectively.

Uploaded by

Kiruthika Alagar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
369 views10 pages

Signals and Systems

Exponential and sinusoidal signals play an important role in signal analysis. Here we will see how they look by generating and viewing some samples of them in Matlab. Real exponentials with positive and negative a values are called growing and decaying exponentials respectively.

Uploaded by

Kiruthika Alagar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 10

SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H.

ASYALI)

Project #6
Continuous Time Complex Exponential and Sinusoidal Signals

Exponential and sinusoidal signals play an important role in signal


analysis, as we can express many other signals in terms of these signals. Here we
will see how they look by generating and viewing some samples of them in
Matlab.

Part 1: Real Exponential Signals


General continuous time complex exponential functions have the form
x(t ) = Ce at , (6.1)

where C and a complex numbers in general. When both C and a are real, x(t)
becomes a real function.
Let us create some examples of real exponential signals over a time
axis stretching from –1 to 1, for both positive and negative a values. We will take
the value of C as 1, in all cases below.
» t=-1:0.01:1; MCL 1
» x1=exp(t);x2=exp(2*t); MCL 2
» x3=exp(-t);x4=exp(-2*t); MCL 3
» plot(t,x1,t,x2,t,x3,t,x4);grid MCL 4
» xlabel('t');ylabel('x(t)') MCL 5
» title('Examples of Real Time Exponentials') MCL 6
» legend('a=1','a=2','a=-1','a=-2') MCL 7

While plotting more than one x-y pair of variables or data, the plot
utility automatically selects a different color for each pair. That is how we
obtained the colorful picture shown in Figure 6.1. In figures with multiple plots,
the legend utility comes to rescue to let us know which plot depicts what.

27
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

After doing a multiple plot, we just present the legend utility with the
list of identification tags corresponding to the plots and it takes care of the rest. It
creates a legend box that we can drag –with mouse– to wherever we like on the
figure window.
Real exponentials with positive and negative a values are called
growing and decaying exponentials respectively.

Examples of Real Exponentials


8

a=1
a=2
7 a=-1
a=-2

5
x(t)

0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
t

Figure 6.1 Some examples of real exponential signals.

We will show you some Matlab tricks now. The work that we have
done by MCL 1 through MCL 4 could have been done by a single line. Amazing
but true! Study and try to understand the following line where we utilized
Matlab’s capabilities to handle matrices heavily. Actually, this is more than what
we have done, as it also includes the case of a being 0.

28
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

» t=-1:0.01:1;a=-2:2;x=exp(t'*a);plot(t,x);grid

Almost every argument to Matlab functions can be a single value, or a


vector or a matrix, in which case the function tries to do the most reasonable act
consistent with the specific task it was designed to do. Using vector or matrix
arguments where possible is encouraged in Matlab, as this helps run Matlab
codes much faster.
For instance, the plot function above has a vector of size M by 1 as its
first argument (or the x-axis) and a matrix of size N by M as its second argument
(or the y-axis), in which case it plotted each column of the second argument with
respect to the first argument, one by one.
Can you now explain what the statement in the middle, i.e.
x=exp(t'*a); does? (The apostrophe “’” sign denotes the transpose
operation.)

Part 2: Periodic Complex Exponential and Sinusoidal Signals


When the parameter a in equation (6.1), i.e. in the expression of the
general continuous time complex exponential function, is purely imaginary, then
the exponential signal will be periodic. We can show this as follows.
Let a = jw0, then x(t) defined as Ce at becomes
x(t ) = Ce jw0t , (6.2)

and x(t+T) becomes


x(t + T ) = Ce jw0 ( t +T ) = Ce jw0t e jw0T . (6.3)

For the last expression to be equal to x(t), e jw0T must be 1, which


implies that
w0T = ±2π k , (6.4)

where k is an integer. We therefore find the fundamental period of x(t), T0, as

29
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

2π k 2π
T0 = ± = . (6.5)
w0 k =1
w0

We will now show that the complex signal x(t) has sinusoidal real and
imaginary parts. To that end, we express the complex number in polar form as
C = C e jφ . (6.6)

Then by substituting equation (6.6) in equation (6.2) and using Euler’s


formula, x(t) becomes
x(t ) = C e jφ e jw0t = C e j ( w0t +φ )
(6.7)
= C [ cos( w0t + φ ) + j sin( w0t + φ ) ].

From equation (6.7) we figure out that


Re { x(t )} = C cos( w0t + φ )
(6.8)
Im { x(t )} = C sin( w0t + φ ).

This way, we have shown that the well-known general cosine or sine
functions or signals are real and imaginary parts of a complex exponential signal
with a purely imaginary exponent, respectively.
Let us now concentrate on the cosine signal of the form
x(t ) = A cos( w0t + φ ) , where we have renamed the amplitude as A. We will

change the parameters A (amplitude), w0 (angular frequency) and φ (phase), and


make several plots to see their effect on signal shape.
Below, we generate and plot four cosine signals with different set of
parameters. Each time we changed one of three parameters of a reference cosine
signal with A = 1, w0 = 2π and φ = 0. The result is shown in Figure 6.2.
» t=-1:0.01:1; MCL 8
» A=1;w0=2*pi;phi=0;x1=A*cos(w0*t+phi); MCL 9
» A=2;w0=2*pi;phi=0;x2=A*cos(w0*t+phi); MCL 10
» A=1;w0=4*pi;phi=0;x3=A*cos(w0*t+phi); MCL 11

30
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

» A=1;w0=2*pi;phi=-pi/2;x4=A*cos(w0*t+phi); MCL 12
» plot(t,[x1;x2;x3;x4]');grid MCL 13
» xlabel('t');ylabel('x(t)') MCL 14
» title('Examples of Cosine Signals') MCL 15
» legend('A=1,wo=2*pi,phi=0','A=2,wo=2*pi,phi=0','A=1,...
» wo=4*pi,phi=0','A=1,wo=2*pi,phi=-pi/2') MCL 16

Note how we combined different cosine signals into a matrix at MCL


13. Note also the three dots “…” at MCL 16, this continuation feature enables us
to divide long command lines into shorter ones.
As we observe in Figure 6.2, with the proper choice of the phase term
φ, a cosine can become a sine and vice versa. Therefore both cosine and sine
signals go under the name sinusoidal signals.
Examples of Cosine Signals
2

A=1,wo=2*pi,phi=0
A=2,wo=2*pi,phi=0
1.5 A=1,wo=4*pi,phi=0
A=1,wo=2*pi,phi=-pi/2

0.5
x(t)

-0.5

-1

-1.5

-2
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
t

Figure 6.2 Some examples of cosine signals.

31
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

Part 3: Harmonically Related Complex Exponentials


Here, we will generate harmonically related periodic complex
exponential signals defined as

{φ }
w0 , k
k = 0, ±1, ± 2,…
= e jkw0t . (6.9)

A member of this set of functions (signals) for any particular value of k is



periodic with a fundamental period Tk = and all the signals in this set are
| k | w0

periodic with T0 = 2π / w0 . We should note here that for any different value of
angular frequency w0, we have a different set of harmonically related signals.
Notation used in equation (6.9) clearly emphasizes this point. Another commonly
used notation to denote harmonically related exponentials is to write down a
member of this set for a particular value of k as φk (t ) = e jkw0t .

Let us take w0 as 2π and generate a few samples from the


corresponding set, for k = −2, 0, 1, and 3. As these signals are complex valued,
we will plot their real and imaginary parts separately. The result is shown in
Figure 6.3.
» t=-1:0.01:1;w0=2*pi; MCL 17
» k=-2;Phi_2=exp(j*k*w0*t); MCL 18
» k=0;Phi0=exp(j*k*w0*t); MCL 19
» k=1;Phi1=exp(j*k*w0*t); MCL 20
» subplot(2,1,1) MCL 21
» plot(t,real(Phi_2),'k',t,real(Phi0),'k:',...
t,real(Phi1),'k-.') MCL 22
» set(gca,'ylim',[-1.1 1.1]) MCL 23
» title('Harmonically Related Exponentials') MCL 24
» ylabel('Real Part') MCL 25
» legend('k=-2','k=0','k=1') MCL 26
» subplot(2,1,2) MCL 27
» plot(t,imag(Phi_2),'k-',t,imag(Phi0),'k:',...
t,imag(Phi1),'k-.') MCL 28

32
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

» set(gca,'ylim',[-1.1 1.1]) MCL 29


» xlabel('t');ylabel('Imaginary Part') MCL 30

Note how we set the y-axes limits at MCL 23 and MCL 29, by using the ylim
property of axes objects1. Note also the use of plot utility at MCL 22 and MCL 28,
the string arguments following an x-y pair indicates the color and type of line or
marker to be used to plot that particular pair. For instance, the string 'k-'
indicates that the preceding pair will be plotted using a black solid marker. For
other marker (color and type) codes refer to the plot utility’s help.

Harmonically Related Exponentials


1
k=-2
k=0
0.5 k=1
Real Part

-0.5

-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

0.5
Imaginary Part

-0.5

-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
t

Figure 6.3 Real (upper panel) and imaginary (lower panel) parts of harmonically related
exponentials for w0 = 2π and k = −2, 0, and 1.

1
To see other properties of axes objects, type “get(gca)” at the Matlab prompt, where gca
refers to the handle of current axes object.

33
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

Part 4: General Complex Exponential Signals


Here we will study the complex exponential signal x(t ) = Ce at in its
most general form, where both C and a complex numbers. We express C in polar
form as in equation (6.6), C = C e jφ and a in rectangular form as

a = r + jw0 (6.10)

Then by substituting equations (6.6) and (6.10) into (6.1), x(t) becomes
x(t ) = C e jφ e( r + jw0 ) t = C ert e j ( w0t +φ )
= C e rt [ cos( w0t + φ ) + j sin( w0t + φ ) ] . (6.11)
= C e rt cos( w0 t + φ ) + j C e rt sin( w0t + φ )

We observe that both real and imaginary parts of the complex


exponential signal are sinusoidal bounded by an envelope | C | e rt . Let us now
generate a few samples of this signal with growing and decaying exponential
envelopes. For the first sample we will select C = e jπ / 4 and r = 1 + j 4π , hence it
will have a growing exponential envelope.
» t=-1:0.01:1; MCL 31
» C=1*exp(j*pi/4); MCL 32
» r=1;w0=4*pi;a=r+j*w0; MCL 33
» xt=C*exp(a*t); MCL 34
» xenvp=abs(C)*exp(r*t); MCL 35
» xenvn=-abs(C)*exp(r*t); MCL 36
» plot(t,real(xt),'k',t,imag(xt),'k:',...
t,xenvp,'k--',t,xenvn,'k--') MCL 37
» title('Complex Exponential');xlabel('t') MCL 38
» legend('Real part','Imag. part') MCL 39

The result is shown in Figure 6.4 (growing exponential envelope).

34
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

Complex Exponential
3
Real part
Imag. part

-1

-2

-3
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
t

Figure 6.4 Real and imaginary parts of a complex exponentials with C = 2 + j 2 and
r = 1 + j 4π .

The next sample will have a decaying exponential envelope with


C = e jπ / 4 and r = −1 + j 4π .
» t=-1:0.01:1; MCL 40
» C=1*exp(j*pi/4); MCL 41
» r=-1;w0=4*pi;a=r+j*w0; MCL 42
» xt=C*exp(a*t); MCL 43
» xenvp=abs(C)*exp(r*t); MCL 44
» xenvn=-abs(C)*exp(r*t); MCL 45
» plot(t,real(xt),'k',t,imag(xt),'k:',...
t,xenvp,'k--',t,xenvn,'k--') MCL 46
» title('Complex Exponential');xlabel('t') MCL 47
» legend('Real part','Imag. part') MCL 48

The result is shown in Figure 6.5 (decaying exponential envelope).

35
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)

Complex Exponential
3
Real part
Imag. part

-1

-2

-3
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
t

Figure 6.5 Real and imaginary parts of a complex exponentials with C = 2 + j 2 and
r = −1 + j 4π .

Note that at MCL 32 or MCL 41, instead of the polar form, we could
have also used the rectangular form to express C as C=sqrt(2)+j*sqrt(2).

36

You might also like