本例展示了如何研究动力系统的极点和零点位置。您可以使用pzmap
绘制地图,以图形方式完成这项工作。也可以使用函数zpkdata
查找数值。
研究极点和零点的位置有助于解决稳定性分析等问题。本例比较了两个具有相同控制对象传递函数和不同控制器的闭环系统。
Out[0]:
TransferFunction{Continuous, ControlSystemsBase.SisoZpk{Float64, ComplexF64}}
(1.0s + 5.000000140181413)(1.0s + 4.999999859818593)(1.0s + 0.14084507042253516)
2900.0---------------------------------------------------------------------------------------------------------------------------------
(1.0s + 5.0)(1.0s + 5.0)(1.0s + 21.10553800168399)(1.0s^2 - 1.2358649411320777s + 148.49404080219574)(1.0s + 0.13032693944811272)
Continuous-time transfer function model
控制器 C2 的比例增益更高。否则,两个闭环系统 CL1 和 CL2 是完全相同的。
pzmap
在复平面上分别以 x 和 o 标签显示极点和零点的位置。当提供多个模型时,每个模型的极点和零点会以不同的颜色显示。这里,CL1 的极点和零点用橙色突出显示,CL2 的极点和零点用紫色突出显示。函数的零点相同,因此重叠显示为绿色。
从图中可以看出,CL1 的所有极点都位于左半平面,因此 CL1 是稳定的。系统模型 CL2 的极点位于右半平面,因此不稳定。
让我们使用zpkmap
计算 CL2 中极点和零点位置的数值。该计算按以下顺序返回三个值:增益 (k)、极点 (p)、零点 (z)。
1×1 Matrix{Vector{ComplexF64}}:
[-5.000000140181413 + 0.0im, -4.999999859818593 + 0.0im, -0.14084507042253516 + 0.0im]
1×1 Matrix{Vector{ComplexF64}}:
[-5.0 + 0.0im, -5.0 + 0.0im, -21.10553800168399 + 0.0im, 0.6179324705660388 + 12.170135589385021im, 0.6179324705660388 - 12.170135589385021im, -0.13032693944811272 + 0.0im]
还有一个单独的函数用于查找极点 -poles
,以及查找零点 -tzeros
。让我们来查找 CL1 系统的各个值。
Out[0]:
6-element Vector{ComplexF64}:
-5.0 + 0.0im
-5.0 + 0.0im
-21.10553800168399 + 0.0im
0.6179324705660388 + 12.170135589385021im
0.6179324705660388 - 12.170135589385021im
-0.13032693944811272 + 0.0im
Out[0]:
3-element Vector{ComplexF64}:
-5.0000000890586955 + 0.0im
-4.999999910941301 + 0.0im
-0.14084507042253533 + 0.0im
tzero
和poles
返回包含系统零点和极点位置的列向量。
通过了解系统传递函数的极点和零点位置,我们可以判断系统的稳定性。更多分析系统稳定性的函数可参阅 分析。
{"id": "dbb2b6db-0cbb-45cd-a11a-ce54dee9abd4", "data": [{"xaxis": "x", "mode": "markers", "x": [-5.0000000890586955, -4.999999910941301, -0.14084507042253533], "showlegend": true, "name": "CL1", "colorbar": {"title": {"text": ""}}, "zmin": null, "z": null, "legendgroup": "CL1", "y": [0, 0, 0], "zmax": null, "zaxis": null, "yaxis": "y", "marker": {"line": {"color": "rgba(0, 0, 0, 0.5)", "width": 1}, "symbol": "circle", "color": "rgba(0, 154, 250, 0.500)", "size": 30}, "metadata": {"smartZoomParams": {"maxCount": 3, "minCount": 25000, "currentCount": 3}, "shouldEnableSmartZoom": false}, "type": "scatter"}, {"xaxis": "x", "mode": "markers", "x": [-5, -5, -13.749436983200678, -3.086784291031507, -3.086784291031507, -0.07699443473630292], "showlegend": true, "name": "CL1", "colorbar": {"title": {"text": ""}}, "zmin": null, "z": null, "legendgroup": "CL1", "y": [0, 0, 0, 5.39024211036503, -5.39024211036503, 0], "zmax": null, "zaxis": null, "yaxis": "y", "marker": {"line": {"color": "rgba(0, 0, 0, 0.5)", "width": 1}, "symbol": "x", "color": "rgba(227, 111, 71, 0.500)", "size": 30}, "metadata": {"smartZoomParams": {"maxCount": 6, "minCount": 25000, "currentCount": 6}, "shouldEnableSmartZoom": false}, "type": "scatter"}, {"xaxis": "x", "mode": "markers", "x": [-5.000000140181413, -4.999999859818593, -0.14084507042253516], "showlegend": true, "name": "CL2", "colorbar": {"title": {"text": ""}}, "zmin": null, "z": null, "legendgroup": "CL2", "y": [0, 0, 0], "zmax": null, "zaxis": null, "yaxis": "y", "marker": {"line": {"color": "rgba(0, 0, 0, 0.5)", "width": 1}, "symbol": "circle", "color": "rgba(62, 164, 78, 0.500)", "size": 30}, "metadata": {"smartZoomParams": {"maxCount": 3, "minCount": 25000, "currentCount": 3}, "shouldEnableSmartZoom": false}, "type": "scatter"}, {"xaxis": "x", "mode": "markers", "x": [-5, -5, -21.10553800168399, 0.6179324705660388, 0.6179324705660388, -0.13032693944811272], "showlegend": true, "name": "CL2", "colorbar": {"title": {"text": ""}}, "zmin": null, "z": null, "legendgroup": "CL2", "y": [0, 0, 0, 12.170135589385021, -12.170135589385021, 0], "zmax": null, "zaxis": null, "yaxis": "y", "marker": {"line": {"color": "rgba(0, 0, 0, 0.5)", "width": 1}, "symbol": "x", "color": "rgba(195, 113, 210, 0.500)", "size": 30}, "metadata": {"smartZoomParams": {"maxCount": 6, "minCount": 25000, "currentCount": 6}, "shouldEnableSmartZoom": false}, "type": "scatter"}], "config": {"showlegend": false, "height": 400, "xaxis": {"showline": false, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "y", "range": [-21.75724211585149, 1.26963658473354], "tickcolor": "rgba(0, 0, 0, 0)", "gridwidth": 0.5, "visible": true, "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": true, "mirror": false, "domain": [0.05100612423447069, 0.9934383202099737], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "ticks": "inside", "type": "linear"}, "annotations": [{"y": 1, "yanchor": "top", "rotation": 0, "x": 0.5222222222222223, "font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 20}, "yref": "paper", "xref": "paper", "showarrow": false, "text": "Pole-zero map", "xanchor": "center"}], "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "margin": {"t": 20, "b": 20, "r": 0, "l": 0}, "yaxis": {"showline": false, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "x", "range": [-12.900343724748122, 12.900343724748122], "tickcolor": "rgba(0, 0, 0, 0)", "gridwidth": 0.5, "visible": true, "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": true, "mirror": false, "domain": [0.03762029746281716, 0.9415463692038496], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "ticks": "inside", "type": "linear"}, "width": 1367.953125}}