Using Simulink    

Discretizing Blocks from the Simulink Model

You can replace continuous blocks in a Simulink model with the equivalent blocks discretized in the s-domain using the Discretizing library.

The procedure below shows how to replace a continuous Transfer Fcn block in the Aircraft Dynamics Model subsystem of the f14 model with a discretized Transfer Fcn block from the Discretizing Library. The block is discretized in the s-domain with a zero-order hold transform method and a 2 second sample time.

  1. Open the f14 model.
  2. Open the Aircraft Dynamics Model subsystem in the f14 model.

  3. Open the Discretizing library window.
  1. Enter discretizing at the MATLAB command prompt. The Library: discretizing window opens. This library contains s-domain discretized blocks.

  1. Add the Discretized Transfer Fcn block to the f14/Aircraft Dynamics Model window.
    1. Click the Discretized Transfer Fcn block in Library: discretizing window.
    2. Drag it into the f14/Aircraft Dynamics Model window.

  2. Open the parameter dialog box for the Transfer Fcn.1 block.
  1. Double-click the Transfer Fcn.1 block in the f14/Aircraft Dynamics Model window. The Block Parameters: Transfer Fcn.1 dialog box opens.

  1. Open the parameter dialog box for the Discretized Transfer Fcn block.
  1. Double-click the Discretized Transfer Fcn block in the f14/Aircraft Dynamics Model window. The Block Parameters: Discretized Transfer Fcn dialog box opens.

    Copy the parameter information from the Transfer Fcn.1 block's dialog box to the Discretized Transfer Fcn block's dialog box.

  1. Enter 2 in the Sample time field.
  2. Select zoh from the Method drop-down list.
  1. The parameter dialog box for the Discretized Transfer Fcn. now looks like this.

  1. Click OK.
  1. The f14/Aircraft Dynamics Model window now looks like this.

  1. Delete the original Transfer Fcn.1 block.
    1. Click the Transfer Fcn.1 block.
    2. Press the Delete key. The f14/Aircraft Dynamics Model window now looks like this.

  2. Add the Discretized Transfer Fcn block to the model.
    1. Click the Discretized Transfer Fcn block.
    2. Drag the Discretized Transfer Fcn block into position to complete the model. The f14/Aircraft Dynamics Model window now looks like this.


  Viewing the Discretized Model Discretizing a Model from the MATLAB Command Window