Turn the observer into measurable evidence把 observer 变成可验证的证据
Your final report should answer one main question: without directly measuring mechanical speed, can the observer reconstruct speed and load torque accurately enough to support motor control? 你的最终报告要回答一个主问题:在不直接测量机械转速的前提下,observer 能否足够准确地重建速度和负载转矩,从而支撑电机控制?
You must investigate你必须研究
- speed estimation accuracy速度估计精度
- load-torque or disturbance reconstruction quality负载转矩或扰动重建质量
- effect of observer bandwidth观察器带宽影响
- low-speed observability degradation低速可观测性恶化
You are not required to你不必做
- derive every proof in Chapter 4把 Chapter 4 的证明全部推完
- design a brand-new observer structure从头设计一个全新的 observer
- build an online submission page做在线提交页面
Where to run the experiments实验从哪里开始
If you already have the course repository locally, use it directly. If you need a fresh copy, you can clone horychen/ee275 via https://github.com/horychen/ee275.git. Environment notes are in the README.
如果你已经在本地有课程仓库,直接使用即可。如果需要一份新副本,可以通过 https://github.com/horychen/ee275.git 克隆 horychen/ee275。环境配置说明见 README。
python simulation/demo_4th_order_ESO.py --time 1.5 --scenarios 4_ON --loads sine --omega_ob 100 --cmd_rpm 50
The command above is only a convenient starting point. You may also work directly inside simulation/tutorials_ep6_svpwm.py if you want full control over which signals are logged and plotted.
上面的命令只是一个方便的起点。如果你想完全控制记录信号和绘图方式,也可以直接在 simulation/tutorials_ep6_svpwm.py 里做实验。
Read these places before editing anything动手前先看这些位置
| File or object文件或对象 | What to inspect看什么 | Why it matters为什么重要 |
|---|---|---|
simulation/tutorials_ep6_svpwm.py |
DYNAMICS_SpeedObserver, CTRL.xS[...], CTRL.ell1 ... CTRL.ell4DYNAMICS_SpeedObserver、CTRL.xS[...]、CTRL.ell1 到 CTRL.ell4 |
This is the actual observer state update used during simulation.这里就是仿真中真正执行的 observer 状态更新。 |
CTRL.xS[0:4] |
estimated angle, speed, disturbance, disturbance-rate估计角度、估计速度、估计扰动、扰动变化率 | These are the main signals you will compare against ground truth.这些就是你要和真实量进行对比的核心波形。 |
ACM.custom_load_type |
step, ramp, sine, sweep load injectionstep、ramp、sine、sweep 负载注入 | Use this to create disturbances with different time scales and frequencies.用它构造不同时间尺度和频率特性的扰动。 |
simulation/demo_4th_order_ESO.py |
quick scenario runner, plotting, bandwidth parameter omega_ob快速跑场景、绘图、调 omega_ob |
Fastest route if you want evidence first and code refactoring later.如果你想先拿到实验现象、后做细化,这是最快路径。 |
simulation/tuner.py |
auto-tuning of PI loopsPI 参数自动整定 | Keeps the current and speed loops in a reasonable regime while you focus on the observer.让电流环和速度环保持在合理工作区间,方便你把注意力放到 observer 上。 |
CTRL.xS[1] is the observer speed state. Depending on how you log data, it may need conversion from electrical speed to mechanical rpm. Also, CTRL.xS[2] is the estimated disturbance and often has the opposite sign of ACM.TLoad, so plotting -CTRL.xS[2] against ACM.TLoad is usually the meaningful comparison.
CTRL.xS[1] 是 observer 的速度状态。根据你的取数方式,它可能需要从电角速度换算成机械 rpm。另一个关键点是 CTRL.xS[2] 表示估计扰动,通常与 ACM.TLoad 符号相反,所以实际比较时往往应画 -CTRL.xS[2] 与 ACM.TLoad。
Complete these four experiment blocks完成这四组实验
Part A - Baseline speed estimationPart A - 基线速度估计
Run the observer at a moderate constant speed command, for example 50 rpm. Compare actual speed with estimated speed. Confirm that the estimate is not only close in steady state, but also acceptable during transient load changes. 在一个中等恒速指令下运行 observer,例如 50 rpm。比较真实速度和估计速度。不要只看稳态,要确认在负载变化的暂态中估计是否仍然可接受。
Part B - Load-torque reconstructionPart B - 负载转矩重建
Inject a time-varying load, preferably sine or sweep. Compare actual load torque with the disturbance estimate. Report whether the observer captures amplitude, phase, and delay well enough. 注入一个随时间变化的负载,优先推荐 sine 或 sweep。比较真实负载转矩与扰动估计,说明 observer 是否能把幅值、相位和延迟都跟上。
Part C - Bandwidth sweepPart C - 带宽扫描
Choose at least three observer bandwidth values such as 50, 100, and 200 rad/s. Keep the rest of the setup fixed. Compare response speed, lag, and noise sensitivity. 至少选择三个 observer 带宽值,例如 50、100、200 rad/s。其余设置保持不变。比较响应快慢、滞后程度和噪声敏感性。
Part D - Low-speed observability testPart D - 低速可观测性测试
Use the same observer and disturbance type at two operating points: one medium speed and one low or near-zero speed. Explain how the quality of speed and load reconstruction changes and connect it to observability. 在两个工况下使用同一个 observer 和同一种扰动:一个中速,一个低速或接近零速。解释速度和负载重建质量如何变化,并把现象和可观测性联系起来。
simulation/demo_4th_order_ESO.py to generate baseline figures first, then go back to simulation/tutorials_ep6_svpwm.py to verify where the signals are coming from.
如果你想先快速拿到现象,先用 simulation/demo_4th_order_ESO.py 生成基线图,再回到 simulation/tutorials_ep6_svpwm.py 查清楚这些信号究竟从哪里来。
The final PDF must contain these 4 figures最终 PDF 必须包含这 4 张图
| Figure图 | What to plot画什么 | What to discuss要讨论什么 |
|---|---|---|
| Figure 1 | Actual speed vs estimated speed under a medium-speed operating point.中速工况下,真实速度与估计速度的对比图。 | Steady-state accuracy, transient lag, and whether the estimate is smooth enough to be used for control.稳态精度、暂态滞后,以及估计是否平滑到足以用于控制。 |
| Figure 2 | Actual load torque vs estimated disturbance, preferably with a sine or sweep load.真实负载转矩与估计扰动的对比,最好使用 sine 或 sweep 负载。 | Amplitude tracking, phase lag, and sign convention. If needed, compare ACM.TLoad with -CTRL.xS[2].幅值跟踪、相位滞后和符号关系。如有需要,用 ACM.TLoad 与 -CTRL.xS[2] 比较。 |
| Figure 3 | Bandwidth comparison for at least three omega_ob values under the same test condition.同一测试条件下,至少三个 omega_ob 的带宽对比图。 |
Why larger bandwidth usually reduces lag but increases sensitivity to noise or ripple.为什么更大的带宽通常能减小滞后,但会增加对噪声或纹波的敏感性。 |
| Figure 4 | Same observer and disturbance, compared at medium speed and low or near-zero speed.同一个 observer、同一种扰动,在中速和低速或近零速下的对比图。 | Use this figure to explain observability degradation at low speed.用这张图解释低速下的可观测性恶化。 |
Use the four figures to answer these questions基于四张图回答这些问题
When the observer estimates speed well, what evidence tells you it is good enough for feedback control rather than just visually close?当 observer 的速度估计“看起来不错”时,什么证据能说明它真的足以进入反馈控制,而不只是波形看着接近?
For load-torque reconstruction, which matters more in your experiment: amplitude error, phase lag, or noise? Why?在负载转矩重建实验里,幅值误差、相位滞后和噪声哪一个更关键?为什么?
How does increasing omega_ob change ell1 to ell4, and why does that affect both convergence speed and noise sensitivity?增大 omega_ob 会如何改变 ell1 到 ell4,以及为什么这会同时影响收敛速度和噪声敏感性?
Why does the same observer usually look worse at low speed? Is this only because tuning is bad?为什么同一个 observer 在低速下通常表现更差?这只是调参不好吗?
If you compare medium-speed and low-speed cases, which signals still remain reliable and which become ambiguous?比较中速和低速工况时,哪些信号仍然可靠,哪些信息开始变得含糊?
What is the practical tradeoff when observer bandwidth is too high or too low?observer 带宽过高或过低,各自会带来什么实际代价?
Suggested PDF structure建议的 PDF 结构
Recommended outline推荐提纲
- Objective and test setup实验目标与设置
- Observer signals and relevant code locationsobserver 信号与相关代码位置
- Figure 1 to Figure 4图 1 到图 4
- Answers to Q1-Q6Q1-Q6 的回答
- Short conclusion: where the observer works and where it struggles简短结论:observer 在哪里好用、在哪里吃力