Bs Lab Experiments
Bs Lab Experiments
Given the system y[n]=2x[n]+3, y[n]=2x[n]+3, test for linearity using two arbitrary input
signals x1[n] and x2[n]and scalars a, b.
.2. Time Invariance Test for a Discrete System
For the system y[n]=x[n−1], verify time invariance by shifting the input and comparing the
output shift.
3. Linearity Test for a Continuous System
Given y(t)=x2(t)y(t)=x2(t), test for linearity with two signals x1(t), x2(t), and scalars a, b.
4. Time Invariance Test for a Continuous System
Test the time invariance of y(t)=x(t2) by applying a time shift and comparing the outputs.
5. Linearity and Time Invariance for a System with Multiplicative Input
For y[n]=n⋅x[n], verify both linearity and time invariance.
6. MATLAB Simulation of Linearity
Simulate in MATLAB: y[n]=x[n]+5. Is the system linear?
7. MATLAB Simulation of Time Invariance
Simulate y[n]=x[−n] in MATLAB. Is the system time-invariant?
8. Combined Test for a Piecewise System
Given y[n]=x[n] for n≥0n≥0, y[n]=0 otherwise, test for both properties.
9. Random Signal Test for Time Invariance
Generate a random input signal x[n] in MATLAB, shift it by 2 units to get x[n−2], and test time
invariance for y[n]=10x[n]cos(0.25πn+0.1π).
EXP 8. COMPUTATION OF UNIT SAMPLE, UNIT STEP AND SINUSOIDAL
RESPONSES OF THE GIVEN LTI SYSTEM COMPUTATION OF UNIT SAMPLE,
UNIT STEP AND SINUSOIDAL RESPONSES OF THE GIVEN LTI SYSTEM AND
VERIFYING ITS PHYSICAL REALIZABILITY AND STABILITY PROPERTIES.
1: Basic Impulse Response Computation
Given the LTI system difference equation:
y[n]−0.5y[n−1]=x[n],Use MATLAB to compute and plot the unit sample response h[n] for n=0to
20 and Comment on system stability and realizability.
2: Impulse Response for Higher-Order System
Given:y[n]=0.9y[n−1]−0.4y[n−2]+x[n],Use MATLAB to compute and plot the impulse response
h[n] and Check if the system is BIBO stable using the impulse response.
3: Verify LTI Property Using Impulse Response
Let system S have impulse response h[n]. Verify in MATLAB:Linearity: S[ax1[n]
+bx2[n]]=ay1[n]+by2[n] and Time invariance: Apply a delayed input and compare with delayed
output.
4: Compute and Plot Unit Step Response
Given:y[n]−0.8y[n−1]=x[n],Find and plot the unit step response s[n] in MATLAB and Compare
with the cumulative sum of the impulse response.
5: Causal System Step Response
Given:y[n]=x[n]+2x[n−1]+x[n−2],Compute the step response and Determine if the system is
causal and physically realizable.
6: Frequency Response Analysis
Given:y[n]=x[n]−x[n−1]+0.5x[n−2],Use MATLAB to compute the system's frequency response
using freqz and Find the magnitude and phase response for input x[n]=cos(0.2πn).
7: Response to Complex Exponential
Let input be x[n]=ej0.4πn. Given:y[n]=0.6y[n−1]+x[n],Simulate in MATLAB and verify that
output is H(ej0.4π)⋅x[n] and Calculate H(ej0.4π) analytically and compare.
8: Physical Realizability
Given impulse response:matlab h = [0.2 0.3 0.1 -0.05 0]; % For n = 0 to 4,Determine if the
system is realizable and causal and Write the corresponding difference equation.
9: Stability Analysis from Impulse Response
Given impulse response in MATLAB:
h = (0.9).^(0:49); % Exponentially decaying,Plot h[n], and compute ∑∣h[n]∣ and Determine
BIBO stability.
EXP 9. FINDING THE FOURIER TRANSFORM OF A GIVEN SIGNAL AND
PLOTTING ITS MAGNITUDE AND PHASE SPECTRUM.
1. Basic Exponential Signal
Find the Fourier Transform of the signal:
x(t) = exp(-a*t) * u(t), where a > 0,Plot the magnitude and phase spectrum in MATLAB.
2. Rectangular Pulse
x(t) = rect(t/T), where T is the pulse width,Find and plot its Fourier Transform using MATLAB.
Use the fft function to approximate it numerically.
3. Cosine Signal
x(t) = cos(2*pi*f0*t), where f0 = 10 Hz,Use MATLAB to compute the Fourier Transform and
plot the magnitude and phase.
4. Sinc Function
x(t) = sinc(t/T), where T is a scaling factor,Find and plot its Fourier Transform using MATLAB
and compare the result with the theoretical transform.
5. Gaussian Pulse
x(t) = exp(-t.^2),Compute its Fourier Transform numerically in MATLAB. Plot the magnitude
and phase spectrum.
6. Time-Shifted Signal
x(t) = rect(t-2),Find its Fourier Transform. Plot and explain the phase shift due to time translation
using MATLAB.
7. Periodic Square Wave
Use MATLAB to compute and plot the Fourier series coefficients (which relate to the Fourier
Transform) of a periodic square wave.
Use fft for numerical computation.
8. Linear Combination of Signals
x(t) = 2*cos(2*pi*10*t) + 3*sin(2*pi*20*t),Use MATLAB to compute the Fourier Transform.
Plot the magnitude and phase spectrum and identify the frequencies present.
9. Complex Exponential and Modulation
x(t) = exp(j*2*pi*f0*t) * rect(t/T),Find the Fourier Transform using MATLAB. Show how
modulation affects the frequency content.
EXP 11. LOCATING THE ZEROS AND POLES AND PLOTTING THE POLE-ZERO
MAPS IN S-PLANE AND Z-PLANE FOR THE GIVEN TRANSFER FUNCTIONS.
1. First-order low-pass
G1(s)=5\0.2s+1
Tasks:
a) List the poles and zeros.
b) Plot the pole–zero map with pzmap.
c) Comment on stability and DC gain.
2. Second-order under-damped
G2(s)=25\s2+2s+25
Tasks:
a) Compute damping ratio ζ and natural frequency ωn.
b) Plot the P–Z map and locate the complex-conjugate pole pair.
c) Verify your numeric poles with the quadratic formula.
3. Lead compensator
G3(s)=s+3\0.05s+1
Tasks:
a) Identify the pole and zero and sketch their relative positions.
b) Use MATLAB to confirm and plot.
c) Explain qualitatively how the lead zero affects phase margin.
4. High-order notch
G4(s)=(s2+4s+13)\(s2+6s+25)(s+2)
Tasks:
a) Factor the numerator and denominator to show conjugate pairs.
b) Plot the P–Z map and label poles vs. zeros.
c) Predict the frequency where the magnitude response exhibits a notch.
5. PI-controlled plant
Plant: P(s)=10\s(s+4)
Controller: C(s)=1+2\s
Tasks:
a) Form the open-loop transfer L(s)=C(s)P(s).
b) Find and plot poles/zeros of L(s)
c) Discuss closed-loop stability from the open-loop pole locations.
Discrete-Time ( z-plane ) Problems
(Use the supplied sampling period Ts when building tf or zpk.)
6. IIR low-pass
H1(z)=0.0675 (1+z−1)\1−1.143 z−1+0.4128 z−2,
Ts=0.1 s
Tasks:
a) Convert to polynomial form in zzz.
b) Plot the P–Z map (zplane from DSP System Toolbox or pzmap).
c) Check if all poles lie inside the unit circle.
7. Simple comb filter
H2(z)=1−z−6, Ts=1 ms
Tasks:
a) List all zeros (hint: 6th-roots of unity).
b) Plot the zeros on the unit circle.
c) Comment on its magnitude response at f=k\6Ts.
8. Bilinear-transformed band-pass
Start with the analog prototype
Ga(s)=0.5s\s2+0.5s+100
and sample with Ts=0.01 s using the bilinear (Tustin) method.
Tasks:
a) Use c2d(G_a,Ts,'tustin') to obtain Gd(z).
b) Extract and plot the discrete-time poles/zeros.
c) Explain how the bilinear transform preserves stability.
9. FIR Hilbert transformer (7-tap)
Coefficient vector
matlab
b = [-0.0895 0 0.4480 0 -0.4480 0 0.0895];
H3(z)=∑k=06bkz−k, Ts=1 s
Tasks:
a) Plot the zeros; show that they are symmetric about the unit circle.
b) Verify the filter has only zeros (all poles at the origin).
c) Explain why the response has approximately 90° phase shift over its pass-band.
HOD M.Krishna(Faculty)