8000 updated bode_plot titling + MIMO implementation · controlPh/python-control@c3ebbda · GitHub
[go: up one dir, main page]

Skip to content

Commit c3ebbda

Browse files
committed
updated bode_plot titling + MIMO implementation
1 parent 530d689 commit c3ebbda

File tree

7 files changed

+504
-267
lines changed

7 files changed

+504
-267
lines changed

control/frdata.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ class FrequencyResponseData(LTI):
7878
corresponding to the frequency points in omega
7979
w : iterable of real frequencies
8080
List of frequency points for which data are available.
81+
sysname : str or None
82+
Name of the system that generated the data.
8183
smooth : bool, optional
8284
If ``True``, create an interpolation function that allows the
8385
frequency response to be computed at any frequency within the range of
@@ -204,6 +206,10 @@ def __init__(self, *args, **kwargs):
204206
#
205207
# Process key word arguments
206208
#
209+
210+
# If data was generated by a system, keep track of that
211+
self.sysname = kwargs.pop('sysname', None)
212+
207213
# Keep track of return type
208214
self.return_magphase=kwargs.pop('return_magphase', False)
209215
if self.return_magphase not in (True, False):
@@ -638,6 +644,14 @@ def feedback(self, other=1, sign=-1):
638644

639645
return FRD(fresp, other.omega, smooth=(self.ifunc is not None))
640646

647+
# Plotting interface
648+
def plot(self, *args, **kwargs):
649+
from .freqplot import bode_plot
650+
651+
# For now, only support Bode plots
652+
# TODO: add 'kind' keyword and Nyquist plots (?)
653+
bode_plot(self, *args, **kwargs)
654+
641655
# Convert to pandas
642656
def to_pandas(self):
643657
if not pandas_check():

0 commit comments

Comments
 (0)
0