Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| test-and-measurement:analog-discovery-2:matlab-bode-plot-generator [2022/09/12 18:08] – changed forum.digilentinc.com to forum.digilent.com jeff.greenberg_ni.com | test-and-measurement:analog-discovery-2:matlab-bode-plot-generator [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== MATLAB Bode Plot Generator (Under Construction) ====== | ||
| + | |||
| + | <WRAP round todo> | ||
| + | == Under Construction == | ||
| + | </ | ||
| + | |||
| + | {{ reference: | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | This MATLAB function generates Bode plots based on a user-defined frequency sweep. It requires the Data Acquisition Toolbox and an Analog Discovery 2 to generate and capture the signals. The user defines the start, stop, and the number of frequency samples per decade in the frequency sweep. | ||
| + | |||
| + | The highest frequency sweep range is limited at 500kHz due to the Data Acquisition Toolbox' | ||
| + | |||
| + | ---- | ||
| + | ===== Inventory ===== | ||
| + | * Analog Discovery 2 | ||
| + | * MATLAB with Data Acquisition Toolbox | ||
| + | * Ensure that MATLAB' | ||
| + | * {{ reference: | ||
| + | |||
| + | ---- | ||
| + | ===== Setup ===== | ||
| + | |||
| + | Open the file " | ||
| + | |||
| + | '' | ||
| + | |||
| + | ^ Parameter ^ Description | ||
| + | | start | Optional. Frequency sweep start value (Hz) | | ||
| + | | stop | Optional. Frequency sweep stop value (Hz) | ||
| + | | samplesPerDec | ||
| + | |||
| + | The function defaults to a 10Hz-100kHz sweep with 10 samples per decade if no parameters are passed. | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | This function is configured so that the Analog Discovery Oscilloscope Channel 1 (solid orange wire) senses the input signal, and Channel 2 (solid blue wire) senses the output signal. The negative leads (marked with a white stripe) and a black ground wire should be connected to the ground of the network under test. The Function Generator Channel 1 (solid yellow wire) is used as the input signal and should be connected at the same place as Oscilloscope Channel 1. See the diagram to the right. | ||
| + | </ | ||
| + | {{ reference: | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | An example of data captured, processed and plotted by this function can be seen to the right. | ||
| + | </ | ||
| + | {{ reference: | ||
| + | </ | ||
| + | ---- | ||
| + | ===== Final Notes ===== | ||
| + | |||
| + | For more guides and example projects for your Test and Measurement device, please visit its Resource Center, which can be found through this wiki's [[test-and-measurement: | ||
| + | |||
| + | For technical support, please visit the [[https:// | ||

