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

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: Cs=Kp 

– 

PI: Cs=Kp+Kis

– 

PID: Cs=Kp+Kis+Kds

Examples

withControlDesign:

withDynamicSystems:

Example: Numeric system

sysNewSystem2s3+3s2+5s+7:

• 

Identify the parameters [Ku, Tu] of sys

ParamsevalfParameterIdentify:-FrequencyDomainsys

Params3.999999994,2.809925894

(1)
• 

Calculate the controller parameters using the ZN (default) method

ZNFreqParams1,Params2,controller=P

1.999999997

(2)

ZNFreqParams1,Params2,controller=Π,factored=true

1.599999998,2.247940715

(3)

ZNFreqParams1,Params2,controller=PID,factored=true

2.399999996,1.404962947,0.3512407368

(4)
• 

Calculate the controller parameters using the TL method

ZNFreqParams1,Params2,method=TL,controller=P

1.599999998

(5)

ZNFreqParams1,Params2,method=TL,controller=Π

1.239999998,0.2005876254

(6)

ZNFreqParams1,Params2,method=TL,controller=PID,factored=true

1.799999997,6.181836967,0.4495881430

(7)
• 

Return a DynamicSystems system object of the controller transfer function

PIsysZNFreqParams1,Params2,method=TL,controller=Π,returntype=system:

PrintSystemPIsys

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=1.239999998s+0.2005876254s

(8)

PIDsysZNFreqParams1,Params2,method=TL,controller=PID,returntype=system:

PrintSystemPIDsys

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=0.8092586561s2+1.799999997s+0.2911755853s

(9)

Example: Symbolic system

sys2NewSystemas3+bs2+cs+d:

• 

Identify the parameters [Ku, Tu] of sys2

ParamsParameterIdentify:-FrequencyDomainsys2

Paramscbda,2πc

(10)
• 

Calculate the controller parameters using the ZN (default) method

ZNFreqParams1,Params2,controller=P,factored=false

cbd2a

(11)

PIparsZNFreqParams1,Params2,controller=Π,factored=true,returntype=record

PIparsRecordpackedK=2cbd5a,Ti=8π5c

(12)

pidZNFreqParams1,Params2,controller=PID,returntype=record

pidRecordpackedKp=3cbd5a,Ki=3cbdc5aπ,Kd=3cbdπ20ac

(13)

pidsysZNFreqParams1,Params2,controller=PID,returntype=system:

PrintSystempidsys

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=3π2bc3π2ds2+12πcbc12πcds+12ccb12cd20aπcs

(14)
• 

Calculate the controller parameters using the TL method

PparsZNFreqParams1,Params2,method=TL,controller=P,factored=true,returntype=record

PparsRecordpackedK=2cbd5a

(15)

PIparsZNFreqParams1,Params2,method=TL,controller=Π,returntype=record

PIparsRecordpackedKp=31cbd100a,Ki=31cbdc440aπ

(16)

PIsysZNFreqParams1,Params2,method=TL,controller=Π,returntype=system:

PrintSystemPIsys

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=682πbc682πds+155ccb155cd2200aπs

(17)

ZNFreqParams1,Params2,method=TL,controller=PID,factored=true,returntype=list

9cbd20a,22π5c,8π25c

(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]