Aim
Write a program to prove the time-shifting property of the Laplace, Z and Fourier transforms.
Objectives
- State the time-shifting property for all three transforms.
- Compute the transform of x and of its shifted copy independently, then show that their ratio is e^{βstβ}, z^{βnβ} or e^{βj2Οftβ}.
- See that a shift leaves the magnitude spectrum unchanged and adds a linear phase.
- Explain why a one-sided Laplace or Z transform needs a delay (tβ, nβ β₯ 0) with the u(t β tβ) window.
Fourier: x(t β tβ) β e^{βj2Οftβ} Β· X(f) β |Β·| unchanged, phase β 2Οftβ
Laplace: x(t β tβ)u(t β tβ) β e^{βstβ} Β· X(s), tβ β₯ 0
Z: x[n β nβ] β z^{βnβ} Β· X(z) (causal x, nβ β₯ 0)
DTFT: x[n β nβ] β e^{βjΟnβ} Β· X(e^{jΟ})
Proof (Fourier)
Let y(t) = x(t β tβ). Then Y(f) = β«x(t β tβ)e^{βj2Οft}dt. Substitute Ο = t β tβ: Y(f) = β«x(Ο)e^{βj2Οf(Ο+tβ)}dΟ = e^{βj2Οftβ}X(f). The Laplace and Z proofs use the same change of variable.
Visual meaning
Each frequency component is delayed by the same time tβ. A component at frequency f therefore picks up a phase lag of 2Οftβ radians, which grows in proportion to f. That is linear phase: the shape of the signal is kept, and only its position moves.
The animation shows two harmonics shifted by the same tβ. The higher harmonic turns through more phase.
- Choose the Fourier tab. Pick a signal and drag tβ. Check that the magnitude curves overlap exactly.
- Look at the phase-difference plot. It should lie on the line β2Οftβ. Read the slope and work out tβ from it.
- Choose the Laplace tab. The table computes β{x(t β tβ)u(t β tβ)} numerically (directly from the shifted signal) and compares it with e^{βstβ}X(s) at several values of s.
- Choose the Z tab. Do the same with Ξ£ x[n β nβ]z^{βn} and z^{βnβ}X(z), and look at the DTFT phase.
- Record at least one reading for each transform, with your hand-calculated value of the shift factor.
Pre-lab diagnostic
Signal & shift
Original (blue) and shifted (amber)
Magnitude: |X| (blue), |X_shift| (amber, dashed)
Phase difference β X_shift β β X (green) vs theory β2Οftβ (dashed)
Verification table
Conclusion
Post-lab quiz
Self-evaluation
exp9_timeshift.m
%% Experiment 9: Time-shifting property clc; clear; close all; % ---------- Fourier ---------- dt = 1e-3; t = -2:dt:10; f = -4:0.01:4; a = 1; t0 = 1.5; x = exp(-a*t).*(t>=0); xs = exp(-a*(t-t0)).*(t>=t0); FT = @(s) arrayfun(@(ff) trapz(t, s.*exp(-1j*2*pi*ff*t)), f); X = FT(x); Xs = FT(xs); subplot(2,1,1); plot(f,abs(X),f,abs(Xs),'--'); title('|X| and |X_s| identical'); subplot(2,1,2); plot(f,unwrap(angle(Xs))-unwrap(angle(X)), f,-2*pi*f*t0,'--'); title('phase difference = -2\pi f t_0'); fprintf('max |Xs - e^{-j2pi f t0}X| = %g\n', max(abs(Xs - exp(-1j*2*pi*f*t0).*X))); % ---------- Laplace (symbolic) ---------- syms tt s X_s = laplace(exp(-a*tt)); Xsh = laplace(exp(-a*(tt-t0))*heaviside(tt-t0)); simplify(Xsh - exp(-s*t0)*X_s) % -> 0 % ---------- Z (symbolic) ---------- syms n z; n0 = 3; Xz = ztrans(0.8^n); Xzs = ztrans(0.8^(n-n0)*heaviside(n-n0+0.5)); simplify(Xzs - z^(-n0)*Xz) % -> 0