Bode Plot
AnalysisThe BodePlot block performs automated frequency response analysis of linear dynamic systems. By sweeping a sinusoidal excitation signal across a specified frequency spectrum and evaluating steady-state output amplitude and phase shift, it generates magnitude (decibels) and phase (degrees) plots against logarithmic frequency (radians per second).
This block is an essential tool for evaluating closed-loop stability margins, verifying system bandwidth, identifying resonance peaks, and designing frequency-domain compensators such as lead-lag networks and notch filters.
Mathematical Model
Magnitude in decibels and phase angle in degrees are computed as:
Frequency evaluation points are logarithmically distributed between and :
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in1 |
Input | number | Required |
| ← Out | out |
Result | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
inputSource |
Input Source ID | text | sine1 |
|
startFreq |
Start Frequency (rad/s) | number | 0.1 |
|
endFreq |
End Frequency (rad/s) | number | 100 |
|
pointsPerDecade |
Points Per Decade | number | 10 |
Usage Examples
Example 1: First-Order Low-Pass Filter
Analyzing the transfer function reveals a flat 0 dB low-frequency gain, a cutoff frequency at , and a high-frequency roll-off rate of with a asymptotic phase lag.
Example 2: Second-Order Resonant System
Analyzing a resonant plant with displays a pronounced resonant amplification peak near and a rapid phase transition across the resonance band.
Remarks & Best Practices
- Steady-state settling: The sweep engine waits for system transient responses to decay at each test frequency before measuring magnitude and phase angles.
- Linearity assumption: Frequency response sweeps assume linear, time-invariant (LTI) dynamics; nonlinear elements such as saturation or backlash will cause amplitude-dependent distortion.
- Bandwidth selection: Configure the frequency sweep interval to span at least one decade below the lowest system pole and one decade above the expected unity-gain crossover.
- Stability margins: Gain margin () and phase margin () are determined directly from the unity-gain () and phase crossover points.
Frequently Asked Questions (FAQ)
Q: What are safe gain and phase margins for robust industrial feedback systems?
Industrial rule of thumb specifies a Gain Margin (gain factor ) and Phase Margin (ideally ). Phase margins below yield underdamped, resonant responses with high overshoot, while margins above yield sluggish transient responses.
Related Components
- Online Bode Plot Generator: Type a transfer function and get its magnitude, phase and stability margins instantly.
- Online PID Tuner: Tune a PID loop interactively and read its Bode stability margins in the browser.
- NyquistPlot: Visualizes frequency response trajectories in the complex plane to evaluate the Nyquist stability criterion.
- TransferFunction: Implements continuous-time Laplace domain transfer functions for linear plant models.
- SignalGenerator: Generates sinusoidal and swept excitation waveforms for system identification.