## Modelica_LinearSystems2.UsersGuide.ReleaseNotes

This section summarizes the changes that have been performed on the Modelica LinearSystems library.

### Package Content

Name | Description
--- | ---
Version_2_1 | Version 2.1 (January 15, 2010)
Version_2_0 | Version 2.0 (September 2, 2009)
Version_0_95 | Version 0.95 (Feb. 11, 2008)
Version_0_93 | Version 0.93 (Feb. 11, 2008)
Version_0_9 | Version 0.9 (Oct. 17, 2005)

## Modelica_LinearSystems2.UsersGuide.ReleaseNotes.Version_2_1

This release is backward compatible to the previous version 2.0. It contains the following improvements:

New functions/blocks:

- Function sylvester to solve Sylvester equations "A*X + X*B = C" using a Schur method.
- Function nullspace to calculate the orthogonal nullspace and the dimension (nullity) of the nullspace of a matrix.
- Functions conditionNumber and rcond to calculate the condition number and the reciprocal condition number of a matrix respectively.
- Block Controller.Interpolator to increase the sampling frequency with linear interpolation and optional mean-value filtering.
- Blocks have been added to Controller.Examples to demonstrate the discretization methods (Discretization1, Discretization2, DiscretizationSeries) and the new Interpolator block (Interpolator).

Other improvements:

- The instance name is now displayed above the icon of every Controller block.
- The sample factor is now displayed in the icon of every Controller block.
- Access to resources (e.g. image files) has been changed from file names to URIs.
- The sequence of pole shifting in poleAssignmentMI has beeen changed.
- Bode diagrams of state space systems are now based on numerical more reliable zeros and poles representation istead of on transfer functions.

Bug fixes:

- Redundant results for initial responses of multi input state space systems have been fixed.
- Several functions have been modified to work (or to terminate correctly) for state space system without in- and/or outputs:
  - Analysis.analysis
  - Analysis.invariantZeros.
  - Check for controllability and observability.
  - Staircase algorithm to reduce a system to controller Hessenberg form.
  - Computation of controllable/uncontrollable poles.
- The design of FIR filters in block Controller.FilterFIR was disabled. It is now enabled and the previously wrong design of highpass filters with odd order was corrected, by increasing the order by one in this case.

## Modelica_LinearSystems2.UsersGuide.ReleaseNotes.Version_2_0

This is a new library. It is based on library Modelica_LinearSystems2 (version 0.95) but is not backwards compatible to this library due to many changes (e.g. the system data structures include strings for signals names whereas the 0.95 version does not have these names in the records). Most important improvements with respect to version 0.95:

- The library has been extended and contains now about 180 functions and a lot of examples for the analysis and design of linear control systems in different description forms.
- The library has been restructured and the functions are now organized in sub packages.
- Documentation has been upgraded and improved.
- Operator overloading concept has been fully utilized.
- Analysis functions like tests for controllability, observability, stabilizability, and detectability have been added.
- The analyse-function to determine the characteristic of a system and to analyse the relation of the system states to the dynamics of the uncoupled modal states is provided.
- Calculation of invariant zeros for arbitrary systems (i.e. systems with different numbers of inputs and outputs) is now provided.
- The Design package contains functions for controller design, i.e. pole assignment, LQ controller, Kalman Filter, and LQG controller.
- Since the design of optimal controllers is based on the solution of algebraic Riccati equation, a solver for those equations is provided in Math.Matrices. Also an algorithm to solve Lyapunov equations has been added.
- The package Sampled was renamed to Controller. All blocks are now available in a discrete representation, especially also the "Filter" block (was only available in a continuous representation in 0.95)
- The Controller package contains a sub package Template which provides standard controller structures (e.g. a state-feedback-control-structure and a two degree of freedom controller template with an inverse system model in the feed forward loop) with replaceable components.
- The besselFilter coefficients have been recalculated with high precision calculation up to order 41.
- LimPID, comprising P, PI, PD, and PID controller with limited output, anti-windup compensation and input weighting (setpoint and measured value) added.
- Improved new generic plot functions are used for time and frequency plots.
- New system transformations (similarity transformation, canonical forms).
- New transformations between system descriptions added, especially from ZerosAndPoles to StateSpace and from TransferFunction to StateSpace.
- Generate condensed forms like Hessenberg description
- Controllability/Observability forms
- Time response with plot (step, ramp, impulse)
- Bode plots improved, since the transformation from StateSpace to ZerosAndPoles uses a better algorithm from the newest LAPACK version.
- Based on a newer LAPACK version 3.1.1.

## Modelica_LinearSystems2.UsersGuide.ReleaseNotes.Version_0_95

Adapted the library to the Modelica Standard Library 3.0 and to the new restrictions of the Modelica Language Version 3.0.

## Modelica_LinearSystems2.UsersGuide.ReleaseNotes.Version_0_93

The following new components have been added:

