필터 지우기
필터 지우기

d2c PID-Conversion

조회 수: 6 (최근 30일)
Christoph Fleischmann
Christoph Fleischmann 대략 13시간 전
댓글: Walter Roberson 대략 4시간 전
Hi,
I'm trying to convert a discrete-time PID-controller to a continuous-time PID using the d2c function.
c_discrete = pid(4.406,0.0114,0.0112,0,0.0050) %Kp, Ki, Kd, Tf, Ts
c_continuous = d2c(c_discrete)
But I keep getting the following Error:
The "d2c" conversion failed because the result cannot be expressed as a PID controller.
Does anyone have an Idea, where my mistake is?

답변 (1개)

Walter Roberson
Walter Roberson 대략 4시간 전
That error is given when Tf < Ts, and apparently exists in order to avoid getting complex-valued outputs.
Your Tf is 0, certainly less than Ts.
Example with Tf > Ts
c_discrete = pid(4.406,0.0114,0.0112,0+0.01,0.0050) %Kp, Ki, Kd, Tf, Ts
c_discrete = Ts 1 Kp + Ki * ------ + Kd * ----------- z-1 Tf+Ts/(z-1) with Kp = 4.41, Ki = 0.0114, Kd = 0.0112, Tf = 0.01, Ts = 0.005 Sample time: 0.005 seconds Discrete-time PIDF controller in parallel form.
c_continuous = d2c(c_discrete)
c_continuous = 1 s Kp + Ki * --- + Kd * -------- s Tf*s+1 with Kp = 4.41, Ki = 0.0114, Kd = 0.00808, Tf = 0.00721 Continuous-time PIDF controller in parallel form.
  댓글 수: 1
Walter Roberson
Walter Roberson 대략 4시간 전
c_discrete = pid(4.406,0.0114,0.0112,0,0.0050) %Kp, Ki, Kd, Tf, Ts
c_discrete = Ts z-1 Kp + Ki * ------ + Kd * ------ z-1 Ts with Kp = 4.41, Ki = 0.0114, Kd = 0.0112, Ts = 0.005 Sample time: 0.005 seconds Discrete-time PID controller in parallel form.
c_continuous = d2c(c_discrete, d2cOptions(method='matched'))
Error using DynamicSystem/d2c (line 108)
The "matched" method of the "d2c" command cannot be used for models with negative real zeros with odd multiplicity.

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by