Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Successful and fortunate crime is called virtue. -- Seneca


devel / comp.arch.embedded / PID controller with a limited range of control variable

SubjectAuthor
* PID controller with a limited range of control variablepozz
`- Re: PID controller with a limited range of control variableEd Prochak

1
PID controller with a limited range of control variable

<u2ai03$199bc$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1488&group=comp.arch.embedded#1488

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: PID controller with a limited range of control variable
Date: Wed, 26 Apr 2023 08:57:08 +0200
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <u2ai03$199bc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Apr 2023 06:57:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9d51b577305fcad2e6dd16c693f84533";
logging-data="1353068"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18asji/5l6vwl4fXmDal7yDnK3yibMOON8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.0
Cancel-Lock: sha1:EHUCCD0cp0qELhbAMsoQV/U4su8=
 by: pozz - Wed, 26 Apr 2023 06:57 UTC

In one application an AC voltage sourced by a generator is applied to a
load as a PWM waveform. The period PER is fixed (for example, 100ms) and
the pulse-width PW has a maximum (for example, 20ms).

The user can change the voltage peak (and consequently the voltage RMS)
by an handle, while the controller manages automatically the PW.

The load changes its temperature when the PWM waveform is applied to it
and a sensor that read the temperature is present.

There's a temperature upper limit (for example, 40°C) that mustn't be
exceeded. If needed, the controller should decrease the PW accordingly
to avoid temperature overshoot. Otherwise, the PW is the maximum allowed
(20ms).

Of course, when the voltage peak is low, PW could be the maximum. When
the user increases the voltage, the controller should be smart enough to
reduce PW accordingly and fast to avoid temperature overshoot.

I was thinking to implement a PID controller with the load temperature
as the process variable PV and the thermal power as the control variable
CV. From the thermal power I could calculate the PW to use.

CV = Vrms^2 / Z * PW / PER

Apart calibrating the PID constants, there's another problem. When the
voltage is low, the CV from the PID algorithm would be greater than the
maximum allowed (limited by PW maximum duration). The system could stay
in this state for minutes, so the PW calculated by the PID assumes very
great values with time.

When the user decides to increase the voltage and there's the moment to
reduce the PW, the PID behaviour could be very slow, because it would
start from a very high PW (very high sum of errors of the integrative part).

What's the trick here to avoid this behaviour? Should I limit the sum of
errors of the I term? Should I re-initialize the PID state in some way?

Re: PID controller with a limited range of control variable

<72df9ec7-6e4b-4172-a7af-8d50cbb5140en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1514&group=comp.arch.embedded#1514

  copy link   Newsgroups: comp.arch.embedded
X-Received: by 2002:a05:620a:134c:b0:74e:2894:7ea2 with SMTP id c12-20020a05620a134c00b0074e28947ea2mr526096qkl.8.1682630041203;
Thu, 27 Apr 2023 14:14:01 -0700 (PDT)
X-Received: by 2002:ac8:5acd:0:b0:3f2:34e:4cc4 with SMTP id
d13-20020ac85acd000000b003f2034e4cc4mr221130qtd.9.1682630041035; Thu, 27 Apr
2023 14:14:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch.embedded
Date: Thu, 27 Apr 2023 14:14:00 -0700 (PDT)
In-Reply-To: <u2ai03$199bc$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:5f82:5000:545a:2982:9d74:ecff;
posting-account=3ty6FAkAAACYEfch20jQ1ZACFatw-Vdx
NNTP-Posting-Host: 2600:1700:5f82:5000:545a:2982:9d74:ecff
References: <u2ai03$199bc$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <72df9ec7-6e4b-4172-a7af-8d50cbb5140en@googlegroups.com>
Subject: Re: PID controller with a limited range of control variable
From: edproc...@gmail.com (Ed Prochak)
Injection-Date: Thu, 27 Apr 2023 21:14:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Ed Prochak - Thu, 27 Apr 2023 21:14 UTC

On Wednesday, April 26, 2023 at 2:57:14 AM UTC-4, pozz wrote:
> In one application an AC voltage sourced by a generator is applied to a
> load as a PWM waveform. The period PER is fixed (for example, 100ms) and
> the pulse-width PW has a maximum (for example, 20ms).
>
> The user can change the voltage peak (and consequently the voltage RMS)
> by an handle, while the controller manages automatically the PW.

Looks like an unusual feature to me. Can you share what the purpose of varying
the supply voltage?

>
> The load changes its temperature when the PWM waveform is applied to it
> and a sensor that read the temperature is present.
>
> There's a temperature upper limit (for example, 40°C) that mustn't be
> exceeded. If needed, the controller should decrease the PW accordingly
> to avoid temperature overshoot. Otherwise, the PW is the maximum allowed
> (20ms).
>
> Of course, when the voltage peak is low, PW could be the maximum. When
> the user increases the voltage, the controller should be smart enough to
> reduce PW accordingly and fast to avoid temperature overshoot.
>
> I was thinking to implement a PID controller with the load temperature
> as the process variable PV and the thermal power as the control variable
> CV. From the thermal power I could calculate the PW to use.
>
> CV = Vrms^2 / Z * PW / PER
>
> Apart calibrating the PID constants, there's another problem. When the
> voltage is low, the CV from the PID algorithm would be greater than the
> maximum allowed (limited by PW maximum duration). The system could stay
> in this state for minutes, so the PW calculated by the PID assumes very
> great values with time.
>
> When the user decides to increase the voltage and there's the moment to
> reduce the PW, the PID behaviour could be very slow, because it would
> start from a very high PW (very high sum of errors of the integrative part).
>
> What's the trick here to avoid this behaviour? Should I limit the sum of
> errors of the I term? Should I re-initialize the PID state in some way?

I think the easiest solution is to cap the error/PW value.

Good luck,
Ed

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor