File:Bode Plot of Practical Differentiator.svg

From HandWiki

Original file(SVG file, nominally 900 × 540 pixels, file size: 55 KB)

This file is from a shared repository and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: Bode Plot of Practical Differentiator (Frequency Response)
Date
Source Own work
Author Kjerish

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Source

Python source :

import numpy as np
import matplotlib.pyplot as plt

# Generating angular frequency values
omega = np.logspace(-2, 2, 400)  # for a wider frequency range in this example

# Dummy values for omega1 (ω1) and omega2 (ω2)
omega1 = 0.1
omega2 = 10

# Calculating the plateau height based on the slopes and cutoff frequencies
plateau_height = 10 * np.log10(omega2/omega1)

magnitude = np.piecewise(omega, [omega < omega1, (omega >= omega1) & (omega <= omega2), omega > omega2], 
                         [lambda omega: plateau_height + 20 * np.log10(omega/omega1), plateau_height, 
                          lambda omega: plateau_height + 20 * np.log10(omega2/omega)])

plt.figure(figsize=(10,6))
plt.semilogx(omega, magnitude, 'k')
plt.title("Bode Plot (Frequency Response)")
plt.xlabel("ω (angular frequency)")
plt.ylabel("|Vo/Vi| dB")
plt.grid(which='both', axis='both')
plt.ylim(-30, plateau_height+10)  # Adjusting y limits for better visibility
plt.axhline(0, color='black',linewidth=0.5)

# Dashed lines for omega1 and omega2
plt.axvline(omega1, color='black', linestyle='--', linewidth=1)
plt.axvline(omega2, color='black', linestyle='--', linewidth=1)

# Dashed line for the plateau height and its label
plt.axhline(plateau_height, color='black', linestyle='--', linewidth=1)
plt.annotate('|R/R₁|', xy=(1e-2, plateau_height+2), horizontalalignment='left')

# Annotations for slopes and cutoff frequencies
plt.annotate('20dB/dec', xy=(omega1/3, 10), horizontalalignment='right')
plt.annotate('-20dB/dec', xy=(omega2*3, plateau_height-10), horizontalalignment='left')
plt.annotate('ω1', xy=(0.85*omega1, -25), horizontalalignment='center')
plt.annotate('ω2', xy=(0.85*omega2, -25), horizontalalignment='center')

plt.tight_layout()
plt.savefig("Bode Plot of Practical Differentiator.pdf")

Captions

Bode Plot of Practical Differentiator (Frequency Response)

Items portrayed in this file

depicts

image/svg+xml

6fa8f60e667108eb021f5987002f88f7a1c0ae7a

56,713 byte

540 pixel

900 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:16, 13 October 2023Thumbnail for version as of 12:16, 13 October 2023900 × 540 (55 KB)imagescommonswiki>KjerishUploaded own work with UploadWizard

The following file is a duplicate of this file (more details):

The following page uses this file:

Metadata