ss2ss
State coordinate transformation for state-space model
Syntax
Description
ss2ss
performs the similarity transformation z = Tx on the state vector x of a state-space model. For more
information, see Algorithms.
Examples
Similarity Transformation for State-Space Model
Perform a similarity transform for a state space model.
Generate a random state-space model and a transformation matrix.
rng(0) sys = rss(5); t = randn(5);
Perform the transformation and plot the frequency response of both models.
tsys = ss2ss(sys,t); bode(sys,'b',tsys,'r--') legend
ans = Legend (sys, tsys) with properties: String: {'sys' 'tsys'} Location: 'northeast' Orientation: 'vertical' FontSize: 8.1000 Position: [0.8116 0.8814 0.1429 0.0884] Units: 'normalized' Use GET to show all properties
The responses of both models match closely.
Similarity Transformation for Generalized State-Space Models
ss2ss
applies state transformation only to the state vectors of the numeric portion of the generalized model.
Create a genss
model.
sys = rss(2,2,2) * tunableSS('a',2,2,3) + tunableGain('b',2,3)
Generalized continuous-time state-space model with 2 outputs, 3 inputs, 4 states, and the following blocks: a: Tunable 2x3 state-space model, 2 states, 1 occurrences. b: Tunable 2x3 gain, 1 occurrences. Type "ss(sys)" to see the current value and "sys.Blocks" to interact with the blocks.
Specify a transformation matrix and obtain the transformation.
T = [1 -2;3 5]; tsys = ss2ss(sys,T)
Generalized continuous-time state-space model with 2 outputs, 3 inputs, 4 states, and the following blocks: a: Tunable 2x3 state-space model, 2 states, 1 occurrences. b: Tunable 2x3 gain, 1 occurrences. Type "ss(tsys)" to see the current value and "tsys.Blocks" to interact with the blocks.
Decompose both models.
[H,B,~,~] = getLFTModel(sys); [H1,B1,~,~] = getLFTModel(tsys);
Obtain the transformation separately on the model from decomposed sys
.
H2 = ss2ss(H,T);
Compare this transformed model with the model from decomposed tsys
.
isequal(H1,H2)
ans = logical
1
Both models are equal.
Similarity Transformation for Identified State-Space Models
The file icEngine.mat
contains one data set with 1500 input-output samples collected at the a sampling rate of 0.04 seconds. The input u(t)
is the voltage (V) controlling the By-Pass Idle Air Valve (BPAV), and the output y(t)
is the engine speed (RPM/100).
Use the data in icEngine.mat
to create a state-space model with identifiable parameters.
load icEngine.mat z = iddata(y,u,0.04); sys = n4sid(z,4,'InputDelay',2);
Specify a random transformation matrix.
T = randn(4);
Obtain the transformation.
sysT = ss2ss(sys,T);
Compare the frequency responses.
bode(sys,'b',sysT,'r--') legend
ans = Legend (sys, sysT) with properties: String: {'sys' 'sysT'} Location: 'northeast' Orientation: 'vertical' FontSize: 8.1000 Position: [0.8059 0.8257 0.1486 0.0884] Units: 'normalized' Use GET to show all properties
The responses match closely.
Transformation for Models with Complex Coefficients
ss2ss
also lets you perform similarity transformation for models with complex coefficients.
For this example, generate a random state-space model with complex coefficients.
rng(0) sys = ss(randn(5)+1i*randn(5),randn(5,3),randn(2,5)+1i*randn(2,5),0,.1);
Specify a transformation matrix containing complex data.
T = randn(5)+1i*randn(5);
Obtain the transformation.
sysT = ss2ss(sys,T);
Compare the singular values of the frequency response.
sigma(sys,'b',sysT,'r--') legend
ans = Legend (sys, sysT) with properties: String: {'sys' 'sysT'} Location: 'northeast' Orientation: 'vertical' FontSize: 9 Position: [0.7459 0.7968 0.1401 0.0789] Units: 'normalized' Use GET to show all properties
The responses match closely for both branches.
Input Arguments
sys
— Dynamic system
dynamic system model
Dynamic system, specified as a SISO, or MIMO dynamic system model. Dynamic systems that you can use include:
Continuous-time or discrete-time numeric LTI models, such as
ss
(Control System Toolbox) ordss
(Control System Toolbox) models.Generalized or uncertain LTI models, such as
genss
(Control System Toolbox) oruss
(Robust Control Toolbox) models. (Using uncertain models requires Robust Control Toolbox™ software.)For such models, the state transformation is applied only to the state vectors of the numeric portion of the model. For more information about decomposition of these models, see
getLFTModel
(Control System Toolbox) and Internal Structure of Generalized Models (Control System Toolbox).Identified state-space
idss
models.
If sys
is an array of state-space models,
ss2ss
applies the transformation T
to each
individual model in the array.
T
— Transformation matrix
matrix
Transformation matrix, specified as an n-by-n
matrix, where n is the number of states. T
is
the transformation between the state vector of the state-space model
sys
and the state vector of the transformed model
sysT
. (See Algorithms.)
Output Arguments
sysT
— Transformed model
dynamic system model
Transformed state-space model, returned as a dynamic system model of the same type
as sys
.
Algorithms
ss2ss
performs the similarity transformation on the state vector x of a state-space model.
This table summarizes the transformations returned by ss2ss
for each
model form.
Input Model | Transformed Model |
---|---|
Explicit state-space models of the form: |
|
Descriptor (implicit) state-space models for the form: |
|
Identified state-space ( |
|
Version History
Introduced before R2006aR2021b: ss2ss
returns different transformation results for descriptor state-space models
For a descriptor state-space model
ss2ss
now returns
Previously, the function returned the following transformation.
R2021b: Similarity transformation is no longer supported for mechss
models
ss2ss
no longer supports sparse second-order
(mechss
) models. Performing similarity transformations on
mechss
models destroys symmetry and has no obvious general form.
See Also
balreal
(Control System Toolbox) | canon
(Control System Toolbox) | balance
Topics
- Scaling State-Space Models to Maximize Accuracy (Control System Toolbox)
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)