aresimilar (Control Design and Simulation Module, MathScript Function)
Member of the info class.
Syntax
similar = aresimilar(SysIn_1, SysIn_2, tol)
[similar, T] = aresimilar(SysIn_1, SysIn_2, tol)
Description
Determines whether two models are similar. Two state-space models are similar if you can use a similarity transformation matrix to transform the states of one model into the states of the other model linearly and within a certain tolerance. Two transfer function or zero-pole-gain models are similar if, after cancelling pole-zero pairs due to a tolerance, the models are identical.
Inputs
Name | Description |
SysIn_1 | Specifies a linear time-invariant (LTI) system in transfer function, zero-pole-gain, or state-space form. |
SysIn_2 | Specifies an LTI system. This model must be in the same form as the SysIn_1 model. |
tol | Specifies the tolerance in determining whether the two models are similar. The default value of tol is 0.00000001. tol is a real scalar. |
Outputs
Name | Description |
similar | Returns 1 if the two models are similar. This function returns 0 if the two models are not similar. similar is a Boolean. |
T | Returns the similarity transformation matrix this function uses to determine if the two models are similar. If a model is in transfer function or zero-pole-gain form, T contains the number of pole-zero cancellations for each input-output pair. T is a real matrix. |
Examples
SysIn_1 = zpk(1, 2, 3 ,4, 5, 6,[1 1 1]);SysIn_2 = (1+1.e-10)*SysIn_1;
aresimilar(SysIn_1, SysIn_2, 1.e-9);