is_similar (MathScript RT Module Function)
- Updated2023-03-14
- 2 minute(s) read
is_similar (MathScript RT Module Function)
Owning Class: info
Requires: Control Design and Simulation Module and MathScript RT Module
Syntax
similar = is_similar(SysIn_1, SysIn_2, tol, TolCtrlObsv)
[similar, T] = is_similar(SysIn_1, SysIn_2)
[similar, T] = is_similar(SysIn_1, SysIn_2, tol)
[similar, T] = is_similar(SysIn_1, SysIn_2, tol, TolCtrlObsv)
Legacy Name: aresimilar
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. |
| TolCtrlObsv | Specifies the tolerance to use for comparing equal state-space models and calculating the observability and controllability matrices. This input is only valid for state-space models. The default is 1E–6. |
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. |
Details
The following table lists the support characteristics of this function.
| Supported in the LabVIEW Run-Time Engine | Yes |
| Supported on RT targets | Yes |
| Suitable for bounded execution times on RT | Not characterized |
Examples
SysIn_1 = zpk(1, 2, 3 ,4, 5, 6,[1 1 1]);
SysIn_2 = (1 + 1.e-10)*SysIn_1;
is_similar(SysIn_1, SysIn_2, 1.e-9);