3.3 ContinuousTime versus DiscreteTime Systems
The way to to specify whether the TransferFunction, StateSpace, and ZeroPoleGain objects to the continuoustime or discretetime domain is to set the option Sampled to either False, True, or Period[value]. Once set, the option remains a part of the data structure. This allows the same set of functions to operate on both types of systems implementing an objectoriented paradigm, according to which the method "knows" how to deal with the object.
As with all other Mathematica options, setting of the option Sampled is not mandatory. If a function does not find the option in a particular control object, it relies on the global variable $Sampled to make the decision when necessary. The default value of $Sampled is False. Changing the global domain specification makes sense if you deal primarily with the discretetime systems or, even more restrictively, with systems sampled primarily at one rate. If this is the case, you may want to change the variable $Sampled in your Mathematica session and/or include the corresponding line in your init.m file. It should be emphasized that relying on the global variable, although convenient, may cause confusion if you save the results of your Mathematica session to a file and later read it in after changing that variable, or if you send your file to a colleague who prefers another global value. A useful precaution, therefore, is to save the value of $Sampled together with your data or use the Sampled option explicitly in all your data structures.
Options, global variables, and test functions pertaining to domain specification.
There is no domainspecifying option in this StateSpace object, so it is attributed to continuoustime by default.
In[31]:=
Out[31]=
Now the system is explicitly set to be in the discretetime domain.
In[32]:=
Out[32]=
This is another way to attribute the system to the discretetime domain—by using Period[T] with a nonzero value of T.
In[33]:=
Out[33]=
This changes the default domain. From now on the system will be assumed to be discretetime if not specified otherwise with the Sampled option (until $Sampled is changed back).
In[34]:=
Out[34]=
The same system as before is now considered to be in the discretetime domain.
In[35]:=
Out[35]=
This restores the default behavior.
In[36]:=
Out[36]=
