.

Auto Null

Overview

Overview

The Auto Null block acts as a slow integrator with a constant magnitude derivative. At each sample, if the input is strictly greater than zero, the output is incremented by the configured increment value, and conversely if the input is strictly less than zero, the output is decremented by it. The output is not modified on samples were its input value is 0.0. This behavior is commonly used to adjust outputs to zero in a feedback situation. The increment will happen at the update rate, determined by the Evaluate Block.

The Auto Null block is ideal for situations when using an analog device as an input. Analog Input devices’ zero state often drifts with some unknown DC Offset. The Auto Null block compensates for this by using a slow integrator to close the drift gap.

Example

The following example illustrates a simple PID Control loop with a Clip to protect the motor from over current. Additionally with an analog input (another feedback source such as an Accelerometer) sent into an AutoNull block and summed into the control loop.

The Accelerometer has a DC input of ~2500 counts at zero acceleration. However, as the unit heats up this may drift +/- 50 counts and can cause problems in your control loop. The Auto Null block takes in an analog input, an expected value (Offset Input). Every controller sample, the AutoNull block increments or decrements the Input value (by the specified Increment value) to try to bring the increment towards the Expected Value (Offset Input).


The configuration values for this block are as follows:

 

Evaluate Block

This block allows you to specify whether the block executes Every Sample, Every Other Sample (Odd or Even), or Every Fourth Sample (and specify the First, Second, Third, or Fourth) or background. This provides greater flexibility in controlling the execution of a model and to preserve performance for other areas of motion control.

User Defined Block Priority When selected, allows you to enter a Priority Code to modify Execution Ordering of this block. For more information, see Block Execution Order and User Defined Block Priority.
Priority For an explanation of how the Priority field is used by the MechaWare Model Downloader, see Block Execution Order and User Defined Block Priority.
User Data 0 Application-specific data. See User Data Storage.
User Data 1 Application-specific data. See User Data Storage.

Matlab/Simulink

Simulink Interface

Positive Input values in crease Output by Increment each sample. Negative Input values decrease Output by Increment each sample. Output does not change on samples where Input is zero.

The block has two user data fields (User Data 0, User Data 1) to store application-specific data for convenient storage and retrieval. For more information, see User Data Storage.

The block's update schedule is determined by the Evaluate Block. The following Parameter Dialog Box can be opened by double-clicking on the block in a Simulink model:

 

C++ API

AUTO_NULLBlock

Declaration

Public Method

 
class AUTO_NULLBlock: public virtual Block
{
public:
// User accessible coefficients
	double Increment;
	
};
 

Required Header: mechaware.h

Description

The AUTO_NULL mechanism performs fixed derivative integration to the effect of the following mathematical model:

Output = (quantity_of_positive_samplings – quantity_of_negative_samplings) * increment

Parameters

 

double

Increment

The amount by which to move the output towards zero each sample.

Methods

Block Methods

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2012 Motion Engineering