File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 6666from .frdata import *
6767from .canonical import *
6868from .robust import *
69+ from .config import *
6970
7071# Exceptions
7172from .exception import *
Original file line number Diff line number Diff line change 1616
1717# Set defaults to match MATLAB
1818def use_matlab_defaults ():
19+ """
20+ Use MATLAB compatible configuration settings
21+ * Bode plots plot gain in dB, phase in degrees, frequency in Hertz
22+ """
1923 # Bode plot defaults
2024 global bode_dB ; bode_dB = True
2125 global bode_deg ; bode_deg = True
2226 global bode_Hz ; bode_Hz = True
2327
2428# Set defaults to match FBS (Astrom and Murray)
2529def use_fbs_defaults ():
30+ """
31+ Use `Astrom and Murray <http://fbsbook.org>`_ compatible settings
32+ * Bode plots plot gain in powers of ten, phase in degrees,
33+ frequency in Hertz
34+ """
2635 # Bode plot defaults
2736 global bode_dB ; bode_dB = False
2837 global bode_deg ; bode_deg = True
Original file line number Diff line number Diff line change 11.. _conventions-ref :
22
3+ .. currentmodule :: control
4+
35###################
46Library conventions
57###################
@@ -74,3 +76,28 @@ can be computed like this::
7476
7577 ft = D * U
7678
79+ Package configuration
80+ =====================
81+
82+ The python-control library can be customized to allow for different plotting
83+ conventions. The currently configurable options allow the units for Bode
84+ plots to be set as dB for gain, degrees for phase and Hertz for frequency
85+ (MATLAB conventions) or the gain can be given in magnitude units (powers of
86+ 10), corresponding to the conventions used in `Feedback Systems
87+ <http://www.cds.caltech.edu/~murray/FBSwiki> `_.
88+
89+ Variables that can be configured, along with their default values:
90+ * bode_dB (False): Bode plot magnitude plotted in dB (otherwise powers of 10)
91+ * bode_deg (True): Bode plot phase plotted in degrees (otherwise radians)
92+ * bode_Hz (False): Bode plot frequency plotted in Hertz (otherwise rad/sec)
93+ * bode_number_of_samples (None): Number of frequency points in Bode plots
94+ * bode_feature_periphery_decade (1.0): How many decades to include in the
95+ frequency range on both sides of features (poles, zeros).
96+
97+ Functions that can be used to set standard configurations:
98+
99+ .. autosummary ::
100+ :toctree: generated/
101+
102+ use_fbs_defaults
103+ use_matlab_defaults
You can’t perform that action at this time.
0 commit comments