PWM feedback

Dec 18, 2013 12 Replies

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.



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.



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

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.

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 snipped-for-privacy@gmail.com:

rks and can design controllers. However, these have been for dc (non PWM) m otors using tachos with a dc output.

e out pulses.

) 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.

unless you have a huge number of lines I'd measure the period of the pulses

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

-Lasse

On a sunny day (Wed, 18 Dec 2013 12:42:31 -0800 (PST)) it happened snipped-for-privacy@gmail.com wrote in :

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.

Not sure I answered your question, if there was ny. late here.. :-)

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

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

formatting link

------------------------------------------------------

formatting link

Low pass filtering = phase lag and less phase margin. So it will have to be outside the closing unity gain frequency I assume.

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

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

Yes but you are going to have to filter it hard to get dc out of PWM. Won't you just get a sine wave with a weak filter.

works and can design controllers. However, these have been for dc (non PWM) motors using tachos with a dc output.

give out pulses.

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.

set-point and use the pulses from the tacho and create a phase-detector and PLL approach.

Back in the day ('bout 40 years ago) there were some really good frequency to voltage converter ICs. The principles are still valid. Most digital versions are translations of the method, pretty similar to count them up over some fixed repeating period.

?-)

And they still exist in many venders!

Jamie

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required