Forums

PWM feedback

Started by Unknown December 18, 2013
This is more of a practical question. I understand feedback and how it work=
s and can design controllers. However, these have been for dc (non PWM) mot=
ors using tachos with a dc output.

What I want to know is how you achieve this with digital tachos which give =
out pulses.=20

I am thinking that the set point is still dc as before (or software based) =
 and you just count the pulses from the tacho in a given time  and this giv=
es an error signal which you then generate PWM from - am I right? the rest =
is usual lag-lead compensators etc.

Another approach I suppose would be to have a square wave as the set-point =
and use the pulses from the tacho and create a phase-detector and PLL appro=
ach.

On Wed, 18 Dec 2013 12:42:31 -0800, gyansorova wrote:

> This is more of a practical question. I understand feedback and how it > works and can design controllers. However, these have been for dc (non > PWM) motors using tachos with a dc output. > > What I want to know is how you achieve this with digital tachos which > give out pulses. > > I am thinking that the set point is still dc as before (or software > based) and you just count the pulses from the tacho in a given time > and this gives an error signal which you then generate PWM from - am I > right? the rest is usual lag-lead compensators etc. > > Another approach I suppose would be to have a square wave as the > set-point and use the pulses from the tacho and create a phase-detector > and PLL approach.
The phase detector and PLL approach would be subject to saturation, unless you used a phase detector that could slip by considerably more than one pulse. My preference is to use an encoder with lots of lines, and take the derivative in digital-land to get speed. You want lots of lines to keep the velocity noise down (the velocity noise ends up being a function of sampling rate and line count -- hence, you want that big line count, particularly if you have a high sampling rate). -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Wed, 18 Dec 2013 12:42:31 -0800 (PST), gyansorova@gmail.com wrote:

>This is more of a practical question. I understand feedback and how it works and can design controllers. However, these have been for dc (non PWM) motors using tachos with a dc output. > >What I want to know is how you achieve this with digital tachos which give out pulses. > >I am thinking that the set point is still dc as before (or software based) and you just count the pulses from the tacho in a given time and this gives an error signal which you then generate PWM from - am I right? the rest is usual lag-lead compensators etc. >
Counting in a fixed window has a +-1 count ambiguity, which may cause problems. You could use an analog tach circuit to convert the pulses to filtered DC and then pretend it was a DC tach.
>Another approach I suppose would be to have a square wave as the set-point and use the pulses from the tacho and create a phase-detector and PLL approach.
PLL wouldn't be bad, with a 4046-type frequency/phase detector. The "VCO" is the motor+tach. -- John Larkin Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser drivers and controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation
Den onsdag den 18. december 2013 21.42.31 UTC+1 skrev gyans...@gmail.com:
> This is more of a practical question. I understand feedback and how it wo=
rks and can design controllers. However, these have been for dc (non PWM) m= otors using tachos with a dc output.
>=20 >=20 >=20 > What I want to know is how you achieve this with digital tachos which giv=
e out pulses.=20
>=20 >=20 >=20 > I am thinking that the set point is still dc as before (or software based=
) and you just count the pulses from the tacho in a given time and this g= ives an error signal which you then generate PWM from - am I right? the res= t is usual lag-lead compensators etc.
>=20 >=20
unless you have a huge number of lines I'd measure the period of the pulses
>=20 > Another approach I suppose would be to have a square wave as the set-poin=
t and use the pulses from the tacho and create a phase-detector and PLL app= roach. measuring the period of the pulses and comparing to what you want the perio= d to be is sorta the same=20 -Lasse
On a sunny day (Wed, 18 Dec 2013 12:42:31 -0800 (PST)) it happened
gyansorova@gmail.com wrote in
<0dc519a6-e383-4f2e-b5ed-c99ad8e3c6bd@googlegroups.com>:

