.


   

Running an FFT Measurement

To make an FFT measurement of the system, select "Noise" as the type of measurement from the Measurement menu bar (Measurement->FFT->Noise).

Before performing an FFT measurement, several parameters must be set:

First Motor Number

This is the motor number of the primary motor to test. However, this number must correspond to an enabled motor object (object enabled in firmware, not enabled at the amplifier). The number of enabled firmware motor objects can be found in Motion Console ->Controller Summary ->Config -> Motor Count.

First Motor Coefficient

Not used in FFT measurements at this time.

Second Motor Number

Not used in FFT measurements at this time.

Second Motor Coefficient

Not used in FFT measurements at this time.

Closed Loop Drop Down Box

This drop down box lets you select which measurements will be made in FFT mode:


The examples below were taken from using a Trust TA 9000.

Closed Loop
This measures the Closed Loop Response of the control system. There must be a non-zero controller (i.e. at least one non-zero PID / PIV parameter and non-zero biquad response - default biquad response if unity). The closed loop response will be displayed as the closed loop response in the View window. The red trace is the closed loop response, blue open loop (simulated from closed loop response), and the green is the controller simulation response.

The Closed Loop measurement does not work with MechaWare. Only the Custom and User Buffer measurements work with MechaWare.

Controller
This measures the response of the controller ((PID / PIV) + biquad). The response of this measurement should match the filter simulations in the View window. There must be a non-zero controller (i.e. at least one non-zero PID / PIV parameter and non-zero biquad response - default biquad response if unity). The controller response will be displayed as the closed loop response in the View window. It is difficult to see, but there is a red trace (measured filter response) under the green trace (simulated filter response).

The Controller measurement does not work with MechaWare. Only the Custom and User Buffer measurements work with MechaWare.

Plant
This measures the Plant Response of the system outside the controller (i.e. amps, motors, and mechanical system). This test does not require PID / PIV / Biquad Parameters. The Plant response will be displayed as the open loop response in the View window. The following plot shows the plant response (blue trace) and the controller response under the test conditions (green trace).

Here is the same test performed when Kp, Ki, and Kd parameters all equal zero. The plant data is the same. The filter data is shown as 0dB, 0 degrees when there are no filter parameters.

This Plant measurement does not work with MechaWare. Only the Custom and User Buffer measurements work with MechaWare.

Open Loop
This measures the Open Loop Response of the control system. There must be a non-zero controller (i.e. at least one non-zero PID / PIV parameter and non-zero biquad response - default biquad response if unity). The open loop response will be displayed as the open loop response in the view window. This measurement is the direct measurement of the open loop simulation provided in the closed loop measurement described above.

The following plot shows a blue trace (measured open loop response), red trace (closed loop response simulated from a measured open loop response), and a green trace (simulated filter response).

This Open Loop measurement does not work with MechaWare. Only the Custom and User Buffer measurements work with MechaWare.

Custom
This mode allows advanced users to perform a dual channel FFT on any two memory locations in the controller to allow measurements that are not imagined by the Bode Tool author. Either memory location can be a float or a long. The user needs to specify the controller memory address and type (long or float) for each memory location.

To specify the controller memory address, VM3 is a handy tool to visually browse the controller memory. An example is shown below where the position error is desired and is shown to be at address 0x28d45.

Specifying addresses in the Bode Tool

First, select the Custom test type. To specify the address, simply enter the hex address, led by "0x" in the In and Out edit boxes in the Bode Tool.

The following example shows the address 0x4069a7 set for the input address and 0x4069a8 as the output address.

Specifying addresses in bode.ini

To specify the address, the bode.ini file must be modified. The bode.ini file tells the Bode Tool it's settings on start up and saves current settings on closing. The following settings will be needed in bode.ini.

A dual channel FFT, like used in the Bode Tool is made up of and input and output. For instance, in a plant measurement, the input is the commanded torque, and the output is the actual position.

customPointIn - This is the input address for the dual channel fft. This value is a hex address.
customPointFloatIn - This specifies whether the customPointIn is the address of a float or long. float = 1, long = 0.
customPointOut - This is the output address for the dual channel fft. This value is a hex address.
customPointFloatOut - This specifies whether the customPointOut is the address of a float or long. float = 1, long = 0.

A sample configuration is shown below (from bode.ini)for reference:

customPointIn 0x28d4c
customPointFloatIn 1
customPointOut 0x28d45
customPointFloatOut 1

The custom mode will return the frequency response of the input vs output as the closed loop trace. The open loop trace will be calculated, but may or may not be appropriate depending on the points you choose to measure.

User Buffer

