.


MechaWare Case Study Tutorial

This case study describes the steps of developing a new control algorithm to help you obtain a better understanding. The major steps are highlighted below.

1

Performance Specification

Before designing a new filter algorithm it is important to know what type of machine performance you are trying to achieve. A detailed performance specification will help determine whether or not a new control algorithm is effective.

System Measurement

The next step is to diagnose the current system when no control algorithm is being used. You can use the Bode Tool to generate the necessary data to accurately measure the plant. The data collected by the Bode Tool can then be used to generate the following plot.

1

System Model

After you have accurately measured the system, create a system model of the plant using Simulink or any other program that can be used to create a system model. You will likely need the following data to create a system model:

 
  •  inertia of the motor and loads
  •  stiffness of motor to load couplings
  •  damping of motor to load coupling
  •  motor torque constant
  •  amplifier gains
  •  system delays

Here is an example of a system model (of the same plant as above) that has been generated using Microsoft Excel.

1

Design Control Algorithm

You are now ready to start designing a control algorithm.

Create Block Diagram in Simulink

The new algorithm is stored in a MechaWare model. To create a block diagram, simply drag any of the blocks found in the Matlab MechaWare Library into the MechaWare model window. It is helpful to think of the design process as two steps:

 
  1. Specify the Control Algorithm
    Decide which blocks will be included in the algorithm and drag them into the workspace. Don't worry about setting the specific parameters for each block—the goal is to get all of the pieces that you will be working with on the work bench.

  2. Customize the Control Algorithm
    Once you have specified all of the blocks and their relationship to each other, the next step is to specify the coefficents and parameters for each block.

For example, we will start by dragging in the Command, Sum, and Actual Position blocks.

Equation:
     Position Error = (Command Position 0 – Actual Position 1)

Double-click on any block to see the block's configurable parameters.

Under the Command Block Parameters box, you can specifiy the axis number.

Under the Actual Position Block Parameters box, you can specifiy the axis number.

Under the Sum (2 Input) Block Parameters box, you can change the gains (k1, k2).

Equation:
     Position Error = (k1 * Command Position 0) + (k2 * Actual Position 1)

Add a PID with Reset block.

Add a BiQuad Filter block.

Add a Torque Output block.
You have now constructed a basic PID algorithm using the blocks in the Matlab MechaWare library.

Under the Output Block Parameters box, you can specifiy the axis/motor number.

Now that we have specified the new control law and have established the relationship between each of the blocks, we can now define the specific coefficients and parameters for each block.

Specifiy the PID parameters under the PID with Reset Block Parameters box.

Specifiy the filter characteristics under the Biquad Parameters box.

Design a Low Pass Filter

1

The Low Pass Filter above has the following filter characteristics:

 
  •  Break Point 200 Hertz
  •  Sample Rate 4000 Hertz
  •  Filter Name 'SysLowPass'

Model Validation Against Actual System

Once you have designed a new control algorithm, you will need to validate the effectiveness of the new algorithm by testing it on the actual plant. The first step is to download the firmware to the ZMP-SynqNet controller.

Is Performance Acceptable?

When evaluating a control algorithm, it is important to compare the machine's performance to the original performance specification. You may have to do several iterations of the control algorithm before the resulting machine performance meets the specific requirements.

 

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