Linearizing asked . 2021-08-26

Why does LINEARIZE give different results if my Simulink Solver

Why does LINEARIZE give different results if my Simulink Solver is set to Variable Step or Fixed Step in Simulink Control Design 3.0 (R2009b)?

I have a model that I am linearizing either via the LINEARIZE command line function, or via the Linear Analysis, or Compensator Design panes of the Simulink Control Design GUI. When I linearize my model with the model configured with a Variable Step solver, I get different results that if I linearize my model when the model is configured to a Fixed Step solver.

linearize , solver , control , design

Expert Answer

Neeta Dsouza answered . 2024-12-21 17:10:31

This is expected behavior in Simulink Control Design 3.0 (R2009b).
 
For some blocks in Simulink, the sample time depends on the solver and sample of times of blocks impact the linearization result. The Memory block in the Discrete section of the Simulink library is one of such blocks. When the solver is variable-step, the sample time of the Memory block is fixed in minor time step whereas when the solver is fixed-step, its sample time becomes discrete.
 
Attached is a simple model that illustrates this behavior. Please follow these steps:
 
1. From the model configuration parameters dialog, notice that the solver type is set to fixed-step, and the fixed-step size set to 1.
 
2. Navigate to Tools-> Control Design -> Linear Analysis to open the Control and Estimation Tool Manager.
 
3. Press the "Linearize Model" button.
 
4 .Leaving Control and Estimation Tool Manager open, navigate to the model Configuration Parameters -> solver and select variable-step.
 
5. In the Control and Estimation Tool Manager, hit the "Linearize Model" button again.
 
6. Compare the 2 generated models.
 
For each model, you can see from the State Space matrices as well as the step response that these are not equivalent systems. In the variable-step case, the linearization result is continuous because the memory block in this case is equivalent to an infinitesimal time delay and its does not have an impact on the linearization. In the fixed-step case, the Memory block is equivalent to a time delay, which makes the linearization result discrete. It is expected for the linearization results to be different because the models are effectively different.
 
To find such blocks in your model, you can enable Sample Time Colors from the Format menu. Inspect the colors when the solver is variable-step vs. fixed-step and notice those blocks whose color is different. Depending on the sample of linearization result you wish to end up with, you can react to these blocks accordingly.
 
In order to avoid this type of issue, it is possible to set the sample time of the linearization. This can be done from the Tools menu of the Control and Estimation Tool Manager or from command line using:
 
opt = linoptions

opt.SampleTime = 0

sys = linearize(mdl,io,opt)
If you repeat the procedure below with a linearization sample time specified, you will notice that the linearization results are the same for this simple model regardless of the solver choice.
 
For issues with multirate models, you may wish to see the demo "Linearization of Multirate Model" under Simulink Control Design->Demos.


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

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.