The User Buffer test type was created to simplify MechaWare FFT testing. The values recorded in the User Buffer mode must be floats. To select the address, simply enter the user buffer index in base 10. The following example show User Buffer 1 as the input and User Buffer 0 as the ouput. User Buffer inputs are limited to 0-1024 (valid range of user buffer indices)

Number Samples

Number Samples sets the number of samples of data that will be collected. Keep in mind that the amount of time needed for the test is set by the sample rate. For example, 20,000 samples at a 2,000 Hz sample rate will result in 10 seconds of excitation. Increasing the number of samples will result in a longer test and less noise in the final measurement. The number of samples must be greater or equal to the number of FFT points.

Number FFT Points

Number FFT Points sets the resolution of the FFT measurement. The resolution of the FFT measurement is the Sample Rate / Number FFT Points. Low resolutions of FFT produce the least amount of noise, whereas high resolutions of FFT yield more noise.

For example, at a 2,000 Hz sample rate and 4096 FFT points, the FFT resolution is 0.49 Hz.

Increasing the Number FFT Points will increase FFT resolution and make the measurement noisier. By lowering the FFT resolution, you are essentially averaging more than one frequency together, thereby lowering the noise. (The FFT algorithm is designed to be efficient for most numbers of FFT Points.) The FFT algorithm is most efficient when using powers of 2 for the Number FFT Points.

The parameter "Number FFT Points" must be a number that can be factored to a largest prime number of 37 or smaller. If "Number FFT Points" does not satisfy this requirement, the following error window will be shown.

If you run the Bode Tool in an automated test from the command line and choose "Num FFT Points" with a prime greater than 37, then the Bode Tool will automatically increase "Num FFT Points" for you until the largest prime number is less than 37.

Known Limitation: Number of FFT Points can not exceed 19000 points. Higher values cause truncation of data at high frequencies.

Overlap %

Use the Overlap % parameter to adjust the overlap between FFT segments. This number can be adjusted from 0 - 50. A value of 50% is a good default setting.

Amplitude (DAC counts)

The sine test signal is scaled in DAC counts. The Amplitude is the peak amplitude of a sine sweep. Valid values are between 0 - 32767 (10 Volts output). It is important to ensure that no clipping occurs. Values of 15000 or less are typically clipping free, but systems with large resonances can clip, even when lower values are used.

Abort Button

WARNING: A noise test can take a long time and can easily introduce too much energy into a system if configured incorrectly. This can result in resonances being excited for a long period of time and possible overheating of motors. The Bode Tool does not have any way to recognize that a system has gone into an uncontrollable oscillation. The user is responsible for choosing parameters that will not result in dangerous or damaging motion if a physical motor is connected. If dangerous motion does occur, click on the large abort button that pops up upon the start of the test. The user can also press the space bar or the enter button to do the same when the abort button has focus (active window). Pressing the escape key will cause the test to end, but the motor will remain enabled.

An abort causes the motor being tested to perform an abort action and turn off the noise excitation. The abort action is caused by a user limit that the Bode Tool automatically configures. If all the user limits are previously used when the Bode Tool needs one, then the Bode Tool will just disable the motor's amplifier, instead of causing an abort event.

If the large abort button does not have focus (grey title bar), the space bar and enter button will not stop the test. The abort will lose focus when the mouse is clicked outside the large abort button window. Loss of focus can be seen by a change in the appearance of the abort button and a change in the abort button window title bar (turns to grey).

Motion States

The Bode Tool will attempt to clear errors on the phantom axis. If for some reason, the error will not clear, the program will pop up an error window asking you to fix the problem. An error state on the axis being tested will generate this pop up window:

If the axis being tested has an error, the program will not start testing until the error is cleared. Use Motion Console or a similar application to clear the error and start another test.

Saving Raw Data from the FFT Test

By default, the Bode Tool does not store the raw noise excitation data to files. To save the raw excitation data to a file, check Measurement->FFT->Save Raw Data. The data is saved in a file named "rawNoise.txt" in the same directory as the Bode Tool.

The data is in the following tab delimited format:
Sample counter [tab] excitation signal [tab] input signal [tab] output signal

Here is a section of a sample rawNoise.txt file:

29000222 -43.130937 -41.130936 36
29000223 -1.659435 0.340565 36
29000224 9.918809 11.918809 37
29000225 5.444968 7.444968 36
29000226 13.624221 15.624221 37
29000227 -17.655438 -15.655437 37
29000228 -34.949321 -32.949322 37
29000229 6.816512 8.816512 37
29000230 -34.872639 -32.872639 37

Previous | Next

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