📖 Scenario: Imagine you are an engineer working on a digital filter for audio processing. You want to check if your filter is stable by looking at its poles and zeros on the complex plane.
🎯 Goal: You will create a simple digital filter using its numerator and denominator coefficients, then plot its poles and zeros to analyze stability.
📋 What You'll Learn
Create numerator and denominator coefficient lists for the filter
Define a threshold radius for stability check
Calculate poles and zeros using the coefficients
Plot the poles and zeros on the complex plane
Print whether the filter is stable based on pole locations
💡 Why This Matters
🌍 Real World
Engineers use pole-zero plots to check if digital filters will behave well without causing unwanted oscillations or instability in audio, communications, or control systems.
💼 Career
Understanding filter stability is essential for signal processing roles in industries like telecommunications, audio engineering, and embedded systems design.
Progress0 / 4 steps
1
Create filter coefficients
Create a list called numerator with values [0.0675, 0.1349, 0.0675] and a list called denominator with values [1.0, -1.1430, 0.4128] representing the filter coefficients.
Signal Processing
Hint
Use Python lists with the exact values given for numerator and denominator.
2
Set stability radius threshold
Create a variable called stability_radius and set it to 1.0 to represent the unit circle radius for stability check.
Signal Processing
Hint
Set stability_radius to 1.0 as a float value.
3
Calculate poles and zeros
Import numpy as np and use np.roots() to calculate zeros from numerator and poles from denominator.
Signal Processing
Hint
Use np.roots() to find roots of numerator and denominator lists.
4
Plot poles and zeros and check stability
Import matplotlib.pyplot as plt. Plot zeros as blue circles and poles as red crosses on the complex plane. Draw a unit circle with radius stability_radius. Then print "Stable filter" if all poles are inside the unit circle, otherwise print "Unstable filter".
Signal Processing
Hint
Use plt.scatter() for poles and zeros, plt.Circle() for the unit circle, and check if all poles have magnitude less than stability_radius.
Practice
(1/5)
1. What does it mean for a system to be stable in terms of its poles on the pole-zero plot?
easy
A. All poles must lie in the left half of the complex plane (negative real parts).
B. All poles must lie on the imaginary axis.
C. All zeros must lie in the right half of the complex plane.
D. Poles and zeros must be equal in number.
Solution
Step 1: Understand pole location and stability
Stability depends on poles, not zeros. Poles with negative real parts mean the system's response decays over time.
Step 2: Identify correct pole location for stability
Poles in the left half-plane (negative real parts) ensure the system is stable.
Final Answer:
All poles must lie in the left half of the complex plane (negative real parts). -> Option A
Quick Check:
Stable system = poles with negative real parts [OK]
Hint: Stable system means poles left of imaginary axis [OK]
Common Mistakes:
Confusing zeros with poles for stability
Thinking poles on imaginary axis are stable
Assuming zeros affect stability directly
2. Which of the following is the correct Python syntax to plot poles and zeros using the scipy.signal library?
easy
A. signal.pzmap(system, plot=True)
B. signal.pzplot(system)
C. signal.pzplot(system, plot=True)
D. signal.pzmap(system, plot=False)
Solution
Step 1: Recall scipy.signal function for pole-zero plot
The function to plot poles and zeros is pzmap, not pzplot.
Step 2: Check correct usage with plotting enabled
Using pzmap with plot=True plots the pole-zero map correctly.
Final Answer:
signal.pzmap(system, plot=True) -> Option A
Quick Check:
Use pzmap with plot=True for pole-zero plot [OK]
Hint: Use pzmap with plot=True to plot poles and zeros [OK]
Common Mistakes:
Using non-existent function pzplot
Forgetting plot=True argument
Confusing function names
3. Given the poles of a system as poles = [-1+2j, -1-2j, 0.5], what can you say about the system's stability?
medium
A. The system is stable because poles are complex conjugates.
B. The system is stable because all poles have negative real parts.
C. The system is marginally stable because poles are on the imaginary axis.
D. The system is unstable because one pole has a positive real part.
Solution
Step 1: Analyze the real parts of each pole
Poles are -1+2j (real part -1), -1-2j (real part -1), and 0.5 (real part 0.5).
Step 2: Determine stability from pole real parts
Since one pole has positive real part (0.5), the system is unstable.
Final Answer:
The system is unstable because one pole has a positive real part. -> Option D
Quick Check:
Positive real pole means unstable system [OK]
Hint: Check if any pole has positive real part for instability [OK]
Common Mistakes:
Ignoring positive real part pole
Assuming complex conjugates guarantee stability
Confusing marginal stability with instability
4. The following Python code attempts to plot poles and zeros but gives an error:
from scipy import signal
system = signal.TransferFunction([1, 3], [1, 2, 1])
signal.pzplot(system)
What is the error and how to fix it?
medium
A. TransferFunction requires discrete=True for pzplot to work.
B. TransferFunction arguments are reversed; swap numerator and denominator.
C. Function pzplot does not exist; use pzmap(system, plot=True) instead.
D. Import statement is wrong; use import scipy.signal as signal.
Solution
Step 1: Identify the function causing error
The function pzplot does not exist in scipy.signal, causing the error.
Step 2: Use correct function to plot poles and zeros
Use pzmap(system, plot=True) to plot poles and zeros correctly.
Final Answer:
Function pzplot does not exist; use pzmap(system, plot=True) instead. -> Option C
Quick Check:
Use pzmap, not pzplot, for pole-zero plots [OK]
Hint: Use pzmap with plot=True, not pzplot [OK]
Common Mistakes:
Using non-existent pzplot function
Swapping numerator and denominator unnecessarily
Wrong import statement causing confusion
5. You have a system with poles at -0.5, -1+1j, -1-1j and zeros at 0, -2. Which statement best describes the system's stability and response?
hard
A. The system is marginally stable because of zeros at zero.
B. The system is stable with oscillatory decay due to complex poles.
C. The system is unstable because zeros are on the right half-plane.
D. The system is unstable due to poles with positive real parts.
Solution
Step 1: Check pole locations for stability
All poles have negative real parts (-0.5, -1), so system is stable.
Step 2: Analyze pole types for response behavior
Complex conjugate poles (-1±1j) cause oscillations that decay over time.
Step 3: Consider zeros' effect on stability
Zeros do not affect stability directly; zeros at 0 and -2 are not in right half-plane.
Final Answer:
The system is stable with oscillatory decay due to complex poles. -> Option B
Quick Check:
Negative real poles + complex = stable oscillatory decay [OK]
Hint: Stable if poles negative; complex poles cause oscillations [OK]
Common Mistakes:
Confusing zeros with poles for stability
Thinking zeros at zero cause instability
Ignoring oscillatory nature of complex poles
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.