Skip to Main Content Skip to Search
Product Documentation

Estimating Frequency Response

Estimating Frequency Response Using Linear Analysis Tool

This example shows how to perform frequency response estimation for a model using the Linear Analysis Tool.

Step 1. Open Simulink model and Linear Analysis Tool.

Step 2. Create an input signal for estimation.

Step 3. Estimate frequency response.

Click . The frequency response estimation result, estsys1, appears in the Linear Analysis Workspace.

Estimating Frequency Response with Linearization Based Input Using Linear Analysis Tool

This example shows how to perform frequency response estimation for a model using the Linear Analysis Tool. The input signal used for estimation is based on the linearization of the model.

Step 1. Linearize Simulink model.

Step 2. Create sinestream input signal.

Step 3. Select the plot to display the estimation result.

In the Plot Result list, choose Bode Plot 1 to add the next computed linear system to Bode Plot 1.

Step 4. Estimate frequency response.

Click . The estimated system, estsys1, appears in the Linear Analysis Workspace.

Step 5. Examine estimation results.

Bode Plot 1 now shows the Bode responses for the estimated model and the linearized model.

The frequency response for the estimated model matches that of the linearized model.

Estimating Frequency Response (MATLAB Code)

 Prerequisites

  1. Use linearization I/O points to specify input and output points for frequency response estimation.

    Example:

    io(1) = linio('f14/Sum1',1)
    io(2) = linio('f14/Gain5',1,'out')
    

      Caution   Avoid placing I/O points on bus signals.

    For more information about linearization I/O points, see Specify Model Portion to Linearize and the linio reference page.

  2. Identify all source blocks that generate time-varying signals in the signal path of the linearization outputs. Such time-varying signals can interfere with the signal at the linearization output points and produce inaccurate estimation results.

    1. First, use frest.findSources to identify time-varying source blocks that can interfere with estimation. frest.findSources finds all time-varying source blocks in the signal path of the linearization output points.

      Example:

      Identify the time-varying source blocks in the f14 model:

      srcblks = frest.findSources('f14',io); 
    2. Next, to disable these blocks during estimation, use frestimateOptions.

      For example:

      opts = frestimateOptions;
      opts.BlocksToHoldConstant = srcblks;

    For more information, see the frest.findSources and frestimateOptions reference pages.

  3. Estimate the frequency response.

    Example:

    [sysest,simout] = frestimate('f14',io,input,opts)

    sysest is the estimated frequency response. simout is the simulated output that is a Simulink.Timeseries object.

    For more information about syntax and argument descriptions, see the frestimate reference page.

  4. Open the Simulation Results Viewer to analyze the estimated frequency response. For example:

    frest.simView(simout,input,sysest);

    You can compare the estimated frequency response (sysest) to a system you linearized using exact linearization (sys):

    frest.simView(simout,input,sysest,sys);

    For more information, see Analyzing Estimated Frequency Response.

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS