Files
AutoControlCourse/assets/knowledge_cards_html.py
T

500 lines
34 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
知识卡片内容 - 包含时域、频域、根轨迹分析的公式和方法
使用纯HTML格式,无需LaTeX渲染库
"""
# 时域分析知识卡片
TIME_DOMAIN_KNOWLEDGE = """
<div class='knowledge-card'>
<h3 style='color: #667eea; margin-top: 0; display: flex; align-items: center; gap: 10px;'>
<span style='font-size: 1.3em;'>📚</span> 时域分析常用公式
</h3>
<details open>
<summary style='background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
📐 二阶系统标准形式
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<p style='margin: 10px 0;'><strong>标准传递函数:</strong></p>
<div style='text-align: center; background: white; padding: 20px; border-radius: 8px; margin: 10px 0; box-shadow: 0 2px 6px rgba(0,0,0,0.05);'>
<div style='font-size: 1.3em; display: inline-block;'>
<i>G</i>(<i>s</i>) =
<div style='display: inline-block; vertical-align: middle; margin: 0 8px;'>
<div style='text-align: center; border-bottom: 2px solid #333; padding: 0 10px 5px;'>ω<sub>n</sub><sup>2</sup></div>
<div style='text-align: center; padding: 5px 10px 0;'><i>s</i><sup>2</sup> + 2ζω<sub>n</sub><i>s</i> + ω<sub>n</sub><sup>2</sup></div>
</div>
</div>
</div>
<h4 style='color: #667eea; margin-top: 20px; font-size: 1.1em;'>📊 关键参数</h4>
<table style='width: 100%; border-collapse: collapse; margin: 15px 0; font-size: 0.95em; box-shadow: 0 2px 10px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden;'>
<tr style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white;'>
<th style='padding: 12px; text-align: left; font-weight: 700;'>参数</th>
<th style='padding: 12px; text-align: left; font-weight: 700;'>含义</th>
<th style='padding: 12px; text-align: left; font-weight: 700;'>影响</th>
</tr>
<tr style='background: white;'>
<td style='padding: 10px; border: 1px solid #e0e7ff;'><strong>ζ (zeta)</strong></td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'>阻尼比</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'>控制超调量和振荡</td>
</tr>
<tr style='background: #f8f9ff;'>
<td style='padding: 10px; border: 1px solid #e0e7ff;'><strong>ω<sub>n</sub></strong></td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'>无阻尼自然频率 (rad/s)</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'>决定响应速度</td>
</tr>
</table>
<h4 style='color: #764ba2; margin-top: 20px; font-size: 1.1em;'>🎯 阻尼比分类</h4>
<ul style='line-height: 2; margin-left: 20px;'>
<li><strong style='color: #f5576c;'>ζ &lt; 0:</strong> 不稳定系统</li>
<li><strong style='color: #ffa726;'>ζ = 0:</strong> 无阻尼振荡</li>
<li><strong style='color: #4caf50;'>0 &lt; ζ &lt; 1:</strong> 欠阻尼(有振荡)⭐ 最常见</li>
<li><strong style='color: #2196f3;'>ζ = 1:</strong> 临界阻尼(无超调)</li>
<li><strong style='color: #9c27b0;'>ζ &gt; 1:</strong> 过阻尼(响应慢)</li>
</ul>
</div>
</details>
<details open>
<summary style='background: linear-gradient(135deg, #fff0f8 0%, #fce4ec 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
📊 时域性能指标(欠阻尼系统)
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<div style='background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%); padding: 15px; border-radius: 10px; margin: 12px 0; border-left: 4px solid #667eea;'>
<strong style='color: #667eea; font-size: 1.1em;'>1️⃣ 上升时间 (Rise Time, t<sub>r</sub>)</strong>
<p style='margin: 8px 0;'>响应从 10% 上升到 90% 终值所需时间</p>
<div style='text-align: center; background: white; padding: 15px; border-radius: 6px; margin: 8px 0;'>
<div style='font-size: 1.2em; display: inline-block;'>
<i>t</i><sub>r</sub> ≈
<div style='display: inline-block; vertical-align: middle; margin: 0 5px;'>
<div style='text-align: center; border-bottom: 2px solid #333; padding: 0 8px 3px;'>1.8</div>
<div style='text-align: center; padding: 3px 8px 0;'>ω<sub>n</sub></div>
</div>
</div>
</div>
</div>
<div style='background: linear-gradient(135deg, #fff4f0 0%, #ffe0b2 100%); padding: 15px; border-radius: 10px; margin: 12px 0; border-left: 4px solid #ff9800;'>
<strong style='color: #f57c00; font-size: 1.1em;'>2️⃣ 峰值时间 (Peak Time, t<sub>p</sub>)</strong>
<p style='margin: 8px 0;'>响应达到第一个峰值的时间</p>
<div style='text-align: center; background: white; padding: 15px; border-radius: 6px; margin: 8px 0;'>
<div style='font-size: 1.2em; display: inline-block;'>
<i>t</i><sub>p</sub> =
<div style='display: inline-block; vertical-align: middle; margin: 0 5px;'>
<div style='text-align: center; border-bottom: 2px solid #333; padding: 0 8px 3px;'>π</div>
<div style='text-align: center; padding: 3px 8px 0;'>ω<sub>n</sub>√(1−ζ²)</div>
</div>
=
<div style='display: inline-block; vertical-align: middle; margin: 0 5px;'>
<div style='text-align: center; border-bottom: 2px solid #333; padding: 0 8px 3px;'>π</div>
<div style='text-align: center; padding: 3px 8px 0;'>ω<sub>d</sub></div>
</div>
</div>
</div>
<p style='margin: 8px 0; color: #666; font-size: 0.95em;'>其中 ω<sub>d</sub> = ω<sub>n</sub>√(1−ζ²) 为阻尼振荡频率</p>
</div>
<div style='background: linear-gradient(135deg, #f0fff4 0%, #c8e6c9 100%); padding: 15px; border-radius: 10px; margin: 12px 0; border-left: 4px solid #4caf50;'>
<strong style='color: #388e3c; font-size: 1.1em;'>3️⃣ 超调量 (Overshoot, σ%)</strong>
<p style='margin: 8px 0;'>响应超过稳态值的最大百分比</p>
<div style='text-align: center; background: white; padding: 15px; border-radius: 6px; margin: 8px 0; font-size: 1.2em;'>
σ% = <i>e</i><sup>−πζ/√(1−ζ²)</sup> × 100%
</div>
<p style='margin: 8px 0; color: #388e3c; font-weight: 600;'>💡 仅与 ζ 有关!</p>
<table style='width: 100%; margin: 10px 0; font-size: 0.9em;'>
<tr style='background: #e8f5e9;'>
<td style='padding: 6px; border: 1px solid #c8e6c9;'><strong>ζ = 0.5</strong></td>
<td style='padding: 6px; border: 1px solid #c8e6c9;'>σ% ≈ 16%</td>
</tr>
<tr style='background: white;'>
<td style='padding: 6px; border: 1px solid #c8e6c9;'><strong>ζ = 0.707</strong></td>
<td style='padding: 6px; border: 1px solid #c8e6c9;'>σ% ≈ 4.3% ⭐ 最佳</td>
</tr>
</table>
</div>
<div style='background: linear-gradient(135deg, #fff0f8 0%, #f3e5f5 100%); padding: 15px; border-radius: 10px; margin: 12px 0; border-left: 4px solid #9c27b0;'>
<strong style='color: #7b1fa2; font-size: 1.1em;'>4️⃣ 调节时间 (Settling Time, t<sub>s</sub>)</strong>
<p style='margin: 8px 0;'>响应达到并保持在稳态值 ±2%(或±5%)范围内的时间</p>
<div style='text-align: center; background: white; padding: 15px; border-radius: 6px; margin: 8px 0;'>
<div style='font-size: 1.2em;'>
<i>t</i><sub>s</sub> ≈
<div style='display: inline-block; vertical-align: middle; margin: 0 5px;'>
<div style='text-align: center; border-bottom: 2px solid #333; padding: 0 8px 3px;'>4</div>
<div style='text-align: center; padding: 3px 8px 0;'>ζω<sub>n</sub></div>
</div>
&nbsp; (2% 误差带)
</div>
<div style='font-size: 1.2em; margin-top: 10px;'>
<i>t</i><sub>s</sub> ≈
<div style='display: inline-block; vertical-align: middle; margin: 0 5px;'>
<div style='text-align: center; border-bottom: 2px solid #333; padding: 0 8px 3px;'>3</div>
<div style='text-align: center; padding: 3px 8px 0;'>ζω<sub>n</sub></div>
</div>
&nbsp; (5% 误差带)
</div>
</div>
</div>
</div>
</details>
<details>
<summary style='background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
🎯 一阶系统特性
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<p><strong>标准传递函数:</strong></p>
<div style='text-align: center; background: white; padding: 20px; border-radius: 8px; margin: 10px 0;'>
<div style='font-size: 1.3em; display: inline-block;'>
<i>G</i>(<i>s</i>) =
<div style='display: inline-block; vertical-align: middle; margin: 0 8px;'>
<div style='text-align: center; border-bottom: 2px solid #333; padding: 0 10px 5px;'><i>K</i></div>
<div style='text-align: center; padding: 5px 10px 0;'>τ<i>s</i> + 1</div>
</div>
</div>
</div>
<p><strong>阶跃响应:</strong></p>
<div style='text-align: center; background: white; padding: 20px; border-radius: 8px; margin: 10px 0; font-size: 1.2em;'>
<i>y</i>(<i>t</i>) = <i>K</i>(1 <i>e</i><sup><i>t</i>/τ</sup>)
</div>
<div style='background: #e3f2fd; padding: 12px; border-radius: 8px; margin: 10px 0;'>
<p><strong>💡 关键时间点:</strong></p>
<ul style='line-height: 1.8;'>
<li><strong><i>t</i> = τ:</strong> 达到稳态值的 63.2%</li>
<li><strong><i>t</i> = 3τ:</strong> 达到稳态值的 95%</li>
<li><strong><i>t</i> = 4τ:</strong> 达到稳态值的 98.2%</li>
<li><strong><i>t</i> = 5τ:</strong> 达到稳态值的 99.3%</li>
</ul>
</div>
</div>
</details>
</div>
"""
# 频域分析知识卡片
FREQUENCY_DOMAIN_KNOWLEDGE = """
<div class='knowledge-card'>
<h3 style='color: #667eea; margin-top: 0; display: flex; align-items: center; gap: 10px;'>
<span style='font-size: 1.3em;'>📚</span> 频域分析常用方法
</h3>
<details open>
<summary style='background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
🎯 增益裕度 (Gain Margin, GM)
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<p><strong>定义:</strong>在相角为 -180° 时,系统增益可增加的最大倍数</p>
<div style='text-align: center; background: white; padding: 20px; border-radius: 8px; margin: 10px 0;'>
<div style='font-size: 1.3em;'>
GM<sub>dB</sub> = 20log<sub>10</sub>|<i>G</i>(<i>j</i>ω<sub>pc</sub>)|
</div>
</div>
<p style='margin: 8px 0;'><strong>ω<sub>pc</sub></strong> - 相角交越频率(相角 = -180°)</p>
<h4 style='color: #667eea; margin-top: 15px;'>判断准则</h4>
<table style='width: 100%; border-collapse: collapse; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden;'>
<tr style='background: #e8f5e9;'>
<td style='padding: 10px; border: 1px solid #c8e6c9; font-weight: 600;'>GM &gt; 0 dB</td>
<td style='padding: 10px; border: 1px solid #c8e6c9;'>✅ 系统稳定</td>
</tr>
<tr style='background: #fff3e0;'>
<td style='padding: 10px; border: 1px solid #ffe0b2; font-weight: 600;'>GM = 0 dB</td>
<td style='padding: 10px; border: 1px solid #ffe0b2;'>⚠️ 临界稳定</td>
</tr>
<tr style='background: #ffebee;'>
<td style='padding: 10px; border: 1px solid #ffcdd2; font-weight: 600;'>GM &lt; 0 dB</td>
<td style='padding: 10px; border: 1px solid #ffcdd2;'>❌ 系统不稳定</td>
</tr>
</table>
<div style='background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%); padding: 12px; border-radius: 8px; margin: 10px 0;'>
<p><strong>💡 工程要求:</strong>通常要求 <strong>GM ≥ 6 dB</strong>(约2倍增益余量)</p>
</div>
</div>
</details>
<details open>
<summary style='background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
🎯 相角裕度 (Phase Margin, PM)
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<p><strong>定义:</strong>在增益为 1 (0dB) 时,系统相角与 -180° 的差值</p>
<div style='text-align: center; background: white; padding: 20px; border-radius: 8px; margin: 10px 0; font-size: 1.3em;'>
PM = 180° + ∠<i>G</i>(<i>j</i>ω<sub>gc</sub>)
</div>
<p style='margin: 8px 0;'><strong>ω<sub>gc</sub></strong> - 增益交越频率(幅值 = 1 或 0dB</p>
<h4 style='color: #764ba2; margin-top: 15px;'>判断准则</h4>
<table style='width: 100%; border-collapse: collapse; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden;'>
<tr style='background: #e8f5e9;'>
<td style='padding: 10px; border: 1px solid #c8e6c9; font-weight: 600;'>PM &gt; 0°</td>
<td style='padding: 10px; border: 1px solid #c8e6c9;'>✅ 系统稳定</td>
</tr>
<tr style='background: #fff3e0;'>
<td style='padding: 10px; border: 1px solid #ffe0b2; font-weight: 600;'>PM = 0°</td>
<td style='padding: 10px; border: 1px solid #ffe0b2;'>⚠️ 临界稳定</td>
</tr>
<tr style='background: #ffebee;'>
<td style='padding: 10px; border: 1px solid #ffcdd2; font-weight: 600;'>PM &lt; 0°</td>
<td style='padding: 10px; border: 1px solid #ffcdd2;'>❌ 系统不稳定</td>
</tr>
</table>
<div style='background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); padding: 12px; border-radius: 8px; margin: 10px 0;'>
<p><strong>💡 工程要求:</strong>通常要求 <strong>PM ∈ [30°, 60°]</strong></p>
<p style='margin: 8px 0;'>• PM ≈ 45° ~ 60°: 良好阻尼特性</p>
<p style='margin: 8px 0;'>• PM 越大,超调量越小</p>
</div>
<h4 style='color: #f57c00; margin-top: 15px;'>与时域性能的关系</h4>
<div style='text-align: center; background: white; padding: 15px; border-radius: 8px; margin: 10px 0; font-size: 1.2em;'>
ζ ≈ <div style='display: inline-block; vertical-align: middle; margin: 0 5px;'>
<div style='text-align: center; border-bottom: 2px solid #333; padding: 0 8px 3px;'>PM</div>
<div style='text-align: center; padding: 3px 8px 0;'>100</div>
</div> &nbsp; (PM 以度为单位)
</div>
<table style='width: 100%; margin: 10px 0; font-size: 0.9em; box-shadow: 0 2px 6px rgba(0,0,0,0.06); border-radius: 6px; overflow: hidden;'>
<tr style='background: #f5f5f5; font-weight: 600;'>
<td style='padding: 8px; border: 1px solid #ddd;'>PM</td>
<td style='padding: 8px; border: 1px solid #ddd;'>ζ</td>
<td style='padding: 8px; border: 1px solid #ddd;'>超调量</td>
</tr>
<tr><td style='padding: 8px; border: 1px solid #ddd;'>30°</td><td style='padding: 8px; border: 1px solid #ddd;'>≈ 0.3</td><td style='padding: 8px; border: 1px solid #ddd;'>≈ 37%</td></tr>
<tr><td style='padding: 8px; border: 1px solid #ddd;'>45°</td><td style='padding: 8px; border: 1px solid #ddd;'>≈ 0.45</td><td style='padding: 8px; border: 1px solid #ddd;'>≈ 20%</td></tr>
<tr><td style='padding: 8px; border: 1px solid #ddd;'>60°</td><td style='padding: 8px; border: 1px solid #ddd;'>≈ 0.6</td><td style='padding: 8px; border: 1px solid #ddd;'>≈ 10% ⭐</td></tr>
</table>
</div>
</details>
<details>
<summary style='background: linear-gradient(135deg, #fff0f8 0%, #fce4ec 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
📊 Bode 图与 Nyquist 图
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<h4 style='color: #667eea;'>Bode 图(伯德图)</h4>
<p><strong>组成:</strong>幅频特性图 + 相频特性图</p>
<ul style='line-height: 1.8;'>
<li><strong>横轴:</strong>频率 ω (对数刻度)</li>
<li><strong>纵轴(幅频):</strong>20log|<i>G</i>(<i>j</i>ω)| (dB)</li>
<li><strong>纵轴(相频):</strong>∠<i>G</i>(<i>j</i>ω) (度)</li>
</ul>
<div style='background: #e3f2fd; padding: 12px; border-radius: 8px; margin: 10px 0;'>
<p><strong>💡 优点:</strong></p>
<ul style='line-height: 1.6;'>
<li>便于绘制(渐近线近似)</li>
<li>直观读取稳定裕度</li>
<li>串联系统可图形叠加</li>
</ul>
</div>
<h4 style='color: #764ba2; margin-top: 20px;'>Nyquist 图(奈奎斯特图)</h4>
<p><strong>定义:</strong>开环频率特性在复平面上的轨迹</p>
<div style='background: #fff3e0; padding: 12px; border-radius: 8px; margin: 10px 0;'>
<p><strong>🎯 奈奎斯特稳定判据:</strong></p>
<p style='text-align: center; font-weight: 600; margin: 10px 0; font-size: 1.2em;'><i>Z</i> = <i>P</i> <i>N</i></p>
<p style='font-size: 0.95em;'>• <i>Z</i>: 闭环右半平面极点数<br>
• <i>P</i>: 开环右半平面极点数<br>
• <i>N</i>: 曲线逆时针包围 (1, <i>j</i>0) 的圈数</p>
<p style='margin-top: 10px; color: #f57c00; font-weight: 600;'>稳定条件:<i>Z</i> = 0</p>
</div>
</div>
</details>
<details>
<summary style='background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
🔧 典型环节频率特性
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<div style='margin-bottom: 15px; padding: 12px; background: white; border-radius: 8px; border-left: 4px solid #667eea;'>
<h4 style='margin-top: 0; color: #667eea;'>1️⃣ 比例环节 <i>K</i></h4>
<p>• 幅频:20log<i>K</i> (dB) - 水平线<br>• 相频:0° - 水平线</p>
</div>
<div style='margin-bottom: 15px; padding: 12px; background: white; border-radius: 8px; border-left: 4px solid #f57c00;'>
<h4 style='margin-top: 0; color: #f57c00;'>2️⃣ 积分环节 1/<i>s</i></h4>
<p>• 幅频:-20dB/dec 斜率<br>• 相频:-90° - 水平线</p>
</div>
<div style='margin-bottom: 15px; padding: 12px; background: white; border-radius: 8px; border-left: 4px solid #4caf50;'>
<h4 style='margin-top: 0; color: #4caf50;'>3️⃣ 惯性环节 1/(<i>Ts</i>+1)</h4>
<p>• 转折频率:ω = 1/<i>T</i><br>• 幅频:低频 0dB,高频 -20dB/dec<br>• 相频:0° → -90°</p>
</div>
</div>
</details>
</div>
"""
# 根轨迹分析知识卡片
ROOT_LOCUS_KNOWLEDGE = """
<div class='knowledge-card'>
<h3 style='color: #667eea; margin-top: 0; display: flex; align-items: center; gap: 10px;'>
<span style='font-size: 1.3em;'>📚</span> 根轨迹分析要点
</h3>
<details open>
<summary style='background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
🎯 根轨迹基本概念
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<p><strong>定义:</strong>当开环增益 <i>K</i> 从 0 → ∞ 变化时,闭环特征方程根(极点)在 <i>s</i> 平面上的运动轨迹</p>
<h4 style='color: #667eea; margin-top: 15px;'>特征方程</h4>
<div style='text-align: center; background: white; padding: 15px; border-radius: 8px; margin: 10px 0; font-size: 1.3em;'>
1 + <i>KG</i>(<i>s</i>)<i>H</i>(<i>s</i>) = 0
</div>
<h4 style='color: #764ba2; margin-top: 15px;'>主要作用</h4>
<ul style='line-height: 1.8;'>
<li>✅ 直观显示增益对极点位置的影响</li>
<li>✅ 判断系统稳定性</li>
<li>✅ 选择合适的增益值</li>
<li>✅ 设计控制器参数</li>
</ul>
</div>
</details>
<details open>
<summary style='background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
📐 根轨迹绘制基本条件
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<div style='background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); padding: 15px; border-radius: 10px; margin: 12px 0; border-left: 4px solid #4caf50;'>
<h4 style='margin-top: 0; color: #388e3c;'>1️⃣ 幅值条件(充要条件)</h4>
<div style='text-align: center; background: white; padding: 15px; border-radius: 6px; margin: 8px 0; font-size: 1.2em;'>
|<i>KG</i>(<i>s</i><sub>0</sub>)<i>H</i>(<i>s</i><sub>0</sub>)| = 1
</div>
<p style='margin: 8px 0;'><strong>💡 用途:</strong>确定增益 <i>K</i> 的值</p>
</div>
<div style='background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); padding: 15px; border-radius: 10px; margin: 12px 0; border-left: 4px solid #ff9800;'>
<h4 style='margin-top: 0; color: #f57c00;'>2️⃣ 相角条件(充要条件)</h4>
<div style='text-align: center; background: white; padding: 15px; border-radius: 6px; margin: 8px 0; font-size: 1.2em;'>
∠<i>G</i>(<i>s</i><sub>0</sub>)<i>H</i>(<i>s</i><sub>0</sub>) = (2<i>k</i>+1) × 180°
</div>
<p style='margin: 8px 0; font-size: 0.95em;'>其中 <i>k</i> = 0, ±1, ±2, ...</p>
<p style='margin: 8px 0;'><strong>💡 用途:</strong>判断 <i>s</i> 平面某点是否在根轨迹上</p>
</div>
</div>
</details>
<details open>
<summary style='background: linear-gradient(135deg, #fff0f8 0%, #fce4ec 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
🌟 根轨迹基本性质
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<table style='width: 100%; border-collapse: collapse; margin: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden;'>
<tr style='background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white;'>
<th style='padding: 12px; text-align: left; font-weight: 700;'>规则</th>
<th style='padding: 12px; text-align: left; font-weight: 700;'>内容</th>
</tr>
<tr style='background: white;'>
<td style='padding: 10px; border: 1px solid #e0e7ff; font-weight: 600;'>起点</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'><i>K</i>=0,位于<strong>开环极点</strong></td>
</tr>
<tr style='background: #f8f9ff;'>
<td style='padding: 10px; border: 1px solid #e0e7ff; font-weight: 600;'>终点</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'><i>K</i>→∞,位于<strong>开环零点</strong>或无穷远</td>
</tr>
<tr style='background: white;'>
<td style='padding: 10px; border: 1px solid #e0e7ff; font-weight: 600;'>分支数</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'>max(<i>n</i>, <i>m</i>)<i>n</i>=极点数,<i>m</i>=零点数</td>
</tr>
<tr style='background: #f8f9ff;'>
<td style='padding: 10px; border: 1px solid #e0e7ff; font-weight: 600;'>实轴段</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'>右侧零极点总数为<strong>奇数</strong>的区段</td>
</tr>
<tr style='background: white;'>
<td style='padding: 10px; border: 1px solid #e0e7ff; font-weight: 600;'>渐近线数</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'><strong><i>n</i> <i>m</i></strong> 条</td>
</tr>
<tr style='background: #f8f9ff;'>
<td style='padding: 10px; border: 1px solid #e0e7ff; font-weight: 600;'>渐近线角度</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'>φ<sub>a</sub> = (2<i>k</i>+1)×180°/(<i>n</i><i>m</i>)</td>
</tr>
<tr style='background: white;'>
<td style='padding: 10px; border: 1px solid #e0e7ff; font-weight: 600;'>渐近线交点</td>
<td style='padding: 10px; border: 1px solid #e0e7ff;'>σ<sub>a</sub> = (Σ<i>p</i> Σ<i>z</i>)/(<i>n</i><i>m</i>)</td>
</tr>
</table>
</div>
</details>
<details>
<summary style='background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
🛡️ <i>s</i> 平面稳定性区域
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<table style='width: 100%; border-collapse: collapse; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden;'>
<tr style='background: #f5f5f5; font-weight: 600;'>
<th style='padding: 10px; border: 1px solid #ddd;'>区域</th>
<th style='padding: 10px; border: 1px solid #ddd;'>条件</th>
<th style='padding: 10px; border: 1px solid #ddd;'>稳定性</th>
</tr>
<tr>
<td style='padding: 10px; border: 1px solid #ddd;'>左半平面</td>
<td style='padding: 10px; border: 1px solid #ddd;'>Re(<i>s</i>) &lt; 0</td>
<td style='padding: 10px; border: 1px solid #ddd; background: #c8e6c9;'><strong>✅ 稳定</strong></td>
</tr>
<tr>
<td style='padding: 10px; border: 1px solid #ddd;'>虚轴</td>
<td style='padding: 10px; border: 1px solid #ddd;'>Re(<i>s</i>) = 0</td>
<td style='padding: 10px; border: 1px solid #ddd; background: #fff9c4;'><strong>⚠️ 临界稳定</strong></td>
</tr>
<tr>
<td style='padding: 10px; border: 1px solid #ddd;'>右半平面</td>
<td style='padding: 10px; border: 1px solid #ddd;'>Re(<i>s</i>) &gt; 0</td>
<td style='padding: 10px; border: 1px solid #ddd; background: #ffcdd2;'><strong>❌ 不稳定</strong></td>
</tr>
</table>
<div style='background: #e3f2fd; padding: 12px; border-radius: 8px; margin: 10px 0;'>
<p><strong>💡 虚轴(<i>x</i>=0</strong>即为<strong>稳定性边界</strong></p>
<p style='margin: 8px 0;'>根轨迹穿越虚轴点对应<strong>临界增益 <i>K</i><sub>c</sub></strong></p>
</div>
</div>
</details>
<details>
<summary style='background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #333; font-size: 1.05em; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08);'>
📏 阻尼比等值线
</summary>
<div style='padding: 15px; background: #fafbff; margin-top: 5px; border-radius: 10px; border: 1px solid #e0e7ff;'>
<p>从原点出发的射线代表恒定阻尼比 ζ 的轨迹:</p>
<div style='text-align: center; background: white; padding: 15px; border-radius: 8px; margin: 10px 0; font-size: 1.2em;'>
θ = arccos(ζ)
</div>
<table style='width: 100%; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-radius: 6px; overflow: hidden;'>
<tr style='background: #f5f5f5; font-weight: 600;'>
<td style='padding: 8px; border: 1px solid #ddd;'>阻尼比 ζ</td>
<td style='padding: 8px; border: 1px solid #ddd;'>角度 θ</td>
<td style='padding: 8px; border: 1px solid #ddd;'>系统特性</td>
</tr>
<tr>
<td style='padding: 8px; border: 1px solid #ddd;'>0.5</td>
<td style='padding: 8px; border: 1px solid #ddd;'>60°</td>
<td style='padding: 8px; border: 1px solid #ddd;'>欠阻尼,较大超调</td>
</tr>
<tr>
<td style='padding: 8px; border: 1px solid #ddd;'><strong>0.707</strong></td>
<td style='padding: 8px; border: 1px solid #ddd;'><strong>45°</strong></td>
<td style='padding: 8px; border: 1px solid #ddd;'><strong>⭐ 最佳阻尼</strong></td>
</tr>
</table>
<div style='background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); padding: 12px; border-radius: 8px; margin: 10px 0;'>
<p><strong>💡 工程应用:</strong>通过根轨迹与阻尼比等值线的交点,选择满足性能要求的增益 <i>K</i></p>
</div>
</div>
</details>
</div>
"""