Sei sulla pagina 1di 5

EEE 147 2s1920 Problem Set 1

INSTRUCTIONS

For the problem solving part...

• Write your answers on sheets of ruled pad paper.


• Write your name, student number, DC instructor and DC section on the upper-right hand corner of
each sheet.

• Do not write anything on the back page of each sheet. Anything written on the back pages will be
considered scratch work.
• Write your answers to each problem on separate sheets of paper.
• Support your answers with complete and concise solutions. The checker reserves the right to disregard
illegible handwriting.

• Box all final answers.


• A submission bin will be provided at the administration office. The deadline for the problem solving
part is on February 28, 2020, 5:00PM.

For the programming exercise part...

• All codes must be implemented on GNU Octave.


• Submit all relevant codes and functions needed to complete the exercise.
• A submission bin will be provided in UVLe. The deadline for the programming exercise part is on
March 6, 2020, 11:55PM.

Problem 1. 25 points.
Consider the following signals.

x1 (t) = e−2t u(t) (1)

x2 (t) = 2u(t + 1) − 2u(t − 1) (2)

x3 (t) = r(t) − 2r(t − 1) + r(t − 2) (3)


Perform the following operations.
1. (5 points) x1 (t) ∗ x2 (t)
2. (5 points) x2 (t) ∗ x3 (t)
3. (5 points) x1 (t) ∗ x3 (t)
dx2 (t) dx3 (t)
4. (5 points) ∗
dt dt
5. (5 points) 0.5x1 (2t − 4) ∗ x2 (t − 1)

Problem 2. 25 points.
Consider the continuous-time causal LTI system described by the block diagram shown in Fig 1.
1. (5 points) Transform the direct form II representation of the system to its direct form I representation.
2. (5 points) Determine the differential equation describing the system.
3. (5 points) Determine the transfer function H(s) describing the system.
4. (5 points) Sketch the pole-zero diagram of the system and specify the region of convergence. Specify also
the number of poles and/or zeros located at a point in case of repeating roots.
5. (5 points) Determine the impulse response h(t) describing the system.

Page 1 of 5
EEE 147 2s1920 Problem Set 1

Figure 1: A continuous-time causal LTI system.

Problem 3. 25 points.
In the circuit shown in Fig 2, the switch is in the closed position for a long time before it is opened at t = 0.
The objective is to determine the current through the inductor i(t) for t ≥ 0.

Figure 2: Circuit diagram for Problem 3.

1. (4 points) When the switch is closed for a long time, the capacitor is fully charged. Determine the voltage
across the capacitor at t = 0.
2. (4 points) When the switch is closed for a long time, the inductor behaves as a short circuit. Determine
the current through the inductor at t = 0.
3. (4 points) Draw the equivalent circuit in the s-domain.

4. (4 points) Using the drawn equivalent circuit in the s-domain, write the loop equation that relates the
voltages across the components.
5. (4 points) Derive the simplified expression for I(s).
 
−2t 2
6. (5 points) Apply the Inverse Laplace Transform on I(s) and verify that i(t) = e 2 cos 6t − sin 6t u(t).
3

——– End of Problem Solving Part ——–

Programming Exercise. 25 points.


Creating a Sinusoid.
Sinusoids are defined by three parameters: frequency, amplitude and phase defined in Equation (4).

s(t) = A sin (2πF t + θ) (4)

Page 2 of 5
EEE 147 2s1920 Problem Set 1

where A is the amplitude, F is the frequency, and θ is the phase. When the continuous-time sinusoid s(t) is
sampled at a rate of Fs , the discrete-time signal is represented in Equation (5).
 
F
s(t) = A sin 2π n + θ (5)
Fs
Here is a sample code generated in Octave.
F = 10;
Fs = 1 5 0 ;
t = 0 : 1 / Fs : 1 ;
s i g = sin ( 2 ∗ pi ∗F . ∗ t ) ;
plot ( t , s i g ) ;
ylabel ( ’ Amplitude ’ ) ;
xlabel ( ’ Time ( s e c ) ’ ) ;

