Signals and Systems
Signals and Systems
ASYALI)
Project #6
Continuous Time Complex Exponential and Sinusoidal Signals
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.
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
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
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)
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
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
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
31
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)
{φ }
w0 , k
k = 0, ±1, ± 2,…
= e jkw0t . (6.9)
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 .
32
SIGNALS AND SYSTEMS LAB USING MATLAB® (© 2001, MUSA H. ASYALI)
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.
-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)
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 + φ )
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π .
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