主要内容

Conversion Between Model Types

Explicit Conversion Between Model Types

You can explicitly convert a model from one representation to another using the model-creation command for the target model type. For example, convert to state-space representation usingss, and convert to parallel-form PID usingpid. For information about converting to a particular model type, see the reference page for that model type.

In general, you can convert from any model type to any other. However, there are a few limitations. For example, you cannot convert:

  • frdmodels to analytic model types such asss,tf, orZPK(unless you perform system identification with System Identification Toolbox™ software).

  • ssmodels with internal delays totf或者ZPK.

You can convert between Numeric LTI models and Generalized LTI models.

  • Converting a Generalized LTI model to a Numeric LTI model evaluates any Control Design Blocks at their current (nominal) value.

  • Converting a Numeric LTI model to a Generalized LTI model creates a Generalized LTI model with an emptyBlocksproperty.

模型类型之间的自动转换

某些算法仅在一种类型的模型对象上运行。例如,用于零订单归件离散化的算法c2d只能在状态空间模型上执行。同样,命令tfdata或者piddataexpect a particular type of model (tf或者pid, respectively). For convenience, such commandsautomatically convert input models to the appropriate or required model type. For example:

sys = ss(0,1,1,0) [num,den] = tfdata(sys)

tfdataautomatically converts the state-space modelsysto transfer function form to return numerator and denominator data.

Conversions to state-space form are not uniquely defined. For this reason, automatic conversions to state space do not occur when the result depends on the choice of state coordinates. For example, theinitial卡尔曼命令需要状态空间模型。

推荐的工作表示

You can represent numeric system components using any model type. However, Numeric LTI model types are not equally well-suited for numerical computations. In general, it is recommended that you work with state-space (ss)或频率响应数据(frd)模型,由于以下原因:

  • 使用高级传输函数计算的准确性(tf或者ZPK模型有时很差,特别是对于MIMO或高级系统。转换为传输函数表示会导致准确性损失。

  • When you converttf或者ZPK使用模型使用ss, the software automatically performs balancing and scaling operations. Balancing and scaling improves the numeric accuracy of computations involving the model. For more information about balancing and scaling state-space models, seeScaling State-Space Models.

In addition, converting back and forth between model types can introduce additional states or orders, or introduce numeric inaccuracies. For example, conversions to state space are not uniquely defined, and are not guaranteed to produce a minimal realization for MIMO models. For a given state-space modelsys,

ss(tf(sys))

can return a model with different state-space matrices, or even a different number of states in the MIMO case.

See Also

||||

相关话题