ZNFreq - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


ControlDesign

  

ZNFreq

  

PID tuning based on Ziegler-Nichols frequency domain (closed-loop) methods

 

Calling Sequence

Parameters

Options

Description

Examples

References

Calling Sequence

ZNFreq(Ku, Tu, opts)

Parameters

Ku

-

algebraic or positive realcons; system ultimate gain

Tu

-

algebraic or positive realcons; system ultimate period

opts

-

(optional) equation(s) of the form option = value; specify options for the ZNFreq command

Options

• 

method = ZN or TL

  

Specifies the tuning method. ZN uses the standard Ziegler-Nichols frequency response tuning method. TL uses the Tyreus-Luyben tuning method, a modified version of the standard Ziegler-Nichols frequency response tuning method generally resulting in higher closed-loop damping coefficient. The default value is ZN.

• 

controller = P, PI or PID

  

Specifies the controller type. The default value is PID.

• 

factored  = true or false

  

True means return the factored version of the controller gains (K=Kp, Ti=KpKi, Td=KdKp). False means return the controller gains (Kp, Ki, Kd). The default is false.

• 

returntype =  list or record or system

  

Specifies the returned type. If list (or record) is specified, a list (or record) containing the controller parameters is returned. If system is specified, a System (DynamicSystems system object) containing the transfer function of the specified controller type (P, PI, PID) is returned. The default value is list.

Description

• 

The ZNFreq command calculates the controller gains based on the Ziegler-Nichols frequency domain (closed-loop) tuning methods, using the given ultimate gain and period. The design criterion is the quarter amplitude decay ratio in response to load disturbances, i.e. the second overshoot in the step response is a quarter of the first overshoot.

• 

The ultimate gain is the smallest positive gain for which the closed-loop system under unity negative feedback becomes oscillatory (marginally stable) and the ultimate period is the period of the corresponding oscillations. See ControlDesign[ParameterIdentify][FrequencyDomain] for details.

• 

The ZNFreq command returns a list of controller gains Kp, Ki and Kd according to the selected controller type P, PI or PID, respectively, where Kp is the proportional gain, Ki is the integral gain, and Kd is the derivative gain.

• 

The controller transfer function is then obtained as:

– 

P: C⁡s=Kp 

– 

PI: C⁡s=Kp+Kis

– 

PID: C⁡s=Kp+Kis+Kd⁢s

Examples

> 

with⁡ControlDesign:

> 

with⁡DynamicSystems:

Example: Numeric system

> 

sys≔NewSystem⁡2s3+3⁢s2+5⁢s+7:

• 

Identify the parameters [Ku, Tu] of sys

> 

Params≔evalf⁡ParameterIdentify:-FrequencyDomain⁡sys

Params≔3.999999994,2.809925894

(1)
• 

Calculate the controller parameters using the ZN (default) method

> 

ZNFreq⁡Params1,Params2,controller=P

1.999999997

(2)
> 

ZNFreq⁡Params1,Params2,controller=Π,factored=true

1.599999998,2.247940715

(3)
> 

ZNFreq⁡Params1,Params2,controller=PID,factored=true

2.399999996,1.404962947,0.3512407368

(4)
• 

Calculate the controller parameters using the TL method

> 

ZNFreq⁡Params1,Params2,method=TL,controller=P

1.599999998

(5)
> 

ZNFreq⁡Params1,Params2,method=TL,controller=Π

1.239999998,0.2005876254

(6)
> 

ZNFreq⁡Params1,Params2,method=TL,controller=PID,factored=true

1.799999997,6.181836967,0.4495881430

(7)
• 

Return a DynamicSystems system object of the controller transfer function

> 

PIsys≔ZNFreq⁡Params1,Params2,method=TL,controller=Π,returntype=system:

> 

PrintSystem⁡PIsys

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=1.239999998⁢s+0.2005876254s

(8)
> 

PIDsys≔ZNFreq⁡Params1,Params2,method=TL,controller=PID,returntype=system:

Warning, improper transfer-function, degree(num) > degree(den)

> 

PrintSystem⁡PIDsys

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=0.8092586561⁢s2+1.799999997⁢s+0.2911755853s

(9)

Example: Symbolic system

> 

sys2≔NewSystem⁡as3+b⁢s2+c⁢s+d:

• 

Identify the parameters [Ku, Tu] of sys2

> 

Params≔ParameterIdentify:-FrequencyDomain⁡sys2

Params≔c⁢b−da,2⁢πc

(10)
• 

Calculate the controller parameters using the ZN (default) method

> 

ZNFreq⁡Params1,Params2,controller=P,factored=false

c⁢b−d2⁢a

(11)
> 

PIpars≔ZNFreq⁡Params1,Params2,controller=Π,factored=true,returntype=record

PIpars≔Recordpacked⁡K=2⁢c⁢b−d5⁢a,Ti=8⁢π5⁢c

(12)
> 

pid≔ZNFreq⁡Params1,Params2,controller=PID,returntype=record

pid≔Recordpacked⁡Kp=3⁢c⁢b−d5⁢a,Ki=3⁢c⁢b−d⁢c5⁢a⁢π,Kd=3⁢c⁢b−d⁢π20⁢a⁢c

(13)
> 

pidsys≔ZNFreq⁡Params1,Params2,controller=PID,returntype=system:

Warning, improper transfer-function, degree(num) > degree(den)

> 

PrintSystem⁡pidsys

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=3⁢π2⁢b⁢c−3⁢π2⁢d⁢s2+12⁢π⁢c⁢b⁢c−12⁢π⁢c⁢d⁢s+12⁢c⁢c⁢b−12⁢c⁢d20⁢a⁢π⁢c⁢s

(14)
• 

Calculate the controller parameters using the TL method

> 

Ppars≔ZNFreq⁡Params1,Params2,method=TL,controller=P,factored=true,returntype=record

Ppars≔Recordpacked⁡K=2⁢c⁢b−d5⁢a

(15)
> 

PIpars≔ZNFreq⁡Params1,Params2,method=TL,controller=Π,returntype=record

PIpars≔Recordpacked⁡Kp=31⁢c⁢b−d100⁢a,Ki=31⁢c⁢b−d⁢c440⁢a⁢π

(16)
> 

PIsys≔ZNFreq⁡Params1,Params2,method=TL,controller=Π,returntype=system:

> 

PrintSystem⁡PIsys

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=682⁢π⁢b⁢c−682⁢π⁢d⁢s+155⁢c⁢c⁢b−155⁢c⁢d2200⁢a⁢π⁢s

(17)
> 

ZNFreq⁡Params1,Params2,method=TL,controller=PID,factored=true,returntype=list

9⁢c⁢b−d20⁢a,22⁢π5⁢c,8⁢π25⁢c

(18)

References

  

[1] K. J. Astrom and T. Hagglund, Advanced PID Control, ISA, 2006.

  

[2] T. K. Kiong, W. Quing-Guo, H. C. Chieh and T. Hagglund, Advances in PID Control, Springer, 1999.

See Also

ControlDesign

ControlDesign[CohenCoon]

ControlDesign[ParameterIdentify][FrequencyDomain]

ControlDesign[ZNTimeModified]