Case Study Tutorial

We will now look at a case study in order to better understand the process of developing a new control algorithm. The major steps are highlighted below.

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 MEI's 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.


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.


Design Control Algorithm

You are now ready to start designing a control algorithm.

Create Block Diagram in Simulink

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

  1. Specify the Control Law
    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 Law
    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.

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

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

Under the Command block's parameters box, you can specifiy the axis number.


Saving the Algorithm - To save the algorithm in _______, go File > Save As.

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


Under the Sum Block Parameters box, you can change the gains.

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


Add a PID block.


Add a BiQuad block.


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


Under the Output Block Parameters box, you can specifiy the axis 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 Block Parameters box.


Specifiy the filter characteristics under the Biquad Parameters box.


Design a Low Pass Filter

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 using the MechaWare Control Bar.

Click on the Load ZMP button to download the firmware to the 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.

Previous | Back to Table of Contents


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