>This is more of a practical question. I understand feedback and how it work= >s and can design controllers. However, these have been for dc (non PWM) mot= >ors using tachos with a dc output. > >What I want to know is how you achieve this with digital tachos which give = >out pulses. > >I am thinking that the set point is still dc as before (or software based) = > and you just count the pulses from the tacho in a given time and this giv= >es an error signal which you then generate PWM from - am I right? the rest = >is usual lag-lead compensators etc.
Well, there are 2 sorts of PWM, analog generated (slice a triangle wave for example), and that thas 'infinite' 'resolution', and software /counter generated, that is limited to some bits (steps). As to measuring tacho pulses, that is as old as the world, in extreme precision cases you sample a ramp creating an analog control voltage. For example in quadruplex video recorder head servos you first did a frequency lock (with whatever comparator or logic), and after frequency lock change to a precision phase comparator, for example that ramp. After that an electronic controlled delay line comes in to micro second precision, and then an other one to nano second precision to get the color phase right... So state your requirements. and that, again, is technology from the sixties.
>Another approach I suppose would be to have a square wave as the set-point = >and use the pulses from the tacho and create a phase-detector and PLL appro= >ach.
Not sure I answered your question, if there was ny. late here.. :-)
On Wed, 18 Dec 2013 13:14:07 -0800, John Larkin wrote:

