Jerry Avins wrote:> As for documentation, it has been my practice to write down what needs > to be done, how I do it, why I do it that way*, and a description of > algorithms and optimizations. If a competent programmer/engineer can't > produce working code from it, I haven't written enough. I was trained in > that art by years of writing code for other people with the clear > understanding that, once delivered and accepted, it was no longer my > concern (consultation time charged for). Otherwise, my career would have > changed from creation to maintenance after a few major projects.We live in different worlds... both in time and place. When I was hired to my last position at a university, I found out that it was "expected" of me to run and maintain a couple of PCs. It was not in my contract but still. It has been common practice in the places I have worked not to document anything, as there is no costs -- at least not visible on the balance sheets -- in having PhDs and researchers doing technicians jobs.> Jerry > __________________________________ > * "It seemed like a good idea at the time" is often all I can write.I know that one just all too well... ;) Rune
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →
Filtering a tachometer generator
Started by ●January 6, 2006
Reply by ●January 8, 20062006-01-08
Reply by ●January 8, 20062006-01-08
Richard Owlett wrote: ...> I've read the last dozen or so posts. > Are all looking for a complicated solution?I looked for an elegant one, but elegance includes simplicity. (Boltzmann quipped that elegance is for tailors, but I can hope.)> Jerry stated that signal resembles rectified output of multi-phased > generator. > > OK, so output is unipolar. > > What would happen if a modified peak follower were implemented.My back-up plan. It only works when the sample rate is high compared to the ripple, so it needs to be switched off at some speed. The diode-R-C can take over from there.> Choose time0 such that signal=0 > As input rises, output rises to match > As input falls, output remains at previous max > a secondary output tracks falling input > Input rises above previous secondary output triggering change of state > secondary output now tracks rising signal -- track and holdSuppose it doesn't? We could be decelerating.> input falls below secondary outputSuppose it doesn't? We could be accelerating.> secondary output transferred to primary output > repeat > > Why would this not be optimal? > Seems it could be implemented in either analog or digital domain. > > Have I've missed something?How would you fix that? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 8, 20062006-01-08
John Monro wrote: ...> I have seen a 'dead-band' used for this type of thing. It was inserted > in the error-signal path and adjusted to be a little wider than the > noise. It got rid of the wobbulation when the system was not > correcting, while the wobbulation during correction was measurable but > not audible.That's an intriguing idea. Maybe the best yet.> By the way, "wobbulator" has distinguished roots, going back to the > electrically variable capacitor used in WW2 panoramic receivers.Now that you mention it, I do remember. I hereby tender an apology to Tim Wescott for seeming to take credit for the coinage.> Other thoughts: > > 1. Is gearing-up the tacho a possibility?It's built onto the motor. The brushes are internal, so I can't count segments without disassembling it. A scope will reveal all.> 2. Increase the field current: Since the ripple is due, not to the > commutator itself, but to the selected winding traveling across a > region of non-uniform magnetic flux, this may help by evening out the > variation (but I have never tried it.) This idea is based on the hope > that the flux density in the lower-flux regions will increase more than > in the higher-flux regions, as the iron approaches saturation.The tach has a permanent magnet field. The ripple is caused, if not by the commutator, by the process of commutation. (I think that's just a semantic difference.) The coils develop AC. (Good pole-face design flat-tops the waveform.) The commutator selects that coil or two -- adjacent segments can be simultaneously under a brush -- so the output is like a polyphase rectifier's. In fact, the inductors used on the transformer side of high-power polyphase rectifiers are called commutating inductors, and cause current to be delivered from two phases at a time. Think of the assembly as a synchronous mechanical rectifier. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 8, 20062006-01-08
Peter Nachtwey wrote:> "Tim Wescott" <tim@seemywebsite.com> wrote in message > news:Wq6dnaolzY5g-V3eRVn-tg@web-ster.com... > >>Peter Nachtwey wrote: >> >>>Use an observer. The benefit is that the estimated states are floating >>>point numbers and not quantized values. This should be easy to do with a >>>DC motor. >>> >>>Peter Nachtwey >>> >>> >> >>Excuse me? >> >>1. An observer is just a filter (often a MIMO one) that has been designed >>with a certain technique; > > > The observer estimates states and uses the feed back to keep the states from > varying too much from reality. >Yes, I know. In the linear case it does this by implementing a difference equation of the form x(n) = A x(n-1) + B u(n), y(n) = C x(n-1) + D u(n) i.e. it's just another linear filter. In the nonlinear case the observer is implemented as x(n) = f(x(n-1), u(n)), y(n) = g(x(n-1), u(n)) i.e. it's just another nonlinear filter. The only difference is the way that it's designed. If you know ahead of time that you have a lot of measurement noise then you'll know ahead of time that the observer will have a lot of low-pass action from the measurement to the state estimate -- so instead of making a bunch of guesses about the plant and the measurement, casting them in the form of "knowledge" and building an observer which is just a low-pass filter, you can just cut through the obfuscating theory and guess at a low pass filter. This technique has a great big inherent pitfall that is not usually pointed out in introductory state-space texts: The accuracy of an observer's output is heavily dependent on the correlation between the model you used to design the observer and the behavior of the actual system. If you blithely design your observer with a poor model then you'll get results that look really, really good on paper but can have some pretty exciting results in real life. Of course if you _do_ have a great deal of knowledge about the plant and any noise processes then you can go ahead and use more formal observer design to great benefit. Ditto if you are dealing with a MIMO system where you can't get your brain wrapped around the problem well enough for an intuitive answer.> >> for a system with significant noise the best observer will be a low pass >>(with some feedforward from the motor torque command). > > > And you will implent this how?In whatever form is best for my customer, without assuming the existence of floating point math in a system that may not support it.> See my reference below. > A low pass filter has phase lag that can degrade performance. > Have you tried to design one on your Mathcad? You should.One what? An observer or a low-pass filter? I've designed both, as the situation warrants, in MathCad, MatLab, SciLab and on paper.> With a good model you don't need to depend so much on the feedback so the > effects of quantizing is reduced. >If a good model is available, yes. In control systems that's an extremely large 'if'. Do you know enough about Jerry's problem to know that a good model is available?> >>2. There's nothing that says an observer has to be implemented in >>floating point -- > > > True, it is just a lot easier. >Unless you're working with a system that does not support floating point for some reason. And there's nothing to say that you can only use floating point (or enhanced precision math) by implementing an observer.> >>and floating point numbers are quantized in any case. > > > A 24 bit mantissa is much better than the 5 bits Jerry has to work with now. > Try it and then come back and report what you have found out. >Please let me know where Jerry's post shows that he only has 5 bits to work with -- I missed that. And yes the 25 (not 24) bits of precision available from the common single-precision floating point formats are better than 5, but still aren't enough in many real-world control problems. In fact I often use 32-bit fixed point math because it fits in the same space as single-precision IEEE floating point, it's faster on most embedded processors, and on many systems with 16-bit inputs 25 bits is marginal for integrators and really low pass filters where 32 bits is safe enough to do one calculation for the whole system and know it's good enough. Anyone who mistakes "floating point" for "magic" does so at his own risk. Of course if you have a system that can use double precision floating point having 49 bits of precision in your mantissa gets pretty close to magic.> >> So calling your filter an observer doesn't guarantee no quantization, > > > It still occurs but effects are reduced significantly. An observer can > reduce the effects of > quantizing or even phase delay. >But an observer is just a filter that was arrived at by a certain design technique -- so it cannot reduce these effects any more than the same filter that was arrived at by some other design technique. Furthermore, an observer can only reduce apparent phase delay effects inside the control loop -- any unmeasurable disturbance that impinges on the system will have to wend it's way through the inherent low-pass nature of the observer. That's what reduces quantization, but carried too far it also reduces system response to external disturbances.> >>has guaranteed quantization in a digital system, and even if you built it >>with analog components would _still_ have guaranteed noise. >> >>How do you define the word observer that makes so different? >> > > See the example in Digital Control Systems Analysis and Design by Philips > and Nagle section 9.3. > Use your Mathcad to implement a system position system that requires the > derivative gain. Now use the round function to round the feedback to > simulate quantizing. With out the observer the output will jump in > increments proportional to the derivative gain because of the quantizing. > Now add the observer and see the output is much smoother. >It sounds like the example is somewhat contrived: it is never wise to implement a differentiator that does not have some high-frequency rolloff. With differentiator rolloff the output jumps will be significantly smaller. You can arrive at this rolloff (along with some command feedforward) by using state-space design techniques and calling your filter an "observer", but it's still a filter doing what all filters do. You can also arrive at this rolloff by traditional Bode-plot methods, which you were going to have to do anyway to verify your disturbance rejection. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●January 8, 20062006-01-08
Jerry Avins wrote:> Richard Owlett wrote: > > ... > >> I've read the last dozen or so posts. >> Are all looking for a complicated solution? > > > I looked for an elegant one, but elegance includes simplicity. > (Boltzmann quipped that elegance is for tailors, but I can hope.) > >> Jerry stated that signal resembles rectified output of multi-phased >> generator. >> >> OK, so output is unipolar. >> >> What would happen if a modified peak follower were implemented. > > > My back-up plan. It only works when the sample rate is high compared to > the ripple, so it needs to be switched off at some speed. The diode-R-C > can take over from there. > >> Choose time0 such that signal=0 >> As input rises, output rises to match >> As input falls, output remains at previous max >> a secondary output tracks falling input >> Input rises above previous secondary output triggering change of state >> secondary output now tracks rising signal -- track and hold > > > Suppose it doesn't? We could be decelerating. > >> input falls below secondary output > > > Suppose it doesn't? We could be accelerating. > >> secondary output transferred to primary output >> repeat >> >> Why would this not be optimal? >> Seems it could be implemented in either analog or digital domain. >> >> Have I've missed something? > > > How would you fix that?By thinking more before posting ;}> > Jerry
Reply by ●January 8, 20062006-01-08
Richard Owlett wrote:> Jerry Avins wrote:...>> How would you fix that? > > > By thinking more before posting ;}Don't sweat it. FYI: at 900 rpm, I read 2.7 volts, with 50 mv of atypical ripple and 100 mv of narrow spikes of brush noise. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 9, 20062006-01-09
Jerry Avins wrote:> In ancient times, DC servo motors usually had small generators attached > (today, we use encoders) whose output is proportional to rpm. These > antediluvian devices suffer from commutator ripple, which can have nasty > effects on feedback loops. For servos that don't run over very wide > ranges of speed, the ripple is easily dealt with. Commutators almost > always have an odd number of segments, so the number of cycles of ripple > per turn is double the number of segments. A 17-segment commutator's > ripple frequency if 34 times the angular frequency of the motor, and > it's easily filtered without excessive delay /at any one speed/. > > There's a rub. The filter needed to smooth the ripple at 1 rpm > introduces enough delay at 1000 rpm to have a noticeable -- possibly > unacceptable -- effect on stability. The simple solution lets the speed > wobblulate at low speeds and hope nobody notices or wonders where the > sound comes from. > > An adaptive filter seems to be in order. Just changing coefficients in a > fixed structure doesn't seem to be the best way. We want a lowpass > filter whose cutoff and group delay track the motor speed. Moreover, a > prompt (close to minimum phase) filter preserves stability best. Is > there a known structure for this, or is an invention (or motor > replacement) in order? > > Jerry > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF==AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF Jerry, Two solutions come to mind, but for both I am assuming that you have a micro in your loop. 1=2E If you are sampling your tacho output, use the tacho spikes to trigger your AD (with some delay), so that you always sample tacho output x us/ms after spike. I have used this technique to overcome some switching noise, but mine had a limited frequency range. An upgraded version of this would be that you sample in the middele between two spikes, this way you get rid of the ripple also. 2=2E filter heavily so that your system works well at low speeds. At higher speed switch to counting nr. of spikes in fixed time. You'll need some DC blocking filter for the second approach. Hope any of this helps Mitja
Reply by ●January 9, 20062006-01-09
Rune Allnor wrote:> Jerry Avins wrote: > > >>As for documentation, it has been my practice to write down what needs >>to be done, how I do it, why I do it that way*, and a description of >>algorithms and optimizations. If a competent programmer/engineer can't >>produce working code from it, I haven't written enough. I was trained in >>that art by years of writing code for other people with the clear >>understanding that, once delivered and accepted, it was no longer my >>concern (consultation time charged for). Otherwise, my career would have >>changed from creation to maintenance after a few major projects. > > > We live in different worlds... both in time and place. When I was hired > > to my last position at a university, I found out that it was "expected" > of me to run and maintain a couple of PCs. It was not in my contract > but still. It has been common practice in the places I have worked not > to document anything, as there is no costs -- at least not visible on > the balance sheets -- in having PhDs and researchers doing technicians > jobs. >But if you don't document what you've thought up, how to the technicians build it? I document everything I can, in word processor documents and where applicable in code and/or annotations on schematics. If you build something cool and document it so it can be reproduced you're an engineer. If you build something cool and only you can understand it you're just a really talented hacker. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●January 9, 20062006-01-09
Tim Wescott wrote: ...> If you build something cool and document it so it can be reproduced > you're an engineer. If you build something cool and only you can > understand it you're just a really talented hacker.If I can phrase that in 72^H^H144 characters, I'll make a sig of it. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 9, 20062006-01-09
Rune Allnor wrote:> Jerry Avins wrote: > > >>As for documentation, it has been my practice to write down what needs >>to be done, how I do it, why I do it that way*, and a description of >>algorithms and optimizations. If a competent programmer/engineer can't >>produce working code from it, I haven't written enough. I was trained in >>that art by years of writing code for other people with the clear >>understanding that, once delivered and accepted, it was no longer my >>concern (consultation time charged for). Otherwise, my career would have >>changed from creation to maintenance after a few major projects. > > > We live in different worlds... both in time and place. When I was hired > > to my last position at a university, I found out that it was "expected" > of me to run and maintain a couple of PCs. It was not in my contract > but still. It has been common practice in the places I have worked not > to document anything, as there is no costs -- at least not visible on > the balance sheets -- in having PhDs and researchers doing technicians > jobs. >If others have this view, we headed for *DISASTER* !!!!!!!!!!!!!!!!!!! Never having received BS (let alone PiledHigherDeeper) degree I think *ALL* should run scared, _VERY SCARED_ . When I've had technical employment, I've always been one of those 'lowly techs' ;} I've worked in academic research environment. Its been my observation that those who got something done be they MS candidate, PHD candidate, post-DOC, or potential NOBEL Laureate NEVER HAD QUALMS ABOUT GETTING HANDS DIRTY !!!!







