GENERATE SIMULINK MODEL
Generate a Simulink model for the simulation of the closed-loop system
Contents
Method of pwas object.
Description
This method allows to generate a Simulink model for the simulation of the closed-loop system with PWAS controller. The controller can be either the matlab pwas object or a Xilinx System Generator black box which allows to directly simulate the VHDL files defining the controller. A plant model can also be provided, otherwise it can be described by hand later. The generated model must be opened with script openSimulinkModel, which is also generated in the same folder of the model.
Syntax
generateSimulinkModel(object)
Generates a model without defining the plant. The plant model must be defined by hand inside Simulink. The options are set to the default value (see below).
generateSimulinkModel(object,options)
As above, but some options can be specified. options is a structure with the following fields:
- simulateVHDL: if '1' the VHDL files describing the digital circuit implementing the controller are simulated. This requires Xilinx System Generator and the pwas object must be synthesized. If '0', the simulation employs simply the pwas object. Default value '0'.
- folder: destination folder where the Simulink files are saved (default is pwas_model, pwas_ser_model or pwas_par_model followed by a progressive number).
- samplingTime: sampling time of the system and controller.
generateSimulinkModel(object,plant,x0)
Generates a Simulink model by specifying also the plant model and the initial condition. plant must be a 'ss' object. The options are set to the default values.
generateSimulinkModel(object,plant,x0,options)
Generates a model by specifying the plant model, the initial condition and customized options.
Acknowledgements
Contributors:
- Alberto Oliveri (alberto.oliveri@unige.it)
Copyright is with:
- Copyright (C) 2011 University of Genoa, Italy.