Transforming models between representations


Transforming between different representations

The LTPDA toolbox allows you to go from one representation to the other. However, in the current version (v2.3), only the transformations shown in the following table are allowed

Pole/zero model TF

We can see how this work for the allowed transformation using the models that we have just created. To turn our pzmodel into a rational one, we just need to insert the first into the rational constructor

For example, if we consider again our pzmodel

	pzm = pzmodel(5, [10 2], {1, 0.1}, 'mymodel')
---- pzmodel 1 ----
	       name: mymodel
	       gain: 5
	      delay: 0
    	 iunits: []
	     ounits: []
	description: 
	       UUID: 93420391-23c8-4829-b5a5-3988f1109be6
	pole 001: (f=10 Hz, Q=2, ri=-15.71+60.84i)
	zero 001: (f=1 Hz, Q=NaN, ri=-6.283)
	zero 002: (f=0.1 Hz, Q=NaN, ri=-0.6283)
	-------------------

To transform it into its rational equivalent we just need to give it as a input to the rational constructor

	rat = rational(pzm)
	---- rational 1 ----
	model:       rational(mymodel)
	num:         [1.26651479552922 8.75352187005424 5]
	den:         [0.000253302959105844 0.00795774715459477 1]
	iunits:      []
	ounits:      []
	description: 
	UUID:        deb9a67f-6237-4112-9025-17fd4c42ce53
	--------------------

The transformation returns again the first pzmodel however the name property allows us to follow the operations that we've been performing to this object.

    pzm2 = pzmodel(rat)
    ---- pzmodel 1 ----
           name: pzmodel(rational(mymodel))
           gain: 5
          delay: 0
         iunits: []
         ounits: []
    description:
           UUID: b2177fde-1465-4c5c-a94f-29d73d9aed67
    pole 001: (f=10 Hz,Q=2)
    zero 001: (f=1 Hz,Q=NaN)
    zero 002: (f=0.1 Hz,Q=NaN)
    -------------------



©LTP Team