Skip to content

lsim warning for TF systems #624

Description

@mvaccariunipi

Dear all,
I have just installed control 0.9.0 and when using lsim (or forced_response) on a transfer function system I got the following warning: "return_x specified for a transfer function system. Internal conversion to state space used; results may meaningless."

Can I skip this warning? Is there another function for simulating transfer function systems that does not require a conversion to state space?
I cannot figure out if the warning is something I should worry about or not.

Thanks,

Marco from SIPPY teams

The example tested is the following:

from future import division
from past.utils import old_div
from sippy import functionset as fset
from sippy import *
import numpy as np
import control.matlab as cnt

sampling_time = 1. # [s]
end_time = 400 # [s]
npts = int(old_div(end_time, sampling_time)) + 1
Time = np.linspace(0, end_time, npts)

switch_probability = 0.08 # [0..1]
[Usim,,] = fset.GBN_seq(npts, switch_probability, Range = [-1, 1])

white_noise_variance = [0.01]
e_t = fset.white_noise_var(Usim.size, white_noise_variance)[0]

DEN = [1., -2.21, 1.7494, -0.584256, 0.0684029, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]
NUM = [1.5, -2.07, 1.3146]

g_sample = cnt.tf(NUM, DEN, sampling_time)

Y1, Time, Xsim = cnt.lsim(g_sample, Usim, Time)

Activity

  1. sawyerbfuller commented on May 27, 2021

    @sawyerbfuller
    Contributor

    You can ignore that warning if you don't intend to make use of x. x is the "internal state" of the system, and depends on the specific realization of your state-space representation of the transfer function you provided.

  2. mvaccariunipi commented on May 27, 2021

    @mvaccariunipi
    Author

    Hi @ sawyerbfuller and thanks for the prompt answer. Is there a way to not show the warning? Otherwise I'll just ignore it.

    Thanks again,

    Marco

  3. sawyerbfuller commented on May 27, 2021

    @sawyerbfuller
    Contributor

    Hi Marco,

    one way is to use the more pythonic forced_response, which gives you more control, and in particular, I believe you can ask it to not give you x.

  4. locked and limited conversation to collaborators on May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions