Main Content

Control System Modeling with Model Objects

Model objects can represent individual components of a control architecture, such as the plant, actuators, sensors, or controllers. You can connect model objects to build aggregate models of block diagrams that represent the combined response of multiple elements.

For example, the following control system contains a prefilterF, a plantG, and a controllerC, arranged in a single-loop configuration. The model also includes a representation of sensor dynamics,S.

You can represent each of the components as a model object. You do not need to use the same type of model object for each component. For example, represent the plantGas a zero-pole-gain (zpk) model with a double pole ats= -1;Cas a PID controller, andFandS作为传递函数:

G = zpk([],[-1,-1],1); C = pid(2,1.3,0.3,0.5); S = tf(5,[1 4]); F = tf(1,[1 1]);

You can then combine these elements build models that represent your control system or the control system as a whole. For example, create the open-loop responseSGC:

open_loop = S*G*C;

To build a model of the unfiltered closed-loop response, use thefeedbackcommand:

T = feedback(G*C,S);

To model the entire closed-loop system response fromrtoy, combineTwith the filter transfer function:

Try = T*F;

The resultsopen_loop,T, andTryare also linear model objects. You can operate on them with Control System Toolbox™ control design and analysis commands. For example, plot the step response of the entire system:

stepplot(Try)

Figure contains an axes object. The axes object contains an object of type line. This object represents Try.

When you combine Numeric LTI models, the resulting Numeric LTI model represents the aggregate system. The resulting model does not retain the original data from the combined components. For example,T不单独保持track of the dynamics of the componentsG,C, andSthat are combined to createT.

See Also

Related Examples

More About