Modelica_LinearSystems2.StateSpace.
plotBodeMIMO | Plot bode plot of all transfer functions of a state space system.
plotBodeSISO | Plot bode plot of transfer function from input iu to output iy of a state space system.
Modelica_LinearSystems2.StateSpace.Examples.
bodePlotMIMO bodePlotSISO | Demonstrate the new Bode plot possibilities.
Modelica_LinearSystems2.TransferFunction.
fromStateSpaceSISO fromStateSpaceMIMO | Generate transfer functions of a state space system.
Modelica_LinearSystems2.ZerosAndPoles.
fromStateSpaceSISO fromStateSpaceMIMO | Generate ZerosAndPoles from a state space system.

## Modelica_LinearSystems2.UsersGuide.ReleaseNotes.Version_0_9

First Beta-Version of the library.

The Modelica_LinearSystems2.Controller library (previously called Modelica_LinearSystems.Sampled) is based on the Sampled library from Nico Walther (master thesis from the electrical engineering at the HTWK-Leipzig, supervised by Prof. Müller, HTWK, and Prof. Martin Otter, DLR). Based on the experience in using the Sampled library, new features in Modelica as well as in Dymola, the Sampled library was considerably restructured, and newly implemented. The following main changes have been performed:

- The library is based on the input/output signal connectors of the Modelica standard library 2.1 (and higher). Previously, it was based on version 1.6. Similar as in 2.1, all blocks have been de-vectorized (more convenient for the user in the standard case. Modelica allows now easy vectorization of blocks).
- The previous parameter "method" was split into "blockType" (continuous/discrete) and "methodType" (discretization method). It is therefore easier to switch between a continuous and a discrete representation because one does not have to remember which discretization method was used previously when switching from a continuous to a discrete representation.
- The main options (blockType, methodType, sampleTime, initType) are set globally in component SampleClock via inner/outer and no longer in every component. The default defined in SampleClock can be changed in every component. Since in many cases just the defaults are used, it is now much more convenient to define the sampling setting and switch between different representations.
- In every component, the Integer parameter sampleFactor is present that defines the sampling time of this component as a "sampleFactor" multiple of the base sample time defined in sampleClock. This allows a more easier definition of standard multi-rate systems (in the previous version, in every component the actual sample time had to be defined). In the future, more advanced sampling options might be added, e.g., via user definable trigger signals.
- The previous Filter sublibrary was replaced by two components Filter and FilterFIR that model IIR and FIR filter. There are now more options for IIR filters (additional Bessel filter + normalized/non-normalized filters).
- The previous NoiseGenerators sublibrary was replaced by component Noise. In most applications only this Noise component is needed in sampled data systems and not the other variants in the previous NoiseGenerator library. It is then easier for a user to just select this component and not be forced to first figure out what component to use.
- The discrete representations of the blocks are changed such that no past values of the input signals u are accessed. For linear systems this is always possible via a state transformation. The benefit is that it is easier to initialize the block. Previously, it was necessary to define somehow the initial values of pre(u). This was not always made in a consistent way. Since in the new version no pre(u) is present, it need not be initialized.
- The sampling definition was changed. Previously, some when clauses have been evaluated during initialization and via the sample() operator at the initial time again (i.e., the when block was evaluated twice at the start time). Some blocks have not been evaluated during initialization and therefore in some cases the discrete variables have been not properly initialized. In the new version, all when-clauses are active during initialization and they are evaluated again at the next sample time:

           when {initial(), sample(Ts,Ts)} then
               // active during initialization and at time = Ts, 2*Ts, 3*Ts, ...
             ...
           end when;

  Furthermore, parameter startTime was removed (= first sample time of when-clause after the initialization) since this is nearly never needed in a practical application and therefore this parameter could be removed (and no longer confuses users).
- The continuous representations of all blocks are implemented such that as much struture as possible is preserved in order that index reduction is possible. For example, if a transfer function has more poles as zeros, then the output of the block might be differentiated n times (n = number of poles - number of zeros) without introducing derivatives in the inputs. A detailed explanation is given at the end of the info layer of component ZerosAndPoles. Previously, transfer functions and especially filters did not have this feature. Therefore, it was not possible to use the filters of the previous Sampled library as pre-filters in an inverse model. This is now possible. In such a case, a Bessel filter is most appropriate, because it does not introduce osciallations as the Butterworth and Chebyhev filter do and it is faster as the critical damping filter, see the description of the filter function. Previously, a Bessel filter was not supported.
- Previously, blocks have been implement with a large if-clause in which the different representations have been defined. In the new version, the discrete representations are defined in a separate block that are activated via a conditional declaration, if the block is discrete. (conditional declarations have been only recently introduced into the Modelica language version 2.2). The benefit is that the implementation is simpler and that there is no longer any overhead for the continuous block (all equations and variables from the discrete representation are removed during translation).
- Previously, for all simple blocks (such as FirstOrder) the different discrete representations have been specifially derived and implemented. In the new version, all blocks are first transformed to state space form with a function call and then the discrete state space system block is used for the discrete representation. This approach is less error prone and the implementation is much simpler.
- Special data structures for linear systems have been introduced in form of records and accompanying functions operating on these records. As a result, also the input parameters of some blocks, such as StateSpace or TransferFunction are now records instead of arrays. It is then possible to generate such system representations by appropriate function calls and supply the result as record instance to the corresponding block.