1. Create a sinusoid with an amplitude A = 10, frequency F = 2 Hz and phase θ = π/6 with a sampling rate
Fs = 200 Hz. Use plot to display the signal. Create a sinusoid sig1 with four periods, as shown in Fig
3, then vary the time vector to create a sinusoid sig2 with ten periods. How many elements are there in
your time variable?

Figure 3: A sinusoid with 4 periods with F = 2 Hz.

2. Create 1 second of a cosine function with amplitude A = 0.8, frequency F = 220 Hz, with a sampling
rate of Fs = 8000 Hz. Plot the signal. Can you see the sinusoidal shape? Display 0.1 sec and 15 ms of
the cosine function. You can limit the signal displayed by limiting the length of the vector variables, e.g.
plot(x(1:10),y(1:10)). Use sound to listen to the cosine function that you created. If sound does not work,
use wavwrite to create a .wav audio file, then open the .wav file with another application.

Creating an exponential decaying sinusoid.


Consider the signal in Equation (6).

q(t) = e−t/τ sin (2πF t + θ) (6)

1. With a sampling rate of Fs = 8000 Hz, Create an exponentially decaying signal in the time interval [0,1]
with a time constant of 0.5 sec. Display your signal as shown in Fig 4.
2. Using a sampling rate of Fs = 8000 Hz, create a 2 sec sinusoid with a frequency F = 3 Hz. Create an
exponentially decaying sinusoid with a time constant of 1.5 sec. Use element-by-element multiplication to
create an exponentially decaying sinusoid.

Images.
1. Construct matrix X in Octave. Note that matrix X consists of 16 sub-matrices of size 3 × 3. Each element
of matrix X is a pixel with a particular color in the image. Notice that the numbers 1 to 26 represents
various shades of gray. Numbers beyond 26 represent the other colors. Try viewing this matrix as an
image using imshow. You should see an image similar to the one shown in Fig 6.

Page 3 of 5
EEE 147 2s1920 Problem Set 1

Figure 4: An exponentially decaying signal.

Figure 5: An exponentially decaying sinusoid.

 
1 1 1 5 5 5 10 10 10 15 15 15
1 1 1 5 5 5 10 10 10 15 15 15
 
1 1 1 5 5 5 10 10 10 15 15 15
 
20 20 20 25 25 25 30 30 30 35 35 35
 
20 20 20 25 25 25 30 30 30 35 35 35
 
20 20 20 25 25 25 30 30 30 35 35 35
X=
40

 40 40 45 45 45 50 50 50 55 55 55
40 40 40 45 45 45 50 50 50 55 55 55
 
40 40 40 45 45 45 50 50 50 55 55 55
 
60 60 60 65 65 65 70 70 70 75 75 75
 
60 60 60 65 65 65 70 70 70 75 75 75
60 60 60 65 65 65 70 70 70 75 75 75

Exercises.
1. Construct a sound signal that consists of exponentially growing envelopes of half-second sinusoids with
sequence of frequencies: 494, 440, 392, 440, 494, 494 and 494 Hz. Listen to the sound. Save the signal as
a .wav file. Can you identify the tune?
2. Load the signals signal1.wav, signal1x.wav, ..., signal9.wav, signal9x.wav using audioread or wavread.
These are original and modified signals respectively. Determine what type of signal manipulation was
applied to each one by listening and plotting the signals. (Hint: Use subplot to observe the signals)
3. Using repmat, generate an image of a chessboard as shown in Fig 7.
4. Using tril, generate the image shown in Fig 8. (Hint: more elements will make the triangle smoother)
——– End of Problem Set ——–

Page 4 of 5
EEE 147 2s1920 Problem Set 1

Figure 6: The image generated from matrix X.

Figure 7: A chessboard.

Figure 8: An image of a diamond.

Page 5 of 5

Potrebbero piacerti anche