Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #518413 > unrolled thread
| Started by | Fitzgerald <john.smith@mailinator.com> |
|---|---|
| First post | 2018-10-05 16:07 +0200 |
| Last post | 2018-10-09 14:46 -0700 |
| Articles | 13 on this page of 33 — 13 participants |
Back to article view | Back to sci.electronics.design
PID loop frequency Fitzgerald <john.smith@mailinator.com> - 2018-10-05 16:07 +0200
Re: PID loop frequency bill.sloman@ieee.org - 2018-10-05 07:53 -0700
Re: PID loop frequency Fitzgerald <john.smith@mailinator.com> - 2018-10-09 08:08 +0200
Re: PID loop frequency bill.sloman@ieee.org - 2018-10-09 00:11 -0700
Re: PID loop frequency Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-10-05 10:58 -0400
Re: PID loop frequency Fitzgerald <john.smith@mailinator.com> - 2018-10-09 08:12 +0200
Re: PID loop frequency bitrex <user@example.net> - 2018-10-05 10:58 -0400
Re: PID loop frequency Fitzgerald <john.smith@mailinator.com> - 2018-10-09 08:18 +0200
Re: PID loop frequency Chris Jones <lugnut808@spam.yahoo.com> - 2018-10-06 01:04 +1000
Re: PID loop frequency Fitzgerald <john.smith@mailinator.com> - 2018-10-09 08:30 +0200
Re: PID loop frequency bill.sloman@ieee.org - 2018-10-09 00:21 -0700
Re: PID loop frequency Chris Jones <lugnut808@spam.yahoo.com> - 2018-10-09 23:03 +1100
Re: PID loop frequency bill.sloman@ieee.org - 2018-10-09 05:44 -0700
Re: PID loop frequency Chris Jones <lugnut808@spam.yahoo.com> - 2018-10-10 00:01 +1100
Re: PID loop frequency bill.sloman@ieee.org - 2018-10-09 07:33 -0700
Re: PID loop frequency Lasse Langwadt Christensen <langwadt@fonz.dk> - 2018-10-05 08:49 -0700
Re: PID loop frequency Jon Elson <elson@pico-systems.com> - 2018-10-05 13:59 -0500
Re: PID loop frequency Hul Tytus <ht@panix.com> - 2018-10-05 19:52 +0000
Re: PID loop frequency Jon Elson <elson@pico-systems.com> - 2018-10-05 15:46 -0500
Re: PID loop frequency George Herold <gherold@teachspin.com> - 2018-10-05 18:05 -0700
Re: PID loop frequency Hul Tytus <ht@panix.com> - 2018-10-06 18:49 +0000
Re: PID loop frequency Fitzgerald <john.smith@mailinator.com> - 2018-10-09 08:38 +0200
Re: PID loop frequency DJ Delorie <dj@delorie.com> - 2018-10-05 16:19 -0400
Re: PID loop frequency Fitzgerald <john.smith@mailinator.com> - 2018-10-09 08:48 +0200
Re: PID loop frequency tabbypurr@gmail.com - 2018-10-05 14:33 -0700
Re: PID loop frequency Jasen Betts <jasen@xnet.co.nz> - 2018-10-06 02:14 +0000
Re: PID loop frequency bill.sloman@ieee.org - 2018-10-05 19:49 -0700
Re: PID loop frequency Klaus Kragelund <klauskvik@hotmail.com> - 2018-10-06 01:19 -0700
Re: PID loop frequency bill.sloman@ieee.org - 2018-10-06 03:26 -0700
Re: PID loop frequency George Herold <gherold@teachspin.com> - 2018-10-06 11:56 -0700
Re: PID loop frequency Klaus Kragelund <klauskvik@hotmail.com> - 2018-10-08 06:27 -0700
Re: PID loop frequency Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-10-08 10:22 -0400
Re: PID loop frequency Klaus Kragelund <klauskvik@hotmail.com> - 2018-10-09 14:46 -0700
Page 2 of 2 — ← Prev page 1 [2]
| From | Hul Tytus <ht@panix.com> |
|---|---|
| Date | 2018-10-06 18:49 +0000 |
| Message-ID | <ppb03g$m8$1@reader1.panix.com> |
| In reply to | #518458 |
Thanks Jon. Hul Jon Elson <elson@pico-systems.com> wrote: > On Fri, 05 Oct 2018 19:52:00 +0000, Hul Tytus wrote: > > A question regarding terms: what is a "linear encoder with quatrature > > output" that produces "pulses"? > There are things called linear encoders which produce a pair of square > wave signals that are 90 degrees out of phase with each other. The phase > relationship allows you to determine direction of motion as well as > distance. The signals are identical to rotary quadrature encoders. > The 90 degree phase relationship is the definition of quadrature. > The individual signals consist of pulses. > Jon
[toc] | [prev] | [next] | [standalone]
| From | Fitzgerald <john.smith@mailinator.com> |
|---|---|
| Date | 2018-10-09 08:38 +0200 |
| Message-ID | <pphid3$g3s$1@dont-email.me> |
| In reply to | #518454 |
On 10/05/2018 09:52 PM, Hul Tytus wrote: > A question regarding terms: what is a "linear encoder with quatrature > output" that produces "pulses"? > > Hul > The encoder has two 50% duty cycle square wave outputs A and B. Depending on the direction of travel the A output either leads or lags the B output by 90 degrees. E.g. clockwise is AB = 10 > 11 > 01 > 00 and counter-clockwise is AB = 10 > 00 > 01 > 11. Each edge/pulse corresponds to a fixed distance traveled by the stage. Hence, the frequency of the square wave is a measure for its velocity.
[toc] | [prev] | [next] | [standalone]
| From | DJ Delorie <dj@delorie.com> |
|---|---|
| Date | 2018-10-05 16:19 -0400 |
| Message-ID | <xnpnwocfiw.fsf@delorie.com> |
| In reply to | #518413 |
Fitzgerald <john.smith@mailinator.com> writes: > I'm working on a digital PID motion controller. Isn't everyone? ;-) > - Is there a method to determine optimal servo frequency? In my case, the pid loops ran at the PWM frequency. > - Would it be beneficial to separate the controller in two control > loops; an inner velocity loop and an outer position loop. Perhaps with > both running at different frequencies? I ended up with three PID loops: * the innermost one managed the current through each phase of the motor. I.e. this is a torque loop. * the next one is the RPM loop * the outermost one is the position loop. For high RPM, you can drive the RPM loop directly. For low RPM, you can calculate the desired position vs time and drive the position loop instead. It will lag a bit according to the holding torque, but follow the desired RPM. I can usually keep the motors within a few counts of the desired position, at 4000 counts/rot.
[toc] | [prev] | [next] | [standalone]
| From | Fitzgerald <john.smith@mailinator.com> |
|---|---|
| Date | 2018-10-09 08:48 +0200 |
| Message-ID | <pphiv0$ii6$1@dont-email.me> |
| In reply to | #518457 |
On 10/05/2018 10:19 PM, DJ Delorie wrote: > I can usually keep the motors within a few counts of the desired > position, at 4000 counts/rot. > At which RPM is that? I have about 50k pulses/s input from the encoder; so that's equivalent to 750 RPM at 4000 counts/rot.
[toc] | [prev] | [next] | [standalone]
| From | tabbypurr@gmail.com |
|---|---|
| Date | 2018-10-05 14:33 -0700 |
| Message-ID | <2612ff3a-d9fe-481a-8cdc-9daf4fb143d5@googlegroups.com> |
| In reply to | #518413 |
On Friday, 5 October 2018 15:07:48 UTC+1, Fitzgerald wrote: > I'm working on a digital PID motion controller. The target/goal is to > move at (very) constant velocity. Position feedback is from a linear > encoder with quadrature output. The input to the controller is a linear > ramp (i.e. constant velocity) and the PID changes the motor output to > minimize the error. The system works, but I'm looking to improve its > performance at low velocities. > > At low velocities there are only a few pulses from the encoder per servo > cycle. In the error signal I can clearly see this quantization. If I > lower the frequency of the servo cycle; the controller performance > increases (i.e. smaller velocity variations). > > Two questions: > - Is there a method to determine optimal servo frequency? > - Would it be beneficial to separate the controller in two control > loops; an inner velocity loop and an outer position loop. Perhaps with > both running at different frequencies? > > Any pointers to good documentation are appreciated. > > Thanks, > Fitzgerald Cassette deck motors solved this a while ago. IIRC they used a bit of negative resistance, no PID. You could switched-mode it. NT
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2018-10-06 02:14 +0000 |
| Message-ID | <pp95p8$9ob$1@gonzo.alcatraz> |
| In reply to | #518469 |
On 2018-10-05, tabbypurr@gmail.com <tabbypurr@gmail.com> wrote: > On Friday, 5 October 2018 15:07:48 UTC+1, Fitzgerald wrote: >> I'm working on a digital PID motion controller. The target/goal is to >> move at (very) constant velocity. Position feedback is from a linear >> encoder with quadrature output. The input to the controller is a linear >> ramp (i.e. constant velocity) and the PID changes the motor output to >> minimize the error. The system works, but I'm looking to improve its >> performance at low velocities. >> >> At low velocities there are only a few pulses from the encoder per servo >> cycle. In the error signal I can clearly see this quantization. If I >> lower the frequency of the servo cycle; the controller performance >> increases (i.e. smaller velocity variations). >> >> Two questions: >> - Is there a method to determine optimal servo frequency? >> - Would it be beneficial to separate the controller in two control >> loops; an inner velocity loop and an outer position loop. Perhaps with >> both running at different frequencies? >> >> Any pointers to good documentation are appreciated. >> >> Thanks, >> Fitzgerald > > Cassette deck motors solved this a while ago. IIRC they used a bit of negative resistance, no PID. You could switched-mode it. The ones I dissasembled when I was doing learn by destroying had centrifugal switches on the rotor. but a recent thread on SX had a circuit which did the negative resistance thing (for a record player). if you cancel the resistance of the windings you can command the back-emf, and thus the speed, directly. -- Notsodium is mined on the banks of denial.
[toc] | [prev] | [next] | [standalone]
| From | bill.sloman@ieee.org |
|---|---|
| Date | 2018-10-05 19:49 -0700 |
| Message-ID | <1647b4fd-fa45-4016-81d8-af1cd55e65c3@googlegroups.com> |
| In reply to | #518498 |
On Saturday, October 6, 2018 at 12:31:10 PM UTC+10, Jasen Betts wrote: > On 2018-10-05, tabbypurr@gmail.com <tabbypurr@gmail.com> wrote: > > On Friday, 5 October 2018 15:07:48 UTC+1, Fitzgerald wrote: > >> I'm working on a digital PID motion controller. The target/goal is to > >> move at (very) constant velocity. Position feedback is from a linear > >> encoder with quadrature output. The input to the controller is a linear > >> ramp (i.e. constant velocity) and the PID changes the motor output to > >> minimize the error. The system works, but I'm looking to improve its > >> performance at low velocities. > >> > >> At low velocities there are only a few pulses from the encoder per servo > >> cycle. In the error signal I can clearly see this quantization. If I > >> lower the frequency of the servo cycle; the controller performance > >> increases (i.e. smaller velocity variations). > >> > >> Two questions: > >> - Is there a method to determine optimal servo frequency? > >> - Would it be beneficial to separate the controller in two control > >> loops; an inner velocity loop and an outer position loop. Perhaps with > >> both running at different frequencies? > >> > >> Any pointers to good documentation are appreciated. > >> > >> Thanks, > >> Fitzgerald > > > > Cassette deck motors solved this a while ago. IIRC they used a bit of negative resistance, no PID. You could switched-mode it. > > The ones I dissasembled when I was doing learn by destroying had > centrifugal switches on the rotor. but a recent thread on SX had a > circuit which did the negative resistance thing (for a record player). > if you cancel the resistance of the windings you can command the > back-emf, and thus the speed, directly. As NT has pointed out, Philips was doing that thirty years ago. I put it into a circuit I put together back in 1992 and it worked fine. You do have to kill off the negative resistance at high frequencies, but that was obvous enough that I anticipated it at the design stage. -- Bill Sloman, Sydney
[toc] | [prev] | [next] | [standalone]
| From | Klaus Kragelund <klauskvik@hotmail.com> |
|---|---|
| Date | 2018-10-06 01:19 -0700 |
| Message-ID | <4b62955e-0abc-4cb7-8c6a-190d53f85c55@googlegroups.com> |
| In reply to | #518502 |
Talking about digital control, this has been bothering me: Say we have a PWM controller running at 100kHz switching frequency, so the period is 10us Say we then have a digital loop that samples the voltage at 1kHz and when it samples it calculates new PWM duty in 1us, the we will have 36 degrees phase lag introduced by the sampling system That’s how the classical books determine the phase corruption But the loop is blind for a full 1000us before it actually sampled again, so shouldn’t the phase corruption (phase lag introduced by digital loop), be much more than 36 degrees? Cheers Klaus
[toc] | [prev] | [next] | [standalone]
| From | bill.sloman@ieee.org |
|---|---|
| Date | 2018-10-06 03:26 -0700 |
| Message-ID | <f1e8c395-ee5e-46b9-b182-0480b685b95c@googlegroups.com> |
| In reply to | #518518 |
On Saturday, October 6, 2018 at 6:19:11 PM UTC+10, Klaus Kragelund wrote: > Talking about digital control, this has been bothering me: > > Say we have a PWM controller running at 100kHz switching frequency, so the period is 10us > > Say we then have a digital loop that samples the voltage at 1kHz and when it samples it calculates new PWM duty in 1us, the we will have 36 degrees phase lag introduced by the sampling system > > That’s how the classical books determine the phase corruption > > But the loop is blind for a full 1000us before it actually sampled again, so shouldn’t the phase corruption (phase lag introduced by digital loop), be much more than 36 degrees? The saving grace in motion control is that moving parts have inertia. You have to keep track of where they are, but they do move pretty smoothly at the millisecond level, and getting them to change velocity takes quite a lot of joules. -- Bill Sloman, Sydney
[toc] | [prev] | [next] | [standalone]
| From | George Herold <gherold@teachspin.com> |
|---|---|
| Date | 2018-10-06 11:56 -0700 |
| Message-ID | <099d1e26-aca7-42e2-8810-fb9d613ef830@googlegroups.com> |
| In reply to | #518522 |
On Saturday, October 6, 2018 at 6:26:38 AM UTC-4, bill....@ieee.org wrote: > On Saturday, October 6, 2018 at 6:19:11 PM UTC+10, Klaus Kragelund wrote: > > Talking about digital control, this has been bothering me: > > > > Say we have a PWM controller running at 100kHz switching frequency, so the period is 10us > > > > Say we then have a digital loop that samples the voltage at 1kHz and when it samples it calculates new PWM duty in 1us, the we will have 36 degrees phase lag introduced by the sampling system > > > > That’s how the classical books determine the phase corruption > > > > But the loop is blind for a full 1000us before it actually sampled again, so shouldn’t the phase corruption (phase lag introduced by digital loop), be much more than 36 degrees? > > The saving grace in motion control is that moving parts have inertia. You have to keep track of where they are, but they do move pretty smoothly at the millisecond level, and getting them to change velocity takes quite a lot of joules. > > -- > Bill Sloman, Sydney I think that's right, as long as you're sampling faster than the time constant of the system, your model should give a good guess at the next position, and you adjust on the difference. (I do mostly analog loops.) George H.
[toc] | [prev] | [next] | [standalone]
| From | Klaus Kragelund <klauskvik@hotmail.com> |
|---|---|
| Date | 2018-10-08 06:27 -0700 |
| Message-ID | <e325d507-53d1-4f9e-90b2-704e3dbf08c5@googlegroups.com> |
| In reply to | #518522 |
On Saturday, October 6, 2018 at 12:26:38 PM UTC+2, bill....@ieee.org wrote: > On Saturday, October 6, 2018 at 6:19:11 PM UTC+10, Klaus Kragelund wrote: > > Talking about digital control, this has been bothering me: > > > > Say we have a PWM controller running at 100kHz switching frequency, so the period is 10us > > > > Say we then have a digital loop that samples the voltage at 1kHz and when it samples it calculates new PWM duty in 1us, the we will have 36 degrees phase lag introduced by the sampling system > > > > That’s how the classical books determine the phase corruption > > > > But the loop is blind for a full 1000us before it actually sampled again, so shouldn’t the phase corruption (phase lag introduced by digital loop), be much more than 36 degrees? > > The saving grace in motion control is that moving parts have inertia. You have to keep track of where they are, but they do move pretty smoothly at the millisecond level, and getting them to change velocity takes quite a lot of joules. > > -- True, but I was thinking about power supplies, where the crossover frequency is typically above 1kHz, so a 1000us delay would cause a 360 degrees phase lag, which of course is not acceptable ;-) Cheers Klaus
[toc] | [prev] | [next] | [standalone]
| From | Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> |
|---|---|
| Date | 2018-10-08 10:22 -0400 |
| Message-ID | <Ovudnaxm0su39SbGnZ2dnUU7-TmdnZ2d@supernews.com> |
| In reply to | #518712 |
On 10/08/2018 09:27 AM, Klaus Kragelund wrote: > On Saturday, October 6, 2018 at 12:26:38 PM UTC+2, bill....@ieee.org wrote: >> On Saturday, October 6, 2018 at 6:19:11 PM UTC+10, Klaus Kragelund wrote: >>> Talking about digital control, this has been bothering me: >>> >>> Say we have a PWM controller running at 100kHz switching frequency, so the period is 10us >>> >>> Say we then have a digital loop that samples the voltage at 1kHz and when it samples it calculates new PWM duty in 1us, the we will have 36 degrees phase lag introduced by the sampling system >>> >>> That’s how the classical books determine the phase corruption >>> >>> But the loop is blind for a full 1000us before it actually sampled again, so shouldn’t the phase corruption (phase lag introduced by digital loop), be much more than 36 degrees? >> >> The saving grace in motion control is that moving parts have inertia. You have to keep track of where they are, but they do move pretty smoothly at the millisecond level, and getting them to change velocity takes quite a lot of joules. >> >> -- > True, but I was thinking about power supplies, where the crossover frequency is typically above 1kHz, so a 1000us delay would cause a 360 degrees phase lag, which of course is not acceptable ;-) > Switching to absolute encoders with continuous PWM readout (US Digital and others) makes the problem go away. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net https://hobbs-eo.com
[toc] | [prev] | [next] | [standalone]
| From | Klaus Kragelund <klauskvik@hotmail.com> |
|---|---|
| Date | 2018-10-09 14:46 -0700 |
| Message-ID | <1c61831f-5bd5-4a7d-bbf9-debfe7a4e88e@googlegroups.com> |
| In reply to | #518716 |
On Monday, October 8, 2018 at 4:22:43 PM UTC+2, Phil Hobbs wrote: > On 10/08/2018 09:27 AM, Klaus Kragelund wrote: > > On Saturday, October 6, 2018 at 12:26:38 PM UTC+2, bill....@ieee.org wrote: > >> On Saturday, October 6, 2018 at 6:19:11 PM UTC+10, Klaus Kragelund wrote: > >>> Talking about digital control, this has been bothering me: > >>> > >>> Say we have a PWM controller running at 100kHz switching frequency, so the period is 10us > >>> > >>> Say we then have a digital loop that samples the voltage at 1kHz and when it samples it calculates new PWM duty in 1us, the we will have 36 degrees phase lag introduced by the sampling system > >>> > >>> That’s how the classical books determine the phase corruption > >>> > >>> But the loop is blind for a full 1000us before it actually sampled again, so shouldn’t the phase corruption (phase lag introduced by digital loop), be much more than 36 degrees? > >> > >> The saving grace in motion control is that moving parts have inertia. You have to keep track of where they are, but they do move pretty smoothly at the millisecond level, and getting them to change velocity takes quite a lot of joules. > >> > >> -- > > True, but I was thinking about power supplies, where the crossover frequency is typically above 1kHz, so a 1000us delay would cause a 360 degrees phase lag, which of course is not acceptable ;-) > > > > Switching to absolute encoders with continuous PWM readout (US Digital > and others) makes the problem go away. > Encoders are not used in switch mode power supplies :-)
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | sci.electronics.design
csiph-web