Uploaded by Kyle Meeker

DSP Lab Report: Signal Synthesis & Analysis

advertisement
DSP LAB 1.
%5.a.
[xx,tt] = syn_sin([0.5 0.5 0.5],[2 2*exp(-1.25*j*pi) (1-j)], 10, 6, -1/2);
plot(tt,real(xx))
xlabel t
ylabel x(t)
%5.b.
freq = 1/(1.5+0.5)
freq = 0.5000
phase = (0.08/2)*360
phase = 14.4000
A = 1.6 %from graph
A = 1.6000
%5.c.
% 2exp(jpi*t) = 2(cos(pi)+j*sin(pi))
% 2exp(jpi*(t-1.25)) = 2(cos(pi)+j*sin(pi))*(cos(1.25pi)+j*sin(1.25pi)
1
% (1-j)exp(jpi*t) = (1-j)(cos(pi)+j*sin(pi))
%x(t) = R{above)}
%x(t) = 2 + 2(-0.707 + j0.707) + (1-j)
%x(t) = 1.586 + j0.414
%x(t) = 1.639 angle of 14.6 degrees
6.
A.
syms c t_1 x_v d_t d_xr d_yr t_2 d_direct d_reflect1 d_reflect2 d_reflect
c = 3e8
c = 300000000
d_direct = sqrt(x_v^2 + d_t^2)
d_direct =
t_1 = d_direct/c
t_1 =
B.
d_reflect1 = sqrt(d_xr^2 + (d_t-d_yr)^2);
d_reflect2 = sqrt((d_xr - x_v)^2 + d_yr^2);
d_reflect = d_reflect2+d_reflect1
d_reflect =
t_2 = d_reflect/c
t_2 =
C.
2
f_s = 1e9
f_s = 1.0000e+09
A = 1
A = 1
f_0 = 150e6
f_0 = 150000000
t = linspace(0,3/f_0,3*f_s/f_0)
t = 1×20
10-7 ×
0
0.0105
0.0211
0.0316
0.0421
0.0526
0.0632
s_c = cos(2*pi*f_0*t);
r_c = (s_c*(exp(-j*2*pi*f_0*t_1) - exp(-j*2*pi*f_0*t_2)));
r1c = subs(r_c,d_t,1500);
r2c = subs(r1c,d_xr,100);
r3c = subs(r2c,d_yr,900);
r4c = double(subs(r3c,x_v,0));
plot(t,real(r4c))
title('Part C graph')
3
0.0737
max_ampC= max(real(r4c))
max_ampC = 0.1646
D.
s_d = exp(j*2*pi*f_0*t);
r_d = (s_d*(exp(-j*2*pi*f_0*t_1) - exp(-j*2*pi*f_0*t_2)));
r1d = subs(r_d,d_t,1500);
r2d = subs(r1d,d_xr,100);
r3d = subs(r2d,d_yr,900);
r4d = double(subs(r3d,x_v,0));
figure
plot(t,real(r4d))
title('Part D graph')
max_ampD= max(real(r4d))
max_ampD = 0.5732
E.
dt = 1500;
f0 = 150e6;
dxr = 100;
dyr = 900;
4
xv_e = linspace(-200,200,1000);
t1 = sqrt(xv_e.^2 + dt^2) / c;
t2 = sqrt((dxr - xv_e).^2 + dyr^2) / c;
A_direct = exp(-j * 2 * pi * f0 * t1);
A_reflect = exp(-j * 2 * pi * f0 * t2);
Rv = A_direct - A_reflect;
figure
plot(xv_e,real(Rv))
xlabel('position (m)')
ylabel('Signal magnitude')
title('Part E graph')
F.
sig_strength = abs(Rv)
sig_strength = 1×1000
1.6018
1.7294
1.8338
1.9136
1.9679
1.9959
xv_f = linspace(0,300,1000)
xv_f = 1×1000
5
1.9974
1.9723
0
0.3003
0.6006
0.9009
1.2012
1.5015
1.8018
2.1021
figure
plot(xv_f,sig_strength)
xlabel('Vehicle Position (m)')
ylabel('Signal Strength')
title('Part F graph')
G.
The largest values of the signal strength are the parts of the graph where the direct and reflected signals join
together to form a stronger signal,where both paths have the same phase and amplitude
The smallest values are the opposite, when the two signals join together in a way that cancels, resulting in
weaker signal strength. This is when they both have opposite phases.
The positions where there is complete cancellation is when both direct and reflected signals have exactly
opposite phase, where the plot crosses the 0 line.
6
Download