LTPDA Toolbox | ![]() ![]() |
Poles and zeros can be combined together to create a pole/zero model. In addition to a list of poles and zeros, a gain factor can be specified such that the resulting model is of the form:
The following sections introduce how to produce and use pole/zero models in the LTPDA environment.
>> poles = [pole(1,2) pole(40)]; >> zeros = [zero(10,3) zero(100)]; >> pzm = pzmodel(10, poles, zeros) ---- pzmodel 1 ---- model: pzmodel gain: 10 pole 001: pole(1,2) pole 002: pole(40) zero 001: zero(10,3) zero 002: zero(100) -------------------
You can also create a pzmodel by passing a parameter list. The following example shows this
>> pl = plist(); >> pl = append(pl, param('name', 'test model')); >> pl = append(pl, param('gain', 10)); >> pl = append(pl, param('poles', [pole(1,2) pole(40)])); >> pl = append(pl, param('zeros', [zero(10,3) zero(100)])); >> pzm = pzmodel(pl) ---- pzmodel 1 ---- model: test model gain: 10 pole 001: pole(1,2) pole 002: pole(40) zero 001: zero(10,3) zero 002: zero(100) -------------------
The frequency response of the model can generated using the resp method of the pzmodel class. To compute the response of the model created above:
>> resp(pzm)
Since no output was specified, this command produces the following plot:
You can also specify the frequency band over which to compute the response by passing a plist to the resp method, as follows:
>> rpl = plist(); >> rpl = append(rpl, param('f1', 0.1)); >> rpl = append(rpl, param('f2', 1000)); >> rpl = append(rpl, param('nf', 10000)); >> a = resp(pzm, rpl) ----------- ao: a ----------- tag: -00001 name: resp(test model) provenance: created by unknown@42.104.179.202.in-addr.arpa[202.179.104.42] on MACI/7.4 (R2007a)/0.3 (R2007a) at 2007-07-05 09:56:47 comment: data: fsdata / resp(test model) hist: history / resp / $Id: resp.m,v 1.3 2007/04/29 12:52:00 hewitson Exp $ mfile: -----------------------------
In this case, the response is returned as an Analysis Object containing fsdata. You can now plot the AO using the plot function.
![]() |
Creating poles and zeros | Converting models to IIR filters | ![]() |
©LTP Team