Skip to content

Commit

Permalink
build based on 4194f04
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Nov 28, 2024
1 parent a3fbc76 commit d4bf904
Show file tree
Hide file tree
Showing 86 changed files with 4,848 additions and 4,848 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-28T07:19:45","documenter_version":"1.8.0"}}
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-28T07:20:06","documenter_version":"1.8.0"}}
2 changes: 1 addition & 1 deletion dev/api/index.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
204 changes: 102 additions & 102 deletions dev/examples/analysis/4b6b3337.svg → dev/examples/analysis/be33a4e9.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions dev/examples/analysis/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
P = tf(1, [1, 0.2, 1])
C = pid(0.2, 1)
loopgain = P*C
marginplot(loopgain)</code></pre><img src="8f942d21.svg" alt="Example block output"/><p>This plot tells us that there is one gain margin of 1.27, i.e., the gain can increase by a factor of 1.27 before the system goes unstable. It also tells us that there are three different phase margins, the smallest of which is about 9°. We usually aim for a gain margin of &gt;1.5 and a phase margin above 30-45° for a robust system. The vertical lines in the plot indicate the frequencies at which the margins have been computed.</p><h2 id="Sensitivity-analysis"><a class="docs-heading-anchor" href="#Sensitivity-analysis">Sensitivity analysis</a><a id="Sensitivity-analysis-1"></a><a class="docs-heading-anchor-permalink" href="#Sensitivity-analysis" title="Permalink"></a></h2><p>More generally applicable measures of robustness include analysis of sensitivity functions, notably the peaks of the sensitivity function</p><p class="math-container">\[S(s) = (I + P(s)C(s))^{-1}\]</p><p>and the complementary sensitivity function</p><p class="math-container">\[T(s) = I - S(s) = (I + P(s)C(s))^{-1}P(s)C(s)\]</p><h3 id="Examples"><a class="docs-heading-anchor" href="#Examples">Examples</a><a id="Examples-1"></a><a class="docs-heading-anchor-permalink" href="#Examples" title="Permalink"></a></h3><p>We can plot all four sensitivity functions referred to as the &quot;gang of four&quot; using <a href="../../lib/plotting/#ControlSystemsBase.gangoffourplot-Tuple{Union{LTISystem, Vector}, Vector, Vararg{Any}}"><code>gangoffourplot</code></a>.</p><pre><code class="language-julia hljs">using ControlSystemsBase, Plots
marginplot(loopgain)</code></pre><img src="1405488c.svg" alt="Example block output"/><p>This plot tells us that there is one gain margin of 1.27, i.e., the gain can increase by a factor of 1.27 before the system goes unstable. It also tells us that there are three different phase margins, the smallest of which is about 9°. We usually aim for a gain margin of &gt;1.5 and a phase margin above 30-45° for a robust system. The vertical lines in the plot indicate the frequencies at which the margins have been computed.</p><h2 id="Sensitivity-analysis"><a class="docs-heading-anchor" href="#Sensitivity-analysis">Sensitivity analysis</a><a id="Sensitivity-analysis-1"></a><a class="docs-heading-anchor-permalink" href="#Sensitivity-analysis" title="Permalink"></a></h2><p>More generally applicable measures of robustness include analysis of sensitivity functions, notably the peaks of the sensitivity function</p><p class="math-container">\[S(s) = (I + P(s)C(s))^{-1}\]</p><p>and the complementary sensitivity function</p><p class="math-container">\[T(s) = I - S(s) = (I + P(s)C(s))^{-1}P(s)C(s)\]</p><h3 id="Examples"><a class="docs-heading-anchor" href="#Examples">Examples</a><a id="Examples-1"></a><a class="docs-heading-anchor-permalink" href="#Examples" title="Permalink"></a></h3><p>We can plot all four sensitivity functions referred to as the &quot;gang of four&quot; using <a href="../../lib/plotting/#ControlSystemsBase.gangoffourplot-Tuple{Union{LTISystem, Vector}, Vector, Vararg{Any}}"><code>gangoffourplot</code></a>.</p><pre><code class="language-julia hljs">using ControlSystemsBase, Plots
P = tf(1, [1, 0.2, 1])
C = pid(0.2, 1)
gangoffourplot(P, C)</code></pre><img src="4b6b3337.svg" alt="Example block output"/><p>The peak value of the sensitivity function, <span>$M_S$</span>, can be computed using <a href="../../lib/analysis/#ControlSystemsBase.hinfnorm-Tuple{AbstractStateSpace{&lt;:Continuous}}"><code>hinfnorm</code></a></p><pre><code class="language-julia hljs">S = sensitivity(P, C)
gangoffourplot(P, C)</code></pre><img src="be33a4e9.svg" alt="Example block output"/><p>The peak value of the sensitivity function, <span>$M_S$</span>, can be computed using <a href="../../lib/analysis/#ControlSystemsBase.hinfnorm-Tuple{AbstractStateSpace{&lt;:Continuous}}"><code>hinfnorm</code></a></p><pre><code class="language-julia hljs">S = sensitivity(P, C)
Ms, ωMs = hinfnorm(S)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(8.14779356151499, 1.0941856436200372)</code></pre><p>And we can plot a circle in the Nyquist plot corresponding to the inverse distance between the loop-transfer function and the critical point:</p><pre><code class="language-julia hljs">w = exp10.(-1:0.001:2)
nyquistplot(P*C, w, Ms_circles=[Ms], xlims=(-1.2, 0.5), ylims=(-2, 0.3))</code></pre><img src="40bed48e.svg" alt="Example block output"/><p><span>$M_S$</span> is always <span>$≥ 1$</span>, but we typically want to keep it below 1.3-2 for robustness reasons. For SISO systems, <span>$M_S$</span> is linked to the classical gain and phase margins through the following inequalities:</p><p class="math-container">\[\begin{aligned}
nyquistplot(P*C, w, Ms_circles=[Ms], xlims=(-1.2, 0.5), ylims=(-2, 0.3))</code></pre><img src="3e9c04e8.svg" alt="Example block output"/><p><span>$M_S$</span> is always <span>$≥ 1$</span>, but we typically want to keep it below 1.3-2 for robustness reasons. For SISO systems, <span>$M_S$</span> is linked to the classical gain and phase margins through the following inequalities:</p><p class="math-container">\[\begin{aligned}
\phi_m &amp;≥ 2 \sin^{-1}\left(\dfrac{1}{2M_S}\right) \text{rad}\\
g_m &amp;≥ \dfrac{M_S}{M_S-1}
\end{aligned}\]</p><p>We can also obtain individual sensitivity function using the low-level function <a href="../../lib/constructors/#ControlSystemsBase.feedback"><code>feedback</code></a> directly, or using one of the higher-level functions</p><ul><li><a href="../../lib/synthesis/#ControlSystemsBase.sensitivity-Tuple"><code>sensitivity</code></a></li><li><a href="../../lib/synthesis/#ControlSystemsBase.comp_sensitivity-Tuple"><code>comp_sensitivity</code></a></li><li><a href="../../lib/synthesis/#ControlSystemsBase.G_PS-Tuple{Any, Any}"><code>G_PS</code></a></li><li><a href="../../lib/synthesis/#ControlSystemsBase.G_CS-Tuple{Any, Any}"><code>G_CS</code></a></li><li><a href="../../lib/analysis/#ControlSystemsBase.gangoffour-Tuple{LTISystem, LTISystem}"><code>gangoffour</code></a></li><li><a href="../../lib/synthesis/#ControlSystemsBase.extended_gangoffour"><code>extended_gangoffour</code></a></li><li><code>RobustAndOptimalControl.feedback_control</code></li></ul><h2 id="Further-reading"><a class="docs-heading-anchor" href="#Further-reading">Further reading</a><a id="Further-reading-1"></a><a class="docs-heading-anchor-permalink" href="#Further-reading" title="Permalink"></a></h2><p>A modern robustness measure is the <a href="https://juliacontrol.github.io/RobustAndOptimalControl.jl/dev/#Diskmargin-example"><code>diskmargin</code></a>, that analyses the robustness of a SISO or MIMO system to simultaneous gain and phase variations.</p><p>In the presence of structured uncertainty, such as parameter uncertainty or other explicitly modeled uncertainty, the structured singular value (often referred to as <span>$\mu$</span>), provides a way to analyze robustness with respect to the modeled uncertainty. See the <a href="https://juliacontrol.github.io/RobustAndOptimalControl.jl/dev/">RobustAndOptimalControl.jl</a> package for more details.</p><p>Basic usage of robustness analysis with JuliaControl are demonstrated in the two videos below:</p><iframe style="height: 315px; width: 560px" src="https://www.youtube.com/embed/zTW4mlWNumo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe><p>and </p><iframe style="height: 315px; width: 560px" src="https://www.youtube.com/embed/gIsa93GvPbg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../example/">« Design</a><a class="docs-footer-nextpage" href="../smith_predictor/">Smith predictor »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.0 on <span class="colophon-date" title="Thursday 28 November 2024 07:19">Thursday 28 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit d4bf904

Please sign in to comment.