.


   

Filter Tool - MechaWare Firmware

Overview

The Filter Tool window allows the user to modify the MechaWare Block Tuning parameters and immediately view changes in filter simulation plots. The Filter Tool is displayed as a separate window that is accessed while using any feature of the Bode Tool.

This page describes how to view and change Filter Parameters for MechaWare Firmware.

Note: As shown below, if the Bode Tool window indicates Bode Tool, this is for Standard Firmware. If the Bode Tool window indicates Bode Tool (MechaWare), this is for MechaWare Firmware. For more information about viewing and changing filter parameters for Standard Firmware, see Filter Tool - Standard FirmWare.

For this section, the sample model BasicPIDforBode.mdl is used as an example. This sample model is distributed with MechaWare. The BasicPIDforBode.mdl file was generated using MATLAB®/Simulink® from The Mathworks™ company. This example demonstrates tuning without using Simulink. The Simulink model diagram (BasicPIDforBode.md) in the following section is used for reference only.

By the end of section, you will be able to identify the Model Number, identify different Blocks, and successfully modify block parameters. The actual tuning process is described in other sections of the Bode Tool documentation.

How to use the Filter Tool

Identifying the Model Number and Algorithm Blocks

Multiple MechaWare models may be loaded onto the controller and each model may include multiple PID , PIV, and biquad blocks. The Bode Tool can only modify the most common Filter blocks – PID with Reset, PIV with Reset, and BiQuad Filter.

Note: To effectively use Bode Tool for system tuning when using MechaWare firmware, it is critical that you have basic knowledge of the model The Bode Tool allows you to modify block parameters based on Block names. However, the program does not have a way to display the relationships between blocks loaded into firmware. If you do not have a copy of the MechaWare model, contact the engineer that designed the MechaWare algorithm for the system.

Below is the sample model BasicPIDforBode.mdl:

The BasicPIDforBode model includes three PID with Reset blocks connected to three Demand blocks.  The Demand block connects the Filter output to the appropriate Motor. The text under each Block is used to identify the block in Bode Tool.

Note: You will need to contact the model designer to determine the motor mapping and the Model Number if more than one model is loaded on the firmware. In this example, the Model Number is 0 since only one model is used.

For this example, the Demand blocks are mapped as follows:

Torque Output 0 is mapped to Motor 0
Torque Output 1 is mapped to Motor 1
Torque Output 2 is mapped to Motor 2

Now with a basic understanding of our example model, proceed to the following section to change the block parameters using the Filter Tool.

Opening the Filter Tool

Before opening the Filter Tool window, select the Model and Motor Block to modify and test. As shown below, the MechaWare Model Number selected is 0 and the Motor Block is mapped to Torque Output 0. Note the Motor Number was previously confirmed as 0.

Open the Filter Tool from the main Bode Tool menu or from the Bode Plot menu by selecting Filter -> Filter Tool.

Filter Tool Setup Tab

The Setup tab in the Filter Tool allows simple configuration and management of the motor under test. It can perform basic operations such as turning on the servos that are needed for testing. Without the setup tab, separate programs are needed to perform these functions.

Current Motion Number – This value indicates the MPI Motion Supervisor number used to abort motion and monitor motion state. This value always matches the current primary motor number selected on the main Bode dialog.

Current Motor Number – This value indicates the MPI Motor and Filter number used to modify amp, error, algorithm, and filter coefficients (via PID/PIV/Algorithm/Post Filter tabs). With MechaWare firmware, this value is automatically determined when selecting the Motor Block.

Axis State - Shows the state of the motor as would be seen in Motion Console. This is commonly used to see that the motor is in an error state or idle state.

Clear Fault - Click this button to attempt clear an axis state.

Amp Enable - Shows whether the motor is enabled or not. Click the check box to toggle the amp enable status.

Error Limit - Sets the error limit trigger. This is the maximum counts of following error that are allowed before the error limit action is taken.

Error Action - The action taken when the Error Limit is triggered.

Polling Mode - If this is checked, the Setup tab is continually checking the status of all the values on the Setup tab. If an error is returned from the controller or communication with the controller is broken, this box becomes unchecked and the values are no longer updated. You can recheck this box if you remove the cause of the problem.

Accessing the Different Coefficient Groups

For controllers running MechaWare firmware, all PID and PIV Blocks in the model are accessed from the Algorithm tab. Both the Algorithm and Post Filter tabs include a drop down selection to specify the block name and automatically list the appropriate values to view and/or edit. The block lists are populated from only the currently selected model (as specified on the main dialog).

In our BasicPIDforBode example, the drop down menu automatically lists the three PID with Reset blocks from the model. Refer back to the Simulink model diagram to confirm PID with Reset is linked to Torque Output 0. Make the selection and the Filter Tool immediately displays the coefficients already loaded into the current selection.

Viewing and Editing Algorithm Coefficients

The Filter Tool does not constantly poll the controller to determine if any coefficients have changed. If you change any filter coefficients in another program, click the Refresh button to make the Filter Tool read the latest coefficients.

Coefficients changed in the Filter Tool do not take effect until the Apply button is clicked. This button is active if any parameters in the in the box are modified.

When either the Apply or Refresh buttons are clicked, the Bode Plot window updates it's simulation

Viewing and Editing Biquad Post Filter Elements

The Filter Tool can also display and edit biquad post filter blocks in MechaWare models. While our BasicPIDforBode sample model does not include Post Filters, this section will cover this tab when used with MechaWare.

In the MechaWare case, a list of biquad block names from the model is automatically listed in a drop list labeled BiQuad Block near the top. Select the block to view/edit before working with the coefficients  as shown below. MechaWare Biquad blocks can have more filter sections than standard MPI post filters, but must be allocated at download time by the biquad coefficients file referenced by the mdl.

Note: biquad block sections cannot by added or removed by the filter tool. Instead, disable sections by setting their type to Unity Gain.

Note: Changing a section’s type to Zero Gain will remove it and any subsequent sections upon applying the changes.

To edit a section’s type or coefficients, select it from the list and proceed to make your edits on the right and click Apply. Updated plots are displayed in the Bode Plot window.

Background on Biquad Post Filters

Biquad post filters are intimidating to the uninitiated. For more information about MechaWare Biquad blocks, see BiQuad Filter.

 

Previous | Next

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