Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ComplexWarning while trying to plot a pzmap #288

Open
Assignees
murrayrm
@fabiomolinar

Description

@fabiomolinar

I would like to understand why the zeros from my sys3 transfer function below aren't being plotted by thepzmap function.

#sys1num = [6., 0., 1.]den = [1., 3., 3., 1.]sys = control.tf(num, den)#sys2n1 = [1., 1.]n2 = [1., 2.]d1 = [1., 2.j]d2 = [1., -2.j]d3 = [1., 3.]num2 = np.convolve(n1, n2)den2 = np.convolve(d1,np.convolve(d2, d3))sys2 = control.tf(num2, den2)#sys3num3 = np.convolve(num, den2)den3 = np.convolve(den, num2)sys3 = control.tf(num3, den3)control.pzmap(sys3, Plot=True, title="Mapa de polos e zeros")

Whencontrol.pzmap runs, it returns the correct poles and zeros, together with a plot. The problem is, this plot contains only the roots of the sys3 transfer function. Together with the plot, I am also getting the following warning message:

xxx/anaconda3/lib/python3.7/site-packages/control/xferfcn.py:864: ComplexWarning: Casting complex values to real discards the imaginary part  num[i, j, np+1-len(numpoly):np+1] = numpoly[::-1]

If the problem is the removal of the imaginary parts by that part of the algorithm, why is that happening then?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp