## Documentation Center |

On this page… |
---|

Validate Linearization in Frequency Domain using Linear Analysis Tool |

This example shows how to validate linearization results using an estimated linear model.

In this example, you linearize a Simulink^{®} model using the
model initial conditions. You then estimate the frequency response
of the model using the same operating point (model initial condition).
Finally, you compare the estimated response to the exact linearization
result.

**Step 1. Linearize Simulink model.**

Open a Simulink model.

`sys = 'scdDCMotor'; open_system(sys);`

Open the Linear Analysis Tool for the model.

In the Simulink model window, select

**Analysis**>**Control Design**>**Linear Analysis**.Select a visualization for the linearized model.

In the

**Plot Result**list, choose**New Bode**.Linearize the model.

Click .

A new linearized model,

`linsys1`, appears in the**Linear Analysis Workspace**.The software used the model initial conditions as the operating point to generate

`linsys1`.

**Step 2. Create sinestream input signal.**

Click the

**Frequency Response Estimation**tab.In this tab, you estimate the frequency response of the model.

Open the Create sinestream input dialog box.

Select

**Sinestream**from the**Input Signal**list.Initialize the input signal frequencies and parameters based on the linearized model.

Click

**Initialize frequencies and parameters**.The Frequency content viewer is populated with frequency points. The software chooses the frequencies and input signal parameters automatically based on the dynamics of

`linsys1`.In the Frequency content viewer of the Create sinestream input dialog box, select all the frequency points.

Modify the amplitude of the input signal.

Enter 1 in the

**Amplitude**box.Click

**OK**.The input signal

`in_sine1`appears in the**Linear Analysis Workspace**.

**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.

For frequency-domain validation of linearization, create a sinestream signal. By analyzing one sinusoidal frequency at a time, the software can ignore some of the impact of nonlinear effects.

Input Signal | Use When | See Also |
---|---|---|

Sinestream | All linearization inputs and outputs are on continuous signals. | frest.Sinestream |

Sinestream with fixed sample time | One or more of the linearization inputs and outputs is on a discrete signal | frest.createFixedTsSinestream |

You can easily create a sinestream signal based on your linearized model. The software uses the linearized model characteristics to accurately predict the number of sinusoid cycles at each frequency to reach steady state.

When diagnosing the frequency response estimation, you can use the sinestream signal to determine whether the time series at each frequency reaches steady state.

Was this topic helpful?