Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with validation function for example #28

Open
Kirito771 opened this issue May 26, 2021 · 2 comments
Open

Problem with validation function for example #28

Kirito771 opened this issue May 26, 2021 · 2 comments

Comments

@Kirito771
Copy link

Hello,

I hava some problems with sippy examples. The function validation gives wrong results.

Packages needed to reproduce :

  • Sippy 0.2 from today
  • Python 3.6
  • numpy 1.20.3
  • scipy 1.5.4
  • control 0.9.0
  • slycot 0.4.0.0
  • future 0.18.2
  • casadi 3.5.5

Step to reproduce : lunch Ex_OPT_GEN-INOUT

Result :
C:...\control\timeresp.py:294: UserWarning: return_x specified for a transfer function system. Internal conversion to state space used; results may meaningless.
"return_x specified for a transfer function system. Internal "

Figure_0

C:...\control\timeresp.py:294: UserWarning: return_x specified for a transfer function system. Internal conversion to state space used; results may meaningless.
"return_x specified for a transfer function system. Internal "

Figure_1
Figure_2
Figure_3
Figure_4

C:...\control\timeresp.py:294: UserWarning: return_x specified for a transfer function system. Internal conversion to state space used; results may meaningless.
"return_x specified for a transfer function system. Internal "
Figure_7
Figure_8

C:/.../Examples/Ex_OPT_GEN-INOUT.py:230: RuntimeWarning: overflow encountered in square
EV = 100.0*(np.round((1.0 - np.mean((Ytotvalid - Yv_bj) ** 2)/np.std(Ytotvalid)), 2))
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")
C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")

Does anyone know how to fix it ?

Best regards.

@CPCLAB-UNIPI
Copy link
Owner

Dear Krito771,
we are analyzing your case in detail.
As a matter of fact, we obtained the same warning messages (not errors) when using your version of control.
We understood where some issues could rely but we need further confrontation on that.
We will keep in touch and try to resolve the issue completely asap.

The SIPPY team

@CPCLAB-UNIPI
Copy link
Owner

Dear Krito771,
we have analyzed your case.
As already said in the previous comment, upgrading to control 0.9.0 seems to have led to some wanings when using lsim that are given by the following message:

C:...\control\timeresp.py:294: UserWarning: return_x specified for a transfer function system. Internal conversion to state space used; results may meaningless.
"return_x specified for a transfer function system. Internal "

Those are warnings that are not to be considered in our specific case for which we have a transfer function and we are not interested in using the internal state x. Anyway, we are working to remove it to make the results reading easier.

The other warning on the Bode diagram is printed because the frequency at which the function is evaluated was too high, actually above the Nyquist frequency.

C:...\control\lti.py:199: UserWarning: call: evaluation above Nyquist frequency
warn("call: evaluation above Nyquist frequency")

In order to solve the problem, we just shortened the horizon so that the warnings disappear and the Bode plot is shown.

Please let us know if you still have doubts about it.

Best regards from the SIPPY teams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants