Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CDS 110 and CDS 112 Jupyter notebooks#1037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
murrayrm merged 18 commits intopython-control:mainfrommurrayrm:cds_examples-06Jul2024
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
546a4f1
initial commit of CDS 110, Winter 2024 lectures
murrayrmJul 7, 2024
1bcdb3a
updated lectures, with fixes, full model code, + colab links
murrayrmJul 7, 2024
ac7d910
added CDS 112 files
murrayrmJul 9, 2024
257625e
update CDS 110, L1
murrayrmJul 27, 2024
d4c75a3
update CDS 110, L2
murrayrmJul 27, 2024
557f2c2
update CDS 110, L3
murrayrmJul 27, 2024
cd675aa
update CDS 110, L4a and L4b
murrayrmJul 27, 2024
ea40713
update CDS 110, L5
murrayrmJul 27, 2024
7756016
update CDS 110, L6a, L6b, and L6c
murrayrmJul 27, 2024
563b864
update CDS 110, L7
murrayrmJul 27, 2024
64e58a3
update CDS 110, L8a and L8b
murrayrmJul 27, 2024
354f3cc
update CDS 110, L9
murrayrmJul 27, 2024
e4f2710
change cds112 files names and fix up errors
murrayrmJul 28, 2024
cf10d95
update Google Colab links, Makefile directions
murrayrmAug 10, 2024
90b1759
fix typo in kincar.py pointed out by @slivingston
murrayrmAug 10, 2024
7994bd0
fix small typos
murrayrmAug 10, 2024
fd3a5e7
fix links in doc/examples.rst
murrayrmAug 10, 2024
7915c91
address @slivingston review comments
murrayrmAug 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,3 +42,6 @@ venv/
ENV/
env.bak/
venv.bak/

# Files for MacOS
.DS_Store
6 changes: 6 additions & 0 deletionscontrol/freqplot.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -147,6 +147,8 @@ def bode_plot(
figure with the correct number and shape of axes, a new figure is
created. The shape of the array must match the shape of the
plotted data.
freq_label: str, optional
Frequency label (defaults to "rad/sec" or "Hertz")
grid : bool, optional
If True, plot grid lines on gain and phase plots. Default is set by
`config.defaults['freqplot.grid']`.
Expand All@@ -168,6 +170,8 @@ def bode_plot(
legend_loc : int or str, optional
Include a legend in the given location. Default is 'center right',
with no legend for a single response. Use False to suppress legend.
magnitude_label : str, optional
Label to use for magnitude axis. Defaults to "Magnitude".
margins_method : str, optional
Method to use in computing margins (see :func:`stability_margins`).
omega_limits : array_like of two values
Expand All@@ -179,6 +183,8 @@ def bode_plot(
Number of samples to use for the frequeny range. Defaults to
config.defaults['freqplot.number_of_samples']. Ignored if data is
not a list of systems.
phase_label : str, optional
Label to use for phase axis. Defaults to "Phase [rad]".
plot : bool, optional
(legacy) If given, `bode_plot` returns the legacy return values
of magnitude, phase, and frequency. If False, just return the
Expand Down
2 changes: 1 addition & 1 deletioncontrol/phaseplot.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -309,7 +309,7 @@ def vectorfield(
sys._update_params(params)
for i, x in enumerate(points):
vfdata[i, :2] = x
vfdata[i, 2:] = sys._rhs(0, x,0)
vfdata[i, 2:] = sys._rhs(0, x,np.zeros(sys.ninputs))

with plt.rc_context(rcParams):
out = ax.quiver(
Expand Down
18 changes: 17 additions & 1 deletiondoc/examples.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@ Examples

The source code for the examples below are available in the `examples/`
subdirectory of the source code distribution. They can also be accessed online
via the[python-control GitHub repository](https://github.com/python-control/python-control/tree/master/examples).
via the`python-control GitHub repository <https://github.com/python-control/python-control/tree/master/examples>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
via the `python-control GitHub repository<https://github.com/python-control/python-control/tree/master/examples>`_.
via the `python-control GitHub repository<https://github.com/python-control/python-control/tree/main/examples>`_.



Python scripts
Expand DownExpand Up@@ -62,3 +62,19 @@ online sources.
simulating_discrete_nonlinear
steering
stochresp

Google Colab Notebooks
======================

A collection of Jupyter notebooks are available on `Google Colab
<https://colab.research.google.com>`_, where they can be executed
through a web browser:

* `Caltech CDS 110 Google Colab notebooks
<https://drive.google.com/drive/folders/1LI2xWVn1kqrZ5lIcM5Ktxr2B7X730cCj?usp=share_link>`_:
Jupyter notebooks created by Richard Murray for CDS 110 (Analysis
and Design of Feedback Systems) at Caltech.

Note: in order to execute the Jupyter notebooks in this collection,
you will need a Google account that has access to the Google
Colaboratory application.
1 change: 1 addition & 0 deletionsexamples/.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
.ipynb-clean
29 changes: 29 additions & 0 deletionsexamples/Makefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
# Makefile for python-control examples
# RMM, 6 Jul 2024
#
# This makefile allows cleanup and posting of Jupyter notebooks into
# Google Colab.
#
# Files are copied to Google Colab using rclone. In order to copy files to
# Google Colab, you should edit the GDRIVE variable to use the name of the
# drive you have configured in rclone and the path where you want to place
# the files. The default location is set up for the fbsbook.org@gmail.com
# Google Drive account, currently maintained by Richard Murray.

NOTEBOOKS = cds110-L*_*.ipynb cds112-L*_*.ipynb
GDRIVE= fbsbook-gdrive:python-control/public/notebooks

# Clean up notebooks to remove output
clean: .ipynb-clean
.ipynb-clean: $(NOTEBOOKS)
@for i in $?; do \
echo jupyter nbconvert --clear-output clear-metadata $$i; \
jupyter nbconvert \
--ClearMetadataPreprocessor.enabled=True \
--clear-output $$i; \
done
touch $@

# Post Jupyter notebooks on course website
post: .ipynb-clean
rclone copy . $(GDRIVE) --include /cds110-L\*_\*.ipynb
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp