This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Linearization of a Conveyor Model

This example shows the use of the operating point search and snapshot features along with the linearization of a Simscape Multibody model. (Requires Simscape Multibody)

Operating Condition Search

Open the model.


The steady state operating point can now be found using the operating specification object initialized using the simulated operating point. For the steady state operating point search, the Analysis Type for the Simscape Multibody machine must be set to be in Trimming mode. See the Simscape Multibody documentation for details on this feature.

set_param('scdmechconveyor/Mechanical Environment','AnalysisType','Trimming')
opspec = operspec('scdmechconveyor');

For Simscape Multibody models, the operating condition search in some cases can converge to a steady state condition more quickly using a nonlinear least squares algorithm. This algorithm is available if the Optimization Toolbox is licensed. An iterative report of the search can also be displayed by using the LINEARIZEOPTIONS command.

opt = findopOptions('OptimizerType','lsqnonlin','DisplayReport','none');
opt.OptimizationOptions.MaxFunEvals = 2000;

To ensure that the algebraic constraints in the Simscape Multibody model are met, the trim output port must be specified to be zero.

opspec.Outputs.y = zeros(8,1);
opspec.Outputs.Known = ones(8,1);

The steady state operating point can now be found using the FINDOP command.

[op,opreport] = findop('scdmechconveyor',opspec,opt);

Display the final report.

 Operating point search report for the Model scdmechconveyor.
 (Time-Varying Components Evaluated at time t=0)

Operating point specifications were successfully met.
(1.) scdmechconveyor/Position Controller/H_inf Controller
      x:         -1.08      dx:             0 (0)
      x:     -7.67e-12      dx:       3.3e-12 (0)
      x:         0.199      dx:      2.31e-13 (0)
      x:         0.199      dx:      2.53e-14 (0)
      x:        0.0743      dx:      1.44e-13 (0)
(2.) scdmechconveyor/Position Controller/Loopshaping Weight
      x:      2.59e-07      dx:      1.49e-13 (0)
      x:      2.59e-07      dx:      1.52e-14 (0)
      x:      9.66e-08      dx:     -3.79e-14 (0)
(3.) scdmechconveyor/Position Controller/Prefilter
      x:        0.0103      dx:      2.44e-13 (0)
(4.) scdmechconveyor/Position Controller/inv(W)
      x:     -2.59e-07      dx:     -1.49e-13 (0)
      x:     -2.59e-07      dx:     -1.52e-14 (0)
      x:     -9.66e-08      dx:      1.06e-13 (0)
(5.) Prismatic.P1.Position
      x:         0.103      dx:     -4.45e-21 (0)
(6.) Prismatic.P1.Velocity
      x:     -4.45e-21      dx:      5.88e-14 (0)
(7.) Revolute.R1.Position
      x:        -0.881      dx:      2.45e-21 (0)
(8.) Revolute.R1.Velocity
      x:      2.45e-21      dx:     -1.89e-13 (0)
(9.) Revolute1.R1.Position
      x:          0.83      dx:     -1.78e-20 (0)
(10.) Revolute1.R1.Velocity
      x:     -1.78e-20      dx:      6.58e-14 (0)
(11.) Revolute3.R1.Position
      x:        -0.172      dx:      1.49e-20 (0)
(12.) Revolute3.R1.Velocity
      x:      1.49e-20      dx:      -9.3e-14 (0)
(13.) Revolute5.R1.Position
      x:       0.00175      dx:     -1.53e-22 (0)
(14.) Revolute5.R1.Velocity
      x:     -1.53e-22      dx:     -2.67e-14 (0)

Inputs: None 

(1.) scdmechconveyor/MSB Trimming Out
      y:     -2.31e-13    (0)
      y:      1.41e-13    (0)
      y:     -9.13e-13    (0)
      y:      1.61e-13    (0)
      y:     -4.44e-21    (0)
      y:       7.7e-22    (0)
      y:      2.97e-21    (0)
      y:      5.89e-21    (0)

Before linearization of the model can be completed, the Analysis Type for the Simscape Multibody model needs to be restored.

set_param('scdmechconveyor/Mechanical Environment','AnalysisType','Forward dynamics')

Linearize the Model

In this model the open loop plant model between the conveyor position and the torque command can be found using the following input and outputs:

io(1) = linio('scdmechconveyor/Joint Sensor',1,'openoutput');
io(2) = linio('scdmechconveyor/Position Controller',1,'input');

Linearize the model.

sys = linearize('scdmechconveyor',op,io);

View the linearized model and corresponding Bode plot.

sysm = zpk(sys)
sysm =
  From input "Torque" to output "Joint Sensor":
  (s-3.481) (s+3.481)
Continuous-time zero/pole/gain model.

Close the model.

Was this topic helpful?