주요 콘텐츠

augdelay

Append internal delay signal to outputs of state-space model

Since R2026a

    Description

    asys = augdelay(sys) appends the delayed signal z(t) to the outputs of the state-space model sys. This is useful when you want to monitor the internal signals during simulation.

    Here, the corresponding state-space equations for sys are:

    x˙=Ax(t)+B1u(t)+B2w(t)y(t)=C1x(t)+D11u(t)+D12w(t)z(t)=C2x(t)+D21u(t)+D22w(t)wj(t)=z(tτj),j=1,...,N

    example

    Examples

    collapse all

    This example shows how to obtain a state-space model with internal delay signals appended as model outputs using the augdelay function. This is useful when you want to map the contribution of the internal delays to extra output channels and monitor their contributions.

    Construct a random state-space model with internal delays.

    rng(0) 
    H = rss(2,4,3);  tau = [0.7 1.5];
    S = struct('dx',[1;2],'x',[-1;1],'u',[0;1;2],'y',[-2;-1;.7;0]);
    H.Offsets = S;
    sys = setDelayModel(H,tau);
    sys.OutputName = {'y1';'y2'}
    sys =
     
      A = 
                x1       x2
       x1   -0.363    0.136
       x2  -0.6539   -1.314
     
      B = 
                u1
       x1     0.21
       x2  -0.1233
     
      C = 
               x1      x2
       y1   1.409  0.7172
       y2  -1.872  0.3582
     
      D = 
               u1
       y1       0
       y2  -2.115
     
      (values computed with all internal delays set to zero)
    
      Internal delays (seconds): 0.7  1.5 
     
    Continuous-time state-space model with offsets.
    Model Properties
    

    Here, sys is a one-input two-output model with offsets, and two internal delay channels.

    Now, obtain the augmented model with internal delay signals appended as extra output channels.

    asys = augdelay(sys)
    asys =
     
      A = 
                x1       x2
       x1   -0.363    0.136
       x2  -0.6539   -1.314
     
      B = 
                u1
       x1     0.21
       x2  -0.1233
     
      C = 
               x1      x2
       y1   1.409  0.7172
       y2  -1.872  0.3582
       z1  0.6715  0.4889
       z2  -1.751  0.6389
     
      D = 
               u1
       y1       0
       y2  -2.115
       z1  0.2939
       z2  -1.025
     
      (values computed with all internal delays set to zero)
    
      Internal delays (seconds): 0.7  1.5 
     
    Output groups:      
        Name    Channels
       delays     3,4   
    Continuous-time state-space model with offsets.
    Model Properties
    

    augdelay returns a state-space model with two extra outputs z1 and z2 corresponding to the contribution of each delay channel and adds an output group delays. Additionally, the function also augments the output offset with the z0 offset.

    sys.Offsets.y
    ans = 2×1
    
       -2.0000
       -3.1833
    
    
    asys.Offsets.y
    ans = 4×1
    
       -2.0000
       -3.1833
        0.7000
        0.2428
    
    

    Using this new output group, you can monitor the contribution of these internal delay signals over time. For example, compute the step response of the delays output group.

    stepplot(asys('delays',:))

    MATLAB figure

    Input Arguments

    collapse all

    State-space model with internal delays, specified as an ss or sparss model object. For state-space arrays, all entries in sys must contain the same number of internal delays.

    Output Arguments

    collapse all

    Augmented state-space model, returned as the model of same type as sys. The augmented model contains nz extra outputs, where nz is the number of internal delays. For state-space models with offsets, the function augments the output offset with the z0 offset.

    Version History

    Introduced in R2026a