Support package for Bode diagramms
Project description
Bode Plot with DHO800/900
A python support package plots a Bode plot with gain and phase. The program is tested with DHO914 as Oscilloscope and DG1022Z as function generator.
Test setup
Connect the DG1000Z and the DHO800/900 with same Ethernet as the computer.
Two Pin Component Frequency Characterisation
Generator CH1 should be connected to the oscilloscope CH1 via a BNC or SMA cable. Same connection for CH2 but the channel 2 has a T-connector in between and the component is between plus and minus of the stub. The wire length of CH1 and CH2 should be the same and the cable at the end of the oscilloscope should be terminated with 50 Ohm.
Circuit Transfer Function
Generator CH1 should be connected to the oscilloscope CH1 via a BNC or SMA cable.
The generator CH2 is connected to the circuit input and the circuit output directly to oscilloscope CH2.
The wire length of CH1 and CH2 should be the same and the cable at the end of the oscilloscope should be terminated with 50 Ohm.
Python Requirements
This package needs numpy/scipy/matplotlib/pylabdevs/pydg1000z/pydho800 environment.
Installing
There is a Python and PyPi packages that can be installed using
pip install numpy scipy matplotlib pylabdevs pydho800 pydg1000z pybode
Usage
The basic syntax is python bode.py MIN_FREQ MAX_FREQ [FREQ_COUNT], so if you, for example, want to test your DUT between 1kHz and 2.2Mhz, with 100 steps (default is 50),
you can do it like this: python bode.py 1e3 2.2e6 100.
By default only the Amplitude diagram is measured and plotted. If you also want to get the Phase diagram, you will have to specify the --phase flag.
If you want to use the measured data in another software like OriginLab or Matlab, you can export it to a semicolon-seperated CSV file with the --output option.
So a typical command line would like this: python bode.py 1e3 2.2e6 100 --osc_ip 10.0.0.123 --awg_ip 10.0.0.124 --phase --output out.csv
To see the full list of possible options call python bode.py --help.
License
This program is licensed under the MIT License. See LICENSE file for more info.
Acknowledgements
Based on the original work by DS1054_BodePlotter I have re-used code parts and the method of the measurement.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybode-0.0.1.tar.gz.
File metadata
- Download URL: pybode-0.0.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c27e7901ea5e39e243aaef3887349676247a37e188d563d2f6e8f930f4d998
|
|
| MD5 |
bf81dae7987f395146ed516d068de428
|
|
| BLAKE2b-256 |
5132e93b2bdfc36c68e1e67bb4404a751bf035b935de7daedf39eefbb98969c2
|
File details
Details for the file pybode-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pybode-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a29e57fa877708dd03d15f43f49b9f8ccdfe62b42a4c49f5d4ad03df3e84857
|
|
| MD5 |
998ba42e9e4bc080a16acfa41f181a20
|
|
| BLAKE2b-256 |
7f4ebbbabb9a01967f862c88cb092e71579e2565a3a0f764b1abec4d667e453f
|