Autotracking ServoMethod (Designed over SH7045 from Hitachi)
Back to main page


 
This method is designed to control an output signal from systems that requires servo assistance. Suppose we've:
  • Buffered input signal samples or interrupt samples source .
  • Pattern table (Any signal type is allowed)
  • Corrector item (f.e. Pulse Width Modulation output signal)
Let's go through the block diagram

1.1 - Pattern Description

We'll need : 
                        Sample Rate  / Input Frequency  = Pattern Number of Samples

If we've less samples than equation above we'll run short of it and zero_distortion will appear. Pattern should be any kind of periodic signal like sine or saw_teeth. It only depends on our application.

This pattern will be compared with converted_input signal.

Pattern amplitude
It depends on the input resolution. If we're working with 8bit resolution our pattern should be able to reach 255 value. This amplitude will be the reference of the output level, so modifying it we'll cover output design range.
Pattern Lenght
This method allows the pattern be shorter than others servos design. Our pattern lenght will be half_period of input signal. Our espectatives are that it's possible to reach a quarter of total input period.

1.2 - Control Pointers

This pointers show us the present input signal phase. It points the present pattern sample which will be compared with present output sample. For example, working with sample rate of 10KHz , this control pointer should reach 200 value, so our pattern will've one hundred  of buffered samples.

When we reach the half_period change, we must return the control pointer to the beginning of the buffer.

1.3 - Memory Requirements

Generally we work with 16bit resolution signal, thereby the memory usage will be :

                     Resolution x Sample Rate / ( 2 x Input Frequency ) = Memory Usage

1.4 - Important Notes

To increment the degree of accuration is necessary to perform a HPISD , stands for Half Period of Input Signal Detector. This will notice us when half_period input signal detector and its polarity.
 

2.1 - Comparison

This part is the heart of the design. It will determine the correction way. This correction way could be by increasing PWM duty cycle or by decreasing it.

This increment / decrement is an infinetessimal correction, referring that is the minimum increment/ decrement we could perform. We've two different comparisons depending on the present half_period.

If present half_period is negative the way  to compare will be :

                               IN_SampleRate < Pattern                IN_SampleRate > Pattern                     IN stands for Inverted & Normalized
 

By other hand, if present half_period is positive the way to compare will be :

                              N_SampleRate < Pattern                  N_SampleRate > Pattern                       N stands for  Normalized

Normalized sample means that we get the input sample with an offset due to the converter properties. Inverted means that in negative half_period input signal is inverted.

The comparison algorithm diagram is like below:
 

if ( Detecting Half_Period Change )    Return Control Pointer to the beginning of the Pattern

if ( Positive Half_Period)

if( (Sample - Offset ) < Pattern [Control Pointer] )  Duty ++ ;
else  Duty -- ;
if ( Negative Half Period )
 
if( Offset - Sample) < Pattern[ Control Pointer] )  Duty ++ ;
else Duty -- ;
Control_Limits_Duty ( ) ;
Control Pointer ++ ; 
2.2 - Important Notes

If normalized input sample is equal to pattern, the correction will not be applied to the output

3.1 - Control Outputs 

There're many possibilities of control, but basically :
 

  • Applying this Pulse Widht Modulation control to LPF in order to get a proportional DC gain signal and using it to modify the output signal amplitude.
  • In a direct manner using the PWM to modify the output amplitude.

  •  

     
     
     

3.2 - Servo Considerations

This design has the properties listed below:
 

  • Pulse Widht Modulation frequency must be >> Input Frequency
  • Minimum Sample Rate 2x Input Frequency  ( Nyquist ), but servo capabilities will be in a low degree.
  • If Sample Rate is multiple of PWM frequency we could average input samples. 



 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Hosted by www.Geocities.ws

1