Home > freetb4matlab > control > dmr2d.m

dmr2d

PURPOSE ^

% convert a multirate digital system to a single rate digital system

SYNOPSIS ^

function [dsys, fidx] = dmr2d (sys, idx, sprefix, Ts2, cuflg)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{dsys}, @var{fidx}] =} dmr2d (@var{sys}, @var{idx}, @var{sprefix}, @var{ts2}, @var{cuflg})
% convert a multirate digital system to a single rate digital system
% states specified by @var{idx}, @var{sprefix} are sampled at @var{ts2}, all
% others are assumed sampled at @var{ts1} = @code{sysgettsam (@var{sys})}.
%
% @strong{Inputs}
% @table @var
% @item   sys
% discrete time system;
% @code{dmr2d} exits with an error if @var{sys} is not discrete
% @item   idx
% indices or names of states with sampling time 
% @code{sysgettsam(@var{sys})} (may be empty); see @code{cellidx}
% @item   sprefix
% list of string prefixes of states with sampling time
% @code{sysgettsam(@var{sys})} (may be empty)
% @item   ts2
% sampling time of states not specified by @var{idx}, @var{sprefix}
% must be an integer multiple of @code{sysgettsam(@var{sys})}
% @item   cuflg
% 'constant u flag' if @var{cuflg} is nonzero then the system inputs are
% assumed to be constant over the revised sampling interval @var{ts2}.
% Otherwise, since the inputs can change during the interval
% @var{t} in @math{[k ts2, (k+1) ts2]}, an additional set of inputs is
% included in the revised B matrix so that these intersample inputs
% may be included in the single-rate system.
% default @var{cuflg} = 1.
% @end table
%
% @strong{Outputs}
% @table @var
% @item   dsys
% equivalent discrete time system with sampling time @var{ts2}.
%
% The sampling time of sys is updated to @var{ts2}.
%
% if @var{cuflg}=0 then a set of additional inputs is added to
% the system with suffixes _d1, @dots{}, _dn to indicate their
% delay from the starting time k @var{ts2}, i.e.
% u = [u_1; u_1_d1; @dots{}, u_1_dn] where u_1_dk is the input
% k*ts1 units of time after u_1 is sampled. (@var{ts1} is
% the original sampling time of the discrete time system and
% @var{ts2} = (n+1)*ts1)
%
% @item   fidx
% indices of 'formerly fast' states specified by @var{idx} and @var{sprefix};
% these states are updated to the new (slower) sampling interval @var{ts2}.
% @end table
%
% @strong{WARNING} Not thoroughly tested yet; especially when
% @var{cuflg} == 0.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003