Operating points error: Error:The simulation inputs must be specified as a vector of doubles while using the trimming tool from model linearizer

37 views (last 30 days)
Hello everyone,
I am having a problem using the trimming tool from the model linearizer (Control Systems Toolbox).
Every time I try to run the tool to find the operating points, I get an error like "The simulation inputs must be specified as a vector of doubles".
I have already checked the dimension of the only two inputs included in the model (HStab and Throttle, which hold values for the elevator angle and throttle setting of the engine), but both are defined as doubles.
The model itself calculates the states of the longitudinal motion of an aircraft (u, w, q and theta) using the 3dof (body axes) block from the aerospace blockset toolbox.
Does anyone know how I can fix this error so that the model linearizer can calculate an operating point?
Thanks in advance

Answers (1)

Maneet Kaur Bagga
Maneet Kaur Bagga on 20 Nov 2024 at 4:14
Edited: Maneet Kaur Bagga on 20 Nov 2024 at 4:14
Hi,
As per my understanding, the "Model Linearizer" requires the inputs to be explicitly defined as a vector of doubles for trimming and linearization. Please refer to the following as a possiblle workaround for the same:
  • Check Signal Types and Dimensions: Use "Signal Specification blocks" from Simulink library to verify the type and dimensions of these inputs.
  • Use Model Diagnostic Tools: Run the "Model Advisor" to check for input signal issues. Enable signal logging and confirm the exact values and types of "HStab" and "Throttle".
  • Set Fixed Initial Values: In the "Trimming Tool", ensure that initial values are provided for all inputs and states.
  • Use Script-Based Trimming: Instead of using the GUI, use the "findop" function to specify operating points programmatically.
op = operspec('YourModelName');
% Set input and state specifications
op.Inputs(1).u = 0; % Throttle
op.Inputs(2).u = 0; % HStab
op.States(1).x = 0; % Example state
options = findopOptions('DisplayReport', 'on');
[opPoint, opReport] = findop('YourModelName', op, options);
Please refer to the following MathWorks documentation for the findop function:
Hope this helps!

Categories

Find more on Guidance, Navigation, and Control (GNC) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!