Anonymous
×
Create a new article
Write your page title here:
We currently have 106 articles on MOR Wiki. Type your article name above or click on one of the titles below and start writing!



All pass system: Difference between revisions

mNo edit summary
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{preliminary}} <!-- Do not remove -->
[[Category:benchmark]]
[[Category:benchmark]]
[[Category:procedural]]
[[Category:procedural]]
[[Category:linear]]
[[Category:linear]]
[[Category:time invariant]]
[[Category:first differential order]]
[[Category:first differential order]]
[[Category:time invariant]]
[[Category:Sparse]]
[[Category:SISO]]
[[Category:SISO]]


Line 12: Line 11:


This procedural benchmark generates an all-pass SISO system based on <ref name="Obe87"/>.
This procedural benchmark generates an all-pass SISO system based on <ref name="Obe87"/>.
For an all-pass system, the trasfer function has the property <math>g(s)g(-s) = \sigma^2</math>, <math>\sigma > 0</math>,
For an all-pass system, the transfer function has the property <math>g(s)g(-s) = \sigma^2</math>, <math>\sigma > 0</math>,
or (equivalently) the controllability and observability Gramians are quasi inverse to each other: <math>W_C W_O = \sigma I</math>,
or (equivalently) the controllability and observability Gramians are quasi inverse to each other: <math>W_C W_O = \sigma I</math>,
which means this system has a singular Hankel singular value of multiplicity of the system's order.
which means this system has a single Hankel singular value of multiplicity of the system's order.
The system matrices are constructing based on the scheme:
The system matrices are constructed based on the scheme:


:<math>
:<math>
\begin{align}
\begin{align}
A &= \begin{pmatrix} a_{1,1} & -\alpha_1 \\
A &=
                      \alpha_1 & 0 & -\alpha_2 \\
\begin{pmatrix}
                      & \ddots & \ddots & \ddots \\
  a_{1,1} & -\alpha_1 \\
                      & & \alpha_{N-1} & 0 & -\alpha_{N-1} \end{pmatrix}, \\
  \alpha_1 & 0 & -\alpha_2 \\
B &= \begin{pmatrix} b_1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}, \\
  & \alpha_2 & 0 & \ddots \\
C &= \begin{pmatrix} s_1 b_1 & 0 & \dots & 0 \end{pmatrix}, \\
  & & \ddots & \ddots & -\alpha_{N-1} \\
  & & & \alpha_{N-1} & 0
\end{pmatrix}, \\
B &=
\begin{pmatrix}
  b_1 \\
  0 \\
  \vdots \\
  0
\end{pmatrix}, \\
C &=
\begin{pmatrix}
  s_1 b_1 & 0 & \cdots & 0
\end{pmatrix}, \\
D &= -s_1 \sigma.  
D &= -s_1 \sigma.  
\end{align}
\end{align}
</math>
</math>


We choose <math>s_1 \in \{-1,1\}</math>, to be <math>s_1 \equiv -1</math>, as this makes the system state-space-anti-symmetric.
We choose <math>s_1 \in \{-1,1\}</math> to be <math>s_1 \equiv -1</math>, as this makes the system state-space-anti-symmetric.
Furthermore, <math>b_1 = 1</math> and <math>\sigma_1 = 1</math>, which makes <math>a_{1,1} = -\frac{b_1^2}{2 \sigma} = -\frac{1}{2}</math>.
Furthermore, <math>b_1 = 1</math> and <math>\sigma = 1</math>, which makes <math>a_{1,1} = -\frac{b_1^2}{2 \sigma} = -\frac{1}{2}</math>.


==Data==
==Data==
Line 38: Line 50:


<!-- TODO add unbalancing transformation -->
<!-- TODO add unbalancing transformation -->
 
:<syntaxhighlight lang="matlab">
<div class="thumbinner" style="width:20%;text-align:left;"><!--[[Media:allpass.m|-->
function [A,B,C,D] = allpass(n)
<source lang="matlab">
 
function [A,B,C,D] = allpass(N)
% allpass (all-pass system)
% allpass (all-pass system)
% by Christian Himpe, 2020
% by Christian Himpe, 2020
Line 48: Line 57:
%*
%*


     A = gallery('tridiag',N,-1,0,1);
     A = gallery('tridiag',n,-1,0,1);
     A(1,1) = -0.5;
     A(1,1) = -0.5;
     B = sparse(1,1,1,N,1);
     B = sparse(1,1,1,n,1);
     C = -B';
     C = -B';
     D = 1;
     D = 1;
end
end
</source>
</syntaxhighlight>
<!--]]--></div>


The function call requires one argument; the number of states <math>N</math>.
The function call requires one argument; the number of states <math>n</math>.
The return value consists of four matrices; the system matrix <math>A</math>, the input matrix <math>B</math>, the output matrix <math>C</math>, and the feed-through matrix <math>D</math>.
The return value consists of four matrices; the system matrix <math>A</math>, the input matrix <math>B</math>, the output matrix <math>C</math>, and the feed-through matrix <math>D</math>.


