CPCLAB-UNIPI / SIPPY

Systems Identification Package for PYthon
GNU Lesser General Public License v3.0
269 stars 92 forks source link

Problem with validation function for example #28

Open Kirito771 opened 3 years ago

Kirito771 commented 3 years ago

Hello,

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

Packages needed to reproduce :

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 commented 3 years ago

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 commented 3 years ago

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