HYS2PWA Transformation of HYSDEL model into PWA model =============================================================================== Title: hys2pwa Project: Transformation of HYSDEL model into PWA model Input: S: structure containing MLD model generated by HYSDEL compiler verbose: =0 silent 1 verbose important information 2 verbose detailed information constr: In hysdel, bounds need to be specified for real states and inputs. =0 don't use these bounds as additional constraints =1 use these bounds as additional constraints. Check them a priori (and not a posteriori as constraints in the must section) thus speeding up the transformation. Do not add them to Hi{i}, Ki{i} in order to have an efficient representation of the polyhedra. =2 as 1, but add the bounds to Hi{i}, Ki{i} plot: =0: don't plot anything (=default) =1: plot resulting polyhedral partition over real state- input space with bounds as specified in HYSDEL =2: plot resulting polyhedral partition as in 1 and additionally the PWA output functions Plot 1 and 2 work only for dimensions 1 and 2. Remark: The plotting feature is not contained in the publicly distributed version. However, the files are available from the authors on request (see below). Output: P: structure containing the PWA model, where P{k} is the k-th PWA submodel with binary state xb = P{k}.xb and binary input ub = P{k}.ub. Let's consider now the PWA dynamics for a given xb and ub: The real state/input space is partitioned into a polyhedral partition with N polyhedra Hi{i}*[xr; ur] <= Ki{i}, i=1,...,N. The PWA dynamics are defined on the polyhedral partition by x' = fx(i) * xr + fu(i) * ur + f0(i) y = gx(k) * xr + gu(i) * ur + g0(i) Additionally, the z and d-variables (as defined in HYSDEL) are given by z = Zx(i) * xr + Zu(i) * ur + Z0(i) d = delta(i) P{k}.delta_AD denotes the delta variables, that are defined in the AD section, i.e. that is part of a hyperplane arrangement (in contrast to delta variables defined in the logic section which are not part of an hyperplane arrangement as they depend via a boolean expression on other delta variables). If P{k}.delta(i) > 0, then the i-th delta variable has been defined in the AD section and it has computational order 'P{k}.delta(i)'. The delta variables of the i-th region are given by P{k}.delta{i}. According to Ziegler, we define the markings in the following way: Example: delta = [-1 -1 +1; -1 +1 +1] implies the existence of 2 hyperplanes generating 3 polyhedra: 1. A x <= B; 2. A(1,:) <= B(1), A(2,:) >= B(2); 3. A(1,:) >= B(1), A(2,:) >= B(2); This is according to the definition of the paper, but contrary to the way the deltas are internally processed in hys2pwa! In the very end of hys2pwa, delta is multiplied with (-1) to get the proper definition. In general, the polyhedral partition is not bounded. Bounds resulting from the bounds defined in HYSDEL are given by Authors: Tobias Geyer <geyer@control.ee.ethz.ch>, Fabio D. Torrisi Papers: 'Efficient Mode Enumeration of Compositional Hybrid Systems', in A. Pnueli & O. Maler, eds. 'Hybrid Systems: Computation and Control', Vol. 2623 of Lecture Notes in Computer Science, Springer Verlag, pp. 216-232. see also the extended version: 'Efficient Mode Enumeration of Compositional Hybrid Systems', Technical Report, AUT03-01, ETH Zurich, 2003