Application Frequency Response Functions

The Application Frequency Response API lets you trigger frequency responses in Automation1 Studio and do stability analysis on frequency responses that you collect. These AeroScript functions run on the Automation1-iSMC. But they are handled through a connected Automation1-MDK Studio application. Before you use these functions, you must connect Automation1 Studio to the controller.

Tip: By default, Automation1 Studio and Automation1 MachineApps try to register for Application Message and Application Frequency Response callbacks. The first application that registers will get the callbacks. The next application that tries to register will get an error. You can change the default behavior of Automation1 Studio in Settings. You can change the default behavior of a MachineApp in the MachineApps workspace in Automation1 Studio.

Frequency Response

Automation1 Studio has a Frequency Response utility that you can use to analyze the characteristics of the servo loop and its mechanical system.

For information about how frequency responses are measured, see the Frequency Response Module.

While Automation1 Studio gives you an interface where you can easily measure frequency responses, the AppFrequencyResponse* functions let you measure multiple responses in succession. Then you can save them as frequency response files to make a streamlined workflow. The API supplies functions that you can use to run each of the supported loop input types:

  • MultisinePlus loop input type - Use the AppFrequencyResponseTriggerMultisinePlus() function.
  • Sinusoid loop input type - Use the AppFrequencyResponseTriggerSinusoid() function.
  • White Noise loop input type - Use the AppFrequencyResponseTriggerWhiteNoise() function.
  • Multisine loop input type - Use the AppFrequencyResponseTriggerMultisine() function.

Each Frequency Response must run on a different, physical axis. Before you use these functions, you can use their related App*IsRegistered() functions to see if they are registered with an Automation1 Studio, Automation1 MachineApps, or a custom .NET application.

There are a number of configurations that you can do to change the behavior of the transmissions. Use the $mdkFilePath argument to specify the location and name of the output file on the client MDK machine. Relative paths are supported and are relative to the Automation1 folder in your Documents folder. To save to an absolute path outside of the MDK folder, turn on the Allow Saving to and Reading from Absolute Paths toggle in the Frequency Response settings in Automation1 Studio. Network and controller paths are not supported. Use the $frequencyResponseFileType argument to specify the type of file to save. Supported file types include Automation1 Frequency Response, CSV, and JSON.

Application Frequency Response Function Overloads

Stability Analysis

Use the AppFrequencyResponsePerformStabilityAnalysis() function to do a stability analysis on a frequency response file. A stability analysis calculates stability metrics of a frequency response, which include the phase margin, magnitude crossover frequency, gain margin, phase crossover frequency, sensitivity peak, and sensitivity peak frequency. The calculated stability analysis metrics are returned by the $phaseMargin, $magnitudeCrossoverFrequency, $gainMargin, $phaseCrossoverFrequency, $sensitivityPeak, and $sensitivityPeakFrequency arguments. Before you use this function, you can use the AppFrequencyResponsePerformStabilityAnalysisIsRegistered() function to see if it is registered with an Automation1 Studio, Automation1 MachineApps, or a custom .NET application.

Use the $mdkFilePath argument to specify the frequency response file on the client MDK machine on which to do a stability analysis. Relative paths are supported and are relative to the Automation1 folder in your Documents folder. To save to an absolute path outside of the MDK folder, turn on the Allow Saving to and Reading from Absolute Paths toggle in the Frequency Response settings in Automation1 Studio. Network and controller paths are not supported.

Related Help Pages 

Axes Category Overview