> On Wed, 18 Dec 2013 12:42:31 -0800 (PST), gyansorova@gmail.com wrote: > >>This is more of a practical question. I understand feedback and how it >>works and can design controllers. However, these have been for dc (non >>PWM) motors using tachos with a dc output. >> >>What I want to know is how you achieve this with digital tachos which >>give out pulses. >> >>I am thinking that the set point is still dc as before (or software >>based) and you just count the pulses from the tacho in a given time >>and this gives an error signal which you then generate PWM from - am I >>right? the rest is usual lag-lead compensators etc. >> >> > Counting in a fixed window has a +-1 count ambiguity, which may cause > problems. > > You could use an analog tach circuit to convert the pulses to filtered > DC and then pretend it was a DC tach.
You get pretty much the same effect by accepting your +/- 1 count ambiguity (really, it's a +/- 1/2 count ambiguity), then low-pass filtering on software. Then you're not defeating the purpose of having a digital output by cramming analog circuitry in between it and your digital controller. Assuming, of course, that your controller is digital... -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Wednesday, December 18, 2013 11:14:07 PM UTC+2, John Larkin wrote:
> On Wed, 18 Dec 2013 12:42:31 -0800 (PST), gyansorova@gmail.com wrote: > > ... > > Counting in a fixed window has a +-1 count ambiguity, which may cause > problems.
Usually instead of measuring frequency (counting pulses in a window) measuring period (counting clock pulses with the sensor pulses being the window) solves this issue if existing, one just uses a fast enough clock. Dimiter ------------------------------------------------------ Dimiter Popoff, TGI http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/
On Thursday, December 19, 2013 12:15:20 PM UTC+13, Tim Wescott wrote:
> On Wed, 18 Dec 2013 13:14:07 -0800, John Larkin wrote: > > > > > On Wed, 18 Dec 2013 12:42:31 -0800 (PST), gyansorova@gmail.com wrote: > > > > > >>This is more of a practical question. I understand feedback and how it > > >>works and can design controllers. However, these have been for dc (non > > >>PWM) motors using tachos with a dc output. > > >> > > >>What I want to know is how you achieve this with digital tachos which > > >>give out pulses. > > >> > > >>I am thinking that the set point is still dc as before (or software > > >>based) and you just count the pulses from the tacho in a given time > > >>and this gives an error signal which you then generate PWM from - am I > > >>right? the rest is usual lag-lead compensators etc. > > >> > > >> > > > Counting in a fixed window has a +-1 count ambiguity, which may cause > > > problems. > > > > > > You could use an analog tach circuit to convert the pulses to filtered > > > DC and then pretend it was a DC tach. > > > > You get pretty much the same effect by accepting your +/- 1 count > > ambiguity (really, it's a +/- 1/2 count ambiguity), then low-pass > > filtering on software. Then you're not defeating the purpose of having a >
Low pass filtering = phase lag and less phase margin. So it will have to be outside the closing unity gain frequency I assume.
On Wed, 18 Dec 2013 17:15:20 -0600, Tim Wescott
<tim@seemywebsite.really> wrote:

>On Wed, 18 Dec 2013 13:14:07 -0800, John Larkin wrote: > >> On Wed, 18 Dec 2013 12:42:31 -0800 (PST), gyansorova@gmail.com wrote: >> >>>This is more of a practical question. I understand feedback and how it >>>works and can design controllers. However, these have been for dc (non >>>PWM) motors using tachos with a dc output. >>> >>>What I want to know is how you achieve this with digital tachos which >>>give out pulses. >>> >>>I am thinking that the set point is still dc as before (or software >>>based) and you just count the pulses from the tacho in a given time >>>and this gives an error signal which you then generate PWM from - am I >>>right? the rest is usual lag-lead compensators etc. >>> >>> >> Counting in a fixed window has a +-1 count ambiguity, which may cause >> problems. >> >> You could use an analog tach circuit to convert the pulses to filtered >> DC and then pretend it was a DC tach. > >You get pretty much the same effect by accepting your +/- 1 count >ambiguity (really, it's a +/- 1/2 count ambiguity), then low-pass >filtering on software. Then you're not defeating the purpose of having a >digital output by cramming analog circuitry in between it and your >digital controller.
Depends on the numbers. If the sample window is small, the count ambiguity could be a lot of noise. If the window is big, or you filter the noise, the loop could get slow. There might be a window that works; we don't have the details. One of those five-million-counts-per-rev encoders would be good here. -- John Larkin Highland Technology, Inc jlarkin at highlandtechnology dot com http://www.highlandtechnology.com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom laser drivers and controllers Photonics and fiberoptic TTL data links VME thermocouple, LVDT, synchro acquisition and simulation
On Wed, 18 Dec 2013 16:25:12 -0800, gyansorova wrote:

> On Thursday, December 19, 2013 12:15:20 PM UTC+13, Tim Wescott wrote: >> On Wed, 18 Dec 2013 13:14:07 -0800, John Larkin wrote: >> >> >> >> > On Wed, 18 Dec 2013 12:42:31 -0800 (PST), gyansorova@gmail.com wrote: >> >> >> > >> >>This is more of a practical question. I understand feedback and how >> >>it >> >> >>works and can design controllers. However, these have been for dc >> >>(non >> >> >>PWM) motors using tachos with a dc output. >> >> >> >> >> >>What I want to know is how you achieve this with digital tachos which >> >> >>give out pulses. >> >> >> >> >> >>I am thinking that the set point is still dc as before (or software >> >> >>based) and you just count the pulses from the tacho in a given time >> >> >>and this gives an error signal which you then generate PWM from - am >> >>I >> >> >>right? the rest is usual lag-lead compensators etc. >> >> >> >> >> >> >> >> > Counting in a fixed window has a +-1 count ambiguity, which may cause >> >> > problems. >> >> >> > >> > You could use an analog tach circuit to convert the pulses to >> > filtered >> >> > DC and then pretend it was a DC tach. >> >> >> >> You get pretty much the same effect by accepting your +/- 1 count >> >> ambiguity (really, it's a +/- 1/2 count ambiguity), then low-pass >> >> filtering on software. Then you're not defeating the purpose of having >> a >> >> > > Low pass filtering = phase lag and less phase margin. So it will have to > be outside the closing unity gain frequency I assume.
Yup. I'm not touting it as a panacea, I'm just pointing out that its not necessarily all that different to do it in the digital realm vs. analog. (Some, but not a lot, unless you really don't have many lines in your encoder). -- Tim Wescott Wescott Design Services http://www.wescottdesign.com