Time-Domain Responses of Multiple Models

This example shows how to compare the step responses of multiple models on a single plot using step. This example compares the step response of an uncontrolled plant to the closed-loop step response of the plant with two different PI controllers. You can use similar techniques with other response commands, such as impulse or initial, to obtain plots of responses of multiple models.

For this example, obtain two models whose time responses you want to compare, and plot them on a single step plot. For instance, you can compare a third-order plant G, and the closed-loop response of G with a controller C1 having integral action.

G = zpk([],[-5 -5 -10],100);

C1 = pid(0,4.4);
CL1 = feedback(G*C1,1); 

step(G,CL1);

When you provide multiple models to step as input arguments, the command displays the responses of both models on the same plot. If you do not specify a time range to plot, step attempts to choose a time range that illustrates the dynamics of all the models.

Compare the step response of the closed-loop model with another controller. Specify plot colors and styles for each response.

C2 = pid(2.9,7.1);
CL2 = feedback(G*C2,1);
 
step(G,'b--',CL1,'g-',CL2,'r-')

You can specify custom plot color and style for each response in the plot. For example, 'g-' specifies a solid green line for response CL2. For additional plot customization options, use stepplot.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.

Machine Learning in MATLAB

Train Classification Models in Classification Learner App

Train Regression Models in Regression Learner App

Distribution Plots

Explore the Random Number Generation UI

Design of Experiments

Machine Learning Models

Logistic regression

Logistic regression create generalized linear regression model - MATLAB fitglm 2

Support Vector Machines for Binary Classification

Support Vector Machines for Binary Classification 2

Support Vector Machines for Binary Classification 3

Support Vector Machines for Binary Classification 4

Support Vector Machines for Binary Classification 5

Assess Neural Network Classifier Performance

Naive Bayes Classification

ClassificationTree class

Discriminant Analysis Classification

Ensemble classifier

ClassificationTree class 2

Train Generalized Additive Model for Binary Classification

Train Generalized Additive Model for Binary Classification 2

Classification Using Nearest Neighbors

Classification Using Nearest Neighbors 2

Classification Using Nearest Neighbors 3

Classification Using Nearest Neighbors 4

Classification Using Nearest Neighbors 5

Linear Regression

Linear Regression 2

Linear Regression 3

Linear Regression 4

Nonlinear Regression

Nonlinear Regression 2

Visualizing Multivariate Data

Generalized Linear Models

Generalized Linear Models 2

RegressionTree class

RegressionTree class 2

Neural networks

Gaussian Process Regression Models

Gaussian Process Regression Models 2

Understanding Support Vector Machine Regression

Understanding Support Vector Machine Regression 2

RegressionEnsemble