:<source lang="matlab">
:<syntaxhighlight lang="matlab">
[A,B,C,D] = allpass(N);
[A,B,C,D] = allpass(n);
</source>
</syntaxhighlight>
 
An equivalent [https://www.python.org/ Python] code is
 
:<syntaxhighlight lang="python">
from scipy.sparse import diags, lil_matrix
 
def allpass(n):
    A = diags([-1, 0, 1], offsets=[-1, 0, 1], shape=(n, n), format='lil')
    A[0, 0] = -0.5
    A = A.tocsc()
    B = lil_matrix((n, 1))
    B[0, 0] = 1
    B = B.tocsc()
    C = -B.T
    D = 1
    return A, B, C, D
</syntaxhighlight>


==Dimensions==
==Dimensions==


:<math>
:<math>
\begin{array}{rcl}
\begin{align}
\dot{x}(t) &=& Ax(t) + Bu(t) \\
\dot{x}(t) &= Ax(t) + Bu(t) \\
y(t) &=& Cx(t) + Du(t)
y(t) &= Cx(t) + Du(t)
\end{array}
\end{align}
</math>
</math>


System dimensions:
System dimensions:


<math>A \in \mathbb{R}^{N \times N}</math>,
<math>A \in \mathbb{R}^{n \times n}</math>,
<math>B \in \mathbb{R}^{N \times 1}</math>,
<math>B \in \mathbb{R}^{n \times 1}</math>,
<math>C \in \mathbb{R}^{1 \times N}</math>,
<math>C \in \mathbb{R}^{1 \times n}</math>,
<math>D \in \mathbb{R}</math>.
<math>D \in \mathbb{R}</math>.


Line 92: Line 116:
   title =        {All-Pass System},
   title =        {All-Pass System},
   howpublished = {{MORwiki} -- Model Order Reduction Wiki},
   howpublished = {{MORwiki} -- Model Order Reduction Wiki},
   url =          <nowiki>{http://modelreduction.org/index.php/All_pass_system}</nowiki>,
   url =          <nowiki>{https://modelreduction.org/morwiki/index.php/All_pass_system}</nowiki>,
   year =        {2020}
   year =        {2020}
  }
  }

Latest revision as of 08:42, 11 June 2025


Description

This procedural benchmark generates an all-pass SISO system based on [1]. For an all-pass system, the transfer function has the property g(s)g(s)=σ2, σ>0, or (equivalently) the controllability and observability Gramians are quasi inverse to each other: WCWO=σI, which means this system has a single Hankel singular value of multiplicity of the system's order. The system matrices are constructed based on the scheme:

A=(a1,1α1α10α2α20αN1αN10),B=(b100),C=(s1b100),D=s1σ.

We choose s1{1,1} to be s11, as this makes the system state-space-anti-symmetric. Furthermore, b1=1 and σ=1, which makes a1,1=b122σ=12.

Data

This benchmark is procedural and the state dimensions can be chosen. Use the following MATLAB code to generate a random system as described above:

function [A,B,C,D] = allpass(n)
% allpass (all-pass system)
% by Christian Himpe, 2020
% released under BSD 2-Clause License
%*

    A = gallery('tridiag',n,-1,0,1);
    A(1,1) = -0.5;
    B = sparse(1,1,1,n,1);
    C = -B';
    D = 1;
end

The function call requires one argument; the number of states n. The return value consists of four matrices; the system matrix A, the input matrix B, the output matrix C, and the feed-through matrix D.

[A,B,C,D] = allpass(n);

An equivalent Python code is

from scipy.sparse import diags, lil_matrix

def allpass(n):
    A = diags([-1, 0, 1], offsets=[-1, 0, 1], shape=(n, n), format='lil')
    A[0, 0] = -0.5
    A = A.tocsc()
    B = lil_matrix((n, 1))
    B[0, 0] = 1
    B = B.tocsc()
    C = -B.T
    D = 1
    return A, B, C, D

Dimensions

x˙(t)=Ax(t)+Bu(t)y(t)=Cx(t)+Du(t)

System dimensions:

An×n, Bn×1, C1×n, D.

Citation

To cite this benchmark, use the following references:

  • For the benchmark itself and its data:
The MORwiki Community, All-Pass System. MORwiki - Model Order Reduction Wiki, 2020. http://modelreduction.org/index.php/All_pass_system
@MISC{morwiki_allpass,
  author =       {{The MORwiki Community}},
  title =        {All-Pass System},
  howpublished = {{MORwiki} -- Model Order Reduction Wiki},
  url =          {https://modelreduction.org/morwiki/index.php/All_pass_system},
  year =         {2020}
}

References