|
1 |
| -"""test_margins.py |
| 1 | +"""disk_margins.py |
| 2 | +
|
2 | 3 | Demonstrate disk-based stability margin calculations.
|
| 4 | +
|
| 5 | +References: |
| 6 | +[1] Blight, James D., R. Lane Dailey, and Dagfinn Gangsaas. “Practical |
| 7 | + Control Law Design for Aircraft Using Multivariable Techniques.” |
| 8 | + International Journal of Control 59, no. 1 (January 1994): 93-137. |
| 9 | + https://doi.org/10.1080/00207179408923071. |
| 10 | +
|
| 11 | +[2] Seiler, Peter, Andrew Packard, and Pascal Gahinet. “An Introduction |
| 12 | + to Disk Margins [Lecture Notes].” IEEE Control Systems Magazine 40, |
| 13 | + no. 5 (October 2020): 78-95. |
| 14 | +
|
| 15 | +[3] P. Benner, V. Mehrmann, V. Sima, S. Van Huffel, and A. Varga, "SLICOT |
| 16 | + - A Subroutine Library in Systems and Control Theory", Applied and |
| 17 | + Computational Control, Signals, and Circuits (Birkhauser), Vol. 1, Ch. |
| 18 | + 10, pp. 505-546, 1999. |
| 19 | +
|
| 20 | +[4] S. Van Huffel, V. Sima, A. Varga, S. Hammarling, and F. Delebecque, |
| 21 | + "Development of High Performance Numerical Software for Control", IEEE |
| 22 | + Control Systems Magazine, Vol. 24, Nr. 1, Feb., pp. 60-76, 2004. |
3 | 23 | """
|
4 | 24 |
|
5 | 25 | import os
|
@@ -32,32 +52,6 @@ def plot_allowable_region(alpha_max, skew, ax = None):
|
32 | 52 | PM : ndarray
|
33 | 53 | 1D array of frequency-dependent disk-based phase margins, in deg.
|
34 | 54 | PM is the same size as "omega" parameter.
|
35 |
| -
|
36 |
| - Examples |
37 |
| - -------- |
38 |
| - >> import control |
39 |
| - >> import numpy as np |
40 |
| - >> import matplotlib |
41 |
| - >> import matplotlib.pyplot as plt |
42 |
| - >> |
43 |
| - >> omega = np.logspace(-1, 2, 1001) |
44 |
| - >> |
45 |
| - >> s = control.tf('s') # Laplace variable |
46 |
| - >> L = 6.25*(s + 3)*(s + 5)/(s*(s + 1)**2*(s**2 + 0.18*s + 100)) # loop gain |
47 |
| - >> |
48 |
| - >> DM_plot = [] |
49 |
| - >> DM_plot.append(control.disk_margins(L, omega, skew = -1.0)[0]) # T-based (T) |
50 |
| - >> DM_plot.append(control.disk_margins(L, omega, skew = 0.0)[0]) # balanced (S - T) |
51 |
| - >> DM_plot.append(control.disk_margins(L, omega, skew = 1.0)[0]) # S-based (S) |
52 |
| - >> plt.figure(1) |
53 |
| - >> control.disk_margin_plot(DM_plot, skew = [-1.0, 0.0, 1.0]) |
54 |
| - >> plt.show() |
55 |
| -
|
56 |
| - References |
57 |
| - ---------- |
58 |
| - [1] Seiler, Peter, Andrew Packard, and Pascal Gahinet. “An Introduction |
59 |
| - to Disk Margins [Lecture Notes].” IEEE Control Systems Magazine 40, |
60 |
| - no. 5 (October 2020): 78-95. |
61 | 55 | """
|
62 | 56 |
|
63 | 57 | # Create axis if needed
|
|
0 commit comments