Time-Domain Validation of Linearization

Validate Linearization in Time Domain

This example shows how to validate linearization results by comparing the simulated output of the nonlinear model and the linearized model.

  1. Linearize Simulink® model.

    For example:

    sys = 'watertank';
    sys_io(1)=linio('watertank/PID Controller',1,'input');
    sys_io(2)=linio('watertank/Water-Tank System',1,'openoutput');
    opspec = operspec(sys);
    op = findop(sys,opspec);
    linsys = linearize(sys,op,sys_io);

    If you linearized your model in the Linear Analysis Tool, you must export the linear model to the MATLAB® workspace.

     Show me how

  2. Create input signal for validation. For example, a step input signal:

    input = frest.createStep('Ts',0.1,...
  3. Simulate the Simulink model using the input signal.

    [~,simout] = frestimate(sys,op,sys_io,input);

    simout is the simulated output of the nonlinear model.

  4. Simulate the linear model sys, and compare the time-domain responses of the linear and nonlinear Simulink model.


    The step response of the nonlinear model and linearized model are close, which validates that the linearization is accurate.

  5. Increase the amplitude of the step signal from 1.0e-005 to 1.

     input = frest.createStep('Ts',0.1,...
  6. Repeat the frequency response estimation with the increased amplitude of the input signal, and compare this time response plot to the exact linearization results.

    [~,simout2] = frestimate(sys,op,sys_io,input);
    legend('FRESTIMATE results with Custom input',...
    			'Linear simulation of linsys with Custom input',...

    The step response of linear system you obtained using exact linearization does not match the step response of the estimated frequency response with large input signal amplitude.

    This result indicates that linear model obtained using exact linearization does not behave linearly you begin to deviate from the specified operating point.

Choosing Time-Domain Validation Input Signal

For time-domain validation of linearization, use frest.createStep to create a step signal. Use the step signal as an input to frest.simCompare, which compares the simulated output of the nonlinear model and the linearized model.

The step input helps you assess whether the linear model accurately captures the dominant time constants as it goes through the step transients.

The step input also shows whether you correctly captured the DC gain of the Simulink model by comparing the final value of the exact linearization simulation with the frequency response estimation.

Was this topic helpful?